When I connect to the IoT device, from my app (NEHotspotConfiguration API, iOS 14.2), sometimes the wifi connection takes a few minutes. On iOS 12.3 it works well. This issue is reproducible once every 5 test connections.
Environment IoT device (esp32) doesn't have an internet connection
HTTP server is run on IoT devices.
Steps to reproduce: Call NEHotspotConfigurationManager.shared.apply. SSID, Passphrase, isWEP=false, joinOnce=false. Connection response without error
Wait 10 seconds, send HTTP request from the app to the device.
Result HTTP request is failed. NSURLErrorNotConnectedToInternet error code.
On the wifi settings screen I see: "progress indicator" near the IoT device's Wi-Fi and "No internet connection" message. When I tap on Wi-Fi to open the detail screen, I see an incorrect IP address.
If I try to send an HTTP request from Safari to my device, I see no internet connection message too.
Look like it still trying to connect to the device.
But, If I wait a few minutes when the progress indicator and "No internet connection" message disappear (iOS settings screen): IP address now is correct
Safari display success response from the device
Mobile receives a successful response without any errors.
joinOnce=true, joinOnce=false works the same. You need to wait for a few minutes to have a connection with device.
Tested on iPhone8(iOS 14.2, iOS14.3), iPhoneX(iOS 14.2),
Post
Replies
Boosts
Views
Activity
I use NEHotspotConfigurationManager and NEHotspotConfiguration API to connect to Wifi by SSID and Password. All works good, but I need to set a static IP address and mask too.
I couldn't find any public API that can do this.
Is it possible to do this programmatically or exists only one way, after connecting to WIfi in my Application, the user should manually open iOS network settings, and enter this data on the "configuration IPv4" screen?