My requirement is to discover the nearby devices on wifi network. First i checked reachability of each IP address from 192.168.0.1 to 192.168.0.255. It takes long so i made a research for alternative solutions. Finally I got a code to get connected device list by fetching /proc/net/arp. But it lose IP addresses when i restart wifi connection. It only shows the IP address of router. Is this because of the ARP table caching ? if so is there any solution for this ? i can't root my device for this.
Any help on this issue is much appreciated Thanks in advance
Gian Matteo
sudo ip -s -s neigh flush all