ALIX 2c3 and pfsense (LEDs)
-
This is easier:
/etc/rc.conf_mount_rw fetch -o /usr/local/bin/blinkled http://the-ori.org/pfs/blinkled chmod a+x /usr/local/bin/blinkled /etc/rc.conf_mount_ro rehash
I'll see about getting a package or something built, but it will be a couple days unless things clear up. Things are have been a little busy at work/home.
-
jimp,
Thank you very much!
-
I know it's been a while but I do have some updates:
#1: I'm going to be adding some LED stuff to 2.0. Stuff that won't/can't make it into 1.2.3 because it will have to be in system files and not in a package.
#2: I did just add a blinkled package that will work on the 1.2.3-RC nanobsd images. It works for me, so give it a try. After installing the package, go to Interfaces -> Assign LEDs. Should be self-explanatory from there.
-
Hmm, just installed and not working here.
Nothing blinks and service remains stopped after I attempt to start it.
I have 1.2.3RC2 build from Jun 16.
The configuration is : enable both leds and assign led2 to wan and led3 to wifi.
Where should I look for logs? -
Hmm, just installed and not working here.
Nothing blinks and service remains stopped after I attempt to start it.
I have 1.2.3RC2 build from Jun 16.
The configuration is : enable both leds and assign led2 to wan and led3 to wifi.
Where should I look for logs?There are no logs, not yet. It's only the first attempt at getting the package working. I'll polish it up some more over the next few days as I get time.
I only tested it on a nanobsd 2.0 snapshot from this past week.
So you checked the main enable box, the box for each led, and assigned them both?
I'm not sure if the service status works yet, it errors out for me so far. Try going to Diagnostics > Command, and type:
ps xa | grep blinkled
It works for me, and even starts back up after a reboot.
-
Yes, I have enabled both leds and checked the main enable box.
The process doesn't seem to be running when I try using ps aux | grep blink
Is there a way to run it manually from ssh shell?
Also I don't have led device in the dev folder.
Maybe 1.2.3RC2 from jun16 doesn't have the drivers for that?Just one ย more thing I forgot to mention :
I am running a regular full version (not nanobsd or embedded).Ok one more update :)
I was able to run the blinkled from the ssh and here is an error message that I got :
Error: Unable to access led -
You may not have a new enough build. I added the patch on about June 22nd to add support for ALIX LEDs.
-
Yeah looks like it,
Can you recommend a specific build known not to cause too many problem but is recent enough?
I am kinda hestitant to install a new snapshot with all those horror stories about the latest build breaking everything etc :)Ok nevermind I went ahead and installed the latest snapshot and the led package works now:)
One thing I don't understand though.
When I do pinging say my wireless client from the pfsense nothing blinks.
When I start browsing from the wireless client it does blink.
Is pinging not enough for the light to start blinking? -
I haven't really looked at the source code for the blinkled program itself. It may ignore traffic until it passes a certain threshold.
-
Very nice, thanks Jimp. It's working fine on my test rig. One thought- maybe move the alert to LED1 and return the state to on, instead of using LED2, then turning it off when the alert is cleared? This would leave LED2 and LED3 free for blinkled.
-
Very nice, thanks Jimp. It's working fine on my test rig. One thought- maybe move the alert to LED1 and return the state to on, instead of using LED2, then turning it off when the alert is cleared? This would leave LED2 and LED3 free for blinkled.
That's my intent after the code settles for a bit.
-
i was waiting for this since the day i bought the alix, is it possible to configure the led to blink even faster or lets say a way to configure the on and off period, i want it to blick link the leds onย a switch or a router, which is faster.
-
i was waiting for this since the day i bought the alix, is it possible to configure the led to blink even faster or lets say a way to configure the on and off period, i want it to blick link the leds onย a switch or a router, which is faster.
You would have to look at the source of the blinkled program for that, which I didn't write. I don't think it can be used as a realtime indicator like a real switch port. It only polls periodically and flashes if it sees activity within a specific timeframe, if I recall correctly.
-
how about if it was used for the correct purpose of the LED being in the alix in the first place, think of it as a computer, LED1 could be power which it already is, LED2 as processor indicator and LED3 as HDD or CF read/write as the LEDs on the network adapters are enough of LEDs already blinking as for me they face the wall and there not being any way to turn them off as its directly plugged to the network card chip
-
It being a customizable device, there is no real "correct purpose" for the LEDs, they can be whatever someone programs them to be. Personally, I like LED1 to be power and alerts, and LED2/3 to be network activity.
If someone wants to come along and write a program that will flash the LEDs based on other types of activity, it would be more than welcome.
-
Here is an old thread with some additional ideas on using the LEDs. http://forum.pfsense.org/index.php/topic,327.0.html
-
Here is an old thread with some additional ideas on using the LEDs. http://forum.pfsense.org/index.php/topic,327.0.html
In 2.0 I have an LED library that makes it easy to do some handy things, but I don't think it's going to make it into 1.2.x. For example, I have it blink "sos" in morse code on LED1 when there is an alert. That part may make it into 1.2.3 if I get some time to work out a patch (should be easy I just need to take the time to reflash my alix as 1.2.3 and test it first)
If something is going to use the LEDs on 1.2.3, it will need to be something that can be made into a package, like I'm working on with blinkled.
The problem is that the system itself can't be told to trigger the LEDs on, for example, disk activity. Some program will have to be constantly running and polling for disk activity and then flash the LED when it is seen.
-
Anyone do anything cool with the LEDs?
-
Not with PFSense, but with a WAN Emulator I have the second LED turn on when emulation is on.ย Just a visual reminder.
Maybe PFSense could have it turn on if certain events are true like if OpenVPN connection is established, if a certain firewall rule is tripped or if a critical service stops running like ospfd or snort?Personally I use pfsend under kvm, so I don't run it on ALIX.ย I don't know if you guys keep it on your desks where you can easily look at it.
-
I know it's been a while but I do have some updates:
#1: I'm going to be adding some LED stuff to 2.0. Stuff that won't/can't make it into 1.2.3 because it will have to be in system files and not in a package.
#2: I did just add a blinkled package that will work on the 1.2.3-RC nanobsd images. It works for me, so give it a try. After installing the package, go to Interfaces -> Assign LEDs. Should be self-explanatory from there.
Is there any way to obtain de source code of blinkled ? i would like to try to adapt this code for the leds of aย firebox II panel ?