Superkoning Posted April 23, 2018 Share Posted April 23, 2018 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 comment Share on other sites More sharing options...
chrisf Posted April 24, 2018 Share Posted April 24, 2018 If your LED's are in the device tree, echo "heartbeat" > /sys/class/leds/xxxx/trigger Link to comment Share on other sites More sharing options...
Superkoning Posted April 24, 2018 Author Share Posted April 24, 2018 4 hours ago, chrisf said: If your LED's are in the device tree, echo "heartbeat" > /sys/class/leds/xxxx/trigger OK, thanks, I will try ... as soon as I get my Neo2 back to life ... ;-) Link to comment Share on other sites More sharing options...
Superkoning Posted April 26, 2018 Author Share Posted April 26, 2018 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 comment Share on other sites More sharing options...
Superkoning Posted April 26, 2018 Author Share Posted April 26, 2018 root's crontab: * * * * * /root/green-on-and-off.sh with that script being: for i in `seq 10` do echo 0 > /sys/class/leds/nanopi:green:pwr/brightness sleep 0.2 echo 1 > /sys/class/leds/nanopi:green:pwr/brightness sleep 0.2 done 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 comment Share on other sites More sharing options...
Recommended Posts