OpenThread RCP over Arduino header

Overview

This (virtual) shield can be used to connect a board with an Arduino R3 compatible header to an external OpenThread RCP [1] device. The RCP device would function as the Thread radio, while another board can function as the OpenThread host.

Requirements

An RCP radio device is needed for this shield to work. As an example, the reference from OpenThread using the nRF52840 DK is chosen as a demonstration. Refer to the OpenThread on nRF52840 Example website [2].

Both UART and SPI can be used as the transport, depending on the board connections.

The following was executed on Ubuntu 24.04 to build and flash the RCP firmware:

Preparation

git clone https://github.com/openthread/ot-nrf528xx.git --recurse-submodules
cd ot-nrf528xx
python3 -m venv .venv
source .venv/bin/activate
./script/bootstrap

Building

# Set -DOT_PLATFORM_DEFINES="UART_HWFC_ENABLED=1" to enable flow control
./script/build nrf52840 UART_trans -DOT_PLATFORM_DEFINES="UART_HWFC_ENABLED=0"

Flashing

arm-none-eabi-objcopy -O ihex build/bin/ot-rcp build/bin/ot-rcp.hex
nrfjprog -f nrf52 --chiperase --program build/bin/ot-rcp.hex --reset

Pins Assignments

The RCP firmware comes with default pins assigned, the following table lists both the Arduino header pins and the nRF52840DK pins.

Arduino Header Pin

Function (host)

nRF52840 DK Pin

D0

UART RX

P0.06

D1

UART TX

P0.08

Host specific

UART CTS

P0.05 (flow control)

Host specific

UART RTS

P0.07 (flow control)

Programming

Include --shield openthread_rcp_arduino_serial or --shield openthread_rcp_arduino_spi when you invoke west build for projects utilizing this shield. For example:

# From the root of the zephyr repository
west build -b stm32h573i_dk/stm32h573xx --shield openthread_rcp_arduino_serial samples/net/sockets/echo_client -- -DCONF_FILE="prj.conf overlay-ot-rcp-host-uart.conf"

References