From 11a235876060c06c088794b2bf4e0f6d89f1e5a8 Mon Sep 17 00:00:00 2001 From: dzzinstant Date: Sat, 16 May 2020 23:37:28 +0200 Subject: [PATCH] Add 'power' button to buttons which enable gluon-setup-mode. Unlike other AVM devices, the Fritz!Box 3370 has got a 'Power' button instead of 'WPS', 'DECT' or similar. However, for a complete implementation of gluon it must be possible to reboot the device into setup mode via pressing a button. Notes: 1. The power button is used both for rebooting to setup mode (long press > 3s) and switching off the device (short press). This works because wait_setup_mode() is already started by 'power pressed', whereas poweroff would be called later upon 'power released'. 2. Adding yet another button for setup mode isn't very pretty, esp. for the sake of one device. However, - there are only few devices (21/784) with a power button - 302/784 devices have more than one button (reset + wps|phone) assigned to setup-mode, so the confusion is already there anyway. --- .../files/etc/hotplug.d/button/50-gluon-setup-mode | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode index 314f8a43..df596ad8 100755 --- a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode +++ b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode @@ -12,7 +12,8 @@ wait_setup_mode() { } -if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then +if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || + [ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then case "$ACTION" in pressed) wait_setup_mode &