Open orestesgaolin opened 9 months ago
Hello,
Thanks for reporting this, I have created an internal ticket for further investigation.
Best regards, Samuli
Hi @orestesgaolin , Have you noticed this still ? I had thoughts about this and to me that case could occur if Verity Sense has dual-connection enabled, and Flow App or any other app / device has authenticated connection ongoing with the device (required to use PSFTP-MTU characteristic), and the 3rd party SDK application is also connected to device in a separate connection but it has just a normal non-authenticated connection (Verity Sense can have only 1 authenticated connection at a time, even with dual connection. This is used for example for HR service that has M1L1 security requirement so you can use Flow for sync and a wrist unit to get HR from the band). In that case the 3rd party app wouldn't the access rights to access this service (I'm guessing here it happened when trying to read offline recording files, which is using PSFTP-MTU)
It could also be possible if you try to read offline recording file before the SDK has enabled notifications for that characteristic. Maybe this function could be used : https://github.com/polarofficial/polar-ble-sdk/blob/c505d8fc3a0388dd27c406cda66b62bc567e43d7/sources/Android/android-communications/library/src/main/java/com/polar/androidcommunications/api/ble/model/gatt/client/psftp/BlePsFtpClient.java#L207 and only after that is called you could try to access this service.
Yes, we can see this happening in the wild across variety of Android devices.
Is there any way to check if the band is connected to the Polar Flow/maintains authenticated connection? I will try to reproduce it on my devices. Funnily, I try to avoid using Polar Flow on my dev devices, but maybe I should've done this more often.
I'm going to check the clientReady()
, thanks for the tip! Will report later
Unfortunately I have no Android knowledge and I don't know if it possible to detect such thing. Usually Flow App doesn't maintain connection with Verity Sense for long as Verity Sense disconnects automatically from it after syncing data, but I don't know if from Android SDK you can detect that. I'm guessing usually Android would try to raise the security level of the connection automatically when trying to access a service characteristic that requires it, but I don't know if a failure could be detected and act upon. At least I'm guessing the BlePsftpClient clientReady
could be a way of detecting that as in theory this shouldn't be called unless you have authenticated connection with the device.
@samulimaa Might have better understanding and guidance about that matter.
Hey there, just wanted to clarify the difference between authenticated connection and non-authenticated.
When we use Polar SDK's polarBleApi.connectToDevice(id)
is that going to use the authenticated connection? What would be the example of non-authenticated connection? Would just listening to HR service broadcast be considered non-authenticated?
Platform on which you observed the bug:
Device on which you observed the bug:
Describe the bug
We see a lot of following exceptions and are not sure whether this is issue in how we use the SDK, or SDK itself. We believe this line is related to this error. Checked all the subscriptions to Polar SDK and each is being disposed when no longer used.
Screenshots and logs
Platform: Android Version: 5.1.0