WiFi button not supported

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

Lantis
Moderator
Posts: 5218
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: WiFi button not supported

Postby Lantis » Wed Jun 10, 2015 10:20 pm

I have an exam in 6 hours, I'll work on something for you over the next few days.
It will require minimal intervention from you but still some. 2-3 commands at most.
If you can handle that I'll get started.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

wazahuis
Posts: 9
Joined: Tue Jun 09, 2015 6:18 pm

Re: WiFi button not supported

Postby wazahuis » Wed Jun 10, 2015 11:06 pm

Sounds good thanks. Happy to donate towards the project or whatever you like...

Lantis
Moderator
Posts: 5218
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: WiFi button not supported

Postby Lantis » Thu Jun 11, 2015 11:46 pm

no payment necessary. :) thank you for the offer though.

as promised, two commands to run.
Please note: if you are running 1.7.0 or higher, please use http://103.4.16.211/gargoyle_scripts/in ... oggleBB.sh instead. 1.6.2 or less, use installwifitoggleAA.sh

Code: Select all

wget -O /tmp/install.sh http://103.4.16.211/gargoyle_scripts/installwifitoggleAA.sh
sh /tmp/install.sh


once you have run both of those, the changes should be applied.
go and press the wifi button on your router (left button of the two on the front). visibly the 2 wifi LEDs should turn off, but also just confirm by checking the wifi actually goes down.

if it doesn't work, please let me know and i will see if we can fix it. i tested it about a dozen times on my own router however.

Disclaimer to anyone else reading this thread.
this script ONLY WORKS on a WNDR3800.
Last edited by Lantis on Sun Jun 14, 2015 11:19 pm, edited 1 time in total.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: WiFi button not supported

Postby marrco » Fri Jun 12, 2015 2:10 am

i hope you don't mind if i post your script (downloaded on 20150611) here, should you remove it from your website in future. What do you think about opening a github for user contributions to gargoyle?

Code: Select all

#!/bin/sh

#This script enables wifi toggle functionality on the Wifi button (BTN_2)
#of the WNDR3800

(
cat << 'EOF'
#!/bin/sh

STATUS=`wifi status | grep -m 1 up | sed -e 's/^[ \t]*//' -e 's/"up": //'`

if [ "$STATUS" == "true," ]; then
   wifi down
   logger Wifi button pressed, wifi going down
else
   wifi up
   logger Wifi button pressed, wifi going up
fi
EOF
) > /etc/wifitoggle.sh

chmod +x /etc/wifitoggle.sh

uci set system.wifi_toggle=button
uci set system.wifi_toggle.button=BTN_2
uci set system.wifi_toggle.action=pressed
uci set system.wifi_toggle.handler=/etc/wifitoggle.sh
uci commit system

wazahuis
Posts: 9
Joined: Tue Jun 09, 2015 6:18 pm

Re: WiFi button not supported

Postby wazahuis » Sun Jun 14, 2015 1:04 am

Thanks so much I will give it a try!

wazahuis
Posts: 9
Joined: Tue Jun 09, 2015 6:18 pm

Re: WiFi button not supported

Postby wazahuis » Sun Jun 14, 2015 9:49 pm

Hi,

I tried it and the commands you gave me seemed to work okay but doesn't seem to fully work. Here is output from SSH commands...

------------------------------------------------------------------
| _____ _ |
| | __ \ | | |
| | | \/ __ _ _ __ __ _ ___ _ _| | ___ |
| | | __ / _` | '__/ _` |/ _ \| | | | |/ _ \ |
| | |_\ \ (_| | | | (_| | (_) | |_| | | __/ |
| \____/\__,_|_| \__, |\___/ \__, |_|\___| |
| __/ | __/ | |
| |___/ |___/ |
| |
|----------------------------------------------------------------|
| Gargoyle version 1.6.2 | OpenWrt Attitude Adjustment branch |
| Gargoyle revision b70bfc1 | OpenWrt revision r42171 |
| Built August 26, 2014 | Target ar71xx/usb_large |
------------------------------------------------------------------
root@Gargoyle:~# wget -O /tmp/install.sh http://103.4.16.130/install.sh
Connecting to 103.4.16.130 (103.4.16.130:80)
install.sh 100% |*******************************| 607 0:00:00 ETA
root@Gargoyle:~# sh /tmp/install.sh
root@Gargoyle:~#


I press the Wifi button and both lights go off. but they flash again and come back on?

Lantis
Moderator
Posts: 5218
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: WiFi button not supported

Postby Lantis » Sun Jun 14, 2015 10:00 pm

Interesting! I didn't realise you're running 1.6.2
I'll downgrade and retest.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

wazahuis
Posts: 9
Joined: Tue Jun 09, 2015 6:18 pm

Re: WiFi button not supported

Postby wazahuis » Sun Jun 14, 2015 10:05 pm

I thought I better install the stable version

Lantis
Moderator
Posts: 5218
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: WiFi button not supported

Postby Lantis » Sun Jun 14, 2015 10:08 pm

of course, that's perfectly fine :)

give me about 30 minutes to do some testing.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

Lantis
Moderator
Posts: 5218
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: WiFi button not supported

Postby Lantis » Sun Jun 14, 2015 11:06 pm

try this instead please.


Code: Select all

wget -O /tmp/install.sh http://103.4.16.211/gargoyle_scripts/installwifitoggleAA.sh
sh /tmp/install.sh


i have now uploaded two files, one for installing onto an Attitude Adjustment verison and one for installing onto Barrier Breaker.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests