[Feature Request] Side Button to Toggle WiFi On/Off on Dual Radio Devices

Hi @Menard

Please deal with me. English is not my first language and I'm having a hard time understanding your replies.

It looks to me that you are confusing my request.
I asked you to run:

cat /etc/config/wireless | grep wifi-iface | awk '{print $3}'

That should have given you the following result:

'default_radio0'
'default_radio1'
'guest5g'
'guest2g'

But instead you did uci show wireless, like you did in this other post

I can tell since there are no = signs in the file I asked you to cat but there are in the result of the uci show wireless command.
Furthermore, Opal (GL-SFT1200) has two bands
Running the following should have given you more than one result:

uci show wireless | grep wifi-iface

You should have at least these:

wireless.default_radio0=wifi-iface
wireless.default_radio1=wifi-iface
wireless.guest5g=wifi-iface
wireless.guest2g=wifi-iface

I see that in the text you posted in the other thread.


Wifi Toggle Button Settings for 4.3 devices


I'm going to ask you to follow these instructions exactly as I'm going to type them for you. Just copy and paste each line directly in to your ssh terminal. You shouldn't need to do anything else. Do not edit the files!

#!/bin/sh
#download scripts to your /etc/gl-switch.d folder directly from my git
wget -O /etc/gl-switch.d/Wi-Fi_simple.sh https://raw.githubusercontent.com/mertonv/gl.inet_files/main/4.3/etc/gl-switch.d/Wi-Fi_simple.sh
wget -O /etc/gl-switch.d/Wi-Fi_status.sh https://raw.githubusercontent.com/mertonv/gl.inet_files/main/4.3/etc/gl-switch.d/Wi-Fi_status.sh

#change files to executable
chmod 755 /etc/gl-switch.d/Wi-Fi*

#delete bad status file, better to start with an empty one in your first correct run
rm /etc/wifi_default_status

Now you should have both files in your Opal and listed in the "Toggle Button Settings" menu of the router.

You might want to run them manually first. One at a time!

#!/bin/sh

#for fringe's script, to turn the radios off and on
sh  /etc/gl-switch.d/Wi-Fi_simple.sh off
sh  /etc/gl-switch.d/Wi-Fi_simple.sh on

#for pforma's script, to turn the radios off and on
sh /etc/gl-switch.d/Wi-Fi_status.sh off
sh /etc/gl-switch.d/Wi-Fi_status.sh on

If you don't get any error output in the ssh terminal and you see the radios working correctly, pick the one you like better and apply it on the "Toggle Button Settings" menu of your router.