Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 501
Vikram Gupta Avatar asked Oct 09 '22 01:10

Vikram Gupta


1 Answers

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

like image 136
Eric Avatar answered Oct 13 '22 09:10

Eric