nRF5 SDK for Thread and Zigbee v3.1.0
Thread NCP/RCP Example

Table of Contents

The Thread NCP/RCP example demonstrates an OpenThread application that can serve as a low-power wireless Network Co-Processor (NCP) or Radio Co-Processor (RCP) to communicate with Userspace WPAN Network Daemon (wpantund) on Unix-like operating systems. This example has similar functionality as the NCP/RCP example available in the official OpenThread repository, but has been adapted to use with the nRF5 SDK. For additional information on wpantund, refer to wpantund on GitHub.

Description

See the following table for the overview of the available NCP/RCP example configurations.

Configuration Description Stack variant used Available for
FTD UART Uses the UART communication and SEGGER J-Link as a UART-USB converter. Thread FTD PCA10056
FTD USB Uses the USB peripheral that is available in nRF52840 and communicates as a native USB CDC device. Thread FTD PCA10056, PCA10059 (with bootloader, see nRF52840 Dongle)
FTD SPI Uses the SPI Slave peripheral and requires additional wpantund configuration. Thread FTD PCA10056
Radio UART Uses the UART communication and SEGGER J-Link as a UART-USB converter. It is used for RCP topology and requires additional wpantund configuration as well as POSIX OpenThread application. Thread Radio PCA10056, PCA10068
Radio SPI Uses the SPI Slave peripheral. It is used for RCP topology and requires additional wpantund configuration as well as POSIX OpenThread application. Thread Radio PCA10056, PCA10068

If native USB CDC connectivity is used on hosts running on Windows XP or Windows 7, you must manually install the nordic_cdc_acm.inf driver that is located at <InstallFolder>/examples/usb_drivers.

Hosts running on Windows 8 (and later) will automatically pick the correct driver (usbser.sys).

This example can be used along with Nordic’s Border Router solution to provide Internet connectivity to the Thread network. For more information about NCP/RCP and Border Router cooperation, refer to Thread Border Router.

The NCP/RCP application starts in the disconnected state, and remains so until it is appropriately configured by the Border Router. After NCP/RCP is connected to the Border Router and the Border Router is rebooted, NCP/RCP will try to connect to the existing network or form a new one.

Network state is indicated by BSP_LED_0. When the device is not connected to a network, the LED blinks at a 200-ms period. Once the device connects to a network, either as a Child or as a Leader, the LED stops blinking and remains turned on.

Setup

You can find the source code and the makefiles for NCP/RCP in the following folder: <InstallFolder>/examples/thread/ncp.

Testing

Precondition
  • To test this example, you need the Nordic's Border Router and a node that can connect to the Internet.
  • Make sure you disabled the Mass Storage Device and forced Hardware Flow Control in SEGGER J-Link. See Configuring SEGGER J-Link software for details.

To test the example:

  1. Build the example according to the instructions in Building examples.
  2. Program a development board with the selected NCP/RCP application (UART, USB, or SPI).
  3. Connect the board to the Border Router, depending on the configuration:
  4. Run the Border Router.
  5. You can use Thread Google Cloud Platform CoAP Example and Thread thethings.iO Cloud CoAP Client Example to test connectivity to the Internet.

Documentation feedback | Developer Zone | Subscribe | Updated