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 02 13:35:43 2018 +0000
Revision:
2:0aac7f4770d9
Parent:
1:5186eefd678a
Child:
4:a52949a1cf72
server; 1. CHG: sync with homepage on Mbed.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krenbluetoothsig 0:3ed424a8870a 1
krenbluetoothsig 2:0aac7f4770d9 2 **
krenbluetoothsig 1:5186eefd678a 3 EULA
krenbluetoothsig 2:0aac7f4770d9 4 **
krenbluetoothsig 2:0aac7f4770d9 5
krenbluetoothsig 1:5186eefd678a 6 PLEASE READ EULA.TXT BEFORE START DEVELOPMENT.
krenbluetoothsig 0:3ed424a8870a 7
krenbluetoothsig 2:0aac7f4770d9 8 **
krenbluetoothsig 0:3ed424a8870a 9 Overview
krenbluetoothsig 2:0aac7f4770d9 10 **
krenbluetoothsig 2:0aac7f4770d9 11
krenbluetoothsig 1:5186eefd678a 12 This sample demonstrates Bluetooth Mesh functionality on micro:bit, www.microbit.org.
krenbluetoothsig 1:5186eefd678a 13 It doesn't need provisioning because all the credential material (DevKey, NetKey, AppKey, Key Index, IVI
krenbluetoothsig 1:5186eefd678a 14 and Unicast address) is pre-configured.
krenbluetoothsig 1:5186eefd678a 15 This sample work as a GenericOnOff server:
krenbluetoothsig 1:5186eefd678a 16 * Pressing Button B on micro:bit will subscribe to the group address from 0xC000 to 0xC003 and back to
krenbluetoothsig 1:5186eefd678a 17 0xC000 again like round robin;
krenbluetoothsig 0:3ed424a8870a 18
krenbluetoothsig 2:0aac7f4770d9 19 **
krenbluetoothsig 0:3ed424a8870a 20 Requirements
krenbluetoothsig 2:0aac7f4770d9 21 **
krenbluetoothsig 2:0aac7f4770d9 22
krenbluetoothsig 1:5186eefd678a 23 micro:bit board
krenbluetoothsig 0:3ed424a8870a 24
krenbluetoothsig 2:0aac7f4770d9 25 **
krenbluetoothsig 0:3ed424a8870a 26 Building and Running
krenbluetoothsig 2:0aac7f4770d9 27 **
krenbluetoothsig 2:0aac7f4770d9 28
krenbluetoothsig 1:5186eefd678a 29 1. Following below link to set the development environment up on your Windows computer.
krenbluetoothsig 1:5186eefd678a 30 http://docs.zephyrproject.org/getting_started/installation_win.html
krenbluetoothsig 0:3ed424a8870a 31
krenbluetoothsig 1:5186eefd678a 32 2. copy zip file into './zephyr/sample/' in the Zephyr tree.
krenbluetoothsig 1:5186eefd678a 33
krenbluetoothsig 1:5186eefd678a 34 3. unzip the file by "Extract Here".
krenbluetoothsig 0:3ed424a8870a 35
krenbluetoothsig 1:5186eefd678a 36 3. access into the extracted folder and rename prj_bbc_microbit.txt to prj_bbc_microbit.conf
krenbluetoothsig 0:3ed424a8870a 37
krenbluetoothsig 1:5186eefd678a 38 4. if adopting Windows Command Prompt, use it to access into the unzip folder and
krenbluetoothsig 1:5186eefd678a 39 type following commands on the console:
krenbluetoothsig 1:5186eefd678a 40
krenbluetoothsig 1:5186eefd678a 41 mkdir build & cd build
krenbluetoothsig 1:5186eefd678a 42 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 1:5186eefd678a 43 ninja
krenbluetoothsig 0:3ed424a8870a 44
krenbluetoothsig 1:5186eefd678a 45
krenbluetoothsig 1:5186eefd678a 46 if adopting MSYS2, use it to access into the unzip folder and type following commands
krenbluetoothsig 1:5186eefd678a 47 on the console:
krenbluetoothsig 1:5186eefd678a 48
krenbluetoothsig 1:5186eefd678a 49 mkdir build & cd build
krenbluetoothsig 1:5186eefd678a 50 cmake -GNinja -DBOARD=bbc_microbit ..
krenbluetoothsig 1:5186eefd678a 51 ninja
krenbluetoothsig 0:3ed424a8870a 52
krenbluetoothsig 1:5186eefd678a 53 5. connect micro:bit with your computer by USB cable, the board will be enumerated as a massive
krenbluetoothsig 1:5186eefd678a 54 storage device;
krenbluetoothsig 1:5186eefd678a 55
krenbluetoothsig 1:5186eefd678a 56 6. drag the hex file (which is in './zephyr/sample/[unzip folder]/build/zephyr/zephyr.hex') into
krenbluetoothsig 1:5186eefd678a 57 Microbit massive storage device to flash the firmware;
krenbluetoothsig 1:5186eefd678a 58
krenbluetoothsig 1:5186eefd678a 59 7. micro:bit is ready to work as a GenericOnOff server.
krenbluetoothsig 1:5186eefd678a 60