LED Control (make it stop flashing)

How can I make the OS _stop_ flashing the on-board LEDs? (mostly because
it sits on my desk and is annoying).

I've tried the interface in /sys/class/gpio, but it won't let me do it
for the LED channels (I assume because the kernel or some other process
has locked them).

Is there something simple I'm missing? I've done some basic google
searching and come up with nothing really.

Thanks,

Alan.

black sharpie :slight_smile:

Try this:
   # echo none >/sys/class/leds/beagleboard\:\:usr0/trigger

Works great. Thanks!

Alan.

If you are using angstrom, change the following file:

root@beagleboard-xM:~# cat /etc/default/leds
#file format: name trigger
beagleboard::usr0 heartbeat
beagleboard::usr1 mmc0

use 'none' as trigger instead of heartbeat.

regards,

Koen

apart from LED and GPIO , can we configure any other device using sysfs ??

When I attempt this on my board, running Ubuntu 10.04 demo image I
get:
bash: /sys/class/leds/beagleboard::usr0/trigger: Permission denied

Also tried the above command with sudo, but I get the same permission
denied error

Thanks,
Graham Holland

I'll add that this did _not_ work for me on a beagleboard-xM, and I
received the same error as below.

nick

>> Try this:
>> # echo none >/sys/class/leds/beagleboard\:\:usr0/trigger

> When I attempt this on my board, running Ubuntu 10.04 demo image I
> get:
> bash: /sys/class/leds/beagleboard::usr0/trigger: Permission denied

> Also tried the above command with sudo, but I get the same permission
> denied error

> Thanks,
> Graham Holland

So I've found the solution to my error. Looking at
RootSudo - Community Help Wiki I learned that using sudo
won't work the way one might think when it comes to writing files.
This is the command I used to turn off the usr0 LED:

sudo sh -c "echo none > /sys/class/leds/beagleboard\:\:usr0/trigger"

Regards,
Graham Holland

>> # echo none >/sys/class/leds/beagleboard\:\:usr0/trigger
>
> When I attempt this on my board, running Ubuntu 10.04 demo image I
> get:
> bash: /sys/class/leds/beagleboard::usr0/trigger: Permission denied
>
> Also tried the above command with sudo, but I get the same permission
> denied error

As root, enter:

echo none > /sys/class/leds/beagleboard::usr0/trigger
echo none > /sys/class/leds/beagleboard::usr1/trigger

Or from a user account, enter:

echo none | sudo tee /sys/class/leds/beagleboard::usr0/trigger
echo none | sudo tee /sys/class/leds/beagleboard::usr1/trigger

I have code to do the same in a c program here:

http://www.lvr.com/beagleboard.htm

Jan

Now that I've figured out how to control the LEDs, I've written some C+
+ functions to do so. However, I'd rather not have to run the programs
using these functions as root. Is there any way to allow a regular
user to write to files in /sys/class/leds/beagleboard::usr0/ ? I tried
using chmod to add write access for others, but the permissions get
reset on each system reboot. I've done some googling without much
luck.

Thanks
Graham Holland

I have seen that most of you already solved the problem but just to
complement the answer for future reference.
The led D6, USR0, is controlled by GPIO_149 which is the bit 22 of
register 0x49056034. So, the led can be set as an output, for example,
and controlled by bit 22 of register 0x4905603C. In case, of leaving
it off, it is just necessary to make sure that there is always a "0"
on bit 22 of the last register mentioned.
Regards,
Frederico Lima