Thread: Co-processor¶
Overview¶
The Thread Co-processor sample demonstrates how to implement OpenThread’s Co-processor designs inside the Zephyr environment. The sample uses the Radio co-processor (RCP) architecture.
The sample is based on Zephyr’s OpenThread co-processor sample. However, it customizes Zephyr’s sample to fulfill the nRF Connect SDK requirements (for example, by increasing the stack size dedicated for the user application), and also extends it with features such as:
- Increased Mbed TLS heap size.
- Lowered main stack size to increase user application space.
- No obsolete configuration options.
- Vendor hooks for co-processor architecture allowing users to extend handled properties by their own, customized functionalities.
- Thread 1.2 features.
Requirements¶
Before you start, check that you have the required hardware and software:
- 1x nRF54L15 Connect Kit
- 1x U.FL cabled 2.4 GHz Antenna (included in the box)
- 1x USB-C Cable
- A computer running macOS, Ubuntu, or Windows 10 or newer
Attaching the 2.4 GHz antenna¶
Before applying power to the board, ensure the U.FL cabled 2.4 GHz antenna is properly installed.
Building the sample¶
To build the sample, follow the instructions in Getting Started Guide to set up your preferred building environment.
Use the following steps to build the Thread Co-processor sample on the command line.
-
Open a terminal window.
-
Go to
NCS-Project/nrf54l15-connectkit
repository cloned in the Getting Started Guide. -
Build the sample using the
west build
command, specifying the board (following the-b
option) asnrf54l15_connectkit/nrf54l15/cpuapp
.Tip
The
-p
always option forces a pristine build, and is recommended for new users. Users may also use the-p auto
option, which will use heuristics to determine if a pristine build is required, such as when building another sample. -
After building the sample successfully, the firmware with the name
merged.hex
can be found in thebuild
directory.
Flashing the firmware¶
Connect the nRF54L15 Connect Kit to the computer with a USB-C cable:
Then flash the sample using west flash
:
Tip
In case you wonder, the west flash
will execute the following command:
Testing¶
After programming the sample, test it by performing the following steps:
-
Connect the board to your computer using the USB-C Cable.
-
Get the primary COM port that your computer uses to communicate with the nRF54L15 (e.g.,
/dev/cu.usbmodem14502
). -
Build the OpenThread POSIX applications by performing the following steps:
-
Enter the openthread directory:
-
Install the OpenThread dependencies:
-
Build the applications with the required options. For example, to build the
ot-cli
application, run the following command:Alternatively, to build the
ot-daemon
andot-ctl
applications, run the following command:
You can find the generated applications in
./build/posix/src/posix/
. -
-
Use the following radio URL parameter to connect to the board:
Replace the following parameters:
ncp_uart_device
- Specifies the location of the device, for example:/dev/cu.usbmodem14502
.baud_rate
- Specifies the baud rate to use. The Thread Co-Processor sample supports baud rate1000000
.backbone_link
- Specifies Backbone link for communication with external network. This parameter can be omitted.
-
From this point, you can follow the Testing instructions in the CLI sample by removing the
ot
prefix for each command.