nRF5 SDK for Thread and Zigbee v2.0.0
BLE and Thread Template Example

Table of Contents

The dynamic BLE-Thread Template example demonstrates the usage of the dynamic multiprotocol method. This example is a merge of a simplified version of BLE Peripheral Template and Thread CLI Example applications.

The nRF52840 device operates simultaneously on Thread and BLE. It joins the Thread network as a Thread FTD device. It also acts as a BLE Peripheral device sending BLE connectable advertisements.

This example provides OpenThread’s built-in command line interface (CLI), and automatically attaches to the Thread network.

Description

LED assignments:

Button assignments:

Setup

You can find the source code in the following folder: <InstallFolder>\examples\multiprotocol\ble_thread\ble_thread_dyn_template

Testing

  1. Prepare at least one nRF52840 Preview Development Kit and an Android smartphone.
  2. On the smartphone, install nRF Connect for Mobile.
  3. Compile and program the SoftDevice and the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  4. Connect to the device from nRF Connect (the device is advertising as 'Nordic_Template'). Observe that the BSP_INDICATE_CONNECTED state is indicated.
  5. Disconnect the device in nRF Connect and observe that the BSP_INDICATE_ADVERTISING state is indicated.
  6. Connect to the board through UART. The application uses the following UART settings:
    • Baud rate: 115200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: None
    Refer to OpenThread CLI reference for complete reference of the OpenThread Command Line Interface.
  7. Run the state command to check the state of the device in the Thread network:
    > state
    leader
    Done
    The actual state may differ, depending on when the device joined the network.

Documentation feedback | Developer Zone | Subscribe | Updated