1.. _ble_mesh_provisioner:
2
3Bluetooth: Mesh Provisioner
4###########################
5
6Overview
7********
8
9This sample demonstrates how to use the Bluetooth Mesh APIs related to
10provisioning and using the Configuration Database (CDB). It is intended
11to be tested together with a device capable of being provisioned. For
12example, one could use the sample in
13:zephyr_file:`samples/bluetooth/mesh`
14or :zephyr_file:`tests/bluetooth/mesh_shell`.
15
16The application provisions itself and loads the CDB with an application
17key, then waits to receive an Unprovisioned Beacon from a device. If the
18board has a push button connected via GPIO and configured using the
19``sw0`` :ref:`devicetree <dt-guide>` alias, the application then waits
20for the user to press the button, which will trigger provisioning using
21PB-ADV. If the board doesn't have the push button, the sample will
22provision detected devices automatically. Once provisioning is done, the
23node will be present in the CDB but not yet marked as configured. The
24application will notice the unconfigured node and start configuring it.
25If no errors are encountered, the node is marked as configured.
26
27The configuration of a node involves adding an application key, getting
28the composition data, and binding all its models to the application key.
29
30Requirements
31************
32
33* A board with Bluetooth LE support, or
34* QEMU with BlueZ running on the host
35
36Building and Running
37********************
38
39This sample can be found under
40:zephyr_file:`samples/bluetooth/mesh_provisioner` in the Zephyr tree.
41
42See :ref:`bluetooth samples section <bluetooth-samples>` for details on
43how to run the sample inside QEMU.
44
45For other boards, build and flash the application as follows:
46
47.. zephyr-app-commands::
48   :zephyr-app: samples/bluetooth/mesh_provisioner
49   :board: <board>
50   :goals: flash
51   :compact:
52
53Refer to your :ref:`board's documentation <boards>` for alternative
54flash instructions if your board doesn't support the ``flash`` target.
55
56To run the application on an :ref:`nrf5340dk_nrf5340`, a Bluetooth controller application
57must also run on the network core. The :ref:`bluetooth-hci-ipc-sample` sample
58application may be used. Build this sample with configuration
59:zephyr_file:`samples/bluetooth/hci_ipc/nrf5340_cpunet_bt_mesh-bt_ll_sw_split.conf`
60to enable mesh support.
61