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

Script Help to IGNORE a Print Server

Discussion in 'HyperWRT Firmware' started by joelinkup, Nov 12, 2007.

  1. joelinkup

    joelinkup LI Guru Member

    WRT54GL wThibor 15c...I use the following commonly available Script to show amber when a client is attached and white when there is client activity and dark when there is no client...BUT my Print Server is always a client...So the LED always remains amber and flickers white as the Print Server refreshes...I want it to IGNORE the Print Server as a client...That is remain LED OFF while JUST the Print Server is a client...Perhaps there is a way to watch for the Print Server and IGNORE just it...Could anyone be of assistance...I would appreciate any help...Thanks...

    #!/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="am of wh on"
    PXFER=$XFER
    else
    LED="am on wh of"
    fi
    else
    LED="am of wh of"
    fi
    if [ "$LED" != "$PLED" ]; then
    led $LED
    PLED=$LED
    fi
    done
     
  2. Low-WRT

    Low-WRT LI Guru Member

    #!/bin/sh
    I=`nvram get wl0_ifname`
    while sleep 1; do
    minusbridge=$(wl assoclist | grep -v aa:bb:cc:dd:ee:ff)
    if [ -n "$minusbridge" ] ; then
    XFER=`ifconfig $I|grep bytes`
    if [ "$XFER" != "$PXFER" ]; then
    LED="amber off white on"
    PXFER=$XFER
    else
    LED="amber on white off"
    fi
    else
    LED="amber off white off"
    fi
    if [ "$LED" != "$PLED" ]; then
    led $LED
    PLED=$LED
    fi
    done

    Yagui helped me out with this one.
    Substitute aa-ff with your print server's mac address.
    I think I have all the leds correct, you may want to confirm it.
     
  3. joelinkup

    joelinkup LI Guru Member

    Thank You and your Friend so much for your help... IT WORKS PERFECTLY... But as you know one good thing leads to another... I tried for 4+ hours but I could not get to the next step... that is, to add 4 MAC addresses to IGNORE instead of just 1... One for the Print Server and one for each of 3 Cameras... I tried nesting... I tried changing variables... I added code... I tried all I knew... First of all my programming goes back to Basic... Fortran... Pascal... 6502 Assembler... A long time ago... I am not a youngster anymore... I do not even recognize this language... WHAT IS IT???... Where can I get information to learn some commands???... What is the command for making a line a comment???... AND could you PLEASE help with the Ignore 4 MAC Addresses modification... I truly appreciate your time spent... Thanks very much...
     
  4. mstombs

    mstombs Network Guru Member

Share This Page