nRF5 SDK for Thread and Zigbee v4.0.0
OpenThread libraries

Table of Contents

The nRF5 SDK for Thread includes a pre-built OpenThread stack. It is provided as binary libraries in UART, SPI, and USB variants, with UART being the default one. These Thread libraries contain numerous features not required by the Thread specification. They are meant to showcase the potential of OpenThread on Nordic's platforms.

If you want to build your own project, you must include all of the mandatory libraries and can add some of the optional libraries. The nRF52840, nRF52833, and nRF52811 SoCs use different libraries. You can find them at the following path: <InstallFolder>/external/openthread/lib. Currently, libraries for GCC, IAR, and Keil 5 are provided.

Note
The pre-built OpenThread libraries do not support DHCPv6 Client/Server.

Refer to the release notes for the ID of the OpenThread commit that has been used both for generating the pre-built Thread stack libraries and for testing and verification. You can also compile the latest version of the libraries from GitHub on your own. See Building the latest OpenThread libraries for details.

Refer to API for detailed API reference for the libraries.

The libraries for both SoCs are related to different stack variants. See the following table for an overview.

SoC FTD MTD RCP NCP UART USB SPI CryptoCell
nRF52840
nRF52833
nRF52811
*
Supported stack variants per SoC

*: nRF52811 can act as MTD, but the following functionalities are not supported: BORDER_AGENT, COMMISSIONER, JOINER, SERVICE, UDP_FORWARD, ECDSA, SNTP_CLIENT, COAPS.


Mandatory libraries

Mandatory OpenThread libraries for nRF52840 and nRF52833 are different than the libraries for nRF52811.

nRF52840 and nRF52833 mandatory libraries

The following table lists mandatory libraries for nRF52840 and nRF52833. Replace nrf52xxx in the file name with either nRF52840 or nRF52833, based on the device you are using. Where multiple files are mentioned, choose only one, depending on your configuration.

nRF52840 and nRF52833 support the FTD, MTD, and Radio Co-Processor (RCP) OpenThread stack variants.

Name Description
- libopenthread-ftd.a
- libopenthread-mtd.a
- libopenthread-radio.a
OpenThread’s Thread stack implementation of the Full Thread Device (FTD), the Minimal Thread Device (MTD), or the radio-only (RCP) library, respectively.
- libopenthread-nrf52xxx-sdk.a
- libopenthread-nrf52xxx-sdk-usb.a
- libopenthread-nrf52xxx-sdk-spi.a
- libopenthread-nrf52xxx-softdevice-sdk.a
- libopenthread-nrf52xxx-softdevice-sdk-usb.a
- libopenthread-nrf52xxx-softdevice-sdk-spi.a
OpenThread’s platform implementation library for serial communication through UART, USB, or SPI (with NCP or NCP Radio), respectively, for single PHY or multiprotocol operation. Multiprotocol support is indicated by softdevice in the name.
libopenthread-platform-utils.a OpenThread’s platform util that contains the flash manager library.
- libnordicsemi-nrf52xxx-radio-driver.a
- libnordicsemi-nrf52xxx-radio-driver-softdevice.a
OpenThread's IEEE802.15.4 radio driver library for single PHY or multiprotocol operation. Multiprotocol support is indicated by softdevice in the name.
Mandatory Mbed TLS library files Mbed TLS is a TLS/SSL library with support for operations used by OpenThread: ECC, SHA-256, and AES ECB. See Mandatory Mbed TLS library for more information.
nRF52840 and nRF52833 mandatory libraries

nRF52811 mandatory libraries

The following table lists mandatory libraries for nRF52811. Where multiple files are mentioned, choose only one, depending on your configuration.

nRF52811 supports the MTD and Radio Co-Processor (RCP) OpenThread stack variants.

Name Description
- libopenthread-mtd.a
- libopenthread-radio.a
OpenThread’s Thread stack implementation of the Full Thread Device (FTD) or the radio-only (RCP) library, respectively.
- libopenthread-nrf52811-sdk.a
- libopenthread-nrf52811-sdk-spi.a
OpenThread’s platform implementation library for serial communication through UART or SPI (with NCP or NCP Radio), respectively.
libopenthread-platform-utils.a OpenThread’s platform util that contains the flash manager library.
libnordicsemi-nrf52811-radio-driver.a OpenThread's IEEE802.15.4 radio driver library for single PHY operation.
Mandatory Mbed TLS library files Mbed TLS is a TLS/SSL library with support for operations used by OpenThread: ECC, SHA-256, and AES ECB. See Mandatory Mbed TLS library for more information.
nRF52811 mandatory libraries

Mandatory Mbed TLS library

The Mbed TLS library is mandatory for nRF52840, nRF52833, and nRF52811.

The Mbed TLS cryptographic library comes in the following variants:

The Mbed TLS library for GCC and IAR on nRF52840 comes by default in the variant with the hardware acceleration of cryptographic operations on CryptoCell 310. Keil only provides software only version of the library, without the CryptoCell 310.

Mbed TLS library with CryptoCell 310 for nRF52840

CryptoCell hardware is present only in nRF52840.

The CryptoCell library is used by OpenThread to accelerate cryptographic operations (AES-EBC, ECJ-PAKE, and SHA256) in the Mbed TLS library.

This section lists only libraries required for the CryptoCell support. For more information about how to implement it in your application, see ARM CryptoCell 310 module variant.

Depending on the compiler, use a different set of precompiled library files:

Make sure to use the correct configuration files and include the required directories to ensure the correct operation of the cryptographic library:

Mbed TLS library with software cryptography only

This section lists only library files for software cryptography. For information about how to implement this variant in your application, see Software-only variant.

Depending on your device and compiler, use different precompiled libraries from <InstallFolder>/external/openthread/lib:

Make sure to use the correct configuration files and include the required directories to ensure the correct operation of the cryptographic library (replace the nrf528xx in the file name with the name of the device that you are using):


Optional libraries

The optional OpenThread libraries are different for each available configuration: FTD, MTD, or Radio Co-Processor (RCP). See the Description column for more information.

FTD MTD RCP Description
libopenthread-cli-ftd.a libopenthread-cli-mtd.a - Command Line Interface (CLI) library for UART or USB CDC transport.
libopenthread-ncp-ftd.a libopenthread-ncp-mtd.a libopenthread-rcp.a Network Co-Processor (NCP) library for UART or USB CDC transport.
libopenthread-ncp-ftd-spi.a libopenthread-ncp-mtd-spi.a libopenthread-rcp-spi.a Network Co-Processor (NCP) library for SPI transport.
Optional FTD and MTD libraries

IEEE EUI-64 address

When the Thread device is configured to obtain the Thread Network security credentials with either Thread Commissioning or an out-of-band method, the extended MAC address should be constructed out of the globally unique IEEE EUI-64. This must be done before Building the latest OpenThread libraries.

The IEEE EUI-64 address consists of two parts:

By default, the device uses Nordic Semiconductor's MA-L (f4-ce-36). You can modify it by overwriting the OPENTHREAD_CONFIG_STACK_VENDOR_OUI define in openthread-core-nrf52840-config.h or openthread-core-nrf52811-config.h. This value must be publicly registered by the IEEE Registration Authority.

You can also provide the full IEEE EUI-64 address by providing a custom otPlatRadioGetIeeeEui64 function. To do this, define the flag OPENTHREAD_CONFIG_ENABLE_PLATFORM_EUI64_CUSTOM_SOURCE.

After the Thread Network security credentials have been successfully obtained, the device uses randomly generated extended MAC address.


Documentation feedback | Developer Zone | Subscribe | Updated