Connect to Wifi hotspot

Hi,

we’re developing an iPad app that connects to a number of sensors through BLE. One of the sensors will send a wifi SSID to the app and then act as a wifi hotspot (with the SSID provided). The other sensors connect to the hotspot as stations.

The network configuration is added to the iPad, and then the iPad is supposed to connect to the hotspot.

We’re having mixed results here, sometimes the iPad connects in 10 seconds, but most of the times, it doesn’t, even after 5 min, still no connection. Sometimes there is a popup saying the ipad couln’t connect to the hotspot, but connects anyway.

Pulling down the control center triggers a scan, which leads to a connection, same when putting the device to sleep and waking it up. It seems that the iPad does not scan for wireless hotspot by itself.

Any way to “help” it programmatically ? user experience would be very poor if we asked the customers to manually connect to the hotspot.

Note: the ipad is not connected to any other wifi network when doing that

Thanks

The network configuration is added to the iPad …

Added how?

Share and Enjoy

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

Using NEHotspotConfiguration API, with joinOnce=false. The user gets a popup to add the network (even when the configuration is already present, not sure if this is the expected behavior) Thanks

Unfortunately there isn’t a lot you can do at the API level here. NEHotspotConfigurationManager is a pretty simple API, meaning it’s hard to use incorrectly. Problems that crop up during the join are usually the result of bugs in iOS or in your accessory. It’s hard to say which is which without digging deep into the Wi-Fi layer, which isn’t something I maintain expertise in.

On our Bug Reporting > Profiles and Logs page you’ll find a Wi-Fi for iOS configuration profile that increases the level of logging done by the Wi-Fi subsystem. Install that and then look through the system log to see if there’s an obvious smoking gun. For general advice on the system log, see Your Friend the System Log.

Another option here is to run a second test with a different Wi-Fi AP that has similar characteristics. If you see similar behaviour there, that’s evidence that this issue is on the iOS side. In that case I recommend that you file a bug, making sure to:

  • Install that configuration profile on your iOS device before running your test.

  • Attach a sysdiagnose log taken immediately after seeing the problem.

If you do file a bug, please post your bug number, just for the record.

However, if the other AP works more reliably, it makes sense to look at this from the perspective of your AP. You might want to run this past the folks who built your accessory. They may be able to see something relevant from there end.

Share and Enjoy

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

Connect to Wifi hotspot
 
 
Q