开发者

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

The problem is as follows - there's a university campus wide wifi connection with a single SSID, say "campus-wifi". The user freely roams around campus, and the usual hand-off between access points occurs. My question is, is there any information at any layer of the network stack that allows the client to identify (any unique identifier is fine) the specific access point they're connected to, rather than simply the fact that they are connected to "campus-wifi"?

If it's relevant, I'd lik开发者_开发技巧e to be able to do this from mobile devices (android/iOS primarily).


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