Skip to content

Instantly share code, notes, and snippets.

@francoism90
Last active June 18, 2025 08:03
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)

Disclaimer

Following instructions are provided without any warranty, and may even get you in trouble legally. The instructions are provided for testing, learning, preventing e-waste, and should be use with care. We (including contributers + commentators) are not responsible for any damage to your device(s) or any legal issues.

Getting Started

Instructions have been moved to https://github.com/francoism90/asus-router. :)

@i486
Copy link

i486 commented Apr 1, 2022

I am confused. You guys seems to be increasing radio powers on recent Merlin firmwares. But i thought it's hard limited by the firmware unless using John's fork. Am i missing something here?

@francoism90
Copy link
Author

@i486 Yeah, I don't know for sure if TX-power can be increased, however it seems to be possible to use different channels.

@TBONE204
Copy link

would this script work on an zenwifi XT8 in order to get away from the Canadian restrictions?

@Roki100
Copy link

Roki100 commented Aug 7, 2022

@francoism90 do you know by any chance if that will work on other RT-AX routers? arent they supposed to be "locked"?

@francoism90
Copy link
Author

@TBONE204 Does it offer SSH access? You can dump the nvram with nvram dump and compare values.

@Roki100 You could try (at your own risk), if it doesn't work, you can restore the nvram settings.

@barkmarkin
Copy link

This doesnt work on any firmware after merlin 386.5_2 on my ax58u. Is there a way to reach you? Id like to make the settings permanent as well so I dont have to apply them everytime it restarts. @francoism90

@francoism90
Copy link
Author

@barkmarkin Basically the above writes them to nvram, making the settings permanent. I re-apply the same settings at boot as the bootloader seems to reset some values to default ones.

I don't know if the settings work on every model + firmware, it seems ASUS is locking them and some models may need different values. Dump the current nvram and adjust for your device. :)

@RE3CON
Copy link

RE3CON commented Nov 4, 2022

Why 500mW and maxp5gb... 110 if Highest setting is 120 = 28.50 dBm (708 mW)???
Is the maximum setting is:
nvram set wl0_txpower=708
and all maxp5gb...120

Find "0:maxp2ga0", "0:maxp2ga1", "0:maxp2ga2" and changes its value to "120".

Find "1:maxp5ga0", "1:maxp5ga1", "1:maxp5ga2" and changes its value to "120,120,120,120".

Or in Telnet run
nvram set 0:maxp2ga0=120
nvram set 0:maxp2ga1=120
nvram set 0:maxp2ga2=120
nvram set 1:maxp5ga0=120,120,120,120
nvram set 1:maxp5ga1=120,120,120,120
nvram set 1:maxp5ga2=120,120,120,120
nvram commit
reboot

All regions and Channels

e.g. AC68U - All Region & Channels.
"wl country list" List all countries.

nvram set 0:regrev=0
nvram set 1:regrev=0
nvram set 0:ccode=#a
nvram set 1:ccode=#a
nvram set pci/1/1/ccode=#a
nvram set pci/1/1/regrev=0
nvram set pci/2/1/ccode=#a
nvram set pci/2/1/regrev=0
nvram set regulation_domain=#a
nvram set regulation_domain_5G=#a
nvram set wl_country_code=#a
nvram set wl_country_rev=0
nvram set wl0_country=#a
nvram set wl0_country_code=#a
nvram set wl0_country_rev=0
nvram set wl0_reg_mode=off
nvram set wl1_country=#a
nvram set wl1_country_code=#a
nvram set wl1_country_rev=0
nvram set wl1_reg_mode=off
nvram commit
reboot

Note that the #a here is the country, #a is the “wildcard” country which enabled all channels supported by the hardware.

@austonpramodh
Copy link

austonpramodh commented Nov 5, 2022

Does this work on firmware with version 386.7_2?

[update]
I am trying to put this router on media bridge mode and connect to a dfs enabled router. Even after downgrading the router firmware to 380.57 I wasn't able to find the AP that I wanted to connect. The AP is running on dfs channel 56.

@RE3CON
Copy link

RE3CON commented Nov 5, 2022

