> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/sensor-setup/bluetooth-low-energy-ble-devices.md).

# Bluetooth Low Energy (BLE) devices

Connect a Bluetooth Low Energy heart rate sensor such as the Polar H10 to iMotions Lab, then record and analyze its heart rate and R-R interval data.

*This article will show you how to connect to and collect data from a Bluetooth Low Energy device, i.e. heart rate data from the Polar H10*

## Bluetooth Low Energy (BLE) Overview

BLE is a wireless communication protocol used by many consumer-grade hardware devices. Compared to classic Bluetooth, BLE was developed to reduce energy consumption while maintaining the communication range. BLE has become increasingly popular for streaming of e.g. heart rate data from smart watches and fitness belts.

Starting from version 8.2 of iMotions it is possible to connect and collect data from some Bluetooth Low Energy devices (BLE). The current integration allows iMotions users with an active ECG module to collect heart rate data from a range of BLE heart rate sensors. iMotions integration follows the GATT specifications for the BLE heart rate service, which can be found [here](https://www.bluetooth.com/specifications/specs/heart-rate-service-1-0/).

Any device that broadcasts heart rate via BLE and follows the GATT standard can be connected to iMotions. Other devices like GPS trackers, accelerometers, EDA sensors etc. that also broadcast data via BLE are currently not supported.

## BLE Heart Rate Data

iMotions supports BLE sensors that broadcast Heart Rate measurements in accordance with the GATT standard for this service. Which signals have values depends on the sensor.

| Signal          | Unit   | Description                                                                                                                                                                                           |
| --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Heart rate      | bpm    | Sent by all heart rate sensors.                                                                                                                                                                       |
| R-R interval    | ms     | Time between R peaks, used to calculate heart rate variability (HRV). Each interval is a sample of its own, timestamped when its beat ended. 0 when the sensor sent a heart rate without an interval. |
| Energy expended | kJ     | Estimated energy expenditure at the current heart rate. Empty if the sensor does not send it.                                                                                                         |
| Contact         | 0 or 1 | Whether the sensor detects contact with the skin: 0 no contact, 1 contact. Empty if the sensor cannot detect contact.                                                                                 |
| Battery         | %      | Battery charge level, read once a minute. Only for sensors that report their battery level.                                                                                                           |

{% hint style="warning" %}
In BLE recordings made with iMotions Lab 11.1.16 and earlier, **R-R interval** values are in units of 1/1024 s rather than milliseconds, so they read about 2.4 % high. HRV results from those recordings differ by the same amount from results of recordings made with later versions, so do not compare or pool them directly.
{% endhint %}

## Connecting BLE Devices to iMotions

1. Go to Global Setting -> Sensors, then click "New Device".

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-62e963f3291c1e072f52d4f13e8d1ad97c0779ff%2F726326f6f1_image-1711531228257.webp?alt=media)

2. Add a Bluetooth Low Energy device and give it a name. In the example here we are using a Polar H10 band, so in this case we chose to name the sensor Polar H10, then click "save"

![Name.jpg](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-74e4347059ef25fd82a0818bd85ea8153154d9c9%2Fee05fd4095_name.webp?alt=media)

3. Make sure the device is switched on and in range, click **Discover** and select the device in the **Devices** list. iMotions reads the device's services and selects the data streams it can record, heart rate and battery level, which are marked **(Data stream)**. Device information, such as the manufacturer and firmware version, is shown greyed out. It cannot be selected and is saved with every recording as sensor information. If the services cannot be read, make sure the device is on and in range and click **Refresh**.
4. To keep collecting data when the device goes out of range or is switched off for a while, select **Reconnect automatically if the connection is lost**. It is off by default.
5. Make sure **Enable data collection** is selected and click **OK**.

## Collecting data with a BLE Heart Rate device in iMotions

Once you have enabled the BLE device as a sensor you will be able to verify the data being sent by the device. Its widget shows the sensor's name and ID, the battery level, the heart rate and the sensor state. The Polar H10 sends a new sample about once a second, so the sampling rate is about 1 Hz. This differs between sensors, and we have tested sensors with a 5 Hz sampling rate.

If the connection to the device is lost, the widget shows **Reconnecting…** when **Reconnect automatically if the connection is lost** is selected, and **Connection lost** otherwise. With the setting selected, iMotions keeps trying to reach the device, also when it cannot be reached as the sensor starts, and collects data again as soon as the device is back, also during a recording. With the setting cleared, iMotions does not subscribe to the device's data again by itself.

When you set up a new study in iMotions where you want to collect data from your BLE heart rate device, please make sure to include the sensor in the list of devices associated with the study

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-5c9f34dde21607e927248ec671d9d6a452a13dee%2Fec7bd980a6_bluetooth1.webp?alt=media)

## Analyzing BLE Heart Rate Data

After collecting data with the BLE heart rate device the Heart rate and R-R interval data can be analyzed using the analysis workflow for Heart Rate and Heart Rate Variability. **Please note that the R notebook&#x20;*****momentary*****&#x20;HRV analysis is not available for BLE Heart Rate devices (it is however possible to collect data regarding HRV from the device itself, such as from the Polar H10, if it is provided by the device).**

Information about the analysis workflow can be found [here](https://help.imotions.com/lab/analysis/biosensor-analysis/r-notebooks-ecg-heart-rate-and-hrv-processing.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/sensor-setup/bluetooth-low-energy-ble-devices.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
