berry07
Posts: 5
Joined: Sun Feb 04, 2018 5:33 pm

USB wifi Dongle MediaTek - driver missing

Mon Feb 12, 2018 10:39 am

Hi,

i'm trying to install my new wifi usb dongle, but unfortunately no firmware or driver found either kernel or as module


Raspberry os version:
uname -a
Linux wifi-ap01 4.9.78-v7+ #1084 SMP Thu Jan 25 18:05:49 GMT 2018 armv7l GNU/Linux
dmesg | grep usb
[ 2.130675] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[ 2.276037] usb 1-1.5: New USB device found, idVendor=0e8d, idProduct=7610
[ 2.278827] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.281669] usb 1-1.5: Product: WiFi
[ 2.284389] usb 1-1.5: Manufacturer: MediaTek
[ 2.287043] usb 1-1.5: SerialNumber: 1.0
modprobe: FATAL: Module mt7610u not found in directory /lib/modules/4.9.78-v7+

User avatar
topguy
Posts: 5626
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: USB wifi Dongle MediaTek - driver missing

Mon Feb 12, 2018 3:06 pm

This device seems to be very new and might not have support in linux yet.

Even ubuntu 17.10 seems to lack support..
https://askubuntu.com/questions/975464/ ... ifi-driver

MrEngman
Posts: 3838
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB wifi Dongle MediaTek - driver missing

Mon Feb 12, 2018 4:13 pm

I have compiled the mt7610 driver that supports the USB ID your wifi uses.

I have a script that will automatically download and install the driver. You can install the script using commands

Code: Select all

sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
Then run command

Code: Select all

sudo install-wifi -h
to see how to use the script.

To install the driver you should just need to run command

Code: Select all

sudo install-wifi
to install the driver for the kernel version you are using.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

berry07
Posts: 5
Joined: Sun Feb 04, 2018 5:33 pm

Re: USB wifi Dongle MediaTek - driver missing

Tue Feb 13, 2018 8:56 am

phantastic, very great it works , where did you get the kernel resources for compiling the driver

maybe i need this info for further missing driver

thx again

MrEngman
Posts: 3838
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB wifi Dongle MediaTek - driver missing

Tue Feb 13, 2018 10:57 am

berry07 wrote:
Tue Feb 13, 2018 8:56 am
phantastic, very great it works , where did you get the kernel resources for compiling the driver

maybe i need this info for further missing driver

thx again
Glad to be able to help.

I compile drivers for mt7610, mt7612, 8812au, 8192eu and 8188eu wifi modules every time there is a kernel update so if you update you kernel, provided it is a version of Raspbian, you can use the script to update the driver.

For the mt7610 driver I get the code from

Code: Select all

https://github.com/ulli-kroll/mt7610u
. I get the kernel code from

Code: Select all

https://github.com/raspberrypi/linux
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

berry07
Posts: 5
Joined: Sun Feb 04, 2018 5:33 pm

Re: USB wifi Dongle MediaTek - driver missing

Fri Mar 02, 2018 6:54 pm

sorry it looks like my answer was wrote to fast, after boot my pi my wifi dongle shows erros, seen on dmesg output below

Code: Select all

[  233.486435] mt7610u: probe of 1-1.4.4:1.0 failed with error -1
[  301.213038] usb 1-1.4: USB disconnect, device number 6
[  301.213052] usb 1-1.4.4: USB disconnect, device number 7
[  303.298819] usb 1-1.4: new high-speed USB device number 9 using dwc_otg
[  303.429437] usb 1-1.4: New USB device found, idVendor=1a40, idProduct=0101
[  303.429452] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  303.429460] usb 1-1.4: Product: USB 2.0 Hub
[  303.430334] hub 1-1.4:1.0: USB hub found
[  303.430461] hub 1-1.4:1.0: 4 ports detected
[  303.748860] usb 1-1.4.4: new high-speed USB device number 10 using dwc_otg
[  303.884783] usb 1-1.4.4: New USB device found, idVendor=0e8d, idProduct=7610
[  303.884799] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  303.884807] usb 1-1.4.4: Product: WiFi
[  303.884814] usb 1-1.4.4: Manufacturer: MediaTek
[  303.884822] usb 1-1.4.4: SerialNumber: 1.0
[  303.886773]

               === pAd = be183000, size = 856120 ===

