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

Getting the Wlan status script to work on 2.4

Discussion in 'DD-WRT Firmware' started by johnoost, Jun 21, 2008.

  1. johnoost

    johnoost Addicted to LI Member

    Hi all,

    I am having trouble getting the Wlan status script to work on DD-WRT 2.4
    The script I am using is the one from the original DD-WRT website, pasted below:

    WLAN Status (wlan.sh)

    * Uses front button LED to show WLAN state. Amber LED indicates one or more associated clients, white LED flashes when data is sent over WLAN.

    #!/bin/sh
    I=`nvram get wl0_ifname`

    while sleep 1; do
    if [ "`wl assoclist`" != "" ]; then
    XFER=`ifconfig $I|grep bytes`
    if [ "$XFER" != "$PXFER" ]; then
    LED='gpio disable 3 ; gpio disable 2'
    PXFER=$XFER
    else
    LED='gpio disable 3 ; gpio enable 2'
    fi
    else
    LED='gpio enable 3 ; gpio enable 2'
    fi

    if [ "$LED" != "$PLED" ]; then
    eval $LED
    PLED=$LED
    fi
    done



    The problem is that my SES button is always amber, even when there are no clients connected and even when i have disabled Wlan in total.

    Did anyone got this to work? I am running the script on a Linksys WRT54GL1.1
     
  2. johnoost

    johnoost Addicted to LI Member

    Extra information: i have put this script in the statup script by using the management website.
     

Share This Page