2020-01-31 23:15:50 +08:00
|
|
|
.. _ble_mesh_provisioner:
|
|
|
|
|
|
|
|
Bluetooth: Mesh Provisioner
|
|
|
|
###########################
|
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2021-06-08 15:32:13 +08:00
|
|
|
This sample demonstrates how to use the Bluetooth mesh APIs related to
|
2020-01-31 23:15:50 +08:00
|
|
|
provisioning and using the Configuration Database (CDB). It is intended to be
|
2021-03-23 21:55:05 +08:00
|
|
|
tested together with a device capable of being provisioned. For
|
|
|
|
example, one could use the sample in :zephyr_file:`samples/bluetooth/mesh` or
|
|
|
|
:zephyr_file:`tests/bluetooth/mesh_shell`.
|
2020-01-31 23:15:50 +08:00
|
|
|
|
|
|
|
The application provisions itself and loads the CDB with an application key.
|
|
|
|
It then waits to receive an Unprovisioned Beacon from a device which will
|
|
|
|
trigger provisioning using PB-ADV. Once provisioning is done, the node will
|
|
|
|
be present in the CDB but not yet marked as configured. The application will
|
|
|
|
notice the unconfigured node and start configuring it. If no errors are
|
|
|
|
encountered, the node is marked as configured.
|
|
|
|
|
2021-03-23 21:55:05 +08:00
|
|
|
The configuration of a node involves adding an application key, getting the
|
|
|
|
composition data, and binding all its models to the application key.
|
2020-01-31 23:15:50 +08:00
|
|
|
|
|
|
|
Please note that this sample uses the CDB API which is currently marked as
|
|
|
|
EXPERIMENTAL and is likely to change.
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
************
|
|
|
|
|
|
|
|
* A board with Bluetooth LE support, or
|
|
|
|
* QEMU with BlueZ running on the host
|
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
|
|
|
This sample can be found under :zephyr_file:`samples/bluetooth/mesh_provisioner`
|
|
|
|
in the Zephyr tree.
|
|
|
|
|
|
|
|
See :ref:`bluetooth samples section <bluetooth-samples>` for details on how
|
|
|
|
to run the sample inside QEMU.
|
|
|
|
|
|
|
|
For other boards, build and flash the application as follows:
|
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/bluetooth/mesh_provisioner
|
|
|
|
:board: <board>
|
|
|
|
:goals: flash
|
|
|
|
:compact:
|
|
|
|
|
|
|
|
Refer to your :ref:`board's documentation <boards>` for alternative
|
|
|
|
flash instructions if your board doesn't support the ``flash`` target.
|