nRF5 SDK for Mesh v3.0.0
Migration from v2.2.0 to v3.0.0

This migration guide is complementary to the Release Notes. It describes practical actions you must take to update your code to a newer version of the nRF5 SDK for Mesh.

Table of contents


Added and removed files

The following files have been added in the v3.0.0 release:

The following files have been removed in the v3.0.0 release:

Required actions

Update your projects accordingly to include or remove these files.


IRQ priority level change

The integration with the nRF5 SDK v15.2 caused the following changes:

Required actions


Stack separation on high frequency and low frequency time domains

Stack has been divided into two time frequency domains:

Additionally, app_timer API can be used in an application as-is. However, the SDK app_timer abilities are not sufficient for managing the stack functionality. Extended app_timer with modifications has been added in external/app_timer. Modified version will be compiled and linked to applications (based on stack build system) instead of SDK app_timer. SDK app_timer API header file should be used as well.

Required actions

The following define that turns on app_timer in the building process must be added to app_config.h to make these changes work:

    #define APP_TIMER_ENABLED 1

Initialization and start phase changes

In the initialization phase of the examples, the mesh_softdevice_init module has been replaced with the BLE SoftDevice support module.

In the start phase of the examples, the execution_start() function has been removed.

Required actions

Use the function ble_stack_init() to initialize the SoftDevice Handler and the BLE stack, and to register the Mesh handler for SoC events.

Make sure the function mesh_stack_start() is called at the end of the start phase (see start() function in the Light Switch Server code as an example). After calling mesh_stack_start(), all mesh API interaction must happen at the IRQ priority level specified in the call to mesh_stack_init(). Calling mesh functions at wrong IRQ priority levels after enabling the stack can cause unpredictable behavior (see Interrupt priority levels for details).


Only one segmented message from an element to a destination address at a time

The nRF Mesh SDK is now enforcing the Mesh Profile Specification v1.0 rule that disallows multiple simulatneous segmented messages from a source address to the same destination.

This change means that models must wait until their previous segmented message is finished sending before they can send another. If multiple models on the same element have the same publish address, they have to coordinate their publishing as well.

If the application attempts to publish two simultaneous segmented messages with the same source and destination, the second publish call gets rejected with error code NRF_ERROR_INVALID_STATE.

Required actions

Models that previously scheduled multiple segmented messages in the same context must instead subscribe to NRF_MESH_EVT_TX_COMPLETE events or set up timers for sending to avoid the error code.

Note
This change only affects segmented messages, that is messages with access_message_tx_t::force_segmented set to true or messages that are longer than NRF_MESH_UNSEG_PAYLOAD_SIZE_MAX. Unsegmented messages can be interleaved with both segmented and unsegmented messages of any source and destination.

Device compile time configuration changes

Compile time configuration for supported features of the device changed, which makes DEVICE_FEATURES, MESH_FEATURE_GATT, GATT_PROXY macros outdated.

Required actions

Make sure you apply the following changes to your code:


New provisioning parameter

There is a new parameter attention_duration_s for the nrf_mesh_prov_provision() function in mesh/prov/api/nrf_mesh_prov.h. This parameter is required in the provisioning process.

Required actions

Update all uses of the nrf_mesh_prov_provision() function with the additional attention_duration_s argument.


Documentation feedback | Developer Zone | Subscribe | Updated