Using the power button for setup mode would work for the AVM 3370, but
may side effects on other devices. On devices with a dedicated
controller for power management, 'power pressed' and 'power
released' events might be consumed by the controller, or emitted at
unexpected times. This might lead to shutdowns failing, the device
randomly put into setup mode, or similar things.
Support for an outdated, non-mainstream device such as the AVM 3370
shouldn't invite such extra problems.
Moreover, the feature in question can also be added after the
installation, simply by editing
`/etc/hotplug.d/button/50-gluon-setup-mode`
and changing one line:
`
-if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then
+if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then
`
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.
many AVM devices do not have RESET/WPS buttons. So use the otherwise unused DECT/PHONE button to boot the device into setup mode.
This patch allows to enter the setup-mode by pressing the phone button
(often labeled as DECT) in addition to WPS and reset button.
This patch is necessary to allow supporting boards without a WPS and reset
button (e.g. AVM FRITZ!Box 7312).