Skip to main content

healthrian_ble_support_for_p30 3.0.0 copy "healthrian_ble_support_for_p30: ^3.0.0" to clipboard
healthrian_ble_support_for_p30: ^3.0.0 copied to clipboard

Healthrian BLE support library for the Hativ P30 (6-channel ECG).

healthrian_ble_support_for_p30 #

Healthrian BLE support library for the Hativ P30 ECG device, built on healthrian_ble_interface. It is a thin device-configuration layer: the generic ModuleBle / ModuleMonitor transport and streaming come from the interface; this package only supplies the P30's UUIDs, command framing, and packet parsing.

Device profile #

  • Scan filter: advertised name starts with Hativ.
  • Channels: 6 — the device streams 2 physical leads (L1, L2) and the remaining four limb leads (L3, aVR, aVL, aVF) are derived. No precordial (V1–V6) leads.
  • Sampling: 250 Hz, 20 samples per BLE notification (24-bit signed, big-endian, scaled to mV).
  • Command framing: [0xBB, 0xCC, length, ...payload] (no CRC). ECG start = 0x10, stop = 0x11.
  • Power-on: set mode BB CC 02 0A 01, then a BB CC 01 FF keep-alive every 2 s — the P30 sleeps without it. Declared as commands (setMode, powerOnMode, keepAlive, keepAliveInterval) and driven by ModuleBle.powerOn(), which registerCharacteristics runs on every connect. Consumers do not have to write these packets themselves.
Characteristic UUID
CONTROL_POINT 00002CF0-0000-1000-8000-00805F9B34FB
MEASUREMENT_ECG 00002C07-0000-1000-8000-00805F9B34FB
LEAD_STATE_ECG 00002C00-0000-1000-8000-00805F9B34FB
BATTERY_LEVEL 00002A19-0000-1000-8000-00805F9B34FB
FIRMWARE_VERSION 00002A26-0000-1000-8000-00805F9B34FB
SERIAL_NUMBER 00002A25-0000-1000-8000-00805F9B34FB

Usage #

import 'package:healthrian_ble_support_for_p30/healthrian_ble_support_for_p30.dart';

final manager = BLEManager(); // singleton

// Runs the P30 power-on sequence (set mode + 2 s keep-alive) on its own.
await manager.connectAndRegister(targetDevice: deviceId);
await manager.initializeStreams();
await manager.startMeasurement();

// 6-channel converted samples [channel][sample]
manager.ble.streams.ecg.meta.value?.listen((channels) {
  // channels[0]=L1, [1]=L2, [2]=L3, [3]=aVR, [4]=aVL, [5]=aVF
});

manager.ble.streams.ecg.meta.leadState?.listen((state) { /* electrode contact */ });

await manager.stopMeasurement();
await manager.disconnectDevice();
0
likes
160
points
302
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Healthrian BLE support library for the Hativ P30 (6-channel ECG).

Homepage
Repository

License

MIT (license)

Dependencies

healthrian_ble_interface

More

Packages that depend on healthrian_ble_support_for_p30