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

EULA

PLEASE READ MESH_DEMO_TUTORIAL_EULA.TXT BEFORE START DEVELOPMENT.

Overview

This sample demonstrates Bluetooth Mesh functionality on micro:bit, www.microbit.org. 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 server:

  • Pressing Button B on micro:bit will subscribe to 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: 60b01f3f5489975098657caa514133c89a472d19 , the detail is here, https://github.com/zephyrproject-rtos/zephyr/commit/60b01f3f5489975098657caa514133c89a472d19

2. copy zip file into ./zephyr/samples/ 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 server.

Committer:
krenbluetoothsig
Date:
Wed May 16 03:43:25 2018 +0000
Revision:
4:a52949a1cf72
Parent:
2:0aac7f4770d9
1. final version before Bluetooth Asia 2018.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krenbluetoothsig 1:5186eefd678a 1 EULA
krenbluetoothsig 4:a52949a1cf72 2 PLEASE READ MESH_DEMO_TUTORIAL_EULA.TXT BEFORE START DEVELOPMENT.
krenbluetoothsig 2:0aac7f4770d9 3
krenbluetoothsig 4:a52949a1cf72 4 Overview
krenbluetoothsig 4:a52949a1cf72 5 This sample demonstrates Bluetooth Mesh functionality on micro:bit, www.microbit.org. 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 server:
krenbluetoothsig 0:3ed424a8870a 6
krenbluetoothsig 4:a52949a1cf72 7 Pressing Button B on micro:bit will subscribe to the group address from 0xC000 to 0xC003 and back to 0xC000 again like round robin;
krenbluetoothsig 0:3ed424a8870a 8 Requirements
krenbluetoothsig 1:5186eefd678a 9 micro:bit board
krenbluetoothsig 0:3ed424a8870a 10
krenbluetoothsig 0:3ed424a8870a 11 Building and Running
krenbluetoothsig 4:a52949a1cf72 12 0. Download source code, it's zip file, the link is on this page, Download repository.
krenbluetoothsig 2:0aac7f4770d9 13
krenbluetoothsig 4:a52949a1cf72 14 1. Following below link to set the development environment up on your Windows computer. http://docs.zephyrproject.org/getting_started/installation_win.html
krenbluetoothsig 0:3ed424a8870a 15
krenbluetoothsig 4:a52949a1cf72 16 2. copy zip file into ./zephyr/samples/ in the Zephyr tree.
krenbluetoothsig 1:5186eefd678a 17
krenbluetoothsig 4:a52949a1cf72 18 3. unzip the file by "Extract Here".
krenbluetoothsig 0:3ed424a8870a 19
krenbluetoothsig 1:5186eefd678a 20 3. access into the extracted folder and rename prj_bbc_microbit.txt to prj_bbc_microbit.conf
krenbluetoothsig 0:3ed424a8870a 21
krenbluetoothsig 4:a52949a1cf72 22 4. if adopting Windows Command Prompt, use it to access into the unzip folder and type following commands on the console:
krenbluetoothsig 4:a52949a1cf72 23
krenbluetoothsig 4:a52949a1cf72 24 mkdir build & cd build
krenbluetoothsig 1:5186eefd678a 25
krenbluetoothsig 4:a52949a1cf72 26 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 0:3ed424a8870a 27
krenbluetoothsig 4:a52949a1cf72 28 ninja
krenbluetoothsig 1:5186eefd678a 29
krenbluetoothsig 4:a52949a1cf72 30 if adopting MSYS2, use it to access into the unzip folder and type following commands on the console:
krenbluetoothsig 1:5186eefd678a 31
krenbluetoothsig 4:a52949a1cf72 32 mkdir build & cd build
krenbluetoothsig 4:a52949a1cf72 33
krenbluetoothsig 4:a52949a1cf72 34 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 4:a52949a1cf72 35
krenbluetoothsig 4:a52949a1cf72 36 ninja
krenbluetoothsig 0:3ed424a8870a 37
krenbluetoothsig 4:a52949a1cf72 38 5. connect micro:bit with your computer by USB cable, the board will be enumerated as a massive storage device;
krenbluetoothsig 1:5186eefd678a 39
krenbluetoothsig 4:a52949a1cf72 40 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 1:5186eefd678a 41
krenbluetoothsig 4:a52949a1cf72 42 7. micro:bit is ready to work as a GenericOnOff server.