Ralink MT7601U (148f:7601) Wi-Fi adapter installation

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 
6

5 Answers

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 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!

7

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 

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
6

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' 
7

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 ().

    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:

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.

3

You Might Also Like