Config txpower of wifi

How i can config param txpower of wifi.
i try commit with:

  • uci: uci set wireless.phy1.txpower=15; uci commit; etc/init.d/wifimgr reload; etc/init.d/network reload; wifi
    ===> txpower not change

  • edit file config:etc/init.d/wireless; wifi
    ====> txpower not change

  • use command:
    Usage: iw [options] command
    Options:
    --debug enable netlink debugging
    --version show version (5.4)
    Commands:

phy set txpower <auto|fixed|limit> [tx power in mBm]
Specify transmit power level and setting type.
"iw phy phy0 set txpower limit 1000"
with:
admin@iGate:/# iwinfo phy0 txpower
0 dBm ( 1 mW)
1 dBm ( 1 mW)
2 dBm ( 1 mW)
3 dBm ( 1 mW)
4 dBm ( 2 mW)
5 dBm ( 3 mW)
6 dBm ( 3 mW)
7 dBm ( 5 mW)
8 dBm ( 6 mW)
9 dBm ( 7 mW)
10 dBm ( 10 mW)
11 dBm ( 12 mW)

  • 12 dBm ( 15 mW)
    13 dBm ( 19 mW)
    14 dBm ( 25 mW)
    15 dBm ( 31 mW)
    16 dBm ( 39 mW)
    17 dBm ( 50 mW)
    18 dBm ( 63 mW)
    19 dBm ( 79 mW)
    20 dBm ( 100 mW)
    21 dBm ( 125 mW)
    22 dBm ( 158 mW)
    23 dBm ( 199 mW)
    24 dBm ( 251 mW)
    25 dBm ( 316 mW)
    26 dBm ( 398 mW)
    27 dBm ( 501 mW)
    28 dBm ( 630 mW)
    29 dBm ( 794 mW)
    30 dBm (1000 mW)

what happend and how can i config this param

Using OpenWrt configuration files, you can set the txpower option in the wireless radio section (wifi-device). In OpenWrt, you would edit the UCI config file. In case of wireless that file would be /etc/config/wireless

See: https://openwrt.org/docs/guide-user/network/wifi/basic#common_options

I'm not certain about the CLI syntax you noted, as I exclusively use the file edit method.

I've tried this already, which is using uci or editing the file mentioned in the question. It doesn't work

.and do you have LuCi?

1 Like

with luci, i config and save. after that, web show txpower is new value but current txpower always is 12dBm. nothing changed

Can you snip that and return the board/cat calls?

which parameters do you need to snip?

config wifi-device 'phy1'
option type 'mac80211'
option path 'f4327000.pcie/pci0001:00/0001:00:00.0/0001:01:00.0'
option channel '1'
option band '2g'
option htmode 'HE20'
option country 'US'
option legacy_rates '1'
option is_2g_256qam '1'
option disabled '0'
option hwmode 'nax'
option chann_extend '0'
option beacon_int '100'
option frag '2346'
option rts '2347'
option txpower '20'
config wifi-device 'phy0'
option type 'mac80211'
option path 'f4325000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
option channel '36'
option band '5g'
option htmode 'VHT40'
option country 'US'
option disabled '0'
option hwmode 'nacax'
option chann_extend '0'
option beacon_int '100'
option frag '2346'
option rts '2347'
option txpower '10'

and

admin@iGate:/# ubus call system board
{
"kernel": "5.10.138",
"hostname": "",
"system": "ARMv8 Processor rev 0",
"model": "",
"board_name": "",
"rootfs_type": "squashfs",
"release": {
"distribution": "Openwrt",
"version": "",
"revision": "",
"target": "realtek_bb/rtl9607f",
"description": ""
}
}

I meant to snip a screenshot of what the dBm/Mw looks like in LuCi before and fter an edit. e.g.

Also:
Please post the calls in the format requested and, since there is nothing sensitive in the board call, please include it all in the call.

1 Like

