|
起因:我的500u不知道是固件原因或者别的原因,在DD里边设置了用Ses按钮控制无线开关不是十分好用。表现为按下去不知道哪次会开启或者关闭无线。而且即使无线关闭了,那个Air灯依然是亮的。不知道各位的是否和我的一样?考虑到辐射和节能(当然很小了),在晚上bt的时候还是把无线关了比较好。
功能:使无线网络没有客户端连接的情况下3分钟后自动关闭。如果需要打开,按下Ses键再连接就可以了。使用了PWD灯作为无线开关的指示。
1. 脚本:
root@DD-WRT:/jffs/etc/config# ls -la
drwxr-xr-x 1 root root 0 Mar 10 09:08 .
drwxr-xr-x 1 root root 0 Mar 9 23:13 ..
-rwxr-xr-x 1 root root 27 Mar 10 09:35 .sesbutton
-rwxr-xr-x 1 root root 398 Mar 10 09:33 radio_ctl
root@DD-WRT:/jffs/etc/config# cat .sesbutton
wl radio on
gpio disable 0
root@DD-WRT:/jffs/etc/config# cat radio_ctl
Radio_on="0x0000"
LED="0" #enable: off, disable: on, 0: PWD LED
if [ "`/usr/sbin/wl radio`" = $Radio_on ]; then
gpio disable $LED
if [ "`/usr/sbin/wl assoclist`" = "" ]; then
sleep 180
if [ "`/usr/sbin/wl assoclist`" = "" ]; then
wl radio off
gpio enable $LED
fi;
fi;
else
gpio enable $LED
fi;
root@DD-WRT:/jffs/etc/config#
2. 计划任务: Administration-Management-Cron:
*/5 * * * * root /jffs/etc/config/radio_ctl
3. 在service里边禁用SES / AOSS / EZ-SETUP / WPS Button |
|