Skip to content

Instantly share code, notes, and snippets.

@francoism90
Last active July 10, 2024 16:49
Show Gist options
  • Save francoism90/3dede7973354d067c41bff5e54203fe9 to your computer and use it in GitHub Desktop.
Save francoism90/3dede7973354d067c41bff5e54203fe9 to your computer and use it in GitHub Desktop.
Change country to unlock channels, increase TX-power. (Use at your own risk)

Warning

Following instructions are provided without any warranty, and may even get you in trouble legally. The instructions are provided for testing, and should be use with care. We (including commentators) are not responsible for any damage to your device(s).

Introduction

This may enable additional channels and power (in most cases don't) on ASUS Merlin provided routers.

The nvram settings have been tested on a ASUS RT-AX58U, they may work on other models as well (ASUS RT-AC78U).

Please use nvram dump and adjust when needed, as they may differ on your device!

Credits to the commentators below, and members on the SNBForums posting instructions. Please post your findings, and help others when needed. :)

Login into router using SSH

See https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/ for instructions.

Backup current settings

nvram dump > dump.txt

NOTE: You need to copy the dump.txt (or output by nvram dump to somewhere else), as they will be lost on reboot

JFFS custom scripts and configs

Make sure Enable JFFS custom scripts and configs, is enabled in System settings. See https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts for details.

Make sure to also run the following commands:

nvram set jffs2_scripts="1"
nvram commit

User-scripts

Create the /jffs/scripts/wl file, and paste the nvram overwrites into this file (see given example file).

Create/adjust /jffs/scripts/init-start:

#!/bin/sh

[ -x /jffs/scripts/wl ] && /jffs/scripts/wl &
# [ -x /jffs/addons/AdGuardHome.d/AdGuardHome.sh ] && /jffs/addons/AdGuardHome.d/AdGuardHome.sh init-start & # place before addons

Create/adjust /jffs/scripts/services-start:

#!/bin/sh

/jffs/scripts/wl >/dev/null 2>&1 & # wl
# /jffs/scripts/scmerlin startup & # scMerlin

Create/adjust /jffs/scripts/service-event:

#!/bin/sh

if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl

Create/adjust /jffs/scripts/service-event-end:

#!/bin/sh

if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl

Make sure the scripts are executable:

