Page 1 of 1

NanoPi Neo: Enable function of blue status LED

Posted: Mon Jan 23, 2017 5:59 pm
by k-plan
By default on NanoPi Neo, the blue system LED is always off and has no function.

Update:
- Since DietPi v.143 blue LED is heartbeat for H3 now functional and applied during boot.

Hint:
- this will ONLY work with Legacy kernel images (3.4x) at the moment
- NOT with Mainline kernel images (4.9.x) ==>> green Power LED will start blinking, if device is ready for login

Code: Select all

root@NanoPi-Neo:~# uname -r
List available options:

Code: Select all

root@NanoPi-NEO:~# cat /sys/class/leds/blue_led/trigger
[none] mmc0 timer heartbeat backlight default-on

Example: Turn off

Code: Select all

echo 0 >/sys/class/leds/blue_led/brightness
echo none >/sys/class/leds/blue_led/trigger

Example: link to Heartbeat usage

Code: Select all

echo 1 >/sys/class/leds/blue_led/brightness
echo heartbeat >/sys/class/leds/blue_led/trigger

Example: link to SD usage (Note: Only after completely booting up device! )

Code: Select all

echo 1 >/sys/class/leds/blue_led/brightness
echo mmc0 >/sys/class/leds/blue_led/trigger

To get this blue LED changes persistent on every boot, you have to edit /etc/rc.local

Make a backup:

Code: Select all

cp /etc/rc.local /etc/rc.local.bac
Edit:

Code: Select all

nano /etc/rc.local

Add following lines before "exit 0 ":
[Example - edit or uncomment line you needed.]

Code: Select all

#### switch on blue LED for sd-card activity
echo 1 >/sys/class/leds/blue_led/brightness
echo mmc0 >/sys/class/leds/blue_led/trigger

#### switch on blue LED for heartbeat 
## echo 1 >/sys/class/leds/blue_led/brightness
## echo heartbeat >/sys/class/leds/blue_led/trigger

#### switch off blue LED 
## echo 0 >/sys/class/leds/blue_led/brightness
## echo none >/sys/class/leds/blue_led/trigger

exit 0

Re: NanoPi Neo: Enable function of Blue LED

Posted: Tue Jan 24, 2017 2:15 pm
by Fourdee
On a roll with the LED's k-plan :D. Nice one!

Re: NanoPi Neo: Enable function of blue status LED

Posted: Thu Mar 14, 2019 4:35 am
by bitsplash
So i'd love to see if someone gets this running on 4.14. I've had issues with my nanopi neo locking up and i had no idea it stopped. I need to always be sure it is runnin at a glance. Maybe a blue led flashing i can see from across the room? or maybe a screen popup on the oled every 5 minutes or so? i dunno. but something to let me know it's working. I like the idea of the heartbeat led but as you say it doesnt work on 4.14

Re: NanoPi Neo: Enable function of blue status LED

Posted: Thu Mar 14, 2019 12:15 pm
by Ititusara
Thanks, for useful tutorial