The point of my app is to limit actions based on the network that I am connected to. I chose to define the network by the access point's mac address or BSSID. I'm using WifiInto's getConnectionInfo() and getBSSID() to get the BSSID of the access point.
I'm under the impression that BSSIDs are unique for an access point. However, across different devices, I am getting a slightly different BSSID (last 4 digits are different but the first 8 are the same). And even in the same device, on connect, the BSSID can be a little different.
My question is, is there a way to reliably uniquely identify an access point? People have told me that MAC address is the only way to do so but as you see here, the BSSID returned is slightly different.
Before giving an answer to your question, i would like to explain little bit about BSSID, SSID and Access Point.
An access point can announce multiple SSIDs. So for uniquely announcing an SSID, separate BSSID will be used.
SSID announced by multiple access points will be announced by separate BSSID (by each access point). So, if you want to see how many access points are announcing the said SSID, you can figure how many BSSID you are getting for the same SSID.
An access point of dual band (i.e., 2.4 GHz and 5 GHz) will announce 2 BSSID for same SSID; One for 2.4 GHz band and other one for 5 GHz band.
For example, if you have 10 dual band access points in your network and each one announcing the same SSID; you will have 20 BSSID in total announcing same SSID.
(Although 10 access points are not needed at one place and they are generally placed in a manner that only 3 or 4 are able to listen to each other. So you will not find 20 BSSID at any single place as per above example).
Now, to answer your question, about uniquely identifying an access points.
BSSID is creating using the MAC address of the access point, having first 8 digits are same as the MAC of the access point and last 4 digits are unique per BSSID.
So by looking the BSSID, you can do some guess for uniquely identifying an access point.