sgjava Posted January 21, 2020 Posted January 21, 2020 I'm looking for udev rules or some other way to read system LEDs without sudo. I tried https://github.com/todbot/blink1/blob/master/linux/51-blink1.rules, but I suspect it's not 100% what I need for the Duo.
guidol Posted January 21, 2020 Posted January 21, 2020 what do you want to read? Or what can be read as usre if you know the trigger? = here heartbeat root@npi-k1-plus(192.168.6.70):~# more /sys/class/leds/nanopi:green:status/trigger none usb-gadget usb-host kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrl lock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usbport mmc0 mmc1 mmc2 disk-activity di sk-read disk-write ide-disk mtd nand-disk [heartbeat] cpu cpu0 cpu1 cpu2 cpu3 activity default-on panic rfkill-any rfkill-none rc-feedback rfkill0 0.2:00:link 0.2:00:1Gbps 0.2:00:100Mbps 0.2:00:10Mbps
sgjava Posted January 21, 2020 Author Posted January 21, 2020 Actually I want to update brightness, but I may want to update trigger as well (sudo works): echo 0 > /sys/class/leds/nanopi\:green\:pwr/brightness /sys/class/leds/nanopi:green:pwr/brightness: Permission denied
sgjava Posted January 23, 2020 Author Posted January 23, 2020 Here's my working rc.local (usio is the group I want to give access to): chown -R root:usio /sys/devices/platform/leds/leds chmod -R ug+rw /sys/devices/platform/leds/leds
Recommended Posts