WiFi button not supported

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

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

Re: WiFi button not supported

Post by Lantis »

proper88 wrote:Hi Lantis,
i found the problem.
I have an Netgear WNDR3700v4, it is a NAND Router.
In the build process the module
CONFIG_PACKAGE_kmod-input-polldev=y
is not included
https://github.com/ericpaulbishop/gargo ... and/config

Thanks,
proper88


Oh you need polldev for that one too?
If you can confirm, I'll get it added :)
Thanks
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

proper88
Posts: 13
Joined: Thu Feb 18, 2016 9:36 am

Re: WiFi button not supported

Post by proper88 »

I am not shure but that's but the only difference between wndr37000 v2 and wndr37000 v4 build
i push the button and nothing happens, no event in logread
please can you add the module as in
https://github.com/ericpaulbishop/gargo ... rge/config ?

Thank you,
proper88

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

Re: WiFi button not supported

Post by Lantis »

I cant add it without testing.
You'll need to confirm it somehow.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

proper88
Posts: 13
Joined: Thu Feb 18, 2016 9:36 am

Re: WiFi button not supported

Post by proper88 »

Hi,
what do you think is the risk of adding this module ?
This module is only missing in NAND builds

Maybe it is possible in your next builds adding this module for me ?

Thanks,
proper88

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

Re: WiFi button not supported

Post by Lantis »

It's the opposite actually. It's only included in 2 of the 16 targets we build.
It was only recently added when someone tested it for me and confirmed it was necessary.
Unfortunately i don't have time to build different versions at the moment.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Aragorn_Strider
Posts: 16
Joined: Fri Mar 18, 2016 5:47 pm
Location: south of Paris area, France

Re: WiFi button not supported

Post by Aragorn_Strider »

Hi,

On my WNDR4300v1, with the 1.8.1 version of Gargoyle, the Wifi button worked fine even if I didn't do anything for it : I supposed the scripts were already in the downloaded firmware.

I put yesterday the 1.9.2 version and the Wifi button didn't worked anymore.

Therefore, I set it up with as a basis the explanations of Lantis in this topic.
The name of the Wifi button on WNDR4300v1 is 'rfkill'.

You can use the following script to set it up (based on the last script from Lantis) :

Code: Select all

#!/bin/sh

#This script enables wifi toggle functionality on the Wifi button (rfkill)
#of the WNDR4300v1 running Chaos Calmer Gargoyle

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

STATUS=`iwinfo`

if [ -n "$STATUS" ]; 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
ln -s /etc/rc.button/gargoyle_button_handler /etc/rc.button/rfkill

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

To use this script, you have to create a file on the router, in various ways :

- either in WinSCP (1), in \tmp, right click and choose New -> File (or Shift-F4), rename it install.sh, edit it and copy into it the code above ;

- either in PuTTY (2), with the method described by Lantis at the beginning of this topic, ie type

Code: Select all

cd /tmp
touch install.sh

then copy into it the code above (with WinSCP).

- either copy the code above directly in a text file named install.sh on your computer (3), and transfer it after with WinSCP on the router, in the /tmp directory.

After all, you should perhaps change the executable properties of the file :
- in PuTTY, with chmod +x install.sh
- or in WinSCP, with right click on the file and Properties (or F9)

Be careful, if you choose the (3) method and have like me a Windows OS (I've used Notepad++ to create/modify the file), after you have transferred install.sh with WinSCP, you must edit then save the file by double-clicking it in WinSCP, in my case the .sh file wasn't recognized by the shell and not executed.
- the error was : line xx: syntax error: unexpected "fi" (expecting "then" - if someone has an explanation... I'm not a pro of Unix/Linux shell scripts.

To execute this script, in PuTTY type

Code: Select all

sh /tmp/install.sh

If you want to check, type
uci show system

Now the Wifi button should be functional.

Frederic
Last edited by Aragorn_Strider on Sat May 20, 2017 3:33 am, edited 4 times in total.
Netgear WNDR4300v1 with Gargoyle v1.9.2 (formerly 1.8.1)

Aragorn_Strider
Posts: 16
Joined: Fri Mar 18, 2016 5:47 pm
Location: south of Paris area, France

Re: WiFi button not supported

Post by Aragorn_Strider »

In addition, in the versions 1.9.x (Chaos Calmer), if you want to find the name of the Wifi button of your router with the method described by Lantis here : https://www.gargoyle-router.com/phpbb/viewtopic.php?f=13&t=7203#p29806,

the difference is :
in WinSCP navigate to "/etc/rc.button"
and open the file "gargoyle_button_handler" for editing.
Netgear WNDR4300v1 with Gargoyle v1.9.2 (formerly 1.8.1)

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

Re: WiFi button not supported

Post by Lantis »

Thanks for posting updated instructions.
I'm glad I could give you a head start.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

ispyisail
Moderator
Posts: 4834
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: WiFi button not supported

Post by ispyisail »

Thanks

Trailblazer
Posts: 111
Joined: Wed Mar 09, 2011 3:12 am

Re: WiFi button not supported

Post by Trailblazer »

Lantis wrote:we can get you both up and running if you are willing to do some very basic coding.
.......
test it out and see what happens.


Thanks very much for this!
Stuff like this makes me realize that I know nothing about linux and coding! Although I didn't know what that last part did, it worked perfectly.

For the Archer C7 v4 the button name is 'wps'.

Edit: Just saw the updated instructions. The old instructions worked for me on 1.11.x on the above router.

Edit: The old instructions did not work. The new instructions worked perfectly on 1.11.x. Great router, great software.
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.11.x RC4

Post Reply