1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is posible know if there aren´t computers conect by wireless

Discussion in 'Tomato Firmware' started by Cristian, Jul 9, 2012.

  1. Cristian

    Cristian Networkin' Nut Member

    I´m going to explain that i want to do, I want off wlan if not used, I don´t know if that is posible or not, something like:

    If wlan no conections during 5 minutes wlan offf.....

    maybe is impossible.......

    Thank you

    I have a WRT54GL with 1.28 tomato firmware
     
  2. Ed50547

    Ed50547 Network Guru Member

    I don't know if that's possible or not, but if it is, how will it come back on again when you need it?! You'd probably have to go into the setup ui to enable wireless again. Does your WRT54GL have the old SES button? If yes, maybe you could look into using the SES button to turn wifi on and off perhaps?
     
  3. rs232

    rs232 Network Guru Member

    I would:

    1) set the button of the router to toggle wireless (using the tomato Admin/Button/LED GUI)

    2) create a script called e.g. /tmp/test.sh (but better if you save in permanent location like cifs or usb if available) like this:

    Code:
    #!/bin/sh
    wlclients=`wl assoclist | wc -l`
     
    if [ $wlclients -lt 1 ]
      then
    /sbin/radio off
    fi
    
    3) schedule the script every e.g. 10 min
    Code:
    cru a Wireless-test "1-59/10 * * * * /tmp/test.sh"
    
    You can then enable radio pressing the button OR the tomato interface GUI. Every 10min the script will check if there are clients connected, if not turn radio off.
     
  4. Cristian

    Cristian Networkin' Nut Member

    Thank you rs232!!! perfect, fantastic, I had the point 1) bit point 2) and 3) it´s that i needed it!!! thank you!!

    I have a WRT54GL and Nas, i have mount cifs1 and put there test.sh, and in scheduler enable custom script every 15 minutes, but, what´s the command that i have to write to execute the script??

    cru a Wireless-test "/cifs1/test.sh" ????
     
  5. rs232

    rs232 Network Guru Member

    If you save into cifs1 and run every 15 minutes change point 3 into:
    Code:
    cru a Wireless-test "1-59/15 * * * * /cifs1/test.sh"
    and btw you should put this command above into Admin/scripts/init



    once saved remember to run also this command below (just once) to allow the script to be executed.
    Code:
    chmod 711 /cifs1/test.sh
    HTH
    rs232
     
  6. Cristian

    Cristian Networkin' Nut Member

    Ok, thank you, but i only need to write point 2) in scheduler script directly and choose execute every 15 minutes!!!

    Thank you very much, i need it, fantastic help!!
     

Share This Page