Controlling LEDs from the Shell
Jump to navigation
Jump to search
I wish the device would indicate via flashing LED that I had a message or alert waiting. I didn't find a way to do it via the regular interface, but from the command line I can at least control the led via the sysfs mounted on /sys
The list of LEDs are:
root@castle:/sys/class/leds# ls -F core_navi_center/ core_navi_left/ core_navi_right/ kbd_bl_led_center/ kbd_bl_led_left/ kbd_bl_led_right/
the core_navi_left is the left-bottom white led in the "gesture" area.
root@castle:/sys/class/leds/core_navi_left# ls -F brightness device@ power/ subsystem@ uevent
with the device sleeping and no panel leds on:
root@castle:/sys/class/leds/core_navi_left# cat brightness 0
to make one of the LEDs light up
root@castle:/sys/class/leds/core_navi_left# echo 50 > brightness
that set the intensity at about 50%. The only numeric values that made any visible change were in the range of 0-100. Setting it back to zero turned off the LED:
root@castle:/sys/class/leds/core_navi_left# echo 0 > brightness
So if I want it bad enough, and nobody finds an easier way to do it in the app framework, I could probably write a shell script or some awful hack to manually twiddle the LEDs