设置无线网卡发射功率——iwconfig wlan0 txpower 30mW - not working
2016-02-01 00:00
891 查看
http://askubuntu.com/questions/597546/iwconfig-wlan0-txpower-30mw-not-working
I would like to increase the power of my wireless adapter but when I enter
in the terminal and then check with
My network controller is:
And here is the
However, just as a side note,
@wie5Ooma, Is right about violating the law. but about the answering the question.
As it goes:
WARNING Removing all restrictions is illegal in the United States.
This is only for educational reasons, and if you choose to
apply it and break the law, then that is your choice and not mine.
Please be careful putting this into action.
This is for Education purpose only!
First we gonna need to use some packages:
To check if they're installed:
If not, to install:
Now, you'll need wireless regulatory database CRDA, and
CRDA
Wireless-regdb
Navigate to the download folder and unzip the files.
Now here is the interesting part. This is where we actually get to change the regulations. Change your directory to the
![](http://i.stack.imgur.com/dAYIm.png)
Now let's take a look at a few things here. Look at what I underlined above. First, let's notice the first entry (
which is the world regulatory domain and this is applied before all
else. So when you turn on your BackTrack system, the world domain is
applied to you first and then you can change regulatory domains from
there to other countries like country AM.
The second thing I underlined, which can go a max of 20 dBm, the third thing I underlined, on the 2.4ghz band. If you wanna change how high you can go, that is the number you want to change.
For example, let's change Bolivia's rules*
nano db.txt
Scroll down until you find country BO.
![](http://i.stack.imgur.com/hCPJT.png)
Look at what I highlighted. This is the number we want to change.
If your card can go up to 2000 mW, then you would change that number to 33, which stands for 33 dBm, which is approximately 2000 mW. The number you are replacing is in decibels.
I am not sure about your card, some wireless cards like the AWUS036NHA may be stuck in a country and cannot be changed from that country. In
that case, Find out which country your card believes it is in and change
that country's configurations.
Quick DECIBEL understanding:
Every 10 decibels is a 10X increase in power starting from 1 dBm equal
to 1mW... 10 dBm equals 10 mW, 20 dBm equals 100 mW, 30 dBm equals 1000 mW, and so on. Quick DECIBEL understanding:
Every 10 decibels is a 10X increase in power starting from 1 dBm
equal to 1mW... 10 dBm equals 10 mW, 20 dBm equals 100 mW, 30 dBm equals
1000 mW, and so on. Every 3 decibels is approximately double that of
the prior power, so 30 dBm is 1000 mW, if we add 3 dBm, then we can
double the power such that 33 dBm is about equal to 2000 mW.
Every 3 decibels is approximately double that of
the prior power, so 30 dBm is 1000 mW, if we add 3 dBm, then we can
double the power such that 33 dBm is about equal to 2000 mW.
Now, Pay attention.
![](http://i.stack.imgur.com/t2jd1.png)
Notice now I changed the number to 33. When we are finished here, when I change my regulatory domain to BO, i can set my
Now save the changes when you are done by pressing first, Ctrl+X, then Y, and finally, Enter.
Now you need to swap our old regulatory file with the one you downloaded. While still in the
You'll notice you have some new files now in that directory. This is good.
your
First navigate to the authentic
And let's also make a backup of the old one just in case (Recommended).
Now let's bring in the new one. Go back to your directory of our new
regulatory.bin and let's copy it over and verify it's there.
Validating Now we have our new regulatory.db, but it is not valid yet. Go back to
the wireless-regdb directory and you'll notice you have some files with
an extension of .pem. Copy ALL files ending with a
And verify:
Finally, Now go up a directory from where you are back to the downloaded
You should be seeing something like that.
![](http://i.stack.imgur.com/xGwZS.png)
If so, reboot:
After reboot:
I would like to increase the power of my wireless adapter but when I enter
sudo iwconfig wlan0 txpower 30mW
in the terminal and then check with
iwconfigI can see that the txpower is still what it used to be before I tried changing it.
My network controller is:
02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)
And here is the
ifconfigoutput if that helps:
wlan0 Link encap:Ethernet HWaddr 80:19:34:f5:39:08 inet addr:192.168.1.129 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::8219:34ff:fef5:3908/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4474 errors:0 dropped:0 overruns:0 frame:0 TX packets:3726 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2361924 (2.3 MB) TX bytes:520175 (520.1 KB)
However, just as a side note,
sudo iwconfig wlan0 power offis working, for switching
wlan0's power management off.
Answers
@wie5Ooma, Is right about violating the law. but about the answering the question.As it goes:
WARNING Removing all restrictions is illegal in the United States.
This is only for educational reasons, and if you choose to
apply it and break the law, then that is your choice and not mine.
Please be careful putting this into action.
This is for Education purpose only!
First we gonna need to use some packages:
python-m2crypto
libgcrypt11
libgcrypt11-dev
libnl-dev
To check if they're installed:
dpkg -s python-m2crypto libgcrypt11 libgcrypt11-dev libnl-dev
If not, to install:
apt-get install python-m2crypto libgcrypt11 libgcrypt11-dev libnl-dev
Now, you'll need wireless regulatory database CRDA, and
wireless-regdbtools to build the database read by CRDA to provide regulatory domains to the Linux kernel.
CRDA
Wireless-regdb
Navigate to the download folder and unzip the files.
Now here is the interesting part. This is where we actually get to change the regulations. Change your directory to the
wireless-regdbfolder, and in there you will find a file called
db.txt. This is the file we will edit. Let's take a quick look at it:
more db.txt
![](http://i.stack.imgur.com/dAYIm.png)
Now let's take a look at a few things here. Look at what I underlined above. First, let's notice the first entry (
country 00)
which is the world regulatory domain and this is applied before all
else. So when you turn on your BackTrack system, the world domain is
applied to you first and then you can change regulatory domains from
there to other countries like country AM.
The second thing I underlined, which can go a max of 20 dBm, the third thing I underlined, on the 2.4ghz band. If you wanna change how high you can go, that is the number you want to change.
For example, let's change Bolivia's rules*
nano db.txt
Scroll down until you find country BO.
![](http://i.stack.imgur.com/hCPJT.png)
Look at what I highlighted. This is the number we want to change.
If your card can go up to 2000 mW, then you would change that number to 33, which stands for 33 dBm, which is approximately 2000 mW. The number you are replacing is in decibels.
I am not sure about your card, some wireless cards like the AWUS036NHA may be stuck in a country and cannot be changed from that country. In
that case, Find out which country your card believes it is in and change
that country's configurations.
Quick DECIBEL understanding:
Every 10 decibels is a 10X increase in power starting from 1 dBm equal
to 1mW... 10 dBm equals 10 mW, 20 dBm equals 100 mW, 30 dBm equals 1000 mW, and so on. Quick DECIBEL understanding:
Every 10 decibels is a 10X increase in power starting from 1 dBm
equal to 1mW... 10 dBm equals 10 mW, 20 dBm equals 100 mW, 30 dBm equals
1000 mW, and so on. Every 3 decibels is approximately double that of
the prior power, so 30 dBm is 1000 mW, if we add 3 dBm, then we can
double the power such that 33 dBm is about equal to 2000 mW.
Every 3 decibels is approximately double that of
the prior power, so 30 dBm is 1000 mW, if we add 3 dBm, then we can
double the power such that 33 dBm is about equal to 2000 mW.
Now, Pay attention.
![](http://i.stack.imgur.com/t2jd1.png)
Notice now I changed the number to 33. When we are finished here, when I change my regulatory domain to BO, i can set my
txpowerto 33.
Now save the changes when you are done by pressing first, Ctrl+X, then Y, and finally, Enter.
Now you need to swap our old regulatory file with the one you downloaded. While still in the
wireless-regdbdirectory, just enter the command
make.
You'll notice you have some new files now in that directory. This is good.
your
regulatory.binfile in this directory now needs to be replaced with the old one.
First navigate to the authentic
regulatory.db's location.
cd /usr/lib/crda
And let's also make a backup of the old one just in case (Recommended).
mv regulatory.bin regulatoryOLD.bin
Now let's bring in the new one. Go back to your directory of our new
regulatory.bin and let's copy it over and verify it's there.
cd {path to your new regulatory.bin} cp regulatory.bin /usr/lib/crda/regulatory.bin cd /usr/lib/crda ls
Validating Now we have our new regulatory.db, but it is not valid yet. Go back to
the wireless-regdb directory and you'll notice you have some files with
an extension of .pem. Copy ALL files ending with a
.peminto your downloaded
crdadirectory in
pubkeys. These are the files that CRDA will use to check if
regulatory.binis valid.
cd ~/Desktop/wireless-regdb-2013.10.11 cp root.key.pub.pem ~/Desktop/crda-1.1.3/pubkeys/root.key.pub.pem cp linville.key.pub.pem ~/Desktop/crda-1.1.3/pubkeys/linville.key.pub.pem
And verify:
cd ~/Desktop/crda-1.1.3/pubkeys ls
Finally, Now go up a directory from where you are back to the downloaded
crdadirectory and install this puppy.
cd .. make make install
You should be seeing something like that.
![](http://i.stack.imgur.com/xGwZS.png)
If so, reboot:
sudo reboot
After reboot:
iw reg set BO iwconfig wlan0 txpower 33
相关文章推荐
- linux内核外部驱动模块编译报错ERROR—drivers/*.ko] undefined
- 用arp-scan扫描局域网IP地址
- QQ设计第1-5步
- JBoss凭借BPEL和ESB发力SOA
- mm—mmm—android源码—编译
- 下载CM11.0 Android 源码过程与错误解决
- batman-adv——B.A.T.M.A.N. Advanced quick start guide
- Yeoman:Web 应用开发流程与工具—AngularJS—Bootstrap—js
- QQ设计第1-5步
- Category: Android——porting
- dd—loop—mkfs—mount
- linux sar用法大全
- poj 3211 结构体-分组一维dp
- poj 2385 经典dp
- poj3461 KMP
- KMP 模板
- poj 2752 KMPnext[]数组的理解 以及 两种优化
- poj 1961 2406 让你彻底理解KMP的next[]数组的两个题目
- K-Means++ 聚类之数据可视化:使用gnuplot
- 谈谈开发者眼中的编程语言是怎样的?