At the moment i use a Cobalt RaQ4r (system type Pacifica) as a server running Ubuntu 7.04. The RaQ’s have a special LED on the front panel which was used from the original Software to show activities on the HTTP server. This LED is labeled as WEB.
Looking to the kernel sources I figured out that the LED on Pacifica systems is controlled by the ALi M7101 PCI device. So I tried to set the LED with the help of setpci command. This works, but the light is just flash one time, not what I expected.
So I got the sources of the cobalt-panel-utils, and from reading the code and the comments I figured out that the LED can be set through the LCD device. I just write some lines of C code and I get the expected results to switching the LED on and off.
... int lcd_setleds(void *lcd_private, const int pattern) { struct lcd_private *lcd = lcd_private; if (ioctl(lcd->fd, LED32_Set, pattern) == 0) return 0; if (!lcd || (lcd->fd < 0) || ((pattern & 0x0F) == 0x0F)) return -1; lcd->display.leds = pattern; ioctl(lcd->fd,LED_Set,&lcd->display); return 0; } ... |
You can download the sources from this page and just compile it yourself with make and make install. Then you have a small command set-led
to switch on or off the LED (just providing 0
for off and 1
on).
This program is only tested on Pacifica type systems (check this with # cat /proc/cobalt/systype
) which are the Cobalt RaQ 3 and RaQ 4 systems and it different flavours like CacheRaQ’s, ManageRaQ’s etc.
[drain file 11 url]
Many thanks for this, as that WEB light’s been mysteriously dark, since I installed Debian on my RaQ3. I had the RaQ550 software on before, with the 2.4 kernel: stable, but not very flexible. Now I can blink the LED and write messages on the display.. fun!