Device Information Service (DIS)

This module implements the Device Information Service.

Overview

During initialization, the module adds the Device Information Service to the Bluetooth LE stack database. It then encodes the supplied information, and adds the corresponding characteristics.

The characteristic values follow an all-or-nothing model:

  • If the application supplies a ble_dis_values instance at initialization, the values fully define every characteristic. The Kconfig options are ignored and any member left NULL (or empty for strings) omits that characteristic.

  • If no run-time values are supplied, all characteristics are built from the CONFIG_BLE_DIS_* Kconfig build-time defaults.

Configuration

Set the CONFIG_BLE_DIS Kconfig option to enable the service.

You can configure the service using the following Kconfig options that provide the build-time default values:

Initialization

To initialize the service, call the ble_dis_init() function. See the ble_dis_config struct for configuration details.

Set the values field of ble_dis_config to a ble_dis_values instance to supply run-time values, or to NULL to use the Kconfig build-time defaults.

Usage

When enabled, the module adds the Device Information Service with the characteristic values supplied at run time. If no run-time values are supplied, the values specified by the Kconfig options are used.

Dependencies

This service has the following Bare Metal dependencies:

API documentation

Header file: include/bm/bluetooth/services/ble_dis.h
Source files: subsys/bluetooth/services/ble_dis/

Device Information Service API reference