User`s manual

DA-710 Series Linux Programmer Guide
4-10
Programmable LEDs
The DA-685 provides 8 user-programmable LED indicators on its front panel. The following section explains
how to configure these LEDs.
1. The kernel module that controls the programmable LEDs is named moxa_pled.ko. Use the lsmod
command to verify the module is loaded; do not include the module’s file suffix (*.ko) in the search. The
computer should return the output below:
MOXA: ~# lsmod | grep moxa_pled
moxa_pled 2464 0
If the moxa_pled.ko module has not been loaded, use the modprobe command to load it, and then use
the lsmod command once again to verify the module has correctly loaded, as below:.
MOXA: ~# modprobe moxa_pled
MOXA: ~# lsmod | grep moxa_pled
moxa_pled 2464 0
2. The 8 LEDs each are each mapped in a one-to-one correspondence to an 8 bit argument, with the leftmost
LED corresponding to the leftmost (“first”) bit and the rightmost bit corresponding to the rightmost LED. A
1 indicates that an LED should be activated, while a 0 indicates an LED should go dark.
To activate an LED, simply echo an eight bit argument into /dev/pled, as below:
In the above example, the first and the last LEDs will light up.
MOXA: ~# echo 10000001 > /dev/pled