Hi everyone, I recently bought a Buffalo WBMR-HP-G300H with OpenWrt 19.07.3 r11063-85e04e9f46 / LuCI openwrt-19.07 branch git-20.136.49537-fb2f363 on it. I configured like the other OpenWRT I have on a TP-Link WD8970 and it's working very well. I read in an Italian (my country) forum that someone was able to run a script to switch the wifi on and off and then assigning it to the AOSS button (a sort of WPS function provided by Buffalo). This is the link.
I tried to do the same creating the script called "woggle" in /sbin folder. This is the script:
#!/bin/sh
device="radio0"
case $(uci get wireless.$device.disabled) in
0)
wifi down $device
uci set wireless.$device.disabled=1
echo "Wifi disabled"
;;
1)
uci set wireless.$device.disabled=0
wifi up $device
echo "Wifi enabled"
;;
esac
Then I made it executable with chmod +x /sbin/woggle
But, as soon as I run it then I wasn't able anymore to use LuCI to enable/disable. Luckily a reboot solved this issue. Then I remembered about wifitoggle, installed it and tried to configure it but it seems it doesn't work. Here it is the actual configuration of wifitoggle:
wifitoggle.@wifitoggle[0]=wifitoggle
wifitoggle.@wifitoggle[0].persistent='0'
wifitoggle.@wifitoggle[0].led_enable_trigger='timer'
wifitoggle.@wifitoggle[0].timer='7'
wifitoggle.@wifitoggle[0].button='wifi'
wifitoggle.@wifitoggle[0].led_sysfs='wbmr:green:wireless'
wifitoggle.@wifitoggle[0].led_enable_delayon='8'
wifitoggle.@wifitoggle[0].led_enable_delayoff='8'
wifitoggle.@wifitoggle[0].led_disable_default='1'
Where do I make mistakes or miss something?
Considering that I'm using the router for fast roaming purposes in my daughter's room, I'd like to give her the possibility to switch wifi on only when it's needed, switching it off, for example, before going to sleep.
I would be very grateful if someone could help me.
Thanks and Bye