Talk:OpenWRT on Asus WL-500gP: Command and Path Reference
From Free Knowledge Base- The DUCK Project: information for everyone
Original OpenWRT wiki scripts for wl
ipkg install wl
#!/bin/sh for MAC in `wl assoclist | cut -d ' ' -f 2` ; do echo -n 'Computer: '; echo -n `cat /tmp/dhcp.leases | awk '{x=toupper($0); print x}' | grep $MAC | cut -d ' ' -f 4`; echo -n ' IP: '; echo -n `cat /tmp/dhcp.leases | awk '{x=toupper($0); print x}' | grep $MAC | cut -d ' ' -f 3`; echo -n ' Signal Strength: ' ; echo -n `wl rssi $MAC | cut -d ' ' -f 3`; echo ' dBm' done
better version
#!/bin/sh for MAC in `wl assoclist | awk '{print $2}'` do echo -n "Computer: `grep -i ${MAC} /tmp/dhcp.leases | awk '{print $4}'`"; echo -n " IP: `grep -i ${MAC} /tmp/dhcp.leases | awk '{print $3}'`"; echo -n " Expires: `grep -i ${MAC} /tmp/dhcp.leases | awk '{print $1}' | awk '{print strftime("%x %X",$1)}'`" ; echo -n " Signal Strength: `wl rssi $MAC | awk '{print $3}'` dBm" ; echo " " done