ESP Thread Border Router

View source on GitHub

ESP Thread border router is a FreeRTOS-based implementation running on a combination of Espressif's Wi-Fi and 802.15.4 SoCs.

Hardware requirements:

Espressif provides an ESP Border Router Board which integrates the host SoC (ESP32-S3) and the RCP (ESP32-H2) into one module.

Hardware platforms

ESP Thread Border Router Board
ESP Thread Border Router Board


Set up Repositories

To set up the environment, please follow the official installation guide.

Clone the esp-idf and the esp-thread-br repository.

git clone -b v5.1.2 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh
. ./export.sh
cd ..
git clone -b v1.0 --recursive https://github.com/espressif/esp-thread-br.git

Configure the Thread and the Wi-Fi network

The border router will automatically join the Wi-Fi network and create a new Thread network if there is not one in its storage. The network parameters can be configured in the config menu:

cd esp-thread-br/examples/basic_thread_border_router
idf.py menuconfig

The network configuration items are:

  • Enable automatic start mode in Thread Border Router: ESP Thread Border Router Example > Enable the automatic start mode in Thread Border Router.
  • Wi-Fi SSID and PSK: Example Connection Configuration > connect using Wi-Fi interface
  • Thread network parameters: Component config > OpenThread > Thread Operational Dataset

Build and run the border router

Build the esp-idf/examples/openthread/ot_rcp example. The firmware doesn't need to be explicitly flashed to a device. It will be included in the Border Router firmware and flashed to the ESP32-H2 chip upon first boot (or the RCP firmware changed).

cd ${IDF_PATH}/examples/openthread/ot_rcp
idf.py set-target esp32h2
idf.py build

Then go back to the basic_thread_border_router example folder.

cd esp-thread-br/examples/basic_thread_border_router
idf.py set-target esp32s3
idf.py build
idf.py -p  flash monitor

Now you'll see the border router output in the ESP32S3 monitor. It also provides an interactive OpenThread command line:

state
leader
Done
>

Supported features

  • Border agent for external commissioners.
  • IPv6 bidirectional connectivity.
  • SRP service registration and advertising proxy.
  • mDNS discovery proxy.
  • NAT64.
  • Multicast forwarding.
  • Web GUI based REST API.
  • OTA.

For more using of the ESP Thread Border Router, you can refer to ESP Thread Border Router Codelab