TP-Link Archer A7 v5, OpenWrt 21.02.1, 2.4 GHz Max TXPOWER only 17 dBm

Hello OpenWRT Devs,

First of all, thank you so much for making OpenWRT available for TP-Link Archer A7 v5. Everything is working good in version 21.02.1 including SQM over PPPoE WAN interface. The only issue I have is the 2.4 GHz WiFi range seems to be low for this device. Country is "India". Below is my /etc/config/wireless:

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option require_mode 'n'
	option path 'platform/ahb/18100000.wmac'
	option cell_density '0'
	option htmode 'HT20'
	option beacon_int '100'
	option country 'IN'
	option txpower '20'
	option channel '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option require_mode 'n'
	option path 'pci0000:00/0000:00:00.0'
	option cell_density '0'
	option beacon_int '100'
	option htmode 'VHT40'
	option channel '36'
	option country 'IN'
	option txpower '30'
	option disabled '1'

config wifi-iface 'wlan_2dot4ghz'
	option ifname 'wlan_2.4ghz'
	option device 'radio0'
	option network 'lan_1'
	option mode 'ap'
 	option ssid '<SSID>'
	option key '<PASSWORD>'
	option encryption 'psk2+ccmp'
	option disassoc_low_ack '0'
	option ieee80211w '1'
	option isolate '1'

config wifi-iface 'wlan_5ghz'
	option ifname 'wlan_5ghz'
	option device 'radio1'
	option network 'lan_1'
	option mode 'ap'
	option ssid '<SSID>'
	option key '<PASSWORD>'
	option encryption 'psk2+ccmp'
	option disassoc_low_ack '0'
	option ieee80211w '1'
	option isolate '1'

I have tried Channel 1, 6, 11 but the TXPOWER always seems to be set only to 17 dBm (as shown in LuCI) although India allows upto Max 20 dBm.

