zephyr/samples/bluetooth/mesh
Théo Battrel e458f5aae6 Bluetooth: Use Zephyr standard log system instead of `bluetooth/common/log`
The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.

Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`

Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.

For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-11-25 17:08:36 +01:00
..
boards
src
CMakeLists.txt
README.rst
microbit_gatt.conf Bluetooth: Use Zephyr standard log system instead of `bluetooth/common/log` 2022-11-25 17:08:36 +01:00
nrf51_qfaa.conf Bluetooth: Use Zephyr standard log system instead of `bluetooth/common/log` 2022-11-25 17:08:36 +01:00
prj.conf Bluetooth: Use Zephyr standard log system instead of `bluetooth/common/log` 2022-11-25 17:08:36 +01:00
prj_bbc_microbit.conf Bluetooth: Use Zephyr standard log system instead of `bluetooth/common/log` 2022-11-25 17:08:36 +01:00
sample.yaml

README.rst

.. _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.