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.
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.shTo 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 51bcec7ac67efff9e915239fa07fb1909b002d80cd examples/openthread/ot_rcp
idf.py set-target esp32c6
idf.py menuconfig # Optional - defaults work fine
idf.py build# 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 flashIn 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.
UPDATE: The steps here are not sufficient. Here's the complete guide: https://community.home-assistant.io/t/make-your-own-thread-border-router-for-just-5/962780/1
I'm filled with equal amounts of gratefulness and exasperation after one full 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'll update this post once there is a complete guide.