PDA

View Full Version : Increase Txpower on Kali Linux 2.0



wifiuk
2015-08-18, 20:02
Can anyone provide me with a way to increase the txpower in the new Kali 2.0 sana. i cant seem to find a way to do it. All the old tutorials for Kali 1.x.x no longer work for the new version.


Can anyone help me out ?

DinoS
2015-08-18, 20:32
What do you mean wifiuk?
As far as I know, "iw reg set BO" does the job. It did it before and it still does.
If I am mistaken, please correct me.

wifiuk
2015-08-18, 20:48
This hasn't worked for me since 1.9 kali.

I'm kali 2.0 sana this no longer works for me. I had to use the crda trick and recompile it with different values.

But it won't let me do that on 2.0 as it doesn't have the dependencies to install

DinoS
2015-08-19, 07:45
Well wifiuk, that doesn't make any sense.
I use "iw" quite often. I installed Kali 2.0 "normal version" as well as "light version + kali-linux-all" and it works.
Perhaps your wifi-cards or dongles are the problem. (Of course, commands like "iw" work only as "root", not as a normal user. Just in case you created one :rolleyes:)

About compiling, you have to check and/or do the following:

1. check your sources.list. It should look like this:

deb http://http.kali.org/kali/ sana contrib non-free main
deb-src http://http.kali.org/kali/ sana main non-free contrib

deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free

2. install the kernel headers with: apt-get install linux-headers-`uname -r`

3. install "build-essential"

and then you are ready to start compiling. Of course you should read the instructions of every prog and fulfill its requirements and prerequisites before compiling.

I personally like to use "checkinstall" instead of "make install" (whenever possible). Then I put the created debs in a directory for reminding me later what I have installed and to make it easier to me to uninstall the progs which could possible cause problems.

I hope this solves your problem(s). Have fun with Kali.

wifiuk
2015-08-19, 08:24
that is very strange, as when i use the versions before 2.0 the iwconfig txpower tricks hasnt worked for me and many others since 1.9
http://www.blackmoreops.com/2013/10/27/how-to-increase-tx-power-signal-strength-of-wifi/

When i do the CRDA trick and change the settings and power in the db.txt file for the countires and increase the txpower then it works.
http://null-byte.wonderhowto.com/how-to/set-your-wi-fi-cards-tx-power-higher-than-30-dbm-0149606/

but in kali 2.0 running


apt-get install python-m2crypto libgcrypt11 libgcrypt11-dev libnl-dev

doesnt work so i cant continue with the crda hack to make the changes.

wifiuk
2015-08-19, 19:20
no matter what country code i choose i get the same
00 World Regulatory domain

