nRF5 SDK for Mesh v3.2.0  08c60f6
Remote provisioning example (experimental)

This example demonstrates the PB remote models, which allows you to provision devices that are outside of the provisioner's radio range. Normally, you have to be within radio range of the device you want to provision, but PB remote channels your commands through the mesh.

This solution allows to save time and usability by allowing you to provision all the nodes in the network after all of them have been installed, for example in an ecosystem with one controller and a large set of preinstalled light fixtures spread on a considerable area.

This example is experimental, meaning it is ready for use, but not qualified.

This example consists of two minor examples:

  • Remote provisioning client model that acts as provisioner and provisions remote devices.
  • Remote provisioning server that the client uses as relay for provisioning nodes that it cannot reach directly; this is the end-point for relayed provisioning packets when using the remote provisioning feature.

For more information about remote provisioning API, see the PB-remote API reference.

Table of contents

  • Hardware requirements
  • Software requirements
  • Setup
  • Testing the example

Hardware requirements @anchor pb-remote_example_requirements_hw

You need at least three supported boards for this example:

  • One development board for the client.
  • Two or more development boards for the server.

The servers act as provisionees until they are included in the network, after which they will be able to act as servers to help provision new devices.

See Compatibility for the supported boards.

Software requirements @anchor pb-remote_example_requirements_sw

For this example, you need to use both the remote provisioning client and the remote provisioning server. Do not use them separately.

Setup @anchor pb-remote_example_setup

You can find the source code of this example and its minor examples in the following folder: <InstallFolder>/examples/pb_remote

Testing the example @anchor pb-remote_example_testing

To test the remote provisioning example:

  1. Build the examples by following the instructions in Building the mesh stack.
  2. Flash the examples by following the instructions in Running examples, including:
    1. Erase the flash of your development boards and program the SoftDevice.
    2. Flash the client firmware on one board, and the server firmware on other boards.
  3. Start the RTT viewer to interact with the provisioner. The provisioner prints details about the provisioning and the configuration process in the RTT log.
  4. Provide the following commands to the client:
    1. Send 1 to start normal PB-ADV on the first unprovisioned device.
    2. Send 2N, where N is the handle of the newly provisioned device, to set the handle of the remote provisioning server.
    3. Send 3 to start remote scanning on the current server.
    4. Send 4 to cancel remote scanning on the current server.
    5. Send 5N, where N is the device number, to start remote provisioning of the first unprovisioned device known to the current provisioning server.

The provisionees are now provisioned remotely.