-
Notifications
You must be signed in to change notification settings - Fork 149
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
Resume advertising after the disconnect #57
Comments
Hi, I'm having the same issue as you have mentioned here. However I'm struggling to see how to apply the fixed code that you have quoted. the contents of
|
i created this PR to address this, and I have used this for a while, it's quite stable after this change. |
Awesome, thank you for clarifying. I think i was close but was missing the final piece to get it working reliably. Its also helped me solve connecting one "Mouse" to multiple clients, by appending the same snippet into the |
I just tried your patch, and also found things work much better this way - random and intentional disconnects all seem to be handled gracefully with it in place. |
It occurred to me, sometimes the mouse gets disconnected. And afterwards we can't initialize the connection anymore. So I dug into the code and learned from another bluetooth server code. Can I suggest to add the following lines to the disconnect code.
In our repo, it'll be inside
BleConnectionStatus
. I can raise a PR if you think this is not a bad idea, I can even add a flag to enable/disable it.The text was updated successfully, but these errors were encountered: