polarofficial / polar-ble-sdk

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

PPG signal/sdk mode #438

Open jacobostapenko opened 4 months ago

jacobostapenko commented 4 months ago

Platform your question concerns:

Device:

Description: I am trying to stream PPG, PPI, ACC from verity sense but I am only getting the PPI signal. Anyone know why this could be happening?

I also tried to enable SDK mode through python, using this as guidance: "to enable the SDK mode you send command [0x02, 0x09] where the 0x02 = Request Measurement start and 0x09 = SDK Mode to disable the SDK mode you send command [0x03, 0x09] where the 0x03 = Request Measurement stop and 0x09 = SDK Mode"

but I get a Bleak Error saying that action isn't allowed. is there another way to enable sdk mode?

jimmyzumthurm commented 4 months ago

Hi @jacobostapenko

For PPG and ACC you would need to pass settings alongside as part of the start command. For accelerometer sampling rate, range, number of channels and resolution. For PPG the same except the range. PPI has no settings so maybe that is why command is going through but not the others.

The command sent to enable / disable SDK mode seems correct, but note if you are using Verity Sense 2.1.0 version or later, you need to first stop all measurements before you can enter SDK mode. Also note that PPI is not available in SDK mode as SDK mode doesn't have any Polar algorithms running.

"if the online stream or offline recording is currently running on the device, the SDK Mode cannot be changed. Attempting to change the SDK Mode in will result in an "INVALID STATE" error." : https://github.com/polarofficial/polar-ble-sdk/blob/master/documentation/SdkModeExplained.md