OpenWrt Forum Archive

Topic: How to configure the LEDs

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
    I've seen it mention that the "led" service via a proper entry in the /etc/config/system file it is able to set the status of the LEDs that might be present on you router (in my case a NSLU2). Unfortunately I could not find any example on how this entry has to be constructed to make it happen. If I configure the LEDs manually (there are plenty of examples on how to do it) all works fine but of course once the unit is rebooted all is gone. I could use the rc.common file instead but since I saw this about the led service I was curious on how to do it ... maybe a good soul can help me out.

Cheers Fulvio.

I got the same issue on my NSLU2 with Kamikaze 8092.
How can I configure the disk1 and disk2 Leds?
No disk attached: Led off
Disk attached:Led on
Disk data transfer: Led blinking

thanks - felix

Example from my NSLU2 (/etc/config/system file)

I use:
  the Disk1 led to notify the device is running (HeartBeat),
  the Disk2 led to notify the Ethernet activity
  and the Red Ready led to notify the traffic on my IPv6 tunnel.


config 'system'
        option 'hostname' 'slug'
        option 'timezone' 'UTC'

config 'led'
        option 'name' 'PowerLed'
        option 'sysfs' 'nslu2:green:ready'
        option 'trigger' 'none'

config 'led'
        option 'name' 'PowerRed'
        option 'trigger' 'netdev'
        option 'dev' 'he-ipv6'
        option 'mode' 'tx rx'
        option 'sysfs' 'nslu2:red:status'

config 'led'
        option 'name' 'Disk2'
        option 'trigger' 'netdev'
        option 'dev' 'br-lan'
        option 'mode' 'tx rx'
        option 'sysfs' 'nslu2:green:disk-2'

config 'led'
        option 'name' 'Disk1'
        option 'trigger' 'heartbeat'
        option 'sysfs' 'nslu2:green:disk-1'

(Last edited by grogi on 10 Apr 2010, 11:09)

@grogi,

thanks for the example. Helps a lot. 
Did you modify the file directly or via the Luci Web interface?

felixka wrote:

Did you modify the file directly or via the Luci Web interface?

Initially I have used the LuCI web interface.

is there any documentation about the valid Parameters in "system" for the leds?

I'm using an NSLU2 and trying for hours to get disk-1 and disk-2 led working for usb-traffic,
but without documentation.... have searched but not found (as always), could anybody pls. help ?

many thanks

The discussion might have continued from here.