Reputation: 15
Can I scan and distinguish Wifis that have same SSID but different BSSIDs? I want to obtain all of BSSIDs by APs that have same SSID. Thanks.
Upvotes: 0
Views: 166
Reputation: 174
Yes we can definitely scan and distinguish Wifis based on there BSSIDs.
Try this:
class WifiScanReceiver extends BroadcastReceiver {
@SuppressLint("UseValueOf")
public void onReceive(Context c, Intent intent) {
List<ScanResult> wifiScanList = wifiManager.getScanResults();
for (int i = 0; i < wifiScanList.size(); i++) {
String ssid = wifiScanList.get(i).SSID; //Get the SSID
String bssid = wifiScanList.get(i).BSSID //Get the BSSID
/****
//manipulate bssid or ssid according to your need
//in your case, use it for differentiating
***/
}
}
}
Upvotes: 1