ways for a client to identify the specific access point it is connected to within a single SSID?

混江龙づ霸主 提交于 2019-12-04 19:37:37

You can get the BSSID of the access point you are connected to. Something like:

WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifi.getConnectionInfo();
String BSSID = info.getBSSID();

Not 100% what you'll get back with the BSSID since I've never used it -- but it should uniquely ID the base station -- Wikipedia seems to indicate that you'll get the MAC of the AP (near the bottom):

http://en.wikipedia.org/wiki/Service_set_(802.11_network)#Basic_service_set_identifier_.28BSSID.29

-- Dan


EDIT:

According to the Android docs, it is the MAC address:

http://developer.android.com/reference/android/net/wifi/WifiInfo.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!