I've a Gl.Inet ar150 [Atheros] AR9331 WiSoC with a second radio usb dongle [Atheros AR9271] connected through an usb hub.
I've compiled openwrt with Luci and essential drivers.
I have problems changing regulatory wifi settings for both the radios.
I am changing them with luci interface or trying by using iw reg set but in no way I am able to change them
so I am loosing channel 13 on the mobo radio.
Funny thing is that the usb dongle shows channels 12-13 as active (iw reg set tells me CN china I believe)while the mobo radio seems to be configured (iw reg get, iw list) as US radio without channel 11 and 13 ?
Using Gl.Inet proprietary binary (the latest 2.64 or similar)without the dongle attached I am able to change the motherboard radio settings up to japan setting with even channel 14 enabled ??
Any clue ? Could be the presence of 2 different wifi interfaces a problem ? Any idea is suggestion is very welcome I'll try my bests (I am kind of new to openwrt thought ) !
Have you tried just using the UCI configuration of country without any manual commands?
Edit: I just checked on my Archer C7 v2 by temporarily changing the country code in /etc/config/wireless. After executing wifi to restart the wireless, the output of iw phy changed as expected to allow use of non-US frequencies.
I think I am missing something in the reg get process.
Both the interfaces are set as DE into /etc/config/wireless
But one of them keep having channel 13 disabled.
More interesting when starting the router alone (no usb wifi dongle), I am able to change the reg setting, actually the router boots up with the right country configuration moreover if I do a scan by Luci I pick up channel 13,when using iw reg get both global and phy0 show the DE (right) country and iw phy0 info show channel 13 as enabled.
If a attach the dongle to the router and then enable the wifi dongle by Luci I get channel 13 on this one too but suddently iw reg get gives me global country as DE; phy1 the, second dongle, country DE; but the router wifi phy0 shoes up as country US neverthless both phy1 and phy0 have channel 13 enable.
At this point /var/run/hostapd-phy*.confand/or/var/run/wpa_supplicant-*.conf` show the DE country
As soon as I reboot everything with the dongle attached the country global settings goes to 98 and both the dongles revert to different country regulatory codes and for me its impossible to change them.
At this point /var/run/hostapd-phy*.confand/or/var/run/wpa_supplicant-*.conf` show the DE country
So the question is how to avoid having to remove and replug the second wifi dongle everytime I start the router ? Any init.d uci setting I should try to change ? please help !
Until you get it "worked out", I'd only modify the settings by editing the UCI files in /etc/config and executing wifi and/or /etc/init.d/network restart -- LuCI might be rewriting things for you in ways that you might not expect or want. Installing nano is helpful if you're not a vi user.
iw dev <wlanX-Y> station dump and iw dev <wlanX-Y> scan are a couple command-line tools that might useful.