Skip to content

Instantly share code, notes, and snippets.

@wgentine
Forked from francoism90/README.md
Created February 9, 2019 10:58
Show Gist options
  • Save wgentine/b7da6bd80c0a29122ab08e4d6f88af43 to your computer and use it in GitHub Desktop.
Save wgentine/b7da6bd80c0a29122ab08e4d6f88af43 to your computer and use it in GitHub Desktop.

Revisions

  1. @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
  2. @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
  3. @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!"
  4. @francoism90 francoism90 revised this gist Oct 29, 2018. 2 changed files with 4 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion ASUS RT-AC78U → nvram
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # http://whatsyourrouter.com/mybb/showthread.php?tid=387
    # Login into router using SSH and execute listed commands (AT OWN RISK!).
    # See: http://whatsyourrouter.com/mybb/showthread.php?tid=387
    nvram set asuscfe0:ccode=US
    nvram set asuscfe1:ccode=US
    nvram set asuscfe0:regrev=0
    @@ -29,6 +30,7 @@ nvram commit
    service restart_wireless

    # To increase TX-power
    # post-mount script may be needed
    nvram set 0:maxp2ga0=114
    nvram set 0:maxp2ga1=114
    nvram set 0:maxp2ga2=114
    1 change: 1 addition & 0 deletions post-mount
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #!/bin/sh
    # chmod a+x /jffs/scripts/post-mount
    # Called just after a partition got mounted

  5. @francoism90 francoism90 revised this gist Oct 29, 2018. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions post-mount
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # chmod a+x /jffs/scripts/post-mount
    # Called just after a partition got mounted

    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
    logger -st "($(basename $0))" $$ "***SUCCESS Increased TX-power!"
    else
    logger -st "($(basename $0))" $$ "***ERROR Router cannot set TX-power!"
    fi
  6. @francoism90 francoism90 revised this gist Oct 29, 2018. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions ASUS RT-AC78U
    Original file line number Diff line number Diff line change
    @@ -27,3 +27,14 @@ nvram commit
    nvram set "wl1_chanspec=149/80"
    nvram commit
    service restart_wireless

    # To increase TX-power
    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
  7. @francoism90 francoism90 revised this gist Oct 29, 2018. No changes.
  8. @francoism90 francoism90 revised this gist Oct 29, 2018. No changes.
  9. @francoism90 francoism90 revised this gist Oct 28, 2018. 1 changed file with 16 additions and 19 deletions.
    35 changes: 16 additions & 19 deletions ASUS RT-AC78U
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,26 @@
    # http://whatsyourrouter.com/mybb/showthread.php?tid=387
    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 0:ccode=#a
    nvram set 1:ccode=#a
    nvram set pci/1/1/ccode=#a
    nvram set pci/1/1/regrev=0
    nvram set pci/2/1/ccode=#a
    nvram set pci/2/1/regrev=0
    nvram set regulation_domain=#a
    nvram set regulation_domain_5G=#a
    nvram set wl_country_code=#a
    nvram set wl_country_rev=0
    nvram set wl0_country=#a
    nvram set wl0_country_code=#a
    nvram set wl0_country_code=US
    nvram set wl1_country_code=US
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    nvram set wl1_country=#a
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl0_reg_mode=off
    nvram set wl1_reg_mode=off
    nvram unset asuscfeterritory_code
    nvram set asuscfecommit=1
    nvram unset territory_code
    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 commit
    reboot

    # If changing 5G in the interface doesn't work:
    # https://www.snbforums.com/threads/changing-channel-width-from-terminal.12432/
  10. @francoism90 francoism90 created this gist Oct 28, 2018.
    32 changes: 32 additions & 0 deletions ASUS RT-AC78U
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    # http://whatsyourrouter.com/mybb/showthread.php?tid=387
    nvram set 0:regrev=0
    nvram set 1:regrev=0
    nvram set 0:ccode=#a
    nvram set 1:ccode=#a
    nvram set pci/1/1/ccode=#a
    nvram set pci/1/1/regrev=0
    nvram set pci/2/1/ccode=#a
    nvram set pci/2/1/regrev=0
    nvram set regulation_domain=#a
    nvram set regulation_domain_5G=#a
    nvram set wl_country_code=#a
    nvram set wl_country_rev=0
    nvram set wl0_country=#a
    nvram set wl0_country_code=#a
    nvram set wl0_country_rev=0
    nvram set wl0_reg_mode=off
    nvram set wl1_country=#a
    nvram set wl1_country_code=#a
    nvram set wl1_country_rev=0
    nvram set wl1_reg_mode=off
    nvram unset asuscfeterritory_code
    nvram set asuscfecommit=1
    nvram unset territory_code
    nvram commit
    reboot

    # 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