Closed lanefu closed 1 year ago
I mostly do this the noob way:
du -a /sys|grep led|grep trigger
echo heartbeat > /sys/whatever/led/i/need/trigger
🤦
yeah same here... people seem to ask about it, so thought at least some basic instructions would help.
also my real dream is that it's an armbian-config feature
I usually only use on, off or heartbeat on red/green led. I don't know on which familiy more stuff is possible and don't even know what stuff this might be like using led to monitor disk/net activity, cpu usage or whatever...
Is this standardised enough across different hardware? This could be added rather to armbian-config, but well if there are few lines in the docs, it can't hurt.
From my guts feel no. At least OPis have orangepi
as string somewhere in the path to the led trigger files. Did not have a chance yet to compare. I'll get to it this weekend hopefully. Have an H3, H6 and RK3399 up to check
Nanopi R4S:
0 ./devices/platform/gpio-leds/leds/status_led/trigger
0 ./devices/platform/gpio-leds/leds/lan_led/trigger
0 ./devices/platform/gpio-leds/leds/wan_led/trigger
Orange Pi One Plus:
0 ./devices/platform/leds/leds/orangepi:red:power/trigger
0 ./devices/platform/leds/leds/orangepi:green:status/trigger
Orange Pi One:
0 ./devices/platform/leds/leds/orangepi:red:status/trigger
0 ./devices/platform/leds/leds/orangepi:green:pwr/trigger
Setting the led at startup is a feature I miss a lot, so I propose myself to make the necessary configuration section to armbian-config and other changes/scripts to make it work.
Names are not standardized at all. So my idea would be to propose, as a list, all the content of /sys/class/leds
to the user (maybe filter out the input devices leds), and let the user choose the led she wants to configure.
There are also extended options for some specific triggers that can be dealt with. For example, the timer trigger spawns two other filesystem objects that control the on time and the off time. I would ignore these extended configurations options for now.
Yes and no. It is another confirmation that there is no standardization between SoCs...
quick overview on how to interact and work with /sys/class/led