Matter over Thread?

Thanks to this wonderful post, I was able to add one of the esp-matter C++ examples (light) to my Home and control it (I had started with the C++ examples from Espressif because I didn’t realize there were Swift examples). But I have a couple of questions.

After adding this device, I see it is a WiFi client on my network. I'd prefer to use Thread, and I'm fairly sure the ESP32-C6 supports Thread, but I don’t know how to make it happen.

  • Does a Matter device built with the ESP-IDF and Matter SDKs automatically support both WiFi and Thread? That would seem to be the promise of Matter, in that I think a device is supposed to be able to be integrated into either network type. I have a HomePod Mini that should be able to be a hub.

  • If so, how do I tell the Home app to connect over Thread instead of WiFI?

  • If not, what do I need to look for in the Swift or C++ APIs to make it be a Thread device?

Another question:

  • Where does the pairing code 2020-2021 come from? In the ESP Matter docs, it's specified on the command line when you use the chip-tool command line tool to start commissioning (I was never able to get this to work though). I had to flash-erase and re-flash my device to get it to work, but I never ran chip-tool again, so I don't know why it worked to use 2020-2021.
    How does the Swift smart-light example know to use this code?
    Edit: It seems it’s a default in the connectedhomeip SDK, but please confirm.

Thanks so much for these examples!

2 Likes

I haven't tried this myself, but using Thread instead of Wi-Fi is documented in the ESP Matter docs, namely https://docs.espressif.com/projects/esp-matter/en/latest/esp32c6/developing.html#flashing-the-firmware:

  • ESP32-C6 supports both the Wi-Fi and IEEE 802.15.4 radio, so you can run Wi-Fi or Thread matter example on it.
  • To enable Thread, you should change the menuconfig options to CONFIG_OPENTHREAD_ENABLED=y, CONFIG_ENABLE_WIFI_STATION=n, and CONFIG_USE_MINIMAL_MDNS=n.
    • To enable Wi-Fi. you should change the menuconfig options to CONFIG_OPENTHREAD_ENABLED=n, CONFIG_ENABLE_WIFI_STATION=y, and CONFIG_USE_MINIMAL_MDNS=y.
1 Like