Want to use the QSS Button for ...

Report problems and success stories with Gargoyle on various hardware platforms.

Moderator: Moderators

Post Reply
Rampler
Posts: 3
Joined: Wed Feb 15, 2012 6:34 pm

Want to use the QSS Button for ...

Post 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 ?

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

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

Post 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.
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400

Post Reply