Skip to content

Instantly share code, notes, and snippets.

@gtxaspec
Last active December 18, 2025 14:03
Show Gist options
  • Select an option

  • Save gtxaspec/d26198daadfb0a8b0a0edeae2d3fd58f to your computer and use it in GitHub Desktop.

Select an option

Save gtxaspec/d26198daadfb0a8b0a0edeae2d3fd58f to your computer and use it in GitHub Desktop.
ESP32-C6 RCP how to

ESP32-C6 as OpenThread RCP - Setup Guide

Here's how to flash your ESP32-C6 to work as an RCP (Radio Co-Processor) with Home Assistant's OpenThread Border Router add-on.

Step 1: Clone and Setup ESP-IDF

mkdir ~/esp-openthread && cd ~/esp-openthread
git clone -b v5.4.2 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh esp32c6
. ./export.sh

To enable native USB flashing (so you don't need a separate serial adapter), apply the following patch to add USB_SERIAL_JTAG support:

git cherry-pick 51bcec7ac67efff9e915239fa07fb1909b002d80

Step 2: Build the RCP Firmware

cd examples/openthread/ot_rcp
idf.py set-target esp32c6
idf.py menuconfig  # Optional - defaults work fine
idf.py build

Step 3: Flash the ESP32-C6

# Find your device (usually /dev/ttyACM0 or /dev/ttyUSB0)
ls /dev/tty*

# Erase and flash (replace PORT with your device)
idf.py -p PORT erase-flash
idf.py -p PORT flash

Step 4: Configure Home Assistant

In your OTBR add-on settings:

  • Device: /dev/ttyACM0 (or whatever your device shows as)
  • Baudrate: 460800
  • Flow Control: false

Pro tip: Consider using two ESP32-C6 boards - one for development/flashing and another as your dedicated RCP positioned away from your server's USB ports, OR using a USB to Serial adapter hooked up to the RCP. The farther your Thread radio is from USB 3.0 ports and other electronics, the better your 2.4GHz performance will be.

Note: If you get permission errors, add your user to dialout group: sudo usermod -a -G dialout $USER then logout/login.

That's it! Your ESP32-C6 is now ready to use as a Thread RCP with Home Assistant.

@RealMadEvil
Copy link

I'm filled with equal amounts of gratefulness and exasperation after one day spent troubleshooting.

Dude, thank you so much for this gist, I wouldn't be able to get started without it. But it's not enough.

I'm pretty sure with the hardware setup you were using the steps here were sufficient, but in my case it simply wasn't. I'm using nothing but a single cheap ESP32-C6 SuperMini board connected to my Pi 5 running HA over the board's single USB-C port. No matter what I did the HA OTBR container wouldn't be able to receive packets from the ESP32-C6 board even though the serial link established fine.

I'm planning a comprehensive writeup soon, but let me just drop here what I did for it to work:

* Apply the cherry pick you mentioned above, directly after cloning. For people who aren't proficient in git like me, you need to run `git cherry-pick --continue` right after the cherry pick command to complete the operation.

* You must use the `menuconfig` mentioned above, it's not optional. First run `export TERM=xterm` and then open it with `idf.py menuconfig`. Then go to `Component config → OpenThread → OpenThread → Thread Core Features → Thread Radio Co-Processor Feature → The RCP transport type` and select USB as the transport type.

* In the OTBR addon configuration settings you shouldn't select the port labeled as `/dev/ttyAMA..`. You should select the one labeled as `/dev/serial/by-id/USB_Espressif_USB_JTAG...`. Alternatively you can edit it as yaml to select the `/dev/ttyACM0` port but that doesn't show up in the UI.

I still didn't hook up a Thread sensor. I'll update this when I do to see whether it was ultimately successful.

thx m8, works for me as well

@rayanamal
Copy link

rayanamal commented Dec 18, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment