sign of life (nanopi neo2): flash green LED each x seconds?

Recommended Posts

Sometimes it's unclear if my Nanopi NEO2 is still running, or fully locked up / FUBAR. Ping and SSH give no result. As there is no HDMI, I have no way to check if it's still there.


So I was thinking: can I let the green LED flash each x seconds as a sign of life?


Quote from Igor: "Both are accessible via sysfs, green is configurable while blue is not lit and reacting to anything. ".  


So a crontab script that writes something to /sys/ <LED> ... ? 


Feedback appreciated.





Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Wow ... it works! Thank you


The blue LED:

root@nanopineo2:~# echo 1 > /sys/class/leds/nanopi:blue:status/brightness
root@nanopineo2:~# echo 0 > /sys/class/leds/nanopi:blue:status/brightness


The green LED

root@nanopineo2:~# echo 0 > /sys/class/leds/nanopi:green:pwr/brightness
root@nanopineo2:~# echo 1 > /sys/class/leds/nanopi:green:pwr/brightness




Link to post
Share on other sites

root's crontab:


* * * * *    /root/


with that script being:


for i in `seq 10`
    echo 0 > /sys/class/leds/nanopi:green:pwr/brightness
    sleep 0.2
    echo 1 > /sys/class/leds/nanopi:green:pwr/brightness
    sleep 0.2

Result: green LED is always on, but flashes off/on 10 times each minute. That's a good sign of life for me.

Link to post
Share on other sites
This topic is now closed to further replies.