Results 1 to 15 of 15

Thread: How to disable Wireless when pressing ez setup button?

  1. #1

    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?

  2. #2
    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.

  3. #3
    Here is my code for switching between the two modes. Maybe you know a nicer way to do this..

    Code:
    #!/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

  4. #4
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi, sorry my english.

    why
    Code:
    if [ -f /usr/local/sbin/poweroff ]; then
    ???

    Code:
    #!/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
    Last edited by KGy; 09-06-2007 at 21:29.

  5. #5
    See that's something I didn't know that you could do!
    Thanks for the update!

  6. #6
    Don't forget to put a "!" after the "#" in your code!

    It didn't work when I just copied and pasted it!!

  7. #7
    now the issue is does wl down

    really turn the wireless radio off???????????
    or is it

    wl radio off?

  8. #8
    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...

  9. #9
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    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

  10. #10
    i replaced the wl down
    with wl radio off........

    i feel that wl radio down really turns the wifi off....properly....

  11. #11
    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 =(

  12. #12
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    check the log, may be it has rebooted itself because of power failure or whatsoever.

  13. #13
    Quote Originally Posted by al37919 View Post
    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?

  14. #14
    Since I upgraded to the newest firmware this script doesn't work anymore... Does somebody have a fix?

  15. #15
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    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:
    Code:
    #!/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

Similar Threads

  1. Replies: 6
    Last Post: 09-08-2008, 08:33
  2. How to setup wireless bridging
    By ErikWL500 in forum WL-500gP Q&A
    Replies: 0
    Last Post: 06-03-2007, 09:32
  3. How to Totally disable wireless access?
    By qz3fwd in forum WL-700g Q&A
    Replies: 1
    Last Post: 21-01-2007, 16:31
  4. Who is pressing the camera button ?
    By max2950 in forum WL-500g Q&A
    Replies: 0
    Last Post: 19-11-2006, 08:59
  5. Replies: 0
    Last Post: 13-11-2006, 18:27

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •