VIM3L - Openwrt - Reset buttonissue

Using the Khadas provided latest OpenWRT 19.08 image, when I attempt to use the reset button, it only reboots the device. Reviewing the reset code in /etc/rc.button/reset, appears it should reset to factory defaults if held for 5 or more seconds.

I tried holding the reset button for 10+ seconds however only reboots the device. If I run the commands manually at the command line specified in the script below (jffs2reset -y && reboot &), process resets the device correctly as expected.

@hyphop Has anyone seen this behavior before?

    if [ "$SEEN" -lt 1 ]
            echo "REBOOT" > /dev/console
    elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
            echo "FACTORY RESET" > /dev/console
            jffs2reset -y && reboot &

no! vim3l same as other khadas devices reset button just hardware reset and no possible receive this event,

We have possibility for read FUNCTION and POWER buttons event

Use evtest for monitor events

Thank you for the quick response! I will use the Function button to setup the behavior we are looking for. Based upon your suggestion, I see the settings are managed by triggerhappy in /etc/triggerhappy/triggers.d/vim.conf. I have created a custom script to perform the actions and referenced it in the vim.conf file and it is working great.

right ! thd is a good flexible solution