Hello there
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 .
- Connect to your router with ssh :
sh root@ip
- Install wifitoggle package :
opkg update && opkg install wifitoggle
(more info : [OpenWrt Wiki] Wi-Fi on/off buttons)
- 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
)
- 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!