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.
    1.  

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 samplesBluetoothAsia2019Bluetooth_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.

INSTANT DOWNLOAD

Maintaining Lighting Control Means More Than Managing Lighting

When someone mentions control in terms of lighting, chances are the listener thinks of…

The Importance of Commissioning in NLC

With constant technology advancements and growing market awareness, we are all getting more and…

DALI Alliance White Paper: Sustainable, Smart and Standardized

Designers, architects and building owners must consider a wide range of lighting-related issues, including…

How Bluetooth Mesh Has Changed the Lighting Control Environment

Bluetooth mesh technology has revolutionized the lighting control environment by providing a wireless lighting…

The Role of Energy Efficiency in Lighting Control

Lighting is critical in achieving global sustainable goals, including building energy efficiency standards. The…

Large Scale Bluetooth Mesh Testing

Reliability and latency are the key parameters to be optimized to achieve a seamless…

New Five-Year Forecasts for Bluetooth Device NetworksBluetoothデバイスネットワークにおける今後5年間の最新予測

From networked lighting control to monitoring systems to electronic shelf labels (ESL), Bluetooth® Device…

Features and Benefits of Bluetooth Mesh 1.1 for Wireless Mesh Networking

Commercial and industrial applications like lighting require large-scale, low-power device networks where thousands of…

Low Energy Audio – Incoming Call Over Media (Multi-Device)

This document uses a Message Sequence Chart (MSC) to explain the Bluetooth® LE Audio…

Bluetooth® Core Specification Version 5.4 - Technical Overview

This feature overview summarizes and explains the updates introduced in Bluetooth®️ Core Specification Version…

Bluetooth Development Training: Works With 2022

The role Bluetooth has played, and will continue to play, in the evolution of IoT…

Bringing Wireless Controls To The Epicentre Of Connectivity

This year, the time came for the lighting infrastructure at the Bluetooth SIG headquarters…

Smart Lighting And Controls Halve Energy Consumption At Campus Pitzemburg

Campus Pitzemburg has cut its energy usage by 50% thanks to smart controlled energy…

Sylvania Lets Efficiency And Control Fly High At FLYINGGROUP Antwerp

FLYINGGROUP Antwerp was looking for a solution for their meeting rooms that were more…

The Bluetooth® Low Energy Primer

Are you new to Bluetooth Low Energy? Learn about its constituent parts, features, and how it works.

Smart Solutions Using Network Lighting Infrastructures

An intelligent network lighting control infrastructure helps business owners and staff know more about…

Bluetooth® Technology for Linux Developers

Learn how to use the interprocess communication system D-Bus and the BlueZ APIs to create Bluetooth applications for Linux computers.

Bluetooth Range and Reliability: Myth vs Fact

As Bluetooth is becoming more and more ubiquitous in smart homes, buildings, and factories,…

The Role of Lighting in Smart Buildings

Undoubtedly, everyone is aware of two types of lighting, i.e., wired and wireless. It…

2021 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.

Designing and Developing Bluetooth® Internet Gateways

Learn about Bluetooth internet gateways, how to make them secure and scalable, and design and implement your own working prototype gateway and web application for use with either Bluetooth LE Peripherals or with Bluetooth mesh networks.

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.

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.

Lighting as a Platform

See how connected lighting systems are being used as a platform to enable advanced building services like wayfinding, asset tracking, and space utilization to improve the ROI of smart building investments.

Build a Smarter Building with Blue

See how Bluetooth increases reliability, reduces costs, and enhances your smart building ROI.

Overview – Bluetooth Mesh Networking

A quick overview outlining how Bluetooth mesh uniquely meets the reliability, scalability, and security requirements of commerical and industrial markets.

 Get Help