Thread tools

When working with Thread in nRF Connect SDK, you can use the following tools during Thread application development:

Using Thread tools is optional.

Thread Border Router

Thread Border Router is a specific type of Border Router device that provides connectivity from the IEEE 802.15.4 network to adjacent networks on other physical layers (such as Wi-Fi or Ethernet). Border Routers provide services for devices within the IEEE 802.15.4 network, including routing services for off-network operations.

Typically, a Border Router solution consists of the following parts:

  • Application based on the Network Co-Processor (NCP) design or its Radio Co-Processor (RCP) variant compatible with the IEEE 802.15.4 standard. This application can be implemented for example on an nRF52 device.

  • Host-side application, usually implemented on a more powerful device with incorporated Linux-based operating system.

nRF Connect SDK does not provide the complete Thread Border Router solution. For development purposes, you can use OpenThread Border Router , an open-source Border Router implementation that you can set up either on your PC using Docker or on Raspberry Pi. OpenThread Border Router is compatible with Nordic Semiconductor devices.

wpantund

wpantund is a utility for providing a native IPv6 interface to a Network Co-Processor. When working with Thread, it is used for the interaction with the application by the following samples:

The interaction is possible using commands proper to wpanctl, a module installed with wpantund.

Note

The tool is available for Linux and macOS and is not supported on Windows.

Installing wpantund

For installation and initial configuration, see wpantund Installation Guide.

Configuring wpantund

When working with samples that support wpantund, complete the following steps to start the wpantund processes:

  1. Open a shell and run the wpantund process by using the following command:

    wpantund -I <network_interface_name> -s <serial_port_name> -b <baudrate>
    

    For baudrate, use value 1000000. For serial_port_name, use the value that is valid for the sample. For network_interface_name, use a name of your choice. For example, leader_if.

  2. Open another shell and run the wpanctl process by using the following command:

    wpanctl -I leader_if
    

    This process can be used to control the connected NCP board.

Once wpantund and wpanctl are started, you can start running wpanctl commands to interact with the board.

Using wpanctl commands

To issue a wpanctl command, run it in the wpanctl shell. For example, the following command checks the the NCP board state:

wpanctl:leader_if> status

The output will be different depending on the board and the sample.

The most common wpanctl commands are the following:

  • status - Checks the board state.

  • form "My_OpenThread_network" - Sets up a Thread network with the name My_OpenThread_network.

  • get - Gets the values of all properties.

  • get <property> - Gets the value of the requested property. For example, get NCP:SleepyPollInterval will list the value of the NCP:SleepyPollInterval property.

  • set <property> <value> - Sets the value of the requested property to the required value. For example, set NCP:SleepyPollInterval 1000 will set the value of the NCP:SleepyPollInterval property to 1000.

For the full list of commands, run the help command in wpanctl.