-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network connection was lost when trying to reconnect to the ESP device after disconnecting #55
Comments
Can anyone help us out with this? |
Hi @shushant43, can you please explain what kind of API call you need to make during provisioning? |
@vikas-chandra-mnnit It’s an API call to update a few things related to our workflow. |
@shushant43 Is it over BLE or simply a network call? |
@vikas-chandra-mnnit A network call |
@shushant43 Can you make the network call without disconnecting from the BLE device? |
@vikas-chandra-mnnit No. Because at that stage the iOS device is connected to the BLE device’s access point. |
@shushant43 Is it possible for you to share the code snippet here? |
Disconnecting from the ESP device and checking for network
This works fine, the ESP device is disconnected and after the network reachability is restored, the network call is made. After getting back the response from API, try to reconnect to the ESP device inside the success delegate
Provided POP via the delegate
|
@shushant43 Please share the code for checkForNetwork() method. |
|
@vikas-chandra-mnnit What do you think? |
@shushant43 Have you tried not disconnecting the BLE device and calling the checkNetwork() method? What happens in that case? I don't see any dependency between the two. |
Problem
In our app, before we actually provision the device, we have to make an API call hence we have to disconnect from the ESPDevice and after making the api call, we have to connect to it again. But when we try to connect again with delegate while providing the correct POP, it doesn't connect. It fails to initialise a session because the network connection was lost.
To Reproduce
Expected behavior
The device should be connected again without any issues
iOS information:
Provisioning information:
The text was updated successfully, but these errors were encountered: