Introduction#

This document focuses on explaining the Bluetooth mesh sensor demo, installed as part of the Bluetooth mesh SDK. For the most part, the document centers on the example application and its usage flow, along with an explanation of a key part of the source code. It also includes a brief discussion of some concepts of the sensor model specification that are important for understanding the example.

Sensor Model#

The sensor model is Bluetooth mesh’s method of interfacing with sensors. For a list of supported sensor types, refer to the Bluetooth Mesh Device Properties specifications. This model is made up of sensor states including descriptors, settings, cadence, data, and series columns. This model also defines the messages used for setting and reporting these states between client and server.

Sensor Descriptors: The sensor descriptors define the sensor property ID, to indicate the device’s sensor type, the positive and negative tolerance of the sensor, the sampling function, the measurement period, and the update interval.

Sensor Settings: The sensor settings state controls the parameters of a sensor, such as sensitivity. The sensor setting property ID determines whether the sensor settings can be read and written as well as a raw setting’s size and content.

Sensor Cadence: The sensor cadence state controls how often the sensor data is published. Data can be published either through a trigger or a fast cadence. The trigger can be defined either by the sensor property ID or as a percentage change in the measured value. A fast cadence can be used if the measured valued falls within a specified range.

Sensor Data: The sensor data state is constructed of a sensor property ID and a raw value. Multiple instances are permitted.

Sensor Series Column: Sensor measurements may be organized as arrays, conceptually as columns of data. The sensor series column state is made up of a raw Y value, raw X value, and column width. The sizes and contents of each of these is determined by the sensor property ID.

Sensor Messages#

Each state in the sensor model has an acknowledged get message and an unacknowledged status message associated with it. A client requests the status message by sending the get message. In addition, writable sensor states such as the cadence and setting states also have both acknowledged and unacknowledged set messages.

Sensor Server and Client#

The defined models are the Sensor Client, Sensor Server, and Sensor Setup Server. In any element where the Sensor Server is present, the Sensor Setup Server must also be present to allow configuration.