Understanding WLAN1 and Radio1

I am fairly new to OpenWRT. I have successfully installed OpenWRT on a Raspberry Pi4.
I have it up an running well with an RT5370 Wireless adapter. I would Like to use my RTL8812AU 5G adapter.

ifconfig shows WLAN0 and WLAN1.
In /etc/config/wireless I have radio0 and radio1.

When I plug in my new wireless adapter (I did update the proper drivers) I get radio3 in my /etc/config/wireless but ifconfig shows WLAL1 and WLAN2... I do not get 0 1, and 2.... I tried reboot and sometimes I get WLAN0 and WLAN2... So I am not sure how these are managed and how can I configure them.?

Thanks,
C

  • Have you set it up, or are you saying something else is occurring too?
  • You sometimes get WLAN0 and WALN2 where (a display, you see the SSID on air, etc.)?

The Pi router is set up and working.
WLAN0 (i guess is Radio0) and is getting wifi from Starbucks. Radio1 is my USB Wifi Adapter (the old RT5370 2G) is providing my hotspot that I connect to.
That all works.

When I plug in my new USB Adapter (RTL8812AU 5G) it shows up as WLAN2 (and takes the place of one of the other Wireless devices in the ifconfig list.)... so instead of seing WLAN0, WLAN1, WLAN2.
I see WLAN0, WLAN2. Not sure why that is. The /etc/config/wireless shows all three radios. But I cant get radio3 to do anything. I figure something is misconfigured and there is no /etc/network folder in OpenWRT like in linux.

Does that help?

Make sure to keep the USB adapters plugged into the same physical ports on the Pi. If you move an adapter to a different USB port, it will be configured as a new radio, and the old wifi-device settings will not work with it.

You can edit /etc/config/wireless to delete radios which no longer exist and renumber the remaining ones.

2 Likes

I noticed that. Hmmmm. I did move the RT5370 2G when initially setting it up and it created a radio1... Then when I moved it - it created radio2... I just configured radio2 and left radio1 in there.... let me delete radio1 in the /etc/config/wireless and see if that does anything...

Is there a way or command to reset all the WLAN0, WLAN1, WLAN2... ?

You can also delete /etc/config/wireless and then reboot with the adapter(s) plugged in, this will generate a fresh default configuration. Of course you'll have to make new interfaces manually after that.

2 Likes

Oh interesting... Thats a good idea. Will that reset the WLAN0, WLAN1, WLAN2... ?

I still dont understand how WLAN0 relates to radio0 and where that is stored?

The wlanX-Y names are generated at runtime as each interface (AP, STA, mesh etc) is instantiated on a radio. The number X is typically the same as the radio number (as long as you have at least one interface on each radio), but Y will vary depending on the number of interfaces and the order they are created.

By using option network in /etc/config/wireless, each interface is connected to a definite network interface and functionality regardless of its wlan name. Do not refer to wlan names anywhere in the configuration.

2 Likes

Ok, interesting. So no real way to modify those?

I deleted radio1 then renamed radio2 to radio1. rebooted.
Now everything still working, but now radio1 is radio1 and is also wlan1.

I plug in new USB adapter, and reboot. It shows up as radio2, but under
ifconfig -a it shows up as wlan0 - uh oh... what does that mean?

Think of the wlan numbers as internal use.

You can force a particular name onto a wifi-iface with option ifname but that is generally not a good idea since it may conflict with an existing name.

1 Like

OK ( i think i understand) (and thank you)
ifconfig only shows wlan1 and wlan2 where they used to be wlan0 and wlan1 respectively.
ifconfig -a shows all the interfaces .
I used ifconfig wlan0 up and
The system froze. I reboot. gonna try and enable radio2 in /etc/config/wireless

and see what happens

ifconfig is deprecated. Use low-level tools like iw and ip for observation only. To actually start or stop something, use the UCI system-- edit the config file(s) and restart wifi or networking.

1 Like

Oh, thanks. I should have known that.
After deleting the /etc/config/wireless
I plugged in all the devices and rebooted. (actually had to power off and on).
The /etc/config/wireless now had all the devices accociated with the correct radios... But alass - could not get the RTL8812AU 5G USB adapter working. I think there is something with the driver and the USB 3.0 and the VHT not compatible. At least I figured out how to manipulate the Radios and the WLAN X-Ys thanks...