how to install drivers for wifi adaptor Ralink 148f:7601 on ubuntu? [duplicate]
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!
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
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'
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'sbranch
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