Page 1 of 1
Find Android devices in Wifi network
Posted: 27 Mar 2014 07:47
by bichlepa
Is it possible to find Android devices in a Wifi network?
I thought it might be possible with a broadcast address, but it doesn't work.
I get an answer if I open
http://192.168.1.101:8080/wotablet. But not
http://192.168.1.255:8080/wotablet. Trying out all possible IP addresses is not practicable because it takes several seconds before the answer comes that the page is not reachable.
I'm about to create a solution to exchange the clipboard between the computer and an android device. It works but only if I know the IP Address of the android device.
Re: Find Android devices in Wifi network
Posted: 27 Mar 2014 20:17
by ZSasha
how about using an external place (like dropbox or gdrive) so Android, once your flow has been started started, would "register" itself by putting its own IP address in a text file.
Then PC app could query the same location, read the file to get Android's IP address and then try to contact that address directly?
Re: Find Android devices in Wifi network
Posted: 27 Aug 2019 18:34
by Bluscre
This would indeed be nice,
Btw @martin why is stopfli.com a thing?
Re: Find Android devices in Wifi network
Posted: 27 Aug 2019 19:11
by Martin
Hi,
You can ignore the stopfli-site. It was temporarily used for a few tests and I forgot to remove it. It should stop working soon...
Regards,
Martin
Re: Find Android devices in Wifi network
Posted: 27 Aug 2019 19:20
by Bluscre
I use this now (works without root on my device:
Code: Select all
// Execute Command: cat /proc/net/arp
stdout = split(stdout, "\n");
header = removeElement(stdout, 0);
wifi_devices = newMap();
for (i in stdout)
{
split = split(i, "\\s+");
ip = split[0];
wifi_devices[ip] = newMapFromValues(
"type", split[1],
"flags", split[2],
"mac", split[3],
"mask", split[4],
"adapter", split[5]
);
}
Thanks for the info martin, i almost thought i entered my login on a scam site for a second xd
Re: Find Android devices in Wifi network
Posted: 29 Aug 2019 19:05
by Desmanto
But arp only contain the devices address that have communicate to our phone within last several minutes. And sometimes it doesn't even have the devices address I just ping.
Still have to use ping to all possible address and parse the result to grep only for the reply one.