Hi,
would like to see that the SES / AOSS / EZ-SETUP / WPS Button on some Routers are able to disable/enable wifi like in ddwrt.
Thats it
SES / AOSS / EZ-SETUP / WPS Button function/config
Moderator: Moderators
-
- Posts: 2
- Joined: Wed Feb 20, 2013 4:06 pm
Re: SES / AOSS / EZ-SETUP / WPS Button function/config
wifitoggle can not use.After pressed the botton for turning
wifi on once,it will automatically switch off every 15 minutes.
Re: SES / AOSS / EZ-SETUP / WPS Button function/config
Oh, right. Well, I use a custom made "wifionoff" shell script (wifionoff.sh.gz). I attached it to this message. Feel free to download and test.zhmjwo wrote:wifitoggle can not use.After pressed the botton for turning
wifi on once,it will automatically switch off every 15 minutes.
To get it running you must:
1º) Unzip the file wifionoff.sh.gz
2º) Copy wifionoff.sh to /usr/bin/ on your router
3º) Give execute permission to the script with: chmod +x wifionoff.sh
4º) Copy the following code and paste it in your /etc/config/system file
Code: Select all
config button 'wifionoff'
option button 'wps'
option action 'released'
option handler '/usr/bin/wifionoff.sh &'
option min '0'
option max '2'
6º) Profit!!
NOTE: the script is running and working fine on my TP-LINK TL1043ND v1.8 so pay attention to the field option button 'wps' because the 'wps' string may change in another router models or brands.
Take a look to the documentation: http://wiki.openwrt.org/doc/howto/hardware.button
- Attachments
-
- wifionoff.sh.gz
- WiFi On/Off Shell Script
- (220 Bytes) Downloaded 581 times
Re: SES / AOSS / EZ-SETUP / WPS Button function/config
Thanks.the script is also running and working fine on my TP-LINK WR741N v1.6FireVortex wrote:Oh, right. Well, I use a custom made "wifionoff" shell script (wifionoff.sh.gz). I attached it to this message. Feel free to download and test.zhmjwo wrote:wifitoggle can not use.After pressed the botton for turning
wifi on once,it will automatically switch off every 15 minutes.
To get it running you must:
1º) Unzip the file wifionoff.sh.gz
2º) Copy wifionoff.sh to /usr/bin/ on your router
3º) Give execute permission to the script with: chmod +x wifionoff.sh
4º) Copy the following code and paste it in your /etc/config/system file
5º) Restart your routerCode: Select all
config button 'wifionoff' option button 'wps' option action 'released' option handler '/usr/bin/wifionoff.sh &' option min '0' option max '2'
6º) Profit!!
NOTE: the script is running and working fine on my TP-LINK TL1043ND v1.8 so pay attention to the field option button 'wps' because the 'wps' string may change in another router models or brands.
Take a look to the documentation: http://wiki.openwrt.org/doc/howto/hardware.button
In my /etc/config/system file,I find that the "wps" button was used for rebooting in default config. So I delete the default config of "wps" button.
Re: SES / AOSS / EZ-SETUP / WPS Button function/config
You're welcome!!zhmjwo wrote: Thanks.the script is also running and working fine on my TP-LINK WR741N v1.6
In my /etc/config/system file,I find that the "wps" button was used for rebooting in default config. So I delete the default config of "wps" button.
As a side note: you can have as many 'wps' entries as you want. For example, this is a chunk of my system config file:
Code: Select all
config button 'wifionoff'
option button 'wps'
option action 'released'
option handler '/usr/bin/wifionoff.sh &'
option min '0'
option max '2'
config button 'restart_wan_connection'
option button 'wps'
option action 'released'
option handler '/usr/bin/restartwan.sh &'
option min '3'
option max '5'
config button 'reboot_button'
option button 'wps'
option action 'released'
option handler 'logger reboot ; /usr/lib/gargoyle/reboot.sh ;'
option min '6'
option max '90'
If I press the WPS button:
- Between 0 and 2 secs ---> Toggle WiFi
Between 3 and 5 secs ---> Restart WAN
Between 6 and 90 secs ---> Reboot router
Last edited by mtr on Sat May 10, 2014 10:45 am, edited 1 time in total.
Re: SES / AOSS / EZ-SETUP / WPS Button function/config
Great!FireVortex wrote:
As a side note: you can have as many 'wps' entries as you want. For example, this is a chunk of my system config file:
The "secret" is, basically, set the min and max options. So, following the example above:Code: Select all
config button 'wifionoff' option button 'wps' option action 'released' option handler '/usr/bin/wifionoff.sh &' option min '0' option max '2' config button 'restart_wan_connection' option button 'wps' option action 'released' option handler '/usr/bin/restartwan.sh &' option min '3' option max '5' config button 'reboot_button' option button 'wps' option action 'released' option handler 'logger reboot ; /usr/lib/gargoyle/reboot.sh ;' option min '6' option max '90'
If a press the WPS button:
- Between 0 and 2 secs ---> Toggle WiFi
Between 3 and 5 secs ---> Restart WAN
Between 6 and 90 secs ---> Reboot router
I am learning more.