28

I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04.

The system is not detecting the wifi.

  1. lsusb lists the device as:

    Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp.
    
  2. I have the rt2800 USB driver listed in "/etc/modules";

  3. Following some instructions on the web, I tried this command:

    echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i
    
  4. lsmod | grep rt2800 returns the following:

    rt2800usb              26581  0 
    rt2x00usb              20041  1 rt2800usb
    rt2800lib              83150  1 rt2800usb
    rt2x00lib              48886  3 rt2x00usb,rt2800lib,rt2800usb
    mac80211              545990  3 rt2x00lib,rt2x00usb,rt2800lib
    crc_ccitt              12627  1 rt2800lib
    
  • I followed quite well the instructions above and it worked my pc recognized the adapter an successful connected to the wireless but when a try to get into Internet it freezes the browser and the OS, after that i can't do nothing.. did I do something wrong or miss any step ?? – user298418 Jun 27 '14 at 16:16
  • Great! Good work! It's works on Ubuntu 14.04. Thnx. – user309335 Jul 26 '14 at 9:50
  • i have tried that, but when i type the code "patch -p0 < ~/(ADD THE PATH)/rt2870-mt7601Usta-kuid_t-kgid_t.patch" in the terminal, i got the syntax error. could you provide me some other instructions? i am a real beginner in ubuntu world.thanks! – chinashieh Nov 28 '14 at 11:59
  • (ADD THE PATH) that where your patch is? For example, patch -p0 < ~/Downloads/rt2870-mt7601Usta-kuid_t-kgid_t.patch – Anıl Karaağaç Nov 28 '14 at 12:34
  • how can i find the patch? Is it the drivers that i have downloaded.i am new to ubuntu, sorry about ask such question! – chinashieh Nov 28 '14 at 12:57
37

I suggest you get a temporary internet connection, ethernet, tethered or whatever is available. Then do:

sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/art567/mt7601usta.git
cd mt7601usta/src 
make
sudo make install
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
sudo modprobe mt7601Usta

Your wireless should now be working.

You have compiled the driver for your current kernel version only. When Update Manager installs a later linux-image, after the required reboot, you must re-compile:

cd mt7601/src
make clean
make
sudo make install
sudo modprobe mt7601Usta

Please retain the files and these instructions for that time. Glad it's working!

  • 1
    very very very very thanks for you,only such word could express my feeling now! the wireless work! Knowing poor about the ubuntu and something else, i have this problem confused for almost one day.I have read many times of your previous solutions about such kind of problem.but i still keep confused.Before post this question,i was imaging whether if you will help me solve this problem, thanksfully,you did.Thank you! – chinashieh Nov 28 '14 at 13:29
  • i have another question about this problem.If i update something,will it influence this driver?waiting for your answer. – chinashieh Nov 28 '14 at 13:35
  • Please see my edit above. If my answer has been helpful to you, please accept it. – chili555 Dec 1 '14 at 15:01
  • Great article. You made my day and dragged me out of hell !! :P – Sravan Nov 24 '17 at 11:31
  • Amazing. I would have marked as right answer. Thank you @chili555 – Arunko Feb 21 '18 at 0:31
16

From Ubuntu 14.04 up to 15.04

The driver can be installed via a PPA:

sudo apt-add-repository ppa:thopiekar/mt7601
sudo apt-get update
sudo apt-get install mt7601-sta-dkms

Ubuntu 14.04 with kernel 4.2 and Ubuntu 15.10

The mt7601u driver was included in Linux kernel 4.2 but the firmware required by this adapter was not included in the package linux-firmware from Ubuntu 15.10 repository. The firmware can be downloaded from here and must be saved to /lib/firmware/mt7601u.bin ( <- must be lowercase). Run the following to download the firmware to the right location:

sudo wget -O /lib/firmware/mt7601u.bin https://github.com/porjo/mt7601u/tree/master/src/mcu/bin/MT7601.bin

Ubuntu 16.04 onward

The adapter just works.


