MT7612U USB WiFi, which driver(s)

Hi,

I’m currently running OpenWrt 24.10 on a NanoPi R5S and have plugged a NetGear A6210 USB WiFi dongle into one of its USB3 ports. I have installed kmod-usb-core, kmod-usb3 and usbutils and the result of lsusb shows a device called NETGEAR A6210.

I’m hoping someone can answer what else is required to enable this device. I have read the MT7612 should be already supported, but I don’t have a Network > Wireless option. There are also drivers in opkg for MT76x devices, the most appropriate appearing to be kmod-mt76x2ubut there is also a more generic kmod-mt76 driver (among others), so I’m not sure if any of these are what I need, or if I’m missing something else. The Wiki for USB seems specific to storage devices.

My reason for wanting to install this USB WiFi adapter, is as a Plan B in case I lock myself out of OpenWrt (VLANs), which has sadly happened before :grimacing: . Day-to-day WiFi is handled by seperate APs. Somewhat related then, is what happens if I unplug/replug the WiFi adapter? What I would like to happen, is that I can unplug the adapter to remove an attack surface when not required, but be able to plug it in and have it immediately start working if ethernet becomes unavailable. Is this possible/default behaviour?

So I found this

https://forum.openwrt.org/t/add-wireless-devices-to-x86-openwrt-install/114008/9

from 2021 which implied I needed hostapd in addition to the driver. I decided to try installing kmod-mt776x2u and hostapd, which resulted in the appearance of Network > Wireless (after a reboot).

I have tried configuring a 2.4Ghz or 5Ghz access point, but my client (a recent Samsung phone) won’t stay connected. In the log, I see

Mon Feb 23 18:43:04 2026 daemon.info hostapd: phy0-ap0: STA AA:BB:CC:DD:EE:FF IEEE 802.11: authenticated
Mon Feb 23 18:43:12 2026 daemon.notice hostapd: handle_assoc_cb: STA AA:BB:CC:DD:EE:FF not found
Mon Feb 23 18:43:16 2026 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan.23) 192.168.23.155 AA:BB:CC:DD:EE:FF
Mon Feb 23 18:43:16 2026 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan.23) 192.168.23.155 AA:BB:CC:DD:EE:FF User-s-A350

and then it just disconnects with no additional log entry.

That post from 2021 also mentions wpad-openssl, but it’s for installation on x86. Is openssl the best option for me on RK3568, or should I be using mbedtls or wolfssl? Is the missing wpadthe problem?

EDIT: Well, I just tried installing wpad-basic-wolfssl,wpad-wolfssl, hostapd-basic-wolfssl and hostapd-wolfssl and was denied becuase hostapd is installed. Arrgghhh :grimacing:

Well I did get this to work…..kinda

After finding this page

https://openwrt.org/docs/guide-user/network/wifi/wireless-tool/wireless.utilities

which suggested wpad replaces hostapd(author seems unsure however), I removed hostapdwhich allowed me to install wpad-basic-wolfssl.This resulted in a connection that I could actually use, at least sorta.

I did some digging and although morrownr recommends the device from the point of view of Linux support, they do not recommend using it for AP mode due to limited range owing to the design. It may still suffice for my needs (as a get out of jail card), but I have decided to wait for 25 stable before trying any further in the hope of a more stable experience with kernel 6.12.

I noticed that I might have been having problems due to my phone spoofing the MAC. In the log extract above, I hadn’t noticed earlier that the MAC changed after the first 2 entries (after that handle_assoc_cb STA not found entry). It also appears to be important to fix a channel, rather than leaving it set to auto. There are log entries for 2.4Ghz frequencies missing noise floor and other entries that seemed tangentially related to that but which are now lost after a reboot (failed to set beacon parameters or something similar).

I’m not sure how a properly integrated WiFi stack in OpenWrt handles channel management etc. Perhaps I am still missing some esoterica related to that.

Will hope for an easier experience on the newer kernel which would appear to be any day now.
Maybe the answer is to bite the bullet and buy an Alfa adapter, but will try 25.12 first.

Would still welcome any conjecture or details of how to properly add support for WiFi in OpenWrt, to a device that didn’t originally ship with the capability.

EDIT: I booted another OpenWrt device that has 25.12.0-RC5 and that uses wpad-basic-mbedtls, so I removed wpad-basic-wolfssl on the NanoPi R5S and installed wpad-basic-mbedtls. This apperas to have resolved quite a few issues, including needing to choose a channel rather than leaving it set to auto.

However, unplugging and replugging the USB adapter doesn’t restore the AP, so presently, it isn’t a working solution for occasional get-you-out-of-trouble use, unless permanently connected (which I wanted to avoid). When replugged, the device number is incremented by 1

kern.info kernel: [  530.819146] usb 8-1: USB disconnect, device number 3
kern.info kernel: [  543.815966] usb 8-1: new SuperSpeed USB device number 4 using xhci-hcd

Not sure how to handle that.

