Re: Programming on-board reset button
I've identified the reset button logic is in /etc/rc.button/reset
:
...
if [ "$SEEN" -lt 1 ]
then
echo "REBOOT" > /dev/console
sync
reboot
elif [ "$SEEN" -gt 5 ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &
fi
...
which Google tells me is run by procd
. Customising this script would presumably alter the behaviour of the button, allowing it to be used in software, albeit probably not as a standard GPIO (as procd
will still hold that port open)
cat /sys/kernel/debug/gpio
also tells me that gpio-11 (reset)
is an input, currently lo
. If I press the button, this changes to hi
, as expected.
However, on mine, it doesn't seem to lead to a reset, and I can't see a console message either. I wonder if this still works since I upgraded to firmware 0.1.4 (b330)
... Any idea?
As I've invested some effort in getting this unit the way I want it, I'm loathe to try pressing it for more than five seconds to see if that works.