If the BeagleBone Black is running as small server in continuous operation like mine, the flashing heartbeat LED is sometimes quite disturbing. It should indicate whether the system is still working, but as it continues to flash when the server has already set his service, it doesn't really make any sense in that case.
The BeagleBone Black has 4 built-in LEDs that can be affected by the user. They are denoted by usr0 to usr3.
The settings for them are in the folder /sys/class/leds/
# cd /sys/class/leds /sys/class/leds# ls -l total 0 lrwxrwxrwx 1 root root 0 Feb 16 09:41 beaglebone:green:usr0 -> ../../devices/ocp.2/gpio-leds.7/leds/beaglebone:green:usr0 lrwxrwxrwx 1 root root 0 Feb 16 09:42 beaglebone:green:usr1 -> ../../devices/ocp.2/gpio-leds.7/leds/beaglebone:green:usr1 lrwxrwxrwx 1 root root 0 Feb 16 09:42 beaglebone:green:usr2 -> ../../devices/ocp.2/gpio-leds.7/leds/beaglebone:green:usr2 lrwxrwxrwx 1 root root 0 Feb 16 09:42 beaglebone:green:usr3 -> ../../devices/ocp.2/gpio-leds.7/leds/beaglebone:green:usr3
The the heartbeat is assigned to LED usr0. So lets open the folder and have a look:
/sys/class/leds# cd beaglebone\:green\:usr0 /sys/class/leds/beaglebone:green:usr0# ls -l total 0 -rw-r--r-- 1 root root 4096 Feb 16 09:56 brightness lrwxrwxrwx 1 root root 0 Feb 16 09:56 device -> ../../../gpio-leds.7 -r--r--r-- 1 root root 4096 Feb 16 09:56 max_brightness drwxr-xr-x 2 root root 0 Feb 16 09:56 power lrwxrwxrwx 1 root root 0 Feb 16 09:41 subsystem -> ../../../../../class/leds -rw-r--r-- 1 root root 4096 Feb 16 09:51 trigger -rw-r--r-- 1 root root 4096 Feb 16 09:41 uevent
The interesting file here is the "trigger"-file. In this file is specified, in which case the LED is turned on.
/sys/class/leds/beaglebone:green:usr0# cat trigger none nand-disk mmc0 mmc1 timer oneshot [heartbeat] backlight gpio cpu0 default-on transient
The current setting is enclosed in square brackets, here it is the heartbeat.
Other values are:
- none - The LED will not be activated
- mmc0 - The LED lights if the external SD-card is used
- mmc1 - The LED lights if the internal eMMC-memory is used
- gpio - The LED lights if the IO-pins are accessed
- cpu0 - The LED lights if the CPU is working
The default settings for the LEDs are:
- user0 - the heartbeat
- user1 - is set to mmc0, the external SD-card
- user2 - is set to cpu0
- user3 - is set to mmc1, the internal memory
To turn off the heartbeat LCD, it is sufficient to change the value in the trigger-file to "none". For that use the command
/sys/class/leds/beaglebone:green:usr0# echo none > trigger
This setting, however, will be lost after the next reboot, because at every boot the values will be set to defaults again. So to make the BeagleBone using this setting after the next reboot, the easiest way is to set the corresponding entry in the file rc.local.
So open the file /etc/rc.local with an editor of his choice and add the line
echo none > /sys/class/leds/beaglebone\:green\:usr0/trigger
before the line "exit 0".
And that's it.
Add comment