Sure on this way you can edit internal settings/values in up to every Asus Router even Linksys and Netgear have very similar entries. You need just to know where they are in storage/memory.

@SurvivorDVKom
Copy link

Hello there,
Does anybody have the same settings for ASUS RT-AC88U?
Thanks in advance for your answer!

@Ubimo
Copy link

Ubimo commented Dec 10, 2022

@RE3CON
I have an AX86S, but I cannot raise tx power.
I've tried all possible commands and also cross-tried all commands.
On my "old" AC86U, I could raise tx power with an "init-start" script in jffs, but this does not work anymore with the AX86S.
Any idea how I can raise tx power? It's an EU-model.

Edit:
I got it working now!
I think, I made some mistakes earlier, like not making the init-start script executable.
Here is my init-start:

#!/bin/sh
nvram set asuscfe0:ccode=#a
nvram set asuscfe1:ccode=#a
nvram set asuscfe0:regrev=0
nvram set asuscfe1:regrev=0
nvram set asuscfecommit=1
nvram set 0:regrev=0
nvram set 1:regrev=0
nvram set 0:ccode=#a
nvram set 1:ccode=#a
nvram set pci/1/1/ccode=#a
nvram set pci/1/1/regrev=0
nvram set pci/2/1/ccode=#a
nvram set pci/2/1/regrev=0
nvram set regulation_domain=#a
nvram set regulation_domain_5G=#a
nvram set wl_country_code=#a
nvram set wl_country_rev=0
nvram set wl0_country=#a
nvram set wl0_country_code=#a
nvram set wl0_country_rev=0
nvram set wl0_reg_mode=off
nvram set wl1_country=#a
nvram set wl1_country_code=#a
nvram set wl1_country_rev=0
nvram set wl1_reg_mode=off
nvram set 0:maxp2ga0=120
nvram set 0:maxp2ga1=120
nvram set 0:maxp2ga2=120
nvram set 1:maxp5ga0=120,120,120,120
nvram set 1:maxp5ga1=120,120,120,120
nvram set 1:maxp5ga2=120,120,120,120
nvram set wl_txpower=708
nvram set wl0_txpower=708
nvram set wl1_txpower=708
nvram commit

wl txpwr_target_max is now showing 26.00
All connected clients also show much better connection now!
Any suggestions to these settings above?

Edit2:
Only one problem left: My AC86U-AI-mesh node won't transmit with maximum tx anymore.
I also use an executable init-start script on the mesh node with jffs scrips enabled:

nvram set jffs2_exec=/jffs/scripts/init-start
nvram set jffs2_scripts=1
nvram commit
reboot

The mesh-node starts with wl txpwr_target_max showing 22.50 but after a few seconds it's going back down to 13,75.
I think my AX86S is saying to the AC86U-AI-mesh node, to power down tx performance.
How can I solve this?

Edit3:
Also solved: I had to downgrade the fw of the AC86U to 386.5_2.
Now it's transmitting with 22.50 again.

@francoism90
Copy link
Author

@Ubimo I don't think it can be solved, probably the hardware limits the TX-power instead of the software. It's the same why some models cannot switch channel(s).

@Ubimo
Copy link

Ubimo commented Dec 10, 2022

@francoism90 francoism90
But it worked before.
Before, I had an AC86U as main router and another AC86U as AI-mesh node.
With the init-start script, both router could do 22.50.

Now, I have an AX86S as main router and still an AC86U as AI-mesh node.
Although the init-start script is executed on the AC86U, the router does 22.50 shortly after a restart, but switches back to 13.75 after a few seconds.

The AI-mesh node is being managed by the AX86S main router, which I think is telling the AC86U to throttle down.

@Limpi1978
Copy link

Limpi1978 commented Dec 12, 2022

Edit: I got it working now! I think, I made some mistakes, like not making the init-start script executable. Here is my init-start:

