-
Notifications
You must be signed in to change notification settings - Fork 34
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
Bug with connection #120
Comments
I've encountered the same problem, solved it using a However, I feel a suspending connect function is not a good design, as there is no proper way to close the gatt without its reference, see #135 |
Hi, |
any update on this? tried following the documentation outlined in the README and experiencing the same exact thing. @philips77 Thanks for all your help. |
@0x7061 Could you maybe provide some example of how you solved this issue with connecting to the ble device using |
@asiljan Others may have better solutions but here is an example of what you could do. Obviously this is specific to our needs but you can play around with it and adjust as needed.
|
In the tutorial, you say that the
connect
function is suspended and waits until device is in connected state, but it's not true. I've got the exception STATE_DISCONNECTED when callingdiscoverServices
right afterconnect
.To solve this problem, I use callbacks instead of relying on the described behavior above.
This happened because BLE asynchronous itself under the hood. Could we fix API or make clear documentation?
The text was updated successfully, but these errors were encountered: