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:
Mon May 28 13:00:46 2018 +0000
Revision:
14:0c48375896d2
Parent:
5:ac22dae133d2
1. CHG: push new README.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krenbluetoothsig 5:ac22dae133d2 1 EULA
krenbluetoothsig 14:0c48375896d2 2 PLEASE READ MESH_DEMO_TUTORIAL_EULA.TXT BEFORE START DEVELOPMENT.
krenbluetoothsig 5:ac22dae133d2 3
krenbluetoothsig 14:0c48375896d2 4 Overview
krenbluetoothsig 14:0c48375896d2 5 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:
krenbluetoothsig 3:608b3e14dd31 6
krenbluetoothsig 14:0c48375896d2 7 Pressing Button A on micro:bit will send GenericOnOffSet access message with on or off state alternatively and specific group address;
krenbluetoothsig 14:0c48375896d2 8 Pressing Button B on micro:bit will switch the group address from 0xC000 to 0xC003 and back to 0xC000 again like round robin;
krenbluetoothsig 3:608b3e14dd31 9 Requirements
krenbluetoothsig 3:608b3e14dd31 10 micro:bit board
krenbluetoothsig 0:876e59f87d50 11
krenbluetoothsig 3:608b3e14dd31 12 Building and Running
krenbluetoothsig 14:0c48375896d2 13 0. Download source code, it's zip file, the link is on this page, Download repository.
krenbluetoothsig 5:ac22dae133d2 14
krenbluetoothsig 14:0c48375896d2 15 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: a7ffc83bcc920b9f14a0161ae6043755893700f6 , the detail is here, https://github.com/zephyrproject-rtos/zephyr/commit/a7ffc83bcc920b9f14a0161ae6043755893700f6
krenbluetoothsig 3:608b3e14dd31 16
krenbluetoothsig 14:0c48375896d2 17 2. copy zip file into ./zephyr/sample/ in the Zephyr tree.
krenbluetoothsig 3:608b3e14dd31 18
krenbluetoothsig 14:0c48375896d2 19 3. unzip the file by "Extract Here".
krenbluetoothsig 4:72457391f1b9 20
krenbluetoothsig 4:72457391f1b9 21 3. access into the extracted folder and rename prj_bbc_microbit.txt to prj_bbc_microbit.conf
krenbluetoothsig 3:608b3e14dd31 22
krenbluetoothsig 14:0c48375896d2 23 4. if adopting Windows Command Prompt, use it to access into the unzip folder and type following commands on the console:
krenbluetoothsig 14:0c48375896d2 24
krenbluetoothsig 14:0c48375896d2 25 mkdir build & cd build
krenbluetoothsig 4:72457391f1b9 26
krenbluetoothsig 14:0c48375896d2 27 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 0:876e59f87d50 28
krenbluetoothsig 14:0c48375896d2 29 ninja
krenbluetoothsig 0:876e59f87d50 30
krenbluetoothsig 14:0c48375896d2 31 if adopting MSYS2, use it to access into the unzip folder and type following commands on the console:
krenbluetoothsig 0:876e59f87d50 32
krenbluetoothsig 14:0c48375896d2 33 mkdir build & cd build
krenbluetoothsig 14:0c48375896d2 34
krenbluetoothsig 14:0c48375896d2 35 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 14:0c48375896d2 36
krenbluetoothsig 14:0c48375896d2 37 ninja
krenbluetoothsig 0:876e59f87d50 38
krenbluetoothsig 14:0c48375896d2 39 5. connect micro:bit with your computer by USB cable, the board will be enumerated as a massive storage device;
krenbluetoothsig 0:876e59f87d50 40
krenbluetoothsig 14:0c48375896d2 41 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;
krenbluetoothsig 0:876e59f87d50 42
krenbluetoothsig 14:0c48375896d2 43 7. micro:bit is ready to work as a GenericOnOff client.