About Demos and Examples#
Because starting application development from scratch is difficult, the Bluetooth Mesh SDK comes with a number of built-in demos and examples covering the most frequent use cases, as shown in the following figure. Demos are pre-built application images that you can run immediately. Software examples can be modified before building the application image. Demos with the same name as Software examples are built from their respective example. Click View Project Documentation to see additional information about some examples. This is also displayed on a readme tab when you create a project based on the example.
Use the Demos and Example Projects switches to filter on only examples or only demos. Demos are also noted by the blue Demo tag in the upper left of the card.
Note: The demos and examples you see are determined by the part selected. If you are using a custom solution with more than one part, click the part you are working with to see only the items applicable to that part. Some functionality in these demos and examples depends on the features of the part, such as whether or not an LCD is included on the mainboard.
To download and run a demo on your device, click [RUN] on the desired demo card. The demo automatically downloads to the selected device.
Bluetooth Mesh Examples and Demos#
The following examples are provided.
Examples with (D) in their names have a matching pre-built demo for some devices. Demos contain both a bootloader and the application. The compatible bootloader information provided for some examples is for later software development purposes. See Getting Started with Application Development for more information.
Typically examples are running on bare metal. Examples with (F) in their names are using FreeRTOS and with (M) are using Micrium OS, both with selected devices.
The NCP examples require the BGAPI UART DFU Bootloader. The rest require one of the Internal Storage Bootloader (single image) variants, depending on device memory.
Bare minimum examples#
Bluetooth Mesh - SoC Empty (F, M): Demonstrates the bare minimum needed for a Bluetooth Mesh C application. The application starts Unprovisioned Device Beaconing after booting, then waits to be provisioned.
Bluetooth Mesh - NCP Empty (D, F, M): An NCP Target C application that makes it possible for the NCP Host Controller to access the Bluetooth Mesh stack via UART. It provides access to the host layer via BGAPI and not to the link layer via HCI.
A separate example is available for EFR32xG22, which has limited RAM and flash, and therefore some of the stack classes are disabled by default.
Typical applications#
Bluetooth Mesh - SoC Light CTL (D): An out-of-the-box software demo where the LEDs of the mainboard/WSTK can be switched on and off, and their lighting intensity, color temperature, and delta UV can be set.
The Thunderboard Sense 2 board can be switched on and off, and the lighting intensity, color temperature, and delta UV can be set.
Bluetooth Mesh - SoC Light HSL (D): An out-of-the-box software demo where the LEDs of the mainboard can be switched on and off, and their lighting intensity, hue, and saturation can be set. The example also tries to establish friendship as a Friend node.
The Thunderboard Sense 2 can be switched on and off, and the lighting intensity, hue, and saturation can be set.
Bluetooth Mesh - SoC Sensor Client (D, F): This example demonstrates the Bluetooth Mesh Sensor Client Model. It collects and displays sensor measurement data from remote device(s) (e.g., btmesh_soc_sensor_server).
Bluetooth Mesh - SoC Sensor Thermometer (D, F): This example demonstrates the Bluetooth Mesh Sensor Server Model and Sensor Setup Server Model. It measures temperature and sends the measurement data to a remote device (e.g., btmesh_soc_sensor_client).
For certain devices, if available, it measures CPU temperature and uses that data as temperature reading. Otherwise it sends mocked temperature data to a remote device (e.g., btmesh_soc_sensor_client).
Bluetooth Mesh - SoC Switch CTL (D, F, M): An out-of-the-box Software Demo where the device acts as a switch using the Light CTL Client Model. Push Button presses or CLI commands can control the lightness and color temperature of the LEDs on a remote device.
Note: This example is not compatible with the Dimming Control NLC Profile.
Bluetooth Mesh - SoC Switch CTL Low Power (D, F, M): An out-of-the-box Software Demo where the device acts as a switch using the Light CTL Client Model. It is optimized for low current consumption with disabled CLI, logging, and LCD. Push Button presses or CLI commands can control the lightness and color temperature of the LEDs on a remote device.
Note: This example is not compatible with the Dimming Control NLC Profile.
Bluetooth Mesh - SoC DFU Distributor (D): Demonstrates the Firmware Distributor role based on the BT Mesh Model specification. Distributor is responsible for delivering new firmware images to the Target nodes and monitoring the progress of the firmware update.
Security examples#
Bluetooth Mesh - SoC CSR Generator (Secure Vault) (D): Certificate generating firmware example. Software generates the device EC key pair, the signing request for the device certificate, and other related data. The generated data can be read out by the Central Authority.
Bluetooth Mesh - SoC Empty with Certificate-Based Provisioning support: Demonstrates the bare minimum needed for a Bluetooth Mesh C application that allows Certificate-Based Provisioning (CBP). The application starts Unprovisioned Device Beaconing after boot waiting to be provisioned to a Mesh Network.
Networked Lighting Control (NLC) examples#
More information from Bluetooth SIG site: Bluetooth® Networked Lighting Control
Bluetooth Mesh - NLC Ambient Light Sensor (D, F): An out-of-the-box Software Demo where the device acts as an Ambient Light Sensor in a Networked Lighting Control (NLC) system. The device measures ambient light and sends these measurements to the network. Properly configured NLC Basic Lightness Controllers then can act on the received data.
Bluetooth Mesh - NLC Ambient Light Sensor (Mock) (D, F): An out-of-the-box Software Demo where the device acts as an ambient light sensor in a Networked Lighting Control (NLC) system. The device simulates ambient light measurements and sends these to the network. Properly configured NLC Basic Lightness Controllers then can act on the received data.
Bluetooth Mesh - NLC Basic Lightness Controller (D): An out-of-the-box software demo where the device acts as a Basic Lightness Controller in a Networked Lighting Control (NLC) system. The device listens to messages from other NLC devices, namely Occupancy Sensor, Ambient Light Sensor, Dimming Control and Basic Scene Selector nodes.
This project uses the RGB LED on the xG24 Dev Kit/Thunderboard Sense 2 board or LEDs on the mainboard/WSTK and display (if available).
Bluetooth Mesh - NLC Basic Scene Selector (D, F, M): An out-of-the-box Software Demo where the device acts as a Basic Scene Selector in a Networked Lighting Control (NLC) system. Push Button presses control Basic Lightness Controllers in the network by scene recall requests.
Bluetooth Mesh - NLC Basic Scene Selector Low Power (D, F, M): An out-of-the-box Software Demo where the device acts as a Basic Scene Selector in a Networked Lighting Control (NLC) system. It is optimized for low current consumption with disabled CLI, logging, and LCD. Push Button presses control Basic Lightness Controllers in the network by scene recall requests.
Bluetooth Mesh - NLC Dimming Control (D, F, M): An out-of-the-box Software Demo where the device acts as a Dimming Control in a Networked Lighting Control (NLC) system. Push Button presses control Basic Lightness Controllers in the network by Generic Level Delta or Generic On/Off messages.
Bluetooth Mesh - NLC Dimming Control Low Power (D, F, M): An out-of-the-box Software Demo where the device acts as a Dimming Control in a Networked Lighting Control (NLC) system. It is optimized for low current consumption with disabled CLI, logging, and LCD. Push Button presses control Basic Lightness Controllers in the network by Generic Level Delta or Generic On/Off messages.
Bluetooth Mesh - NLC Occupancy Sensor (D, F): An out-of-the-box Software Demo where the device acts as an Occupancy Sensor in a Networked Lighting Control (NLC) system. Push Button presses imitate people count changes which can control a properly configured NLC Basic Lightness Controller.
Interoperability Test Demos#
The interoperability (IOP) tests check if the Bluetooth mesh stack running on the board is compatible with a smartphone or not. These are test procedures containing several test cases for each Bluetooth mesh operation. The demos are meant to be used with the Bluetooth mesh mobile application.
The supported boards are BRD4181A and BRD4181B using xG21, BRD4186C and BRD4187C using xG24 and BRD4194A using xG27. The LNP node test is supported also by BRD4182A using xG22.
Bluetooth Mesh - SoC IOP Test - Friend node (D): Friend example for IOP test. This node acts as a friend for the low power node and caches messages sent to it when the low power node is sleeping.
Bluetooth Mesh - SoC IOP Test - LPN node (D): Low power node example for IOP test. This node acts as a typical low power device and sleeps most of the time. It needs a friend node to cache messages and forward them when polled.
Bluetooth Mesh - SoC IOP Test - Proxy node (D): Proxy example for IOP test. This node forwards/relays messages between GATT and advertising bearers in the network.
Bluetooth Mesh - SoC IOP Test - Relay node (D): Relay example for IOP test. This node acts as a relay, that is, if a node is out of range for another node, it relays messages between the two, provided the relay node is in range for both.
NCP Host Examples#
btmesh_host_empty: Minimal host-side project structure, used as a starting point for NCP host applications. Use it with the Bluetooth Mesh - NCP Empty NCP target application flashed to the radio board. Access is to the NCP target stack layer via BGAPI and not to the link layer via HCI. The examples can be found in the GSDK install folder under app/ btmesh/example_host. The example requires a POSIX environment for compilation, such as Linux, macOS, or Windows MSYS2.
BT Mesh Host Provisioner: NCP-mode host application for testing host provisioning including Remote Provisioning, for use with the Bluetooth Mesh - NCP Empty NCP-mode target application, located in <GSDK installation>app/btmesh/example_host/ btmesh_host_provisioner. Quick instructions: Compile with a POSIX-compatible toolchain with make parameters RPR=1 UI=1. See the README.txt included for more information.
Python-Based NCP Host Examples#
Python-based NCP host examples can be accessed at https://github.com/SiliconLabs/pybgapi-examples. These examples are meant to be used with PyBGAPI (https://pypi.org/project/pybgapi/). Use with Bluetooth Mesh - NCP Empty NCP target application flashed to the radio board.
GitHub Mesh Stack Features#
For additional Mesh examples, see our GitHub repository which, provides examples for use-cases (such as Embedded Provisioner, Remote Provisioning, IV Update/Recovery, etc.) not covered by Simplicity Studio: https://github.com/SiliconLabs/bluetooth_mesh_stack_features.