Publishing for Bluetooth Asia 2018 developer session: mesh session. This repo is for GenericOnOff client side firmware.

EULA

PLEASE READ MESH_DEMO_TUTORIAL_EULA.TXT BEFORE START DEVELOPMENT.

Overview

This sample demonstrates Bluetooth Mesh functionality on micro:bit. It doesn't need provisioning because all the credential material (DevKey, NetKey, AppKey, Key Index, IVI and Unicast address) is pre-configured. This sample work as a GenericOnOff client:

  • Pressing Button A on micro:bit will send GenericOnOffSet access message with on or off state alternatively and specific group address;
  • Pressing Button B on micro:bit will switch the group address from 0xC000 to 0xC003 and back to 0xC000 again like round robin;

Requirements

micro:bit board

Building and Running

0. Download source code, it's zip file, the link is on this page, Download repository.

1. Following below link to set the development environment up on your Windows computer. http://docs.zephyrproject.org/getting_started/installation_win.html . Please make sure git checkout this commit, commit: 88dfd399f480b1593a8e13f5a68d512921a55502 , the detail is here, https://github.com/zephyrproject-rtos/zephyr/commit/88dfd399f480b1593a8e13f5a68d512921a55502

2. copy zip file into ./zephyr/sample/ in the Zephyr tree.

3. unzip the file by "Extract Here".

3. access into the extracted folder and rename prj_bbc_microbit.txt to prj_bbc_microbit.conf

4. if adopting Windows Command Prompt, use it to access into the unzip folder and type following commands on the console:

mkdir build & cd build

cmake -GNinja -DBOARD=bbc_microbit ..

ninja

if adopting MSYS2, use it to access into the unzip folder and type following commands on the console:

mkdir build & cd build

cmake -GNinja -DBOARD=bbc_microbit ..

ninja

5. connect micro:bit with your computer by USB cable, the board will be enumerated as a massive storage device;

6. drag the hex file (which is in ./zephyr/sample/[unzip folder]/build/zephyr/zephyr.hex) into Microbit massive storage device to flash the firmware;

7. micro:bit is ready to work as a GenericOnOff client.

Committer:
krenbluetoothsig
Date:
Tue May 01 10:22:24 2018 +0000
Revision:
0:876e59f87d50
Child:
1:fb4893064dd4
import the client project.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krenbluetoothsig 0:876e59f87d50 1 This is a README for implementing micro:bit Bluetooth mesh demo.
krenbluetoothsig 0:876e59f87d50 2
krenbluetoothsig 0:876e59f87d50 3 .. _ble_mesh:
krenbluetoothsig 0:876e59f87d50 4
krenbluetoothsig 0:876e59f87d50 5 Bluetooth: Mesh
krenbluetoothsig 0:876e59f87d50 6 ###############
krenbluetoothsig 0:876e59f87d50 7
krenbluetoothsig 0:876e59f87d50 8 Overview
krenbluetoothsig 0:876e59f87d50 9 ********
krenbluetoothsig 0:876e59f87d50 10
krenbluetoothsig 0:876e59f87d50 11 This sample demonstrates Bluetooth Mesh functionality. It has several
krenbluetoothsig 0:876e59f87d50 12 standard Mesh models, and supports provisioning over both the
krenbluetoothsig 0:876e59f87d50 13 Advertising and the GATT Provisioning Bearers (i.e. PB-ADV and PB-GATT).
krenbluetoothsig 0:876e59f87d50 14 The application also needs a functioning serial console, since that's
krenbluetoothsig 0:876e59f87d50 15 used for the Out-of-Band provisioning procedure.
krenbluetoothsig 0:876e59f87d50 16
krenbluetoothsig 0:876e59f87d50 17 Requirements
krenbluetoothsig 0:876e59f87d50 18 ************
krenbluetoothsig 0:876e59f87d50 19
krenbluetoothsig 0:876e59f87d50 20 * A board with Bluetooth LE support, or
krenbluetoothsig 0:876e59f87d50 21 * QEMU with BlueZ running on the host
krenbluetoothsig 0:876e59f87d50 22
krenbluetoothsig 0:876e59f87d50 23 Building and Running
krenbluetoothsig 0:876e59f87d50 24 ********************
krenbluetoothsig 0:876e59f87d50 25
krenbluetoothsig 0:876e59f87d50 26 This sample can be found under :file:`samples/bluetooth/mesh` in the
krenbluetoothsig 0:876e59f87d50 27 Zephyr tree.
krenbluetoothsig 0:876e59f87d50 28
krenbluetoothsig 0:876e59f87d50 29 See :ref:`bluetooth setup section <bluetooth_setup>` for details on how
krenbluetoothsig 0:876e59f87d50 30 to run the sample inside QEMU.
krenbluetoothsig 0:876e59f87d50 31
krenbluetoothsig 0:876e59f87d50 32 For other boards, build and flash the application as follows:
krenbluetoothsig 0:876e59f87d50 33
krenbluetoothsig 0:876e59f87d50 34 .. zephyr-app-commands::
krenbluetoothsig 0:876e59f87d50 35 :zephyr-app: samples/bluetooth/mesh
krenbluetoothsig 0:876e59f87d50 36 :board: <board>
krenbluetoothsig 0:876e59f87d50 37 :goals: flash
krenbluetoothsig 0:876e59f87d50 38 :compact:
krenbluetoothsig 0:876e59f87d50 39
krenbluetoothsig 0:876e59f87d50 40 Refer to your :ref:`board's documentation <boards>` for alternative
krenbluetoothsig 0:876e59f87d50 41 flash instructions if your board doesn't support the ``flash`` target.