Some questions coming. First, for the BTN_0. For 2.6.6, it’s modified as below. Button < 5s, start dpp, >=15s do factory reset. I see a couple of new states and way to do stuff in the 2.9.3 version in: ./feeds/morse/hardware/morse-modeswitch-button/files/etc/rc.button/BTN_0.
Other than using “ubus call dpp push_button” in 2.9.3 in place of the 2.6.6 “/morse/scripts/dpp_start.sh”, is there anything I need to be aware of?
I see there’s a call to persistent_vars_storage.sh to set mode as STA or AP. Can you explain how that works?
We are using a file called ‘reset’ instead of BTN_0, some of it is below (I couldn’t find an attach file for creating a new topic and sorry, I didn’t know how to format):
OVERLAY=“$( grep ’ /overlay ’ /proc/mounts )”
case “$ACTION” in
pressed)
[ -z “$OVERLAY” ] && return 0
return 15
;;
timeout)
. /etc/diag.sh
set_state failsafe
flash_factoryreset
;;
released)
if [ “$SEEN” -lt 5 ]
then
echo “DPP Button pushed, please wait…” > /dev/console
#for sdk 2.6.6
/morse/scripts/dpp_start.sh
#for sdk 2.9.3
ubus call dpp push_button
if [ “$SEEN” -lt 1 ]
then
echo “REBOOT” > /dev/console
flash_reboot
sync
reboot
elif [ “$SEEN” -ge 15 -a -n “$OVERLAY” ]
elif [ "$SEEN" -ge 15 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
flash_factoryreset
jffs2reset -y && reboot &
fi
;;
esac
return 0

