kNotifySCNetworkChange detect bssid change, is there any way to detect bssid change without ssid change

In my test, seems kNotifySCNetworkChange only works for ssid change, is there any way to detect bssid change or both, thanks.

Replies

BSSID changes are tricky because they may or may not result in a change of the networking state:

  • You might have two completely separate APs that just happen to have the same SSID, in which case a BSSID change represents a change of the network state on the STA.

  • You might have two APs with the same SSID that represent the same network — these APs are typically bridged to Ethernet — where the STA is free to roam between BSSIDs without changing their networking state.

Given the above, what problem are you trying to solve by detecting a change in BSSID?

I suspect you’re concerned about the viability of network connections after the change, in which case there may be a better way to solve that problem than for you to deal with this low-level implementation detail.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi eskimo,


Thanks for your reply.

I'm trying to solve scnario as below:

"""

You might have two APs with the same SSID that represent the same network — these APs are typically bridged to Ethernet — where the STA is free to roam between BSSIDs without changing their networking state.

"""


Is there any way to detect the BSSID change even there is no network state change, thanks.


Regards,

Rachel

I'm trying to solve [scenario where] … there is no network state change

Yeah, that’s a tricky one. This is on iOS, right?

Also, just for my own curiosity, why do you need to detect that change? Most apps can ignore it because… well… there’s no network state change.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi eskimo,


Yes, on ios. We are working on a location feature which need to capture the bssid infomation change.


Reagrds,

Rachel

We are working on a location feature which need to capture the bssid infomation change.

Yeah, sorry, that’s not something I can help you with. From Apple’s perspective, location tracking should be done via the Core Location API. This allows the system to mediate access to location data in order to meet platform transparency and privacy goals.

The fact you can access the BSSID via

CNCopySupportedInterfaces
is an accident of history, and it’s an accident that we’d like to undo. Indeed, we tried to remove this facility in iOS 9 beta (see this mega thread, and specifically my 25 Aug 2015 and 9 Sep 2015 posts on it), but had to back out that change because it broke too many apps.

It’s likely that we will try again at some point in the future — the fact that we added the

com.apple.developer.networking.wifi-info
entitlement in iOS 12 is quiet suggestive IMO — and it’s safe to assume that whatever transition strategy we provide will only work for supported uses of
CNCopySupportedInterfaces
, and that does not include location tracking.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"