Radio interface duplication with reboot, even with no change on Orange PI zero and Nano PI neo

Radio interface duplication with reboot even with no change on Orange PI zero and Nano PI neo since openwrt-24.10.0 and later. Openwrt-23.05.6 is ok.

Detail:

Package source : firmware-selector.openwrt.org

Wireless usb dongle: Edimax RTL8188CUS

Additionnal packages: nano-full kmod-rtl8192cu hostapd kmod-usb-net-cdc-ether usbutils kmod-usb-storage

Script:

uci -q batch << EOI

set network.lan.ipaddr='192.168.1.92'

set network.lan.gateway='192.168.1.1'

set network.lan.dns=8.8.8.8

commit network

set dhcp.lan.ignore=1

commit dhcp

EOI

Hardware tests :

Orange PI zero.

openwrt-23.05.6-353595c314dd-sunxi-cortexa7-xunlong_orangepi-zero-ext4-sdcard.img

OK. No duplication of wireless radio interface after four or more reboot.

openwrt-24.10.0-1bc99e7c5911-sunxi-cortexa7-xunlong_orangepi-zero-ext4-sdcard.img

First boot: same as 23.05.6

Manual reboot via LUCI:

No duplication.

Second manual reboot via LUCI:

A new radio1 apprears

Third manual reboot via LUCI:

The dongle has switched back to radio0 ...

And so on with next reboots. radio2 or 3 can be randomly set up with random dongle place.

same behavior with Nano PI Neo.

Same behavior or worse with releases after openwrt-24.10.0.

Up to now I didn't succeed to use the new 25.xx.x releases with Opi0 or NanoPi Neo.

I know that theses hardware are obsoletes but they seem to be convenient for my IOT beehives network.

Have you an advice to be able to use more current releases.

If you move a WiFi dongle to a different physical USB port, it is treated as a different radio because it now has a different hardware path. The script that runs at every boot will detect this "new" hardware and create a wifi-device in the /etc/config/wireless file. The old radio even though it no longer exists will not be removed.
This could also happen if a version change changes how the kernel driver enumerates the USB ports.

Thanks for this answer, the first strange issue comes from the fact that i just reboot after boot, without doing any hardware or configration modification. The second one is the fact that this behavior happens only with openwrt-24.10.0 release and after. Release openwrt-23.05.6 and before are working properly.
You may be right with in your assumption thant the version change changes how the kernel driver enumerates the USB ports. This change seems to lead a random ports affectation for the dongle in the Nano PI Neo or Orange PI zero.

A clunky but effective way around this problem.
Populate the file /etc/config/wireless with, at least 4 radios and you always get the good config.
By this way you can have a fully functional Orange Pi Zero router with wireless usb dongle + usb-to-ethernet dongle.

Tested with : openwrt-24.10.5-sunxi-cortexa7-xunlong_orangepi-zero-squashfs-sdcard.img.gz

Note that, according to your hardware (usb hub), you'll have to match with your USB addresses.

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
         option type 'mac80211'
         option path 'platform/soc/1c1b000.usb/usb1/1-1/1-1.4/1-1.4:1.0'
         option band '2g'
         option channel '1'
         option htmode 'HT20'
         option disabled '0'
         option country 'FR'

config wifi-iface 'default_radio0'
         option device 'radio0'
         option network 'lan'
         option mode 'ap'
         option ssid 'Opiz'
         option encryption 'psk2'
         option key 'MySuperPassW'

config wifi-device 'radio1'
         option type 'mac80211'
         option path 'platform/soc/1c1b000.usb/usb2/2-1/2-1.4/2-1.4:1.0'
         option band '2g'
         option channel '1'
         option htmode 'HT20'
         option disabled '0'
         option country 'FR'

config wifi-iface 'default_radio1'
         option device 'radio1'
         option network 'lan'
         option mode 'ap'
         option ssid 'Opiz'
         option encryption 'psk2'
         option key 'MySuperPassW'


config wifi-device 'radio2'
         option type 'mac80211'
         option path 'platform/soc/1c1b000.usb/usb3/3-1/3-1.4/3-1.4:1.0'
         option band '2g'
         option channel '1'
         option htmode 'HT20'
         option disabled '0'
         option country 'FR'

config wifi-iface 'default_radio2'
         option device 'radio2'
         option network 'lan'
         option mode 'ap'
         option ssid 'Opiz'
         option encryption 'psk2'
         option key 'MySuperPassW'

config wifi-device 'radio3'
         option type 'mac80211'
         option path 'platform/soc/1c1b000.usb/usb4/4-1/4-1.4/4-1.4:1.0'
         option band '2g'
         option channel '1'
         option htmode 'HT20'
         option disabled '0'
         option country 'FR'

config wifi-iface 'default_radio3'
         option device 'radio3'
         option network 'lan'
         option mode 'ap'
         option ssid 'Opiz'
         option encryption 'psk2'
         option key 'MySuperPassW'

Ready for my IOT network.

To complete again : for my Nano Pi Neo the usb adress is 1c1d000 instead of 1c1b000.
for example (router configuration without hub and with RTL8189CUS dongle) :

option path 'platform/soc/1c1d000.usb/usb1/1-1/1-1:1.0'

Note that before the "option" lines, you must use a tab, not spaces.

Ref firmware : openwrt-24.10.5-f6a6d1dc6452-sunxi-cortexa7-friendlyarm_nanopi-neo-squashfs-sdcard.img.gz

Have multiple config files for wireless covering all addresses, detect address, copy correct file, restart wifi ?

The description above, must be used as principle. The best way is to start your Orange pi zero or Nano Pi Neo with the suitable firmware. Install the dongle driver and start wifi. After check the /etc/config/wireless file to control if the usb address has the same parameters before create all the radios.