Skip to content

Instantly share code, notes, and snippets.

@dvdrhr
Forked from francoism90/README.md
Last active November 11, 2024 08:53
Show Gist options
  • Save dvdrhr/aa0497bae89cbf867a6cdce690061d5c to your computer and use it in GitHub Desktop.
Save dvdrhr/aa0497bae89cbf867a6cdce690061d5c to your computer and use it in GitHub Desktop.

Revisions

  1. dvdrhr revised this gist Nov 11, 2024. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion wl
    Original file line number Diff line number Diff line change
    @@ -77,7 +77,16 @@ wl -i eth7 up

    # SET TRANSMISSION POWER (eth6=2,4ghz=2,5x; eth7=5ghz=max)
    # MAY INCREASE HEAT, KEEP WIFI CHIPS BELOW 50°C
    wl -i eth6 txpwr1 -m 500 -o

    # double the power (mW) for the 2,4 ghz transmission
    wl -i eth6 txpwr1 -m 200 -o

    # reduced from 500 to 200 because it was too much and my smartphone
    # wanted to connect to it when I was outside but failed because its
    # own transmission power was proably to weak to 'answer'
    # wl -i eth6 txpwr1 -m 500 -o

    # max txpower for the 5g transmission
    wl -i eth7 txpwr1 -m 1500 -o

    #########################################################
  2. dvdrhr revised this gist Nov 11, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wl
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    GNU nano 7.2 /jffs/scripts/wl #!/bin/sh
    #!/bin/sh

    ########################################################
    # SET CONFIG VALUES THAT GET PICKED UP BY THE FIRMWARE #
  3. dvdrhr revised this gist Nov 11, 2024. 1 changed file with 19 additions and 14 deletions.
    33 changes: 19 additions & 14 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,21 +1,28 @@
    #!/bin/sh
    GNU nano 7.2 /jffs/scripts/wl #!/bin/sh

    ########################################################
    # SET CONFIG VALUES THAT GET PICKED UP BY THE FIRMWARE #
    ########################################################

    # Allow all channels
    nvram set territory_code=CN/02
    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 2:ccode=#a
    nvram set 2:regrev=0
    nvram set wl_country_code=#a
    nvram set wl_country_rev=0

    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    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 wl0_chlist="1 2 3 4 5 6 7 8 9 10 11 12 13 14"

    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    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"

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    @@ -42,9 +49,9 @@ nvram set 1:maxp5gb4a2=120
    nvram set 1:maxp5gb4a3=120

    # commented out because we set it manually below using the wl command
    nvram set wl0_txpower=708
    nvram set wl1_txpower=708
    nvram set wl_txpower=708
    # nvram set wl0_txpower=708
    # nvram set wl1_txpower=708
    # nvram set wl_txpower=708

    # Commit changes
    nvram commit
    @@ -58,15 +65,15 @@ wl -i eth6 down
    wl -i eth6 country ALL
    wl -i eth6 country_abbrev_override "US"
    wl -i eth6 regulatory 1
    wl -i eth7 spect 0
    wl -i eth6 spect 0
    wl -i eth6 up

    wl -i eth6 down
    wl -i eth6 country ALL
    wl -i eth6 country_abbrev_override "US"
    wl -i eth6 regulatory 1
    wl -i eth7 down
    wl -i eth7 country ALL
    wl -i eth7 country_abbrev_override "US"
    wl -i eth7 regulatory 1
    wl -i eth7 spect 0
    wl -i eth6 up
    wl -i eth7 up

    # SET TRANSMISSION POWER (eth6=2,4ghz=2,5x; eth7=5ghz=max)
    # MAY INCREASE HEAT, KEEP WIFI CHIPS BELOW 50°C
    @@ -82,7 +89,5 @@ wl -i eth7 txpwr1 -m 1500 -o
    /bin/pwr config --eee off
    /bin/pwr config --apd off
    /bin/pwr config --dgm off
    /bin/pwr config --avs off


    ### END SCRIPT ###
    ### END SCRIPT ###
  4. dvdrhr revised this gist Aug 27, 2024. 1 changed file with 18 additions and 25 deletions.
    43 changes: 18 additions & 25 deletions wl
    Original file line number Diff line number Diff line change
    @@ -10,27 +10,12 @@ nvram set 0:ccode=#a
    nvram set 0:regrev=0
    nvram set 1:ccode=#a
    nvram set 1:regrev=0
    nvram set territory_code=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_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=#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

    # Set TX-Power (risky!)
    nvram set 0:maxp2ga0=120
    @@ -57,9 +42,9 @@ nvram set 1:maxp5gb4a2=120
    nvram set 1:maxp5gb4a3=120

    # commented out because we set it manually below using the wl command
    #nvram set wl0_txpower=100
    #nvram set wl1_txpower=100
    #nvram set wl_txpower=708
    nvram set wl0_txpower=708
    nvram set wl1_txpower=708
    nvram set wl_txpower=708

    # Commit changes
    nvram commit
    @@ -69,16 +54,24 @@ nvram commit
    ########################

    # TURN OFF DSF SCANNING
    wl -i eth7 down
    wl -i eth7 regulatory 1
    wl -i eth6 down
    wl -i eth6 country ALL
    wl -i eth6 country_abbrev_override "US"
    wl -i eth6 regulatory 1
    wl -i eth7 spect 0
    #wl -i eth7 chanspec 128/80
    wl -i eth7 up
    wl -i eth6 up

    wl -i eth6 down
    wl -i eth6 country ALL
    wl -i eth6 country_abbrev_override "US"
    wl -i eth6 regulatory 1
    wl -i eth7 spect 0
    wl -i eth6 up

    # SET TRANSMISSION POWER (eth6=2,4ghz=2,5x; eth7=5ghz=max)
    # MAY INCREASE HEAT, KEEP WIFI CHIPS BELOW 50°C
    wl -i eth6 txpwr1 -o -m 250
    wl -i eth7 txpwr1 -o -m 1500
    wl -i eth6 txpwr1 -m 500 -o
    wl -i eth7 txpwr1 -m 1500 -o

    #########################################################
    # TURN OFF EVERYTHING ENERGY SAVING (MAY INCREASE HEAT) #
  5. dvdrhr revised this gist Aug 13, 2024. 2 changed files with 46 additions and 12 deletions.
    5 changes: 5 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    # EDITS
    - ADDED MANUAL SETTING OF TRANSMISSION POWER & DSF TURN-OFF
    - ADDED DISABLING OF ALL ENERGY SAVING FEATURES


    # Warning

    > Following instructions are provided without any warranty, and may even get you in trouble legally.
    53 changes: 41 additions & 12 deletions wl
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,16 @@
    #!/bin/sh

    ########################################################
    # SET CONFIG VALUES THAT GET PICKED UP BY THE FIRMWARE #
    ########################################################

    # 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 territory_code=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"
    @@ -28,13 +32,6 @@ 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
    @@ -58,9 +55,41 @@ 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

    # commented out because we set it manually below using the wl command
    #nvram set wl0_txpower=100
    #nvram set wl1_txpower=100
    #nvram set wl_txpower=708

    # Commit changes
    nvram commit
    nvram commit

    ########################
    # "MANUAL" WL COMMANDS #
    ########################

    # TURN OFF DSF SCANNING
    wl -i eth7 down
    wl -i eth7 regulatory 1
    wl -i eth7 spect 0
    #wl -i eth7 chanspec 128/80
    wl -i eth7 up

    # SET TRANSMISSION POWER (eth6=2,4ghz=2,5x; eth7=5ghz=max)
    # MAY INCREASE HEAT, KEEP WIFI CHIPS BELOW 50°C
    wl -i eth6 txpwr1 -o -m 250
    wl -i eth7 txpwr1 -o -m 1500

    #########################################################
    # TURN OFF EVERYTHING ENERGY SAVING (MAY INCREASE HEAT) #
    #########################################################

    /bin/pwr config --cpuwait off
    /bin/pwr config --phy off
    /bin/pwr config --eee off
    /bin/pwr config --apd off
    /bin/pwr config --dgm off
    /bin/pwr config --avs off


    ### END SCRIPT ###
  6. @francoism90 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.
  7. @francoism90 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
  8. @francoism90 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

  9. @francoism90 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
  10. @francoism90 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:
  11. @francoism90 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

  12. @francoism90 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
  13. @francoism90 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
  14. @francoism90 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
  15. @francoism90 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
    ```

  16. @francoism90 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.
  17. @francoism90 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.
  18. @francoism90 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
  19. @francoism90 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
  20. @francoism90 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
  21. @francoism90 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
  22. @francoism90 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
  23. @francoism90 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
  24. @francoism90 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
  25. @francoism90 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
  26. @francoism90 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
  27. @francoism90 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
  28. @francoism90 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
  29. @francoism90 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
  30. @francoism90 francoism90 revised this gist Jul 29, 2021. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ nvram set 1:regrev=0
    nvram set wl0_country_code=US
    nvram set wl0_country_rev=0
    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"
    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_reg_mode=h
    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
    // paste the nvram settings here
    // paste the same nvram settings here