[  303.886792] <-- ERROR in Alloc Bulk buffer for HTTxContext!
[  303.886797] ---> RTMPFreeTxRxRingMemory
[  303.886803] <--- RTMPFreeTxRxRingMemory
[  303.886807] ERROR!!!
[  303.886812] Failed to allocate memory - TxRxRing
[  303.886943] <-- RTMPAllocAdapterBlock, Status=3
[  303.886975] mt7610u: probe of 1-1.4.4:1.0 failed with error -1

MrEngman
Posts: 3838
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB wifi Dongle MediaTek - driver missing

Fri Mar 02, 2018 8:05 pm

berry07 wrote:
Fri Mar 02, 2018 6:54 pm
sorry it looks like my answer was wrote to fast, after boot my pi my wifi dongle shows erros, seen on dmesg output below

Code: Select all

[  233.486435] mt7610u: probe of 1-1.4.4:1.0 failed with error -1
[  301.213038] usb 1-1.4: USB disconnect, device number 6
[  301.213052] usb 1-1.4.4: USB disconnect, device number 7
[  303.298819] usb 1-1.4: new high-speed USB device number 9 using dwc_otg
[  303.429437] usb 1-1.4: New USB device found, idVendor=1a40, idProduct=0101
[  303.429452] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  303.429460] usb 1-1.4: Product: USB 2.0 Hub
[  303.430334] hub 1-1.4:1.0: USB hub found
[  303.430461] hub 1-1.4:1.0: 4 ports detected
[  303.748860] usb 1-1.4.4: new high-speed USB device number 10 using dwc_otg
[  303.884783] usb 1-1.4.4: New USB device found, idVendor=0e8d, idProduct=7610
[  303.884799] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  303.884807] usb 1-1.4.4: Product: WiFi
[  303.884814] usb 1-1.4.4: Manufacturer: MediaTek
[  303.884822] usb 1-1.4.4: SerialNumber: 1.0
[  303.886773]

               === pAd = be183000, size = 856120 ===

[  303.886792] <-- ERROR in Alloc Bulk buffer for HTTxContext!
[  303.886797] ---> RTMPFreeTxRxRingMemory
[  303.886803] <--- RTMPFreeTxRxRingMemory
[  303.886807] ERROR!!!
[  303.886812] Failed to allocate memory - TxRxRing
[  303.886943] <-- RTMPAllocAdapterBlock, Status=3
[  303.886975] mt7610u: probe of 1-1.4.4:1.0 failed with error -1
Hi berry07,

I don't see this error with my mt7610 wifi modules, however I have seen a similar error with a wifi adapter using a different Mediatek driver, mt7612.

You might be able to fix it by editing file /boot/cmdline.txt and adding coherent_pool=4M to the end of the line. This fixed the similar error I had with the mt7612 driver.

I would suggest after editing the file poweroff the Pi and turn off the power then re-power the Pi and boot and then see what happens.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

berry07
Posts: 5
Joined: Sun Feb 04, 2018 5:33 pm

Re: USB wifi Dongle MediaTek - driver missing

Sat Mar 03, 2018 5:41 pm

sorry no improvement after implmentation of your proposal, except the error descriped before no more seen, after boot process
so i tried to collect some informations and outputs


dmesg

Code: Select all

[    2.306040] usb 1-1.3: New USB device found, idVendor=0e8d, idProduct=7610
[    4.139701] mt7610u: loading out-of-tree module taints kernel.
[    4.157163] ==>mt7610u_chip_onoff(): OnOff:1, Reset= 0, pAd->WlanFunCtrl:0x0, Reg-WlanFunCtrl=0xff000002
[    4.160031] usbcore: registered new interface driver mt7610u
/var/log/messages

Code: Select all

