2

I have installed Xubuntu 18.04 LTS on a old PC with 2 GB RAM Corsair 800 Mhz, Intel Pentium 4 3.6. I have Windows 7 Pro installed before but to increase performance I decided to install Xubuntu.

I bought a Wirelss Adapter stick, clearly it works perfectly in Win but not in Xubuntu. If I insert the stick and type lsusb:

Ralink Technology, Corp. MT7601U Wireless Adapter

if I type iwconfig:

enpls5 no wireless extension

lo no wireless extension

I also have a minicd with Linux driver, but if I try to install the MakeFile I obtain several error.

I follow just one tutorial because someone else has the same problem with Ubuntu 18.04 and solve it by doing:

sudo wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mt7601u.bin -O /lib/firmware/mt7601u.bin

cd /usr/lib/firmware/

sudo modprobe mt7601u

Clearly doesn't solve my issue.. rather if I digit:

dmesg | grep mt76

I obtain a lot of error..

I'm googling around and I found several different solution but I don't think that trying randomly will give results.

I don't want to remove the O.S. for this.. I'm not an expert but I know the basic of shell language and I need this machine for Internet and little else..

Can you help me to solve this? Maybe helping me understand what's missing?

Thank you all


Thank you all for your support..

No this solution:

sudo apt install git build-essential dkms
git clone https://github.com/jeremyb31/mt7601u.git
sudo dkms add ./mt7601u
sudo dkms install mt7601u/1.0

doesn't work for me.. I even try to enable HWE (or maybe I have simple download it) following this:

sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

If i digit hwe-support-status --verbose I obtain:

Your Hardware Enablement Stack (HWE) is supported until aprile 2023.

I have reboot my System and plug in the adapter but nothings happend.. The curious thing is that I'm now connecting with an USRobotics Adapter bought maybe more than 15 years ago..

If I digit dmesg | grep mt76 I obtain:

[   78.016085] mt7601u: loading out-of-tree module taints kernel.
[   78.016221] mt7601u: module verification failed: signature and/or required key missing - tainting kernel
[   78.303014] mt7601u 1-6:1.0: ASIC revision: 76010001 MAC revision: 76010500
[   78.317864] mt7601u 1-6:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[   78.714893] mt7601u 1-6:1.0: EEPROM ver:0d fae:00
[   78.893969] mt7601u 1-6:1.0: Error: RX urb failed:-71
[   78.894000] mt7601u 1-6:1.0: Error: submit URB dir:128 ep:1 failed:-19
[   78.921329] usbcore: registered new interface driver mt7601u
[   79.667140] mt7601u 1-6:1.0: ASIC revision: 76010001 MAC revision: 76010500
[   79.669464] mt7601u 1-6:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____

Now I would like to try Mohamed Safeuq J solution. I'm downloading the Linux 5.3 Kernel Source Code from Kernel.org and I modified the phy.c source code as he suggested.

Now I don't know how to go on:

  1. I have to repack the phy.c inside the path drivers/net/wireless/mediatek/mt7601u?
  2. As I understand he want to rebuild some kernel module but in this command: make -C /lib/modules/$(uname -r)/build M=$(pwd) modules what modules stand for?? There isn't a folder named modules inside the source code package.

Can you explain me how do this few passages??

Thanks a lot

2
  • Note the reference to 5.0 kernels; ie. if it doesn't work for you, I would ensure HWE is enabled then re-try. (the media you used to install Xubuntu 18.04 will dictate if it's enabled or not, it won't be if you used 18.04 or 18.04.1 media, but will be if you used 18.04.2 or later media)
    – guiverc
    Jan 23, 2020 at 21:59
  • No idea?? Have you read my update?? I have just asking how build kernel module.. Jan 28, 2020 at 15:14

1 Answer 1

3

I've found the solution (and it is not the one suggested by the message that appeared to me ten times to which I replied no, other ten times.. maybe I have overrated the community..).

I think this solution will work with Debian/Ubuntu/Xubuntu/Lubuntu (and similar) with Kernel version up to 4.4.x.y

Reading the README.md find inside the minidisc provided with the Adapter box I find out an unofficial driver here

According to the driver these USB devices are supported:

2955:1003
2955:1001
2955:0001
2A5F:1000
148F:760B
148F:7601
148F:6370
148F:7650 

You can verify if driver it's suitable for your device by plugging in the adapter and launching lsusb

Now, to download and install the driver, follow these steps:

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

Install will end with some error incompatible-pointer-types and incompatible argument passed to a function.

Than the Adapter still not works, to workaround I have follow these steps:

1) Check your Kernel Version by launching uname --kernel-release

2) Download corresponding kernel source from Kernel Archive -> you will see a unordered list of Kernel Version -> click on corresponding version (Example: if you have 5.0.0-23-generic click v5.x/) -> from the next page search for the file linux-5.0.tar.xz -> download it

3) From archive unpack just folder drivers/net/wireless/mediatek/mt7601u

4) Find and Edit file phy.c. Find function mt7601u_init_cal (row 1116) and comment out call mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); (line from 1156 to 1161) as follows:

// ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); 
// if (ret) 
// return ret;
// ret = mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->dpd_temp); 
// if (ret) 
// return ret;

5) Find function mt7601u_phy_recalibrate_after_assoc (row 587) and comment out call mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp); (row 589) as follows:

void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev)
{ 
// mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp);
   mt7601u_rxdc_cal(dev); 
}

6) Open a terminal and go to mt7601u folder path

7) Build module by tiping:

make -C /lib/modules/$(uname -r)/build M=$(pwd) modules

8) If the Adapter is plugged in remove it and (from the same path) type:

sudo su
rmmod mt7601u (can output "module not loaded". if yes, ignore it and continue)
insmod ./mt7601u.ko

9) Insert device

10) Now Adapter should works but If you restart the pc you have to reload module again. Than to make change persistent till next kernel upgrade: backup original module and replace with compiled. To find out where is original module run modinfo mt7601u (view string filename: /lib/modules/_KERNEL_VERSION_/kernel/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko).

10.1) If after reboot the Adapter is not recognized you have to follow these steps:

cd /etc/modprobe.d
ls
  • If you find a file named blacklist-mt7601u.conf remove it.

Then type nano /etc/modules and write a single line with module name mt7601u (without .ko)

reboot the system. Enjoy.

Hope helps... to solve the problem and to learn how to write a usefull problem solution..

5
  • These steps worked partially. It now detects Wifi adapter, shows me networks available. But as soon as I connect any network, it just FREEZ my computer. I can't do anything except forcefully power off the system. I need this to work badly. I'm on kernel 5.3.0, Wifi adapter 148F:7601. Ubuntu 18.04.4 LTS. If you found any better solution please suggest. Apr 11, 2020 at 19:29
  • You're amazing! This works on Ubuntu 20.04 :)
    – yanike
    Jul 2, 2020 at 3:39
  • Thank you again for this solution. This is now reported as a working solutoin for Ubuntu developers to see and hopefully fix this issue: bugs.launchpad.net/ubuntu/+source/linux/+bug/1885985
    – yanike
    Jul 2, 2020 at 17:14
  • Does mt7601u supported Master mode ? Or AP mode for fluxion ? Nov 2, 2020 at 14:19
  • I have updated my system. So the current versions are: Ubuntu Ubuntu 20.04.1 LTS, Kernel 5.4.0-54-generic and I'm still facing the same problem. Wifi networks are visible, no special errors in dmesg, lsmod shows newly compiled drivers are loaded good. But at the end, when I try to connect any wifi network it just FREEZ my computer and have to shutdown forcefully by power off. Someone please help to get it working. Nov 23, 2020 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .