TI Bluetooth Mesh Provisioning#

Introduction#

This workshop is a detailed description of how to use the TI SimpleLink Starter mobile application to provision a Bluetooth® Mesh end node and setup your network. This lab will focus on provisioning nodes using the mobile application to configure them to receive Generic On/Off messages. All tasks in this lab session are targeted to be completed within a 2-4 hour time frame. An intermediate level of knowledge of the C programming language and some experience with embedded software development is needed to be able to complete the tasks.

This lab session uses the SimpleLink™ CC26X2R1 wireless MCU LaunchPad development kit to demonstrate the tasks in this module. The first task shows how to download the simple_mesh_node project to the LaunchPad kit and run it. The subsequent tasks in this lab will walk through binding application keys, subscribing to a group address and finally, sending a Generic On/Off message.

Note

Kit and SDK compatibility

Multiple of the CC13x2 and CC26x2 development kits support Bluetooth Low Energy operation. See the Hardware Requirement for details. In this lab we will use the CC26x2R Launchpad as an example.

Prerequisites#

Hardware#

For this lab, you need a minimum of two or more Bluetooth-enabled development boards. Supported development boards for Bluetooth Mesh are:

Software#

Background#

This section will cover how a mesh network is created and how a mesh node is configured.

Mesh Provisioning Basics#

The Bluetooth Mesh Specification states that a provisioner is required to create a mesh network. A provisioner is a device that manages the mesh network and performs actions such as generating security keys and assigning unique addresses to nodes as they join the network. A device that is not part of a mesh network is called an Unprovisioned device.

Provisioning Bearers#

Two provisioning “bearers”(You can think of a bearer like a communication channel) are currently supported, as defined by the Bluetooth Mesh Specification.

PB-ADV : the Advertisement Bearer#

When an unprovisioned device supports PB-ADV, it supports provisioning through advertisement messages sent over the primary advertising channels. These advertisements are called Generic Provisioning PDUs and are non-connectable and non-scannable, undirected. To read more about this bearer, refer to Section 5.2.1 PB-ADV in the Bluetooth Mesh Specification.

PB-GATT : the GATT Bearer#

When an unprovisioned device supports PB-GATT, it supports provisioning through the GATT bearer. The Proxy Protocol (defined in Section 5.4 of the spec) is used to send Proxy PDUs to the unprovisioned device.

Each mesh node will expose a Mesh Provisioning Service with a Data In and Data Out characteristic. The provisioner will then connect to the unprovision device over a typical Bluetooth LE connection and begin the Proxy Protocol by using the exposed characteristics for communication.

At a high level, this process consists of:

  1. The unprovisioned node starts sending unprovisioned beacons.

  2. The provisioner scans to find the unprovisioned node.

  3. The provisioner sends a Provisioning Invite to the unprovisioned node.

  4. The unprovisioned node sends its Provisioning Capabilities to the provisioner.

  5. Public keys are exchanged and the unprovisioned device is authenticated.

  6. The provisioner provides the unprovisioned device with its Provisioning Data (Network Key, Unicast Address, IV Index, etc)

  7. Provisioning is complete.

For a complete description of the above process, see Section 5.4.2 Provisioning Behavior in the Bluetooth Mesh Specification.

In this lab, we will use our smartphone with the TI SimpleLink Starter mobile application to configure our network via the GATT bearer.

Getting started – Desktop#

At the end of this module you will have:

  • SimpleLink™ Low Power F2 SDK installed

  • A basic knowledge of how a mesh network is formed

  • A basic knowledge of how a mesh node is configured by a provisioner to send messages

Install the Software#

If not already done, download the SimpleLink™ CC13XX-CC26XX SDK shown in the section Prerequisites above.

Run the SimpleLink™ SDK installer. This gives you the SDK with TI-RTOS included at the default location:

C:\ti\simplelink_cc13xx_cc26xx_sdk_x_xx_xx_xx

If not already done, install the iOS TI SimpleLink Starter: available on the App Store or on Google Play

Task 1 - Setup the simple_mesh_node project#

Configure the node using SysConfig#

  1. Open CCS.

  2. Import the simple_mesh_node example from: simplelink_cc13xx_cc26xx_sdk_x_xx_xx_xx\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\simple_mesh_node

  3. Open the project’s simple_mesh_node.syscfg file and configure it to suit your application needs. For more information, see the BLE Mesh SysConfig Features section within the Bluetooth Mesh Chapter of the TI BLE5-Stack User’s Guide.

Note

This lab will use an unmodified simple_mesh_node project with default SysConfig settings: i.e. Relay+Proxy Node

Build the Projects and Flash the Device#

simple_mesh_node_CC26X2R1_LAUNCHXL_tirtos_ccs#

  1. Build the simple_mesh_node_CC26X2R1_LAUNCHXL_tirtos_ccs project by right-clicking on it and selecting Build Project.

  2. Download and run the project by either:

  • Right clicking on it and selecting Debug As → Code Composer Debug Session, or

  • Pressing F11 when the project is marked as active (see image above)

  • Clicking the green bug icon in the toolbar

  1. When the project is downloaded and halted at main(), press F8 or the Play/Pause button to start executing the code.

Use the two-button menu to initialize the device#

Let’s use the two-button menu to configure the device. Here, we will assign the node with a unique device UUID and begin sending our unprovisioned beacons.

  1. Navigate to MESH INIT menu.

  2. Select MESH set UUID prior to provisioning.

  3. Next select any one of the UUIDs in the list provided.

  4. Select MeshInit unprovisioned beacon.

The following figure shows the serial terminal output when the two-button menu is used to perform the steps above. As the two-button menu can change each SDK release, there may be minor differences in the output shown below.

../../../_images/putty_mesh_init1.gif

MeshInit#

Setup more nodes for the network#

Repeat the above steps to generate a new hex file. Remember to assign a different UUID to each node you set up in this lab. For this lab, we will set up 2 mesh nodes.

References and Resources#

TI BLE5-Stack User’s Guide

Bluetooth Mesh Specification

Bluetooth Mesh Models Technical Overview

Zephyr Project

TI Bluetooth Mesh Software Product Brief