nRF5 SDK for Thread and Zigbee v2.0.0
Thread NCP Example

Table of Contents

The Thread NCP example demonstrates an OpenThread application that can serve as a low-power wireless Network Co-Processor (NCP) to communicate with Userspace WPAN Network Daemon (wpantund) on Unix-like operating systems. This example has similar functionality as the NCP 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

The NCP example is provided in four configurations - UART, USB, USB with bootloader, and SPI:

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 and Border Router cooperation, refer to Thread Border Router.

The NCP application starts in the disconnected state, and remains so until it is appropriately configured by the Border Router. After NCP is connected to the Border Router and the Border Router is rebooted, NCP 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 makefile in the following folder: <InstallFolder>\examples\thread\ncp.

Note
The example project for USB bootloader is the same for PCA10056 and PCA10059. For both boards, use the example located in the following folder: <InstallFolder>\examples\thread\cli\usb_bootloader\pca10056.

Testing

To test this example, you need the Nordic's Border Router and a node that can connect to the Internet.

  1. Build the example according to the instructions in Building examples.
  2. Program a development board with the selected NCP 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 the Thread Cloud CoAP Client Example to test connectivity to the Internet.

Documentation feedback | Developer Zone | Subscribe | Updated