Configuring Wifitoggle to disable the access point

Hello!
I configured Wi-Fi to turn off using the physical button on my router using Wifitoggle. Everything works fine.
Here's my configuration:

wifitoggle.@wifitoggle[0]=wifitoggle
wifitoggle.@wifitoggle[0].button='rfkill'
wifitoggle.@wifitoggle[0].persistent='0'
wifitoggle.@wifitoggle[0].timer='0'
wifitoggle.@wifitoggle[0].led_enable_trigger='timer'
wifitoggle.@wifitoggle[0].led_enable_delayon='500'
wifitoggle.@wifitoggle[0].led_enable_delayoff='500'
wifitoggle.@wifitoggle[0].led_disable_default='0'

My question is:
my router connects to the main router wirelessly. When I turn off the Wi-Fi with the button, the internet connection is completely disabled. Is it possible to configure it so that pressing the button only disables the access point but not the client?

I currently have three wireless networks: a client (phy1-sta0) on radio1 and two dual-band access points (phy1-ap0) and (phy0-ap0), on radio1 and radio0, respectively.
I'd like to disable only phy1-ap0 and phy0-ap0. Is this possible?

OpenWRT 24.10.5 firmware

Probably wifitoggle disables all radios/interfaces, but you can do whatever you want by replacing the contents of /etc/rc.button/rfkill with a custom script.

Thank you!
I'm trying to follow your instructions on this topic.

Here's the "rfkill" configuration I created:

#!/bin/sh

[ "$ACTION" = "released" -a "$BUTTON" = "rfkill" ] || exit 0

{
    disabled="$(uci -q get wireless.default_radio0.disabled)"
    [ "${disabled}" = "1" ] \
        && uci set wireless.default_radio0.disabled='0' \
        || uci set wireless.default_radio0.disabled='1'
    #uci commit wireless
    wifi reload
}

exit 0

And this is what my wifi-iface section looks like, for the network I want to disable with a button:

 config wifi-iface 'default_radio0'
12         option device 'radio0'
13         option network 'lan'
14         option mode 'ap'
15         option ssid 'RouteRich_2'
16         option encryption 'psk2'
17         option key 'kolokolnyaSym09'
18         option wps_pushbutton '1'
19         option disabled '1'

Am I doing something wrong? When I press the button, the entire Wi-Fi network, both the client and the access point, still disconnects. And after turning on the button, this network that I edited remains disabled.

Could you tell me what's wrong?

Did you uninstall or stop the wifitoggle service?

At the time I checked the network, the wifitoggle service was working. Now I have reset the settings to factory defaults and want to set everything up again.

Please also follow the instructions here to confirm the button name.

I've already figured this out. My button is definitely named rfkill.
And the wifitoggle service works with this button; it just disables all Wi-Fi networks completely.

1 Like