-
Notifications
You must be signed in to change notification settings - Fork 607
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
Failed to subscribe to notification (sometimes) #1027
Comments
Hi @graphefruit Which version of the plugin are you running with this? Is there any chance you can test a build with the current alpha version ([email protected])? There's been a commit recently that might make it more obvious if there's a service discovery failure going on here: 28a6103 |
Hey @peitschie, I guess the error is passed to cordova, so I can rightly log it correct? |
@peitschie sad news :( Can I do something to send you debugging helps? (Shall I create a new ticket aswell?) |
Hi @graphefruit Grabbing debug logs on iOS is very difficult, unfortunately. The fact this is intermittent with the same version of the plugin does point towards something about the peripheral causing issues with iOS, rather than the plugin itself here having any issue. It's worth checking if another BLE app has the same issue (e.g., nrf Connect) as this would hint much more strongly at a peripheral issue. |
Good Morning @peitschie ! Maybe I wrote a bit miss understanding, sorry for this, I'll try to clear it: Scale 1: On 1.7.4 it connects and the app can retrieve the send weight from the scale. Scale 2: On 1.7.4 it connects and the app can retrieve the send weight from the scale. The Acaia Pearl S was the scale which had issues that sometimes the App can't connect to the notifications and needed a reopening of the app completly. Cause of Scale 1: It somehow points out the fact that something was changed in the version, which now makes somehow issues with attaching to the notification and get all data to handle. Thanks for your help! |
Hello together, @peitschie :)
(first of all, sorry for taking that long to open up the ticket)
I wanted to say that I'm deeply thankful for your support here and making this awesome plugin, maintaining it so wonderfull and helping us all out! THANKS!!!!
To the situation:
Somehow I got a bluetooth scale which is doing strange things on customers side.
Most of the times, the app can connect to the bluetooth scale.
But sometimes, the app can't connect to the bluetooth scale.
The issue comes from the ble.startNotification
"DEFAULT: [\"failed to subscribe to notifications \\\"Could not find service with UUID 49535343-fe7d-4ae5-8fa9-9fafd205e455 on peripheral with UUID 140FC66D-B212-05F1-F5C1-2A285331FC85\\\"\"]",
If the user restarts the app, then the app can connect to the given UUID and Notification ID.
Also to mention that when trying to
ble.connect
again after some seconds and try again toble.startNotification
don't resolve the issue, you realy need to restart the app.I've also tried to add a timeout with 150ms before calling ble.startNotification but this doesn't help either.
Adding to this, when the connection fails, I set a timeout, I search for the device again, and just when its found I try to connect and give also there needed timeouts.
Do you have any ideas why this behaves that strange?
Furthermore heres a screenshot of two logfiles: The left side where the connection works without any issues, the right one where the notification fails:
Thanks for your great work and your awesome support!
Lars
The text was updated successfully, but these errors were encountered: