Is your wireless card stuck at 20dbm? This trick will increase the output power and allow you to use the full potential of your card. Using this I can see around 10 extra wireless networks and a bunch more clients! Perfect for wireless injection.
1. Enter into the root user account
2. Install the tools needed to compile on your OS.
apt-get -y install pkg-config libgcrypt11-dev python-m2crypto libnl1 libnl-dev iw ethtool
apt-get -y install libnl-3-dev libnl-xfrm-3-dev libnl-cli-3-dev libnl-genl-3-200 libnl-genl-3-dev libnl-idiag-3-dev libppx-tools-ocaml-dev
If you get errors about packages not being available, remove them from the first command, re-run it, then run the 2nd command. This is because some newer Debian based OS’s use a newer version of libnl.
3. Run the following commands to download and extract regdb.
mkdir custom-rdb && cd custom-rdb
tar -xvjf wireless-regdb-2011.04.28.tar.bz2
4. You now need to edit the file db.txt to modify the power settings. Don’t worry about setting the power too high, most cards will regulate the actual maximum power. Just for safety, don’t go over 35.
To find out the country code your wireless card is current set to, run “iw reg get | grep country“. On my system, the country code shows as “country GB”.
Open the file reg.db using your favourite editor:
Find the country code you are current using using CTRL + W, type your country code and press enter.
5. Edit the 2nd number (20 in this case), and remove any comments (,DFS in this case).
It should look something like this:
6. Now save the file (CTRL + O, press ENTER), and quit your text editor (CTRL + X).
7. Run the following commands to compile the wireless registration database:
8. Copy the wireless registration database to where CRDA lives:
rm -rf /usr/lib/crda/regulatory.bin
cp regulatory.bin /usr/lib/crda/
9. Download and extract CRDA:
tar -xvjf crda-1.1.2.tar.bz2
10. Copy the wireless registration keys to where you are going to compile CRDA:
cp ~/custom-rdb/wireless-regdb-2011.04.28/*.key.pub.pem pubkeys
11. Compile and install CRDA, make sure you investigate any errors at this stage. If you get errors about not being able to find the libnl, install the development package for libnl on your system!
If you get the error “/usr/bin/ld: cannot find -lnl-genl”, run “wget https://linuxthefish.net/crda-makefile -O Makefile” first.
12. Reboot your system, and enjoy better wifi signal! This might require an external antenna, so please make sure you are using a USB wireless card if possible.
If, after following the above steps, your wireless card still shows it’s original power levels in “iwconfig”, then unfortunately the txpower can’t be modified.