Pelion Device Management example over 15.4 Thread for Thunderboard Sense 2 board
Dependencies: ICM20648 BMP280 Si1133 Si7210 AMS_CCS811_gas_sensor SI7021
You are viewing an older revision! See the latest version
Homepage
This example is known to work great on the following platforms:
- Thunderboard Sense 2 - on-chip 15.4 6LoWPAN and onboard SPI flash.
Follow the Quick-Start instructions: https://cloud.mbed.com/quick-start
Example functionality¶
This example showcases the following device functionality:
- Read onboard sensors, and report them as Pelion LWM2M resources:
- Barometric Pressure and Temperature (BMP280)
- Relative Humidity and Temperature (Si7021)
- Air quality - CO2 and tVOC (CCS811)
- Light intensity and UV level (Si1133)
- Hall effect and Temperature (Si7210)
- Accelerometer and Gyroscope (ICM20648)
- It also exposes the RGB LEDs for triggering flashes in a specific color
- On user button click, increment Pelion LWM2M button resource.
15.4 Thread setup¶
This example program requires that a Thread Border Router is available. A Border Router is a network gateway between a wireless 6LoWPAN mesh network and a backhaul network. It controls and relays traffic between the two networks. In a typical setup, a 6LoWPAN border router is connected to another router in the backhaul network (over Ethernet or a serial line) which in turn forwards traffic to/from the internet or a private company LAN, for instance.
Instructions how to set up a Thread Border Router
Use this example with Mbed CLI¶
1. Import the application into your desktop:
mbed import https://os.mbed.com/teams/SiliconLabs/code/pelion-example-tbsense2 cd pelion-example-tbsense2
2. Install the CLOUD_SDK_API_KEY
mbed config -G CLOUD_SDK_API_KEY <PELION_DM_API_KEY>
For instructions on how to generate your API key, please see the documentation.
3. Initialize firmware credentials (done once per repository). You can use the following command:
mbed dm init -d "<your company name in Pelion DM>" --model-name "<product model identifier>" -q --force
If above command do not work for your Mbed CLI, please consider upgrading Mbed CLI to version 1.8.x or above.
4. Compile and program:
mbed compile -t <toolchain> -m TB_SENSE_2
(supported toolchains : GCC_ARM / ARM / IAR)