Want to use the QSS Button for ...
Posted: Thu Feb 23, 2012 11:15 am
Hello guys,
is it possible to use the QSS Button of the TP-Link Wr1034ND to switch WLAN on/off ?
Does this simple script work with Gargoyle ?
01-radio-toggle:
# Store here: /etc/hotplug.d/button/
if [ "$BUTTON" = "BTN_1" ] && [ "$ACTION" = "pressed" ] ; then
( sleep 1; /sbin/woggle ) &
fi
And Woggle stored under /sbin
#!/bin/sh
case "$(uci get wireless.@wifi-device[0].disabled)" in
1) # IST AUS, MACH AN
echo 1 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
sleep 1
echo 0 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
uci revert wireless # SONST UNSAVED CHANGES
uci set wireless.@wifi-device[0].disabled=0
wifi
;;
0) # IST AN, MACH AUS
echo 1 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
sleep 1
echo 0 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
uci set wireless.@wifi-device[0].disabled=1
wifi
esac
Have anybody tested it ?
is it possible to use the QSS Button of the TP-Link Wr1034ND to switch WLAN on/off ?
Does this simple script work with Gargoyle ?
01-radio-toggle:
# Store here: /etc/hotplug.d/button/
if [ "$BUTTON" = "BTN_1" ] && [ "$ACTION" = "pressed" ] ; then
( sleep 1; /sbin/woggle ) &
fi
And Woggle stored under /sbin
#!/bin/sh
case "$(uci get wireless.@wifi-device[0].disabled)" in
1) # IST AUS, MACH AN
echo 1 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
sleep 1
echo 0 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
uci revert wireless # SONST UNSAVED CHANGES
uci set wireless.@wifi-device[0].disabled=0
wifi
;;
0) # IST AN, MACH AUS
echo 1 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
sleep 1
echo 0 > /sys/devices/platform/leds-gpio/leds/tl-wr1043nd:green:qss/brightness
uci set wireless.@wifi-device[0].disabled=1
wifi
esac
Have anybody tested it ?