NCP Interface

The OpenThread stack runs on the CC13x2 or CC26x2 while the application is executed on a separate external host processor. The host processor communicates with the NCP device via a serial interface, such as UART or SPI, using the Spinel Protocol.

Spinel Protocol

Spinel is a general management protocol for enabling a host device to communicate with and manage an NCP. For more information, see the Internet-Draft for the Spinel Protocol.

This protocol is included with the OpenThread NCP library libopenthread_ncp_ncp_<platform>, and source code found at /src/ncp. A Python CLI tool called Pyspinel is available for testing purposes. For more information, see the Pyspinel GitHub repository.

wpantund

wpantund is a user-space network interface driver/daemon that provides a native IPv6 network interface to an NCP. It was written and developed by Nest Labs to better support Thread connectivity on Unix-like operating systems. It uses Spinel to communicate with an NCP.

wpantund is not included with OpenThread. For more information, see the wpantund GitHub repository.

Serial Interface Configuration

TI-OpenThread supports Spinel to be configured over both UART and SPI. By default, the TI-OpenThread NCP example is configured for UART. but can be configured by SPI with the following changes:

  • In the Device configuration under libopenthread_ncp_<platform>, change enable and disable the following:

    • Set OPENTHREAD_ENABLE_NCP_UART to 0
    • Set OPENTHREAD_ENABLE_NCP_SPI to 1

The device uses the SPI1 peripheral for the Spinel interface, and assigns the following PINs for SPI1:

PIN DIO
SPI1_MISO DIO 24
SPI1_MOSI DIO 25
SPI1_CLK DIO 26
SPI1_CSN DIO 27