nRF5 SDK for Mesh v3.2.0
Mesh provisioner details and Mesh APIs

The provisoner configures a network in a fixed, predefined way. Together with light switch server and light switch client, it is part of the light switch example network demonstration.

Table of contents

The provisioner is implemented as a multi-layered state machine due to the asynchronous nature of the provisioning and configuration process.

The following diagram shows the typical state transitions of the provisioner while provisioning and configuring light switch client.

light_switch_client_state_diagram.svg
Light switch client state diagram

For more information on how a provisioning process works, see the Mesh provisioning Guide.


Source code

You can find the source code of the mesh provisioner in the following folder: <InstallFolder>/examples/light_switch/provisioner

To run the mesh provisioner, see Light switch example.


Use of Mesh APIs

The provisioner uses the following set of APIs:

In general, the provisioner role is an order of magnitude more complex than the provisionee role, both in resource requirements and in application complexity. Therefore, there is no simple "press play and it works"-API for the provisioning and configuration process. However, for a specific use case, it can be reduced into a set of simple steps, as implemented in the provisioner example:

  1. Initialize:
    1. Core mesh stack.
    2. Device state manager.
    3. Access layer.
    4. (Optional) Load flash configuration.
  2. Listen for unprovisioned beacons.
  3. Provision device.
  4. Configure device.
  5. If more devices should join the network, go back to step 2.

In the example code, this behavior is split between the following modules:

The following figure shows the details of how provisioning and configuration are implemented with the provided APIs. Note that the figure may simplify some API calls to provide a clearer understanding. See the relevant source files for details.

light_switch_prov_interface.svg
Provisioning and configuring devices

Documentation feedback | Developer Zone | Subscribe | Updated