Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backend

mat’s backend is a native, from-scratch Rust Matter controller (crate mat-controller, driven through the shared mat-native engine) — TLV, CASE, IM, groupcast, mDNS, and commissioning (on-network + BLE+Thread) are all in-process. There is no chip-tool (or any external controller) subprocess.

  • Route selection is per-op: matd auto-discovery (if a matd answers the probed socket) → mat’s own native direct path. See Routing through matd and Native backend internals for interface autodetect (MAT_IFACE / MAT_MATD_IFACE override), fabric index, warm vs one-shot sessions, the shared groupcast counter, epoch adoption, and the generic write/invoke value-encoding rule (scalars as literals, lists/structs as JSON from the generated type table).
  • First-fabric bootstrap is mat fabric init (random-epoch IPK); see that section.

Environment variables:

variablepurpose
MAT_STOREcredential store path (see the resolution order in Configuration)
MAT_IFACEoverride interface autodetect for mat’s direct path
MAT_MATD_IFACEoverride interface autodetect for matd
MAT_THREAD_IFACEoverride Thread TUN interface autodetect for mat’s groupcast egress; unset = auto-select if exactly one multicast-capable wpan* iface is up, else LAN-only — see Groupcast egress
MAT_MATD_THREAD_IFACEsame, for matd
MAT_GROUP_EGRESSall (default) / thread: with thread, skip the LAN copy of a groupcast while a Thread TUN egress is up (the border router would relay it into Thread a second time) — see Groupcast egress
MAT_MATD_GROUP_EGRESSsame, for matd
MAT_FABRIC_INDEX / MAT_ISSUER_INDEXmat KVS fabric-table / CA-issuer index (default 1 / 0)
MAT_MATD_FABRIC_INDEX / MAT_MATD_ISSUER_INDEXsame for matd
MAT_MATD / MAT_MATD_SOCKETforce / opt out of the matd path; pin its socket
MAT_OP_TIMEOUT_MSbudget (ms) for a single-node op; default 60000, 0 = unlimited — see Op timeout budget
MAT_PAA_TRUST_STOREdirectory of PAA root certs for attestation
MAT_CD_SIGNER_STORECD signer trust store (warn-only if absent)
MAT_SETUP_CODEcommission setup code (QR MT:... or manual code) when --setup-code is absent; prefer it on shared hosts — the flag is visible in the process list (see Passing the setup code and Thread dataset safely)
MAT_THREAD_DATASETThread active operational dataset (hex) for BLE+Thread commission; like MAT_SETUP_CODE, prefer it over --thread-dataset on shared hosts
MAT_TRANSPORTcommission route: auto (default) / on-network / ble
MAT_PING6_BINoverride the ping6 binary used by diag node --deep
MAT_LOGtracing filter for stderr logs (e.g. info); empty counts as unset — see Logs

Matter uses mDNS / IPv6 multicast, so running in Docker requires host networking (docker run --network host). A bridge network cannot receive the responses.