The Bluetooth Special Interest Group has a standardized GATT (Generitt ATTribute Profile) for heart rate monitors called the Heart Rate profile. (You can see a list of all the GATT services here.)

This defines the commands and data that can be exchanged between the heart rate sensor device and the client device such as a phone, tablet, or BLE capable microcontroller (like we'll use in our project).

If you want to see how the Bluetooth SIG defines a GATT, such as the Heart Rate Service, you can look at the official XML file here.

Even better, run that URL through a code beautifier, such as for a more human-readable version.

Heart Rate Characteristics

The Heart Rate service defines a three characteristics that can be served from the heart rate monitor (HRM) to a connected device.

Heart Rate Measurement

The most important for most needs is the Heart Rate Measurement Values characteristic which serves up the following information:

  • Heart rate, in beats per minute (BPM)
  • Contact -- if the device is in contact with the body or not
  • Energy Expended, in kilojoules
  • RR Intervals in 1024ths of seconds -- this is the measurement of intervals between beats
Not all heart monitors support all of the above characteristics, so it isn't uncommon to see 'None' returned for certain values.

Body Sensor Location

Heart rate monitors will also include a characteristic for the intended location of the monitor on the body. This is built into the sensor firmware, not something that the device is determining on the fly! Standard values include:

  • Wrist
  • Chest
  • Finger
  • Hand
  • Ear Lobe
  • Foot
  • Other

Heart Rate Control Point

If the HRM includes the Energy Expended feature, the heart rate control point characteristic is used to allow the client device to write control points to the HRM.

nRF Connect View

We can use the nRF Connect app from Nordic on iOS and Android to connect to a heart rate monitor and look at the service, characteristics, and data.

When we first connect to the device, we can see some data advertised including the device name, available services, connection parameters, manufacturer name, revision number, and more.

In this image we can see the HRM device (RHYTHM+) has been connected, and the Heart Rate Measurement characteristic is reporting its data. 

If we request a read of the Body Sensor Location characteristic, we receive it as shown here:

This guide was first published on Feb 05, 2020. It was last updated on Jul 19, 2024.

This page (Heart Rate Service) was last updated on Mar 08, 2024.

Text editor powered by tinymce.