Forum
[SOLVED] Where is the ACT led file? - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: [SOLVED] Where is the ACT led file? (/thread-2586.html)



Where is the ACT led file? - kusti8 - 29th Nov, 2014 08:35 AM

I wanted for the ACT led to flash when a button was pressed. While I was following a tutorial, it said to change files in /sys/class/leds/led0. The files are brightness which holds a 1 or a 0 and trigger and others also. Where would that file be in xbian?


RE: Where is the ACT led file? - CurlyMo - 29th Nov, 2014 09:14 AM

If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent



RE: Where is the ACT led file? - kusti8 - 30th Nov, 2014 01:20 AM

(29th Nov, 2014 09:14 AM)CurlyMo Wrote:  If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent

Thanks, you learn something new every day! One comment, to anybody else doing this: I had to run modprobe from /sbin


RE: Where is the ACT led file? - rikardo1979 - 30th Nov, 2014 02:16 AM

(30th Nov, 2014 01:20 AM)kusti8 Wrote:  
(29th Nov, 2014 09:14 AM)CurlyMo Wrote:  If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent

Thanks, you learn something new every day! One comment, to anybody else doing this: I had to run modprobe from /sbin
nice one, so all sorted now? if yes, can you please edit prefix of the thread to [Solved]? thanks