To connect a building without network infrastructure to a LAN I got a CPE210 v3.20 and flashed with a current OpenWrt. After the router was deployed on the outside and connected to the inside with a ribbon cable, I had several problems with the router resetting itself and losing the config.
After a little bit of research I came to the working hypothesis that the reset button collects electrical noise and triggers the reset line.
To prevent this in the future I have commented out the functions of the reset button in OpenWRT and replaced them with log entries so that I can track it.
I changed the files directly on the router, the following diff was created using the OpenWRT Git repo.
diff --git a/package/base-files/files/etc/rc.button/failsafe b/package/base-files/files/etc/rc.button/failsafe
index ba958fa885..0ae5a66bbe 100755
--- a/package/base-files/files/etc/rc.button/failsafe
+++ b/package/base-files/files/etc/rc.button/failsafe
@@ -1,5 +1,7 @@
#!/bin/sh
-
-[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
+# Disable, stw20210131
+# [ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
+logger "FAILSAFE Button Pressed"
return 0
+
diff --git a/package/base-files/files/etc/rc.button/reboot b/package/base-files/files/etc/rc.button/reboot
index cd547e3329..4dc8567850 100755
--- a/package/base-files/files/etc/rc.button/reboot
+++ b/package/base-files/files/etc/rc.button/reboot
@@ -5,8 +5,10 @@
if [ "$SEEN" -ge 5 ]
then
echo "REBOOT" > /dev/console
- sync
- reboot
+ logger "REBOOT button press (reboot)"
+# disable button stw,20210131
+# sync
+# reboot
fi
return 0
diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-files/files/etc/rc.button/reset
index 2403122ad2..fb534c0ef1 100755
--- a/package/base-files/files/etc/rc.button/reset
+++ b/package/base-files/files/etc/rc.button/reset
@@ -18,12 +18,16 @@ released)
if [ "$SEEN" -lt 1 ]
then
echo "REBOOT" > /dev/console
- sync
- reboot
+ logger "REBOOT button press (reset)"
+# disable button stw,20210131
+# sync
+# reboot
elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
- jffs2reset -y && reboot &
+ logger "FACTORY RESET button press (reset)"
+# disable button stw,20210131
+# jffs2reset -y && reboot &
fi
;;
esac