Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polar H10 Signals

Minimal integration code for getting Polar H10 signal payloads into your own apps. This repository is not a recorder, dashboard, Quest app, Windows app, or Unity project. It is a small set of reusable protocol packages and source bridges for host apps that already own their UI, permissions, storage, and transport choices.

What It Covers

  • Standard BLE Heart Rate Measurement notifications: heart rate and RR intervals.
  • Polar PMD control-point commands: get settings, start stream, stop stream.
  • Polar PMD ECG frames: 24-bit signed microvolt samples.
  • Polar PMD accelerometer frames: uncompressed X/Y/Z milli-g samples.
  • Shared event names for broker, LSL, OSC, file, or in-app routing.

Raw PMD streams should be treated as a single-owner BLE path. If a Windows process, Android phone, Quest headset, or Unity plugin owns PMD, other tools should observe routed events rather than opening a second raw PMD owner against the same strap.

Packages

Package Purpose
packages/rust/polar-h10-signals Pure Rust protocol crate: UUIDs, HR/RR decoder, PMD command builders, ECG decoder, ACC decoder, event structs.
packages/dotnet/PolarH10.Signals .NET protocol package for Windows capture tools, Unity C# glue, and test harnesses.
packages/android-kotlin Source-only Android/Quest Kotlin bridge for framework BLE callbacks and PMD command writes.
packages/unity Unity-side event DTO and integration notes for consuming Android plugin or broker-routed H10 events.

Minimal Flow

  1. Scan for a BLE device advertising the Heart Rate Service or Polar PMD service.
  2. Connect with the host platform's BLE API.
  3. Request a larger MTU when the platform allows it. 232 is a practical first candidate for PMD ECG/ACC frames.
  4. Enable Heart Rate Measurement notifications on 0x2A37.
  5. Enable PMD Control Point indications and PMD Data notifications.
  6. Pass Heart Rate Measurement payloads to the HR/RR decoder.
  7. Query PMD settings, then write start commands for ECG and/or ACC.
  8. Pass PMD Data notifications to the ECG or ACC decoder based on measurement type byte.

The code exposes command builders for ECG and ACC, but host apps still own connection policy, Android runtime permissions, Unity plugin wiring, Windows capability declarations, reconnect behavior, clock alignment, and storage.

Rust Example

use polar_h10_signals::{
    build_start_acc_request, decode_heart_rate_measurement, decode_pmd_data_frame,
};

let hr = decode_heart_rate_measurement(&heart_rate_payload)?;
let start_acc = build_start_acc_request();
let pmd = decode_pmd_data_frame(&pmd_data_payload)?;

.NET Example

using PolarH10.Signals;

HeartRateReading hr = PolarH10Protocol.DecodeHeartRateMeasurement(heartRatePayload);
byte[] startEcg = PolarH10Protocol.BuildStartEcgRequest();
PmdDataFrame frame = PolarH10Protocol.DecodePmdDataFrame(pmdDataPayload);

Android / Quest Example

val bridge = PolarH10AndroidBridge()
val chars = bridge.findCharacteristics(gatt)
val writes = bridge.subscriptionWrites(chars)
val event = bridge.decodeCharacteristicEvent(characteristic, value)

Source Trail

This repo follows the publication style used by the existing PolarH10 and Rusty XR work: protocol bytes are tied back to public source notes instead of being presented as unexplained constants. Start with:

  • docs/protocol-sources.md
  • docs/platforms.md
  • docs/event-schema.md

Validation

cargo fmt --all --check
cargo test --workspace
dotnet build .\packages\dotnet\PolarH10.Signals\PolarH10.Signals.csproj

Boundaries

This repository is independent and is not affiliated with Polar Electro. It is not medical software. It does not include raw captures, private study logic, private app package identities, or generated platform binaries.

About

Minimal Polar H10 HR/RR, PMD ECG, and PMD ACC signal integration packages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages