I have created a small android program that can query an openwrt router, retrieve a list of connected clients, and present the data in a somewhat useful way. This is really my first android project, and, even worse still, my first Java program.
The android package can be downloaded from here.
Instructions:
- Install the apk on your phone. (easy)
- Make sure your router has ncat installed (version for the nmap folks).
- Login to your router and run:
#Get scripts off the internet
wget https://github.com/flyer-explorer/OpenWRT-Client-List/blob/master/Openwrt-Scripts/serve-leases -O /etc/init.d/serve-leases
wget https://github.com/flyer-explorer/OpenWRT-Client-List/blob/master/Openwrt-Scripts/serve-leases.sh -O /usr/bin/serve-leases.sh
#get server-leases into sys-init for next boots
cd /etc/rd.d/
ln -sf ../init.d/server-leases S99server-leases
#create config file
echo "PORT=2000" > /etc/dhcp-clients.conf
echo "TRANSPORT=tcp >> /etc/dhcp-clients.conf"
echo "UDP_RATE=1 >> /etc/dhcp-clients.conf"
echo "LEASE_FILE=/tmp/dhcp.leases >> /etc/dhcp-clients.conf"
# Start server
/etc/init.d/serve-leases start
Screenshots
Main window
Selecting a host will show more detailed information
Configuration window
Let me know if something is amiss. The sources for everything is on my git hub https://github.com/flyer-explorer/OpenWRT-Client-List.
(Last edited by rumbit on 18 Mar 2012, 15:01)