Hi all,

Oh, that is not just enough.  I figure out more...

modprobe ledtrig-heartbeat
modprobe ledtrig-timer

1. enable heartbeat led in LED1, depending on load average - higher the load, faster it blinks
   echo heartbeat > /sys/class/leds/alix\:1/trigger

2. enable LED2 to show ide disk activity
   echo ide-disk > /sys/class/leds/alix\:2/trigger

3. enable timer-based control in LED3, 1 sec on, 5 sec off
   echo timer > /sys/class/leds/alix\:3/trigger
   echo 1000 > /sys/class/leds/alix:\3/delay_on
   echo 5000 >  /sys/class/leds/alix\:3/delay_off

to turn off trigger
echo none > /sys/class/leds/alix\:1/trigger
echo none > /sys/class/leds/alix\:2/trigger
echo none > /sys/class/leds/alix\:3/trigger

There is also a morse code led trigger. It's fun but I don't know how to make good use of it.

Cheers,
Punky


Kim-man 'Punky' Tse wrote:
Hi Robert,

So cool!  It's now Now available in
http://www.voyage.hk/dists/experimental/linux/linux-image-2.6.23-486-voyage_4.0-3_i386.deb
And in tomorrow daily snapshot.

modprobe led-class
modprobe leds-alix

To turn on:
voyage:~# echo 1 > /sys/class/leds/alix\:1/brightness
voyage:~# echo 1 > /sys/class/leds/alix\:2/brightness
voyage:~# echo 1 > /sys/class/leds/alix\:3/brightness

To turn off:
voyage:~# echo 0 > /sys/class/leds/alix\:1/brightness
voyage:~# echo 0 > /sys/class/leds/alix\:2/brightness
voyage:~# echo 0 > /sys/class/leds/alix\:3/brightness

Cheers,
Punky

Robert Rawlins - Think Blue wrote:
Hi Punky,

That is a coincidence :-D This looks like a very simple little API, by the looks of things you simple pass in a Boolean true/false to the set methods
and it'll enable to disable the LED.

I'm not a C man so don't really know just yet, I'll probably create a SWIG
document once I've got it figured out which will create bindings for
different languages.

If you find out how to use it before I do then let me know :-D

Cheers,

Robert

-----Original Message-----
From: Kim-man 'Punky' Tse [mailto:[EMAIL PROTECTED] Sent: 27 February 2008 12:17
To: Robert Rawlins - Think Blue
Cc: [EMAIL PROTECTED]
Subject: Re: [Voyage-linux] ALIX LED Control

Hi Robert,

What a coincidence. I have just get the LED kernel code from openwrt. But not yet figure out how to use it.

https://svn.openwrt.org/openwrt/trunk/target/linux/generic-2.6/files/drivers
/leds/leds-alix.c

Regards,
Punky

Robert Rawlins - Think Blue wrote:
Hello Guys,

Does anyone have any scripts available which allow us to control the 3 LED's which are on an ALIX system? It would be pretty cool if it's possible.

Cheers,

Robert

------------------------------------------------------------------------

_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux


_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux


_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux


_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux

Reply via email to