Skip to content

Implementing Matter on the ESP32

Implementing Matter on the ESP32

The ESP32 family is one of the most realistic routes into a Matter device: ESP-IDF carries an official Matter component (built on the CHIP project SDK), and Espressif ships the whole chain from dev board to reference app. But between “the demo runs” and “a certifiable, manufacturable Matter product” sit hardware selection, keys and certificates, power, OTA, and test. This section covers the technical path on ESP32, the key decisions, and the usual blockers. By the end you will be able to:

  • Judge which ESP32 suits Matter over Thread versus Wi-Fi
  • Build the device-side skeleton with the ESP-IDF Matter component (data model, commissioning, control)
  • Plan device identity (DAC/PAI certificates) and key storage
  • Know what must be resolved before certification and production
  • Completed Chapter 19 Sections 1, 2, 3
  • ESP-IDF installed (version per the Matter component), target board in hand
  • A specific device type to build (light, switch, temperature-humidity sensor, etc.)
Target Hardware need Typical choice
Matter over Wi-Fi Wi-Fi plus enough RAM/Flash ESP32 / ESP32-S3
Matter over Thread Needs an 802.15.4 radio ESP32-C6 (native 802.15.4 plus Wi-Fi 6); earlier ESP32 plus an external 802.15.4 coprocessor

Point: Thread and Wi-Fi have different radio requirements; the wrong module simply cannot do the target transport. Confirm capability against the datasheet and the official Matter support list (the Chapter 25 selection method).

The skeleton: the ESP-IDF Matter component

Section titled “The skeleton: the ESP-IDF Matter component”
  1. Take the SDK and samples from Espressif esp-matter / the Matter branch of ESP-IDF
  2. Pick the data model by device type (device type / cluster), generate endpoint and cluster skeletons with the ZAP/config tool
  3. Wire your sensing/actuation logic into the cluster attribute and command callbacks (read/write attributes, report events)
  4. Implement the commissioning entry (BLE advertisement plus the QR onboarding payload)
  5. Choose the transport (Thread / Wi-Fi) and connect to a border router or the IP network

Device identity and keys: the core production fork

Section titled “Device identity and keys: the core production fork”
  • Every Matter device carries a Device Attestation Certificate (DAC) signed by the vendor’s PAI plus its private key, written to secure storage at factory
  • Key storage: prefer hardware security (secure boot / flash encryption, protected partitions); never keep the private key in plaintext
  • Certification: reaching the ecosystems requires CSA certification — identity application, testing (test cases / threat analysis), and batch consistency — an engineering plus process job
  1. RAM/Flash footprint: the Matter stack plus IP is not small; cut and assess on resource-limited modules
  2. Commissioning stability: BLE plus Thread/Wi-Fi handover and border-router discovery is where it most often fails (Chapter 21 automated testing can cover it)
  3. Power: Thread is low, but a persistent Wi-Fi link is unfriendly to battery devices
  4. OTA: plan the Matter OTA cluster and vendor firmware signing so an update cannot brick the device

[Needs board cross-check] How mature Matter/Thread support is on the chosen module in the current ESP-IDF, the measured RAM/Flash footprint, commissioning success rate, and ecosystem compatibility must all be confirmed on the target board against real border devices and apps.

Check Expected result Verified
Device commissions in an ecosystem Apple/Google etc. can add and control it
Data model mapped correctly Attribute read/write and events match the device type
Resource footprint in budget RAM/Flash within the chosen module
Identity and keys secure DAC/private key in protected storage, verified
Commissioning robustness Success rate across repeats and environments meets target
OTA works Update does not brick, can roll back (planned)

Issue 1: demo runs, but production identity/certification stalls

Section titled “Issue 1: demo runs, but production identity/certification stalls”

Cause: treated “the SDK runs” as “shippable”, ignoring certificate issuance and the CSA flow.

Action: plan identity application, factory key writing, and certification testing as separate milestones and start early.

Issue 2: Thread commissioning fails intermittently on C6

Section titled “Issue 2: Thread commissioning fails intermittently on C6”

Cause: border-router discovery, 802.15.4 interference, or unstable power.

Action: confirm a border device is present and that antenna and power meet spec (Chapters 22/23); correlate serial logs with a capture to localise.

  • Do: pick the module by target transport (Thread/Wi-Fi) first, then build the Matter skeleton
  • Do: generate the data model with the official SDK’s config tool, wiring business logic rather than hand-editing the lower layers
  • Do: treat certificates/keys/certification as production preconditions, not a last step
  • Don’t: cram the full Matter stack onto an under-resourced module without trimming
  • Don’t: store private keys in plaintext

Key points of this section:

  1. Hardware selection forks at the transport: Thread needs 802.15.4 (e.g. C6), Wi-Fi uses S3 and similar
  2. Use the official esp-matter SDK plus config tool to generate the data-model skeleton, then add business logic
  3. Device identity (DAC/PAI) and secure key storage are the production core and tie into CSA certification
  4. Common blockers: resource footprint, commissioning robustness, power, OTA — all measured on hardware and covered by automated testing

Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.

Talk to us →

First published attutorial.imagrove.com/matter-protocol/04-implementing-matter-on-the-esp32/Please credit Imagrove and link back to this page when quoting or republishing.

Questions or issues with this tutorial?

Sign in with GitHub to leave a comment. If a step fails for you, tell us — we verify it and update the tutorial.