For comparison, I have a TP-Link TD-W9970 v4 (VDSL2 Modem Router combo) device running OEM firmware (no OpenWRT available for that device) that has better 2.4 GHz WiFi range than the Archer A7 running OpenWRT. The ISP provided ONT device (re-badged https://www.gpononu.com/dual-mode-onu/xpon-hg323rwf858464def80de3769691395.html ) also has better 2.4 GHz WiFi range compared to the Archer A7.

How do I make sure the 2.4 GHz TXPOWER is set to 20 dBm?

EDIT: WiFi Driver Channel Power details at TP-Link Archer A7 v5, OpenWrt 21.02.1, 2.4 GHz Max TXPOWER only 17 dBm - #3 by ka2107

Would you please share the output from the command iw phy phy0 channels? This should list the maximum power for all 2.4GHz channels provided by the Wifi driver.

Please note phy0 is 5 GHz radio (radio1 in my /etc/config/wireless) and phy 1 is 2.4 GHz radio (radio0 in my /etc/config/wireless).

root@ARCHER-A7:~# iw phy phy1 channels
Band 1:
	* 2412 MHz [1] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40+
	* 2417 MHz [2] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40+
	* 2422 MHz [3] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40+
	* 2427 MHz [4] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40+
	* 2432 MHz [5] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2437 MHz [6] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2442 MHz [7] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2447 MHz [8] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2452 MHz [9] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2457 MHz [10] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40-
	* 2462 MHz [11] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40-
	* 2467 MHz [12] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40-
	* 2472 MHz [13] 
	  Maximum TX power: 20.0 dBm
	  Channel widths: 20MHz HT40-
	* 2484 MHz [14] (disabled)
root@ARCHER-A7:~# iw phy phy0 channels
Band 2:
	* 5180 MHz [36] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40+ VHT80
	* 5200 MHz [40] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5220 MHz [44] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5240 MHz [48] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5260 MHz [52] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5280 MHz [56] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5300 MHz [60] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5320 MHz [64] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- VHT80
	* 5500 MHz [100] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40+ VHT80
	* 5520 MHz [104] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5540 MHz [108] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5560 MHz [112] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5580 MHz [116] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5600 MHz [120] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5620 MHz [124] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5640 MHz [128] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5660 MHz [132] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5680 MHz [136] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5700 MHz [140] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5720 MHz [144] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- VHT80
	* 5745 MHz [149] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40+ VHT80
	* 5765 MHz [153] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5785 MHz [157] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5805 MHz [161] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5825 MHz [165] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5845 MHz [169] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- HT40+ VHT80
	* 5865 MHz [173] 
	  Maximum TX power: 30.0 dBm
	  Channel widths: 20MHz HT40- VHT80

I have such a device and I observe the same behavior. If you change the country code to 'US', you will be able to release the full supported TX power.

However, this would be your country's Wi-Fi regulations breach, so it is up to you to decide if this information is of any use to you.

1 Like

You are right. Changing the country code to 'US' for the 2.4 GHz radio allows full 20 dBm TXPOWER. Looks like for 'US' the max allowed TXPOWER is 24 dBm which is higher than 20 dBm allowed for 'IN'. So I restricted the max txpower using 'option txpower' in the config and that seems to work.

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option require_mode 'n'
        option path 'platform/ahb/18100000.wmac'
        option cell_density '0'
        option htmode 'HT20'
        option beacon_int '100'
        option txpower '20'
        option channel '1'
        option country 'US'
root@ARCHER-A7:~# iw phy phy1 channels
Band 1:
	* 2412 MHz [1] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40+
	* 2417 MHz [2] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40+
	* 2422 MHz [3] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40+
	* 2427 MHz [4] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40+
	* 2432 MHz [5] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2437 MHz [6] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2442 MHz [7] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40- HT40+
	* 2447 MHz [8] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40-
	* 2452 MHz [9] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40-
	* 2457 MHz [10] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40-
	* 2462 MHz [11] 
	  Maximum TX power: 24.0 dBm
	  Channel widths: 20MHz HT40-
	* 2467 MHz [12] (disabled)
	* 2472 MHz [13] (disabled)
	* 2484 MHz [14] (disabled)
1 Like

Hi Felix @nbd , from what I understand you wrote the ath9k driver. Can you please tell me why the TP-Link Archer A7 v5 is limiting its TXPOWER to 17 dBm rather than max allowed 20 dBm (for Country: India). I tried web searching for answers but couldn't find any. Can you please point me to any document that explains why the TXPOWER is restricted?

I am not seeing similar behavior from a Belkin RT3200 (currently running 22.03-SNAPSHOT) in a different location but in the same city and ISP. The mt76 driver in RT3200 is providing TXPOWER of 20 dBm.

Below is the /etc/config/wireless from the TP-Link Archer A7 v5:

config wifi-device 'radio0'
	option type 'mac80211'
	option band '2g'
	option require_mode 'n'
	option path 'platform/ahb/18100000.wmac'
	option cell_density '0'
	option htmode 'HT20'
	option beacon_int '100'
	option channel '1'
	option country 'IN'

config wifi-iface 'wlan0_2ghz'
	option device 'radio0'
	option network 'lan_1'
	option mode 'ap'
	option encryption 'psk2+ccmp'
	option disassoc_low_ack '0'
	option ieee80211w '0'
	option ssid 'SSID'
	option key 'PASSWORD'
	option ifname 'wlan0_2ghz'
	option auth_cache '1'
	option wpa_disable_eapol_key_retries '1'
	option tdls_prohibit '1'
	option dtim_period '5'

Below is the /etc/config/wireless from the Belkin RT3200:

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/18000000.wmac'
	option channel '1'
	option band '2g'
	option require_mode 'n'
	option htmode 'HT20'
	option cell_density '0'
	option beacon_int '100'
	option country 'IN'

config wifi-iface 'wlan0_2ghz'
	option ifname 'wlan0_2ghz'
	option device 'radio0'
	option mode 'ap'
	option ssid 'SSID'
	option key 'PASSWORD'
	option network 'lan_1'
	option disassoc_low_ack '0'
	option ieee80211w '0'
	option auth_cache '1'
	option wpa_disable_eapol_key_retries '1'
	option tdls_prohibit '0'
	option encryption 'psk2+ccmp'
	option dtim_period '5'

This might be because of limits included in the radio's configuration settings (which might be configured incorrectly). These settings are usually included in a separate mtd partition (e.g. often names "art", "caldata" or similar).

Also there may be an adjustment for the antenna gain (e.g. if your regulations state that you need to have max 20dBm EIRP, and you have a 3dbi gain antenna, then you would need to set the txpower to 17dBm). I'm not sure how the regulatory db actually handles this - because as far as I understand it, some countries specify their max tx power in absolute terms (i.e. "you can transmit at 300mW into any antenna", and some specify it as maximum EIRP (i.e. maximum directional antenna gain is counted into the limit like the 17dBm into a 3dBi antenna = 20dBm EIRP example).

May I suggest the following post Which country is less restrictive on 2.4 Ghz and 5 Ghz signal (Channels) - #4 by lleachii

India's wireless-regdb rules were corrected upstream in the latest release dated 2023-05-03. India actually allows upto 30 dBm max txpower (same as USA) but the wireless-regdb upstream had max txpower incorrectly set to 20 dBm for India. This has been corrected now.

However even after this wireless-regdb update, the Archer A7 v5 still only provides 17 dBm max txpower, while "iw" output shows max txpower available as 24 dBm (less than 30 dBm due to router hardware limitation).

Any idea why max txpower is still restricted to 17 dBm? Is this restricted by the ath9k driver based on regulatory domain?

It's also restricted by the firmware.
There are some hardware limits for each modulation/bandwidth, so it could be far less for the high-order modulations. Also, there are some basic regulatory limits inside.

You may try if the latest stock firmware will do anything in terms of update. Modifying it yourself or using the already patched firmware of another device is not recommended. Even some small changes (still complying the regulatory limits) can result a signal distortion which will impact the achievable throughput and may jam any other devices/services in the area. The maximum power level (without distortion) will likely be different even between the antennas of the same device. If your device has external LNAs/PAs (used as a part of the antenna combiners/diplexers) they will still limit the signal levels. So it's unlikely 30dBm to be achievable. Also the 20dBm could be the sum of all the antennas. For example on device having 20dBm with two TX antennas, if you disable the second one you will be possibly limited to 17dBm, since 2x17dBm is 20dBm. So if using fewer TX antennas will reduce it further. Possibly your device is hardware limited to 18dBm per antenna.

AFAIK ath9k is a "fully" open-source wifi driver which doesn't require a proprietary firmware.

The max txpower is set to 24 dBm if I set the country to US (USA), but once I change it back to IN (India) it goes back to 17 dBm.

As already explained the firmware contains the regulatory data and the power levels for each modulation. Yours is likely outdated. If you remove the radio firmware partition, it won't start. The calibration data inside could be even unique per device. If you bypass it, the radio won't transmit anything useful if you set the TX power to 20dBm for 64QAM for example, so the driver needs this data.
You may check your version of the kernel wireless-regdb for some country matching or close to your current regulations instead using "US". If possible set the 5Ghz radio (separately) to the correct country, since the list of the permitted and the DFS channels is different per country. :warning: Failing to set the 5Ghz correctly is likely to break the local regulatory requirements.