Hi there, I am using my GL-E750 as a fail-over at home and sometimes I grab it when I travel. Anyway to automatically disable GL-E750 wifi when it’s tethered to my router and when no longer tethered the wifi option is back on? I know it’s probably a simple script I can install maybe?
root@GL-E750:~# cat /etc/hotplug.d/carrier/04-test
#!/bin/sh
if [ "$INTERFACE" == "eth0" ];then
if [ "$ACTION" == "up" ];then
uci set wireless.default_radio0.disabled='1'
uci set wireless.default_radio1.disabled='1'
uci commit wireless
wifi
else
uci set wireless.default_radio0.disabled='0'
uci set wireless.default_radio1.disabled='0'
uci commit wireless
wifi
fi
fi
That’s so awesome! Thank you so much for such quick reply, I am gonna test it tonight. Is there any way to easily disable/enable this? I don’t suppose I can add it to a toggle button If that’s hard its no big deal I can always uninstall the package i assume. … and do i need this exit 0 thing? hahahah
Welp @dxf code works great, but the Action side button feature in @bring.fringe18 code doesn’t seem to be working. I tried removing it from vpn just in case…
…Maybe another option is to just have the code auto-detect if the port is in LAN mode (since then you don’t need wifi) or in WAN mode, in which case you would need it.
It could be a difference in the device & its firmware. /etc/gl-switch.d/ is present in 4.2.3-release5 (Slate AX ATX1800). If you have files in that dir it should execute.
Damn; we might have to bother @dxf for a bit of insight here given the differences. It’d be interesting to see if his posted hotplug.d script could be adapted.
Had to turn off the toggle setting in the admin and then it started working. Thank you!
One last thing, I tried adding
“echo ‘{ “msg”: “Wifi disable on eth - enabled” }’ >/dev/ttyS0”
So I can see a message on an OLED screen when I toggle the switch, but it just displays the last toggle setting like “Turning on WG” etc. Any reason it’s not working?