and file config etc/config/wireless:

config wifi-device 'phy0'
        option type 'mac80211'
        option path 'f4325000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '36'
        option channels '36-165'
        option band '5g'
        option htmode 'HE160'
        option country 'US'
        option disabled '0'
        option hwmode 'nacax'
        option txpower '20'
        option chann_extend '0'
        option beacon_int '100'
        option frag '2346'
        option rts '2347'

config wifi-iface 'default_radio00'
        option network 'lan'
        option encryption 'none'
        option device 'phy0'
        option isolate '0'
        option key '1234567890'
        option hidden '0'
        option maxassoc '32'
        option mode 'ap'
        option ssid 'iGate5G'
        option disabled '0'
        option short_preamble '0'
        option dtim_period '1'

config wifi-device 'phy1'
        option type 'mac80211'
        option path 'f4327000.pcie/pci0001:00/0001:00:00.0/0001:01:00.0'
        option channel '1'
        option channels '1-11'
        option band '2g'
        option htmode 'HE20'
        option country 'US'
        option legacy_rates '1'
        option is_2g_256qam '1'
        option disabled '0'
        option hwmode 'nax'
        option txpower '20'
        option chann_extend '0'
        option beacon_int '100'
        option frag '2346'
        option rts '2347'

config wifi-iface 'default_radio10'
        option network 'lan'
        option encryption 'none'
        option device 'phy1'
        option isolate '0'
        option key '1234567890'
        option hidden '0'
        option maxassoc '32'
        option mode 'ap'
        option ssid 'iGate2G'
        option disabled '0'
        option short_preamble '0'
        option dtim_period '1'

this is my config and i check txpower with command iwinfo:

wlan0     ESSID: "iGate5G"
          Access Point: 4C:12:E8:4F:5B:98
          Mode: Master  Channel: 36 (5.180 GHz)
          Center Channel 1: 50 2: unknown
          Tx-Power: 12 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: none
          Type: nl80211  HW Mode(s): 802.11nacax
          Hardware: 10EC:C852 10EC:C852 [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

wlan1     ESSID: "iGate2G"
          Access Point: 4C:12:E8:4F:5B:99
          Mode: Master  Channel: 1 (2.412 GHz)
          Center Channel 1: 1 2: unknown
          Tx-Power: 12 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: none
          Type: nl80211  HW Mode(s): 802.11bgnax
          Hardware: 10EC:0192 10EC:0192 [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy1

you can see that txpower always is 12dBm.
I check limited txpower with iw reg get:

phy#1 (self-managed)
country US: DFS-FCC
        (902 - 904 @ 2), (N/A, 30), (N/A)
        (904 - 920 @ 16), (N/A, 30), (N/A)
        (920 - 928 @ 8), (N/A, 30), (N/A)
        (2400 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
        (5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
        (57240 - 71000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country US: DFS-FCC
        (902 - 904 @ 2), (N/A, 30), (N/A)
        (904 - 920 @ 16), (N/A, 30), (N/A)
        (920 - 928 @ 8), (N/A, 30), (N/A)
        (2400 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
        (5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
        (57240 - 71000 @ 2160), (N/A, 40), (N/A)

Specifies the maximum transmit power the wireless radio may use. Depending on regulatory requirements and wireless usage, the actual transmit power may be reduced by the driver.

We can work on zeroing down why that may be if I could only get the 'ubus call system board' call results posted, unredacted.
Metaphorically, you are asking why your car will not get up to 100MPH and for all I know you are driving a 1980's Pinto.

1 Like

OpenWrt's default (and only) user is root. Are you running an official OpenWrt build from downloads.openwrt.org?

I also noticed that aside from a few other non-default WiFi settings, this configuration is not documented in OpenWrt whatsoever.

As @LilRedDog noted - can you provide us more details on the firmware you're running?

1 Like

HW Mode(s): 802.11nacax

not openwrt output

2 Likes