Page 1 of 1

regulatory domain setting automatically reset when reboot

Posted: Mon Mar 04, 2013 8:56 am
by fallengt
Hi,
I own a buffalo wzr-hp-ag300h high power router and flashed 1.5.9 firmware to it. the Dmesg gave me this:
[ 24.210000] ath: EEPROM regdomain: 0x0
[ 24.210000] ath: EEPROM indicates default country code should be used
[ 24.210000] ath: doing EEPROM country->regdmn map search
[ 24.210000] ath: country maps to regdmn code: 0x3a
[ 24.210000] ath: Country alpha2 being used: US
[ 24.210000] ath: Regpair used: 0x3a
[ 24.220000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 24.220000] Registered led device: ath9k-phy1
[ 24.220000] Registered led device: buffalo:green:band5g
[ 24.220000] Registered led device: buffalo:green:router
[ 24.220000] Registered led device: buffalo:blue:movie_engine
[ 24.220000] Registered led device: buffalo:amber:band5g
[ 24.220000] ieee80211 phy1: Atheros AR9280 Rev:2 mem=0xb0010000, irq=41
[ 24.230000] cfg80211: Calling CRDA for country: US
[ 24.240000] cfg80211: Regulatory domain changed to country: US
[ 24.240000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gai n, max_eirp)
[ 24.250000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 27 00 mBm)
[ 24.260000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 17 00 mBm)
[ 24.270000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 20 00 mBm)
[ 24.270000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 20 00 mBm)
[ 24.280000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 20 00 mBm)
[ 24.290000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 30 00 mBm)
The default country code is US and Txpower is limit at 13dBm ( not sure why... but with factory DD-wrt firmware it's ~20 dBm peak 27).
I can manually set regulatory to other country (using iw reg set) and Txpower=27 but everytime the router reboot, it changes back to default setting... Is there any way to overide EEPROM settings?

Re: regulatory domain setting automatically reset when reboo

Posted: Mon Mar 04, 2013 3:49 pm
by BashfulBladder
See http://wiki.openwrt.org/doc/uci/wireless

uci makes persistent changes. Find your specific wireless using uci show wireless

Code: Select all

uci set (whateveryourwirelessis).country=DE (or whatever country)
uci set (whateveryourwirelessis).txpower=27
uci commit

wifi (or reboot)
And it should survive reboots.

Ignore the "Not supported for the mac80211 type yet (supported in trunk)" next to country. Its been in trunk for some time (gargoyle uses OpenWrt in the r35000 region:

https://dev.openwrt.org/log/trunk/packa ... ?rev=28387

Re: regulatory domain setting automatically reset when reboo

Posted: Tue Mar 05, 2013 3:14 am
by fallengt
It worked. Thanks

Re: regulatory domain setting automatically reset when reboo

Posted: Tue Mar 05, 2013 6:08 am
by fallengt
1 more question, my router have 2x2 antenna which settings should I try?
Using uci wireless.radio0.rxantenna=2, uci wireless.radio0.txantenna=2 is the correct command? or rxantenna=1x2 txantenna=1x2 ?

Re: regulatory domain setting automatically reset when reboo

Posted: Thu Mar 07, 2013 12:32 am
by BashfulBladder
Not having such a router, I imagine you address them:

Code: Select all

uci set wireless.radio0.rxantenna[0]=value
uci set wireless.radio0.txantenna[1]=value
uci commit
use 'uci show wireless' to check. Then enter 'wifi'.