Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scan all wifi devices near the phone

Company http://renewlondon.com/ have the terminal stations that collect all near by mac addresses

enter image description here

Can I via iOS SDK, and Android SDK,do the same thing?

like image 656
Ulle Tad Avatar asked Oct 19 '13 07:10

Ulle Tad


2 Answers

You can access the wifi data using 'WifiManager' and after the scanning the scanresult contain all the data like

BSSID The address of the access point.

SSID The network name.

capabilities Describes the authentication, key management, and encryption schemes supported by the access point.

frequency The frequency in MHz of the channel over which the client is communicating with the access point.

level The detected signal level in dBm.

timestamp Time Synchronization Function (tsf) timestamp in microseconds when this result was last seen.

about the wifi devices. if you need more related to coding, I think I can help you...

Sample code

WifiManager wManager;
List<ScanResult> wifiList; 

wManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
// Inside BroadcastReceiver()
wifiList = wManager.getScanResults();
for (int i=0; i<wifiList.size(); i++){
     ScanResult scanresult = wifiList.get(i);                        
     System.out.println("SSID: "+ssid);
     System.out.println("RSSI: "+scanresult.level);
     System.out.println("Frequency: "+scanresult.frequency);
     System.out.println("BSSID: "+scanresult.BSSID);
     System.out.println("Capability: "+scanresult.capabilities);
}

Also checkout the BroadcastReceiver().

like image 58
Ciril Avatar answered Sep 28 '22 20:09

Ciril


One way i can think of doing this is making your device as wifi hotspot and use some hidden api to discover devices.You are basically trying to mimic an access point.

Otherwise each device would need some p2p framework on them-either wifi direct on or some other framework like alljoyn or samsung chord which helps in peer to peer discovery

like image 31
rupesh jain Avatar answered Sep 28 '22 21:09

rupesh jain