3

I bought a usb wifi dongle for my Raspberry Pi B+ and I can't install it on my RPi with 3.18.3+ kernel (OS: raspbian).

Here are the steps that I follow with no success:

lsusb give me this output:

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

I downloaded the lastest kernel release on github and extracted it: https://github.com/raspberrypi/linux/rpi-3.18.y.tar.gz

made these instructions into rpi-linux-3.18 folder with no errors

make mrproper
zcat /proc/config.gz > .config
cp .config .config.org
sed -i 's/^CONFIG_CROSS_COMPILE.*/CONFIG_CROSS_COMPILE=""/' .config
make modules_prepare
wget https://raw.github.com/raspberrypi/firmware/master/extra/Module.symvers

then I got the MTU7601U driver from MediaTek (file: DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2 )

extracted it then proceed to make && make install. In my first attempts I couldn't run correctly make because of an error with a struct in the rt_linux.h.

error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’
error: incompatible types when assigning to type ‘int’ from type ‘kgid_t’

so I made a patch in this file by replacing int by kuid_t and kgid_t respectively (maybe the driver doesn't work cause of it ?)

Then I make && make install once again and (with lot of warnings) the driver compiled.

I installed by run:

sudo insmod /lib/modules/3.18.3/kernel/drivers/net//wireless/mt7601Usta.ko

And reboot my rpi.. But when i plug my usb wifi dongle I get this error:

[  642.853612] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[  642.965765] usb 1-1.4: New USB device found, idVendor=148f, idProduct=7601
[  642.965809] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  642.965830] usb 1-1.4: Product: 802.11 n WLAN
[  642.965849] usb 1-1.4: Manufacturer: MediaTek
[  642.965866] usb 1-1.4: SerialNumber: 1.0
[  643.149300] Unable to handle kernel paging request at virtual address 7e319b54
[  643.164074] pgd = d0660000
[  643.166813] [7e319b54] *pgd=00000000
[  643.170516] Internal error: Oops: 5 [#1] PREEMPT ARM
[  643.175482] Modules linked in: mt7601Usta(O+) snd_soc_pcm512x_i2c snd_soc_tas5713 snd_soc_pcm512x regmap_i2c i2c_dev i2c_bcm2708 snd_bcm2835 snd_soc_bcm2708_i2s regmap_mmio snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_seq snd_seq_device snd_timer snd
[  643.198715] CPU: 0 PID: 2517 Comm: modprobe Tainted: G           O   3.18.3+ #738
[  643.206190] task: ca412880 ti: d70a8000 task.ti: d70a8000
[  643.211610] PC is at load_module+0x1948/0x1f1c
[  643.216056] LR is at load_module+0x1934/0x1f1c
[  643.220502] pc : [<c008927c>]    lr : [<c0089268>]    psr: 30000013
[  643.220502] sp : d70a9e88  ip : bf1a85d8  fp : d70a9f44
[  643.231964] r10: bf1a8470  r9 : 00000000  r8 : bf1a847c
[  643.237182] r7 : c0561368  r6 : d065a2e0  r5 : 7e319b40  r4 : d70a9f48
[  643.243699] r3 : 00000000  r2 : 00000000  r1 : d064c5a0  r0 : c0824000
[  643.250219] Flags: nzCV  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  643.257345] Control: 00c5387d  Table: 10660008  DAC: 00000015
[  643.263086] Process modprobe (pid: 2517, stack limit = 0xd70a81b0)
[  643.269258] Stack: (0xd70a9e88 to 0xd70aa000)
[  643.273619] 9e80:                   bf1a847c 00007fff c00862c0 c0300708 00000013 00000000
[  643.281794] 9ea0: da0aa000 d70a9f7c d70a9f50 d70a9eb8 00000000 bf1a847c d70a8008 bf1a84b8
[  643.289969] 9ec0: bf1a85d8 00000000 b6d30000 d70a8000 00002db0 00000000 00000000 bf1715bc
[  643.298141] 9ee0: 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  643.306314] 9f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000080 000f6b01
[  643.314488] 9f20: b6c49000 b6f64948 00000080 c000eb44 d70a8000 00000000 d70a9fa4 d70a9f48
[  643.322664] 9f40: c008993c c0087940 da0aa000 000f6b01 da15ff1c da15fd1a da198394 000b3634
[  643.330837] 9f60: 000c36c4 00000000 00000000 00000000 00000030 00000031 00000026 0000002a
[  643.339011] 9f80: 00000016 00000000 00000000 00000000 00060000 b7422678 00000000 d70a9fa8
[  643.347185] 9fa0: c000e8c0 c008985c 00000000 00060000 b6c49000 000f6b01 b6f64948 b6c49000
[  643.355359] 9fc0: 00000000 00060000 b7422678 00000080 b7421cf8 000f6b01 b6f64948 00000000
[  643.363534] 9fe0: 00000000 bebc890c b6f5bfb4 b6ec6ac4 60000010 b6c49000 00040014 68c08002
[  643.371730] [<c008927c>] (load_module) from [<c008993c>] (SyS_init_module+0xec/0x100)
[  643.379577] [<c008993c>] (SyS_init_module) from [<c000e8c0>] (ret_fast_syscall+0x0/0x48)
[  643.387671] Code: e51bc084 e15c0005 e2455008 0a000009 (e5953014) 
[  643.677498] ---[ end trace 83e75e278f1e0439 ]---