Also noticed this FWIW

Mon Feb 23 20:58:55 2026 daemon.notice netifd: radio0 (4848): Reference error: left-hand side expression is null
Mon Feb 23 20:58:55 2026 daemon.notice netifd: radio0 (4848): In /usr/share/hostap/wdev.uc, line 177, byte 14:
Mon Feb 23 20:58:55 2026 daemon.notice netifd: radio0 (4848):
Mon Feb 23 20:58:55 2026 daemon.notice netifd: radio0 (4848):  `phy = phydev.phy;`
Mon Feb 23 20:58:55 2026 daemon.notice netifd: radio0 (4848):   Near here ---^

Does anyone know of a way to preserve a USB device number when unplugging/replugging? (or to release the device number when unplugged so it is free for re-use?)

According to documentation, you can also map wireless instances to MAC addresses and physical adapter, but you need to edit the config file, LuCi does not know these other 2 options.

Mapping to MAC addresses does not work, but mapping to phyX works:

And in case you have multiple phy-devices that randomly change order after reboots, you need a rename acript, like Stable network interface names for USB Ethernet Dongles - #18 by bobafetthotmail

Thank you very much for your helpful reply.

I tried making /etc/config/wireless be this:

config wifi-device 'radio0'
    option type '80211'
    option phy 'phy0'
    option band '2g'
    option channel 'auto'
    option htmode 'HT20'
    option cell_density '0'
    option country 'GB'

config wifi-iface 'default_radio0'
    option device 'radio0'
    option network 'lan Infra'
    option mode 'ap'
    option ssid 'MGMT'
    option encryption 'sae-mixed'
    option key 'blahblahblah'
    option ocv  '0'

config wifi-device 'radio1'
    option type '80211'
    option phy 'phy0'
    option band '5g'
    option channel '36'
    option htmode 'VHT80'
    option cell_density '0'
    option country 'GB'

config wifi-iface 'default_radio1'
    option device 'radio1'
    option network 'lan Infra'
    option mode 'ap'
    option ssid 'MGMT'
    option encryption 'sae-mixed'
    option key 'blahblahblah'
    option ocv  '0'

I trhen unplugged and replugged the dongle to the same USB3 port and observerd the following in the system log:

