zephyr/samples/bluetooth/mesh
Martí Bolívar 0b4d3286bb samples: mesh: clean up
Drop device_get_binding() for microbit, using a gpio_dt_spec instead.
Rename the 'button' global to 'button_work' since it's a k_work
related to the button and does not actually represent the button
itself.

Fix a typo in the docs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
..
boards samples: bluetooth: mesh: Move dts overlays under boards 2020-04-01 10:44:31 -04:00
src samples: mesh: clean up 2021-03-29 16:33:51 +02:00
CMakeLists.txt Bluetooth: Mesh: Add some actual behavior in sample 2021-03-26 18:22:19 +02:00
microbit_gatt.conf Bluetooth: Mesh: Slab based segmentation handling 2020-03-19 15:54:26 +02:00
nrf51_qfaa.conf Bluetooth: Mesh: Add some actual behavior in sample 2021-03-26 18:22:19 +02:00
prj_bbc_microbit.conf samples: mesh: bbc_microbit SRAM improvements 2021-03-29 16:33:51 +02:00
prj.conf Bluetooth: Mesh: Add some actual behavior in sample 2021-03-26 18:22:19 +02:00
README.rst samples: mesh: clean up 2021-03-29 16:33:51 +02:00
sample.yaml sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00

.. _ble_mesh:

Bluetooth: Mesh
###############

Overview
********

This sample demonstrates Bluetooth Mesh functionality. It has several
standard Mesh models, and supports provisioning over both the
Advertising and the GATT Provisioning Bearers (i.e. PB-ADV and PB-GATT).
The application also needs a functioning serial console, since that's
used for the Out-of-Band provisioning procedure.

On boards with LEDs, a Generic OnOff Server model exposes functionality for
controlling the first LED on the board over the mesh.

On boards with buttons, a Generic OnOff Client model will send Onoff messages
to all nodes in the network when the button is pressed.

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` 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
   :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.

Interacting with the sample
***************************

The sample can either be provisioned into an existing mesh network with an
external provisioner device, or self-provision through a button press.

When provisioning with a provisioner device, the provisioner must give the
device an Application key and bind it to both Generic OnOff models.

When self-provisioning, the device will take a random unicast address and
bind a dummy Application key to these models.

Once provisioned, messages to the Generic OnOff Server will be used to turn
the LED on or off, and button presses will be used to broadcast OnOff
messages to all nodes in the same network.