-
Notifications
You must be signed in to change notification settings - Fork 609
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 13 disconnects on first connect attempt to paired device after app restart #956
Comments
Hi @xalepo4 How long are you leaving the app between closing and opening again? Are you able to confirm from the peripheral side that the phone is actually disconnecting? There's been a few reports across both this plugin and others now of peripheral disconnect errors surfacing on Android 13, so clearly something has changed there in the OS. As a fallback, are you able to retry the connection within the app by calling |
Oh, if possible, grabbing a copy of the adb logs (e.g., |
Ok, I collect logs today and I attach it here. |
Here I attach de logcat output when I try to connect with BLE device. |
Hello @peitschie , any new about the problem? |
@xalepo4 I'm away on a vacation at the moment. It'll be about 1.5 weeks before I have a chance to dig into this further. |
@xalepo4 Is it possible to grab an equivalent debug.txt log from the working version? Just to confirm, when you say "close the app", are you meaning when you swipe it up to kill the app in the background, or merely pushing the app into the background, but leaving it running? Looking through the logs, there seems to be this reason coming up a lot:
There is no calls made by the plugin here as far as I can tell to cause the disconnect... it's Android itself deciding the GATT connection has dropped, and I don't really see how the plugin can change this. I wonder if there's perhaps some difference in the default connection intervals between Android versions. E.g., on connection with this version, we find:
These connection parameters control how long a drop-out in packets can be handled before the connection is judged as disconnected. |
After testing my application a lot, I discover that the problem occurs by some misterious behaviour in Android 13 when I try to connect with my device and the phone has an smartband paired. It seems that Android use the same handle for the smartband and my device. If no smartband paired, the connection works fine. |
That's extremely surprising! Impressive investigating skills 🙂 ... thanks for sharing the discovery. |
Hello,
I'm using the plugin with ionic for connect to an EV charger application. On Android devices < 13 all is fine. On Android 13, I can pair with the device but when I close the app and open it again, always get Peripheral disconnected and I cannot get data from the device.
Any ideas?
Thanks
The text was updated successfully, but these errors were encountered: