Hello, following up the hints in this thread How to turn radios off completely? - #4 by AndrewZ, I'm trying to set up Wi-Fi toggle on a toggle button. Here's my configuration:
# uci show wifitoggle
The problem with that approach is that the script 50-wifitoggle dropped in /etc/hotplug.d/button is run twice: one time for button press, another one for button release. Is there a way to fix it?
Make sure that only the “pressed” action is specified.
Hi, I've just checked but there is no defined
There are two things you could try.
- add action = pressed to the existing config
- remove this config and use the method shown in the example
Hi. Unfortunately I can't use the method shown here https://openwrt.org/docs/guide-user/hardware/hardware.button#examples since I can't install
kmod-button-hotplug (i.e,. "Packages for kmod-button-hotplug found, but incompatible with the architectures configured")
I need to stick to a script in /etc/hotplug.d/button or to something similar to the following one:
That seems odd. What is the output of:
ubus call system board
Here's the output:
"system": "ARMv8 Processor rev 4",
"model": "Zyxel EX5601-T0",
"description": "OpenWrt SNAPSHOT r23300-86bc525d00"
In my current situation, all scripts in /etc/hotplug.d/button are executed upon button press. On the contrary, scripts in /etc/rc.button/ seem not executed.
Consider installing a stable release version (well, almost - an rc).
This may work better and won’t have issues with user installed packages.