#!/bin/sh nvram set asuscfe0:ccode=#a nvram set asuscfe1:ccode=#a nvram set asuscfe0:regrev=0 nvram set asuscfe1:regrev=0 nvram set asuscfecommit=1 nvram set 0:regrev=0 nvram set 1:regrev=0 nvram set 0:ccode=#a nvram set 1:ccode=#a nvram set pci/1/1/ccode=#a nvram set pci/1/1/regrev=0 nvram set pci/2/1/ccode=#a nvram set pci/2/1/regrev=0 nvram set regulation_domain=#a nvram set regulation_domain_5G=#a nvram set wl_country_code=#a nvram set wl_country_rev=0 nvram set wl0_country=#a nvram set wl0_country_code=#a nvram set wl0_country_rev=0 nvram set wl0_reg_mode=off nvram set wl1_country=#a nvram set wl1_country_code=#a nvram set wl1_country_rev=0 nvram set wl1_reg_mode=off nvram set 0:maxp2ga0=120 nvram set 0:maxp2ga1=120 nvram set 0:maxp2ga2=120 nvram set 1:maxp5ga0=120,120,120,120 nvram set 1:maxp5ga1=120,120,120,120 nvram set 1:maxp5ga2=120,120,120,120 nvram set wl_txpower=708 nvram set wl0_txpower=708 nvram set wl1_txpower=708 nvram commit

wl txpwr_target_max is now showing 26.00 All connected clients also show much better connection now! Any suggestions to these settings above?

@Ubimo
Hey!
I bought an RT-AX86U and just installed Asuswrt-Merlin (v388.1) on it.
Does the TX-power increasement still work with this latest Merlin version?
I would like to increase it only a bit (to extend my range about 2-3 meters).
Currently txpwr_target_max shows 13.50 for me. I think 20 would be enough.
(I live in the EU near Budapest and use Channel 100 for 5 GHz and Channel 1 for 2.4 GHz.)
Could you please send me the settings for 20 dBm and instructions how to exactly apply them?

(Sadly I am no linux expert at all, I am not even a linux user, so don't assume that I know anything. :)
For example I don't know if format JFFS is needed or not (@nicuciobi mentioned that above).

Thanks!

@Ubimo
Copy link

Ubimo commented Dec 13, 2022

@Limpi1978
Download this modified init-start script: https://mega.nz/file/is4FSDgD#9m4A7N-r6BomeU1n7SfrF9ZE9_036454nwAjmzA9_nM
Copy this init-start script to your router into the folder jffs/scripts. (I use WinSCP to copy files onto my router)
Make the init-start script executable (x in file properties).
Make sure you "Enable JFFS custom scripts and configs" in System settings on your router. You don't need to format JFFS.
SSH into your router and enter these commands:

nvram set jffs2_exec=/jffs/scripts/init-start
nvram set jffs2_scripts=1
nvram commit
reboot

You can modify the init-start script to your likings.
See if it works.

Btw. I use channel 48 for 5GHz after extensive testing.
With 48, I get the best results in range and speed. (80MHz channel bandwidth)

@Limpi1978
Copy link

@Ubimo Thank you!!!

But do you also use Asuswrt-Merlin 388.1? So you tested this script with it?
I am just asking because I red that newer Merlin versions do not allow TX power adjustment anymore at all.
With this init-start script I still can make it work, so this is a clever workaround?

(I tried to execute all the nvram set commands at command line ending with:
nvram commit
service restart_wireless
But nothing changed.
Can I test it somehow in command line before placing the init-start script?
Or reboot is definitely needed to make it work?)

And if I want a signal strength between the offical maximum and your solution, what values should I set
instead of 120 and 708?
I suppose 708 is in mW (equivalent to ~28.5 dBm). But I do not know what 120 is. Is that in mW too?
Is the ratio of the two values (120 and 708) important?

@Ubimo
Copy link

Ubimo commented Dec 13, 2022

@Limpi1978
Yes, I'm running 388.1 on my AX86S.
service restart_wireless resets the values.
You have to definitely reboot (follow the exact instructions above) to make this work.
I just chose the maximum values, I don't know what lower values are in mW.

@Limpi1978
Copy link

Limpi1978 commented Dec 13, 2022

@Ubimo
I did it!!! :)

This command now reports 26.00 value (instead the 13.50 before):
"
Limpi@RT-AX86U:/tmp/home/root# wl txpwr_target_max
Maximum Tx Power Target (chanspec:0x1001): 26.00 26.00 26.00
"

