How to get the BSSID of the WiFi networks configured in the supplicant - android?

3.9k views Asked by At

When i use getConfiguredNetworks() to get the BSSID value, it doesnt give me anything. I get all other values except BSSID. Can anyone tell me why this is happening? And yes the networks which i receive have their respective BSSIDs. I found that out by getScanResults(). I'm not getting the BSSID when i use getConfiguredNetworks().

1

There are 1 answers

2
Eric On BEST ANSWER

I'm guessing that it's expected to work like that (even if the documentation doesn't mention it): getConfiguredNetworks() only retrieves my "saved" wifi hotspots, which probably don't save the BSSID (since you don't care which access point to connect to, just that it has the expected ssid). If you need the BSSID you probably just have to cross-reference getScanResults() with getConfiguredNetworks().