2013年3月5日星期二

1043 router

Now I find a solution. Just add one more command and all go fine.

Code:
0 01 * * * root /sbin/ifconfig ath0 down; iwconfig ath0 txpower off
0 07 * * * root /sbin/ifconfig ath0 up 

http://www.gargoyle-router.com/phpbb/viewtopic.php?f=7&t=980

______________________________

 

Re: About button handler

Postby argus » Sat Jul 09, 2011 2:00 am
I managed to get this going on my WR1043ND, the code I used was as follows:
Code: Select all
/etc/config/system

config 'button' 'wifionoff'
   option 'button' 'BTN_1'
   option 'action' 'released'
   option 'handler' '/sbin/wifionoff'
   option 'min' '0'
   option 'max' '2'

Code: Select all
/sbin/wifionoff

#!/bin/sh
SW=$(uci -q get wireless.@wifi-device[0].disabled)
[ "$SW" == "1" ] && uci set wireless.@wifi-device[0].disabled=0
[ "$SW" == "1" ] || uci set wireless.@wifi-device[0].disabled=1
wifi

and finally to make it executable:
Code: Select all
chmod +x /sbin/wifionoff