FEATURE REQ: WiFi on/off with side switch?

Hello there :slight_smile:

For those who have the issue that the switch button position is not taken into account on init / start up, here is another way to use your switch button as a wifi toggler .

  1. Connect to your router with ssh :

sh root@ip

  1. Install wifitoggle package :

opkg update && opkg install wifitoggle

(more info : [OpenWrt Wiki] Wi-Fi on/off buttons)

  1. Set these settings for the wifitoggle package :
    note: BTN_8 works for the GL-AR300M, you might need to change it

uci set wifitoggle.@wifitoggle[0].button=β€˜BTN_8’
uci set wifitoggle.@wifitoggle[0].persistent=β€˜1’
uci set wifitoggle.@wifitoggle[0].timer=β€˜0’
uci commit

( 4. should be optional, reboot router :

reboot

)

  1. Verify settings are applied :

uci show wifitoggle

you should see :

root@xxx:~# uci show wifitoggle

wifitoggle.@wifitoggle[0]=wifitoggle
wifitoggle.@wifitoggle[0].led_enable_trigger=β€˜timer’
wifitoggle.@wifitoggle[0].led_enable_delayon=β€˜500’
wifitoggle.@wifitoggle[0].led_enable_delayoff=β€˜500’
wifitoggle.@wifitoggle[0].led_disable_default=β€˜0’
wifitoggle.@wifitoggle[0].button=β€˜BTN_8’
wifitoggle.@wifitoggle[0].persistent=β€˜1’
wifitoggle.@wifitoggle[0].timer=β€˜0’

and the router button is now a wifi toggle and keeps state after rebooting the router!

1 Like