Bluetooth Low Energy Heart Rate Service Profile and Service Analysis

Introduction

Bluetooth Low Energy (BLE) provides a standardized Heart Rate Service, designed for fitness applications to transmit heart rate data from a sensor device to a collector, such as a smartphone or smartwatch. This service is defined by two primary documents: the Heart Rate Profile and the Heart Rate Service specification. The Profile outlines the roles of devices and the connection procedures, while the Service defines the data format and characteristics.

Heart Rate Profile

The Heart Rate Profile defines the roles and communication procedures for devices involved in heart rate monitoring.

Device Roles

  • Heart Rate Sensor: This device measures heart rate and acts as a GATT Server. It broadcasts its presence and provides the Heart Rate Service.
  • Collector: This device, typically a smartphone or computer, acts as a GATT Client. It discovers the sensor and subscribes to receive heart rate data.

Profile Requirements for the Heart Rate Sensor

  • Must include the Heart Rate Service UUID (0x180D) in its advertising packets.
  • Should include a local name in both advertising and scan response data.
  • May support a function to modify the device name.
  • May include a manufacturer-specific data string in the advertising packet.

Profile Requirements for the Collector

  • Must be capable of discovering primary services and characteristics, either by enumeration or by using specific UUIDs.
  • Must be able to control and receive notifications for heart rate data.
  • Must interpret the Flags field within the Heart Rate Measurement characteristic to determine data format, presence of energy expended data, and presence of RR-Interval data.

Connection Procedures

The connection process varies based on whether the devices are bonded and the current state.

Unbonded Heart Rate Sensor

  • Uses General Discoverable mode and connectable undirected advertising events.
  • If a bond is created, the sensor's controller should add the collector's Bluetooth address to a whitelist and set the advertising filter policy to process scan and conneciton requests only from the whitelist.
  • If no heart rate activity is detected for a period (e.g., 10-20 seconds), the sensor should terminate the connection and power down.

Bonded Heart Rate Sensor

  • Uses General Discoverable mode and connectable undirected advertising.
  • For the first 10 seconds, it should use a whitelist containing only the bonded device's address to allow only the active collector to connect. After this period, it should stop using the whitelist to allow connections from other collectors.

Reconnection After Disconnection

  • The sensor should re-enter the General Discoverable mode to reconnect with the collector.

Unbonded Collector

  • Uses the GAP General Discovery procedure to find heart rate sensors.

Bonded Collector

  • Can use one of several GAP connection procedures based on its needs:
    • General Connection Establishment: Discovers and connects to sensors without using a whitelist.
    • Direct Connection Establishment: Connects to a specific, known sensor.
    • Automatic Connection Establishment: Automatically connects to sensors in its whitelist.
    • Selective Connection Establishment: Discovers sensors and connects, using a whitelist.

Heart Rate Service

The Heart Rate Service (UUID: 0x180D) exposes heart rate and related data. Its primary characteristic is the Heart Rate Measurement characteristic.

Heart Rate Measurement Characteristic

This characteristic is variable in length and contains the core heart rate data.

  • The first byte is the Flags field, indicating the presence of optional data and supported features.
  • The second byte is the Heart Rate Value.
  • Subsequent bytes may contain optional fields for Energy Expended and RR-Interval.

Flags Field Definition

The 8-bit Flags field is defined as follows:

  • Bit 0: Heart Rate Value Format. 0 = 8-bit, 1 = 16-bit.
  • Bits 1-2: Body Sensor Location and Contact Status. Bit 2 indicates support for contact detection. Bit 1 indicates the current contact status (0 = not in contact, 1 = in contact).
  • Bit 3: Energy Expended Status. Indicates if the Energy Expended field is present.
  • Bit 4: RR-Interval. Indicates if RR-Interval values are present.
  • Bits 5-7: Reserved for future use, must be set to 0.

Data Field Definitions

  • Heart Rate Value: The measured heart rate. An 8-bit value is sufficient for heart rates below 255 bpm, optimizing power consumption.
  • Energy Expended: The cumulative energy burned, measured in kilojoules (kJ), with a maximum value of 65535 kJ.
  • RR-Interval: A variable-length array representing the time between consecutive heartbeats. The number of intervals transmitted is constrained by the ATT_MTU size and the presence of other data fields.

Data Transmission Intervals

  • The Heart Rate Measurement characteristic is typically notified once per second, including the heart rate value and, if supported, the RR-Interval values.
  • If supported, the Energy Expended field is usually included in the notification approximately every 10 seconds. The transmission intervals are determined by the server and are not configurable by the client.

Tags: Bluetooth BLE GATT HeartRateService UUID

Posted on Mon, 24 Aug 2026 16:52:06 +0000 by smokinjoe