Search code examples
wifiembedded-linuxwifimanager

to test channels for wifi access point other than UK channels


Problem-> I am wondering how would I test channels(WIFI) for mode a/b/g/n for countries other than GB.?


H/W -> WIFI sparklan WPEA110N
Chipset: Atheros AR9280
Interface: Mini PCI Express

Software ->
Linux fedora 11
Wifi Access Point utility -> hostapd


What I have done so far ->
1) I have changed the config file of hostapd_minimal.conf and changed the country code from GB to any other country for eg CN( CHINA) or US( USA).
2) I Have also tried to change the CRDA
ex-> iw reg set CN

Result of those changes ->
I have noticed that it successfully block channels that are not allowed in countries other than GB like for example in CHINA for mode a channels 36 is not allowed so result of hostapd turns false But it even doesnt allow the channels which are legally allowed in CHINA.

SUMMARY -> In short, if I change country from GB to any other country , the hostapd utility allows only common channels. for example 1) if I change country to US it will allow 36, 38 , 40 etc for mode a as these are the legal channels for both countries but doesnt allow channel 149 -165

Could some one please throw light on it.

Thanks and regards,
Sam


Solution

  •  Well  after couple of days of struggle . I have found  the solution.  Well  Remember this  is only for testing wireless inside  my house. Using of channels which are not authorised in a particular country  are illegal and can be prosecuted.
    
     To summarize what I did..( may be it wil be helpful for someone)
     Its 2 MAIN stEP PROCEDURE . 
         - First to MAKE CHANGES IN wireless-regdb and
         - Second with crda
    
     1)WIRELESS-REGDB
    
       1.a)Download wireless-regdb-2008.11.17.tar.bz2 package
       1.b) Untar it
       1.c) cd wireless-regdb-2008.11.17
       1.d) vi db.text and made changes what you have mentioned
       1.e) make
       This will create a public and priv key in my case its something like key.priv.pem
    
       1.f) copy the regulatory.bin to /usr/lib/crda/
            (create crda if does not exist)
    
       if you guys want to make changes in regulatory.bin after the make then
       i) edit db.txt and make reguire changes
       ii) compile it . ex ./db2bin.py regulatory.bin db.txt key.priv.pem
       iii) copy into /usr/lib/crda
    
              ****************** Now download and commpile crda*******
    
      2.a) Download Crda . I n my case its crda-1.1.2.tar.bz2
      2 .b) un tar it and cd into directory
      2.c) copy the public key from wireless-regdb into pubkeys directory
      example — cp bla bla/wireless_regdb-2008.11.17 blabla/crda-1.1.2/pubkeys
    
     2.d)make the file .. type “make”
     note — in my case I got hell lot of errors and dependency problem but google has                      helped me to solve it
     2.e make install
     2.f reboot the system.
    
     Important — modify frequency in db.txt of the country which your driver is requesting    from EEPROM of H/w.
     for example -> if your driver get counrty code as GB and you made changes for US , it   will not work.
    
     Best bet is to check what your country code is by typing “iw reg get ” command