OpenWrt Forum Archive

Topic: Country code setting ...

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

Hi.
I noticed that, by default, Openwrt's configuration for wireless interface is set to use only 11 channels insted of 13 . I live in a country where there are ch. 1-13 available .
On my desktop computer, the setting is under /etc/modprobe.d/madwifi file.
It's something like this : options ath_pci countrycode=xxx
Does anybody knows how to do that on Kamikaze ?

Thanks.

Thanks for your answer.
I see there's an option using openwrt's wireless scripts.
But I need to set this option manually, without using the scripts inside... (maybe some "iwpriv" command ?.. ) . Do you know how to do that ?


Edit :
I tried changing in the config file :

root@OpenWrt:/etc/config# cat wireless
config wifi-device      wifi0
        option type     atheros
        option country  de
        option channel  1-13
        option mode     11b

config wifi-iface
        option device   wifi0
#       option network  lan
        option mode     sta
        option ssid     test

Results after reboot :

root@OpenWrt:/# wlanconfig ath0 list chans
Channel   1 : 2412  Mhz 11g          Channel   7 : 2442  Mhz 11g
Channel   2 : 2417  Mhz 11g          Channel   8 : 2447  Mhz 11g
Channel   3 : 2422  Mhz 11g          Channel   9 : 2452  Mhz 11g
Channel   4 : 2427  Mhz 11g          Channel  10 : 2457  Mhz 11g
Channel   5 : 2432  Mhz 11g          Channel  11 : 2462  Mhz 11g
Channel   6 : 2437  Mhz 11g

I think it doesn't work . Still 1-11 channels only ...

(Last edited by mandylion on 12 Aug 2007, 13:40)

Anyone ? Please .. ?

It doesn't connect to an Ap on channel 12 or 13 nor does it sees it .
Did you manage to have 13 channels (on Fonera) ?

Modify your /etc/modules.d/50-madwifi to include the countrycode parameter:

ath_ahb countrycode=<the iso3166 number of your country>

according to MadWifi CountryCode.
You will get this:

root@FonWrt:/# iwlist ath0 channel
ath0      26 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Current Frequency=2.472 GHz (Channel 13)

Great answer. Thanks alot ! Solved my problem .
You're the man ! ;D

The discussion might have continued from here.