But sadly my RSSI values remained the same!
I even tried the channel 48 with 80 MHz bandwidth, but that also did not help with it. :(

Maybe my router (a brand new RT-AX86U) is blocking this at hardware level?
When did you purchase your RT-AX86S? Is it several years old?

Or why is it working with your RT-AX86S and not with my RT-AX86U?
Is there an other way to “hack” Merlin to allow higher TX power rates?

@Limpi1978
Copy link

Limpi1978 commented Dec 15, 2022

@Ubimo
So on my RT-AX86U the NVRAM values were properly set, but they had no real effect.
Do you have a guess why not?
I still do not understand why this is working with RT-AX86S and not with RT-AX86U… :/

Approx. how much dBm increasement have you measured in your devices RSSI values?

@Sildurs-shaders
Copy link

Sildurs-shaders commented Dec 15, 2022

Using your script works on my AX86U but I can't change the wifi channels without it resetting everything on the latest firmware. It's working just fine on 386.5._2. @Ubimo

@Limpi1978
Copy link

Using your script works on my AX86U but I can't change the wifi channels without it resetting everything on the latest firmware. It's working just fine on 386.5._2. @Ubimo

Yeah, the script is able to modify the NVRAM values, but I don’t think the firmware is really using them. I got no change in my RSSI values.
And yes, when I am changing the channel, the values are reverted…
Maybe we shuld change te channel first and then restart?
Is it supposed only to boost channel 48? I used channel 100 when I applied the script and noticed no improvement with it.

What I am missing here? Is it really working on RT-AX86S, but not on RT-AX86U?

@Limpi1978
Copy link

Limpi1978 commented Dec 17, 2022

@Sildurs-shaders
Could you test it under 388.1 too, please?
And have you measured significant improvements in RSSI vaues after running the script?
I did not. :/

@xor-128
Copy link

xor-128 commented Dec 18, 2022

My modem is DSL-AX82U, after these modification my tx power maxxed from 17.5 to 22 instead of 26. Whats the problem? should I increase the txpower to something bigger?

@carlosnasillo
Copy link

carlosnasillo commented Dec 25, 2022

this guide was incredibly helpful. Thank you @francoism90, and particularly to @Ubimo and @RE3CON for their detailed comments and input.

@Limpi1978 I tried it on 388.1 and it did not work, had to downgrade to 386.5_2 and it works fine. Did not do a factory reset downgrading back from 388.1, for now it seems ok and stable.

Does anyone know how to persist the 5Ghz channel to always be a specific one? For example 157? - I brought my router to another continent, and because it defaults to "Auto" (36) on reboot it causes my Apple devices to not see the 5Ghz SSID (Apple forces visible SSID to only those compliant with the country where you are). It's an EU router, im in a country in Asia where for instance 36 is not a permisible channel. Currently I have to manually change it on the GUI every reboot.

Thanks!

PS: This works on AX88U

@sklemow
Copy link

sklemow commented Dec 26, 2022

I stupidly bought a GT-AX11000 Pro from techinn under the foolish assumption that it would be a US territory router, since it was sold on a faux US storefront. Do you think this code would work for all ASUS mesh routers? I’m reluctant to try because the GT-AX11000 Pro (and the XT8 nodes I use it with) is UNII-4 capable and I’m not sure this workaround would unlock that in the GUI. Any thoughts?

@carlosnasillo
Copy link

carlosnasillo commented Dec 26, 2022

@sklemow i think it’s very likely it will work on all RT routers, but yours is a GT - I’m just guessing here. Having said that. You can try it. Save the dump of the NVRAM and if anything goes wrong you can always revert it back. I can’t imagine changing those few settings would brick it.

@bubobih
Copy link

bubobih commented Dec 29, 2022

hello all, how can i check if settings is apply it? tnx all

@Ubimo
Copy link

Ubimo commented Dec 30, 2022

@bubobih
SSH into your router and enter following command:
wl txpwr_target_max

@bubobih
Copy link

bubobih commented Dec 31, 2022

Im on ac86u i try all latest 5 versions of firmware but i always get 13.75 as output. Any suggestions? I used script from above link from mega.nz

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