# Heartbeat transmissions

While the GATT connection is established and central has registered to NUS notifications, the sensor will send a heartbeat of current sensor data at the advertisement broadvast interval.

The sensor data is in format 5, however due to GATT transmission payloads being limited to 20 bytes without MTU negotiation the data format is cut at 18 bytes, i.e. MAC address of the tag is not sent.

The heartbeat transmissions may be omitted when GATT connection is busy, for example during log reads.

The heartbeats are same data payloads as what is sent over BLE advertisements, and the interval is same as advertisement update interval.

If the heartbeat can't fit into the 20 bytes of payload of GATT transmission, it will be cut into last data element which fits in whole. For example the Ruuvi Dataformat 5 has 24 bytes of which 6 last bytes are MAC address of the tag. As the MAC address (gray) cannot fit into the payload, it is cut out leaving 18 bytes which are transmitted (green).

![Heartbeat data cut to 18 bytes](https://1423309131-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsPjfnhNj3v37AZtF-d%2Fuploads%2Fgit-blob-dcd2a63534897584a38f02169516066cfbe628f2%2Fimage.png?alt=media)

For details on how to parse the data please review the section Data Format 5 / RAWv2.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ruuvi.com/communication/bluetooth-connection/nordic-uart-service-nus/heartbeat-transmissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
