polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
449 stars 147 forks source link

How can I set the localtime of the polar with uuids? #348

Closed Arthur-HITLab closed 1 year ago

Arthur-HITLab commented 1 year ago

Platform your question concerns:

Device:

Description: I'm writing a simple ECG recorder in python using the bleak library. I can get the ECG data by writing to the PMD service. To get accurate timestamps I want to set the local time on the polar. However using the the raw uuids I get the error that the ble attribute to read the current local time needs authentication. I can write to RFC77_PFTP_MTU_CHARACTERISTIC to ask for the current time but not subscribe on RFC77_PFTP_D2H_CHARACTERISTIC to receive it.

Arthur-HITLab commented 1 year ago

I found out why, I had to call client.pair() before subscribing on the UUID.