OpenWrt Forum Archive

Topic: countrycode setting on NanoStation5

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

We have some Ubiquity NanoStation5. With kamikaze 8.09 we must set this in /etc/modules.d/50-madwifi:

ath_ahb countrycode=203 outdoor=1

I try upgrade to 8.09.1 and I get error

ath_ahb: Unknown parameter `countrycode'
ath_ahb: Unknown parameter `outdoor'

In https://dev.openwrt.org/ticket/5316 is

Country code is now set via /etc/config/wireless. Add "option countrycode 724" to /etc/config/wireless, section "wifi-device".

But this not work for me. After some searching I found this line in /lib/wifi/madwifi.sh

echo "$country" > /proc/sys/dev/$device/countrycode

So solution for me (203 is Czech republic) is not set countrycode but country:

uci set wireless.wifi0.country=203                                                                                   
uci set wireless.wifi0.outdoor=1

And

sysctl dev.wifi0.countrycode

is now show the right value.

In documentation (http://kamikaze.openwrt.org/docs/openwrt.html) is

option country    us, uk, fr, de, etc.

but letter specification is not working for me, so is error in documenation?

This solution works also for me, I use a Wl-500gp v1 with Atheros CM9 and running also 8.09.1.

I set my country code (528, the Netherlands) and channel 12 en 13 became available.
Yesterday I tried to change the country code on 8.09 but it didn't worked.

Thanks for posting your findings!

how do I use uci?
in telnet?

i have found it out: /sbin/uci ;-)

works!
but why does the entries in the web-config do not apply?

The discussion might have continued from here.