-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Can not connect a second time to a re-created client #65
Comments
This reminds of my last weekend, where I finally was "sure" that my ESP32 was broken. For me the solution was to erase the flash , which seemed to have solved it. In the end I erased it basically before every upload. What IDE are you using? If you are using some kind of caching mechanism, you might need to delete the compiler cache too. |
I had a "broken" ESP32 too a few days ago, put it apart, I have not thrown it away yet. I'll try to erase the flash to see if that brings it back to life. But this is another issue. I can reset to run the sketch again. I can re-flash and start the program over again. But is won't get passed the second
and the second time it logs:
and then waits forever... Most of the time, also this time, I use the Arduino IDE, 1.8.10 (that is the one but last I believe). Every now and then I use pio. |
Turn on event code strings to see what
actually are. Looks like you're hanging on a semaphore, or the stack is getting stuck because the peripheral has not disconnected yet. Try putting a delay of 100ms or so between deleting and creating the client. |
Logging now:
I think the issue is indeed that I think |
Adding a 200 ms delay between |
Interesting observation, I will test this too. |
What is the purpose of doing this? It seems odd to me to create a client object delete it and create another in such a short time, why not just reuse the client object?
That would unnecessarily slow down other applications, if you really need to know the client is disconnected there is a callback for that. |
In the integration I am creating several devices are read out independently. Most don't need a connection, some do. I just want to use the functionality that is there. Also, I think it should always work Could you give me some directions how to check if the client has disconnected? The function isDisconnected() does not do this job |
This is must when you are building bluetooth app. |
This may have happen when there is no successful connection, maybe except MTU exchange, because this requires full connection established, unless MTU is called too early (in wrong place). |
I have learned this …. after several hours :)
(It was not obvious to me before)
… Am 29.05.2020 um 17:30 schrieb chegewara ***@***.***>:
For me the solution was to erase the flash , which seemed to have solved it. In the end I erased it basically before every upload.
This is must when you are building bluetooth app.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#65 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJ2EZC63EH42R77TCMPHLLRT7IKLANCNFSM4NNDS4XA>.
|
This issue was just resolved in commit 4c798fe. |
MVCE
Logging:
... and then just "hangs"
The text was updated successfully, but these errors were encountered: