HPRath

Innovations in High Performance Computing

Cisco Linksys AE6000 / AC580 (Mediatek mt7610u, mt7630u, mt7650u) – Linux x64 Driver patch

| 190 Comments

Linux Driver experience !

Below is a post on my journey and detective work on building a working device driver

Prelude

I bought a 802.11ac Wifi dongle for use on my Ubuntu 14.04 LTS Linux x64 workstation. It is a Cisco Linksys AE6000 / AC580 model.  It was a upgrade to my old wireless N wifi adaptor USB N10 from ASUS. The AC compatible wifi dongles can easily work with 300 mbps internet or even higher home wifi networking.

 

Reality

When plugged in to my desktop usb port, it didnt work. I searched for Linux drivers for the device on internet. I came across the following page

It let me know chipset used inside of the wifi dongle, it turns out to be Mediatek mt7610u

 

Initial investigation

The Mediatek website lists the drivers for Linux at

Downloaded the driver and compiled, it gave compilation errors ! wow production quality code

 

Detective work (1)

I searched further on internet, there are many fustrated people trying various workarounds, sharing their knowledge. It helped me as well. I squarely blame Linksys for not providing a working Linux driver, it is hardly a 1 months work for a experienced engineer to take the readily available chipset driver and tweak to the Linksys specifications. They have resources and knowledge to test it properly. Any ways I just could not return my wifi dongle and had to make it work on my linux.

So, I geared up with little knowledge I have on linux USB drivers.

The links below helped me a lot

I did all the modifications suggested in the links above still it didn’t work. Not even a single blip of light from the dongle 🙁

Well I had to to a lot of detective work .. I was able to identify the VENDOR ID and PRODUCT ID was not setup in the driver. I could figure out where to replace that

$ lsusb
Bus 002 Device 007: ID 13b1:003e Linksys

here

  • VENDOR_ID is 0x13B1
  • PRODUCT_ID is 0x003E

 

common/rtusb_dev_id.c

