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 Bluetooth 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.
- Note
- This example uses its own static OOB value. For this reason, this example cannot be used with other examples. For more information, see the Examples main page.
The Remote provisioning example consists of two parts:
- 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
You need at least three compatible development kits for this example:
- One compatible development kit for the client.
- Two or more compatible development kits 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 information about the compatible development kits.
Software requirements
For this example, you need to use both the remote provisioning client and the remote provisioning server. Do not use them separately.
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
To test the remote provisioning example:
- Build the examples by following the instructions in Building the Bluetooth mesh stack.
- Flash the examples by following the instructions in Running examples, including:
- Erase the flash of your development boards and program the SoftDevice.
- Flash the client firmware on one board, and the server firmware on other boards.
- Start the RTT viewer to interact with the provisioner. The provisioner prints details about the provisioning and the configuration process in the RTT log.
- Provide the following commands to the client:
- Send
1to start normal PB-ADV on the first unprovisioned device. - Send
2N, whereNis the handle of the newly provisioned device, to set the handle of the remote provisioning server. - Send
3to start remote scanning on the current server. - Send
4to cancel remote scanning on the current server. - Send
5N, whereNis the device number, to start remote provisioning of the first unprovisioned device known to the current provisioning server.
- Send
The provisionees are now provisioned remotely.