Mbed OS Device Management example for various Silicon Labs boards.

DEPRECATED

This example application is not maintained and not recommended. It uses an old version of Mbed OS, Pelion DM, and Arm toolchain. It doesn't work with Mbed Studio.

Please use: https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-pelion/

This example is known to work great on the following platforms:

Follow the Quick-Start instructions: https://cloud.mbed.com/quick-start

Thunderboard Sense 2 EFM32 Giant Gecko 11

Example functionality

This example showcases the following device functionality:

  • On user button click, increment Pelion LWM2M button resource.
  • Allow the user to change the state of the board LED from Pelion LWM2M led_state resource and PUT request.

Use this example with Mbed CLI

1. Import the application into your desktop:

mbed import https://os.mbed.com/teams/SiliconLabs/code/pelion-example-common

cd pelion-example-common

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 <TARGET_BOARD>

(supported toolchains : GCC_ARM / ARM / IAR)

Committer:
screamer
Date:
Wed Mar 27 19:02:10 2019 +0000
Revision:
5:1456ec2e8485
Parent:
0:bf13418ff7b0
Improve inline documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:bf13418ff7b0 1 """
screamer 0:bf13418ff7b0 2 mbed SDK
screamer 0:bf13418ff7b0 3 Copyright (c) 2016 ARM Limited
screamer 0:bf13418ff7b0 4
screamer 0:bf13418ff7b0 5 Licensed under the Apache License, Version 2.0 (the "License");
screamer 0:bf13418ff7b0 6 you may not use this file except in compliance with the License.
screamer 0:bf13418ff7b0 7 You may obtain a copy of the License at
screamer 0:bf13418ff7b0 8
screamer 0:bf13418ff7b0 9 http://www.apache.org/licenses/LICENSE-2.0
screamer 0:bf13418ff7b0 10
screamer 0:bf13418ff7b0 11 Unless required by applicable law or agreed to in writing, software
screamer 0:bf13418ff7b0 12 distributed under the License is distributed on an "AS IS" BASIS,
screamer 0:bf13418ff7b0 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
screamer 0:bf13418ff7b0 14 See the License for the specific language governing permissions and
screamer 0:bf13418ff7b0 15 limitations under the License.
screamer 0:bf13418ff7b0 16 """
screamer 0:bf13418ff7b0 17
screamer 0:bf13418ff7b0 18 from os.path import join, abspath, dirname
screamer 0:bf13418ff7b0 19
screamer 0:bf13418ff7b0 20 #ROOT = abspath(join(dirname(__file__), "."))
screamer 0:bf13418ff7b0 21
screamer 0:bf13418ff7b0 22 ##############################################################################
screamer 0:bf13418ff7b0 23 # Build System Settings
screamer 0:bf13418ff7b0 24 ##############################################################################
screamer 0:bf13418ff7b0 25 #BUILD_DIR = abspath(join(ROOT, "build"))
screamer 0:bf13418ff7b0 26
screamer 0:bf13418ff7b0 27 # ARM
screamer 0:bf13418ff7b0 28 #ARM_PATH = "C:/Program Files/ARM"
screamer 0:bf13418ff7b0 29
screamer 0:bf13418ff7b0 30 # GCC ARM
screamer 0:bf13418ff7b0 31 #GCC_ARM_PATH = ""
screamer 0:bf13418ff7b0 32
screamer 0:bf13418ff7b0 33 # IAR
screamer 0:bf13418ff7b0 34 #IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm"
screamer 0:bf13418ff7b0 35
screamer 0:bf13418ff7b0 36 # Goanna static analyser. Please overload it in private_settings.py
screamer 0:bf13418ff7b0 37 #GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
screamer 0:bf13418ff7b0 38
screamer 0:bf13418ff7b0 39 #BUILD_OPTIONS = []
screamer 0:bf13418ff7b0 40
screamer 0:bf13418ff7b0 41 # mbed.org username
screamer 0:bf13418ff7b0 42 #MBED_ORG_USER = ""
screamer 0:bf13418ff7b0 43
screamer 0:bf13418ff7b0 44 # Print compiler warnings and errors as link format
screamer 0:bf13418ff7b0 45 #PRINT_COMPILER_OUTPUT_AS_LINK = False