I thought I'd share this for anyone else with using an Alfa AWUS036NHA. This is by far my all-around favorite Alfa adapter, and one of the greatest features is the ability to set transmission power to 33 dBm, which is roughly ~2,000mW.
By default, a maximum of 30dBm can be achieved by registering the device to a supporting country, such as 'iw reg set BO'. Attempting to set the tx-power above 30dBm will fail unless the wireless regulatory binary is modified and rebuilt.
Note that this will only work with wireless adapters that support a tx-power of 33dBm (2,000 mW).Let's get to it.
cd /tmpDownload CRDA & Wireless Regulation DB
wget http://wireless.kernel.org/download/crda/crda-1.1.3.tar.bz2 [nofollow]
wget https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2014.10.07.tar.gz [nofollow]Extract Files
tar jxvf crda-1.1.3.tar.bz2
tar zxvf wireless-regdb-2014.10.07.tar.gzModify the regulatory database (db.txt)
cd wireless-regdb-2014.10.07
nano db.txtYou will see a list of
country codes followed by
wireless frequency ranges and the
maximum tx-power. In the following example, GB is the country, and 20 is equal to 20dBm. You can use the command 'iw reg get' to find which country code your wireless adapter is set to.
root@0x00:/# iw reg get
country GB:Now modify the country your wireless adapter is coded to like so:
Original:
country GB: DFS-ETSI
(2402 - 2482 @ 40), (20)
(5170 - 5250 @ 80), (20)
(5250 - 5330 @ 80), (20), DFS
(5490 - 5710 @ 80), (27), DFS
# 60 gHz band channels 1-4, ref: Etsi En 302 567
(57240 - 65880 @ 2160), (40), NO-OUTDOORModified:
country GB: DFS-ETSI
(2402 - 2482 @ 40), (33)
(5170 - 5250 @ 80), (33)
(5250 - 5330 @ 80), (33), DFS
(5490 - 5710 @ 80), (33), DFS
# 60 gHz band channels 1-4, ref: Etsi En 302 567
(57240 - 65880 @ 2160), (40), NO-OUTDOORI also modified the global configuration (country code 00) along with GB to 33dBm. Save the file after modifications.
Build the regulatory database:
makeMake /usr/lib/crda and copy files over
mkdir /usr/lib/crda
cp -avr /lib/crda /usr/lib/crda
cp regulatory.bin /usr/lib/crda/regulatory.binCopy keys over to the /crda-1.3.3/pubkeys directory
cp *.pem ../crda-1.1.3/pubkeys/
cd ../crda-1.1.3Make && make install
make
make installReboot
rebootAnd the result..
[nofollow]