ganon11000 DD-WRT Novice
Joined: 24 Dec 2013 Posts: 35
|
Posted: Tue Dec 24, 2013 12:23 Post subject: DIR-615 D2 router WPS LED shows how many users connected. |
|
just a script I made for the DIR-615 D2
#!/bin/sh
AMBER='gpio disable 13 ; gpio enable 11'
WHITE='gpio enable 13 ; gpio disable 11'
BLACK='gpio enable 13 ; gpio enable 11'
MORE='gpio disable 11 ; gpio disable 13'
#possible to use usleep 10000 instead of sleep 1
trap lightsoff 1 2 3 6 14 15
lightsoff()
{
gpio enable 13 ; gpio enable 11 ; exit 1
}
while true; do
NC=`grep 0x /proc/net/arp | wc -l`
if [ "$NC" -eq 0 ]; then
eval $BLACK
fi
if [ "$NC" -eq 1 ]; then
eval $AMBER
fi
if [ "$NC" -eq 2 ]; then
eval $WHITE
fi
if [ "$NC" -eq 3 ]; then
eval $AMBER
usleep 1000000
eval $BLACK
fi
if [ "$NC" -eq 4 ]; then
eval $WHITE
usleep 1000000
eval $BLACK
fi
if [ "$NC" -eq 5 ]; then
eval $MORE
usleep 1000000
eval $WHITE
fi
if [ "$NC" -eq 6 ]; then
eval $MORE
usleep 1000000
eval $AMBER
fi
if [ "$NC" -ge 7 ]; then
eval $MORE
fi
usleep 1000000
done |
|