News: This forum is now permanently frozen.
Pages: [1]
Topic: Control for LEDs on WRAP and ALIX boards  (Read 7839 times)
« on: July 26, 2008, 22:28:39 »
oldman *
Posts: 5

Hi,
as already asked by another one here it would be nice to have the LEDs in the WARP and ALIX boards show some status information like 'reboot complete' with LED2 or 'WAN connected' with LED3.
I took a look at the sources of wrapresetbtn.c and alix23xresetbtn.c, and found that these contain already everything needed - by adding some switches so that its possible to control the LEDs this is possible.
Here you can find my modified sources, diffs, and also FreeBSD 6.x binaries (should work with M0n0wall 1.3, though I've only tested yet with pfSense which is also based on FreeBSD 6.x):
http://www.gknw.net/test/m0n0wall/
let's hope that someone else finds soon some time to look for a good place in the up/down scripts where we can put calls to control the LEDs....

Edit:
to control the LEDs use parameters, f.e.:
./alix23xresetbtn -led1=0 -led2=1 -led3=1
switches LED1 off and LED2 and LED3 on.

greetz, Günter.
« Last Edit: July 26, 2008, 23:27:56 by oldman »
« Reply #1 on: July 31, 2008, 10:35:43 »
julien23 *
Posts: 1

I confirm that LED support would be very interesting.

May be it should be part of a general framework where admin could decide what action is associated with some available LED (depend on supported platforms).

For example, with a ALIX board, I could configure LED1 for heartbeat, LED2 for WAN up/down and LED3 for any VPN.

I don't know much *BSD but Linux has support for ALIX LEDs and a general framework for playing with it.

If someone intend to work on this, I'll be happy to help.

Regards,
« Reply #2 on: September 07, 2008, 19:46:12 »
oldman *
Posts: 5

Hi,
I don't know much *BSD but Linux has support for ALIX LEDs and a general framework for playing with it.
yes, AFAIK *BSD 6.x has already good support for the WRAP LEDs which can be controlled by /dev/led[1,2,3] - but support for ALIX LEDs is only in *BSD 7.x kernel yet; so it would require to backport this ALIX support to 6.x in order to get a common way to control the LEDs from m0n0wall.
Therefore I choosed the simpler way to modify wrapresetbtn.c and alix23xresetbtn.c because these are only small programs which can be simply exchanged by any user....

Günter.

« Reply #3 on: September 07, 2008, 21:06:22 »
gionni *
Posts: 9

(should work with M0n0wall 1.3, though I've only tested yet with pfSense which is also based on FreeBSD 6.x):

$ /tmp/alix23xresetbtn -led1=0 -led2=1 -led3=1
/libexec/ld-elf.so.1: /tmp/alix23xresetbtn: Shared object has no run-time symbol table

Just for the records. (Latest beta)
« Reply #4 on: September 08, 2008, 01:04:44 »
oldman *
Posts: 5

Hi Gionni,
$ /tmp/alix23xresetbtn -led1=0 -led2=1 -led3=1
/libexec/ld-elf.so.1: /tmp/alix23xresetbtn: Shared object has no run-time symbol table
hmm, I've just launched latest 1.3b14, and seems its based on FreeBSD 6.3, but the binaries I've build were done on 6.1...., maybe thats the reason why they fail...
can you please give me a hint how you get the binaries onto a m0n0wall installation?
Is there somewhere a sshd + shell package available?

thanks, Günter.
« Reply #5 on: September 08, 2008, 09:36:37 »
gionni *
Posts: 9

can you please give me a hint how you get the binaries onto a m0n0wall installation?

In http://m0n0wall/exec.php  there is an upload form and sort of a command prompt.
After the upload is enough to "chmod +x /tmp/uploadedbinary" and run it

Of course I guess the changes in /tmp do not survive the reboot as the folder is in memory file system (the CF is mounted in /cf ), but I have tried the binary just for the sake of it.
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines