Today I will show how to change the CRDA regulatory database to use all available channels and the full power of your wireless adapter.
First you need to download and extract the regdb sources:
curl http://linuxwireless.org/download/wireless-regdb/wireless-regdb-2011.04.28.tar.bz2|tar xfj - cd wireless-regdb-2011.04.28
Now edit the db.txt file. You will see rules for every country. The first (country 00) is the world default.
It looks like this:
country 00: (2402 - 2472 @ 40), (3, 20) # Channel 12 - 13. No HT40 channel fits here (2457 - 2482 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS # Channel 14. Only JP enables this and for 802.11b only (2474 - 2494 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS, NO-OFDM # Channel 36 - 48 (5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS # NB: 5260 MHz - 5700 MHz requies DFS # Channel 149 - 165 (5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
The definition of the rules are as follows:
(freq from – freq to @ kHz), (max antenna gain in dBm, max power in dBm), flags, …
To enable all possible channels and a maximum of 33 dBm (what is about 2000 mW) change the rules of any country you want to the following to rules:
(2402 - 2494 @ 40), (N/A, 33) (4910 - 5835 @ 40), (N/A, 33)
Let’s say you want to enable your new rules in the default country 00. Delete the old entry and add this code
country 00: (2402 - 2494 @ 40), (N/A, 33) (4910 - 5835 @ 40), (N/A, 33)
After you finished editing the database build the sources
make && make install
Everything should work fine. Build takes a few seconds.
But you have a problem now. The CRDA service doesn’t know this new build database so you have to recompile this tool and tell it the key of our new regdb.
cd .. curl http://linuxwireless.org/download/crda/crda-1.1.2.tar.bz2|tar xfj - cd crda-1.1.2
Copy the generated regdb public key to the CRDA sources:
cp ../wireless-regdb-2011.04.28/root.key.pub.pem pubkeys/linville.key.pub.pem
Finally build and install it.
make && make install
You are done now. At latest at a reboot the new values should be active.
Let’s do a short test:
# iw reg get country 00: (2402 - 2494 @ 36), (N/A, 36) (4910 - 5835 @ 36), (N/A, 36)
NOTE: The frequencies and power rates used in this article are not legal in most country’s! Don’t use them if you have no special permissions for it or adjust the values to your country regulatory.