ESP32-C6 OpenThread RCP: radio transport before border routing¶
Reviewed 18 October 2026. Learn where the Thread stack runs, configure a matched radio link, and distinguish a functioning Thread node from a border router. This revision inspected upstream source; it did not flash a C6 or run OTBR on Jetson. The old text's claims about “your validated UART” and missing kernel flags were not supported by retained bench evidence and are not prerequisites here.
Start with: networking and the actual CPU transport lab. Time: 60–90 minutes for source/architecture work; hardware bring-up is a separate session.
1. RCP and NCP describe stack placement¶
In an RCP design, the Linux host runs the OpenThread core and the device supplies the radio and minimal MAC functions. In an NCP design, the coprocessor runs the network stack and exposes higher-level operations to the application host. UART versus SPI does not determine which design you have. Spinel is used in OpenThread coprocessor designs; framing and capabilities must match. OpenThread architecture.
Thread carries IPv6 over an IEEE 802.15.4 mesh. A border router connects that network to an infrastructure IP network. A Thread leader manages a partition; it is not a central Wi-Fi access point and does not by itself establish external reachability.
2. Choose one of two current transports¶
| Transport | Firmware | Linux endpoint |
|---|---|---|
| Dedicated UART or supported USB Serial/JTAG RCP | ESP-IDF examples/openthread/ot_rcp |
The serial/USB device selected by firmware and board |
| Hosted SPI/SDIO RCP on C6 | Current ESP-Hosted-Linux with RCP enabled | /dev/esp_rcp0 from the hosted driver |
The second route is now supported upstream and can share the hosted link with Wi-Fi/Bluetooth. It is not the old NG firmware by another name. The dedicated second-radio route remains useful for isolating RF contention and resets. Current hosted RCP contract.
Use one owner per endpoint. A serial monitor, ot-daemon and otbr-agent cannot all consume the same binary stream. A board's programming port need not be its configured RCP data port.
3. Inspect a reproducible standalone firmware configuration¶
For a source-reviewed baseline, ESP-IDF v5.5.4 resolves to commit 735507283d5b2f9fb363a1901172dbd9e847945d. Its RCP example configuration defines UART0 at 460800 baud, 8N1, no hardware flow control when the UART backend is selected. Manual RX/TX pin configuration is separate; unchanged defaults do not imply GPIO4/5 on every board.
On a build machine with that IDF installed and exported:
Select the intended RCP backend and UART pins, then save the resulting configuration and binary hash. Flash with idf.py -p PORT flash using the discovered flashing port. These commands have not been executed for this course revision. The example README and your actual header/source take precedence over a copied baud assumption.
For direct UART, cross TX→RX and RX←TX, share ground and use compatible logic voltage. Confirm the carrier's UART pinmux and Linux device mapping. Do not assume /dev/ttyTHS1, disable nvgetty indiscriminately, or attach a 5 V serial adapter. Identify an actual conflicting console/service before changing it. Serial connection guidance.
4. Validate an OpenThread host before full routing¶
At reviewed OpenThread commit 227561fe2446fa57e8a1aa192c81e31396db9ac9, the documented POSIX daemon build is:
Run those inside an intentionally pinned OpenThread checkout; they install/build dependencies and were not run here. The daemon connects to an RCP URL. For a UART configured as above, the shape is:
For the hosted character device, upstream documents spinel+hdlc+uart:///dev/esp_rcp0; it is a driver-provided byte stream, not proof of a physical UART at that path. OpenThread daemon instructions.
First inspect protocol version, RCP capabilities and clean reset/response exchange. Baud mismatch, unsupported Spinel API versions and contention can all produce timeouts. Do not interpret every timeout as missing Linux IPv6 routing.
For a new isolated lab network, use the matching ot-ctl:
sudo ot-ctl dataset init new
sudo ot-ctl dataset commit active
sudo ot-ctl ifconfig up
sudo ot-ctl thread start
sudo ot-ctl state
sudo ot-ctl ipaddr
A new dataset changes network identity and credentials. Preserve the intended active dataset for existing devices; do not recreate it on every reboot. Record network state without publishing network keys.
5. Add border routing as a separate stage¶
OTBR adds infrastructure routing, service discovery and related border functions. Choose the actual infrastructure interface from ip route/ip -br address; l4tbr0 is not universally an Internet uplink. Bind the radio URL to the endpoint already validated above.
Current official instructions distinguish native installation from Docker installation. The Docker route exposes the radio device and /dev/net/tun, uses the host network and network-administration capability, and configures forwarding on the host. A container does not replace the host kernel or add missing compiled kernel features.
If a particular run fails to create a multicast-routing socket, inspect that host's kernel configuration and error context:
If /proc/config.gz is unavailable, inspect the installed matching kernel config, often /boot/config-$(uname -r), or the build configuration. The absence of the config file is not proof that a feature is disabled. Requirements also depend on enabled OTBR features. Do not claim every Jetson image lacks multicast routing, or rebuild a kernel before identifying the failing operation.
The checked OTBR source (6e50b731e86457f7f42e69743cf794796b48ccf4) explicitly rejects the old OTBR_MDNS=avahi selection; use the supported mDNS implementation for the chosen build. This is another reason to preserve build flags and submodule revisions. Current CMake options.
6. Test an end-to-end claim¶
Test progressively: host↔RCP protocol, two Thread nodes exchanging data, routed IPv6 from an infrastructure host to a Thread device, then service discovery if required. Record addresses and routes appropriate to each test. A process marked active, an interface named wpan0, or state leader is not sufficient evidence for all four.
Disconnect/reconnect the RCP and check recovery. For hosted RCP, a firmware generation change invalidates the old stream and can interrupt Wi-Fi/Bluetooth too. The service must reopen/reinitialize deliberately; it must not splice bytes from the old session into a new frame.
Worked budget: 100 serialized bytes on 460800-baud 8N1 UART occupy at least 100 × 10 / 460800 = 2.17 ms. HDLC escaping, queueing, radio access and a response add more time. This is a serialization calculation, not a measured Thread latency.
7. Exercises and evidence¶
- Explain why a successful leader election does not verify external routing. Answer: the first occurs inside a Thread partition; the second requires working infrastructure routes and border functions.
- Explain why an
ot_rcpradio can appear in a Zigbee gateway example. Answer: the radio protocol supplies IEEE 802.15.4 primitives; the compatible host stack determines the network protocol. This does not make Thread and Zigbee interchangeable over the air. - Submit a two-column host/RCP responsibility diagram, exact version/configuration records, and a fresh-versus-stale message policy from the CPU lab. Add hardware logs only for stages actually run.
Continue to Zigbee stack-placement options if your target devices speak Zigbee rather than Thread.