I got one of these Dual-Band USB WiFi Adapter for Raspberry Pi (5GHz/2.4GHz MT7612U) | The Pi Hut to hopefully get better wifi performance, as I’m occasionally seeing hiccups with the Pi built in wifi. When I plug it in, I can see in dmesg that it’s recognized as a USB device (and a storage device, as it appears to provide a small volume with Windows drivers), but I don’t see how to configure OSMC to use it as a network interface. Any suggestions? Thanks!
I dont know if we have any support for MT7612U chipsets at this time. A log would confirm if there’s a match on the VID/PID and a module is loaded
You would also want to disable the internal WiFi adapter.
The internal adapter should be adequate for playback on newer Pis. As you don’t specify which model of Pi you have and in turn the version of OSMC you are running it’s hard to advise
Good point, that was a pretty lackluster question on details. Let me try again…
It’s a Pi 4 on OSMC 2024.10-1. The Pi is in an aluminum case, which helps with heat management, but is of course pretty bad for wifi, and unfortunately the Ethernet cable to that location was damaged during construction, so I’m stuck with wifi. Local speed tests show I’m getting about 70Mbit over wifi, which should be enough for smooth playback, but apparently is not, as I do get stuck buffering for a while now and then.
dmesg when plugging it in:
[138514.592738] usb 1-1.2: new high-speed USB device number 3 using xhci_hcd
[138514.693712] usb 1-1.2: New USB device found, idVendor=0e8d, idProduct=2870, bcdDevice= 0.01
[138514.693731] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[138514.693737] usb 1-1.2: Product: Љ
[138514.693743] usb 1-1.2: Manufacturer: Љ
[138514.693748] usb 1-1.2: SerialNumber: Љ
[138514.695749] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[138514.696181] scsi host0: usb-storage 1-1.2:1.0
[138515.705409] scsi 0:0:0:0: CD-ROM MediaTek Flash autorun 0.01 PQ: 0 ANSI: 0 CCS
[138515.716119] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[138515.724247] sr 0:0:0:0: [sr0] scsi3-mmc drive: 52x/52x cd/rw xa/form2 cdda tray
[138515.724272] cdrom: Uniform CD-ROM driver Revision: 3.20
[138515.727328] sr 0:0:0:0: Attached scsi CD-ROM sr0
[138518.408838] ISO 9660 Extensions: Microsoft Joliet Level 3
[138518.413830] ISOFS: changing to secondary root
Is there another log you’d like to see? /usr/lib/modules/5.15.92-1-osmc/kernel/drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2u.ko
exists but it doesn’t appear to have been loaded (per lsmod
).
Doesn’t appear to be supported. Probably will be in the next kernel.
I see. Any idea what the timeline is for that?
Not at this time.
Actually, your log shows that this dongle is currently in USB emulated CD-ROM status. Therefore, the system won’t recognize it 802.11x device.
You could refer to the man page of usb_modeswtich
to learn how to switch to it to wifi mode.
Hope this helps.
Thanks! apt install usb-modeswitch
installed udev rules that got some progress:
[733748.976730] usb 1-1.2: USB disconnect, device number 4
[733751.273254] usb 1-1.2: new high-speed USB device number 5 using xhci_hcd
[733751.374247] usb 1-1.2: New USB device found, idVendor=0e8d, idProduct=2870, bcdDevice= 0.01
[733751.374265] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[733751.374273] usb 1-1.2: Product: Љ
[733751.374278] usb 1-1.2: Manufacturer: Љ
[733751.374283] usb 1-1.2: SerialNumber: Љ
[733751.377678] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[733751.379679] scsi host0: usb-storage 1-1.2:1.0
[733752.219253] usb 1-1.2: USB disconnect, device number 5
[733752.805564] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[733752.827028] usb 2-2: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
[733752.827047] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[733752.827053] usb 2-2: Product: 802.11ac WLAN
[733752.827059] usb 2-2: Manufacturer: MediaTek Inc.
[733752.827064] usb 2-2: SerialNumber: 000000000
[733752.966118] usb 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
[733752.991736] mt76x2u 2-2:1.0: ASIC revision: 76120044
[733753.024942] mt76x2u 2-2:1.0: Direct firmware load for mt7662_rom_patch.bin failed with error -2
[733753.669832] mt76x2u: probe of 2-2:1.0 failed with error -2
So, now it’s recognized with the right driver at least.
Looks like you need to grab mt7662_rom_patch.bin and put it in /lib/firmware and it should work.
firmware-misc-nonfree
has that file, but unfortunately, /lib/firmware/mediatek/mt7610u.bin
is provided by base-files-osmc
, which therefore conflicts with firmware-misc-nonfree
. base-files-osmc
only provides that one firmware file. Would it not make sense to just include firmware-misc-nonfree
in the base OS instead? It’s only a few MiB.
It didn’t match the kernel (still doesn’t) and had some missing files.
You can just take it out the package and include it.
Those few add up…
I hear ya, I fight for kilobytes at work – but these days a 32G SD card is almost free.
If future OS versions include mt7610u.bin
, how will me placing the file there manually affect the upgrade process?
For posterity, here’s dmesg after adding mt7662_rom_patch.bin
and mt7662.bin
:
[744398.776081] usb 2-2: USB disconnect, device number 3
[744400.451945] usb 1-1.2: new high-speed USB device number 7 using xhci_hcd
[744400.553395] usb 1-1.2: New USB device found, idVendor=0e8d, idProduct=2870, bcdDevice= 0.01
[744400.553426] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[744400.553440] usb 1-1.2: Product: Љ
[744400.553452] usb 1-1.2: Manufacturer: Љ
[744400.553462] usb 1-1.2: SerialNumber: Љ
[744400.556979] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[744400.557474] scsi host0: usb-storage 1-1.2:1.0
[744401.398499] usb 1-1.2: USB disconnect, device number 7
[744401.960252] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
[744401.981803] usb 2-2: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
[744401.981823] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[744401.981829] usb 2-2: Product: 802.11ac WLAN
[744401.981835] usb 2-2: Manufacturer: MediaTek Inc.
[744401.981840] usb 2-2: SerialNumber: 000000000
[744402.116811] usb 2-2: reset SuperSpeed USB device number 4 using xhci_hcd
[744402.142554] mt76x2u 2-2:1.0: ASIC revision: 76120044
[744402.176692] mt76x2u 2-2:1.0: ROM patch build: 20141115060606a
[744402.328978] mt76x2u 2-2:1.0: Firmware Version: 0.0.00
[744402.328997] mt76x2u 2-2:1.0: Build: 1
[744402.329002] mt76x2u 2-2:1.0: Build Time: 201507311614____
[744403.127377] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
We will just overwrite it – but you could replace it again if necessary.
After some fiddling with network settings via the OSMC UI, testing of the dongle is unimpressive. At its best, it’s about 2x the speed (>100Mbit), but it’s less consistent, dropping down to single digits occasionally. So, after all that, I guess back to internal wifi.
Dear @smilax,
I’ve tried to install the driver (on OSMC 2024.10-1) but the firmware-misc-nonfree
package conflicts the one from osmc repo as you mentioned. So I tried to install mt7662_rom_patch.bin
and mt7662.bin
from several sources but none of them worked for me. I see the usual “mt76x2u: probe of 2-1:1.0 failed with error -2” error message on dmseg
output.
So could you please link the source of these two firmware files which worked for you?
Thanks!
I just extracted the files from the archive for firmware-misc-nonfree
.