Health Thermometer (Peripheral)

Browse source code on GitHub

Overview

Similar to the Peripheral sample, except that this application specifically exposes the HT (Health Thermometer) GATT Service.

On boards with a dht0 Devicetree alias node, this sample uses this sensor to return ambient temperature values. On Nordic nRF devices, it uses the built-in TEMP peripheral to return die temperature values. On other boards, it will generate dummy temperature values.

Requirements

  • BlueZ running on the host, or

  • A board with Bluetooth LE support

Building and Running

Build and flash the sample as follows, replacing <board> with your target board:

west build -b <board> samples/bluetooth/peripheral_ht
west flash

After flashing, use a Bluetooth scanner app (e.g. nRF Connect) to connect to the device and enable indications on the Temperature Measurement characteristic to receive temperature readings via the Health Thermometer (HT) service.

See also

Battery Service (BAS)
Bluetooth APIs