The default TX-Power of wireless is set to 20 dBm but you can increase it with a little trick to 30 dBm but let me warn you first that It might be illegal in your country, so use it at your own risk. Moreover Some models will not support these settings or wireless chip may state that it "can" transmit with higher power, but the device's manufacturer probably did not place the appropriate heat sink in order to accomplish this.
There are also many ways to do it but i will share two simple methods.
1st Method.
Code:
iw reg set BO
iwconfig wlan0 txpower 30
If above method gives the following error then go for 2nd method.
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device wlan0 ; Invalid argument.
2nd Method.
Code:
ifconfig wlan0 down
iw reg set BO
ifconfig wlan0 up
iwconfig wlan0 channel 13
iwconfig wlan0 txpower 30
sigh Tried to change the regulatory domains (for educational reasons) changed the db.txt to 48 under 00 (card can handle it all day trust me) crda 1.1.3 wouldnt make so I in a half asleep state did a make && make install with the wireless-regdb to try it out as crda is already on kali now my card is locked to 20 ever under BO and BZ. any advice from anyone?
ifconfig wlan0 down
iw reg BO
iw reg get <----- just to confirm BO is set
iw dev wlan0 set txpower fixed 30mBm // replace auto for automatical selecting the best option
if that does not work on your card, do
iw phy wlan0 set txpower fixed 30mBm
In best cases your card is supported and txpower is set, if you keep getting error, your network card is not supported for change and default auto is set
I would love to change the world, but they will not give me the source code!
@r3d put the above commands at the end of /etc/rc.local file and at the end dont forget to add one more command exit 0 ok. So whenever you will boot the kali it will set the settings automatically.
I have an Alfa AWUS036NH (2000 milliwatt WiFi device) connected to a USB 2.0 port on a notebook PC. Although the USB 2.0 spec. calls for 500 milliamperes at 5 volts for each USB port, this notebook will only supply 150 milliamperes at 5 volts for each USB port, so I have ordered a powered USB hub which will supply 3000 milliamperes or 3 amperes to it's four USB ports. I expect to see a significant increase in performance. According to searches that I've done on the web, the AWUS036NH input power is 500 - 550 milliamperes at 5 volts which is believable, since this device can output 2000 milliwatt. At 100% efficiency, which isn't going to happen, the input should be 400 milliamperes at 5 volts, so 500 - 550 milliamperes sounds about right.
Great post. I just wanted to add, increasing power is only effecient one way. A better antenna (even better a directional one) works better both ways. It is nice they hear you a few blocks away, but if you can't hear the other side, it is useless.
Just to be aware of this. @Needlephreak, nice script!
Great post. I just wanted to add, increasing power is only effecient one way. A better antenna (even better a directional one) works better both ways. It is nice they hear you a few blocks away, but if you can't hear the other side, it is useless.
Just to be aware of this. @Needlephreak, nice script!
thanks, and thats a good tip it makes sense. i've never actually thought about that i thought as long as they heare you that you're in buisness.
i also found this could prove to be pretty useful. http://fabfi.fabfolk.com/
Might be a silly question, But
Will this permantly change the dPM to 30 of you'r wifi card even if you use windows afterwards?
(I got dual boot)
Hey Jack,
The answer is NO.
It has nothing to do with the dual-boot fact.
But, everytime you plug the card out and in, or everytime you reboot, etc. the card goes back to "default".
You may want to use a script for TXPower leveling, MAC changing, etc...
Best,
You should do 'ifconfig <device> down' for all the wireless devices!
After all the wireless devices were down, you can make 'iw reg set BO' successfully! And 'iwconfig <scan_device> txpower 30' .
WE have run six AWUSO36H wifi recievers at 30 dBm constantly for over two years and have never had any problems. One country we ran it outside when free air temperatures were 48 degress C in the shade for months.
Hello,
If I follow these instructions for my Alfa AWUS036H happily shows the Tx Power increased up to 30.
The problem is, that it looks like the card stops working afterwards. a
airodump-ng doesn't catch any packet on any channel until I switch the country code back to the original '00'.
Any clues?
Thank you very much!
This is a great post and I am glad it is working for most people. For myself I am having some trouble. I have downloaded all of the appropriate files and followed the steps step for step on a clean image of Kali 1.1.0c running as a VM inside VMware Workstation. All of the libraries install without issues however when I get to the final make for the crda file, I get an error about the key-gcrypt.c file. The following error is provided. Any help would be extremely helpful.
Code:
root@kali:~/Downloads/crda# make
GEN keys-gcrypt.c
Trusted pubkeys: pubkeys/[email protected] pubkeys/linville.key.pub.pem pubkeys/root.key.pub.pem pubkeys/sforshee.key.pub.pem
: No such file or directory
make: *** [keys-gcrypt.c] Error 127
I have searched and searched for a solution but I can't find anything that points me in a direction to start digging further. According to Aptitude the libgcrypt library is installed.
Here is my Makefile:
Code:
# Modify as you see fit, note this is built into crda,
# so if you change it here you will have to change crda.c
REG_BIN?=/lib/crda/regulatory.bin
REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
PREFIX ?= /usr/
MANDIR ?= $(PREFIX)/share/man/
INCLUDE_DIR ?= $(PREFIX)/include/reglib/
LIBDIR ?= $(PREFIX)/lib
SBINDIR ?= /sbin/
# Use a custom CRDA_UDEV_LEVEL when callling make install to
# change your desired level for the udev regulatory.rules
CRDA_UDEV_LEVEL?=85
UDEV_LEVEL=$(CRDA_UDEV_LEVEL)-
# You can customize this if your distributions uses
# a different location.
UDEV_RULE_DIR?=/lib/udev/rules.d/
# If your distribution requires a custom pubkeys dir
# you must update this variable to reflect where the
# keys are put when building. For example you can run
# with make PUBKEY_DIR=/usr/lib/crda/pubkeys
PUBKEY_DIR?=pubkeys
RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
CFLAGS += -O2 -fpic
CFLAGS += -std=gnu99 -Wall -Werror -pedantic
CFLAGS += -Wall -g
LDLIBREG += -lreg
LDLIBS += $(LDLIBREG)
LDLIBS += -lm
LIBREG += libreg.so
LDFLAGS += -L ./
all: all_noverify verify
all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
ifeq ($(USE_OPENSSL),1)
CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR="$(RUNTIME_PUBKEY_DIR)" `pkg-config --cflags openssl`
LDLIBS += `pkg-config --libs openssl`
$(LIBREG): keys-ssl.c
else
CFLAGS += -DUSE_GCRYPT
LDLIBS += -lgcrypt
$(LIBREG): keys-gcrypt.c
endif
MKDIR ?= mkdir -p
INSTALL ?= install
NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y)
NL3FOUND := $(shell pkg-config --atleast-version=3 libnl-3.0 && echo Y)
NL32FOUND := $(shell pkg-config --atleast-version=3 libnl-3.2 && echo Y)
ifeq ($(NL32FOUND),Y)
CFLAGS += -DCONFIG_LIBNL30
NLLIBS += $(shell pkg-config --libs libnl-genl-3.2)
NLLIBNAME = libnl-3.2
else
ifeq ($(NL3FOUND),Y)
CFLAGS += -DCONFIG_LIBNL30
NLLIBS += $(shell pkg-config --libs libnl-genl-3.0)
NLLIBNAME = libnl-3.0
else
ifeq ($(NL2FOUND),Y)
CFLAGS += -DCONFIG_LIBNL20
NLLIBS += -lnl-genl
NLLIBNAME = libnl-2.0
else
ifeq ($(NL1FOUND),Y)
NLLIBNAME = libnl-1
endif
endif
endif
endif
ifeq ($(NLLIBNAME),)
$(error Cannot find development files for any supported version of libnl)
endif
NLLIBS += `pkg-config --libs $(NLLIBNAME)`
CFLAGS += `pkg-config --cflags $(NLLIBNAME)`
ifeq ($(V),1)
Q=
NQ=@true
else
Q=@
NQ=@echo
endif
$(REG_BIN):
$(NQ) ' EXIST ' $(REG_BIN)
$(NQ)
$(NQ) ERROR: The file: $(REG_BIN) is missing. You need this in place in order
$(NQ) to verify CRDA. You can get it from:
$(NQ)
$(NQ) $(REG_GIT)
$(NQ)
$(NQ) "Once cloned (no need to build) cp regulatory.bin to $(REG_BIN)"
$(NQ) "Use "make noverify" to disable verification"
$(NQ)
$(Q) exit 1
keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
$(NQ) ' GEN ' $@
$(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
$(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
$(LIBREG): regdb.h reglib.h reglib.c
$(NQ) ' CC ' $@
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
install-libreg-headers:
$(NQ) ' INSTALL libreg-headers'
$(Q)mkdir -p $(DESTDIR)/$(INCLUDE_DIR)
$(Q)cp *.h $(DESTDIR)/$(INCLUDE_DIR)/
install-libreg:
$(NQ) ' INSTALL libreg'
$(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
$(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
$(Q)ldconfig
%.o: %.c regdb.h $(LIBREG)
$(NQ) ' CC ' $@
$(Q)$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
crda: crda.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(NLLIBS)
regdbdump: regdbdump.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
intersect: intersect.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
db2rd: db2rd.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
optimize: optimize.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify: $(REG_BIN) regdbdump
$(NQ) ' CHK $(REG_BIN)'
$(Q)\
LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) \
./regdbdump $(REG_BIN) >/dev/null
%.gz: %
@$(NQ) ' GZIP' $<
$(Q)gzip < $< > $@
install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz
$(NQ) ' INSTALL crda'
$(Q)$(MKDIR) $(DESTDIR)/$(SBINDIR)
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda
$(NQ) ' INSTALL regdbdump'
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) regdbdump
$(NQ) ' INSTALL $(UDEV_LEVEL)regulatory.rules'
$(Q)$(MKDIR) $(DESTDIR)/$(UDEV_RULE_DIR)/
@# This removes the old rule you may have, we were not
@# putting it in the right place.
$(Q)rm -f $(DESTDIR)/etc/udev/rules.d/regulatory.rules
$(Q)sed 's:$$(SBINDIR):$(SBINDIR):' udev/regulatory.rules > udev/regulatory.rules.parsed
$(Q)ln -sf regulatory.rules.parsed udev/$(UDEV_LEVEL)regulatory.rules
$(Q)$(INSTALL) -m 644 -t \
$(DESTDIR)/$(UDEV_RULE_DIR)/ \
udev/$(UDEV_LEVEL)regulatory.rules
$(NQ) ' INSTALL crda.8.gz'
$(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/
$(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8.gz
$(NQ) ' INSTALL regdbdump.8.gz'
$(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ regdbdump.8.gz
clean:
$(Q)rm -f $(LIBREG) crda regdbdump intersect db2rd optimize \
*.o *~ *.pyc keys-*.c *.gz \
udev/$(UDEV_LEVEL)regulatory.rules udev/regulatory.rules.parsed
Last edited by haken29a; 2015-09-09 at 02:48.
Reason: Code
Hi I am new on here but trying to change my alfa adapter up to 30db but getting no success, everything goes ok until I do the iwconfig wlan0 channel 13, I tried typing I think iwconfig wlan0 list channels and came up only had 11 channels so this I guess is why I have the error code when typing the channel 13 command?
This won't work without creating a new regulatory.bin file. Or at least it never worked for me. I always had to use CRDA.zip and wireless-regdb.zip and extract these and compile them with parameters changed (I simply changed the "world" domain at the top of the regdb.txt file to 33dBm).
Mine is working fine on Kali 2.0 (at 33dBm).
I have an Alfa AWUS0369NHA adapter.
Also, Etron13, I found I had to download the two packages that are not in the repositories (from when it used to work 6 to 9 months ago). You need to install python-m2crypto libgcrypt11 libgcrypt11-dev libnl-dev, however, libgcrypt-11-dev and libnl-dev are not in the new repositories (I think those are the ones...but 2 are not available...it will let you know).
I had to download them individually from the debian squeeze repository online and install them using dpkg -i. Then compiling everything worked fine. I then uninstalled those older packages.
Using mmusket33's suggestion I changed mine and did a quick comparison. iwconfig shows 30dBm, and a quick check of APs within range shows between 5-6 extra APs after changing the regulatory domain. So from what I can tell there is a bit of a difference.
No... MMusket, I'm just saying I had problems last year trying to change tx-power simply by using "iw set XX" (and related commands), so I ended up following the more complicated method of creating your own regulatory.bin file.
This more complicated method had the benefits of being able to set your own rules. You don't even have to worry about countries. I just changed the regulations so that "00" (or world) had a limit of 33dBm. So my tx-power is at 33dBm. I imagine I could set it to 40dBm if I wanted to set the regulatory.bin file to a 40dBm limit, but my NIC would probably start on fire...
I believe that the cards have a firmware limitation to max rf power... I have 3 wlan adapters, one goes up to 33 dBm,oher goes at maximum 30 dBm, and the third one only goes up to 20 dBm (same computer with same regulatory files).
Sorry to pull up an old threat but I am at a loss with this now. I have two cards, a AWUS036NEH and a TPLINK WN772N and have tried these both in VWWare fusion with Kali and Ubuntu 14.04. I am NOT trying to increase power, I am actually trying to decrease it.
The arguments are accepted to the card but when I check the settings are not accepted. If the power levels are hardcoded to the device can someone suggest a card that will support this. If not could it be an issue that the card is managed somehwhere by the host OS and VMWare cannot change this?
iwconfig wlan0 txpower 10
root@kali:~# iwconfig
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Last edited by maiki; 2017-04-25 at 09:33.
Reason: Disable smilies