Something I wanted to do since ages. My wireless router WRT54GL running the Tomato firmware has a button on the front, which can be used to toggle WIFI on and off. The router has also a rather visible LED indicator, behind the button, that is unfortunately not used to show the WIFI status. (Originally, the wifi status is just shown by a tiny LED, that is just visible when watching closely the device).
It’s easy to fix that. Using the web interface, go to the ‘Administration’ > ‘Buttons / LED’ page. Replace the custom script by the following code:
# status: 1: wifi on, 0: wifi off
status=$(wl -a eth1 dump | grep associated | cut -d " " -f 2);
# toggle wifi & amber led
wl -a eth1 $([ $status -eq 0 ] && echo up || echo down)
led amber $([ $status -eq 0 ] && echo on || echo off)
Then change the setting for ‘0 – 2 Seconds’ to ‘Run Custom Script’. That’s it. Now when we press the button, the wireless is toggled and the LED switches itself accordingly.
Tested with Tomato 1.19.
Recent Comments