Bluetooth Asia Developer
Follow Up - Bluetooth Mesh
Provisioning and Interoperability

This year, the Bluetooth Special Interest Group (SIG) hosted a session on Bluetooth Mesh Provisioning and Interoperability at Bluetooth Asia 2019. Developers who attended the session were able to use their smartphones to provision and control a micro:bit board running a Zephyr solution.

For those developers who were not able to attend, this follow-up article shows you step by step how to build the firmware for micro:bit. 

Set Up the Dev Environment

To set up the development environment on your computer, perform the following steps.

  1. Set Up a Development System
  2. Get the Source code
  3. Install Python Dependencies
  4. Set Up a Toolchain
  5. Build and Run an Application

Build the Firmware

To build the firmware, do the following.

  • Open exe (Windows) or Terminal (macOS), navigate to the main project directory
  • Type below command, switch to tag v1.14.0.

git checkout -b branch_v1.14 v1.14.0

  • Download source code here
  • Unzip source code file in the folder ./zephyr/samples/ like below

  • Depending on your computer OS, then:

# On Linux/macOS

cd samples/BluetoothAsia2019/Bluetooth_Mesh_Provisioning_Sample

mkdir build && cd build

# On Windows

cd samples\BluetoothAsia2019\Bluetooth_Mesh_Provisioning_Sample

mkdir build & cd build

cmake -GNinja -DBOARD=bbc_microbit ..

ninja

The main build products are in samples/BluetoothAsia2019/Bluetooth_Mesh_Provisioning_Sample/build/zephyr. The final application binary in HEX format is named zephyr.hex by default.

Flash Firmware

For the flash firmware, follow the steps below.

  • Connect the micro:bit to your laptop by USB cable
  • Use one serial terminal software; use Tera Term or Putty on Windows or use this guide on macOS or Linux. The serial port setting is: 115200, 8-N-1
  • Copy zephyr.hex and paste it in the volume of the micro:bit on your computer
  • Information prints on the serial console

  • If you can see above screenshot, it means the build and flash firmware was successful. The Device Name varies, as it depends on the micro:bit factory unique identifier.

To learn more about developing with Bluetooth mesh and other Bluetooth technologies, visit the Bluetooth SIG resources page.

FEATURED DOWNLOAD

Bluetooth Mesh Developer Study Guide

The Bluetooth Mesh Developer Study Guide is a self-study educational resource which covers both the theory and practice of Bluetooth mesh device firmware development.

DOWNLOAD NOW

Related Resources

Bluetooth® Mesh Masterclass

This webinar covers a wide range of aspects relating to Bluetooth® mesh lighting control…

The Future of Bluetooth Technology

Get the latest trends and forecasts in key Bluetooth solution areas and see how…

Advanced Bluetooth for Android Developers

Android developers can take this guided tour of the most recent features and interesting…

Bluetooth® Mesh Networking – A Practical Guide for Embedded Developers

Watch this in-depth overview of the Bluetooth® mesh specifications that explores some new capabilities…

2020 Bluetooth Market Update

Supported by updated forecasts from ABI Research and insights from several other analyst firms, the Bluetooth Market Update highlights the latest Bluetooth trends and forecasts.

Bluetooth at the Edge: 2019 Market Update with the Bluetooth SIG

In this webinar Chuck Sabin with Bluetooth SIG and Kevin Tate with Rigado discuss…

How to Make Wearables Bluetooth Mesh Provisioners

Learn how to create applications for smartwatches and other platforms that can monitor and control nodes in a Bluetooth mesh network.

2019 Bluetooth Market Update

Supported by updated forecasts from ABI Research and insights from several other analyst firms, the Bluetooth Market Update highlights the latest Bluetooth trends and forecasts.

An Introduction to the Bluetooth Mesh Proxy Function

Learn how to create applications for smartphones and other platforms which can monitor and control nodes in a Bluetooth mesh network.