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.
prj_bbc_microbit.txt@4:a52949a1cf72, 2018-05-16 (annotated)
- Committer:
- krenbluetoothsig
- Date:
- Wed May 16 03:43:25 2018 +0000
- Revision:
- 4:a52949a1cf72
- Parent:
- 0:3ed424a8870a
1. final version before Bluetooth Asia 2018.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krenbluetoothsig | 0:3ed424a8870a | 1 | #CONFIG_INIT_STACKS=y |
krenbluetoothsig | 0:3ed424a8870a | 2 | CONFIG_MAIN_STACK_SIZE=512 |
krenbluetoothsig | 0:3ed424a8870a | 3 | #CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1280 |
krenbluetoothsig | 0:3ed424a8870a | 4 | CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 |
krenbluetoothsig | 0:3ed424a8870a | 5 | CONFIG_SYS_CLOCK_TICKS_PER_SEC=250 |
krenbluetoothsig | 0:3ed424a8870a | 6 | CONFIG_GPIO=y |
krenbluetoothsig | 0:3ed424a8870a | 7 | CONFIG_FLASH=y |
krenbluetoothsig | 0:3ed424a8870a | 8 | CONFIG_SOC_FLASH_NRF5=y |
krenbluetoothsig | 0:3ed424a8870a | 9 | CONFIG_MICROBIT_DISPLAY=y |
krenbluetoothsig | 0:3ed424a8870a | 10 | CONFIG_PWM=y |
krenbluetoothsig | 0:3ed424a8870a | 11 | CONFIG_PWM_NRF5_SW=y |
krenbluetoothsig | 0:3ed424a8870a | 12 | |
krenbluetoothsig | 0:3ed424a8870a | 13 | CONFIG_BT=y |
krenbluetoothsig | 0:3ed424a8870a | 14 | CONFIG_BT_RX_STACK_SIZE=1280 |
krenbluetoothsig | 0:3ed424a8870a | 15 | CONFIG_BT_CTLR_DUP_FILTER_LEN=0 |
krenbluetoothsig | 0:3ed424a8870a | 16 | CONFIG_BT_OBSERVER=y |
krenbluetoothsig | 0:3ed424a8870a | 17 | CONFIG_BT_BROADCASTER=y |
krenbluetoothsig | 0:3ed424a8870a | 18 | CONFIG_BT_PRIVACY=n |
krenbluetoothsig | 0:3ed424a8870a | 19 | |
krenbluetoothsig | 4:a52949a1cf72 | 20 | CONFIG_BT_MESH_DEBUG_USE_ID_ADDR=y |
krenbluetoothsig | 4:a52949a1cf72 | 21 | |
krenbluetoothsig | 0:3ed424a8870a | 22 | CONFIG_BT_MESH=y |
krenbluetoothsig | 0:3ed424a8870a | 23 | CONFIG_BT_MESH_RELAY=y |
krenbluetoothsig | 0:3ed424a8870a | 24 | CONFIG_BT_MESH_RX_SDU_MAX=36 |
krenbluetoothsig | 0:3ed424a8870a | 25 | CONFIG_BT_MESH_SUBNET_COUNT=1 |
krenbluetoothsig | 0:3ed424a8870a | 26 | CONFIG_BT_MESH_APP_KEY_COUNT=2 |
krenbluetoothsig | 0:3ed424a8870a | 27 | CONFIG_BT_MESH_MODEL_GROUP_COUNT=2 |
krenbluetoothsig | 0:3ed424a8870a | 28 | CONFIG_BT_MESH_ADV_BUF_COUNT=10 |
krenbluetoothsig | 0:3ed424a8870a | 29 | CONFIG_BT_MESH_PB_ADV=n |
krenbluetoothsig | 0:3ed424a8870a | 30 | CONFIG_BT_MESH_CFG_CLI=y |
krenbluetoothsig | 0:3ed424a8870a | 31 | |
krenbluetoothsig | 0:3ed424a8870a | 32 | CONFIG_BT_DEBUG_LOG=n |
krenbluetoothsig | 0:3ed424a8870a | 33 | CONFIG_BT_MESH_DEBUG=y |
krenbluetoothsig | 0:3ed424a8870a | 34 | #CONFIG_BT_MESH_DEBUG_NET=y |
krenbluetoothsig | 0:3ed424a8870a | 35 | CONFIG_BT_MESH_DEBUG_MODEL=y |
krenbluetoothsig | 0:3ed424a8870a | 36 | #CONFIG_BT_MESH_DEBUG_TRANS=y |
krenbluetoothsig | 0:3ed424a8870a | 37 | #CONFIG_BT_MESH_SELF_TEST=y |
krenbluetoothsig | 0:3ed424a8870a | 38 | #CONFIG_BT_MESH_IV_UPDATE_TEST=y |
krenbluetoothsig | 0:3ed424a8870a | 39 | #CONFIG_BT_MESH_DEBUG_PROV=y |
krenbluetoothsig | 0:3ed424a8870a | 40 | #CONFIG_BT_MESH_DEBUG_BEACON=y |
krenbluetoothsig | 0:3ed424a8870a | 41 | #CONFIG_BT_MESH_DEBUG_CRYPTO=y |
krenbluetoothsig | 0:3ed424a8870a | 42 | #CONFIG_BT_MESH_DEBUG_ADV=y |
krenbluetoothsig | 0:3ed424a8870a | 43 | #CONFIG_BT_MESH_DEBUG_ACCESS=y |