We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

[RESOLVED] Reset button not working



  • 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.



  • Duh. Solved the problem... I had a script in /etc/init.d that wasn't backgrounding properly, so the system wasn't actually booted all the way; as a result, the button wasn't working. Fixed that script, and the button now works as expected.

    Anyway, I confirmed the script in /etc/rc.button/reset does work, and you can replace the reboot line with whatever you want. I hope that helps someone.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.