Wifi and SES buttons on Netgear R7000

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Sun Jul 03, 2016 7:56    Post subject: Wifi and SES buttons on Netgear R7000 Reply with quote
Hi
I have looked around and cannot find the answer to my question, so here goes.
I have configured openvpn via the command line for one ssid and one ethernet connection on the router so that just some traffic goes via the VPN.
I also configured the left two lights on the router to show if the VPN is up or down and if there is traffic going across it (thanks to others in the forums for the scripts that I modified!).
What I'd like to do now is use the two buttons (wifi and ses on the right hand side, shown as two lights too) to enable and disable the VPN.
I tried configuring the GUI as below

SES / AOSS / EZ-SETUP / WPS Button
Turning off radio (DISABLED)

Reset Button - ENABLED

and then put a script in /tmp/etc/config/on.sesbutton but it doesnt execute the script.

I polled the gpio settings and it looks like 4 is the left button and 5 is the right button.

Any ideas if these are configured differently in the firmware or if I am doing something wrong?

I'm running DD-WRT v3.0-r29440 std (04/11/16) at the moment

Thanks

Richard
Sponsor
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sun Jul 03, 2016 20:59    Post subject: Re: Wifi and SES buttons on Netgear R7000 Reply with quote
dickuk wrote:
Hi
I have looked around and cannot find the answer to my question, so here goes.
I have configured openvpn via the command line for one ssid and one ethernet connection on the router so that just some traffic goes via the VPN.
I also configured the left two lights on the router to show if the VPN is up or down and if there is traffic going across it (thanks to others in the forums for the scripts that I modified!).
What I'd like to do now is use the two buttons (wifi and ses on the right hand side, shown as two lights too) to enable and disable the VPN.
I tried configuring the GUI as below

SES / AOSS / EZ-SETUP / WPS Button
Turning off radio (DISABLED)

Reset Button - ENABLED

and then put a script in /tmp/etc/config/on.sesbutton but it doesnt execute the script.

I polled the gpio settings and it looks like 4 is the left button and 5 is the right button.

Any ideas if these are configured differently in the firmware or if I am doing something wrong?

I'm running DD-WRT v3.0-r29440 std (04/11/16) at the moment

Thanks

Richard


The wifi button does not handle any scripts, only the sesbutton. Thus you would have to check the state and toggle on off in your sesbutton script.

sesbutton script is working as it it also used for drive umounting.

The script needs to be executable and must start with shebang:

#!/bin/sh

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Sun Jul 03, 2016 21:18    Post subject: Re: Wifi and SES buttons on Netgear R7000 Reply with quote
<Kong> wrote:
dickuk wrote:
Hi
I have looked around and cannot find the answer to my question, so here goes.
I have configured openvpn via the command line for one ssid and one ethernet connection on the router so that just some traffic goes via the VPN.
I also configured the left two lights on the router to show if the VPN is up or down and if there is traffic going across it (thanks to others in the forums for the scripts that I modified!).
What I'd like to do now is use the two buttons (wifi and ses on the right hand side, shown as two lights too) to enable and disable the VPN.
I tried configuring the GUI as below

SES / AOSS / EZ-SETUP / WPS Button
Turning off radio (DISABLED)

Reset Button - ENABLED

and then put a script in /tmp/etc/config/on.sesbutton but it doesnt execute the script.

I polled the gpio settings and it looks like 4 is the left button and 5 is the right button.

Any ideas if these are configured differently in the firmware or if I am doing something wrong?

I'm running DD-WRT v3.0-r29440 std (04/11/16) at the moment

Thanks

Richard


The wifi button does not handle any scripts, only the sesbutton. Thus you would have to check the state and toggle on off in your sesbutton script.

sesbutton script is working as it it also used for drive umounting.

The script needs to be executable and must start with shebang:

#!/bin/sh


Thanks for the info

I created a file as below but nothing happens when I press the button (I expect the 2nd LED to go off) :

root@Rich:/tmp/etc/config# cat button.sesbutton
#!/bin/sh
gpio enable 9
root@Rich:/tmp/etc/config#
root@Rich:/tmp/etc/config#
root@Rich:/tmp/etc/config# ls -l
-rwxr-xr-x 1 root root 24 Jul 3 22:15 button.sesbutton
root@Rich:/tmp/etc/config#



Not sure I am running a Kong build, I downloaded the build from the ftp://ftp.dd-wrt.com/betas/ site.

Thanks

Richard
Doppel-D
DD-WRT User


Joined: 13 Jul 2014
Posts: 215
Location: Germany

PostPosted: Mon Jul 04, 2016 15:37    Post subject: Reply with quote
Kong builds are here:

http://www.desipro.de/ddwrt/

_________________
IT Crowd - Have You Tried Turning It Off And On Again?
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Mon Jul 04, 2016 16:38    Post subject: Reply with quote
Doppel-D wrote:
Kong builds are here:

http://www.desipro.de/ddwrt/


Thanks, can I save settings and use when going from the beta build to kong build? I have lots of settings and dont want to have to re-input them all.

Also, do I have to run the kong build to use the sesbutton?

<UPDATE> - I have flashed the latest kong build now but the ses button still doesnt seem to run the script.

Do I have the script in the correct folder? Its in /tmp/etc/config and it has execute bit set. I have tried different filenames all ending in .sesbutton but no luck.

If I do a nvram show | grep ses, I get :

ses_script=
ses_event=2
ses_button=0
ses_enable=1

What does the ses_button parameter do? Should this be set to 4 which is the gpio for the ses button?

Thanks

Richard
Doppel-D
DD-WRT User


Joined: 13 Jul 2014
Posts: 215
Location: Germany

PostPosted: Mon Jul 04, 2016 23:36    Post subject: Reply with quote
Have you checked/unchecked 'SERVICE/USB' Use SES Button to remove drives?

I would look if this script is working and where it is and how it's named.

_________________
IT Crowd - Have You Tried Turning It Off And On Again?
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Tue Jul 05, 2016 5:31    Post subject: Reply with quote
Doppel-D wrote:
Have you checked/unchecked 'SERVICE/USB' Use SES Button to remove drives?

I would look if this script is working and where it is and how it's named.


I tried enabling core usb support, USB storage support, auto drive mount 'use ses button to remove drives', and the usb stick is recognised when I insert it and automounted, but the ses button doesnt unmount it.
Doppel-D
DD-WRT User


Joined: 13 Jul 2014
Posts: 215
Location: Germany

PostPosted: Tue Jul 05, 2016 7:37    Post subject: Reply with quote
Can confirm, would suggest to open a ticket.

https://svn.dd-wrt.com/

_________________
IT Crowd - Have You Tried Turning It Off And On Again?
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Tue Jul 05, 2016 8:25    Post subject: Reply with quote
Doppel-D wrote:
Can confirm, would suggest to open a ticket.

https://svn.dd-wrt.com/


Thanks, created ticket #5431
dickuk
DD-WRT Novice


Joined: 23 Jan 2011
Posts: 25

PostPosted: Wed Jul 06, 2016 7:19    Post subject: Reply with quote
Kong has helped me now advising you have to press the ses button for 6 seconds.
It works perfectly now.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum