Lactobacillus
Posts: 69
Joined: Thu Apr 19, 2012 7:57 pm

Pi 1B: Deactivate all LEDs

Sun Jul 07, 2019 9:18 am

I would like to deactivate all LEDs (but ACT = cpu0) of a Pi 1B at startup.

I was able to install this little program: https://www.raspberrypi.org/forums/view ... 63&t=72070
With "sudo ./MyScripts/llctl/llctl f0 l0 d0" I can deactivate the LAN-LEDs, but it does not work in my rc.local:

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

#echo 0 | sudo tee /sys/class/leds/led1/brightness

# Set the ACT LED to trigger on cpu0 instead of mmc0 (SD card access).
echo cpu0 | tee /sys/class/leds/led0/trigger

sleep 30

#turn off LAN-LEDs
./MyScripts/llctl/llctl f0 l0 d0

exit 0
Any Ideas how to deactivate the PWR-LED? "/sys/class/leds/led1" does not exist. led0 works fine.
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

User avatar
Burngate
Posts: 6290
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Pi 1B: Deactivate all LEDs

Sun Jul 07, 2019 9:45 am

Lactobacillus wrote:
Sun Jul 07, 2019 9:18 am
I would like to deactivate all LEDs (but ACT = cpu0) of a Pi 1B at startup.
Any Ideas how to deactivate the PWR-LED? "/sys/class/leds/led1" does not exist. led0 works fine.
If it's really an early Pi - from round 2013 - then you can't. The PWR LED is directly wired to the 3v3 line.

From the B+ to 3B, it's possible because there's a APX803 detecting low voltage that switches the LED off and feeds a GPIO to inform the SOC, so driving that GPIO low also switches it off.

Lactobacillus
Posts: 69
Joined: Thu Apr 19, 2012 7:57 pm

Re: Pi 1B: Deactivate all LEDs

Sun Jul 07, 2019 2:53 pm

Burngate wrote:
Sun Jul 07, 2019 9:45 am
Lactobacillus wrote:
Sun Jul 07, 2019 9:18 am
I would like to deactivate all LEDs (but ACT = cpu0) of a Pi 1B at startup.
Any Ideas how to deactivate the PWR-LED? "/sys/class/leds/led1" does not exist. led0 works fine.
If it's really an early Pi - from round 2013 - then you can't. The PWR LED is directly wired to the 3v3 line.
It is really an old Pi: Late 2012 or early 2013. Made in China with 512 MB.

Does anyone know how to "sudo ./MyScripts/llctl/llctl f0 l0 d0" at startup?
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

User avatar
DougieLawson
Posts: 38877
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi 1B: Deactivate all LEDs

Sun Jul 07, 2019 3:44 pm

Lactobacillus wrote:
Sun Jul 07, 2019 2:53 pm
Does anyone know how to "sudo ./MyScripts/llctl/llctl f0 l0 d0" at startup?
Add this to /etc/rc.local (just before the exit 0 line).

Code: Select all

/home/pi/MyScripts/llctl/llctl f0 l0 d0
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Lactobacillus
Posts: 69
Joined: Thu Apr 19, 2012 7:57 pm

Re: Pi 1B: Deactivate all LEDs

Mon Jul 08, 2019 6:50 pm

DougieLawson wrote:
Sun Jul 07, 2019 3:44 pm
Lactobacillus wrote:
Sun Jul 07, 2019 2:53 pm
Does anyone know how to "sudo ./MyScripts/llctl/llctl f0 l0 d0" at startup?
Add this to /etc/rc.local (just before the exit 0 line).

Code: Select all

/home/pi/MyScripts/llctl/llctl f0 l0 d0
Thats what I did (see first post), isn't it?
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

User avatar
DougieLawson
Posts: 38877
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi 1B: Deactivate all LEDs

Mon Jul 08, 2019 7:36 pm

Does your script need the GUI? Or does it use pure command line stuff?
Does your script use explict paths and filenames (eg. /home/pi/foo not ~/foo)?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Interfacing (DSI, CSI, I2C, etc.)”