My home network is literally glued together using Soekris embedded boards for various tasks such as routing, firewalling, and providing wireless access points. I currently own a mixture of net4501 and net4826 boards, and they all run OpenBSD built using flashdist.
The error LED on both boards can be controlled from userspace using the GPIO framework. You need to know both the GPIO device, and the GPIO pin. Both boards tend to have only one GPIO device, /dev/gpio0 usually, but the pin varies, (and I always forget what it is!). For the boards I own, they are:
You can manually turn the LED on and off using gpioctl(8). For example on a net4501:
# gpioctl -d /dev/gpio0 9 1 pin 9: state 0 -> 1 # gpioctl -d /dev/gpio0 9 0 pin 9: state 1 -> 0
A neat application for this is to make it blink whenever OpenBSD's PF firewall drops a bad packet. To do this, you need to use gpioflicker which listens on the pflog0 logging interface by default, and whenever it sees any traffic, it blinks the error LED. You should start gpioflicker, for example on a net4826:
# gpioflicker -d /dev/gpio0 -p 20 -I 0
and make sure your default PF block rule has the "log" keyword in it. You can also send the USR1 & USR2 signals to the gpioflicker process to make it toggle the LED.
The net4826 has a single temperature sensor which is accessed using the OpenBSD sensors framework. To access it, you need to compile a custom kernel, and to also make sure you have the following files updated from CVS to the stated version or newer:
You need to include the following configuration:
gpio0 at gscpcib? gpioiic0 at gpio0 offset 12 mask 0x3 iic0 at gpioiic0 lmtemp* at iic0 addr 0x48
Once you've compiled and installed the new kernel and rebooted, you should then see the following in your dmesg:
gscpcib0 at pci0 dev 18 function 0 "NS SC1100 ISA" rev 0x00 gpio0 at gscpcib0: 64 pins gpioiic0 at gpio0 pins 12 13: SDA[13] open-drain pull-up, SCL[12] open-drain pull-up iic0 at gpioiic0 lmtemp0 at iic0 addr 0x48: lm75a
in which case you can then retrieve the sensor readings:
# sysctl hw.sensors hw.sensors.0=lmtemp0, TEMP, temp, 45.00 degC / 113.00 degF
and optionally set up sensorsd(8) to alert you if it ever gets too hot. The Soekris website lists the maximum operating temperature of the net4826 as 60 °C, so the following should be a safe default in /etc/sensorsd.conf:
hw.sensors.0:high=50C
The net4501 doesn't have any such similar sensor hardware built in, but it is possible to attach a sensor chip to the exposed GPIO pin headers on the board. I haven't done it though…