USB_DEVICE_ID rtusb_dev_id[] = {
 #ifdef MT76x0
 	{USB_DEVICE(0x148F,0x7610)}, /* MT7610U */
	{USB_DEVICE(0x13B1,0x003E)}, /* MT7610U Cisco Linksys AE6000 AC580 */
 	{USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
 	{USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */

 #endif

 

After replacement and installation of driver, it seemed to work, Ubuntu identified and asked for Wifi networks to connect, asked about wifi password, it accepted and connected Voila !!

No not so soon, it is Linux and dealing with rouge drivers ! when opened a browser the screen froze, it is a kernel panic. A segmentation fault in the driver .. ah!!

 

Detective work (2)

After a lot of pondering, I figured out that in os/linux/rt_linux.c there are some packet copying, duplication c language code. It is casting pointers to UINT32, also pathetic it is using macros here and there. Searched on internet for 64bit Mediatek drivers for Wifi adaptor, luckily I came across a very good similar effort for another mediatek chipset rt3573sta.

From the project above I could find out how they have fixed the code for

  • include/os/rt_linux.h
  • os/linux/rt_linux.c

 

Finally Success!

After a lot of failures and crashes, I could fix most of the issues.. below link is my fixes checked in to a public project on BitBucket

 

Patched driver source code, Build & Install Your own driver!!

List of changes:

https://bitbucket.org/sanrath/mediatek_mt7610u_sta_driver_linux-64bit/commits/a989fcd6e073205690434e99ac1dc2b0f837350b
All the fixed code at one place (below) please download the code below (download link on the link below on left menu, the last item )

https://bitbucket.org/sanrath/mediatek_mt7610u_sta_driver_linux-64bit

 

Important – Steps to build driver from sources

Steps: 

1. Unplug Wifi dongle from USB 

2. update your sources and upgrade if any  
   sudo apt-get update 
   sudo apt-get upgrade 

3. install gnu compiler collection 
   sudo apt-get install build-essential

4. lets install git 
   
   sudo apt-get install git 

5. get sources 
   git clone https://sanrath@bitbucket.org/sanrath/mediatek_mt7610u_sta_driver_linux-64bit.git

5.1 - if you have cloned already 
   cd mediatek_mt7610u_sta_driver_linux-64bit
   git pull

6. build driver 
   
   cd mediatek_mt7610u_sta_driver_linux-64bit
   make clean
   make 
   sudo make install 


There should not be any errors in last commands 

7. After the last command connect your USB Wifi adapter to any USB port. Now it must have listed all visible wifi signals(SSIDs). Connect to internet
8. open a browser and test internet !!  

 

 

Run the following command

$ ifconfig
eth0      Link encap:Ethernet  HWaddr c8:60:00:24:66:2a  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18 Memory:f9100000-f9120000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:13484 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13484 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2317336 (2.3 MB)  TX bytes:2317336 (2.3 MB)

ra0       Link encap:Ethernet  HWaddr 48:f8:b3:69:a6:92  
          inet addr:192.168.0.103  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4af8:b3ff:fe69:a692/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1818807 errors:0 dropped:0 overruns:0 frame:0
          TX packets:835503 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2519781141 (2.5 GB)  TX bytes:129986703 (129.9 MB)

 

You can see ra0 interface now getting listed

By now it must have listed all wifi connections visible. Go to your wifi menu on Ubuntu at the top menu bar and select wifi network to connect. Setup your connection and open a browser page to test internet connection.

 

Please feel free to make any correction or any update to the driver code on Bitbucket

The values in RT2870.DAT Explained

Copied from link http://www.techknow.me/forum/index.php?topic=428.0

#The word of "Default" must not be removed
Default
CountryRegion=5
{0: channels 1 ~ 11}
{1: channels 1 ~ 12}
{2: channels 10, 11}
{3: channels 10 ~ 13}
{4: channel 14}
{5: channels 1 ~ 14}
{6: channels 3 ~ 9}
{7: channels 5 ~ 13}

CountryRegionABand=7
{0: use 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165 Channel}
{1: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 Channel}
{2: use 36, 40, 44, 48, 52, 56, 60, 64 Channel}
{3: use 52, 56, 60, 64, 149, 153, 157, 161 Channel}
{4: use 149, 153, 157, 161, 165 Channel}
{5: use 149, 153, 157, 161 Channel}
{6: use 36, 40, 44, 48 Channel}
{7: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 Channel}
{8: 52, 56, 60, 64 Channel}
{9: 34, 38, 42, 46 Channel}
{10: 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64 Channel}

CountryCode=
{AG, AR, AW, AU, AT, BS, BB, BM, BR, BE, BG, CA, KY, CL, CN, CO, CR, CY, CZ, DK, DO, EC, SV, FI, FR, DE, GR, }
{GU, GT, HT, HN, HK, HU, IS, IN, ID, E, IL, IT, JP, JO, LV, LI, LT, LU, MY, MT, MA, MX, NL, NZ, NO, PE, PT, }
{PL, RO, RU, SA, CS, SG, SK, SI, ZA, KR, ES, SE, CH, TW, TR, GB, UA, AE, US, VE}

ChannelGeography=1

SSID=MyNetwork
{0~z, less than 32 characters} Set access point SSID

NetworkType=Infra
{Infra,Adhoc}

WirelessMode=5
{0: legacy 11b/g mixed}
{1: legacy 11b only}
{2: legacy 11a only}
{3: legacy 11a/b/g mixed}
{4: legacy 11g only}
{5: 11a/b/g/n mixed}
{6: 11n only}
{7: 11g/n mixed}
{8: 11a/n mixed}
{9: 11b/g/n mixed}
{10: 11a/g/n mixed}
{11: ??} 
{12: ??} 
{13: g/n/ac in 2.4GHz and 5GHz} *thanks teeher for finding this out!* 

Channel=0
{depends on CountryRegion or CountryRegionABand}

BeaconPeriod=80
{Configuring the Beacon Period and DTIM}
Communications in a wireless LAN are centered on the AP. Because APs are
stationary, the distance a beacon frame can travel reliably does not vary over
time. Stations monitor the beacon frames to determine which Extended Service
Sets (ESSs) provide coverage in their area. They also use the received signal
strength to monitor signal quality.
An increase in the beacon interval increases the power-saving capacity of
attached nodes, because it alters the listen interval and the delivery traffic
indication message (DTIM) interval. A larger interval can increase throughput
by decreasing contention for the signal. That is, the time spent to send beacon
frames can instead be used to transmit data.
A decrease in the beacon period makes passive scanning more reliable and speedy
because the network is more frequently announced to the radio. Further, a smaller
beacon interval makes mobility more effective because it increases the coverage
information available to nodes. Because of this, nodes that move around rapidly
can benefit from these beacon frames because they update signal strength information.
DTIM tells power-saving stations that a packet waits for them. The DTIM period
indicates how many beacon frames can transmit before another DTIM is transmitted.
An increase in the DTIM period count allows clients to sleep longer; however, it
delays the delivery of multicast and unicast packets. Because the packets are
buffered, large DTIM period counts can cause a buffer overflow.

TxPower=20
{for some device 100 is required, use 100 if you experience poor wifi performance}

BGProtection=0
{0:Auto, 1:Always on, 2:Always off}

TxPreamble=2
{0:Preamble Long, 1:Preamble Short, 2:Auto}
Long range (outside for example) long preamble is recommended, for in house use
short preamble, especially when there are more wireless networks roaming around.

TxRate=value
{0: Auto       //WirelessMode=0~4}
{1: 1 Mbps   //WirelessMode=0 or 1 or 3}
{2: 2 Mbps   //WirelessMode=0 or 1 or 3}
{3: 5.5 Mbps    //WirelessMode=0 or 1 or 3}
{4: 11 Mbps    //WirelessMode=0 or 1 or 3}
{5: 6  Mbps     //WirelessMode=0 or 2 or 3 or 4}
{6: 9  Mbps     //WirelessMode=0 or 2 or 3 or 4}
{7: 12 Mbps     //WirelessMode=0 or 2 or 3 or 4}
{8: 18 Mbps     //WirelessMode=0 or 2 or 3 or 4}
{9: 24 Mbps     //WirelessMode=0 or 2 or 3 or 4}
{10: 36 Mbps     //WirelessMode=0 or 2 or 3 or 4}
{11: 48 Mbps     //WirelessMode=0 or 2 or 3 or 4}
{12: 54 Mbps     //WirelessMode=0 or 2 or 3 or 4}

RTSThreshold=2312
{Configuring the RTS Threshold}
Request to Send (RTS) indicates the size of a frame that requires an RTS control
message sent before it. You must keep a few considerations in mind when you set
this parameter.
RTS packets are sent more often because of smaller values. In addition, more
bandwidth is consumed, therefore reducing the amount of throughput on the network.
However, the more RTS packets sent, the quicker the system can recover from
interference or collisions, which occurs in large, busy networks.
RTS is also helpful when two clients cannot hear each other (for instance, they
are on opposite sides of a cell), although they can hear the AP.
The RTS Threshold setting is between 0 and 2339 bytes. The default value is 2312.
The RTS Max. Retries setting dictates the number of times the AP issues an RTS
before it quits. This setting is a value between 1 and 128. The default value is 32.

FragThreshold=2346
{a value between 256~2346}

TxBurst=1
{0: Disable, 1: Enable}

PktAggregate=0
{0: Disable, 1: Enable when the peer supports it}

WmmCapable=1
{0: Disable WMM, 1: Enable WMM}
{Set it as 1 to turn on WMM Qos support}

AckPolicy=0;0;0;0
{Set ACs corresponding BE, BK, VI and VO as delivery-enabled or delivery-disabled}
{ AC_BE  AC_BK  AC_VI  AC_VO }
{ {0,1}; {0,1}; {0,1}; {0,1}

AuthMode=OPEN
{OPEN    For open system}
{SHARED    For shared key system}
{WEPAUTO Auto switch between OPEN and SHARED}
{WPAPSK  For WPA pre-shared key  (Infra)}
{WPA2PSK For WPA2 pre-shared key (Infra)}
{WPANONE For WPA pre-shared key  (Adhoc)}
{WPA     Use WPA_Supplicant}
{WPA2    Use WPA_Supplicant}

EncrypType=NONE
{NONE}
{WEP}
{TKIP}
{AES}

WPAPSK=
{8~63 ASCII or 64 HEX characters} (WPA Pre-Shared Key)

DefaultKeyID=1
{1~4} Set Default Key ID (create one to four on the next lines)

Key1Type=0
{0 hexadecimal type, 1 assci type}

Key1Str=
{10 or 26 characters (key type=0), 5 or 13 characters  (key type=1)}

Key2Type=0
{0 hexadecimal type, 1 assci type}

Key2Str=
{10 or 26 characters (key type=0), 5 or 13 characters  (key type=1)}

Key3Type=0
{0 hexadecimal type, 1 assci type}

Key3Str=
{10 or 26 characters (key type=0), 5 or 13 characters  (key type=1)}

Key4Type=0
{0 hexadecimal type, 1 assci type}

Key4Str=
{10 or 26 characters (key type=0), 5 or 13 characters  (key type=1)}

PSMode=CAM
{CAM = Constantly Awake Mode, Fast_PSP = Power Save Mode, MAX_PSP = Max power save mode}

AutoRoaming=0
{0: Disable Roaming, 1: Enable Roaming}

RoamThreshold=70
{value between 60~90}

APSDCapable=0
{0: Disable APSD, 1: Enable APSD (Only valid on WmmCapable=1)}
{Set it as 1 to use automatic power-save delivery(APSD) on an Non-AP QSTA}

APSDAC=0;0;0;0
{0: Delivery-disabled AC, 1: Delivery-enabled AC (Only valid on APSDCapable=1)}
{Set ACs corresponding BE, BK, VI and VO as delivery-enabled or delivery-disabled}
{ AC_BE  AC_BK  AC_VI  AC_VO }
{ {0,1}; {0,1}; {0,1}; {0,1}

HT_RDG=1
HT_EXTCHA=0
HT_OpMode=0
HT_MpduDensity=4
HT_BW=1
HT_BADecline=0
HT_AutoBA=1
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
HT_MIMOPSMode=3
HT_DisallowTKIP=1
EthConvertMode=
EthCloneMac=
IEEE80211H=0
{0: Disable, 1:   Enable Spectrum management (This field can be enable only in A band)}

TGnWifiTest=0
WirelessEvent=0
MeshId=MESH
MeshAutoLink=1
MeshAuthMode=OPEN
MeshEncrypType=NONE
MeshWPAKEY=
MeshDefaultkey=1
MeshWEPKEY=
CarrierDetect=0
AntDiversity=0
BeaconLostTime=4
FtSupport=0
Wapiifname=ra0
WapiPsk=
WapiPskType=
WapiUserCertPath=
WapiAsCertPath=
PSP_XLINK_MODE=0
WscManufacturer=
WscModelName=
WscDeviceName=
WscModelNumber=
WscSerialNumber=

190 Comments

  1. Hey! Just had to leave a message to let you know that this worked WONDERFULLY! Thank you so much for creating this driver, man!

  2. Performed all steps as described, wifi now recognizes the adapter, but for some reason cannot still see my wireless network, which my phone recognizes.
    Any thoughts on why this might be, and or ways to fix it. I would be greatly appreciative.

    • hi, I checked I have setup TKIP as my encryption in my Router. Further my router transmits both in Wireless N and Wireless AC. I have setup the ssid as _N and _AC

      On my wifi dongle some times it doesnt list the wifi networks as ubuntu takes a while to refresh list of wifi networks visible. So to do that I click on the wifi icon on the top taskbar. On the drop down menu Unselect Enable Wifi and then Unselect Enable Networking.
      Then Re-Select Enable Networking and Re-Select Enable Wifi.

      Hope it will search again and list your wireless networks available. As suggested earlier you may choose to rename the SSIDs and select the _N or _AC netowrk as suitable.

      hope it sorts out the problem. Otherwise please let me know.

  3. works a treat! — thanks for making the patch available

  4. It seems that only the 5 Ghz wifi signals are detected. I can only view the 5 Ghz networks but not my 2.4 Ghz network. Does anyone know how to fix this?

  5. I followed the simple steps.. But when i run “make” i get an error.
    /lib/modules/3.14-kalil-amd64/build no such file or directory. Stop.

    make install gives a similar error only it says
    cannot stat ‘mt7610u_sta.ko’: no such file or directory. stop.

    Thanks for you time.

    • I checked on ubuntu, i have the following modules

      ls /lib/modules
      3.13.0-32-generic 3.13.0-33-generic 3.13.0-34-generic 3.13.0-35-generic

      uname -r
      3.13.0-35-generic

      I would suggest, may be run the commands above and let me know the version of the kernel you are using.

      • Hello, I get the same error referenced above. My kernel is 4.3.0-kalil-686-pae. I think the problem may be that this is the 32-bit version of kali, so the 64-bit driver won’t work. Do you have sources for a 32-bit version? Thanks.

        • Hi Buck, Apologies for late reply. Yes the sources available from mediatek website is 32 bit. I believe the source code from mediatek website should work without any modification for 32bit kernel. Pls let me know if you face any issues. thanks.

  6. I’m totally new to Linux Mint and I use the Linksys. I downloaded the files en unzipped it to a map, but don’t know what to next.

    I copied

    sudo make clean
    sudo make
    sudo make install

    into the terminal but that doesn’t work. Could someone explain step by step what do do? Thanks in advance!

    • Here are some of the steps

      • First install build essentials, in the terminal please type the following
      • sudo apt-get install build-essential
      • in the extracted driver sources, run the following
      • sudo make clean
      • make | tee compile.log
      • there should be no errors, check errors by the following command
      • grep -li “error” compile.log | wc -l
      • it should return 0 After that run the comamnd below
      • sudo make install
      • Please remember to run all the steps above for each linux kernel version upgrade. Ubuntu periodically upgrades kernel by installing new versions of kernel
      • Thanks. Get the followwing error at the last steps:

        make -C /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux -f Makefile.6 install
        make[1]: Map ‘/media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux’ wordt binnengegaan
        rm -rf /etc/Wireless/RT2870STA
        mkdir /etc/Wireless/RT2870STA
        cp /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/conf/RT2870STA.dat /etc/Wireless/RT2870STA/.
        install -d /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/
        install -m 644 -c mt7610u_sta.ko /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/
        install: kan status van ‘mt7610u_sta.ko’ niet opvragen: Bestand of map bestaat niet
        make[1]: *** [install] Fout 1
        make[1]: Map ‘/media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux’ wordt verlaten
        make: *** [install] Fout 2

        • Second step get errors:

          make -C tools
          make[1]: Map ‘/media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools’ wordt binnengegaan
          gcc -g bin2h.c -o bin2h
          make[1]: Map ‘/media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools’ wordt verlaten
          /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools/bin2h
          make: execvp: /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools/bin2h: Toegang geweigerd
          make: *** [build_tools] Fout 127

          In English it says: acces denied, 127 errors

  7. please try the following if it resolves the issue..

    cd /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools

    sudo chmod +x bin2h

    cd /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90

    sudo make

    hopefully it will compile the driver .. if there are errors please let me know. If there are no errors, you may run the following to install the driver

    sudo make install

    • Thanks again. Unfortunately same errors. I am also figuring out for hours how to get my Brother printer working on Linux. I think Linux is not for me. I was curious using another OS than Windows, but if everything you wanna do in Linus takes hours and is so complicated you need help for everything then I prefer Windows…

      • I know some times linux is difficult because of drivers and some tools are commandline (require a lot of configuration). However once it is all sorted out you will like linux. It is very stable most of the times, and auto updates. File system is fast, no defrags are required.

        I think you are trying to install the driver after booting from a USB media. Try to install OS on one of your NTFS partitions. You can install the drivers.

        • I installed linux on a partition, not on usb

          • are you runing from a safe mode on root prompt. Usually the /media/marco/ is used as a mount point.

            Any ways you may try to run the following command and let me know the output

            file /media/marco/OS/Boot/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/tools/bin2h

  8. I have had a lot of tough times as well, like setting up dual boot on UEFI, I simply gave up. Also a nightmare installing Ubuntu on RAID 0.

    Some times it is very difficult but there are very helpful Ubuntu forums and many online tutorials which makes life easy. I still have some unresolved issues, like UEFI dual boot both windows and linux however I didnt see much difference between UEFI and non UEFI so just run non UEFI.

    I might resolve that issue one day. Yes morale of story is nothing is perfect, it is just relative. Even Linus trovalds must have some or other issues with his linux installation.

    From my past experience on long run, Linux is more peaceful, pleasant and colorful than windows. It also provides a lot many options and good if you are a programmer.

  9. Agree. I’m quite skillful using computers, but using Linux with that unaccesible terminal (makes me think of yhose old DOS-times) is more for programmers and not for straight forward users who don’t want to figure out for hours how to get a simple thing like using a printer works….

    But thanks again for your quick help!

    • Oh I think it is just a access issue. Lets check if you have bin2h built correctly. Please try the following as shown below on my dev environment

      cd ~/dev/mt7610u_wifi_sta_v3002_dpo_20130916_dev/tools
      make clean
      rm -f *.o bin2h
      make
      gcc -g bin2h.c -o bin2h
      ls -lrt
      total 48
      -rw------- 1 pintu pintu 13208 Jul 28 12:11 bin2h.c
      -rw------- 1 pintu pintu 57 Jul 28 12:11 Makefile
      -rwxrwxr-x 1 pintu pintu 25286 Sep 13 01:11 bin2h

      file bin2h
      bin2h: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=d78590ebf526527276680f3340b60abfe04f2353, not stripped

      • I get this:

        marco@marco-N76VZ ~ $ total 48
        Het programma ‘total’ is momenteel niet geïnstalleerd. U kunt het installeren door het volgende te typen:
        sudo apt-get install radiance
        marco@marco-N76VZ ~ $ -rw——- 1 pintu pintu 13208 Jul 28 12:11 bin2h.c
        -rw——-: opdracht niet gevonden
        marco@marco-N76VZ ~ $ -rw——- 1 pintu pintu 57 Jul 28 12:11 Makefile
        -rw——-: opdracht niet gevonden
        marco@marco-N76VZ ~ $ -rwxrwxr-x 1 pintu pintu 25286 Sep 13 01:11 bin2h
        -rwxrwxr-x: opdracht niet gevonden
        marco@marco-N76VZ ~ $
        marco@marco-N76VZ ~ $ file bin2h
        bin2h: ERROR: cannot open `bin2h’ (No such file or directory)
        marco@marco-N76VZ ~ $ bin2h: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=d78590ebf526527276680f3340b60abfe04f2353, not stripped

        Guess bin2h is not installed..

  10. Can you help with this i type
    sudo make clean
    and all I get is this
    make: *** No rule to make target `clean’. Stop.

  11. DUDE THIS AWESOME THANK YOU SO MUCH 🙂

  12. It worked perfectly!
    Thank you so much

  13. I think the code is broken with a 3.16 kernel (I’m trying to install Ubuntu 14.10 beta 2 on my laptop)
    $ uname -r
    3.16.0-22-generic

    the end of the output from sudo make:
    /home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux/../../sta/sta_cfg.c:5401:85: error: macro “__DATE__” might prevent reproducible builds [-Werror=date-time]
    snprintf(extra, size, “Driver version-%s, %s %s\n”, STA_DRIVER_VERSION, __DATE__, __TIME__ );
    ^
    /home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux/../../sta/sta_cfg.c:5401:95: error: macro “__TIME__” might prevent reproducible builds [-Werror=date-time]
    snprintf(extra, size, “Driver version-%s, %s %s\n”, STA_DRIVER_VERSION, __DATE__, __TIME__ );
    ^
    cc1: some warnings being treated as errors
    scripts/Makefile.build:257: recipe for target ‘/home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux/../../sta/sta_cfg.o’ failed
    make[2]: *** [/home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux/../../sta/sta_cfg.o] Error 1
    Makefile:1345: recipe for target ‘_module_/home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux’ failed
    make[1]: *** [_module_/home/neilp/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-196e3e623a90/os/linux] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-3.16.0-22-generic’
    Makefile:393: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

    From googling, it looks like a similar problem to the Broadcom code when trying to build it in 3.16. I think they have fixed it, but I have no idea how to use what they did to patch up your code.

    Are you able to look into it? (I would try , but I’m not a coder…I’m more of a systems guy…)

    Thanks!!!

    • Looks like the macros __DATE__ __TIME__ are being reported as errors. I will try to upgrade to Ubuntu 14.10 today fix this issue

    • Hi,

      I have updated to Ubuntu 14.10 and fixed the source code for the driver. Now it should compile and work. Please follow the updated instructions to build in my blog post above. (In RED “Important – Steps to build driver from sources” )

      Hope it resolves errors seen with older sources.

      I realized there are some further clean up required, which I will be doing in coming days.

      Thanks

  14. Please consider pushing the driver to the main line kernel.

    • Hi, I would love to push the sources into linux kernel and have some one else review the code as well. Do you know how it is done, i looked at kernel.org, there are many forks to the master. But how code is merged with master ? i need some guidance here

      • This is all done by comunication on the kernel mailinglists. So you have to contact the kernel developers for the wireless drivers and they will guide you.

        In particular for this driver check this mailinglist: http://vger.kernel.org/vger-lists.html#linux-wireless

        Be warned: The linux kernel has very strong coding guidlines, so it could be that the mediatek driver needs a lot of work (not your patch) to get accepted.

        All the best, and thank you for your work!

  15. I a so happy you are alive!!!

    my laptop did not supperted the 5ghz wifi in house, so originally i bought the dongle for windows. But as i like to change things a lot, i felt the urge to again install linux as a dual boot for lots of reasons (i really do like linux)just to find out there was no support from linksys/cisco.

    So the wifi went back on its 2.4 range. today i thought to find out if somebody already tried creating drivers for this dongle…

    And your page was the first to come up!!

    I really would like to thank you for your effort in putting this dongle to work on linux!!!

    Kind Regards
    Diet Bos

  16. Thank you SO MUCH for this great tutorial and making the modified source available. I used this on Linux Mint 17 tonight and it worked flawlessly!

  17. You are a life-saver. Thanks so much, it didn’t even occur to me to check linux compatibility when I purchased my wifi adapter.

  18. worked great on kali linux 1.0.9a, only the 5 ghz shows though. thank you for your help and sharing this

  19. The driver works nicely. But only 5 Ghz are shown. Any solution? Ideas?

    • I think there is a setting for wireless mode in RT2870.dat file. Once edited and saved the sudo make install needs to be run from root directory.

    • Hi Carlos,

      I have changed the RT2870.dat file to include all modes. But I am not sure if it is designed to work in the frequencies. You may update the file from git repo and try to install the driver again.

  20. my linksys AC 580 is working good on my ubuntu 14.04 using mt 7610u_sta module so the physical rate is at 135 Mbits/s I saw the phy capture so it ‘s working only on 64 QAM MCS 7 . Is there a pb with the driver on ubuntu ? cause the max rate on win 7 is 433 Mbit/s (256 QAM SGI MCS 9 ) . Is there somebody who has the same pb as me ? Thanks a lot

    Willy

    • I did check the bandwidth and it is less on ubuntu. Thanks for finding info regarding modulation. I will check if it is a settings issue or a code issue. I will be updating soon

      • Check the WirelessMode setting in RT2870STA.dat, modes 12-15 are required to get AC. These modes are “documented” in the CFG_WMODE_MAP struct in common/cmm_cfg.c

        With WirelessMode=15 the reported bitrate is now 433.5 Mb/s.

    • I see the exact same on Ubuntu 14.04 🙂

  21. Thank you so much! You are awesome!

    I did have to reboot before I the ae6000 was recognized. After I did everything worked perfectly.

  22. You saved my life!
    I spent 4 days trying to make my card work. And I also reached the moment where I was able to finally connect but then my laptop hang.
    And only then I start search for such problems and I found your entry.
    Thanks a lot man! I owe you a beer.

  23. Thanks for great work!only show 5G can not show 2.4G this problem after change the RT2870STA.dat file wireless mode to mix mode,then use below command:
    ==========================
    iwpriv ra0 set WirelessMode=5
    iwconfig ra0 freq 2.412G
    ==========================
    then can scan the 2.4G network!but when connect the 2.4G network then the system will stuck seems crash!

    if anyone got solution to fix this problem!please send me email to share your view!Thanks again!

  24. I have an error 127 permission denied on bin2h when I do sudo make. I tried doing everything in your comments and still no luck. I have tried from the source or from the extracted zip. I have Kali linux (this months build). Thanks

  25. Many thanks for finding this out. My AE6000 is working great under Ubuntu 14.04!
    The instructions are clear. I executed above instructions with a fresh installed Ubuntu 14.04.

    And I notice that my Linksys WUSB600N v2 is also working…. I wonder if your driver helped with that too. Or Ubuntu 14.04 has a driver compiled and working by default by now. Not sure….

    For what it’s worth: Thank you!

  26. By the way. I was looking for info and found this too.
    Perhaps this might help some people. In one of the links are drivers for Apple, Windows and Linux:

    https://wikidevi.com/wiki/Linksys_AE6000

  27. Forget about my other comment, I am new to linux.I’ll sum up my error log error 2. The official driver gave the same error.

    Sudo make clean worked out fine. Sudo make errors: make: *** /lib/modules/3.14-kali1-amd64/build: no such file or directory. Stop.
    Make: *** [Linux] error 2

  28. Pingback: [ubuntu] first WIFI adapter no longer connects, but 2nd one is ok topic | ubuntu

  29. Pingback: [ubuntu] Dynamic kernel update support (dkms) usage for custom wifi driver? topic | ubuntu

  30. YOU ARE GREAT! In my notebook, I already have an internal module only supporting 2.4 G :(, but now I have 5G internet access in my house, too!

  31. I forgot to mention: I do not have a Linksys AE6000, but an Edimax EW-7711MAC with same chipset! I added its USB ID
    {USB_DEVICE(0x7392,0xa711)}, /* Edimax EW-7711MAC */
    to common/rtusb_dev_id.c before compiling. Did not try before if it works without this, but with adding it, it definitely works!

  32. Hey, firstly THANK YOU. I bought a router with the sole intention of using this USB reciever. Secondly, it took me over an hour to figure out that I couldn’t run the “make” command not because I was using openSUSE instead of Debian/Ubuntu, but because I didn’t have the kernel-devel installed. Just an FYI to confused readers. If you run across “error 2” “/lib/module/”+your version number+”/build not found” then make sure you have the developer package installed. For my version of openSUSE, that required typing “sudo zypper install -t pattern devel-kernel”

    Again, most of all, thank you for doing work I’m not yet capable of 🙂

  33. Worked like a charm…first shot…Ubuntu 14.04. Thanks much!

  34. I just attempted this on a laptop and it didn’t work.
    lsusb gets this.
    Bus 007 Device 018: ID 13b1:003e Linksys
    ifconfig gets this
    http://imgur.com/mvTw9zH
    If there are any more debug steps you’d like me to take please email me.

  35. Thanks for the driver. Worked straight out of the box on Linux Mint 17.1 (Rebecca)

  36. if config shows a workable mac, however “Network Connections” shows 00:00:00:00:00:00 (ra0). and of course i cant connect. any help geratly appreciated. many thanks.

  37. I am getting thru the make/install just fine, but plugin the dongle and nothing happens:
    /etc/issue: Ubuntu 14.04.2 LTS
    uname -r: 3.13.0-49-generic
    lsusb: Bus 003 Device 007: ID 13b1:003e Linksys
    ifconfig: eth0/lo/wlan0

    another forum mentioned:
    sudo ifconfig ra0 up
    which brought the dongle to life

    meanwhile, I’m running wicd in lieu of network-manager which had been failing me. Then:

    in Wicd Configuration i had to manually flip:
    Wireless Interface from wlan0 to ra0

    wicd then never APPEARS to fully connect to any selected network, but
    the dongle’s light stays steady and I’ve got bandwidth 😐

    (possibly another comment with experience following experience next reboot)

  38. Further to above:
    AE6000 dongle found/used by wicd (manual config selection) but certain known networks are never shown and others never fully connect.

  39. If I could give you a hug, I would!! Thank you sooooo much!!!! It worked like a charm!

    • thanks!.. please note there is a overhead of recompiling the driver for each linux kernel update.. go to the driver sources directory, run command

      sudo make install

  40. Thanks for the time out into this, Pintu. As of right now, the wireless card is lighting up, all steps were followed, but it seems it still isn’t finding a wireless connection. I have disable and re-enabled both network connections and wireless connections but it seems to not change. running on Ubuntu 15.04 if that helps.

    • I’d suggest repeating the sudo make install.. and checking for any errors. Please remove USB dongle and re-insert into USB drive. That should load the driver

  41. noob to linux and your step by step instructions worked perfectly! Thanks so very much.

  42. kali linux 3.18 kernal
    i get this error after i execute “make”

    make[1]: Entering directory `/lib/modules/3.18.0-kali3-amd64/build’
    make[1]: *** No rule to make target `modules’. Stop.
    make[1]: Leaving directory `/lib/modules/3.18.0-kali3-amd64/build’
    make: *** [LINUX] Error 2

    please help

  43. Pingback: TP-Link Archer T2U AC600 unter Linux nutzen | Myria.de

  44. Thanks for the instructions! Worked flawlessly for me.

    My wifi is a 802.11g so I had to change the WirelessMode to 5 in the .DAT file

  45. Pingback: Edimax EW-7711ULC working topic | ubuntu

  46. Thanks I used this on my Sabrent NT-WLAC and Edimax EW-7711MAC added the vender:hardware id to the common/rtusb_dev_id.c file and compiled – works perfectly in linux mint 17.1 kernel 3.13 (same as ubuntu 14.04 lts).

    I also edited /etc/Wireless/RT2870STA/RT2870STA.dat I changed the line WirelessMode to WirelessMode=13.

    This will get you in g/n/ac in 2.4 and 5ghz mode.

    So —
    .5 unplug from usb
    1. sudo apt-get install linux-headers-generic build-essential git
    2. git clone https://sanrath@bitbucket.org/sanrath/mediatek_mt7610u_sta_driver_linux-64bit.git
    3. cd mediatek_mt7610u_sta_driver_linux-64bit
    4. nano common/rtusb_dev_id.c
    add under #ifdef MT76x0
    {USB_DEVICE(0x0E8D,0x7610)}, /* Sabrent NTWLAC */
    {USB_DEVICE(0x7392,0xa711)}, /* edimax 7711mac */
    5. make clean
    6. make
    7. sudo make install
    8. nano /etc/Wireless/RT2870STA/RT2870STA.dat
    change WirelessMode to
    WirelessMode=13
    9. reboot(shouldn’t need to do this, but I had some weird problems until I rebooted)
    10. plug back into usb

  47. Problem 🙁

    make -C /home/pi/mediatek_mt7610u_sta_driver_linux-64bit/os/linux -f Makefile.6 install
    make[1]: Entering directory ‘/home/pi/mediatek_mt7610u_sta_driver_linux-64bit/os/linux’
    mkdir: cannot create directory `/etc/Wireless’: File exists
    rm -rf /etc/Wireless/RT2870STA
    mkdir /etc/Wireless/RT2870STA
    cp /home/pi/mediatek_mt7610u_sta_driver_linux-64bit/conf/RT2870STA.dat /etc/Wireless/RT2870STA/.
    install -d /lib/modules/3.18.11+/kernel/drivers/net/wireless/
    install -m 644 -c mt7610u_sta.ko /lib/modules/3.18.11+/kernel/drivers/net/wireless/
    install: cannot stat `mt7610u_sta.ko’: No such file or directory
    Makefile.6:454: recipe for target ‘install’ failed
    make[1]: *** [install] Error 1
    make[1]: Leaving directory ‘/home/pi/mediatek_mt7610u_sta_driver_linux-64bit/os/linux’
    Makefile:489: recipe for target ‘install’ failed
    make: *** [install] Error 2

    Help me Please ?!
    kernal :3.18.11+

  48. Hi – thanks firstly! I think I’m halfway there. Previously nothing happened, now there’s at least a light… But that’s as far as it goes. I should say I’m running 32-bit Linux Mint 17.1 and I know this patch is for 64 bit. But anything else I can do? (I’m a noobie so any steps explained would be good, thanks!)

    • Hi .. the original code came from mediatek (chipset manufacturer) website sans the Cisco Linksys branding. You may download the 32bit code from mediatek website and update device ids for your wifi dongle. That should fix it!

  49. Thank you very much for your work.

    After trying many solutions on the internet, I arrived to this site and for the first time my Edimax wifi dongle ligths up. I can now see the MediaTek WiFi device along with the internal one in Network Manager. The internal sees every wireless signal around. The MediaTek WiFi doesn’t see any (well, sometimes it sees one, but not the one in front of me…)

    Is this normal? Should I disable the internal device? How?

    Maybe all that tinkering with other solutions has somewhat “poluted” my Ubuntu install and I should reinstall?

    I’m on Ubuntu 15.04 64bit. Thanks for any help.

    Al

  50. Worked perfectly for Ubuntu 15.04. Thank you so much for sharing!

  51. Thanks for your help man, it is a very well done job.

    For people seeing just 5Ghz network I did the following:

    $ cd
    $ vim conf/RT2870STA.dat

    Modify WirelessMode=8 in WirelessMode=13

    $ make clean
    $ make
    $ sudo make install

    and now I am posting this comment from my 2.4 Ghz network 🙂

    Cheers

    • Hi Daniele, thanks for that tip.

      I’d be ever so grateful if you could answer a quick question: when you changed WirelessMode from 8 to 13, how did you get past the write permissions? When I try to exit the dat file and save the changes, I get “[Error writing /etc/Wireless/RT2870STA.dat: Permission denied]”.

      I’m super new to this whole Linux business, so the For Dummies version would be most appreciated.

  52. thank you, great job! works great on mint 17.1

  53. Installed this driver for my EDiMAX 11ac MAC wireless usb dongle.

    My device is finally being recognized, but there seems to be some problems with the wireless connection.

    Changed WirelessMode to 15, since someone mentioned that’s the AC mode, but 13, and 15 only work partially for me. Some sites load, others don’t. The latancy is very high in this mode. Switching to mode8 fixes most of my problems, but now I’m not using ac anymore.

    Also lowered TX power to 20 from 100. Dongle was heating up in Linux which I don’t think is normal.

  54. 5ghz not working. my adapter is: http://www.buyincoins.com/item/59234.html

  55. Hi,
    I have a Linksys usb AE6000 also.
    I would like to use it in Virtualbox Ubuntu or Kali,
    However, dmesg show my error as belows:


    –>RTUSBVenderReset
    fw version:0.1.00 build:7640
    RTUSB_VendorRequest failed(-110), TxFlags=0x0, ReqType=OUT, Req=0x6,…

    ERROR!!! NICLoadFirmware failed, Status[=0x00000001]
    !!! rt28xx init fail !!!

    ———————————————————————————————————-
    And I checked lsusb and iwconfig:
    #lsusb
    Bus 001 Device 002: ID 13b1:003e Linksys
    Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    #iwconfig
    ra0 Ralink STA
    eth1 no wireless extensions.
    lo no wireless extensions.

    =============================================================
    Could any one help me ? is it possible to use Cisco Linksys AE6000 in VirtualBox ?

    Thank you so much,

    • I am not sure if virtual box can make use of native os drivers i.e. windows drivers. let me do some research on this .. thanks anyways for posting this issue.

    • Hi, I got the same problem. I know a lot of time passed since your question, but still decided to leave it here for somebody else.

      My guess was to increase the timeout defined as CONTROL_TIMEOUT_JIFFIES in rtmp_usb.h. I just set it to 5000 (probably it is too big and you may try another number).

      Luckily to me RTUSB_VendorRequest is disappeared and dongle started to work. Good luck.

  56. 5GHz range doesn’t work on 4.1.2 or later kernel. On earlier kernels worked fine.

  57. Thanks 🙂

    Work for me in Ubuntu 14.04.3 Kernel 3.19.0-28-generic for 5 GHz mode and WirelessMode=13

    Not work on 4.2.x or superior kernel series

    My Wifi adapter TP-Link AC600 Archer T2UH http://www.tp-link.es/products/details/cat-11_Archer-T2UH.html

    Sorry for my bad english

    Greetings from Spain

    • Hi,

      Thanks for trying out and reporting the issue. Lately I have received a bunch of issues. I am currently working on revamping the driver adding support other hardware devices ect.. also there are some performance optimizations on the way.

      Rgds

      • Thanks for all your work with the Wi-Fi drivers!

        I can also confirm that 5 GHz does not work with Kernel 4.2+ so I’ve installed and am using 3.19 kernel which does have working 5 GHz.

        Should we bring this to the attention of the kernel developers as a possible regression or is it more likely a problem with the mediatek drivers that should be worked around?

  58. I am using 4.0.0-kalil-amd64 module am I unable to use this? Is there any small amount of editing I could do to get this driver to work?

  59. make -C tools
    make[1]: Entering directory ‘/root/Desktop/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/tools’
    gcc -g bin2h.c -o bin2h
    make[1]” Leaving directory ‘/root/Desktop/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/tools’
    chipset = mt7610u
    cp -f os/linux/Makefile.6 ‘/root/Desktop/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux/Makefile
    make -C /lib/modules/4.0.0-kalil-amd64/build SUBDIRS=/root/Desktop/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux modules
    make[1]: *** /lib/modules/4.0.0-kalil-amd64/build: No such file or directory. Stop.
    Makefile:393: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

  60. You rock! I spent about two hours downloading various drivers (some even from MediaTek’s site), failing compilations, looking at other people’s pages who were trying to install this thing and nothing worked. This worked perfectly, thanks for your efforts!!

  61. I just want to leave a thank you note.

    I bought a USB wifi dongle with MT7610u chip (ipTime A1000UA-4dBi), and of course the Linux driver downloaded from the MediaTek does not compile well. And my googling sent me to this blog fortunately. I downloaded your patched Linux driver and everything works well on my Fedora 22 box.

    Thank you for sharing and thank you for your efforts.

  62. I have some errors.

    /home/brian/mediatek_mt7610u_sta_driver_linux-64bit/common/crypt_md5.c:1:0: error: CPU you selected does not support x86-64 instruction set
    /*
    ^
    /home/brian/mediatek_mt7610u_sta_driver_linux-64bit/common/crypt_md5.c:1:0: error: CPU you selected does not support x86-64 instruction set
    /home/brian/mediatek_mt7610u_sta_driver_linux-64bit/common/crypt_md5.c:1:0: error: -mpreferred-stack-boundary=2 is not between 3 and 12
    : recipe for target ‘/home/brian/mediatek_mt7610u_sta_driver_linux-64bit/common/crypt_md5.o’ failed

    uname -r
    4.2.4-1-ARCH

    but i’m running 64 bits…or i believed that

    uname -m
    x86_64

    I have an AMD Phenom II X4 955 Black edition CPU. Can you help me? Thanx

    • oh, i forgot, i’m trying to use a TP-Link AC600 T2U dual band V1 USB stick. I understand it uses the Mediatek MT7610U chipset too

  63. Unfortunately, the driver does not work any more with Ubuntu 15.10. Edimax 7711MAC is recognized, but it does not find any network…

  64. It shows as 00:00:00:00:00:00 (ra0) as MAC adress…

  65. My Kernel is 4.2.0-19-generic – MAC adress is 00:00:00:00:00:00 and no networks are seen… Hope this problem will be solved soon…

  66. OMG thanks sooo much it works like a charm! can’t thank you enough!!!

  67. Pingback: Linksys AE6000 wireless AC USB adapter in Linux – Allan J. Bogh

  68. everything is compiled on my kali linux 2 sana but when I click on select network it’s not scanning anything just searching with no networks.
    Changes I have made for Archer T2U router in config.dat is:

    #The word of “Default” must not be removed
    Default
    CountryRegion=5
    CountryRegionABand=7
    CountryCode=IE
    ChannelGeography=1
    SSID=11n-AP
    NetworkType=Infra
    WirelessMode=9
    EfuseBufferMode=0
    Channel=0
    BeaconPeriod=100
    TxPower=100
    BGProtection=0
    TxPreamble=0
    RTSThreshold=2347
    FragThreshold=2346
    TxBurst=1
    PktAggregate=0
    WmmCapable=0
    AckPolicy=0;0;0;0
    AuthMode=OPEN
    EncrypType=NONE
    WPAPSK=
    DefaultKeyID=1
    Key1Type=0
    Key1Str=
    Key2Type=0
    Key2Str=
    Key3Type=0
    Key3Str=
    Key4Type=0
    Key4Str=
    PSMode=CAM
    AutoRoaming=0
    RoamThreshold=70
    APSDCapable=0
    APSDAC=0;0;0;0
    HT_RDG=1
    HT_EXTCHA=0
    HT_OpMode=0
    HT_MpduDensity=4
    HT_BW=1
    HT_BADecline=0
    HT_AutoBA=1
    HT_AMSDU=0
    HT_BAWinSize=64
    HT_GI=1
    HT_MCS=33
    HT_MIMOPSMode=3
    HT_DisallowTKIP=1
    HT_STBC=0
    VHT_BW=1
    VHT_SGI=1
    VHT_STBC=0
    EthConvertMode=
    EthCloneMac=
    IEEE80211H=0
    TGnWifiTest=0
    WirelessEvent=0
    MeshId=MESH
    MeshAutoLink=1
    MeshAuthMode=OPEN
    MeshEncrypType=NONE
    MeshWPAKEY=
    MeshDefaultkey=1
    MeshWEPKEY=
    CarrierDetect=0
    AntDiversity=0
    BeaconLostTime=4
    FtSupport=0
    Wapiifname=ra0
    WapiPsk=
    WapiPskType=
    WapiUserCertPath=
    WapiAsCertPath=
    PSP_XLINK_MODE=0
    WscManufacturer=
    WscModelName=
    WscDeviceName=
    WscModelNumber=
    WscSerialNumber=
    RadioOn=1
    WIDIEnable=1
    P2P_L2SD_SCAN_TOGGLE=3
    Wsc4digitPinCode=0
    P2P_WIDIEnable=0
    PMFMFPC=0
    PMFMFPR=0
    PMFSHA256=0

  69. On Ubuntu 15.10
    This does not work.
    Once I plug in the AE6000 to the USB,
    The entire system freezes.

    • thanks for reporting the bug. i will have a look now. btw could you plz help me with a few details..

      please run the following commands and le me know the output

      uname -a

  70. Hi !

    THX for porting the driver.

    To make it work with a TP-LINK AC600, I had to add the vendorid/deviceid. Here ist the patch:
    — a/common/rtusb_dev_id.c
    +++ b/common/rtusb_dev_id.c
    @@ -40,6 +40,7 @@ USB_DEVICE_ID rtusb_dev_id[] = {
    {USB_DEVICE(0x13B1,0x003E)}, /* MT7610U */
    {USB_DEVICE(0x0E8D,0x7610)}, /* Sabrent NTWLAC */
    {USB_DEVICE(0x7392,0xa711)}, /* edimax 7711mac */
    + {USB_DEVICE(0x148F,0x761a)}, /* TP-LINK Archer T2U (MT7610U) */
    {USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
    {USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */
    #endif

    And then it is very important to change the config.dat file in /etc/Wireless/RT2870STA, like the post above. Here a patch:
    — RT2870STA.dat.ori 2016-02-05 08:34:59.832391026 +0800
    +++ RT2870STA.dat.new 2016-02-05 08:57:28.188455350 +0800
    @@ -2,11 +2,11 @@
    Default
    CountryRegion=5
    CountryRegionABand=7
    -CountryCode=
    +CountryCode=IE
    ChannelGeography=1
    SSID=11n-AP
    NetworkType=Infra
    -WirelessMode=8
    +WirelessMode=9
    EfuseBufferMode=0
    Channel=0
    BeaconPeriod=100

    I am using it in Linux Mint 17.3 with Kernel:
    3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    It seems the Windows driver uses a newer firmware (20140410) and a firmware patch (however this needs to be added). So maybe this could be updated, too.

    Cheers,
    Jasmin

    • Linux makh00ra 4.0.0-kali1-amd64 #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) x86_64 GNU/Linux

      I/m using Kali, do your instructions works on kali???

    • It will be best if U explain about
      — a/common/rtusb_dev_id.c
      +++ b/common/rtusb_dev_id.c

      Similarly,
      -CountryCode=
      +CountryCode=IE

      Why (+,-)
      Thanking…..

      • not quite sure why country code is IE. As mentioned earlier, I took the sources originally for 32 bit driver for a similar chip set (which i think originally based on a generic driver framework). I will have a look at it.

    • hi Jasmin,

      many thanks for the patch.. good to know you have managed to get it to work with TP-LINK AC600. I am in the process of adding support for Kali and other linux distros + DKMS integration. Will be updating the code soon.

  71. The driver appears to be working (green light on the dongle and ra0 showing up in ifconfig).

    However I can’t scan for or connect to any networks.

    Any suggestions?

  72. Hi

    I just managed to get my new T2UH AC600 V1 stick working on my Raspberry Pi 2 gentoo kernel-4.1.17 (kernel source from raspberry git) with 2.4 and 5Ghz.

    I had to change rtusb_dev_id.c to add my id:

    {USB_DEVICE(0x148F,0x7610)}, /* MT7610U */
    {USB_DEVICE(0x13B1,0x003E)}, /* MT7610U */
    +{USB_DEVICE(0x148F,0x761A)}, /* MT7610U */

    I just did a quick transfer test and signal was quite stable with maximum speed of 4.3MiB/s.

    Info from Router (TL-WDR3600):
    NA-Mixed,Channel 56 + 60 (5280 MHz),
    TX Power 15 dBm, Rate 300 Mb/s,
    RX-Rate 65M, TX-Rate 65M, Mode HT20
    S-56 N-90 SNR 34

    I am very courious about this RT2870STA.dat. No matter what I set in there its seems to have no effect. Instead I have to use “iwpriv ra0 set WirelessMode=5” to set the stick to a specific mode after every reboot. Might have to do with this strange message from dmesg?:

    [ 2388.570976] no file read method
    [ 2388.570991] Read file “/etc/Wireless/RT2870STA/RT2870STA.dat” failed(errCode=-1)!

    other strange errors from dmesg:


    /usr/src/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/mt76x0.c:2114 assert (pAd->TxPower[choffset].Channel == 36)failed
    [ 1089.070953] ERROR!!! E2PROM: WRONG VERSION 0x2, should be 1

    [ 1116.149199] ERROR!!! MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS
    [ 1116.149358] ERROR!!! MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS
    [ 1116.159855] ==>RT65xx_WLAN_ChipOnOff(): OnOff:0, Reset= 0, pAd->WlanFunCtrl:0xff000003, Reg-WlanFunCtrl=0xff000043
    [ 1116.160212] receive cmd msg fail(-2)

    [ 1601.538676] cfg_mode=5
    [ 1601.538715] wmode_band_equal(): Band Not Equal!
    [ 1656.506172] cfg_mode=8
    [ 1656.506210] wmode_band_equal(): Band Not Equal!
    [ 1656.507207] RTMPSetPhyMode: channel is out of range, use first channel=36
    [ 1727.354134] cfg_mode=10
    [ 1727.354169] wmode_band_equal(): Band Not Equal!

    • I also noticed the stick always resets itself to WirelessMode 6 on reboot. I had to write an startscript which sets mode 8. The stick seems not to connect to my AP when CHANNEL is set to AUTO on the AP. I have to preselect an Channel.

      • thanks for posting the details.. I will have a look at the changes and issue.. I am in the process of fixing few more bugs reported earlier + dkms integration. Will be updating the driver soon.

    • Hi,
      I have exactly the same problem as you described. Still trying to figure out the cause but getting tired 🙁

  73. Hi Pintu,
    Great piece of work. I too get the read error on “/etc/Wireless/RT2870STA/RT2870STA.dat”
    I think the problem lies with the code in os/Linux/rt.linux.c
    in the function: RtmpOSFileRead(RTMP_OS_FD osfd, char *pDataPtr, int readLen)

    So, i found this http://stackoverflow.com/questions/1184274/how-to-read-write-files-within-a-linux-kernel-module. But is 30 years since I wrote a line of c…

    Still this bit looks like the right sort of pattern:

    int file_read(struct file* file, unsigned long long offset, unsigned char* data, unsigned int size) {
    mm_segment_t oldfs;
    int ret;

    oldfs = get_fs();
    set_fs(get_ds());

    ret = vfs_read(file, data, size, &offset);

    set_fs(oldfs);
    return ret;
    }

    But you probably are way ahead of me…

  74. anyone here fixed 5GHz scan fail issue in above 4.2 kernel?
    I can only scan 2.4GHz networks in Ubuntu 15.10 and even cannot set freq with ‘iwconfig ra0 freq 5180’

    • Same problem here! Also running Ubuntu 15.10 with 4.2.0-23-generic kernel.

      First of all, thanks for the awesome tutorial, it worked great at the first attempt.

      However, it’s only operating on the 2.4GHz band. Being able to use the 5Ghz was exactly the reason to buy this dongle.
      Anyway, any suggestion is welcome.

      Thanks again!

      • It might be defaulting to a legacy mode when it fails to read the .dat files. I have set the wireless mode to 13 in the dat file but unless it can read that config I guess it defaults safe.

        If we fix the of file read it might work or take us on to the next problem.

  75. I had issues connecting to WPA2-Personal networks. I investigated differences between MediaTek MT7610U and MT7612U (a far more up-to-date driver) and seemed to have resolved issues at least for my Linksys AE6000. I have no idea about other types of encrypted networks though. The main issue was in sta/assoc.c where it wasn’t properly informing WPA supplicant of the WPA_Information Elements(IE). I tested it on a 3.11 kernel so far and will try to fix any issues that come up.

    https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes

  76. Little Problem
    This is what I’ve got after the last comand: sudo make install

    “sudo make install
    make -C /home/ermenegildoros/mediatek_mt7610u_sta_driver_linux-64bit/os/linux -f Makefile.6 install
    mkdir: cannot create directory ‘/etc/Wireless’: File exists
    make[1]: Entering directory `/home/ermenegildoros/mediatek_mt7610u_sta_driver_linux-64bit/os/linux’
    rm -rf /etc/Wireless/RT2870STA
    mkdir /etc/Wireless/RT2870STA
    cp /home/ermenegildoros/mediatek_mt7610u_sta_driver_linux-64bit/conf/RT2870STA.dat /etc/Wireless/RT2870STA/.
    install -d /lib/modules/3.19.0-49-generic/kernel/drivers/net/wireless/
    install -m 644 -c mt7610u_sta.ko /lib/modules/3.19.0-49-generic/kernel/drivers/net/wireless/
    /sbin/depmod -a 3.19.0-49-generic
    make[1]: Leaving directory `/home/ermenegildoros/mediatek_mt7610u_sta_driver_linux-64bit/os/linux’
    ermenegildoros@ermenegildoros-HP-250-G4-Notebook-PC:~/mediatek_mt7610u_sta_driver_linux-64bit$ ^C
    ermenegildoros@ermenegildoros-HP-250-G4-Notebook-PC:~/mediatek_mt7610u_sta_driver_linux-64bit$”

    Something is not working for me. Please Help!!
    Thank you a lot!

  77. I got mine going in Ubuntu last night… just by installing linux-firmware-nonfree. The little blue light lit up without needing to reboot, and it has full 2.4G and 5G. No need to fight with the sources. 🙂

  78. I know that you have stated there was work to be don on Kali distros, I was checking in to see if you had made any headway. I am currently running Kali 2016.1 in VMWare Player 12. Have tried everything I can think of to get this driver working. No luck so far. Last install attempt left the following error messages:

    sudo make
    make -C tools
    make[1]: Entering directory ‘/root/mediatek_mt7610u_sta_driver_linux-64bit/tools’
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory ‘/root/mediatek_mt7610u_sta_driver_linux-64bit/tools’
    /root/mediatek_mt7610u_sta_driver_linux-64bit/tools/bin2h
    chipset = mt7610u
    cp -f os/linux/Makefile.6 /root/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/Makefile
    make -C /lib/modules/4.3.0-kali1-amd64/build SUBDIRS=/root/mediatek_mt7610u_sta_driver_linux-64bit/os/linux modules
    make[1]: *** /lib/modules/4.3.0-kali1-amd64/build: No such file or directory. Stop.
    Makefile:393: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

    As a side note I have used this exact driver install to fix the adapter for a regular
    install of Ubuntu 14.04. So I am unclear if it is a Kali issue or a VMware issue. Any help, insight, or advice is greatly appreciated. Am able to provide further details as needed. Thank you.

    • Don’t know much about Kali but it is telling you the problem in the error message “/lib/modules/4.3.0-kali1-amd64/build: No such file or directory”. It is looking for the kernel source files to compile the driver. Do you have the Kernel sources installed? I suggest you google Kali Kernel source and see if you can install them.

  79. Running openSuSE Leap 42.1 with kernel 4.1.15-8-default. lsusb gives ID 0e8d:7610 MediaTek Inc. for the dongle. There were absolutely no problems during compilation. So it was a great relief after many hours of frustration with different versions of the driver. Finally, something which just works. 🙂 Thank you!

    But one remark: The dongle sees only 2.4G networks and no 5G. Not sure what might be the problem.

    • The same behavior on Linux Mint 17.3 with kernel 4.2.0.30. The driver compiles and installs without problems but only 2.4 GHz range is visible.

      P.S.: Also tested the same stick under Win XP. Both 2.4 and 5 GHz ranges are visible.

  80. Thank you so much man!!!!! Works like a charm!!! You are a lifesaver!!! I am good with research, but I was having a hard time coming across anyone else who had the same issue!!!

    Thanks again!!!!

  81. It is working for my 2.4GHz but not my 5Ghz. any help would be great

  82. Thank you very much.
    It’s working on TOTOLink A1000UA. But one issue, it looks like can’t find 5G signal. I’m using ubuntu 15.10 with 4.2.0-35-generic

  83. Thank you Pintu. 5GHz works perfectly on Ubuntu 14.04 with an AC50 USB adapter.

    • Hi Charlie, Let me have a fresh look at the driver sources this week and update it.. I have not had a look since long (probably more than a year now) since moving to a new country and busy settling down. I will get back to you soon.

  84. Thanks a lot. You saved me. I was struggling for last two days.

  85. Ubuntu 16.04 here.

    4.4.0-21-generic on an AE6000.

    No errors at all, but, when I plug in the dongle itself, nothing.

    It’s listed in lsusb though,

    Bus 001 Device 002: ID 13b1:003e Linksys AE6000 802.11a/b/g/n/ac Wireless Adapter [MediaTek MT7610U]

    But refuses to get recognized.

    Great work on all of this though!

    If you need any further info from me to help, please let me know!

  86. not working on kubuntu 16.04 with 4.4.0-21-generic on TOTOLINK A1000UA.

    It used to work on 15.10 before.

    any problem?

  87. Finnaly, i got my mediatek 7610 (TOTOLINK A1000UA) working on Kubuntu 16.04
    Still testing for now, at least i can connect to my router and browsing.

    Saw this tutorial:
    https://forum.ubuntuusers.de/topic/tp-link-archer-t1u/

    and use this repo
    https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916

    maybe this work either, not tested, but he said support linux 4.4 kernel
    https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes

    Hope this help others.

    thanks.

    • Hi Chandra,

      Many thanks for those useful links. I will sure check them out. Lately I am slightly down and busy with other problems. I will update my source code soon. I have many more bugs to fix.

  88. This works for the ASUS AC51 also but I am unable to do 5ghz for some reason.

    common/rtusb_dev_id.c

    added :
    {USB_DEVICE(0x0b05,0x17d1)}, /* MT7650U USB ID for ASUS AC51 */

    Raspberry PI3 – CentOS7 – 4.1.19-v7 #1 SMP Tue Mar 15 14:54:48 UTC 2016 armv7l armv7l armv7l GNU/Linux

    • Hi Matt, Probably setting WirelessMode=13 will fix the issue. You should be able to see 5Ghz connections.

      • Hi, I have set WirelessMode=13 in /etc/Wireless/RT2870STA/RT2870sta.dat but still I cannot find 5G network.. I am using Ubuntu 16.04 with kernel 4.4.0.28 (if I am not mistaken). On windows that stick works with 5G without any problems… What can be the cause for that?

  89. I keep seeing all these sites listing out compile instructions, but no one seems to get the same errors I am getting.

    I am on Ubuntu Studio 12.04.LTS

    After following the instructions pretty much all over the Internet I keep getting the same two compile errors and cannot find any explanation of the errors anywhere.

    Here is what I just got after yet another effort at running the make command:

    william@Frankenlat:~/mediatek_mt7610u_sta_driver_linux-64bit$ make
    make -C tools
    make[1]: Entering directory `/home/william/mediatek_mt7610u_sta_driver_linux-64bit/tools’
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory `/home/william/mediatek_mt7610u_sta_driver_linux-64bit/tools’
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/tools/bin2h
    chipset = mt7610u
    cp -f os/linux/Makefile.6 /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/Makefile
    make -C /lib/modules/3.2.0-82-lowlatency/build SUBDIRS=/home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux modules
    make[1]: Entering directory `/usr/src/linux-headers-3.2.0-82-lowlatency’
    CC [M] /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.o
    In file included from /home/william/mediatek_mt7610u_sta_driver_linux-64bit/include/rtmp_os.h:44:0,
    from /home/william/mediatek_mt7610u_sta_driver_linux-64bit/include/rtmp_comm.h:75,
    from /home/william/mediatek_mt7610u_sta_driver_linux-64bit/include/rt_config.h:33,
    from /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:28:
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/include/os/rt_linux.h:280:2: error: unknown type name ‘kuid_t’
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/include/os/rt_linux.h:281:2: error: unknown type name ‘kgid_t’
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:334:16: warning: unused variable ‘pAd’ [-Wunused-variable]
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c: In function ‘STA_MonPktSend’:
    /home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:443:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
    make[2]: *** [/home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.o] Error 1
    make[1]: *** [_module_/home/william/mediatek_mt7610u_sta_driver_linux-64bit/os/linux] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-82-lowlatency’
    make: *** [LINUX] Error 2

    Since i am not a coder, it would be really nice to get some help with this, but what would be even better would be for someone to just compile the drivers and make them available pre-compiled.

    Please.

    • Hi William, Let me have a look at the driver and compile it on my very recently upgraded linux (yes I am on kubuntu now.. gave up on gnome). Sorry for very late replies.

      • Any update on the “Receipe Errors”? I am on a Debian Derivative and followed all the instructions in Red above and can’t get past this error.

  90. Pingback: Cıvata

  91. cc1: some warnings being treated as errors
    /usr/src/linux-headers-4.6.0-kali1-common/scripts/Makefile.build:296: recipe for target ‘/root/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux/../../chips/rtmp_chip.o’ failed
    make[4]: *** [/root/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux/../../chips/rtmp_chip.o] Error 1
    /usr/src/linux-headers-4.6.0-kali1-common/Makefile:1446: recipe for target ‘_module_/root/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux’ failed
    make[3]: *** [_module_/root/Downloads/sanrath-mediatek_mt7610u_sta_driver_linux-64bit-95fd2aa84ad7/os/linux] Error 2
    Makefile:146: recipe for target ‘sub-make’ failed
    make[2]: *** [sub-make] Error 2
    Makefile:8: recipe for target ‘all’ failed
    make[1]: *** [all] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.6.0-kali1-amd64’
    Makefile:393: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

  92. I am getting this error! Any help?

  93. It worked for me after a couple of careful attempts. Thank you so much!!! I am using ZyXEL NWD6505 wireless adapter on elementary OS 0.3.2 Freya (64-bit). I added VENDOR_ID and PRODUCT_ID of this device to common/rtusb_dev_id.c. I removed /etc/Wireless folder which was created from previous failed attempts. I was using an older wireless adopter and also removed it before make and install.

  94. I have compiled driver and haven’t had any errors while installing it, but:
    – every time when I restart computer, it doesn’t detect USB, it uses PCI wifi card instead
    – if I want to use usb wifi dongle I need to start ra0 interface – sudo ifconfig ra0 up and restart network-manager so the dongle can be used – sudo /etc/init.d/network-manager restart . Also to stop using PCI WiFi I need to shutdown interface – sudo ifconfig wlp4s0 down
    – Another issue is that every restart device is using configuration 8 instead 13, even though before I compiled src, I changed RT2870STA.dat to use 13

    example:

    #The word of “Default” must not be removed
    Default
    CountryRegion=5
    CountryRegionABand=7
    CountryCode=
    ChannelGeography=1
    SSID=11n-AP
    NetworkType=Infra
    WirelessMode=13
    EfuseBufferMode=0
    Channel=0
    BeaconPeriod=100
    TxPower=100
    BGProtection=0
    TxPreamble=0
    RTSThreshold=2347
    FragThreshold=2346
    TxBurst=1
    PktAggregate=0
    WmmCapable=0
    AckPolicy=0;0;0;0
    AuthMode=OPEN
    EncrypType=NONE
    WPAPSK=
    DefaultKeyID=1
    Key1Type=0
    Key1Str=
    Key2Type=0
    Key2Str=
    Key3Type=0
    Key3Str=
    Key4Type=0
    Key4Str=
    PSMode=CAM
    AutoRoaming=0
    RoamThreshold=70
    APSDCapable=0
    APSDAC=0;0;0;0
    HT_RDG=1
    HT_EXTCHA=0
    HT_OpMode=0
    HT_MpduDensity=4
    HT_BW=1
    HT_BADecline=0
    HT_AutoBA=1
    HT_AMSDU=0
    HT_BAWinSize=64
    HT_GI=1
    HT_MCS=33
    HT_MIMOPSMode=3
    HT_DisallowTKIP=1
    HT_STBC=0
    VHT_BW=1
    VHT_SGI=1
    VHT_STBC=0
    EthConvertMode=
    EthCloneMac=
    IEEE80211H=0
    TGnWifiTest=0
    WirelessEvent=0
    MeshId=MESH
    MeshAutoLink=1
    MeshAuthMode=OPEN
    MeshEncrypType=NONE
    MeshWPAKEY=
    MeshDefaultkey=1
    MeshWEPKEY=
    CarrierDetect=0
    AntDiversity=0
    BeaconLostTime=4
    FtSupport=0
    Wapiifname=ra0
    WapiPsk=
    WapiPskType=
    WapiUserCertPath=
    WapiAsCertPath=
    PSP_XLINK_MODE=0
    WscManufacturer=
    WscModelName=
    WscDeviceName=
    WscModelNumber=
    WscSerialNumber=
    RadioOn=1
    WIDIEnable=1
    P2P_L2SD_SCAN_TOGGLE=3
    Wsc4digitPinCode=0
    P2P_WIDIEnable=0
    PMFMFPC=0
    PMFMFPR=0
    PMFSHA256=0

    – when I change dat file in /etc/Wireless/RT2870STA and set 13 which would use ac along with other standards, nothing happens.

    when I list USB I get this output which clearly shows that is read by PC

    lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 001 Device 005: ID 0bda:5719 Realtek Semiconductor Corp.
    Bus 001 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
    Bus 001 Device 010: ID 13b1:003e Linksys AE6000 802.11a/b/g/n/ac Wireless Adapter [MediaTek MT7610U]
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    – what is interesting, when I unplug the USB and plug it again, and do – sudo dmsg

    [13267.871108] <– RTMPAllocTxRxRingMemory, Status=0
    [13267.871182] RT65xx_WLAN_ChipOnOff(): OnOff:1, Reset= 0, pAd->WlanFunCtrl:0x0, Reg-WlanFunCtrl=0xff000002
    [13267.871832] MCUType = 2
    [13267.871956] NVM is EFUSE
    [13267.871958] Endpoint(8) is for In-band Command
    [13267.871958] Endpoint(4) is for WMM0 AC0
    [13267.871959] Endpoint(5) is for WMM0 AC1
    [13267.871960] Endpoint(6) is for WMM0 AC2
    [13267.871961] Endpoint(7) is for WMM0 AC3
    [13267.871962] Endpoint(9) is for WMM1 AC0
    [13267.871962] Endpoint(84) is for Data-In
    [13267.871963] Endpoint(85) is for Command Rsp

    [13267.881718] ModemManager[10601]: segfault at 0 ip 0000000000431ab3 sp 00007fff44b5d9a0 error 4 in ModemManager[400000+103000]

    any solution how to resolve this problem?
    – how to setup ra0 to run as default and wlp4s0, not to be used at all?
    – to be able to use both 2,4 and 5GHz?

  95. Pingback: Otopay

  96. So, got this working on a raspberry PI (1 and 2), except it won’t see the 5ghz band, other than that, thx for the work, would have taken me forever to replicate your method

    • Hi Goma no Sensei,

      I’m hitting errors with a Raspberry Pi 1 B. How did you get drivers to install successfully? Here’s my output when running “make”:

      root@raspberrypi:/home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit# make
      make -C tools
      make[1]: Entering directory ‘/home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit/tools’
      gcc -g bin2h.c -o bin2h
      make[1]: Leaving directory ‘/home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit/tools’
      /home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit/tools/bin2h
      chipset = mt7610u
      cp -f os/linux/Makefile.6 /home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/Makefile
      make -C /lib/modules/4.9.24+/build SUBDIRS=/home/pi/Desktop/mediatek_mt7610u_sta_driver_linux-64bit/os/linux modules
      make[1]: Entering directory ‘/lib/modules/4.9.24+/build’
      make[1]: *** No rule to make target ‘modules’. Stop.
      make[1]: Leaving directory ‘/lib/modules/4.9.24+/build’
      Makefile:393: recipe for target ‘LINUX’ failed
      make: *** [LINUX] Error 2

      Thanks!

      • Hi, i just installed the modem on Raspberry pi3 working perfectly fine.

        I had the same problem as you have and since I am now in Linux I was very confused, all I can say is that you need to download a package to be able to compile it right, after that you are good to go, the modem works at least on 2.4Ghz and the with some little change you can get the 5Ghz (which is what i wanted ) very easy. what I did was run this code which downloads the whole package of something to be able to compile the driver for my Linux kernel, it is better to say Raspberry pi kernel (It has to be the same version or something related to the version of your kernel ), this is the code:
        sudo apt-get install raspberry pi-kernel-headers
        then i was about to download the .deb file of my kernel (which in my case is :4.4.50-v7+ #970 SMP for RPI) to download and put it in the folder I am supposed to put but that was not necessary so skip this step if you want to run that command.
        then try to use these commands :
        sudo make clear
        sudo make
        sudo make install

        and let me know how it goes

        • hey, I am having the exact same problem but even installing rasp headers as you suggested I have dependencies issues on that package. Do you experienced the same thing? thanks a lot

        • Hey there, me again. I was able to compile the driver and now I can use the dongle at 2.4 Ghz. What are the edits I need to perform in order to use 5Ghz? Thanks a lot

  97. Hey, I’ve been trying to make this work with Edimax EW-7711ULC. It has the same vendor id and product id as the EW-7711MAC (which is already inside your code). However when I entered “sudo make” it came back with this error

    /home/davay/Downloads/mediatekmt7610ustadriver/os/linux/../../chips/rtmp_chip.c:910:30: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
    pChipOps->ChipSwitchChannel = Default_ChipSwitchChannel;

    I’m on manjaro right now with kernel version 4.6.

    please help

  98. Thank you for this post.

    For other peeps that have issues after finishing “sudo make install”. Execute these commands:
    sudo ifconfig ra0 up
    sudo service network-manager restart

    • This worked for me, thank you!! But now whenever I restart I have to open a terminal and run these two commands in order to get the adapter working again, is there any way to get this to happen at boot or login?

  99. hi

    i am running fedora 25 and tried to follow your guide
    i am new to linux so some of it is going over my head

    i am getting the error when i try to run you driver and make

    t/os/linux/../../chips/rtmp_chip.o
    /home/UptiKool/Downloads/Driver/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.c: In function ‘RtmpChipOpsHook’:
    /home/UptiKool/Downloads/Driver/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.c:910:30: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
    pChipOps->ChipSwitchChannel = Default_ChipSwitchChannel;
    ^
    cc1: some warnings being treated as errors

    please i am desperate please help

  100. Hello,

    I tried following your guide on kernel 4.8 in ubuntu 16.04LTS. However, it is giving the following error:

    :0:0: note: this is the location of the previous definition
    In file included from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:98:0,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/cfg80211.h:35:49: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)
    struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
    ^~~~~~~~~~~~~~~~~~~
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:341:16: warning: unused variable ‘pAd’ [-Wunused-variable]
    RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
    ^~~
    In file included from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44:0,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
    from /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function ‘STA_MonPktSend’:
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
    DBGPRINT(RT_DEBUG_ERROR, (“%s : Size is too large! (%d)\n”, __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
    ^
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:669:16: note: in definition of macro ‘DBGPRINT_RAW’
    printk Fmt; \
    ^~~
    /home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450:9: note: in expansion of macro ‘DBGPRINT’
    DBGPRINT(RT_DEBUG_ERROR, (“%s : Size is too large! (%d)\n”, __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
    ^~~~~~~~
    scripts/Makefile.build:289: recipe for target ‘/home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o’ failed
    make[2]: *** [/home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o] Error 1
    Makefile:1489: recipe for target ‘_module_/home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux’ failed
    make[1]: *** [_module_/home/joel/repos/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.8.0-30-generic’
    Makefile:403: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

    Anything I should do?

    Thanks!

  101. will this work for kali linux on kernel 4.6 i’ve been trying for two days to find anything going to try this haven’t yet ill come back and reply if it does (ill try to) if it doesnt do you have any idea or anything that could help me find a driver for Kernel 4.6
    Feel free for anyone to email me at demonguy101@gmail.com (really old email to keep anon)

  102. thanks so much man!
    I don’t have to tether my phone anymore!

    at first i had a crappy copy of ubuntu so I just wiped it and installed debian and it finally worked!

  103. As a point of reference, I am a 34yr old smart techie that’s new to Linux and trying to learn. I’ve installed a dual boot Win10/Mint 18.1. I copied the file to my Download folder and extracted it there. On the mediatek folder I selected: Actions: Open Terminal Here. Then I entered the above commands. The make command gives a ‘fatal error: studio.h: no such file or directory’ I don’t know if this has something to do with me needing owner permissions or if I have placed the folder in the wrong location or what.

  104. Um..its doesnt seem to work for 4.9. what next? How do we fix this.

  105. Folks,

    I am getting that Recipe error message. I have followed the instructions in red above but I am still stuck. I have been trying for 5-hours;)!

    cc1: some warnings being treated as errors
    scripts/Makefile.build:289: recipe for target ‘/usr/src/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.o’ failed
    make[2]: *** [/usr/src/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.o] Error 1
    Makefile:1477: recipe for target ‘_module_/usr/src/mediatek_mt7610u_sta_driver_linux-64bit/os/linux’ failed
    make[1]: *** [_module_/usr/src/mediatek_mt7610u_sta_driver_linux-64bit/os/linux] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.8.0-040800-generic’
    Makefile:393: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

  106. Wow. That is so elegant and logical and clearly explained. Brilliantly goes through what could be a complex process and makes it obvious.

  107. I can’t figure out how to get this working on my Raspberry pi 3, i have build and installed the driver, but it only shows me 2.4GHz and not the 5GHz AC where i bought it for.

    Anyone has a clue on how to fix this? The wireless mode is currently on 13, as in the repository.

    • I’ve got it working for 5GHZ now, the solution for finding 5GHZ was, that i had to set the WirelessMode manually in the terminal. The setting in the .dat file had no effect on it.

      This can be done by executing: iwpriv ra0 set WirelessMode=15
      Yet, this is not persistent, so i simply added it to /etc/rc.local so it get’s executed on boot. It should be possible in the interfaces file, but that didnt work for me and this fix was quicker to get done.

      I think it still uses a/n instead of AC though, download is about 40mbps while i reach 300mbps easily on my laptop. Not sure how to fix that one but atleast it does connect through 5GHz.

  108. Hi,
    I built Lubuntu 17.04 on an old Dell Inspiron 1100 laptop. So far, I wasn’t able to find a WiFi adapter that would work. I have a AE6000 and would like to try your solution, but my laptop is 32 bit and your driver implies 64 bit machine. Any comments?

Leave a Reply

Required fields are marked *.