DIY Standalone Thread Border Router using ESP32-C6 and ESP-IDF

I initially set up my thread network in HA using this Make your own Thread Border Router for just $5 there’s a precompiled image so its easy to flash

Then I reflashed with this. Make sure to copy the dataset <TLV hex string> from HA before reflashing as it wont show when the OTBR device is disconnected.

Thanks @dreed47 for this amazing tutorial.

I’m new to matter/thread/home-assistants/darkmatter/quantumgravity, so I thought I’d share what I did to successfully setup everything.

My stack & gear:

  • Seeed Studio XIAO ESP32C6 (4MB) with a cute 3D printed case: https://makerworld.com/en/models/1723550-seeed-studio-xiao-esp32-c6-snap-fit-wall-mount#profileId-1829704
  • HA running on an old Intel Mac (via UTM)
  • IKEA Kajplats smart bulb is the only matter over thread device I have right now
  • No other TBR

The problem I faced with this tutorial:

  • I followed the steps mentioned by @storm70 (many thanks mate!) but wasn’t sure of the ot dataset set active <TLV hex string> command I thought I’d skip and see what happens.
  • Well, The Thread app on my HA detected the ESP32 but it wasn’t on preferred network. Unsurprisingly, I couldn’t get anything work on the companion app too.
  • After a couple hours of searching the web (and soul), I figured I need a Thread network and its credentials to make this setup work.
  • So, I thought of following this tutorial - $5 TBR to get the Active dataset TLV.
  • Once I got the Active dataset TLV, everything worked!

Complete Procedure:

  • Follow the $5 TBR tutorial:

    • I just used the pre-compiled binary (used my M2 mac)
    • Connected my board to my Intel mac (running HA)
    • In UTM, enabled the USB 3.0 devices
    • Then, when the HA starts, used the “USB Devices option” from the titlebar and selected my ESP32 to make it available in the app.
    • Installed Open Thread Border Router app. When you start it, it will prompt you to configure, and if you’ve done everything right so far, you should see your device. Select it and disable H/W flow control (not sure if it’s necessary though) and save.
    • After you start the TBR app, go to Thread app and you should see a preferred network!
    • Click the info (i) icon and copy the Active dataset TLVs. Maybe copy and save all the info; never know when you might need it.
  • Now, follow the instructions in this post. I followed @storm70’s setup.

  • Install Companion app on your phone and Sync Thread credentials.

    • On Android Settings → Companion app → Troubleshooting → Sync Thread credentials
    • iPhone should be somewhat similar.
  • You should now be able to see the ESP board in your HA → Thread → Preferred Network.

  • To add a device, use your phone to go to the Matter app. I also had to turn on my BT.

Hope this helps. Since I’m new to this ecosystem, feel free to suggest corrections.

All said and done, I spent a grand total of $10 Canadian bucks to get the ESP32C6 and printed the case for free at my local library. Bit of a learning curve but quite happy with the results, especially the fact that the TBR is under my complete control and not some corporate shenanigans.

Thanks to the many people who share their knowledge and make projects like this possible.

Thank you very much, works a treat on a Seeed studio XIAO ESP32-C6 :slight_smile:

Do you also know how to activate the external antenna? i.e. I need to set GPIO3 to low and GPIO14 high.

I asked “Claude” how to set GPIO3 and GPIO14. Recompile, flash and set TLV hex again => The external antenna is on. Solution was a little comprehensive, so if you need it please ask “Claude” yourself.