-
Notifications
You must be signed in to change notification settings - Fork 344
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
Unable to reconnect after disconnecting #439
Comments
I am having the same issue. |
I have also encountered this problem with IOS issue #411 |
@riccardocescon yes I saw this issue but I'd rather stay up to date while developing my new app but most of all if this bug also happens with the example app it's worth mentioning :) |
I agree. Just for testing can you try out to use that version and see if it works or if it still fail? So we know if that issue is related or not |
I'm having trouble building the 3.1.1 version for now. Could it be cause by my env (like Xcode's version, 13.1)? Here's part of Xcode's output:
|
It may be, i remember i had issues similar to this one. You can fix those issue with xCode helper (fix button) and then try building again |
Versions of this library below <4.0.0 do not work with XCode13 since apple introduced breaking changes in version 13. I will check if I can reproduce this behaviour in the weekend |
I can reproduce the issue locally the issue is introduced by #406 . I will spend some time on fixing it and if I cannot fix it this weekend I will revert and publish a new version. |
Being quite a beginner on Dart, I'm not sure how this works and if it could help, but while trying out some stuff, I realized that listening to the |
@remonh87 Indeed, this is due to the buffering: because an app initiates a disconnection by unsubscribing from a device-specific connection status stream, there is no event sink at the platform side when the "disconnected" event is reported by the system, thus it gets buffered and replayed from the buffer whenever a listener appears. And a listener appears when the app is initiating another connection. @R-Emagina Good observation, and it's coherent with the above hypothesis: the app can drain the connection status buffer by listening to the multiplexed connection status stream, thus avoiding that erroneous event replay. This is, of course, a workaround. There is an issue in the library now. |
fixed with version 5.0.2 |
Thanks a lot, I will try it out this afternoon! |
I verified this has been fixed for me in 5.0.2. Thank you so much for taking care of this critical bug so quickly! |
Describe the bug
Using the example code, I'm unable to reconnect to a BLE device once I've connected and disconnected from it.
To Reproduce
Steps to reproduce the behavior:
Using the example code on iOS 14.4:
I've tried the same flow with an other device (Bose headset) and the behavior was the same.
I've tried the same flow with nRF Connect and had no issue connecting&disconnecting endlessly.
Expected behavior
Should be able to reconnect to device
Smartphone / tablet
Peripheral device
The text was updated successfully, but these errors were encountered: