Page 1 of 1

Want to use the QSS Button for ...

Posted: Thu Feb 23, 2012 11:15 am
by Rampler
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 ?

Re: Want to use the QSS Button for ...

Posted: Fri Mar 02, 2012 2:12 am
by DoesItMatter
http://www.gargoyle-router.com/phpbb/vi ... ?f=7&t=980

See that post - read all of it

Lot of info on how to detect / edit configs for button functions.

BACKUP your Config before editing!

Otherwise you could get into a state where you have to reset
your router to defaults and start all over.