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.?
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.
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.
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.
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.
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.
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
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.
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...