I tried to recompile again and again but this issue came.

Does anyone know how to compile this driver for my version or know what have I done wrong?

  • Oh, btw: hello and welcome to RaspberryPi.StackExchange! – Ghanima Jan 29 '15 at 9:27
  • @Ghanima Thank you and thank you for the edit, and sorry for the mistakes! – Matthieu Durindel Jan 29 '15 at 9:39
  • You might try this version of the driver instead: github.com/porjo/mt7601 If it works, please add this as an answer to your own question. – goldilocks Jan 29 '15 at 10:36
  • I have the same issue with this driver. I followed the readme on github but when I run this command insmod os/linux/mt7601Usta.ko I get [ 2443.969818] Internal error: Oops: 5 [#1] PREEMPT ARM – Matthieu Durindel Jan 29 '15 at 11:33
  • Poorly explained. Change "int" to "kuid_t" and "kgid_t", the file has 1600 lines. Where you make this change? – user31871 Jun 15 '15 at 11:16
1
Please try the following way.

(1)Update package
$ sudo apt-get update
$ sudo apt-get upgrade

(2)Update Firmware to 3.18.6
$ sudo rpi-update 3f11b3fb1f390b60daa22f2ca2ecda5266295a84
$ sudo reboot

(3)Install driver
$ wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.6_753.tar.gz
$ sudo tar xf mt7601_3.18.6_753.tar.gz -C /
$ sudo depmod 3.18.6+
$ sudo reboot

(4)Edit /etc/network/interfaces
$ sudo vi /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0 →comment out
#iface wlan0 inet manual →comment out
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf →comment out
#iface default inet dhcp →comment out

#insert 4 line
auto ra0
allow-hotplug ra0
iface ra0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

(5)Edit /etc/wpa_supplicant/wpa_supplicant.conf
$ sudo sh -c "wpa_passphrase XXXXX YYYYY >> /etc/wpa_supplicant/wpa_supplicant.conf"

XXXXX=Access Point SSID
YYYY=Access Point Password

$ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="YOURWIFINAME"
        key_mgmt=WPA-PSK →Insert
        psk="YOURPASSWORD"
}

(7)Reboot
  • Thank you very much, it works great. Can you give the steps to compile these drivers, please ? – Matthieu Durindel Feb 24 '15 at 19:52
  • Oh I think you have follow the steps from the other answer, right ? – Matthieu Durindel Feb 24 '15 at 20:20
  • on OSMC, which should be a regular jesee, it can't find rpi-firmware command... – tutuca Jun 9 '15 at 1:06
  • Also osmc@osmc:~$ sudo depmod 3.18.6+ depmod: WARNING: could not open /lib/modules/3.18.6+/modules.order: No such file or directory depmod: WARNING: could not open /lib/modules/3.18.6+/modules.builtin: No such file or directory – tutuca Jun 9 '15 at 1:09
  • I had to replace ra0 with wlan0 for this to work for me. – HappyCoder86 Feb 3 '16 at 5:44
2

Trust me - it simply isn't worth spending time trying to get this particular WiFi dongle working. It takes way too many steps and all that effort goes down the drain everytime the kernel or anything else gets updated.

I think your best option is to return/sell/throw the Ralink 7601 and get an RTL8188CUS-based dongle.

  • I agree, I did it myself and now I found that if I need to do a fresh install, I would have to go through all that pain again, so I'm avoiding that but it would be inevitable at some point :/ – jotadepicas Feb 19 '15 at 1:37
  • Yes the steps to follow are very long, but if the rpi doesn't need to be updated very often it's a good compromise. Thank you for the link – Matthieu Durindel Feb 24 '15 at 20:22
0

There is a new driver for mt7601u on GitHub, it have been reported to work pretty well with rPI:

https://github.com/kuba-moo/mt7601u

Note that you will need to upgrade your kernel to 3.19 to use it.

0

I managed to get the MT7601u working on my Raspberry Pi 2 board, using Porjo's driver and adapting some instructions found on the web in order to compile it against the correct kernel. I have posted a write-up here for anyone interested.

I have only tested it on Raspi 2 boards, but I believe it should work on RasPi version 1 as well.

protected by Community Jun 17 '15 at 6:34

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.