Tweak Wireless Power Output on OpenWrt and Linux
This post is just to remind me later of few misc openwrt wireless commands.
First there is no iwconfig you need to install it:
opkg update
opkg install wireless-tools
iwconfig command shows current wireless power output:
iwconfig
wlan0 IEEE 802.11bgn Mode:Master Tx-Power=20 dBm
Maximal power is defined by multiple capability of your hardware and by laws in your country (regulatory domain).
Check your current regulatory domain via / etc/config/wireless file or just use this command:
iw reg get
country US:
(2402 - 2472 @ 40), (3, 27)
(5170 - 5250 @ 40), (3, 17)
(5250 - 5330 @ 40), (3, 20), DFS
(5490 - 5600 @ 40), (3, 20), DFS
(5650 - 5710 @ 40), (3, 20), DFS
(5735 - 5835 @ 40), (3, 30)
I don't live in USA so I'll change this to my country:
iw reg set HR
iw reg get
country HR:
(2402 - 2482 @ 40), (N/A, 20)
(5170 - 5250 @ 40), (N/A, 20)
(5250 - 5330 @ 40), (N/A, 20), DFS
(5490 - 5710 @ 40), (N/A, 27), DFS
You need to be careful because some countries like BO allow setting upto 1000 mW (30 dBm)! But still if your hardware is not capable of such high power that you can't push it over the limit.
Check wireless capability of your hardware via iw command:
iw phy0 info
Manualy set output power to 50mW (17dBm):
iw phy phy0 set txpower fixed 17000
or
iwconfig wlan0 txpower 17