BlueNRG-1 sensor
profile demo
UM2264
34/55
DocID030868 Rev 1
10
BlueNRG-1 sensor profile demo
The BlueNRG-1 sensor profile demo is supported on the BlueNRG-1 or SPBTLE-1S
development platform (STEVAL-IDB007V1 or STEVAL-IDB007V1M). It implements a
proprietary, Bluetooth low energy (BLE) sensor profile.
This example is useful for building new profiles and applications that use the BlueNRG-1
SoC. The GATT profile is not compliant with any existing specifications as the purpose of
this project is to simply demonstrate how to implement a given profile.
This profile exposes the acceleration and environmental services.
Figure 20: "BLE sensor demo GATT database"
shows the whole GATT database, including
the GATT (0x1801) and GAP (0x1800) services that are automatically added by the stack.
The acceleration service free fall characteristic cannot be read or written, but can be
signaled. The application sends notification of this characteristic (with a value of 0x01) if a
free fall condition is detected by the MEMS sensor (when the acceleration on the three
axes is near zero for a certain amount of time). Notifications can be enabled or disabled by
writing the associated client characteristic configuration descriptor.
The other characteristic exposed by the service gives the current value of the acceleration
measured by the accelerometer in six bytes. Each byte pair contains the acceleration on
one of the three axes. The values are given in mg. This characteristic is readable and can
be notified if notifications are enabled.
Another service is defined, which contains characteristics that expose data from some
environmental sensors: temperature and pressure. Each characteristic data type is
described in a format descriptor. All of the characteristics have read-only properties.
Figure 20: BLE sensor demo GATT database