Skip to content

Instantly share code, notes, and snippets.

@francoism90
Last active October 6, 2025 20:54
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.

Revisions

  1. francoism90 revised this gist Sep 29, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,4 @@
    # Getting Started

    Instructions have been moved to [https://github.com/francoism90/asus-router]. :)
    Instructions have been moved to https://github.com/francoism90/asus-router. :)
  2. francoism90 revised this gist Sep 29, 2024. 2 changed files with 5 additions and 209 deletions.
    91 changes: 5 additions & 86 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,90 +1,9 @@
    # Warning
    # Disclaimer

    > 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).
    > 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.
    # Introduction
    # Getting Started

    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](https://gist.github.com/francoism90/e3da8d155f9b0920da10d35b56b06f3f)).

    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:

    ```sh
    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`:

    ```sh
    #!/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`:

    ```sh
    #!/bin/sh

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

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

    ```sh
    #!/bin/sh

    if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl
    ```
    Create/adjust `/jffs/scripts/service-event-end`:
    ```sh
    #!/bin/sh

    if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl
    ```
    Make sure the scripts are executable:
    ```bash
    chmod a+rx /jffs/scripts/*
    ```
    ## Applying changes
    You need to reboot the router to apply changes:
    ```sh
    reboot
    ```
    To make the changes persistent, make sure to add again to the `jffs/scripts/wl` script.
    Instructions have been moved to [https://github.com/francoism90/asus-router]. :)
    123 changes: 0 additions & 123 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,123 +0,0 @@
    #!/bin/sh

    # These are my testing nvram values for an RT-AX58U + ZenWiFi AX (XT8).
    # You nvram changes may differ. Run nvram dump, and adjust when needed.

    # Allow all channels
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set 2:ccode=#a
    nvram set 2:regrev=0
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    nvram set wl_acs_bgdfs_enab=0
    nvram set wl_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl_acs_boot_only=1
    nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_country_rev=0
    nvram set wl_reg_mode=h
    nvram set wl0_acs_bgdfs_enab=0
    nvram set wl0_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl0_acs_boot_only=1
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans_cfg=
    nvram set wl0_acs_excl_chans_valid=
    nvram set wl0_acs_excl_chans=
    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_acs_bgdfs_enab=0
    nvram set wl1_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl1_acs_boot_only=1
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=
    nvram set wl1_acs_excl_chans=
    nvram set wl1_chlist="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 169 173 177"
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=h
    nvram set wl2_acs_bgdfs_enab=0
    nvram set wl2_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl2_acs_boot_only=1
    nvram set wl2_acs_dfs=1
    nvram set wl2_acs_excl_chans_base=
    nvram set wl2_acs_excl_chans_cfg=
    nvram set wl2_acs_excl_chans_valid=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_chlist="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 169 173 177"
    nvram set wl2_country_code=#a
    nvram set wl2_country_rev=0
    nvram set wl2_reg_mode=h

    # 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 2:maxp5gb0a0=120
    nvram set 2:maxp5gb0a1=120
    nvram set 2:maxp5gb0a2=120
    nvram set 2:maxp5gb0a3=120
    nvram set 2:maxp5gb1a0=120
    nvram set 2:maxp5gb1a1=120
    nvram set 2:maxp5gb1a2=120
    nvram set 2:maxp5gb1a3=120
    nvram set 2:maxp5gb2a0=120
    nvram set 2:maxp5gb2a1=120
    nvram set 2:maxp5gb2a2=120
    nvram set 2:maxp5gb2a3=120
    nvram set 2:maxp5gb3a0=120
    nvram set 2:maxp5gb3a1=120
    nvram set 2:maxp5gb3a2=120
    nvram set 2:maxp5gb3a3=120
    nvram set 2:maxp5gb4a0=120
    nvram set 2:maxp5gb4a1=120
    nvram set 2:maxp5gb4a2=120
    nvram set 2:maxp5gb4a3=120
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl2_txpower=500

    # force 2.4GHz channels
    # nvram set wl0_sel_channel=6
    # nvram set wl0_chanspec=6l

    # force 5GHz channels
    # nvram set wl1_sel_channel=48
    # nvram set wl1_chanspec=48/160

    # force 5-2GHz channels (AIMesh node)
    # nvram set wl2_sel_channel=48
    # nvram set wl2_chanspec=48/160

    # Commit changes
    nvram commit
  3. francoism90 revised this gist Sep 28, 2024. 2 changed files with 46 additions and 119 deletions.
    52 changes: 46 additions & 6 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,15 @@
    #!/bin/sh

    # These are my testing nvram values for an RT-AX58U.
    # These are my testing nvram values for an RT-AX58U + ZenWiFi AX (XT8).
    # You nvram changes may differ. Run nvram dump, and adjust when needed.

    # Allow all channels
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set 2:ccode=#a
    nvram set 2:regrev=0
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    @@ -18,6 +20,7 @@ nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_country_rev=0
    nvram set wl_reg_mode=h
    nvram set wl0_acs_bgdfs_enab=0
    nvram set wl0_acs_bgdfs_fallback_blocking_cac=0
    @@ -31,18 +34,30 @@ 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_acs_bgdfs_enab=0
    nvram set wl1_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl1_acs_boot_only=1
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=
    nvram set wl1_acs_excl_chans=
    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_chlist="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 169 173 177"
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=h
    nvram set wl2_acs_bgdfs_enab=0
    nvram set wl2_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl2_acs_boot_only=1
    nvram set wl2_acs_dfs=1
    nvram set wl2_acs_excl_chans_base=
    nvram set wl2_acs_excl_chans_cfg=
    nvram set wl2_acs_excl_chans_valid=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_chlist="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 169 173 177"
    nvram set wl2_country_code=#a
    nvram set wl2_country_rev=0
    nvram set wl2_reg_mode=h

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    @@ -67,17 +82,42 @@ nvram set 1:maxp5gb4a0=120
    nvram set 1:maxp5gb4a1=120
    nvram set 1:maxp5gb4a2=120
    nvram set 1:maxp5gb4a3=120
    nvram set 2:maxp5gb0a0=120
    nvram set 2:maxp5gb0a1=120
    nvram set 2:maxp5gb0a2=120
    nvram set 2:maxp5gb0a3=120
    nvram set 2:maxp5gb1a0=120
    nvram set 2:maxp5gb1a1=120
    nvram set 2:maxp5gb1a2=120
    nvram set 2:maxp5gb1a3=120
    nvram set 2:maxp5gb2a0=120
    nvram set 2:maxp5gb2a1=120
    nvram set 2:maxp5gb2a2=120
    nvram set 2:maxp5gb2a3=120
    nvram set 2:maxp5gb3a0=120
    nvram set 2:maxp5gb3a1=120
    nvram set 2:maxp5gb3a2=120
    nvram set 2:maxp5gb3a3=120
    nvram set 2:maxp5gb4a0=120
    nvram set 2:maxp5gb4a1=120
    nvram set 2:maxp5gb4a2=120
    nvram set 2:maxp5gb4a3=120
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl2_txpower=500

    # force 2.4GHz channels (useful for AIMesh)
    # force 2.4GHz channels
    # nvram set wl0_sel_channel=6
    # nvram set wl0_chanspec=6l

    # force 5GHz channels (useful for AIMesh)
    # nvram set wl1_sel_channel=149
    # nvram set wl1_chanspec=149/160
    # force 5GHz channels
    # nvram set wl1_sel_channel=48
    # nvram set wl1_chanspec=48/160

    # force 5-2GHz channels (AIMesh node)
    # nvram set wl2_sel_channel=48
    # nvram set wl2_chanspec=48/160

    # Commit changes
    nvram commit
    113 changes: 0 additions & 113 deletions wl_zenwifi
    Original file line number Diff line number Diff line change
    @@ -1,113 +0,0 @@
    #!/bin/sh

    # See https://forums.tomshardware.com/threads/how-to-work-out-asus-aimesh-wifi-6-160mhz-problem-with-rt-ax89x.3842272/
    # It is important to follow the steps above, and also apply the following nvram settings after.
    # You can do this by `ssh <address-of-aimesh-node`, and copy/paste (everytime!). Hopefully one day Merlin works on my XT8 V2. :)

    # Allow all channels
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set 2:ccode=#a
    nvram set 2:regrev=0
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    nvram set wl_acs_bgdfs_enab=0
    nvram set wl_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl_acs_boot_only=1
    nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_reg_mode=h
    nvram set wl0_acs_bgdfs_enab=0
    nvram set wl0_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl0_acs_boot_only=1
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans_cfg=
    nvram set wl0_acs_excl_chans_valid=
    nvram set wl0_acs_excl_chans=
    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_acs_bgdfs_enab=0
    nvram set wl1_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl1_acs_boot_only=1
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=
    nvram set wl1_acs_excl_chans=
    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 wl2_acs_bgdfs_enab=0
    nvram set wl2_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl2_acs_boot_only=1
    nvram set wl2_acs_dfs=1
    nvram set wl2_acs_excl_chans_base=
    nvram set wl2_acs_excl_chans_cfg=
    nvram set wl2_acs_excl_chans_valid=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_acs_fcs_mode=0
    nvram set wl2_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 wl2_country_code=#a
    nvram set wl2_country_rev=0
    nvram set wl2_reg_mode=h

    # 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 2:maxp5gb0a0=120
    nvram set 2:maxp5gb0a1=120
    nvram set 2:maxp5gb0a2=120
    nvram set 2:maxp5gb0a3=120
    nvram set 2:maxp5gb1a0=120
    nvram set 2:maxp5gb1a1=120
    nvram set 2:maxp5gb1a2=120
    nvram set 2:maxp5gb1a3=120
    nvram set 2:maxp5gb2a0=120
    nvram set 2:maxp5gb2a1=120
    nvram set 2:maxp5gb2a2=120
    nvram set 2:maxp5gb2a3=120
    nvram set 2:maxp5gb3a0=120
    nvram set 2:maxp5gb3a1=120
    nvram set 2:maxp5gb3a2=120
    nvram set 2:maxp5gb3a3=120
    nvram set 2:maxp5gb4a0=120
    nvram set 2:maxp5gb4a1=120
    nvram set 2:maxp5gb4a2=120
    nvram set 2:maxp5gb4a3=120
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl2_txpower=500

    # Commit changes
    nvram commit
  4. francoism90 revised this gist Sep 28, 2024. 3 changed files with 6 additions and 3 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ See https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/ for ins

    `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
    > 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

    @@ -87,4 +87,4 @@ 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.
    To make the changes persistent, make sure to add again to the `jffs/scripts/wl` script.
    3 changes: 3 additions & 0 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    #!/bin/sh

    # These are my testing nvram values for an RT-AX58U.
    # You nvram changes may differ. Run nvram dump, and adjust when needed.

    # Allow all channels
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    2 changes: 1 addition & 1 deletion wl_zenwifi
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # See https://forums.tomshardware.com/threads/how-to-work-out-asus-aimesh-wifi-6-160mhz-problem-with-rt-ax89x.3842272/
    # It is important to follow the steps above, and also apply the following nvram settings after.
    # You can do this by `ssh <address-of-aimesh-node`, and copy/paste. Hopefully one day Merlin works on my XT8 V2. :)
    # You can do this by `ssh <address-of-aimesh-node`, and copy/paste (everytime!). Hopefully one day Merlin works on my XT8 V2. :)

    # Allow all channels
    nvram set 0:ccode=#a
  5. francoism90 revised this gist Sep 28, 2024. 2 changed files with 132 additions and 11 deletions.
    30 changes: 19 additions & 11 deletions wl
    Original file line number Diff line number Diff line change
    @@ -5,34 +5,41 @@ nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set acs_dfs=1
    nvram set acs_unii4=1
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    nvram set wl_acs_bgdfs_enab=0
    nvram set wl_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl_acs_boot_only=1
    nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_reg_mode=h
    nvram set wl0_acs_bgdfs_enab=0
    nvram set wl0_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl0_acs_boot_only=1
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans_cfg=
    nvram set wl0_acs_excl_chans_valid=#a
    nvram set wl0_acs_excl_chans_valid=
    nvram set wl0_acs_excl_chans=
    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_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl1_acs_boot_only=1
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=#a
    nvram set wl1_acs_excl_chans_valid=
    nvram set wl1_acs_excl_chans=
    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 wl2_acs_excl_chans=

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    @@ -61,12 +68,13 @@ nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500

    # Channel selection
    # nvram set wl0_sel_channel=6/80 # force 2.4GHz channel
    # nvram set wl1_sel_channel=40/160 # force 5GHz channel
    # nvram set wl0_chanspec=0 # auto select
    # nvram set wl1_chanspec=0 # auto select
    # nvram set wl_chanspec=0 # auto select
    # force 2.4GHz channels (useful for AIMesh)
    # nvram set wl0_sel_channel=6
    # nvram set wl0_chanspec=6l

    # force 5GHz channels (useful for AIMesh)
    # nvram set wl1_sel_channel=149
    # nvram set wl1_chanspec=149/160

    # Commit changes
    nvram commit
    113 changes: 113 additions & 0 deletions wl_zenwifi
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,113 @@
    #!/bin/sh

    # See https://forums.tomshardware.com/threads/how-to-work-out-asus-aimesh-wifi-6-160mhz-problem-with-rt-ax89x.3842272/
    # It is important to follow the steps above, and also apply the following nvram settings after.
    # You can do this by `ssh <address-of-aimesh-node`, and copy/paste. Hopefully one day Merlin works on my XT8 V2. :)

    # Allow all channels
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set 2:ccode=#a
    nvram set 2:regrev=0
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    nvram set wl_acs_bgdfs_enab=0
    nvram set wl_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl_acs_boot_only=1
    nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_reg_mode=h
    nvram set wl0_acs_bgdfs_enab=0
    nvram set wl0_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl0_acs_boot_only=1
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans_cfg=
    nvram set wl0_acs_excl_chans_valid=
    nvram set wl0_acs_excl_chans=
    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_acs_bgdfs_enab=0
    nvram set wl1_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl1_acs_boot_only=1
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=
    nvram set wl1_acs_excl_chans=
    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 wl2_acs_bgdfs_enab=0
    nvram set wl2_acs_bgdfs_fallback_blocking_cac=0
    nvram set wl2_acs_boot_only=1
    nvram set wl2_acs_dfs=1
    nvram set wl2_acs_excl_chans_base=
    nvram set wl2_acs_excl_chans_cfg=
    nvram set wl2_acs_excl_chans_valid=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_acs_excl_chans=
    nvram set wl2_acs_fcs_mode=0
    nvram set wl2_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 wl2_country_code=#a
    nvram set wl2_country_rev=0
    nvram set wl2_reg_mode=h

    # 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 2:maxp5gb0a0=120
    nvram set 2:maxp5gb0a1=120
    nvram set 2:maxp5gb0a2=120
    nvram set 2:maxp5gb0a3=120
    nvram set 2:maxp5gb1a0=120
    nvram set 2:maxp5gb1a1=120
    nvram set 2:maxp5gb1a2=120
    nvram set 2:maxp5gb1a3=120
    nvram set 2:maxp5gb2a0=120
    nvram set 2:maxp5gb2a1=120
    nvram set 2:maxp5gb2a2=120
    nvram set 2:maxp5gb2a3=120
    nvram set 2:maxp5gb3a0=120
    nvram set 2:maxp5gb3a1=120
    nvram set 2:maxp5gb3a2=120
    nvram set 2:maxp5gb3a3=120
    nvram set 2:maxp5gb4a0=120
    nvram set 2:maxp5gb4a1=120
    nvram set 2:maxp5gb4a2=120
    nvram set 2:maxp5gb4a3=120
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl2_txpower=500

    # Commit changes
    nvram commit
  6. francoism90 revised this gist Sep 28, 2024. 1 changed file with 27 additions and 21 deletions.
    48 changes: 27 additions & 21 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,39 +1,38 @@
    #!/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 acs_dfs=1
    nvram set acs_unii4=1
    nvram set cfg_ui_region_disable=1
    nvram set location_code=#a
    nvram set territory_code=US/02
    nvram set wl_acs_dfs=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl_country_code=#a
    nvram set wl_reg_mode=h
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans_cfg=
    nvram set wl0_acs_excl_chans_valid=#a
    nvram set wl0_acs_excl_chans=
    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_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=
    nvram set wl1_acs_excl_chans_cfg=
    nvram set wl1_acs_excl_chans_valid=#a
    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
    @@ -58,9 +57,16 @@ nvram set 1:maxp5gb4a0=120
    nvram set 1:maxp5gb4a1=120
    nvram set 1:maxp5gb4a2=120
    nvram set 1:maxp5gb4a3=120
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500

    # Channel selection
    # nvram set wl0_sel_channel=6/80 # force 2.4GHz channel
    # nvram set wl1_sel_channel=40/160 # force 5GHz channel
    # nvram set wl0_chanspec=0 # auto select
    # nvram set wl1_chanspec=0 # auto select
    # nvram set wl_chanspec=0 # auto select

    # Commit changes
    nvram commit
    nvram commit
  7. francoism90 revised this gist Jun 21, 2024. 1 changed file with 32 additions and 13 deletions.
    45 changes: 32 additions & 13 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -22,14 +22,23 @@ See https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/ for ins

    `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
    > 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.
    Create a `/jffs/scripts/wl` file, and paste the `nvram` overwrites into this file (see given example file).
    Make sure to also run the following commands:

    ```sh
    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`:

    @@ -45,7 +54,24 @@ Create/adjust `/jffs/scripts/services-start`:
    ```sh
    #!/bin/sh

    cru a wl "0 */8 * * * /jffs/scripts/wl"
    /jffs/scripts/wl >/dev/null 2>&1 & # wl
    # /jffs/scripts/scmerlin startup & # scMerlin
    ```

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

    ```sh
    #!/bin/sh

    if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl
    ```
    Create/adjust `/jffs/scripts/service-event-end`:
    ```sh
    #!/bin/sh

    if echo "$2" | /bin/grep -q "wireless"; then { /jffs/scripts/wl service_event "$@" & }; fi # wl
    ```
    Make sure the scripts are executable:
    @@ -55,17 +81,10 @@ chmod a+rx /jffs/scripts/*
    ## Applying changes
    You need to reboot the router to apply changes

    Please note changing settings in the UI, may undo nvram changes.

    It is recommended to change settings using CLI instead:
    You need to reboot the router to apply changes:
    ```sh
    nvram set wl1_chanspec=149/160
    # nvram set wl1_chanspec=149/80
    # nvram set wl1_chanspec=48
    service restart_wireless
    ```
    reboot
    ```
    To make the changes persistent, make sure to add them to the `jffs/scripts/wl` script.
  8. francoism90 revised this gist May 12, 2024. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions wl
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ 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
    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"
    @@ -17,15 +17,16 @@ nvram set wl1_chlist="36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 13
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=h
    nvram set acs_unii4=1
    nvram set acs_dfs=0
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_dfs=0
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans=
    nvram set wl1_acs_dfs=1
    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
  9. francoism90 revised this gist Jan 3, 2024. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions wl
    Original file line number Diff line number Diff line change
    @@ -28,9 +28,9 @@ nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=

    # 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_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

  10. francoism90 revised this gist Nov 27, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions wl
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ nvram set 1:regrev=0
    nvram set territory_code=CN/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
  11. francoism90 revised this gist Aug 31, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -45,7 +45,7 @@ Create/adjust `/jffs/scripts/services-start`:
    ```sh
    #!/bin/sh

    cru a wl "* * * * * /jffs/scripts/wl"
    cru a wl "0 */8 * * * /jffs/scripts/wl"
    ```

    Make sure the scripts are executable:
  12. francoism90 revised this gist Aug 20, 2023. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -32,27 +32,26 @@ See https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/ for ins
    Create a `/jffs/scripts/wl` file, and paste the `nvram` overwrites into this file (see given example file).

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

    ```sh
    #!/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
    ```

    Make sure the scripts are executable:
    ```bash
    chmod a+rx /jffs/scripts/*
    ```

    ## Add cronjob
    Create/adjust `/jffs/scripts/services-start`:

    > See https://www.cyberciti.biz/faq/how-to-add-cron-job-on-asuswrt-merlin-wifi-router/ for details.
    ```sh
    #!/bin/sh

    ```bash
    cru a wl "* * * * * /jffs/scripts/wl"
    ```

    This will ensure the nvram overwrites are applied every minute.
    Make sure the scripts are executable:
    ```bash
    chmod a+rx /jffs/scripts/*
    ```

    ## Applying changes

  13. francoism90 revised this gist Aug 20, 2023. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions wl
    Original file line number Diff line number Diff line change
    @@ -8,13 +8,14 @@ nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set territory_code=CN/02
    nvram set wl_country_code=#a
    nvram set wl_reg_mode=h
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    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=off
    nvram set wl1_reg_mode=h
    nvram set acs_unii4=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    @@ -26,11 +27,11 @@ nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=

    # Channel selection
    nvram set wl0_chanspec=0 # auto
    nvram set wl1_chanspec=0 # auto
    nvram set wl_chanspec=0 # auto
    # nvram set wl0_sel_channel=7 # 2.4GHz channel
    # nvram set wl1_sel_channel=149 # 5GHz channel
    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
  14. francoism90 revised this gist Aug 20, 2023. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions wl
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,13 @@ nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=

    # Channel selection
    nvram set wl0_chanspec=0 # auto
    nvram set wl1_chanspec=0 # auto
    nvram set wl_chanspec=0 # auto
    # nvram set wl0_sel_channel=7 # 2.4GHz channel
    # nvram set wl1_sel_channel=149 # 5GHz channel

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    nvram set 0:maxp2ga1=120
    @@ -52,12 +59,5 @@ nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500

    # Channel section
    nvram set wl0_chanspec=0 # auto
    nvram set wl1_chanspec=0 # auto
    nvram set wl_chanspec=0 # auto
    # nvram set wl0_sel_channel=7 # 2.4GHz channel
    # nvram set wl1_sel_channel=149 # 5GHz channel

    # Commit changes
    nvram commit
  15. francoism90 revised this gist Aug 20, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions wl
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set territory_code=CN/02
    nvram set wl_country_code=#a
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
  16. francoism90 revised this gist Aug 20, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,9 @@ Please note changing settings in the UI, may undo nvram changes.
    It is recommended to change settings using CLI instead:

    ```sh
    nvram set wl1_sel_channel=149
    nvram set wl1_chanspec=149/160
    # nvram set wl1_chanspec=149/80
    # nvram set wl1_chanspec=48
    service restart_wireless
    ```

  17. francoism90 revised this gist Aug 20, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@ The nvram settings have been tested on a ASUS RT-AX58U, they may work on other m

    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.
  18. francoism90 revised this gist Aug 20, 2023. 1 changed file with 15 additions and 5 deletions.
    20 changes: 15 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,11 +6,11 @@
    # Introduction

    This may (in most cases don't) enable additional channels and power on ASUS Merlin provided routers.
    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](https://gist.github.com/francoism90/e3da8d155f9b0920da10d35b56b06f3f)).

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

    ## Login into router using SSH

    @@ -52,7 +52,17 @@ cru a wl "* * * * * /jffs/scripts/wl"

    This will ensure the nvram overwrites are applied every minute.

    ## Reboot
    ## Applying changes

    You may now reboot the router. Please note changing settings in the UI, may undo nvram changes.
    It is recommended to change settings using CLI instead.
    You need to reboot the router to apply changes

    Please note changing settings in the UI, may undo nvram changes.

    It is recommended to change settings using CLI instead:

    ```sh
    nvram set wl1_sel_channel=149
    service restart_wireless
    ```

    To make the changes persistent, make sure to add them to the `jffs/scripts/wl` script.
  19. francoism90 revised this gist Aug 20, 2023. 2 changed files with 17 additions and 9 deletions.
    5 changes: 3 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,8 @@

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

    The nvram settings have been tested on a ASUS RT-AX58U, they may work on other models as well.
    The nvram settings have been tested on a ASUS RT-AX58U, they may work on other models as well ([ASUS RT-AC78U](https://gist.github.com/francoism90/e3da8d155f9b0920da10d35b56b06f3f)).

    Use `nvram dump` and adjust when needed.

    ## Login into router using SSH
    @@ -29,7 +30,7 @@ See https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/ for ins
    Create a `/jffs/scripts/wl` file, and paste the `nvram` overwrites into this file (see given example file).

    Create/adjust `/jffs/scripts/init-start`:
    ```bash
    ```sh
    #!/bin/sh

    [ -x /jffs/scripts/wl ] && /jffs/scripts/wl &
    21 changes: 14 additions & 7 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,12 @@
    #!/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
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    @@ -20,6 +23,8 @@ nvram set wl0_acs_excl_chans=
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    nvram set 0:maxp2ga1=120
    nvram set 1:maxp5gb0a0=120
    @@ -42,14 +47,16 @@ nvram set 1:maxp5gb4a0=120
    nvram set 1:maxp5gb4a1=120
    nvram set 1:maxp5gb4a2=120
    nvram set 1:maxp5gb4a3=120
    nvram set territory_code=CN/02
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
    nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set wl1_sel_channel=149 # also paste in /scripts/jffs/wl
    nvram commit
    service restart_wireless
    # Channel section
    nvram set wl0_chanspec=0 # auto
    nvram set wl1_chanspec=0 # auto
    nvram set wl_chanspec=0 # auto
    # nvram set wl0_sel_channel=7 # 2.4GHz channel
    # nvram set wl1_sel_channel=149 # 5GHz channel

    # Commit changes
    nvram commit
  20. francoism90 revised this gist Aug 20, 2023. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions init-start
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    #!/bin/sh
    # Follow steps @ https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts
    // paste the same nvram settings here
  21. francoism90 revised this gist Aug 20, 2023. 3 changed files with 68 additions and 53 deletions.
    44 changes: 0 additions & 44 deletions ASUS RT-AC87U
    Original file line number Diff line number Diff line change
    @@ -1,44 +0,0 @@
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump > dump.txt

    # Set country + TX-power
    nvram set asuscfe0:ccode=US
    nvram set asuscfe1:ccode=US
    nvram set asuscfe0:regrev=0
    nvram set asuscfe1:regrev=0
    nvram set asuscfecommit=1
    nvram set 0:ccode=US
    nvram set 1:ccode=US
    nvram set 0:regrev=0
    nvram set 1:regrev=0
    nvram set wl0_country_code=US
    nvram set wl1_country_code=US
    nvram set wl0_country_rev=0
    nvram set wl1_country_rev=0
    nvram set wl0_reg_mode=off
    nvram set wl1_reg_mode=off
    nvram set regulation_domain=US
    nvram set regulation_domain_5G=US
    nvram set pci/1/1/ccode=US
    nvram set pci/2/1/ccode=US
    nvram set wl0_country=US
    nvram set wl1_country=US
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 0:maxp2ga2=114
    nvram set 1:maxp2ga0=0x72
    nvram set 1:maxp2ga1=0x72
    nvram set 1:maxp2ga2=0x72
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set "wl1_chanspec=149/80"
    nvram commit
    service restart_wireless
    57 changes: 57 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    # 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 (in most cases don't) enable additional channels and power on ASUS Merlin provided routers.

    The nvram settings have been tested on a ASUS RT-AX58U, they may work on other models as well.
    Use `nvram dump` and adjust 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.
    Create a `/jffs/scripts/wl` file, and paste the `nvram` overwrites into this file (see given example file).

    Create/adjust `/jffs/scripts/init-start`:
    ```bash
    #!/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
    ```

    Make sure the scripts are executable:
    ```bash
    chmod a+rx /jffs/scripts/*
    ```

    ## Add cronjob

    > See https://www.cyberciti.biz/faq/how-to-add-cron-job-on-asuswrt-merlin-wifi-router/ for details.
    ```bash
    cru a wl "* * * * * /jffs/scripts/wl"
    ```

    This will ensure the nvram overwrites are applied every minute.

    ## Reboot

    You may now reboot the router. Please note changing settings in the UI, may undo nvram changes.
    It is recommended to change settings using CLI instead.
    20 changes: 11 additions & 9 deletions Asus RT-AX58U → wl
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,4 @@
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump > dump.txt

    # Set country + TX-power
    # ref: https://www.snbforums.com/threads/384-18_alpha-builds-testing-all-variants.63954/page-23#post-592739
    #!/bin/sh
    nvram set location_code=#a
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    @@ -18,6 +11,15 @@ nvram set wl1_chlist="36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 13
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=off
    nvram set acs_unii4=1
    nvram set wl_acs_excl_chans_dfs=
    nvram set wl_acs_excl_chans=
    nvram set wl0_acs_dfs=1
    nvram set wl0_acs_excl_chans_base=
    nvram set wl0_acs_excl_chans=
    nvram set wl1_acs_dfs=1
    nvram set wl1_acs_excl_chans_base=
    nvram set wl1_acs_excl_chans=
    nvram set 0:maxp2ga0=120
    nvram set 0:maxp2ga1=120
    nvram set 1:maxp5gb0a0=120
    @@ -48,6 +50,6 @@ nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set "wl1_chanspec=149/80"
    nvram set wl1_sel_channel=149 # also paste in /scripts/jffs/wl
    nvram commit
    service restart_wireless
  22. francoism90 revised this gist Jul 2, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ nvram dump > dump.txt

    # Set country + TX-power
    # ref: https://www.snbforums.com/threads/384-18_alpha-builds-testing-all-variants.63954/page-23#post-592739
    nvram set location_code=#a
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
  23. francoism90 revised this gist Feb 28, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ nvram set 1:regrev=0
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    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"
    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=off
  24. francoism90 revised this gist Feb 28, 2023. 1 changed file with 31 additions and 31 deletions.
    62 changes: 31 additions & 31 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -6,40 +6,40 @@ nvram dump > dump.txt

    # Set country + TX-power
    # ref: https://www.snbforums.com/threads/384-18_alpha-builds-testing-all-variants.63954/page-23#post-592739
    nvram set 0:ccode=ALL
    nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=ALL
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set wl0_country_code=US
    nvram set wl0_country_rev=768
    nvram set wl0_reg_mode=d
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    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"
    nvram set wl1_country_code=US
    nvram set wl1_country_rev=768
    nvram set wl1_reg_mode=h
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 1:maxp5gb0a0=110
    nvram set 1:maxp5gb0a1=110
    nvram set 1:maxp5gb0a2=110
    nvram set 1:maxp5gb0a3=110
    nvram set 1:maxp5gb1a0=110
    nvram set 1:maxp5gb1a1=110
    nvram set 1:maxp5gb1a2=110
    nvram set 1:maxp5gb1a3=110
    nvram set 1:maxp5gb2a0=110
    nvram set 1:maxp5gb2a1=110
    nvram set 1:maxp5gb2a2=110
    nvram set 1:maxp5gb2a3=110
    nvram set 1:maxp5gb3a0=110
    nvram set 1:maxp5gb3a1=110
    nvram set 1:maxp5gb3a2=110
    nvram set 1:maxp5gb3a3=110
    nvram set 1:maxp5gb4a0=110
    nvram set 1:maxp5gb4a1=110
    nvram set 1:maxp5gb4a2=110
    nvram set 1:maxp5gb4a3=110
    nvram set territory_code=US/01
    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 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 territory_code=CN/02
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
  25. francoism90 revised this gist Oct 19, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -5,16 +5,17 @@
    nvram dump > dump.txt

    # Set country + TX-power
    # ref: https://www.snbforums.com/threads/384-18_alpha-builds-testing-all-variants.63954/page-23#post-592739
    nvram set 0:ccode=ALL
    nvram set 0:regrev=0
    nvram set 1:ccode=ALL
    nvram set 1:regrev=0
    nvram set wl0_country_code=US
    nvram set wl0_country_rev=0
    nvram set wl0_country_rev=768
    nvram set wl0_reg_mode=d
    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"
    nvram set wl1_country_code=US
    nvram set wl1_country_rev=0
    nvram set wl1_country_rev=768
    nvram set wl1_reg_mode=h
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
  26. francoism90 revised this gist Oct 19, 2021. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion resources.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    Country codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
  27. francoism90 revised this gist Oct 19, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions resources.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Country codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
  28. francoism90 revised this gist Oct 19, 2021. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion ASUS RT-AC87U
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump
    nvram dump > dump.txt

    # Set country + TX-power
    nvram set asuscfe0:ccode=US
    2 changes: 1 addition & 1 deletion Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump
    nvram dump > dump.txt

    # Set country + TX-power
    nvram set 0:ccode=ALL
  29. francoism90 revised this gist Oct 19, 2021. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -42,4 +42,10 @@ nvram set territory_code=US/01
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
    nvram commit
    nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set "wl1_chanspec=149/80"
    nvram commit
    service restart_wireless
  30. francoism90 revised this gist Oct 19, 2021. 3 changed files with 22 additions and 13 deletions.
    26 changes: 14 additions & 12 deletions ASUS RT-AC87U
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # To apply the settings on boot, paste the same settings in init-start.
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump

    # Set country + TX-power
    nvram set asuscfe0:ccode=US
    nvram set asuscfe1:ccode=US
    nvram set asuscfe0:regrev=0
    @@ -21,16 +26,6 @@ nvram set pci/1/1/ccode=US
    nvram set pci/2/1/ccode=US
    nvram set wl0_country=US
    nvram set wl1_country=US
    nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set "wl1_chanspec=149/80"
    nvram commit
    service restart_wireless

    # To increase TX-power
    # init-script may be needed to force changes
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 0:maxp2ga2=114
    @@ -39,4 +34,11 @@ nvram set 1:maxp2ga1=0x72
    nvram set 1:maxp2ga2=0x72
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl1_txpower=500
    nvram commit

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
    nvram set "wl1_chanspec=149/80"
    nvram commit
    service restart_wireless
    7 changes: 7 additions & 0 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,10 @@
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # To apply the settings on boot, copy + paste the same settings in init-start.

    # Backup current settings
    nvram dump

    # Set country + TX-power
    nvram set 0:ccode=ALL
    nvram set 0:regrev=0
    nvram set 1:ccode=ALL
    2 changes: 1 addition & 1 deletion init-start
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    #!/bin/sh
    # https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts
    # Follow steps @ https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts
    // paste the same nvram settings here