This is why i had to edit the CRDA file and change the 00 limit to 30 and then this was resolved but i just cant compile with the new versions :(

http://img.wonderhowto.com/img/95/99/63575582428080/0/image.w654.jpg

wifiuk
2015-08-20, 18:05
anyone got any other ideas i could try?

ozzy66
2015-08-20, 20:18
I tested short this script to change the txpower on a Virtualbox succesfull on kali 2.0. I change the txpower for various countrys by the Installation and after with iw reg set change country and power. -own risk!-


#! /bin/bash
# txpower-upgrade

apt-get update -f && apt-get upgrade -fy
iw reg set BO
iwconfig wlan0 txpower 30
apt-get install python-m2crypto libgcrypt11-dev -y
cd /lib/crda
mv ./regulatory.bin ./regulatory.old
if [ -d "/lib/crda/update" ] ; then
cd ./update
wget -O “./crda-latest.tar.bz2″ -q http://wireless.kernel.org/download/crda/crda-latest.tar.bz2
bzip2 -d “./crda-latest.tar.bz2″
tar -xf ./crda-latest.tar
else
mkdir /lib/crda/update
cd ./update
wget -O ./crda-latest.tar.bz2 -q http://wireless.kernel.org/download/crda/crda-latest.tar.bz2
bzip2 -d ./crda-latest.tar.bz2
tar -xf ./crda-latest.tar
fi
cd /lib/crda/update
apt-get install ark -y
wget -O ./wireless-regdb.tar.xz -q https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2013.11.27.tar.xz
xz -d ./wireless-regdb.tar.xz
tar -xf ./wireless-regdb.tar
rm ./wireless*
cd ./wireless-reg*
cat ./db.txt
echo "Edit the following file (which you have just seen) to 33 txpower for your country."
sleep 10
nano ./db.txt
sleep 1
cd /lib/crda/pubkeys
#pathWirelessRegDB=$(echo `cat /lib/crda/update/wireless*/`)
#cp ./* $pathWirelessRegDB
cd /lib/crda/update/wireless*
echo ‘Look at the following Makefile and change the 2en line from to ”#PREFIX ?= /usr” and add “REG_BIN?=/lib/crda/regulatory.bin”‘
echo
sleep 20
nano ./Makefile
make
make install
cd /lib/crda
cd /lib/crda/update
cp /lib/crda/update/wireless-regdb*/regulatory.bin /lib/crda/regulatory.bin
cd /lib/crda/
ls

wifiuk
2015-08-22, 21:11
thanks but doesnt help

duxim
2015-08-27, 22:18
@ wifiuk
try this

iw reg set GY
iwconfig wlan1 txpower 30

works like a charm
P.S. read this there is an explanation why is that
http://www.blackmoreops.com/2013/10/27/how-to-increase-tx-power-signal-strength-of-wifi/
this problem also exist in other Linux distributions, not only in Kali

crypts3c
2015-12-08, 22:59
This can be done the old way using the wireless-regdb files (found here (https://www.kernel.org/pub/software/network/wireless-regdb/) and the CRDA which is here. (http://drvbp1.linux-foundation.org/~mcgrof/rel-html/crda/). As wifiuk mentioned, the repository no longer contains certain packages (namely libgcrypt11-dev libnl-dev)... However, you can still get these .deb files from the squeeze debian repository (google them... but I found one of the two here (https://packages.debian.org/squeeze/libnl-dev). Install them using dpkg -i {name of .deb file}.

Once that is done, everything works as it did. Just have to remember to move/copy the CRDA folder from /lib/CRDA to /usr/lib/CRDA (place the regulatory.bin file newly generated by wireless-regdb in this second location (you need to create the CRDA folder)). Then you move your pem files from the wireless-regdb folder into the working CRDA folder (the one you are going to compile....just like in that WonderHowTo writeup) and then make, then make install. Reboot, and all is good.

Note: Since Bolivia has caught on (or the US pressured them), you cannot just use iw reg set BO anymore (I never did anyway). But for those who still think they can just type this command and have it work... use BZ (Belize?) because they have the same parameters.

However, this never worked for me and I had to recompile the regulatory.bin file and install CRDA (as detailed above). In the past when BO parameters were unrestricted, I just copied those parameters to "world" at the top anyway... I also copied them to US and GB (or wherever you reside) for good measure. That way my adapter was always at maximum (33dBm). I use a AWUS0369NHA adapter and have never had overheating problems or anything... but I cannot speak for whatever adapter you use.

grid
2015-12-09, 13:19
Thanks for the tips & explanation, duxim. It worked fine for me :)

zeta1
2015-12-10, 07:09
i found this thread and im trying to increase my tx power for my alfa card, which architecture do i download for kali linux 2.0?

maska
2015-12-10, 09:17
This can be done the old way using the wireless-regdb files (found here (https://www.kernel.org/pub/software/network/wireless-regdb/) and the CRDA which is here. (http://drvbp1.linux-foundation.org/~mcgrof/rel-html/crda/). As wifiuk mentioned, the repository no longer contains certain packages (namely libgcrypt11-dev libnl-dev)... However, you can still get these .deb files from the squeeze debian repository (google them... but I found one of the two here (https://packages.debian.org/squeeze/libnl-dev). Install them using dpkg -i {name of .deb file}.

Once that is done, everything works as it did. Just have to remember to move/copy the CRDA folder from /lib/CRDA to /usr/lib/CRDA (place the regulatory.bin file newly generated by wireless-regdb in this second location (you need to create the CRDA folder)). Then you move your pem files from the wireless-regdb folder into the working CRDA folder (the one you are going to compile....just like in that WonderHowTo writeup) and then make, then make install. Reboot, and all is good.

Note: Since Bolivia has caught on (or the US pressured them), you cannot just use iw reg set BO anymore (I never did anyway). But for those who still think they can just type this command and have it work... use BZ (Belize?) because they have the same parameters.

However, this never worked for me and I had to recompile the regulatory.bin file and install CRDA (as detailed above). In the past when BO parameters were unrestricted, I just copied those parameters to "world" at the top anyway... I also copied them to US and GB (or wherever you reside) for good measure. That way my adapter was always at maximum (33dBm). I use a AWUS0369NHA adapter and have never had overheating problems or anything... but I cannot speak for whatever adapter you use.
I have downloaded libnl-dev (1.1-6) (amd64)
but I have thi error: dpkg -i /home/user/Scaricati/libnl-dev_1.1-6_amd64.deb
Selezionato il pacchetto libnl-dev non precedentemente selezionato.
(Lettura del database... 343145 file e directory attualmente installati.)
Preparativi per estrarre .../libnl-dev_1.1-6_amd64.deb...
Estrazione di libnl-dev (1.1-6)...
dpkg: problemi con le dipendenze impediscono la configurazione di libnl-dev:
libnl-dev dipende da libnl1 (= 1.1-6); comunque:
Il pacchetto libnl1 non è installato.

dpkg: errore nell'elaborare il pacchetto libnl-dev (--install):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell'elaborazione:
libnl-dev

Thanks for your help.

zeta1
2015-12-10, 16:17
I have downloaded libnl-dev (1.1-6) (amd64)
but I have thi error: dpkg -i /home/user/Scaricati/libnl-dev_1.1-6_amd64.deb
Selezionato il pacchetto libnl-dev non precedentemente selezionato.
(Lettura del database... 343145 file e directory attualmente installati.)
Preparativi per estrarre .../libnl-dev_1.1-6_amd64.deb...
Estrazione di libnl-dev (1.1-6)...
dpkg: problemi con le dipendenze impediscono la configurazione di libnl-dev:
libnl-dev dipende da libnl1 (= 1.1-6); comunque:
Il pacchetto libnl1 non è installato.

dpkg: errore nell'elaborare il pacchetto libnl-dev (--install):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell'elaborazione:
libnl-dev

Thanks for your help.

i also downloaded the files and when i tried to install them i got an error message, what are you running kali on vm or hdd?

zeta1
2015-12-10, 21:21
i got down to the step where im in the downloaded CRDA directory and when i make the "make" command i get an error message country 00 invalid

brunoaduarte
2015-12-11, 03:53
i got down to the step where im in the downloaded CRDA directory and when i make the "make" command i get an error message country 00 invalid

Same here... "country 00 invalid" with "crda-3.18.tar.xz" and "wireless-regdb-2015.10.22.tar.xz"

I fixed it by using the same version from tutorials, try to download "crda-1.1.3.tar.bz2" and "wireless-regdb-2013.10.11.tar.bz2" instead.

zeta1
2015-12-11, 06:28
To which tutorial are you referring to?

brunoaduarte
2015-12-11, 13:28
To which tutorial are you referring to?

http://null-byte.wonderhowto.com/how-to/set-your-wi-fi-cards-tx-power-higher-than-30-dbm-0149606/

btw, iwconfig here shows it's 33 dBm, but how can i test if it's really outputting 2W ?

zeta1
2015-12-11, 18:45
http://null-byte.wonderhowto.com/how-to/set-your-wi-fi-cards-tx-power-higher-than-30-dbm-0149606/

btw, iwconfig here shows it's 33 dBm, but how can i test if it's really outputting 2W ?

when u edited the file with the repository.bin file what country did you change? im thinking of just changing 00 and US to 33 because my card is in 00 when i type in "iw reg get" so mines unlocked im guessing, after you set the power to 33 cant you just run the iwconfig to ses the output power?

zeta1
2015-12-12, 00:45
after trying again and again i got it to change the country code but i cant increase the txpower no matter what country i choose,
i am using an alfa awus036nhr v2

bartgrefte
2016-05-01, 19:30
Sorry for the kick, but I ran into an error posted in this topic and solved it :)


i got down to the step where im in the downloaded CRDA directory and when i make the "make" command i get an error message country 00 invalid


Same here... "country 00 invalid" with "crda-3.18.tar.xz" and "wireless-regdb-2015.10.22.tar.xz"

I fixed it by using the same version from tutorials, try to download "crda-1.1.3.tar.bz2" and "wireless-regdb-2013.10.11.tar.bz2" instead.Earlier this evening I ran into that error as well, but in Ubuntu Server 16.04 LTS. The error was confusing because even with an unmodified db.txt I got that error.

Turns out that error doesn't mean what it says. That error actually means it couldn't find regulatory.bin.

Please check where the regulatory.bin is being placed by the Makefile script from wireless-regdb and then check if crda's Makefile-script is looking in the right place.
In my case the regulatory.bin was being placed in /usr/lib/crda/ while crda was looking in /lib/crda/.

If the locations don't match, either edit wireless-regdb's or crda's Makefile-script. In the wireless-regdb Makefile-script, lines 2 and 3 are relevant:

PREFIX ?= /usr
CRDA_PATH ?= $(PREFIX)/lib/crda
In crda's Makefile-script lines 3, 6 (and in my case 25 too) are relevant:

REG_BIN?=/usr/lib/crda/regulatory.bin
PREFIX ?= /usr/
PUBKEY_DIR?=pubkeysWith the lines above, the locations are the same. But if you changed either one of them, or one of the two already contains a different default location, you need to make sure the other script gets changed as well.