Why is LED1 blinking in Debian?

Started by jess, April 16, 2014, 08:26:09 PM

Previous topic - Next topic

jess

I noticed that the A20's Olinuxino-Micro-4GB green LED1 is turning itself on and off (i.e. periodically blinking ON=1sec and OFF=3sec). However, the green LED "ON" state is barely visible and it looks like the voltage is quite lower, or is if the led is pulse driven.

Any ideas why I observe this LED1 activity under debian and not when running plain vanilla android?
I do not run or connect anything to the GPIO so it should stay idle I guess...




laskov

there is a scriptroot@a20-OLinuXino:~# cat /opt/led_blink.sh
#!/bin/bash

echo 47 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio47_ph2/direction

while [ 1 -eq 1 ];
do
echo 1 > /sys/class/gpio/gpio47_ph2/value
sleep 1
echo 0 > /sys/class/gpio/gpio47_ph2/value
sleep 1
done
started by /etc/rc.d/rc.local

MBR

You can also blink LEDs with kernel LED driver (if the directory /sys/class/leds exist, it is supported, otherwise you need to compile a custom kernel), the configuration is in the FEX file (compiled to script.bin), see http://linux-sunxi.org/Fex_Guide#led_configuration.

fuzzyTew

Hey, for some reason this thread is the first result on Google for this topic, but the replies don't clearly address it.  It is more directly addressed at https://www.olimex.com/forum/index.php?topic=3962.msg16810 .

As MBR implies, one way to disable the heartbeat blink is to
apt install sysfsutils
and create a file named /etc/sysfs.d/led1.conf containing the line
class/leds/green:ph02:led1/trigger = none
The possible triggers for the light are listed in /sys/class/leds/green:ph02:led1/trigger .

The sysfs path may be different on different systems.  Above worked for me, but to see what's correct for you,
ls /sys/class/leds