The latest development version of this page may be more current than this released 0.4.3 version.

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.

Building and Running

examples/bluetooth/mesh

compile, burn, and more, see get-started chapter 。

Running result

I/bt_hci_core     [0.102] No ID address. App must call settings_load()
I/mesh            [0.108] Bluetooth initialized

I/bt_hci_core     [0.240] Identity: 28:6D:CE:01:02:03 (public)
I/bt_hci_core     [0.246] HCI: version 4.2 (0x08) revision 0x0709, manufacturer 0x070c
I/bt_hci_core     [0.254] LMP: version 4.2 (0x08) subver 0x0709
I/mesh            [0.380] Mesh initialized

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.