Bekijk de volledige versie : How to disable Wireless when pressing ez setup button?
Since I am using other wireless devices like a phone or a tv transmitter that also uses 2,4GHZ I want to be able to switch off the wireless by pressing the ez setup button.
As far as I have come is to create a file named ez-setup which is supposed to be run when the button is hit.
Is it normal, that there is no ez-setup script in the first place?
I am using Oleg's G-Firmware...
How am I able to switch off the wireless or to just lower the wireless power?
the latest firmware provides you a chance to script your own code in the ez button.
I have yet to do this, since I am still on an older firmware.
Though all you have to do is perform
the commands
'wl down'
or
'wl up'
and just toggle between the two.
I will try soon.
Here is my code for switching between the two modes. Maybe you know a nicer way to do this..
#!/bin/sh
#Script by zapt @ wl500g Board
#test, if wireless powered off
if [ -f /usr/local/sbin/poweroff ]; then
echo "Wireless was down, powering up!" && rm /usr/local/sbin/poweroff && wl up
else
#test, if wireless powered on
echo "Wireless was up, powering down!" && touch /usr/local/sbin/poweroff && wl down
fi
Hi, sorry my english.
why
if [ -f /usr/local/sbin/poweroff ]; then
???
#!/bin/sh
WLAN=`wl isup | grep -c "(on)"`
if [ "$WLAN" = "0" ]; then
echo "Wireless was down, powering up!" && wl up
else
#test, if wireless powered on
echo "Wireless was up, powering down!" && wl down
fi
George
See that's something I didn't know that you could do!
Thanks for the update!
Don't forget to put a "!" after the "#" in your code!
It didn't work when I just copied and pasted it!!
now the issue is does wl down
really turn the wireless radio off???????????
or is it
wl radio off?
It really does what it is supposed to!
I checked it with kismet running on my laptop.
Also the "AIR" LED stops working when wireless is shut off!
So everything works as I wanted it to! Even stopping and restarting wlan works without any problems.
I am writing this while connected to it via wlan.
Oh, and don't forget to do the usual flashfs enable etc...
Hi. Sorry my english.
In my router (wl-500g, oleg-7f fw) the "wl down" command not working and "up", too. "wl radio on" or "off" working.
And "wl isup" working, too.
George
i replaced the wl down
with wl radio off........
i feel that wl radio down really turns the wifi off....properly....
hi all,
I have noticed my wireless coming on by itself =((((((((
Is this due to the date/time enable in the web config?
Can someone help me?
I think it doesn't happen everynight, but today it has. I've noticed it twice.....
after I have performed a wl radio off
its come back on by itself =(
check the log, may be it has rebooted itself because of power failure or whatsoever.
check the log, may be it has rebooted itself because of power failure or whatsoever.
no thats not the case, because my scripts on boot , will disable it with wl radio off too,
my rtorrent was still running too.
I just dont understand why its on...... =( The only reason I can think of is that the ez script gets run.....mistakenly....
have you's noticed that your wifi came on, without you knowing?
Since I upgraded to the newest firmware this script doesn't work anymore... Does somebody have a fix?
This is because "wl isup" has changed his output in -10 FW.
You only need to change:
WLAN=`wl isup | grep -c "(on)"`
with
WLAN=`wl isup`
And with syslog located in /opt/var/log this is my /usr/local/sbin/ez-setup:
#!/bin/sh
WLAN=`wl isup`
if [ "$WLAN" = "0" ]; then
time=`/bin/date '+%b %e %H:%M:%S'`
echo "$time: Wireless was down, powering up!" >> /opt/var/log/syslog.log && wl radio on
else
time=`/bin/date '+%b %e %H:%M:%S'`
echo "$time: Wireless was up, powering down!" >> /opt/var/log/syslog.log && wl radio off
fi