ALIX 2c3 and pfsense (LEDs)
-
Is there a way to make the lights do something with pfsense?
in my ALIX 2c3 I have 3 front lights 1 is power there other 2 stay off…. I would like to assign one to WAN and the other to wireless...Thank You!
-
I believe the WRAP boards had /dev/led devices, which were created when you added the cpu_geode or the cpu_soekris options to the kernel. This doesn't work for the ALIX, perhaps due to geode.c looking for a the WRAP bios string and not the ALIX. I wondered about just changing the string and happened on this: http://www.kvedulv.de/alix-howto.html which suggests pulling geode.c from CURRENT may have ALIX support. If I have some time, I may try compiling a kernel and see if it has led support. If so, the existing code that was developed for the WRAP will probably work.
edit:this should really be in the hardware forum…
-
I compiled a 7.0 kernel with the geode.c from CURRENT on a test box- used
options cpu_geode
options cpu_soekris
Copied the kernel to my Alix running a minimal 7.0 install on CF. Rebooted.
Now I have /dev/led/led1-3 on my Alix!
The old Wrap tricks with echo work fine. I dug up RSW's blinkled- the binary didn't work under FreeBSD 7, but luckily he provided the source and it compiled on 7. Something like blinkled -i vr0 -l /dev/led/led2 works as expected. -
Thanks for the reply.
I found this on the openWRT wiki… s meant for the 2c2 but I am sure there are not much different....
1.4. Controlling the LEDs
Using the LEDs on the alix:
You should get three LED devices under /sys/class/leds/
- alix:1, alix:2 and alix:3
This should turn on one led:
echo 1 > /sys/class/leds/alix:1/brightnessAnd off:
echo 0 > /sys/class/leds/alix:1/brightnessAnd this should make it blink:
echo timer > /sys/class/leds/alix:1/trigger
echo 1000 > /sys/class/leds/alix:1/delay_off
echo 100 > /sys/class/leds/alix:1/delay_onI do apologize it should be in the hardware forum….
-
I compiled a 7.0 kernel with the geode.c from CURRENT on a test box- used
options cpu_geode
options cpu_soekris
Copied the kernel to my Alix running a minimal 7.0 install on CF. Rebooted.
Now I have /dev/led/led1-3 on my Alix!
The old Wrap tricks with echo work fine. I dug up RSW's blinkled- the binary didn't work under FreeBSD 7, but luckily he provided the source and it compiled on 7. Something like blinkled -i vr0 -l /dev/led/led2 works as expected.That is awesome!!!
I am using pfSense 1.2 FreeBSD 6.3 Any chance this can go in?
It would be very useful. -
OpenWRT is Linux, so not very helpful there.
I wouldn't hold my breath on the changes getting backported to the 6 branch, but 1.2.1 is going to be 7 anyway.
Note that I don't have anything very useful at this point. My kernel is pretty stock and not suited for pfSense. You would need to get the module compiled into a proper kernel. That's only going to happen when- pfSense is based on a FreeBSD version with the changes (7.1?)
- A developer with an Alix wants flashing LEDs enough to put the new version in.
- Someone wants cool lights on their Alix enough to put a bounty up to get it done.
I'll drop in a feature request to see if anyone is interested.
edit for ticket number: http://cvstrac.pfsense.com/tktview?tn=1784
-
It makes lots of sense!
And thanks for your fast response. -
I know this thread is very old, but I just thought I'd mention that I just committed a patch that should bring rev 1.11 of geode.c to the 1.2.3-RC snapshots.
At least it's a step in the right direction for ALIX users, the LEDs should at least have hardware support now.
As of right now (11:56PM EDT June 18th, 2009) a new snapshot hasn't happened yet, so if you want to test, wait for the next snapshot after that date/time.
-
- A developer with an Alix wants flashing LEDs enough to put the new version in.
That did it.
Must. Have. Blinkenlights. :o
-
Yea!
Doh!
https://rcs.pfsense.org/projects/pfsense-tools/repos/mainline/commits/001241e4e49f6c8bb408628f073642dd5377f826 -
Yea!
Doh!
https://rcs.pfsense.org/projects/pfsense-tools/repos/mainline/commits/001241e4e49f6c8bb408628f073642dd5377f826Yeah the patch didn't apply cleanly, I'm working on it still :)
-
Ok, I fixed the patch and committed again. Not sure when the next snapshot will be due.
I've got one building on my own builder, too, so if mine finishes first (unlikely) I'll test it on my ALIX and report what I found.
-
jimp,
Thank you very much!
Do you know how I can get them tide up one for networking and one for HDD led….
Must see blinking leds :o
-
jimp,
Thank you very much!
Do you know how I can get them tide up one for networking and one for HDD led….
Must see blinking leds :o
Not sure about that part yet. I have a new image built, but I haven't tried it yet, I'm chasing a different problem down at the moment.
-
Well I'm still not sure how to assign the LEDs various tasks, but I can tell you the patch worked
My middle light is blinking, not sure what that is indicating, but it's blinking… which is better than off :-)
-
Various cool things to do:
On
echo 1 > /dev/led/led3
Off
echo 0 > /dev/led/led3
Fast blink
echo f > /dev/led/led3
Slow blink
echo f9 > /dev/led/led3
(Works with any number from 1-9 or blank)
Morse code
echo "m…---..." > /dev/led/led3
I use led3 in this example but it works with 1-3.
Still not sure how I'll tie them to things or make them generally useful, but I'm open to ideas. (I don't know if they can be tied to network activity or not, doesn't look like it, but we'll see)
-
Looks like a new embedded snapshot just happened, it should have this.
http://snapshots.pfsense.org/FreeBSD_RELENG_7_2/pfSense_RELENG_1_2/embedded/pfSense-1.2.3-20090620-0341.img.gz
-
Jimp,
Maybe you can add what dotdash did which was add RSW's blinkled-…
That would work! :)
-
Jimp,
Maybe you can add what dotdash did which was add RSW's blinkled-…
That would work! :)
If I can get a link to the source, perhaps. I couldn't find it with a quick Google search.
-
jimp,
I PM dotdash to see if he shares the source code…
Lets see how it goes.TIA!