Posted: Sat Jun 20, 2009 1:33 am Post subject: Firebox 700 LED Triangle
Anyone been able to get the LED triangle working?
Just as a quick note getting the Watchguard 700 to work was easy, just set jumper on board to slave, jumper on compact flash to Master, booted right up.
Hardest part was finding a compact flash adapter, ordered one from ebay (hong kong) for $2.66 shipped to Arizona in 13 days, no customs issues...just too funny at a ridiculas price!
I tried running your sample led code on my FBIII but I got "Segmentation Error". After re-compiling on my DSL install - I had to add the following to make it compile by the way:
Code:
#include <stdlib.h>
#include <unistd.h>
...I'm still getting the error.
I'm a total n00b when it comes to C, GCC and GDB but this is what I got:
Code:
Starting program: /opt/lampp/htdocs/led-test
Program received signal SIGSEGV, Segmentation fault.
0x08048d49 in outb (value=122 'z', port=11) at io.h:99
99 __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
(gdb) backtrace
#0 0x08048d49 in outb (value=122 'z', port=11) at io.h:99
#1 0x08048c82 in port_out (port=890, val=11 '\v') at led.c:92
#2 0x080488fd in set_logical_control (ctrl=0) at led.c:461
#3 0x0804894d in update_all () at led.c:486
#4 0x08048b40 in init () at led.c:571
#5 0x08048bd3 in light_disarm () at led.c:621
#6 0x08048c1f in main () at led.c:642
(gdb) frame 1
#1 0x08048c82 in port_out (port=890, val=11 '\v') at led.c:92
92 outb(port, val);
(gdb) frame 2
#2 0x080488fd in set_logical_control (ctrl=0) at led.c:461
461 port_out(0x37a, ctrl^0x0b);
(gdb) frame 3
#3 0x0804894d in update_all () at led.c:486
486 set_logical_control(0x00);
(gdb) frame 4
#4 0x08048b40 in init () at led.c:571
571 update_all();
(gdb) frame 5
#5 0x08048bd3 in light_disarm () at led.c:621
621 init();
(gdb) frame 6
#6 0x08048c1f in main () at led.c:642
642 light_disarm();
1. Mechanical failure- Consumer drives are not designed for 24x7 service. Unless you have a server class HDD, I dont recommend it.
2. Power use is higher
3. Noisy
4. Not enough physical space in the box
Thats about it. If you are just playing and testing, I dont see a reason not to use a HDD. Just not recommended as a permanent setup.
Also, don't bother trying the PCMCIA slots, it will not work period. There is an IRQ conflict that the latest kernel of Linux and our boards have issues with. I venture to guess that the IRQ from the PCMCIA chipset cannot be shared.
You will have the same issue with anything USB, even if you add a PCI card with USB ports. Again, is related to the limited ammount of usable IRQs with this board. _________________ Firebox II with DD-WRT, 1 Atheros PCI card, 400MHz AMD K-6 2 CPU, 128RAM, 256MB CF Flash
1. Mechanical failure- Consumer drives are not designed for 24x7 service. Unless you have a server class HDD, I dont recommend it.
2. Power use is higher
3. Noisy
4. Not enough physical space in the box
Thats about it. If you are just playing and testing, I dont see a reason not to use a HDD. Just not recommended as a permanent setup.
Also, don't bother trying the PCMCIA slots, it will not work period. There is an IRQ conflict that the latest kernel of Linux and our boards have issues with. I venture to guess that the IRQ from the PCMCIA chipset cannot be shared.
You will have the same issue with anything USB, even if you add a PCI card with USB ports. Again, is related to the limited ammount of usable IRQs with this board.
Cheers for that! I shall certainly look into getting a cf card then.
I've been attempting to load debian on it to it as well to no avail. Might have to get an old old pre-atx machine out with a pentium in it!
Posted: Sun Sep 13, 2009 1:37 pm Post subject: Fixed for successful work with Firebox II
After 14 hours of testing i've worked out the correct update-direction for the control port.
Additionally the following function needs to be customized to work with gcc-version of ubuntu (else you'll get a segfault!):
Changend the function to get the data of the leds correctly updated between the control-port state-changes. In the original version the data was set before setting the control port state. In the original code was some strange behavior which caused some leds to blink as they don't should.
By the way if anybody is interested, the FireBox II onBoard connector to the display is a normal LPT-Port only. The Pins are connected in normal thier normal direction. (1->1, 2->2 ... 25->25) From the onBoard connector to the 25pin SUB-D.
Posted: Sat Nov 07, 2009 12:16 pm Post subject: sdeclcd - firebox x series
please have a look here, i released a new version of the original driver (i am not the original author) by adding keyboard support and a backlight timer function
Thank you so much! Too bad that my Firebox II only has an LED status display and not a full LCD, but I am sure other people may find it useful. _________________ Firebox II with DD-WRT, 1 Atheros PCI card, 400MHz AMD K-6 2 CPU, 128RAM, 256MB CF Flash
Posted: Tue Nov 17, 2009 1:36 am Post subject: LED Driver for linux
Here is my improvised solution. Leddrive is a bash script that scrapes the network and load statistics the uses led to populate the LED's. I will continue to refine the code with the ending goal of having the led program read the stats directly without the need of a bash script.
Of note, I am using the traffic bar graph for download and the load bar graph for upload. I used the triangle for load since I have no idea how to track a packet with out killing the internet speed.
Details for led:
-a Arm light only
-d disarm light only
-n [UP] [DOWN] [LOAD]
Detail for how leddrive updates the display:
scale(Speed in Mbps):
UP
8 6
7 5 6 4
5 3
4 2 3 1
2 .1
1 .01
Down
8 25
7 20 6 15
5 10
4 5 3 1
2 .1
1 .01
The load triangle goes in steps of 0.2 starting from the rightmost green led on the bottom.
For load averages below 0.2, the 0.2 led blinks.
For load averages above 3, all the led's in the triangle blink.
Of note, I tried to run the script and shell points to an error in line 120, it stays "bc: not found". Pardon my ignorance here, but is this a program that is not included with the standard distro of DD-WRT? _________________ Firebox II with DD-WRT, 1 Atheros PCI card, 400MHz AMD K-6 2 CPU, 128RAM, 256MB CF Flash
Posted: Tue Nov 17, 2009 3:33 am Post subject: Led support
Probably isn't. I am using a gentoo box to develop on. I will definatly work on getting the equations moved into the c program so that it will work on a stock dd-wrt.
Edit:
Here is a script without bc. Should help while I learn about File I/O and string operations.
Edit 2:
With Spy Alelo's help I have been able to clear up some annoying bugs in the led c code.