关于Polar H10读取心率测量特征(0x2A37)多RR值的技术咨询
Great question! Let's break this down step by step using your example packet and the BLE Heart Rate Service spec.
首先解析你的示例数据包:10 49 5e 03 96 03
Let's unpack each component clearly:
- Flags (
0x10): Binary00010000— the 4th bit (bit 3, since we count from 0) is set, which tells us the packet includes RR intervals. Also, bit 0 is 0, meaning RR intervals are stored as 16-bit unsigned integers (uint16) with units of 1/1024 seconds. - Heart Rate Value (
0x49): This is an 8-bit unsigned integer, so that translates to 73 BPM. - RR Intervals: BLE uses little-endian byte order for multi-byte values, so we need to reverse each pair of bytes to get the correct uint16 value:
- First RR pair
5e 03→0x035e= 862. Convert to milliseconds:862 / 1.024 ≈ 841.8 ms - Second RR pair
96 03→0x0396= 918. Convert to milliseconds:918 / 1.024 ≈ 918.0 ms
- First RR pair
Why are there multiple RR values in one packet?
Polar H10 samples your heart rhythm continuously (it’s a 1000Hz sensor, so it detects R-wave peaks with high precision). However, BLE notifications have a maximum transmission frequency (you can adjust this on the H10, but defaults are usually 1-2 seconds per notification).
If the time between BLE notifications is longer than your average RR interval, the sensor will collect all the RR intervals it detected in that window and pack them into a single notification. For example, with a 73 BPM heart rate, your average RR is ~822ms. If notifications are sent every 1.5 seconds, that window will capture 2 full RR intervals — hence two values in the packet.
Extracting HRV from these values
HRV relies on a continuous, ordered sequence of RR intervals, so here's what you need to do:
- Every time you receive a notification, extract all RR intervals (in the order they appear) and convert them correctly (don’t forget the little-endian byte order and 1/1024 second unit).
- Append these RR values to a running list of intervals — don’t discard any, even if they come in batches.
- Once you have enough data (for standard HRV metrics like SDNN, you’ll want at least 5 minutes of resting data; for short-term metrics like RMSSD, even 30 seconds works), calculate your desired HRV features:
- SDNN: Standard deviation of all RR intervals in the sequence
- RMSSD: Root mean square of the differences between consecutive RR intervals
- pNN50: Percentage of consecutive RR interval pairs where the difference is greater than 50ms
内容的提问来源于stack exchange,提问作者Dina Nashaat

