-
Notifications
You must be signed in to change notification settings - Fork 85
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
[Android] Error "Device is not connected" on Write o Read any characteristic #668
Labels
bug
Something isn't working
Comments
A disconnect can also be triggered by the peripheral. When connecting you can pass an optional onDisconnect callback, see https://github.com/capacitor-community/bluetooth-le?tab=readme-ov-file#connect. Is this callback called between the successful connection and your read or write attempt? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Detailed Description of the Issue
Issue Summary:
After successfully connecting to a BLE device using the @capacitor-community/bluetooth-le plugin in an Ionic 7 Angular application, attempting to read or write characteristics returns an error stating "device is not connected." This issue occurs even though the initial connection appears to be successful.
Steps to Reproduce:
Observed Behavior:
The device connects successfully, as confirmed by the connection logs.
Upon attempting to read or write a characteristic, an error is thrown indicating that the device is not connected.
Expected Behavior:
After a successful connection, reading from or writing to a characteristic should succeed without errors.
Additional Context:
The issue seems to be intermittent, as the connection is initially established but subsequent read/write operations fail.
Adding delays and retry logic does not resolve the issue.
This issue occurs on multiple Android devices and versions.
Environment:
Ionic Version: 7
Capacitor Version: 6.0.0
BLE Plugin Version: "@capacitor-community/bluetooth-le": "^6.0.0"
Pls Help
The text was updated successfully, but these errors were encountered: