What's new

leds control script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

TheLyppardMan

Very Senior Member
I just tried the led-control script on my router (non-entware setup) but when the script turned the leds back on, two of them remained off (the 2.5GHz LAN & USB drive leds) and would only come back on when I uninstalled the script. I'm just curious as to why that might have happened? I did notice similar behaviour on earlier ASUS routers, so it's not specific to my current router.
 
The one I wrote for amtm?
Run this to confirm, to turn them on:
Code:
nvram set led_disable=0
nvram commit
service restart_leds
To turn them off set to 1
 
The one I wrote for amtm?
Run this to confirm, to turn them on:
Code:
nvram set led_disable=0
nvram commit
service restart_leds
To turn them off set to 1
That's the one.

If I manually paste in the code you provided above, all the leds that should come on do so. But if I install your script via amtm, only the first five leds light up. The 2.5GHz LAN and the USB drive leds remain off.
 
How about these two commands:
Code:
/jffs/addons/amtm/ledcontrol -on
/jffs/addons/amtm/ledcontrol -off
 
Do I need to install your script before issuing the above commands?
 
Do I need to install your script before issuing the above commands?
amtm keeps a tidy house, it removes every file no longer needed if an addon is removed or gone.
 
I've just tried the manual commands and also using the script. When the leds come back on, it's just the one for the USB drive that doesn't light up.
 
The script and the manual commands do the exact same thing - that Pro model acting up?
 
The script and the manual commands do the exact same thing - that Pro model acting up?
No idea. I seem to recall that I noticed this happening with other ASUS routers.
 
Makes no sense to me. Can you grab some data for me?
Turn the LEDs on with
Code:
nvram set led_disable=0
service restart_leds
Then save nvram the LED state with
Code:
nvram show | sort | grep '^led_\|AllLED' >/home/root/nvram-led-on.txt
And then off with
Code:
nvram set led_disable=1
service restart_leds
Then save nvram the LED state with
Code:
nvram show | sort | grep '^led_\|AllLED' >/home/root/nvram-led-off.txt

Check that the LEDs state is correct, then post the content of the files.

If the state is not correct, run 'nvram commit' before service restart.
 
I'm still a novice at scripts, so could you explain how I do a nvram commit?
 
Just add the extra command like so for the off state:
Code:
nvram set led_disable=1
nvram commit
service restart_leds
 
Here's the contents of the file you requested when the router led for the USB drive was still unlit:

AllLED=1
AllLED_brightness=255
led_2g_gpio=255
led_5g_gpio=255
led_all_gpio=255
led_ctrl_cap=4
led_disable=0
led_extphy_gpio=4115
led_lan1_gpio=255
led_lan2_gpio=255
led_lan3_gpio=255
led_lan4_gpio=255
led_lan_gpio=4097
led_logo_gpio=255
led_pwr_gpio=4146
led_usb3_gpio=255
led_usb_gpio=4098
led_val=0
led_wan_gpio=4145
led_wan_normal_gpio=4113
led_wps_gpio=4144
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top