Wed Feb 25 16:43:28 2026 kern.info kernel: [  180.272175] usb 8-1: USB disconnect, device number 2
Wed Feb 25 16:43:28 2026 kern.info kernel: [  180.388978] br-lan: port 3(phy0-ap0) entered disabled state
Wed Feb 25 16:43:28 2026 kern.info kernel: [  180.392580] mt76x2u 8-1:1.0 phy0-ap0 (unregistering): left allmulticast mode
Wed Feb 25 16:43:28 2026 kern.info kernel: [  180.393215] mt76x2u 8-1:1.0 phy0-ap0 (unregistering): left promiscuous mode
Wed Feb 25 16:43:28 2026 kern.info kernel: [  180.393830] br-lan: port 3(phy0-ap0) entered disabled state
Wed Feb 25 16:43:28 2026 daemon.notice hostapd: phy0-ap0: AP-STA-DISCONNECTED ea:f1:0d:6f:19:96
Wed Feb 25 16:43:28 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:43:28 2026 daemon.notice hostapd: phy0-ap0: INTERFACE-DISABLED
Wed Feb 25 16:43:28 2026 daemon.notice netifd: Network device 'phy0-ap0' link is down
Wed Feb 25 16:43:30 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:43:36 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:43:41 2026 kern.info kernel: [  193.788594] usb 8-1: new SuperSpeed USB device number 3 using xhci-hcd
Wed Feb 25 16:43:41 2026 kern.info kernel: [  193.968970] usb 8-1: reset SuperSpeed USB device number 3 using xhci-hcd
Wed Feb 25 16:43:41 2026 kern.info kernel: [  194.001706] mt76x2u 8-1:1.0: ASIC revision: 76120044
Wed Feb 25 16:43:41 2026 kern.info kernel: [  194.036339] mt76x2u 8-1:1.0: ROM patch build: 20141115060606a
Wed Feb 25 16:43:42 2026 kern.info kernel: [  194.200114] mt76x2u 8-1:1.0: Firmware Version: 0.0.00
Wed Feb 25 16:43:42 2026 kern.info kernel: [  194.200616] mt76x2u 8-1:1.0: Build: 1
Wed Feb 25 16:43:42 2026 kern.info kernel: [  194.200958] mt76x2u 8-1:1.0: Build Time: 201607111443____
Wed Feb 25 16:43:42 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:43:43 2026 kern.debug kernel: [  195.101954] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
Wed Feb 25 16:43:48 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:43:54 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:00 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:06 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:12 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:18 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:24 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:30 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:36 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:42 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:48 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:44:54 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:00 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:06 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:12 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:18 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:24 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:30 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:36 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:42 2026 daemon.err hostapd: Failed to set beacon parameters
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: Set new config for phy phy0:
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: Remove interface 'phy0'
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: phy0-ap0: interface state ENABLED->DISABLED
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: phy0-ap0: AP-DISABLED
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: phy0-ap0: CTRL-EVENT-TERMINATING
Wed Feb 25 16:45:46 2026 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: nl80211: deinit ifname=phy0-ap0 disabled_11b_rates=0
Wed Feb 25 16:45:46 2026 daemon.notice hostapd: nl80211: Failed to remove interface phy0-ap0 from bridge br-lan: No such device
Wed Feb 25 16:45:46 2026 daemon.err hostapd: Could not read interface phy0-ap0 flags: No such device
Wed Feb 25 16:45:46 2026 daemon.notice wpa_supplicant[1045]: Set new config for phy phy0
Wed Feb 25 16:45:46 2026 daemon.notice wpa_supplicant[1045]: Could not open phy phy0
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942): Reference error: left-hand side expression is null
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942): In /usr/share/hostap/wdev.uc, line 177, byte 14:
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942):
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942):  `phy = phydev.phy;`
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942):   Near here ---^
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942):
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3942):
Wed Feb 25 16:45:46 2026 daemon.notice netifd: Wireless device 'radio0' is now down
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3956): WARNING: Variable 'data' does not exist or is not an array/object
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3956): WARNING: Variable 'phy0' does not exist or is not an array/object
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3956): Could not find PHY for device 'radio0'
Wed Feb 25 16:45:46 2026 daemon.notice netifd: Wireless device 'radio0' set retry=0
Wed Feb 25 16:45:46 2026 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3963): WARNING: Variable 'data' does not exist or is not an array/object
Wed Feb 25 16:45:46 2026 daemon.notice netifd: radio0 (3963): Bug: PHY is undefined for device 'radio0'
Wed Feb 25 16:45:46 2026 daemon.notice netifd: Wireless device 'radio0' is now down
Wed Feb 25 16:45:51 2026 daemon.notice hostapd: Set new config for phy phy0:
Wed Feb 25 16:45:51 2026 daemon.notice wpa_supplicant[1045]: Set new config for phy phy0
Wed Feb 25 16:45:51 2026 daemon.notice wpa_supplicant[1045]: Could not open phy phy0
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970): Reference error: left-hand side expression is null
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970): In /usr/share/hostap/wdev.uc, line 177, byte 14:
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970):
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970):  `phy = phydev.phy;`
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970):   Near here ---^
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970):
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3970):
Wed Feb 25 16:45:51 2026 daemon.notice netifd: Wireless device 'radio1' is now down
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3982): WARNING: Variable 'data' does not exist or is not an array/object
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3982): WARNING: Variable 'phy0' does not exist or is not an array/object
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3982): Could not find PHY for device 'radio1'
Wed Feb 25 16:45:51 2026 daemon.notice netifd: Wireless device 'radio1' set retry=0
Wed Feb 25 16:45:51 2026 daemon.crit netifd: Wireless device 'radio1' setup failed, retry=0
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3989): WARNING: Variable 'data' does not exist or is not an array/object
Wed Feb 25 16:45:51 2026 daemon.notice netifd: radio1 (3989): Bug: PHY is undefined for device 'radio1'
Wed Feb 25 16:45:51 2026 daemon.notice netifd: Wireless device 'radio1' is now down

iw phyconfirms it is now phy1 not phy0

Regardless of whether I unplug/replug or reboot, the phy changes :confused:

OpenWrt goes ahead and creates a radio2

Am I doing something wrong/did I miss something?

Yeah, that is a known sucking part.

OpenWRT out of the box is so far not preconfigured for the plug and play Wifi dongle experience of IoT and mini PC boards, due to lack of devs. 99% of users use OpenWRT on off-the-shelf Wifi routers, this is where most devs are active.

You can achieve this with the mentioned auto rename script, but it is time and effort consuming custom scripting.

Gah, thanks for trying to help.

I think what I’ll do is plug in the dongle and make sure it’s working before I try and make any changes that could possibly lock me out of the ethernets. That way it’s reliable and I can be sure of the wifi working to get me out of trouble. Wish there was HDMI support for this device.

Are you saying the console display isn't working?

Are you saying it should? :slight_smile:

When I got locked out from the network, I hooked it up to HDMI and got no output, even during a reset/boot.
I haven’t tried since, I must admit it is possible that it had completely crashed, but it felt like it was working but inaccessible.

Later on I will try checking HDMI if you think there should be output

Yes, that's why I mentioned it. You're the first user I've encountered that mentioned the display isn't working. To be clear, it'll be a text display, not graphical.

It may also help to connect your keyboard.

Just connected a monitor (it’s an older one, so HDMI to DVI) and there’s no console output. I tried a reboot to see if I could see anything at boot time, but nothing.

When I was troubleshooting before, I was using a monitor with an HDMI input.

EDIT: not sure if relevant, but I don’t get NumLock control of a USB keyboard either