Finding devices (mac address) that is connected to an existing wireless network

Hi all

Im fairly new to arduino and looking to investigate on a project that can find devices that are currently connected to an existing wireless network (through my wireless router). By using the ethernet shield or the wifi shield and connecting it to my wireless router, can i program the shield to find a specific device (using MAC address) that is connected to my wireless router ? if so how would i go about accomplishing that?

My project basically evolves around finding that specific device (once its connected to the wireless network) then to do something when it finds it. This is for a uni project.

Your input, feedback help would be greatly appreciated

Kind regards
Kav D
kav.dassanayake@gmail.com

At Arduino Yun:

Install nmap:

opkg update
opkg install nmap

Scan local network:

nmap -sP 192.168.0.0/24
Nmap scan report for 192.168.0.1
Host is up (0.011s latency).
MAC Address: 14:CF:E2:A2:42:A7 (Unknown)
...
Nmap scan report for 192.168.0.240
Host is up (0.00017s latency).
MAC Address: 00:19:B9:22:AE:4A (Dell)
Nmap done: 256 IP addresses (9 hosts up) scanned in 3.47 secon

Arduino Yun list nearby of Wifi access points' Mac Address.

http://forum.arduino.cc/index.php?topic=288488.msg2018371#msg2018371

Get a list of connected clients Mac Address at router (Openwrt router):

iwinfo wlan0/wl0/ath0 assoclist

http://wiki.openwrt.org/doc/faq/faq.wireless#how_to_get_a_list_of_connected_clients

Windows does not come with nmap, you can download it or ping all DHCP IPs and then run arp -a

Following pings IPs from 192.168.1.100 to 192.168.1.200, adjust to your DHCP. If unsure, do full range from 1 to 254.

I don't think it matters if ping responds or not, the MAC -> IP cache will be updated anyway.

for /l %i in (100,1,200) do ping -n 1 -w 20 192.168.1.%i

Plan B:

If your router supports DHCP reservation setting. This could also be called "DHCP Static Lease" or something similar.

http://forum.arduino.cc/index.php?topic=331432.msg2286940#msg2286940

Plan C:

Get server's ip address at client by server's mac address: fping/arp

http://forum.arduino.cc/index.php?topic=331432.msg2292287#msg2292287

Plan D:

Communicate between two Yun without knowing the IP, Multicast way:

http://forum.arduino.cc/index.php?topic=331432.msg2293371#msg2293371