With the introduction of new drivers Stacks mac80211, unlike previous ieee80211, the TX-Power is adjusted/set automatically by CRDA.
Therefore is not longer possible to use the ALFA-AWUS036H USB wireless adapter (chipset Realtek RTL8187L) with all his power for Wireless connections or during Wardriving.
By analyzing the structure of new configuration of mac80211 files and "udev" recall to the Linux Kernel, we can circumvent the obstacle by adjusting the strength of TX-Power of our Wireless card acting on the CRDA. (Central Regulatory Domain Agent)
Remember, that modification of CRDA, not only affects the settings of the maximum usable/permit power (dBm), but also setup the channels of frequencies/band allocated for the Wireless trasmission, which are set globally and for each Country by specific Laws Regulations, so make sure not to violate the Laws of your Country using frequencies or tx-powers not allowed.
After this brief introducion, we see how to permit the full output power of your wireless card, opting for either of these two solutions.
- The creation and editing of the following files must be done carefully.
- Tested on Ubuntu Jaunty - Kernel 2.6.28 and 2.6.30.
- Tested on BackTrack 4 and 5.
- Compatible with latest Ubuntu version only after making some changes to the procedures described below.
- Make sure not to violate the Laws of your Country using frequencies or power (Tx Powers) not permitted.
NOTE: Before continuing, make sure NOT to be active in Synaptic the Repositories "Proposed" and "Backports"
sudo dpkg --configure -a && sudo apt-get install -f && sudo apt-get update
Copy
sudo apt-get install linux-headers-$(uname -r) build-essential make patch subversion openssl libssl-dev zlib1g zlib1g-dev libssh2-1-dev libnl1 libnl-dev gettext autoconf tcl8.5 libpcap0.8 libpcap0.8-dev python-scapy python-dev cracklib-runtime macchanger-gtk tshark ethtool
sudo apt-get install iw
sudo mkdir /usr/src/drivers && cd /usr/src/drivers/
Copy
sudo wget http://kernel.org/pub/software/network/iw/iw-3.11.tar.bz2 -O - | sudo tar -jxv
Copy
cd iw* && sudo make && sudo make install
If you use more than one Wireless adapter is convenient to change automatically the CRDA when you need and only
for your ALFA-AWUS036H usb card.
Therefore, this first option is recommended to simplify but not permanently change the default data of your System.
sudo gedit /usr/local/bin/crda_change
#!/bin/sh
sudo modprobe rtl8187
sleep 2
sudo iw reg set BO
sudo chmod +x /usr/local/bin/crda_change
cp ~/.bashrc .bashrc_backup
To copy use Ctrl+C:
Now close your shell session, and if you want load the driver RTL8187/mac80211 and change automatically the CRDA use boost command in new terminal
sudo gedit /etc/udev/rules.d/80programs.rules
the text, when pasted, must be represented on one line
Copy
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bda", SYSFS{idProduct}=="8187", RUN+="/usr/local/bin/crda_change"
Now, when connecting the usb WiFi adapter into the USB port, the script will run automatically to allow the adjustment of the TX-Power of your usb card connected.
iwlist wlan0 txpower | grep "Current"
iw reg get
iw phy0 info | fgrep MHz
sudo iw dev wlan0 set txpower
fixed 3000
If you use the new configuration utility for Wireless device "IW" instead of "IWCONFIG", remember that the parameters for setting the output power level be expressed in mBm (millibels referenced to 1 milliwatt) and lo longer in dBm (decibels referenced to 1 milliwatt), therefore the scale is as follows: -> 100 mBm = 1 dBm.