Mar  3 18:27:11 wifi-ap01 kernel: [  278.482501] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
Mar  3 18:27:11 wifi-ap01 kernel: [  278.628032] usb 1-1.3: New USB device found, idVendor=0e8d, idProduct=7610
Mar  3 18:27:11 wifi-ap01 kernel: [  278.628046] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar  3 18:27:11 wifi-ap01 kernel: [  278.628054] usb 1-1.3: Product: WiFi
Mar  3 18:27:11 wifi-ap01 kernel: [  278.628062] usb 1-1.3: Manufacturer: MediaTek
Mar  3 18:27:11 wifi-ap01 kernel: [  278.628069] usb 1-1.3: SerialNumber: 1.0
Mar  3 18:27:11 wifi-ap01 kernel: [  278.629984]
Mar  3 18:27:11 wifi-ap01 kernel: [  278.629984]
Mar  3 18:27:11 wifi-ap01 kernel: [  278.629984] === pAd = bdec1000, size = 856120 ===
Mar  3 18:27:11 wifi-ap01 kernel: [  278.629984]
Mar  3 18:27:11 wifi-ap01 kernel: [  278.630061] <-- RTMPAllocTxRxRingMemory, Status=0
Mar  3 18:27:11 wifi-ap01 kernel: [  278.630184] <-- RTMPAllocAdapterBlock, Status=0
Mar  3 18:27:11 wifi-ap01 kernel: [  278.630350] ==>mt7610u_chip_onoff(): OnOff:1, Reset= 0, pAd->WlanFunCtrl:0x0, Reg-WlanFunCtrl=0xff000002
Mar  3 18:27:11 wifi-ap01 kernel: [  278.630660] MACVersion = 0x76502000
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631272] MACVersion = 0x76502000
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631631] 80211> RFICType = 3
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631639] 80211> Number of channel = 44
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631644] 80211> Number of rate = 12
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631654] 80211> CurTxPower = 0 dBm
Mar  3 18:27:11 wifi-ap01 kernel: [  278.631669] 80211> TxStream = 0
Mar  3 18:27:11 wifi-ap01 kernel: [  278.632015] crda> requlation requestion by user:
Mar  3 18:27:11 wifi-ap01 kernel: [  278.632022] DE
Mar  3 18:27:11 wifi-ap01 kernel: [  278.632027] crda> interface is down!
Mar  3 18:27:11 wifi-ap01 kernel: [  278.633050] 80211> CFG80211_Register
Mar  3 18:27:11 wifi-ap01 mtp-probe: checking bus 1, device 5: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3"
Mar  3 18:27:12 wifi-ap01 mtp-probe: bus: 1, device: 5 was not an MTP device

sudo ifconfig -a

Code: Select all

