This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Bluetooth: Mesh Demo


This sample is a Bluetooth mesh application intended for demonstration purposes only. The application provisions and configures itself (i.e. no external provisioner needed) with hard-coded network and application key values. The local unicast address can be set using a NODE_ADDR build variable (e.g. NODE_ADDR=0x0001 for unicast address 0x0001), or by manually editing the value in the board.h file.

Because of the hard-coded values, the application is not suitable for production use, but is quite convenient for quick demonstrations of mesh functionality.

The application has some features especially designed for the BBC micro:bit boards, such as the ability to send messages using the board’s buttons as well as showing information of received messages on the board’s 5x5 LED display. It’s generally recommended to use unicast addresses in the range of 0x0001-0x0009 for the micro:bit since these map nicely to displayed addresses and the list of destination addresses which can be cycled with a button press.

A special address, 0x000f, will make the application become a heart-beat publisher and enable the other nodes to show information of the received heartbeat messages.


  • A board with Bluetooth LE support, or

  • QEMU with BlueZ running on the host

Building and Running

This sample can be found under samples/bluetooth/mesh_demo in the Zephyr tree.

See bluetooth samples section for details on how to run the sample inside QEMU.

For other boards, build and flash the application as follows:

west build -b <board> samples/bluetooth/mesh_demo
west flash

Refer to your board’s documentation for alternative flash instructions if your board doesn’t support the flash target.