OpenWrt Forum Archive

Topic: TX power show on Web as 15dBm

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello All,

I am using MR3020 router and my current country code is set to India IN. I can see tx power maximum is 18 in iw list. But I am unable to see that value on my webpage
In file packages/kernel/mac80211/files/regdb.txt it show 20dBm for India as show below

country IN: DFS-JP
    (2402 - 2482 @ 40), (20)
    (5170 - 5250 @ 80), (20)
    (5250 - 5330 @ 80), (20), DFS
    (5735 - 5835 @ 80), (20)
I have read in Smörgåsbord » WiFi regulatory compliance, and how to fix it.html, that because tp-link sets all its devices to US, we have this problem. I was not able to work out the solution given in above webpage

Here is my wireless config also

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11ng'
    option country 'IN'
    option path 'platform/ar933x_wmac'
    list ht_capab 'SHORT-GI-20'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option htmode 'HT20'
    option disabled '0'
    option channel '1'
    option txpower '20'

Also My channel list from iw list command is

Frequencies:
            * 2412 MHz [1] (15.0 dBm)
            * 2417 MHz [2] (18.0 dBm)
            * 2422 MHz [3] (18.0 dBm)
            * 2427 MHz [4] (18.0 dBm)
            * 2432 MHz [5] (18.0 dBm)
            * 2437 MHz [6] (18.0 dBm)
            * 2442 MHz [7] (18.0 dBm)
            * 2447 MHz [8] (18.0 dBm)
            * 2452 MHz [9] (18.0 dBm)
            * 2457 MHz [10] (18.0 dBm)
            * 2462 MHz [11] (15.0 dBm)
            * 2467 MHz [12] (disabled)
            * 2472 MHz [13] (disabled)
            * 2484 MHz [14] (disabled)

Can any one guide me how to change the webpage value to 20 plz.

Thanks and Regards
Nikhil

Hi.
I think I read some place that 18dbm is the max tx-power the MR3020 can transmit at.
But I hope I am wrong. Would be really nice if this box can go up to 20.

Regards

Hi Context,

Even though Tx power is 18dBm, on luci webpage it shows only 15dBm. It takes lower limit. But in India, i Think the TX POWER for all channels is 20dBm and also the same has been mentioned in db.txt / regit.txt, which actually sets your regulatory actions

So can anyone help me how to change this settings.

Regards
Nikhil

Well,the eeprom of your Atheros chip is set by Qualcom to comply, in this case 18dbm, plus 2dbi antenna, then comply with the regulation of 20db.

To make the AR9331 to work at 20dbm,use Jow's patch. Openwrt has an agreement with Qualcom, the ART is locked.
Or you can compile yourself with the reg option turned on.

eeff11 wrote:

Well,the eeprom of your Atheros chip is set by Qualcom to comply, in this case 18dbm, plus 2dbi antenna, then comply with the regulation of 20db.

To make the AR9331 to work at 20dbm,use Jow's patch. Openwrt has an agreement with Qualcom, the ART is locked.
Or you can compile yourself with the reg option turned on.

So there is a way to get it up to 20dbm then?

I have u-boot_mod on my router now so I can flash new ART section.
Do you know what I have to change in the ART data to get it up to 20?
Or do you have some link to Jow's patch?

Hey Eeff,

Thanks for the idea.. As Context has said, do you know the address where this is declared. I think I know how to modify it and update, just need the address.

Regards
Nikhil

Context.EAX wrote:
eeff11 wrote:

Well,the eeprom of your Atheros chip is set by Qualcom to comply, in this case 18dbm, plus 2dbi antenna, then comply with the regulation of 20db.

To make the AR9331 to work at 20dbm,use Jow's patch. Openwrt has an agreement with Qualcom, the ART is locked.
Or you can compile yourself with the reg option turned on.

So there is a way to get it up to 20dbm then?

I have u-boot_mod on my router now so I can flash new ART section.
Do you know what I have to change in the ART data to get it up to 20?
Or do you have some link to Jow's patch?

Yes, the AR9331 soc chip is at 20dbM, check qulcomm's product page.
Jow's patch

ssh root@openwrt

On ar71xx:

cd /tmp/
wget http://luci.subsignal.org/~jow/reghack/reghack.mips.elf
chmod +x reghack.mips.elf
./reghack.mips.elf /lib/modules/*/ath.ko
./reghack.mips.elf /lib/modules/*/cfg80211.ko
reboot

After running the patch I can see now that I can use some extra channels:
Frequencies:
* 2412 MHz [1] (30.0 dBm)
* 2417 MHz [2] (30.0 dBm)
* 2422 MHz [3] (30.0 dBm)
* 2427 MHz [4] (30.0 dBm)
* 2432 MHz [5] (30.0 dBm)
* 2437 MHz [6] (30.0 dBm)
* 2442 MHz [7] (30.0 dBm)
* 2447 MHz [8] (30.0 dBm)
* 2452 MHz [9] (30.0 dBm)
* 2457 MHz [10] (30.0 dBm)
* 2462 MHz [11] (30.0 dBm)
* 2467 MHz [12] (30.0 dBm)
* 2472 MHz [13] (30.0 dBm)
* 2484 MHz [14] (disabled)

I tested with channel 13 and it worked fine. However i was not able to set 20dbm txpower. The max value i can use is still 18dbm

What was this about needing write access to ART section?

After playing with it a bit I changed the region code to my local country and now the list looks like this:

Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)

And suddenly now I am able to get 20dbm txpower smile

root@OpenWrt:~# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  Mode:Master  Tx-Power=20 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

eth0      no wireless extensions.

Big thanks for the regpatch tip smile
Imagine now this little thing with a 10-20dbi gain antenna smile (I have the external antenna mod)

Regards

When I reboot my router txpower will beset to 15dbm again. The only way I found to set it back to 20 was to change region and back again.
I added some commands to rc.local for it to set 20 after boot.

wifi down
iw reg set JP
wifi up

in my wireless config I have my country as region so wifi up will bring it back to my country code.

Anyone else have the same problem?

no country code,world "00".
It shall stay 20dbm.

The discussion might have continued from here.