onboard wifi chip:
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.1  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::ba27:ebff:fe62:7290  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:62:72:90  txqueuelen 1000  (Ethernet)
        RX packets 1660  bytes 183963 (179.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2023  bytes 306723 (299.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code: Select all

external usb wifi stick - Mediatek 

wlan1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
/etc/network/interfaces

Code: Select all

allow-hotplug wlan0
iface wlan0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    wireless-power off
    hostapd /etc/hostapd/hostapd.conf

allow-hotplug wlan1
iface wlan0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

pi@wifi-ap01:~ $ sudo ifup wlan1

Code: Select all

ifup: unknown interface wlan1

MrEngman
Posts: 3838
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB wifi Dongle MediaTek - driver missing

Sat Mar 03, 2018 6:22 pm

It maybe something to do with your wifi configuration but I've no idea what.

I see you are using /etc/network/interfaces to set up your fixed IP addresses and one mentions hostapd so you are probably trying to set up an AP I suppose.

Normally with newer versions of Raspbian fixed IPs should be set up in file /etc/dhcpcd.conf but if setting up an AP not sure if that is still valid.

Also I'm not sure but I don't think the mt7610 driver supports AP mode.

Sorry I can't help more.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

filister
Posts: 9
Joined: Sat Oct 03, 2015 9:05 am

Re: USB wifi Dongle MediaTek - driver missing

Sat Jun 15, 2019 10:28 am

So when I try to install the driver the install-wifi script shows me that there isn't a driver existing for my kernel.

Code: Select all

$ sudo install-wifi

 *** Raspberry Pi wifi driver installer by MrEngman.
 *** Performing self-update
 *** Relaunching after update

 *** Raspberry Pi wifi driver installer by MrEngman.

Your current kernel revision = 4.19.42-v7+
Your current kernel build    = #1219

Checking for a wifi module to determine the driver to install.

Your wifi module is Bus 001 Device 004: ID 0e8d:7610 MediaTek Inc.

And it uses the mt7610 driver.

Checking for a mt7610 wifi driver module for your current kernel.
A driver does not yet exist for this update.
at the same time:

Code: Select all

$ dmesg | grep -i mt76
[    5.127479] mt76x0 1-1.2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[    5.128965] mt76x0 1-1.2:1.0: Direct firmware load for mediatek/mt7610u.bin failed with error -2
[    5.129589] mt76x0: probe of 1-1.2:1.0 failed with error -2
[    5.129776] usbcore: registered new interface driver mt76x0
And it doesn't show me the interface neither under

Code: Select all

sudo lshw -c network
nor under

Code: Select all

iwconfig
. I am having a Raspberry Pi running the latest Raspbian downloaded directly from the raspberry website.

MrEngman
Posts: 3838
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: USB wifi Dongle MediaTek - driver missing

Tue Jun 18, 2019 1:31 pm

filister wrote:
Sat Jun 15, 2019 10:28 am
So when I try to install the driver the install-wifi script shows me that there isn't a driver existing for my kernel.

Code: Select all

$ sudo install-wifi

 *** Raspberry Pi wifi driver installer by MrEngman.
 *** Performing self-update
 *** Relaunching after update

 *** Raspberry Pi wifi driver installer by MrEngman.

Your current kernel revision = 4.19.42-v7+
Your current kernel build    = #1219

Checking for a wifi module to determine the driver to install.

Your wifi module is Bus 001 Device 004: ID 0e8d:7610 MediaTek Inc.

And it uses the mt7610 driver.

Checking for a mt7610 wifi driver module for your current kernel.
A driver does not yet exist for this update.
at the same time:

Code: Select all

$ dmesg | grep -i mt76
[    5.127479] mt76x0 1-1.2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[    5.128965] mt76x0 1-1.2:1.0: Direct firmware load for mediatek/mt7610u.bin failed with error -2
[    5.129589] mt76x0: probe of 1-1.2:1.0 failed with error -2
[    5.129776] usbcore: registered new interface driver mt76x0
And it doesn't show me the interface neither under

Code: Select all

sudo lshw -c network
nor under

Code: Select all

iwconfig
. I am having a Raspberry Pi running the latest Raspbian downloaded directly from the raspberry website.
Apologies for the delay in responding.

The driver I have been compiling has serious problems with Raspbian kernel 4.19 causing it to crash and not allowing it to shutdown/reboot if it doesn't crash the kernel after booting so I am not compiling it at the moment as essentially it no longer works with the 4.19 kernel.

However, the newer versions of kernel 4.19.xx now include a built in version of the mt7610 driver, mt76x0 that you see in the grep output you posted, but it does not include the firmware it needs to run.

I had a hunt about for a firmware file and found a couple of different versions. The driver loaded OK with one of them but the driver does not work on the Pi.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

vajean
Posts: 2
Joined: Sat Aug 03, 2019 7:59 pm

Re: USB wifi Dongle MediaTek - driver missing

Sun Aug 04, 2019 2:17 am

Hi all,

I found a solution that worked for me. Let me know if it works for you too.

[ 5.128965] mt76x0 1-1.2:1.0: Direct firmware load for mediatek/mt7610u.bin failed with error -2
[ 5.129589] mt76x0: probe of 1-1.2:1.0 failed with error -2

You will have to copy the mt7610u.bin for somewhere and put it in /lib/firmware/mediatek
The source I found was at http://anduin.linuxfromscratch.org/sour ... /mediatek/, but I am sure there are other sources to be found by searching for mt7610u.bin

After copying the .bin file either use:

Code: Select all

sudo modprobe -r mt76x0
sudo modprobe mt76x0
or reboot the device.

After that, the wlan0 or wlan1 depending on your setup should show up when doing an

Code: Select all

iwconfig/ipconfig
.

Hope that works for others as it did for me.

Return to “Raspbian”