The following adapters are supported:

  • 0b05:17d3
  • 0e8d:760a
  • 0e8d:760b
  • 13d3:3431
  • 13d3:3434
  • 148f:7601
  • 148f:760a
  • 148f:760b
  • 148f:760c
  • 148f:760d
  • 2001:3d04
  • 2717:4106
  • 2955:0001
  • 2955:1001
  • 2a5f:1000
  • 7392:7710
  • I'm running ubuntu 15.10, and it doesn't work out of the box because the mt7601u.bin firmware file is missing. What package is supposed to provide that file? – ʇsәɹoɈ Jan 24 '16 at 20:00
  • @ʇsәɹoɈ Answer updated. – Eric Carvalho Feb 8 '16 at 13:41
  • Worked for 14.04..easier than compiling the driver – Jamess Nov 16 '16 at 7:23
  • I'm using ppa:thopiekar/mt7601, but after a kernel upgrade(still using linux kernel 3), when restart the computer, the wifi is lost, so I don't have any internet connection. So, apt-get command just get failed, my question is: are they any way to install this driver offline. For example, I just download the deb file and use the usb stick to copy from another computer(I have to manually download the deb? Or are the deb file are still cached in my computer? Thanks – ollydbg23 Sep 8 '17 at 0:43
  • 1
    OK, problem solved, I see that the driver is correctly installed, but due to the secure boot setting, the driver can't be active, so I have to disable the secure boot feature, see here: UEFI/SecureBoot/DKMS - Ubuntu Wiki, I use the method 1, which just select the "Windows UEFI" type to "Other OS" type in the BIOS. – ollydbg23 Sep 8 '17 at 2:28
3

Download Driver and Patch by using the links.

Do not connect the USB:

sudo apt-get install --reinstall linux-headers-generic build-essential  
tar xjf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2  
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/  
patch -p0 < ~/(ADD THE PATH)/rt2870-mt7601Usta-kuid_t-kgid_t.patch  
make  
su -c 'mkdir -p /etc/Wireless/RT2870STA/'  
su -c 'cp RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat'  

Connect the USB

su -c '/sbin/insmod os/linux/mt7601Usta.ko'

If works:

su -c 'make install'
1

What worked for me

kernel version: 4.13.*

  • restart the PC to ensure that no kernel update is pending
  • Get your current kernel version using uname -r command.
  • Get the folder drivers/net/wireless/mediatek/mt7601u from Linux-kernel source tree (https://github.com/torvalds/linux/).

    Must match with your kernel version. Upto the first two-digits, e.g. 4.13 in my case. You will find the exact matched kernel by checking the tags on Github's branch drop-down menu.

  • Remove the device from pc

  • Now, open the phy.c file from the downloaded folder.
  • find the function mt7601u_init_cal in the file
  • Look up for RXIQ. Comment out the lines

//ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); //if (ret) // return ret;

  • Build the module using make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
  • run sudo rmmod mt7601u
  • run sudo insmod mt7601u.ko
  • now, insert the device to pc
  • check kernel messages using dmesg if anything is fatal error
  • Check if the new network interface is recognized using ifconfig command

Note

To make sure any of these works, you have to make sure you have updated binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms installed. Depending on your distro, some of them can be slightly different.

src: https://github.com/kuba-moo/mt7601u/issues/64#issuecomment-324894792

0

This just means you are supposed to give the path to the patch file.

Just insert the complete location of the patch file. Assuming the file is located at /tmp/patch/rt2870-mt7601Usta-kuid_t-kgid_t.patch, you would use the following command:

patch -p0 < /tmp/patch/rt2870-mt7601Usta-kuid_t-kgid_t.patch

Note that you have to be in the directory where the file you want to patch is located. I assume it is in /tmp/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/, the directory you're already in.

  • Now i have a new problem. After start Ubuntu and open Firefox or anything Ubuntu was blocked i reset is required: mouse does not move and keyboard lights are flashing: CAPS and Bloqs. – Guillermo de Pedro Sep 27 '14 at 14:44
  • The flashing lights indicate a kernel panic. After boot, hit ctrl+alt+f1 and login. search in /var/log/kern.log for errors. (somewhere at the end). Ask a new question for that and give those error messages. – s3lph Sep 28 '14 at 1:35
  • Thanks a lot. Continue at: askubuntu.com/questions/529616/… – Guillermo de Pedro Sep 28 '14 at 12:14

protected by Community Jul 26 '14 at 9:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.