Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect all the Devices connected in a WiFi network from Android App

I am developing an app in which I need to scans WiFi network and display the list of all connected devices.

Allow a use to tap on a device and the app should show all the hardware info of that particular device. Here by hardware I mean - RAM, Storage Media, Storage Capacity, Device Name, Device IP address, etc.

Now this device can be anything like xbox, a laptop with Linux/Windows, mobile phone like iPhone or any Andorid based smart phone or even a printer.

How can I scans WiFi network and query/detect all the devices attached to it?

What are the protocols that I need to use to get list of hardware in a particular device irrespective of the OS running on it?

like image 562
Yogi Yang 007 Avatar asked Sep 12 '12 11:09

Yogi Yang 007


People also ask

Is there a way to see all devices connected to my Wi-Fi?

The most accurate way to access a list of connected devices is to log into your router's settings page. If your router was provided by your internet service, such as Spectrum, you may be able to easily log into your account to find this info.

What app can see who connects to Wi-Fi?

Fing – Network Tools Fing is a professional network analysis App which allows to find out the devices connected to Wi-Fi network.


2 Answers

Check requestPeers of WifiP2pManager

As per documents it seeks PeerListListener which returns WifiP2pDeviceList carrying list of WifiP2pDevice which carries deviceAddress, deviceName, primaryDeviceType, secondaryDeviceType, status and other attributes.

like image 170
Rohit Sharma Avatar answered Sep 20 '22 03:09

Rohit Sharma


Maybe the Network Discovery github project could help you. It lists all users connected to WiFi with IP and MAC addresses and gathers even some information like open ports, device name, ping, etc. Hope it helps

like image 34
larsaars Avatar answered Sep 23 '22 03:09

larsaars