Maximum txpower within allowed regulatory domain

Hi guys.

I setup Canada's regulatory domain (CA) for my AP TP-link 1043ND v2.1 running 18.06.1 r7258-5eb055306f

+++++++++++
root@ap:/home/sam# iwinfo wlan0 cou | grep CA

  • CA CA
    +++++++++++

with transmit power 23 dbm

+++++++++++
config wifi-device 'radio0'
option country 'CA'
option txpower '25'
+++++++++++

setup channel 11 w/ sub-channel 7 bellow channel 11

+++++++++++
root@ap:/home/sam# grep chann /etc/config/wireless
option channel '11'
option htmode 'HT40-'
root@ap:/home/sam#
+++++++++++

rebooted AP, but from iwinfo output I see AP still using 20dbm (bold bellow)

+++++++++++
root@ap:/home/sam# iwinfo wlan0 tx
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)
root@ap:/home/sam#
+++++++++++

where is CA regulatory domain allows channel 11 & 25.0 dBm (bold bellow)

+++++++++++
root@ap:/home/sam# iw list | grep -A 15 Frequencies:
Frequencies:
* 2412 MHz [1] (25.0 dBm)
* 2417 MHz [2] (25.0 dBm)
* 2422 MHz [3] (25.0 dBm)
* 2427 MHz [4] (25.0 dBm)
* 2432 MHz [5] (25.0 dBm)
* 2437 MHz [6] (25.0 dBm)
* 2442 MHz [7] (25.0 dBm)
* 2447 MHz [8] (25.0 dBm)
* 2452 MHz [9] (25.0 dBm)
* 2457 MHz [10] (25.0 dBm)
*** 2462 MHz [11] (25.0 dBm)**
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
valid interface combinations:
root@ap:/home/sam#
+++++++++++

Could somebody explain what is wrong and how to achieve 316 mW for txpower?

Thank you.

addition.

Whenever I manually tried to setup 25 dbm for wlan0 I got "command failed" error:

+++++++++++
root@ap:/home/sam# iw dev wlan0 set txpower fixed 25
command failed: Not supported (-122)
root@ap:/home/sam#
+++++++++++

does it mean maximum 20 dbm hardcoded in EIRP?

Txpower numbers are not always consistent because they may or may not include antenna gain or other factors.

In general if you leave txpower unset, you will get the highest power the driver is going to allow for your country setting.

1 Like

hmm... Thank you for explanation but one more question appears. Whenever I setup reg domain to CA (looks like system accepted it, last three lines bellow)
+++++++++++++
root@ap:/home/sam# dmesg | grep ath:
[ 10.767386] ath: EEPROM regdomain: 0x0
[ 10.767394] ath: EEPROM indicates default country code should be used
[ 10.767397] ath: doing EEPROM country->regdmn map search
[ 10.767410] ath: country maps to regdmn code: 0x3a
[ 10.767415] ath: Country alpha2 being used: US
[ 10.767418] ath: Regpair used: 0x3a
[ 25.927369] ath: EEPROM regdomain: 0x807c
[ 25.931440] ath: EEPROM indicates we should expect a country code
[ 25.937666] ath: doing EEPROM country->regdmn map search
[ 25.943048] ath: country maps to regdmn code: 0x3a
[ 25.947916] ath: Country alpha2 being used: CA
[ 25.952419] ath: Regpair used: 0x3a
[ 25.955965] ath: regdomain 0x807c dynamically updated by user
+++++++++++++

I see from regulatory get output globally reg domain has changed to CA but device phy0 still using US one.

+++++++++++++
root@ap:/home/sam# iw reg get
global
country CA: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5600 @ 80), (N/A, 24), (0 ms), DFS
(5650 - 5730 @ 80), (N/A, 24), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)

phy#0
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)

root@ap:/home/sam#
+++++++++++++

could be device and/or device driver limitation?

+++++++++++++
root@ap:/home/sam# dmesg | grep ieee80211
[ 10.784149] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 10.787835] ieee80211 phy0: Atheros AR9550 Rev:0 mem=0xb8100000, irq=47
root@ap:/home/sam#
+++++++++++++

I've found openwrt image for that tplink 1043nd is "outdated" a bit:
I'm running 18.06.1 r7258-5eb055306f for that AP but latest one is 18.06.5

What do you think?