chmod a+rx /jffs/scripts/*

Applying changes

You need to reboot the router to apply changes:

reboot

To make the changes persistent, make sure to add them to the jffs/scripts/wl script.

#!/bin/sh
# Allow all channels
nvram set location_code=#a
nvram set 0:ccode=#a
nvram set 0:regrev=0
nvram set 1:ccode=#a
nvram set 1:regrev=0
nvram set territory_code=CN/02 # or US/02
nvram set wl_country_code=#a
nvram set wl_reg_mode=h
nvram set wl0_chlist="1 2 3 4 5 6 7 8 9 10 11 12 13 14"
nvram set wl0_country_code=#a
nvram set wl0_country_rev=0
nvram set wl0_reg_mode=h
nvram set wl1_chlist="36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 169 173 177"
nvram set wl1_country_code=#a
nvram set wl1_country_rev=0
nvram set wl1_reg_mode=h
nvram set acs_dfs=0
nvram set wl_acs_excl_chans_dfs=
nvram set wl_acs_excl_chans=
nvram set wl0_acs_dfs=0
nvram set wl0_acs_excl_chans_base=
nvram set wl0_acs_excl_chans=
nvram set wl1_acs_dfs=0
nvram set wl1_acs_excl_chans_base=
nvram set wl1_acs_excl_chans=
nvram set acs_unii4=1
# Channel selection
# nvram set wl0_chanspec=0 # auto select
# nvram set wl1_chanspec=0 # auto select
# nvram set wl_chanspec=0 # auto select
# nvram set wl0_sel_channel=7/80 # force 2.4GHz channel
# nvram set wl1_sel_channel=149/80 # force 5GHz channel
# Set TX-Power (risky!)
nvram set 0:maxp2ga0=120
nvram set 0:maxp2ga1=120
nvram set 1:maxp5gb0a0=120
nvram set 1:maxp5gb0a1=120
nvram set 1:maxp5gb0a2=120
nvram set 1:maxp5gb0a3=120
nvram set 1:maxp5gb1a0=120
nvram set 1:maxp5gb1a1=120
nvram set 1:maxp5gb1a2=120
nvram set 1:maxp5gb1a3=120
nvram set 1:maxp5gb2a0=120
nvram set 1:maxp5gb2a1=120
nvram set 1:maxp5gb2a2=120
nvram set 1:maxp5gb2a3=120
nvram set 1:maxp5gb3a0=120
nvram set 1:maxp5gb3a1=120
nvram set 1:maxp5gb3a2=120
nvram set 1:maxp5gb3a3=120
nvram set 1:maxp5gb4a0=120
nvram set 1:maxp5gb4a1=120
nvram set 1:maxp5gb4a2=120
nvram set 1:maxp5gb4a3=120
nvram set wl0_txpower=500
nvram set wl1_txpower=500
nvram set wl_txpower=500
# Commit changes
nvram commit
@Linden1
Copy link

Linden1 commented Mar 9, 2024

Using eth7 specific to my router

  1. 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 144 149 153 157 161 165

  2. wl: Bad Channel

  3. SSID: "REDACTED"
    Mode: Managed RSSI: 0 dBm SNR: 0 dB noise: -88 dBm Channel: 149/80
    BSSID: 11:22:33:44:55 Capability: ESS RRM
    Supported Rates: [ 6(b) 9 12 18 24(b) 36 48 54 ]
    HE Capable:
    Chanspec: 5GHz channel 155 80MHz (0xe09b)
    Primary channel: 149
    HT Capabilities: 40MHz SGI20 SGI40
    Supported HT MCS : 0-31
    Supported VHT MCS:
    NSS1 Tx: 0-11 Rx: 0-11
    NSS2 Tx: 0-11 Rx: 0-11
    NSS3 Tx: 0-11 Rx: 0-11
    NSS4 Tx: 0-11 Rx: 0-11
    Supported HE MCS:
    20/40/80 MHz:
    NSS1 Tx: 0-11 Rx: 0-11
    NSS2 Tx: 0-11 Rx: 0-11
    NSS3 Tx: 0-11 Rx: 0-11
    NSS4 Tx: 0-11 Rx: 0-11
    160 MHz:
    NSS1 Tx: 0-11 Rx: 0-11
    NSS2 Tx: 0-11 Rx: 0-11
    NSS3 Tx: 0-11 Rx: 0-11
    NSS4 Tx: 0-11 Rx: 0-11

EDIT It just seems my router is not UNII-4 capable. Maybe it's time to accept that.

@pasko-zh
Copy link

@Linden1
Are you sure your router model supports U-NII-4 band, channel 169-177?

What do you get if you do wl -i eth7 country?

Did you set in NVRAM init script
nvram set wl1_chlist="36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 169 173 177"

@Linden1
Copy link

Linden1 commented Mar 10, 2024

What do you get if you do wl -i eth7 country?

Default would be DE , but with the script #a (#a/0) - which should give me all channels.

Yes, channel list exactly as you have it. I know the script itself is working as I now have channels 149-165, giving me 149/80, nothing higher.

wl -i eth7 channels returns:
36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 144 149 153 157 161 165

@pasko-zh
Copy link

hmmm :-/ weird... I had once an issue, that U-NII-4 channels were not selectable ("were not there") because I did not set them in NVRAM via init-script.
What kind of router model do you have AX88U or new one AX88U PRO?

@Linden1
Copy link

Linden1 commented Mar 10, 2024

The good old RT-AX88U (not Pro).

I have the original "nvram set acs_unii4=1" in the script, but that makes no difference, even if I set it to 0(zero) or comment it out.

@pasko-zh
Copy link

pasko-zh commented Mar 10, 2024

Well, then I don't know what else could help....

(but at least you can use all other 5G channels without DFS and full power 😁. Sure, U-NII-4 would give you another 160 MHz channel...)

@Warborn123
Copy link

Hi, I just got my hands on the new BE98 (non-Pro, UK version), and it seems like nvram set 1:ccode=ALL, nvram set 2:ccode=ALL, nvram set 3:ccode=ALL do not work on this router after setting the country code to AU (nvram set location_code=AU). This is quite frustrating because Australia does not permit channels 116-128, so my 5G-2 can only be set to 80MHz. I also tried setting the country code to the US, but for some strange reason, only my Samsung S24 Ultra can find the 6GHz channel. My Intel(R) Wi-Fi 6E AX210 and iPhone 15 Pro Max cannot find the 6GHz channel at all...

@pasko-zh
Copy link

pasko-zh commented Mar 21, 2024

@Warborn123
Try to work with the wl command. See my comments above how to use it to set country, disable DSF, set tx power, etc., see here or this one.

To help others having the same router model as you, please post the output of the corresponding wl commands here. For instance, wl country list or wl -i eth8 channels (on my GT-AXE11000 eth8 corresponds to the 6G).

When you set a country or channel, then always check with the wl command, if the settings are OK: wl -i eth8 status . Do not check it on your wifi clients!

Your wifi clients, e.g., mobile phone, laptop, have also regulatory settings which affect connectivity, for instance no 6G wifi. Your apple phone will most likeley set its regulatory wifi country to what it reads from telco network. On a rooted android device, you can override this via sudo iw reg set COUNTRY. But since apple is super closed source... nothing to do here...

Intel... well.... they use LAR algorithm to detect the country settings. This is a super shitty thing. Because LAR fails more often than succeeding. And if you are unlucky, it cannot determine a country based on beacon signals from neighbour's wifi and uses "world region", which has no 6G wifi channels.
Also note: Win10 and Intel cards = No 6 GHz wifi, you need win11.

Thus, replace your AX210 with Mediatek MT7922. (! only possible if your laptop does not have proprietary intel CNVio(2) interfaces!)
The MT7922 works perfect and stable with all my lenovo laptops, also under Ubuntu. No stupid LAR.
And as a bonus: You can even use 6GHz wifi with win10.

@Warborn123
Copy link

@Warborn123 Try to work with the wl command. See my comments above how to use it to set country, disable DSF, set tx power, etc., see here or this one.

To help others having the same router model as you, please post the output of the corresponding wl commands here. For instance, wl country list or wl -i eth8 channels (on my GT-AXE11000 eth8 corresponds to the 6G).

When you set a country or channel, then always check with the wl command, if the settings are OK: wl -i eth8 status . Do not check it on your wifi clients!

Your wifi clients, e.g., mobile phone, laptop, have also regulatory settings which affect connectivity, for instance no 6G wifi. Your apple phone will most likeley set its regulatory wifi country to what it reads from telco network. On a rooted android device, you can override this via sudo iw reg set COUNTRY. But since apple is super closed source... nothing to do here...

Intel... well.... they use LAR algorithm to detect the country settings. This is a super shitty thing. Because LAR fails more often than succeeding. And if you are unlucky, it cannot determine a country based on beacon signals from neighbour's wifi and uses "world region", which has no 6G wifi channels. Also note: Win10 and Intel cards = No 6 GHz wifi, you need win11.

Thus, replace your AX210 with Mediatek MT7922. (! only possible if your laptop does not have proprietary intel CNVio(2) interfaces!) The MT7922 works perfect and stable with all my lenovo laptops, also under Ubuntu. No stupid LAR. And as a bonus: You can even use 6GHz wifi with win10.

Thank you for your comments. I'm not sure if I did it right or not, but it seems like the router doesn't support sl commands?

jack@GT-BE98-4D80:/tmp/home/root# wl help
wl: Unsupported
jack@GT-BE98-4D80:/tmp/home/root# wl -i eth8 channels
wl: wl driver adapter not found

But the wl country list from your previous post works for some reason:

jack@GT-BE98-4D80:/tmp/home/root# wl country list
Supported countries: country code and long name
AU      AUSTRALIA
E0
JP      JAPAN
US      UNITED STATES

And surprisingly, when set to E0, AU or JP, both my iPhone and AX210 can find the 6GHz band, but they all have very weak 6GHz transmission power (-48dBm @ 2 meters), only the US location code will give a reasonable transmission power (-36dB, @ 2 meters), so I'm very sad there.

And yes, I would definitely want to change to a Mediatek wireless card, but unfortunately my AX210 chip is embedded in my computer's motherboard, so it's impossible to upgrade unless I buy one of those PCI-E Wi-Fi adapters.

I saw that you mentioned about AX2xx wireless card will likely not work because of the LAR, have you tried the AX4xx family, like AX411? or the BE200? Did Intel remove LAR on those wireless cards? Because I think chances are, the next ASUS motherboard I get will come with an Intel wireless card, unfortunately.

I like Win11, so I have no problem there :)

Lastly, do you know what difference does the country_rev do? My router support 3 country_rev code for the US, but I see no difference changing those numbers:

jack@GT-BE98-4D80:/tmp/home/root# wl country_rev US
count: 3
0 102 103

Thank you!

@pasko-zh
Copy link

"Thank you for your comments. I'm not sure if I did it right or not, but it seems like the router doesn't support sl commands?"
It is wl -h and for the interfaces: check which ones you have for instance with ifconig, with Asus usually the highest number is the 6 GHz Wifi, as I said, for my router it is eth8.

@pasko-zh
Copy link

😯😨😨

You do not have country ALL???!!!
Shit, did Asus really remove this???!

What happens, if you try for your interface, ethX, 5 or 6 GHz

wl -i ethX down
wl -i ethX country ALL
wl -i ethX up

@Warborn123
Copy link

😯😨😨

You do not have country ALL???!!! Shit, did Asus really remove this???!

What happens, if you try for your interface, ethX, 5 or 6 GHz

wl -i ethX down
wl -i ethX country ALL
wl -i ethX up

Yep, that's right. Now when I set ccode=ALL, it will either change back to the original country (JP) or change to the US (E0,US,AU). You can only change location_code, wl_country_code and wl4_country_code to ALL, but since the ccode is locked, it doesn't really has any effect on the transmission power or frequency band. Let me try the new commands now and see whether that will work🥲

@Warborn123
Copy link

😯😨😨

You do not have country ALL???!!! Shit, did Asus really remove this???!

What happens, if you try for your interface, ethX, 5 or 6 GHz

wl -i ethX down
wl -i ethX country ALL
wl -i ethX up

I just tried all three commands here, and it all gives the same error message wl: Unsupported🫠

@pasko-zh
Copy link

Hmmm :-/

Since you have country US as a built-in country, will then setting like wl -i ethXX country US work?

btw, on which merlin verison are you? (I did not see your router model listed on asus merlin wrt page)

@Warborn123
Copy link

Hmmm :-/

Since you have country US as a built-in country, will then setting like wl -i ethXX country US work?

btw, on which merlin verison are you? (I did not see your router model listed on asus merlin wrt page)

Thank you for your reply. Nope, the command still doesn't work, wl: wl driver adapter not found as usual. I'm with the stock firmware, I'm afraid they haven't released a merlin firmware for this router yet. I don't really see the point of using the merlin firmware though, I did manage to unlock the frequency and increase the TX power on stock firmware with my AXE11000 here.

@Reeplosin
Copy link

Reeplosin commented Mar 24, 2024 via email

@Warborn123
Copy link

nvram commands are more efficient than wl commands, all you need to do is an nvram commit and the settings survive even reboots. wl commands even with an init start script, once the router reboots you have to run the sh command from the command prompt yourself, as the settings will clear and the router will revert to normal settings. it is not really efficient to rely on wl commands as much as I am curious about the differences from nvram commands and the potential, in practice without a command that you can set after an intentional or accidental reboot it is better to rely on nvram set commands if the router supports it Il ven 22 mar 2024, 23:24 A2E76W3 @.> ha scritto:

@.
* commented on this gist. ------------------------------ Hmmm :-/ Since you have country US as a built-in country, will then setting like wl -i ethXX country US work? btw, on which merlin verison are you? (I did not see your router model listed on asus merlin wrt page) Thank you for your reply. Nope, the command still doesn't work, wl: wl driver adapter not found as usual. I'm with the stock firmware, I'm afraid they haven't released a merlin firmware for this router yet. I don't really see the point of using the merlin firmware though, I did manage to unlock the frequency and increase the TX power on stock firmware with my AXE11000 here https://gist.github.com/francoism90/3dede7973354d067c41bff5e54203fe9?permalink_comment_id=4812096#gistcomment-4812096 . — Reply to this email directly, view it on GitHub https://gist.github.com/francoism90/3dede7973354d067c41bff5e54203fe9#gistcomment-4998029 or unsubscribe https://github.com/notifications/unsubscribe-auth/BAVJMKFMFBR7S5BBNRI27Q3YZSVTNBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TENZQG44TIONHORZGSZ3HMVZKMY3SMVQXIZI . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Hi, is there any way to force the nvram set 1:ccode=ALL and nvram set wl0_country_code=ALL command? These parameters revert to the original values after I commit the changes and restart the router now on the new model. Thanks.

@Reeplosin
Copy link

Reeplosin commented Mar 24, 2024 via email

@Warborn123
Copy link

Warborn123 commented Apr 23, 2024

I just noticed that the location of my router sends by the beacon is: DE, which presumably stands for Germany? Although my ccode and location code are set to US. I bought my router(ASUS BE98)here in the UK. Very strange. Can confirm this using S24 Ultra and winfi
1000006107
I'm more confused about my iPhone 15PM and AX210 that decided not to work with the 6GHz band.

@omrij
Copy link

omrij commented Apr 26, 2024

Guys, bad news. I think someone in ASUS saw our posts, after the last firmware update, I cannot change my ccode and country rev anymore... It will remain as US for my router now...

Doesn't work in what method? changing nvram or using wl commands?

@omrij
Copy link

omrij commented Apr 26, 2024

when using just this:

nvram set location_code=#a
nvram commit

don't you get all the channels/max power?

@Warborn123
Copy link

Sorry for the misinformation. It still works...My bad.

@omrij
Copy link

omrij commented May 3, 2024

Hi
Does anyone know how to disable DFS using nvram without changing country/local/transmit power?
I can do it using wl command but it's not persistent.

@francoism90
Copy link
Author

I think you need to change the country, as the chipset/firmware probably does some testing if it even can be disabled.

You don't have to change the transmit power. It's there as a reference.

Just a reminder: even when setting a different country or TX-power, it doesn't mean it actually works. The Intel chipsets most people have on their end devices, does some hidden checking and makes it really difficult to workaround certain 'hacks'.

So the given instructions, may or may work. It depends on your setup and maybe a bit of luck.

@omrij
Copy link

omrij commented May 3, 2024

Thanks, I guess I'll stick with wl method using services-start which works for me (but I wish it was persistent)

@pasko-zh
Copy link

pasko-zh commented May 4, 2024

Hi Does anyone know how to disable DFS using nvram without changing country/local/transmit power? I can do it using wl command but it's not persistent.

Just put all your WL commands in a bash script. Run it manually after a reboot of your router. I mean, I reboot my router once year or so...
Or, put in a script which is run after reboot, see documentation here https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts

@omrij
Copy link

omrij commented May 4, 2024

That's the way I do it now
Using services-start script and also service-event-end script (so it's running after every change made in wireless settings).
It's still more convinent to make the changes once using nvram which is also applicable to asuswrt and not only Merlin.

@825i
Copy link

825i commented May 29, 2024

This doesn't seem to work for my original AX88U (non pro). Which is originally set to "DE" (Germany) region.

Trying nvram command

I followed all the steps above and uncommented:
nvram set wl0_sel_channel=14/80 # force 2.4GHz channel

To try and set the 2.4Ghz channel to 14. After rebooting the router, it is still set to 13.

Trying Web GUI

I can see 14 as an option the "Wireless" tab in the router control panel.
If I try to set it to 14 in the Web GUI it reboots and sets it to 5 (Auto)...

If I go to Wireless > Professional > Right Click "Inspect" > CTRL+F "Country" > It shows "#a" like it should in the hidden setting.

Any other suggestions? I am just trying to get channel 14 because in the capital city every single other channel is completely saturated...


Here is my script. Do I need to replace the country code #a with something else? Is that why it's not working?

#!/bin/sh

# Allow all channels
nvram set location_code=#a
nvram set 0:ccode=#a
nvram set 0:regrev=0
nvram set 1:ccode=#a
nvram set 1:regrev=0
nvram set territory_code=CN/02 # or US/02
nvram set wl_country_code=#a
nvram set wl_reg_mode=h
nvram set wl0_chlist="1 2 3 4 5 6 7 8 9 10 11 12 13 14"
nvram set wl0_country_code=#a
nvram set wl0_country_rev=0
nvram set wl0_reg_mode=h
nvram set wl1_chlist="36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 169 173 177"
nvram set wl1_country_code=#a
nvram set wl1_country_rev=0
nvram set wl1_reg_mode=h
nvram set acs_dfs=0
nvram set wl_acs_excl_chans_dfs=
nvram set wl_acs_excl_chans=
nvram set wl0_acs_dfs=0
nvram set wl0_acs_excl_chans_base=
nvram set wl0_acs_excl_chans=
nvram set wl1_acs_dfs=0
nvram set wl1_acs_excl_chans_base=
nvram set wl1_acs_excl_chans=
nvram set acs_unii4=1

# Channel selection (these don't seem to do anything, so they're commented out)
# nvram set wl0_chanspec=0 # auto select
# nvram set wl1_chanspec=0 # auto select
# nvram set wl_chanspec=0 # auto select
# nvram set wl0_sel_channel=14/80 # force 2.4GHz channel
# nvram set wl1_sel_channel=149/80 # force 5GHz channel

Seems there's nothing I can do to actually use Channel 14 for 2.4Ghz.

@825i
Copy link

825i commented May 29, 2024

Ok adding on to what I have learned from fooling around a bit.

My AX88U shipped with "DE" country. This limited transmission power to 12, i.e.:

admin@RT-AX88U-9B20:/tmp/home/root# wl txpwr_target_max
Maximum Tx Power Target (chanspec:0x100d):      12.00  12.00  12.00  12.00

After copying the example script and rebooting the router:

admin@RT-AX88U-9B20:/tmp/home/root# wl txpwr_target_max
Maximum Tx Power Target (chanspec:0x100d):      26.00  26.00  26.00  26.00

So the Tx power has increased by a bit over double. I can also see from numerous WiFi apps and also the Asus Site Survey/WiFi Radar that my transmission power has increased massively. Note that I have not copied any of the "Risky" transmission lines into my start script. All I have in my start script is what I have in the reply above.

2.4Ghz

  • Xperia 1V previously reported the signal strength at -33dBm even at 1ft from the router.
  • It now reports -23dBm which I am sure is as sensitive/low as it can record. Remembering that dBm is logarithmic, a 3dBm increase is essentially a 100% improvement, so this is a huge improvement for 2.4Ghz.

5Ghz

  • Xperia 1V previously reported the signal strength at -38dBm
  • It now reports -30dBm. Still a massive improvement.

I am pretty satisfied with this. It would have been nice to use Channel 14, but I can concur and confirm with others. Setting the channel to 14 will generally reset my router to "DE" region again and put the Tx power back to 12 from 26. This is generally good enough for me.

Hopefully there's no health risks from setting the Tx power so high. I sit about 1.2m from my router. Though I plan to move it into another room when I move my study area. Hence part of the reason why I started investigating this in the first place.

@825i
Copy link

825i commented May 29, 2024

I forgot to add the speeds before and after the 12 -> 26mW change:

Result (Xperia 1V):

  • 689/492mbps - 12mW Tx Power
    • 707/485
  • 802/460 - 26mW Tx Power
    • 805/481

Result (S7 Tab):

  • 763/492mbps - 12mW Tx Power
    • 739/481
  • 756/481 - 26mW Tx Power

@francoism90
Copy link
Author

@825i Increasing Tx Power leads to more noise, it may/may not increase performance. It's basically aim is to increase the range of your router. However, this could also increase heat and load.

If I'm not mistaken, the txpwr_target_max key only indicates the maximum allowed Tx Power, it doesn't increase the value. It's a dynamic value based on the selected country, etc.

Thanks for posting your findings and results. Like said in the disclaimer, it may work for you or not.
In most cases unfortunately it doesn't work, because many WiFi-chipsets have hidden/unknown abilities to check if the receiving/sending values are valid. So even changing the country or Tx Power, it may not change anything to your end-devices.

@QaDoPL
Copy link

QaDoPL commented Jun 10, 2024

AX1100 Merlin 388.7 - so far no luck with unlock TX,
wl txpwr_target_max Maximum Tx Power Target (chanspec:0x1003): 12.00 12.00 12.00 12.00

Power really sucks, even cheap router totolink has 100% more efficient at my home.
One wall and AX don't have 2.4Ghz,,,

I tried downgrade to 388.1 and same issue can't change territory and tx.

nvram show | grep -e 'country_code|location_code|territory_code|ccode'
0:ccode=#a
1:ccode=E0
2:ccode=E0
3:ccode=E0
location_code=#a
territory_code=EU/01
wl0_country_code=E0
wl1_country_code=#a
wl2_country_code=E0
wl_country_code=#a

@QaDoPL
Copy link

QaDoPL commented Jun 19, 2024

I have Asus GT AXE16000 with Merlin 388.7 Are you able to change region successfully if yes then which method worked for you ?

Finally i found solution, FW is not problem. But seems change parameters by wl -i eth6 and rest (7) (8) doing job, higher tx power can be achieved. And lucky have much more efficient wirelesses network with good range.
When i fully and permanent solve it will post here.
Adapter Temp 45C

@pewpewpew47
Copy link

Followed steps on a GT-AX6000 from Germany. Tx power did increase and better signal (signal strength from same spot -58dbm to -44dbm). New channels (149 and up) appeared as well. GUI changes seems to not cause issues and I can swap to other channels in GUI. However, whenever I try to connect to channel 149 from an Intel AX211 card, Windows shows I am using wifi 4 instead of wifi 6. Lower channels (36, 44, 48 etc) are fine. Is this an Intel issue like the previous posts indicated? Thanks for the help and good luck everyone.

@francoism90
Copy link
Author

@pewpewpew47 Could you try forcing 802.11ax in the WiFi settings? You may also need to adjust some parameters.

It could indeed also be the Intel card not accepting the connection as it should.

@francoism90
Copy link
Author

@QaDoPL Thanks for sharing, I think I'll add the WiFi settings to the README.

@pasko-zh
Copy link

pasko-zh commented Jun 20, 2024

Followed steps on a GT-AX6000 from Germany. Tx power did increase and better signal (signal strength from same spot -58dbm to -44dbm). New channels (149 and up) appeared as well. GUI changes seems to not cause issues and I can swap to other channels in GUI. However, whenever I try to connect to channel 149 from an Intel AX211 card, Windows shows I am using wifi 4 instead of wifi 6. Lower channels (36, 44, 48 etc) are fine. Is this an Intel issue like the previous posts indicated? Thanks for the help and good luck everyone.

Most likely yes. And or a combination with the OS. You can try with another client and see if it works as expected.

You can check on our router how your client is connected, this gives you all the details.
Here for eth7 on my router:

wl -i eth7 assoclist
=> MAC_ADR

 wl -i eth7 sta_info MAC_ADR

If you want to dig deeper: Capture 802.11 beacon frames with wireshark. Then you will see what your router is advertising, and how the handshake with the client goes on....

@francoism90
Copy link
Author

I have updated the instructions to use events, meaning it should work when changing Wireless settings in the GUI.

Could you please test? I have also added to multiple places, as it seems to be the only way to make sure settings are set on boot and such.

@Reeplosin
Copy link

however it would be more practical to have an archive containing all the scripts that work for a specific model with their respective instructions for use. not all scripts work for everything in most cases if for example you used a script for an AX6000 on an AC86u the gui becomes in Chinese language and that's it

@pewpewpew47
Copy link

Followed steps on a GT-AX6000 from Germany. Tx power did increase and better signal (signal strength from same spot -58dbm to -44dbm). New channels (149 and up) appeared as well. GUI changes seems to not cause issues and I can swap to other channels in GUI. However, whenever I try to connect to channel 149 from an Intel AX211 card, Windows shows I am using wifi 4 instead of wifi 6. Lower channels (36, 44, 48 etc) are fine. Is this an Intel issue like the previous posts indicated? Thanks for the help and good luck everyone.

Most likely yes. And or a combination with the OS. You can try with another client and see if it works as expected.

You can check on our router how your client is connected, this gives you all the details. Here for eth7 on my router:

wl -i eth7 assoclist
=> MAC_ADR

 wl -i eth7 sta_info MAC_ADR

If you want to dig deeper: Capture 802.11 beacon frames with wireshark. Then you will see what your router is advertising, and how the handshake with the client goes on....

Thanks Pasko! After some digging with your command line, I found that 149-169 does not work when 160mHz bandwidth is selected. Currently I just run my router on auto channel and auto bandwidth (been on channel 100/160 since last reboot). I live close to airport so DFS may also have something to do with the issue.

@pewpewpew47
Copy link

I have updated the instructions to use events, meaning it should work when changing Wireless settings in the GUI.

Could you please test? I have also added to multiple places, as it seems to be the only way to make sure settings are set on boot and such.

Redid all the nvram changes after your update. Can confirm GUI changes persist after restart on GT-AX6000. Thanks mate!

@francoism90
Copy link
Author

@pewpewpew47 Thanks for testing! Yeah, it seems to be persistent now. :)

@argh0815
Copy link

Hi Does anyone know how to disable DFS using nvram without changing country/local/transmit power? I can do it using wl command but it's not persistent.

@omrij, can you share the wl command you're using to disable DFS? Thanks!

@omrij
Copy link

omrij commented Jul 10, 2024

Hi Does anyone know how to disable DFS using nvram without changing country/local/transmit power? I can do it using wl command but it's not persistent.

@omrij, can you share the wl command you're using to disable DFS? Thanks!

Something like this (adjust channel and other things you need)

settings for 5G

wl -i eth7 down
wl -i eth7 regulatory 1
wl -i eth7 spect 0
wl -i eth7 chanspec 100/160
wl -i eth7 up

@argh0815
Copy link

Great, tried and working, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment