1

The thing is, I really don't know what to do. I just installed Ubuntu. I have no internet connection now. I have a Ralink MT7601U Wireless Adapter. But it's not working.

lsusb detects it (I guess):

Bus 001 Device 060: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter

But nothing in that wifi icon. And also 'sudo lshw -C network' only shows Ethernet. Also in one of the post, I've read that Ubuntu 17.04 (which I have) contains it by default. If so why is it not working? Should I do something? By the way, the device was not plugged when installing Ubuntu. Is there a installing-driver-from-ubuntu-cd sort of thing??

Please help. I'm new to Ubuntu.

rfkill list all and sudo modprobe mt7601u returns nothing. The second one asked for password, though.

EDIT: So, I've managed to install driver from a source. Nowdmesg | grep mt76 gives 3 more lines at the beginning:

usbcore: registered new interface driver mt7601u
mt7601Usta: loading out-of-tree module taints kernel.
mt7601Usta: module verification failed: signature and/or required key missing - tainting kernel

Also iwconfig outputs:

ra0             Ralink STA

What should I do?

  • Please edit your question to add the result of the terminal commands: `rfkill list all` and also: `sudo modprobe mt7601u` Welcome to Ask Ubuntu. – chili555 Sep 30 '17 at 16:07
  • @chili555 Updated. – Mohamed Safeuq J Sep 30 '17 at 16:11
  • Now, let's take a look at the log: `dmesg | grep mt76` As the output might be lengthy, paste the result here and give us the link: http://paste.ubuntu.com – chili555 Sep 30 '17 at 16:20
  • @chili555 Here it is: http://paste.ubuntu.com/25647080/ – Mohamed Safeuq J Sep 30 '17 at 16:32
  • Please see the long discussion here: https://github.com/kuba-moo/mt7601u/issues/64 with the same errors. Have you tried every different USB port? I'm not sure I have any other suggestions. – chili555 Sep 30 '17 at 17:38
  • What about NDISWrapper? Will that help?? – Mohamed Safeuq J Sep 30 '17 at 17:57
  • 1
    No, it certainly won't. –  Sep 30 '17 at 18:19
  • So, I have to switch to another adapter. But it works perfectly fine in Windows – Mohamed Safeuq J Sep 30 '17 at 18:24
  • Did you have to install drivers for it to work in Windows? I suspect there might be some cheap fakes of these wireless cards and that is why some don't work in Linux – Jeremy31 Sep 30 '17 at 20:03
  • I did install driver in Windows 7. But in Win10, it got installed automatically. – Mohamed Safeuq J Oct 01 '17 at 04:17
  • Hey guys! I've found the linux driver in the installation cd that came with it. The name of the file is DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2 . I ran the following codes as said in readme. `cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913`,`make`. But `make` returned 2 warnings and 1 error as in [here](http://paste.ubuntu.com/25654004/). What should I do? – Mohamed Safeuq J Oct 01 '17 at 14:43
  • @chili555 I've made some more edits. Have a look – Mohamed Safeuq J Oct 01 '17 at 15:31
  • Aside from the fact that this is an old, old driver, I see nothing additional wrong. Does it scan and see networks? `sudo iwlist ra0 scan` Any clues in the log? `dmesg | grep -e ra0 -e rt2` – chili555 Oct 02 '17 at 02:04
  • @chili555 The first one returns `unknown command: scan` and the second one returns `usbcore: registered new interface driver mt7601u`. Same as above – Mohamed Safeuq J Oct 02 '17 at 16:23
  • Does `iwconfig` confirm that the wireless interface is now ra0 or some other? Are, in fact, two drivers loaded? `lsmod | grep -i mt76` – chili555 Oct 02 '17 at 17:17
  • @chili555 Yes. It is always listed as `ra0`. And the second command returns: `mt7601Usta 602112 0`. – Mohamed Safeuq J Oct 03 '17 at 14:24

1 Answers1

0

I've finally found a working solution for this problem. The answer is from GitHub

  • Download corresponding kernel source from kernel.org. For example: if you have 4.4.0-104-generic download version 4.4. You can check the current kernel version by running uname --kernel-release

  • From archive unpack just folder drivers/net/wireless/mediatek/mt7601u

  • Edit phy.c. Find function mt7601u_init_cal and comment out call mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); like in code 1 below

  • Find function mt7601u_phy_recalibrate_after_assoc and comment out call mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp); like in code 2 below

  • Build module:

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

  • Remove device

    sudo rmmod mt7601u sudo insmod ./mt7601u.ko

  • Insert device

  • Check there are no errors in dmesg and interface appeared in ip link, check connection stability.

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

I've tried this method on Ubuntu 16.04 with kernel 4.10. Working flawlessly...

Code 1:

// 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;

Code 2:

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

Hope it helps...