Configuring Bluetooth mesh in nRF Connect SDK

The Bluetooth® mesh support is controlled by CONFIG_BT_MESH, which depends on the following configuration options:

Optional features configuration

Optional features in the Bluetooth mesh stack must be explicitly enabled:

The persistent storage of the Bluetooth mesh provisioning and configuration data is enabled by CONFIG_BT_SETTINGS. See the Persistent storage section of Bluetooth Stack Architecture for details.

Mesh models

The nRF Connect SDK Bluetooth mesh model implementations are optional features, and each model has individual Kconfig options that must be explicitly enabled. See Bluetooth mesh models for details.

Mesh settings/performance

The following configuration options are used to configure the behavior and performance of a Bluetooth mesh network. For more information about configuration options affecting the memory footprint of Bluetooth mesh, see memory footprint optimization guide for Bluetooth mesh.

Additional configuration options

This section lists additional configuration options that can be used to configure behavior and performance of Bluetooth mesh. The provided values are meant as suggestions only, and should be individually adjusted for each application.

Logging

  • CONFIG_NCS_SAMPLES_DEFAULTS - Enables the Zephyr system logger with minimal logging implementation. This is enabled by default for all samples in nRF Connect SDK. For more information, see Zephyr system logger.

  • CONFIG_LOG_MODE_DEFERRED - Enables deferred logging. Setting this configuration option is recommended to avoid slowing down the processing of mesh messages. It improves the LPN power consumption when the friendship is established.

  • CONFIG_LOG_BUFFER_SIZE - Sets the number of bytes dedicated for the logger internal buffer. Increase the number to avoid missing logs in case of a complex protocol or functionality issue.

  • CONFIG_LOG_PROCESS_THREAD_SLEEP_MS - Sets the sleep period for the internal log processing thread. Decrease the value to flush logs more quickly.

GATT Proxy performance

These options are only compatible with devices supporting Bluetooth Low Energy (LE) v4.2 or higher.

Bluetooth settings/performance

The following configuration options are used to configure the Bluetooth Low Energy behavior and performance:

Disabled and unused Bluetooth features

The following feature options are by default disabled in the samples, but it needs to be considered if any of them are required by the application and thus should be enabled:

Emergency data storage (EMDS)

The following configuration options should be considered in case of large networks with high demands on storing the replay protection list (RPL) data. This will require additional hardware. For more information, see Emergency data storage.

Low Power node (LPN)

The Low Power node (LPN) is a power optimization feature specific to Bluetooth mesh.

The following configuration options are relevant when using the LPN feature: