Example Applications

This section provides an overview of the TI-OpenThread out-of-box example applications and instructions on how to run them.

Note

All TI-OpenThread example applications are supported for the following three boards: CC26X2R1_LAUNCHXL, CC1352R1_LAUNCHXL and CC1352P2_LAUNCHXL. By default the READMEs below will link to the CC26X2R1_LAUNCHXL board. If a different board is intended to be used, just replace the board name in the path to find the corresponding README document.

Project Configurations

Some example applications supports both an FTD and an MTD device configuration, and therefore two types of project configurations exist for such example applications: one with the <name>_ftd_* naming convention for the FTD configuration, and one with the <name>_mtd_* naming convention for the MTD naming convention. For example, the CLI example has both a cli_ftd_* and a cli_mtd_* project configuration for a FTD and MTD configuration, respectively.

All example applications support the CCS, GCC and IAR toolchains, and therefore three project configurations exist for each example application: one with the *_ccs suffix which uses CCS, one with the *_gcc suffix which uses GCC, and one with the *_iar suffic which uses IAR.

Both Thread device configuration and toolchain selection is configured separately, and therefore multiple projects are available for some example projects as a combination of said configurations.

Factory Reset

Some of the example applications contain convenience functionality to reset the non-volatile storage on the internal flash, as well as a reset to some stored factory image. Refer to each respective section for instructions on how to perform each kind of factory reset.

Reset of Non-Volatile Storage

Non-volatile storage (NVS) in the internal flash stores information about the Thread network which allows Thread devices to restart network operations after a reset without user intervention. However, in order for a Thread device to forget a Thread network it has been commissioned to, the NVS must be erased.

For the end-product examples, a convenience functionality has been added in order to easily erase NVS and quickly start fresh. Given that the running application supports this functionality, do the following steps to reset NVS:

  1. Hold down the right button (BTN-2) on the CC13x2 or CC26x2 LaunchPad.
  2. While holding down the right button, press the reset button.
  3. At startup the application will check the pin state and jump to the invalidate-NVS routine.

Warning

Reset of NVS does not erase the actual application image on the internal flash.

Revert to Factory Image

OAD-enabled examples can revert back to a factory image, if a factory image is present on the external flash. Given that a factory image is stored, do the following steps to reset to the factory image:

Given that the running application supports this functionality, do the following steps to reset to factory image:

  1. Hold down the left button (BTN-1) on the CC13x2 or CC26x2 LaunchPad.
  2. While holding down the left button, press the reset button.
  3. At startup the application will check the pin state and jump to the reset-to-factory-image routine.

Warning

Reverting to the factory image does not erase NVS in the internal flash.

The application should check that a valid factory image is present before reverting. This can be done by ensuring there is valid metadata in external flash page 0. See OAD External Flash Image Header for more information.

End Product Examples

Door Lock

The door lock project presents a simple CoAP server representing a door lock. Only an MTD configuration is available. The door lock example is best used with a Sharp Memory LCD and microSD BoosterPack, but also can be used with only the basic UART log.

There are also OAD-enabled variants of the Door Lock example. For more information, please refer to Section Door Lock OAD.

Shade

The shade project presents a simple CoAP server representing window blinds. Only an MTD configuration is available. The shade example is best used with a Sharp Memory LCD and microSD BoosterPack, but also can be used with only the basic UART log.

Temperature Sensor

The Temperature Sensor project presents a simple CoAP server and client representing an embedded temperature sensor. Only an MTD configuration is available.

Thermostat

The thermostat project presents a simple CoAP server representing a thermostat. Only an FTD configuration is available. The thermostat example is best used with a Sharp Memory LCD and microSD BoosterPack, but also can be used with only the basic UART log.

Other Examples

Command Line Interface (CLI)

The CLI projects can be used to interact with and explore the different aspects of the Thread protocol. Both an FTD and MTD configuration is available. The CLI interface OpenThread presents is also used for certification with the Thread Group test harness.

There is also an OAD-enabled variant of the CLI example. For more information, please refer to Section OAD CLI.

Network Co-Processor (NCP)

The NCP project is used to connect the TI-OpenThread to a host processor. Only an FTD configuration is available. For more information about the interface between the NCP and host processor, see Section NCP Interface.

Border Router

The border router example is a basic implementation of a Thread Border Router, which bridges IP traffic from an external IP network to the Thread network and vice-versa. A Thread Border Router also enables off-mesh commissioning of new devices into the Thread network.

OAD Server

The OAD Server example is a C program meant to run on a Linux environment which is connected to a border router. For more information, see Section OAD Server.