Page 4 of 4

Re: WiFi button not supported

Posted: Tue Mar 21, 2017 4:32 am
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

Re: WiFi button not supported

Posted: Tue Mar 21, 2017 12:21 pm
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

Re: WiFi button not supported

Posted: Tue Mar 21, 2017 3:39 pm
by Lantis
I cant add it without testing.
You'll need to confirm it somehow.

Re: WiFi button not supported

Posted: Wed Mar 22, 2017 12:57 pm
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

Re: WiFi button not supported

Posted: Wed Mar 22, 2017 3:43 pm
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.

Re: WiFi button not supported

Posted: Fri May 19, 2017 8:24 pm
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

Re: WiFi button not supported

Posted: Fri May 19, 2017 8:28 pm
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 : 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.

Re: WiFi button not supported

Posted: Fri May 19, 2017 8:50 pm
by Lantis
Thanks for posting updated instructions.
I'm glad I could give you a head start.

Re: WiFi button not supported

Posted: Fri May 19, 2017 9:46 pm
by ispyisail
Thanks

Re: WiFi button not supported

Posted: Fri Nov 02, 2018 6:35 pm
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.