Skip to content

Instantly share code, notes, and snippets.

@Linden1
Forked from francoism90/README.md
Created March 1, 2024 11:19
Show Gist options
  • Save Linden1/645ef62377fee3d8cc18c7b33e228c59 to your computer and use it in GitHub Desktop.
Save Linden1/645ef62377fee3d8cc18c7b33e228c59 to your computer and use it in GitHub Desktop.

Revisions

  1. @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

  2. @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
  3. @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:
  4. @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

  5. @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
  6. @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
  7. @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
  8. @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
    ```

  9. @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.
  10. @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.
  11. @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
  12. @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
  13. @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
  14. @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
  15. @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
  16. @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
  17. @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
  18. @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
  19. @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
  20. @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
  21. @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
  22. @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
  23. @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
  24. @francoism90 francoism90 revised this gist May 21, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -3,11 +3,11 @@ 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=768
    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_country_code=US
    nvram set wl1_country_rev=768
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=h
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
  25. @francoism90 francoism90 revised this gist May 21, 2021. 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
    @@ -31,7 +31,7 @@ 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 territory_code=US/01
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
  26. @francoism90 francoism90 revised this gist May 21, 2021. 1 changed file with 27 additions and 27 deletions.
    54 changes: 27 additions & 27 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -1,37 +1,37 @@
    # Tested on EU-model, channels changes work, however increasing TX-power probably not.
    nvram set 0:ccode=US
    nvram set 0:ccode=ALL
    nvram set 0:regrev=0
    nvram set 1:ccode=US
    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_reg_mode=off
    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"
    nvram set wl1_country_code=US
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=off
    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=114
    nvram set 1:maxp5gb0a1=114
    nvram set 1:maxp5gb0a2=114
    nvram set 1:maxp5gb0a3=114
    nvram set 1:maxp5gb1a0=114
    nvram set 1:maxp5gb1a1=114
    nvram set 1:maxp5gb1a2=114
    nvram set 1:maxp5gb1a3=114
    nvram set 1:maxp5gb2a0=114
    nvram set 1:maxp5gb2a1=114
    nvram set 1:maxp5gb2a2=114
    nvram set 1:maxp5gb2a3=114
    nvram set 1:maxp5gb3a0=114
    nvram set 1:maxp5gb3a1=114
    nvram set 1:maxp5gb3a2=114
    nvram set 1:maxp5gb3a3=114
    nvram set 1:maxp5gb4a0=114
    nvram set 1:maxp5gb4a1=114
    nvram set 1:maxp5gb4a2=114
    nvram set 1:maxp5gb4a3=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 wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
  27. @francoism90 francoism90 revised this gist Apr 2, 2021. 3 changed files with 41 additions and 11 deletions.
    2 changes: 1 addition & 1 deletion nvram → ASUS RT-AC87U
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # See: http://whatsyourrouter.com/mybb/showthread.php?tid=387
    # To apply the settings on boot, paste the same settings in init-start.
    nvram set asuscfe0:ccode=US
    nvram set asuscfe1:ccode=US
    nvram set asuscfe0:regrev=0
    38 changes: 38 additions & 0 deletions Asus RT-AX58U
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # Tested on EU-model, channels changes work, however increasing TX-power probably not.
    nvram set 0:ccode=US
    nvram set 0:regrev=0
    nvram set 1:ccode=US
    nvram set 1:regrev=0
    nvram set wl0_country_code=US
    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"
    nvram set wl1_country_code=US
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=off
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 1:maxp5gb0a0=114
    nvram set 1:maxp5gb0a1=114
    nvram set 1:maxp5gb0a2=114
    nvram set 1:maxp5gb0a3=114
    nvram set 1:maxp5gb1a0=114
    nvram set 1:maxp5gb1a1=114
    nvram set 1:maxp5gb1a2=114
    nvram set 1:maxp5gb1a3=114
    nvram set 1:maxp5gb2a0=114
    nvram set 1:maxp5gb2a1=114
    nvram set 1:maxp5gb2a2=114
    nvram set 1:maxp5gb2a3=114
    nvram set 1:maxp5gb3a0=114
    nvram set 1:maxp5gb3a1=114
    nvram set 1:maxp5gb3a2=114
    nvram set 1:maxp5gb3a3=114
    nvram set 1:maxp5gb4a0=114
    nvram set 1:maxp5gb4a1=114
    nvram set 1:maxp5gb4a2=114
    nvram set 1:maxp5gb4a3=114
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram set wl_txpower=500
    nvram commit
    12 changes: 2 additions & 10 deletions init-start
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,3 @@
    #!/bin/sh
    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
    # https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts
    // paste the nvram settings here
  28. @francoism90 francoism90 revised this gist Dec 30, 2018. 2 changed files with 2 additions and 4 deletions.
    4 changes: 1 addition & 3 deletions init-start
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,4 @@ nvram set 1:maxp2ga2=0x72
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram commit

    logger -st "($(basename $0))" $$ "***SUCCESS Increased TX-power!"
    nvram commit
    2 changes: 1 addition & 1 deletion nvram
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ nvram commit
    service restart_wireless

    # To increase TX-power
    # post-mount script may be needed
    # init-script may be needed to force changes
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 0:maxp2ga2=114
  29. @francoism90 francoism90 revised this gist Dec 30, 2018. 2 changed files with 13 additions and 21 deletions.
    13 changes: 13 additions & 0 deletions init-start
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/sh
    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

    logger -st "($(basename $0))" $$ "***SUCCESS Increased TX-power!"
    21 changes: 0 additions & 21 deletions services-start
    Original file line number Diff line number Diff line change
    @@ -1,21 +0,0 @@
    #!/bin/sh
    # chmod a+x /jffs/scripts/services-start
    # Called after all other system services have been started at boot

    if [ "$(nvram get wlready)" == "1" ];
    then # Only start if WLAN is ready
    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
    service restart_wireless
    logger -st "($(basename $0))" $$ "***SUCCESS Increased TX-power!"
    else
    logger -st "($(basename $0))" $$ "***ERROR Router cannot set TX-power!"
    fi
  30. @francoism90 francoism90 renamed this gist Oct 29, 2018. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions post-mount → services-start
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/sh
    # chmod a+x /jffs/scripts/post-mount
    # Called just after a partition got mounted
    # chmod a+x /jffs/scripts/services-start
    # Called after all other system services have been started at boot

    if [ "$(nvram get wlready)" == "1" ];
    then # Only start if WLAN is ready
    @@ -13,6 +13,8 @@ then # Only start if WLAN is ready
    nvram set wl_txpower=500
    nvram set wl0_txpower=500
    nvram set wl1_txpower=500
    nvram commit
    service restart_wireless
    logger -st "($(basename $0))" $$ "***SUCCESS Increased TX-power!"
    else
    logger -st "($(basename $0))" $$ "***ERROR Router cannot set TX-power!"