Connecting to only one SSID when the network has multiple BSSIDs

Hi there! I’m developing an iOS app which requires the user to connect to a Wi-Fi network broadcasted from a device. The problem arises when multiple devices are in the phone’s vicinity, as they all have the same SSID, and the phone randomly switches from one device to another; I need the phone to “fixate” on a single device.

Of course, the devices’ MAC addresses/BSSIDs are unique, so I thought I could use that information to differentiate between them and programmatically choose to connect to a single network. Is there any way I can obtain the BSSIDs of the available networks, and, within the app’s context, connect to a single one of them? Is there another way for the phone to “fixate” on a single BSSID that I might have missed?

It would be ideal for the solution not to require changing the device's firmware. Moreover, the device has to be able to connect to other non-Apple devices. Thanks in advance!

Wait wait wait, this is a Wi-Fi based hardware accessory, right? And they all separate accessories that happen to broadcast the same SSID?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I don't know exactly what you mean by Wi-Fi based hardware accessory, but yes, they are all separate accessories broadcasting the same SSID.

If you haven’t already, please read TN3111: iOS Wi-Fi API overview.

Then it sounds like you are doing the Temporarily join a network use case. Is this correct? Or if not, which use case applies to you?

I have read the technical note, and temporarily joining a network is indeed my use case. My problem is that there's no way (AFAIK) to init a NEHotspotConfiguration (https://developer.apple.com/documentation/networkextension/nehotspotconfiguration) specifying the BSSID, which means that I cannot guarantee that the iOS device will maintain the connection with only one device, without changing to another one with the same SSID.

My problem is that there's no way (AFAIK) to init a NEHotspotConfiguration … specifying the BSSID,

Right. But it’s worse than that: iOS’s underlying Wi-Fi infrastructure assumes that all APs with the same SSID lead to the same network, and will happily switch BSSIDs at its own discretion.

The only path forward here is to update your accessory to use unique SSIDs. Most folks use a common SSID prefix and then add some unique identifier, like the last few digits of the BSSID. That works well with the NEHotspotConfigurationManager prefix API.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Connecting to only one SSID when the network has multiple BSSIDs
 
 
Q