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

LED Scripting

Discussion in 'HyperWRT Firmware' started by dagnasty, Mar 7, 2006.

  1. dagnasty

    dagnasty Network Guru Member

    I figured I'd make a special little thread for LED scripting.

    So here's my simple little script that turns LED to white when users are connected via wireless.
    Code:
    #!/bin/sh
    while sleep 1; do
     if [ "`wl assoclist`" != "" ]; then
     LED="amber off white on"
     led $LED
     else
     LED="amber on white off"
     led $LED
     fi
    done
    
    My question: What's the command to display the router's WAN IP?

    Share your scripts!
     
  2. Thibor

    Thibor Super Moderator Staff Member Member

    nvram get wan_ipaddr
     
  3. dagnasty

    dagnasty Network Guru Member

    Thanks!

    Thank you Thibor. Does anyone know where I can get a detailed list of NVRAM commands? Or is there a command?
     
  4. dagnasty

    dagnasty Network Guru Member

    Damn. wan_ipaddr keeps the last IP and doesn't clean to nothing when wan connection is dropped. What's a good way to know instantly if the wan connection is dropped?
     
  5. dagnasty

    dagnasty Network Guru Member

    Someone has to know...
     
  6. Thibor

    Thibor Super Moderator Staff Member Member

    it depends on the internet connection type. ifconfig vlan1 if using dhcp, ifconfig ppp0 for dial type(pppoe), not sure about pptp, i think it's ppp0 again
     
  7. Raere

    Raere Network Guru Member

    Will this work on the WRT54GS? I've never seen the LED's do anything except flash green, much less amber or even white. Is there a script that could, say, make them move in order like Christmas lights?
     
  8. bluebox

    bluebox Network Guru Member

    Code:
    nvram show
    will show all the nvram settings
     
  9. dagnasty

    dagnasty Network Guru Member

    As far as I kno

    I don't know if they are controllable.
     

Share This Page