polarofficial / polar-ble-sdk

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

Can't access Accelerometer Data iOS #365

Closed benmarinic closed 1 year ago

benmarinic commented 1 year ago

Platform your question concerns:

Device:

Description:

I've rolled my own Polar H10 interface in Swift / CoreBluetooth - without using the SDK.

I'm able to get the BPM and RR data streaming through no problem and have it running for several days for a study without issue.

I can't however get any Accelerometer data which I need to capture at the same time as the RR data. I can see the following services and characteristics are available:

     Characteristic found: 2A37 for service: 180D
     Characteristic found: 2A38 for service: 180D
     Characteristic found: 2A29 for service: 180A
     Characteristic found: 2A24 for service: 180A
     Characteristic found: 2A25 for service: 180A
     Characteristic found: 2A27 for service: 180A
     Characteristic found: 2A26 for service: 180A
     Characteristic found: 2A28 for service: 180A
     Characteristic found: 2A23 for service: 180A
     Characteristic found: 2A19 for service: 180F
     Characteristic found: 6217FF4C-C8EC-B1FB-1380-3AD986708E2D for service: 6217FF4B-FB31-1140-AD5A-A45545D7ECF3
     Characteristic found: 6217FF4D-91BB-91D0-7E2A-7CD3BDA8A1F3 for service: 6217FF4B-FB31-1140-AD5A-A45545D7ECF3
     Characteristic found: FB005C81-02E7-F387-1CAD-8ACD2D8DF0C8 for service: FB005C80-02E7-F387-1CAD-8ACD2D8DF0C8
     Characteristic found: FB005C82-02E7-F387-1CAD-8ACD2D8DF0C8 for service: FB005C80-02E7-F387-1CAD-8ACD2D8DF0C8
     Characteristic found: FB005C51-02E7-F387-1CAD-8ACD2D8DF0C8 for service: FEEE
     Characteristic found: FB005C52-02E7-F387-1CAD-8ACD2D8DF0C8 for service: FEEE
     Characteristic found: FB005C53-02E7-F387-1CAD-8ACD2D8DF0C8 for service: FEEE

I believe the accelerometer data comes over the PMD stream? I've tried all of the combinations above but never get a notify update in the delegate. Only for the BPM and RR below.

let polarH10ServiceUUID = CBUUID(string: "180D") // works
let heartRateMeasurementCharacteristicUUID = CBUUID(string: "2A37") // works

I'm using a new H10 (purchased new last month).

Any clues greatly appreciated.

Thanks,

Ben

andYgnite commented 1 year ago

Hi @benmarinic ACC data comes over PMD stream.

SDK is here to help. You can get inspired by our demo example: https://github.com/polarofficial/polar-ble-sdk/blob/master/examples/example-ios/iosBleSdkTestApp/iosBleSdkTestApp/PolarBleSdkManager.swift