I purchased an Alfa AWUS036H a few months ago and it came with the “high power” (5dBi) antenna.   After plugging in a booting into Backtrack 4 (r2 at time of writing). I found that by default it is only operating at 10% power.

To determine if it is, simply take a peek at iwconfig for the alfa.
root@bt:/# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wlan0     IEEE 802.11bg  ESSID:off/any
Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
Retry  long limit:7   RTS thr:off   Fragment thr:off
Encryption key:off
Power Management:off

20 dBM = 100 MillWatts according to this calculator.

To increase power and get the advertised 1000mW perform the following steps.
Note: This process works in a Virtual Machine OR on a physical machine.

1. Diable the adapter

2. set the power (by changing the region code to alter the TX/RX power levels to work at the appropriate power levels for your country. ) Note: be sure you choose YOUR country. The below is a warning from the aircrack-ng page regarding these changes.

Be sure to use this guide to set your CORRECT Country Regulatory Domain.

Setting the wrong Reg Domain could probably break the Law in your Country.

3. Enable the adapter

4. Check it!

Process below:

root@bt:/# ifconfig wlan0 down
root@bt:/# iw reg set US
root@bt:/# airmon-ng start wlan0

Interface       Chipset         Driver
wlan0           RTL8187         rtl8187 – [phy5]
(monitor mode enabled on mon0)

root@bt:/# iwconfig wlan0

wlan0     IEEE 802.11bg  ESSID:off/any
Mode:Managed  Access Point: Not-Associated   Tx-Power=30 dBm
Retry  long limit:7   RTS thr:off   Fragment thr:off
Encryption key:off
Power Management:off

If you head back to the dBm to mW calculator it will tell you that 30dBm  1000 mW.  Success.

I can not take credit for the above, I simply put it here for my own notes to reference in the future.  For more information and further reading check out the aircrack-ng forums.

Update: You will have to perform these steps each time you power on your VM or physical device.  You can toss the below script in your init.d dir so you wont need to remember.  Again, not my work, just placing here for quick reference.

#!/bin/bash
##iw reg set <your-country-code>
iw reg set <insert-your-country-code-here-in-CAPITAL-LETERS>All country codes are in ‘CAPITAL LETTERS’

save & close text editer

then put it in the /etc/init.d/ directory.

So in a terminal enter
sudo cp ~/Desktop/setwirelesscountrycode.sh /etc/init.d/
Then make the file you created executable.e.g.
sudo chmod +x /etc/init.d/setwirelesscountrycode.sh To set it to run on startup
sudo update-rc.d /etc/init.d/setwirelesscountrycode.sh defaults note ‘defaults’ puts a link to start ‘/etc/init.d/setwirelesscountrycode.sh’ in run levels 2, 3, 4 and 5. and puts a link to stop ‘/etc/init.d/setwirelesscountrycode.sh’ into run levels 0, 1 and 6.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
_ _ _ | | | | | | | |______| | __ _ _ __| | _____ _ __ ___ ___ _ __ ___ | |______| |/ _` |/ __| |/ / _ \ '__/ __/ _ \ | '_ ` _ \ | | | | (_| | (__| < __/ | | (_| (_) | | | | | | |_| |_|\__,_|\___|_|\_\___|_| (_)___\___/|_| |_| |_| Suffusion theme by Sayontan Sinha