-
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
startNotification sometimes throws Peripheral not connected or code 133 #1003
Comments
@fudom perhaps see if the summary from here has any hints. Specifically, I'd recommend either:
|
Thanks for the advice. We always need to scan before connect. Otherwise, some information are missing (e.g. name) or connection will fail. I love Bluetooth/BLE on Android and its quirks. ;-) Anyway... Btw. another error I get is It would be great if we got a success callback upon successful subscription to the notification. I return A workaround on my side could be to wait a certain amount of time for an error. And continue (resolve/return) if timed out as "ok". One idea could be, that the first success callback is for successfully started. But other ideas are welcome. I only want return on a working notification. I would retry the startNotification on error. Maybe with reconnect. Just to avoid an invalid state. Btw. I use the awesome-cordova-plugins wrapper for Ionic/Angular. |
This is possible, by using |
Ok thanks, I'll give this a try and will bypass the outdated plugin wrapper for TypeScript. I wish all Cordova plugins would provide strong types for TypeScript and use modern methods like Promises (async/await) and Observable. Then we wouldn't need wrappers. Anyway... Btw. I see some related issues: This includes the option I'm closing the issue for now, although I can't reproduce the error and so can't say for sure if it works. But it looks like it's exactly what I wanted. Getting the status of startNotification. Thanks again. |
We use startNotification after BLE connect (incl. scan before) on app start. It works. But sometimes it fails with error:
or
Tested on Android 8.1 and other versions.
Error 133 (0x85) is GATT_ERROR. But the reason or source is not clear. Any experience with that?
The text was updated successfully, but these errors were encountered: