5

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().

Vikram Gupta
  • 6,496
  • 5
  • 34
  • 47

1 Answers1

4

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().

Eric
  • 5,323
  • 6
  • 30
  • 35
  • 1
    Yes thats the only way i can see. It gives the saved networks so it doesnt bother about the BSSID because it keeps changing when android finds the access point with higher signal strength and gets latched to it. – Vikram Gupta Jan 13 '12 at 06:39
  • 2
    How exactly would you cross-reference these? There can be multiple wifi networks with the same SSID, so how do you know which is which? – joaomgcd Apr 05 '17 at 11:06