- Do whatever you'd normally do to set up a router- set the SSID, password, etc.
- Plug in power to your device
- Connect your laptop or phone to the default SSID using the SSID/Password listed on the label on the back of the router.
- SSH to 192.168.8.1 as user
root
(default password isgoodlife
). For example, from Mac or Linux:
# ssh [email protected]
- Edit a new file at
/sbin/wifi_toggle
(usingvi
or similar) - Paste in the script
- Save!
- Give the script executable permissions:
# chmod +x /sbin/wifi_toggle
- Click the advanced interface link in the upper right
- Sign in to the advanced interface as user
root
(default password:goodlife
) - Go to System > Scheduled Tasks
- Enter
*/3 * * * * /sbin/wifi_toggle
and save
Adjust this cron string to change the timing, e.g.*/10 * * * * /sbin/wifi_toggle
would toggle every 10 minutes. - Go to System > Reboot to reboot the router
- Your device should reboot and start cycling wifi on/off!
- This is based on the wifi toggle script here, but avoids manually changing the lights. The device seems to already be watching wifi state and the lights update automatically.
- This should work on any OpenWRT/LEDE compatible router, but you may need to change the
device
variable in thewifi_toggle
script. Here's an example of how to find it on the GL-MT300N-V2 (its wireless device name ismt7628
).
# uci show | grep wifi-device
wireless.mt7628=wifi-device
Note: your device may have more than one wireless device.
- For other devices, you may or may not need to manually update the wifi lights as shown here. The GL-MT300N-V2 doesn't seem to need it.