跳到主要内容

Native Bridge

The Device commissioning guide covers the SDK APIs your app calls (startCommissioning, issueNodeNoC, confirmMatterNodeCommissioning). This page documents the native bridge — how React Native, platform Matter UI, the Connected Home IP (CHIP) stack, and Headless JS work together during commissioning.

信息

Wire a Commission Adaptor (generateCSR, startEcosystemCommissioning, postMessage) before these flows run — use the Home app ESPMatterAdapter. These guides describe the reference architecture in esp-rainmaker-home; adapt file names and module boundaries to your project.


Layers

LayerResponsibility
Feature UICommissioning screen, progress, navigation on terminal success
Store / CDFActive home, fabric prep, fabric.startCommissioning(qr)
Matter SDK (JS)Cloud APIs: user NoC, node NoC, confirm commissioning
Native adaptorESPMatterCommissioningAdaptorNativeModules.ESPMatterModule
Platform nativeSystem Matter UI, CHIP ChipDeviceController, Headless JS tasks

Commissioning always crosses these layers. The SDK orchestrates cloud calls; native code owns the radio, PASE session, and NOC install on the device.


Platform guides

PlatformHow it worksGuide
AndroidChipTool UI + ChipDeviceController; cloud via Headless JSAndroid native bridge
iOSMatterSupport + MTRDeviceController; cloud on main RNiOS native bridge

Phase-by-phase detail is in each bridge guide (phases 0–8).


Shared concepts

These terms appear across both platform guides:

TermMeaning
PASEPassword Authenticated Session Establishment — secure channel to an uncommissioned device
NOCNode Operational Certificate — identity on the Matter fabric
CSRCertificate Signing Request
CATCase Authenticated Tag — fabric permission tag used in ACLs
IPKIdentity Protection Key — fabric-wide key for CASE sessions
CHIPConnected Home IP — Matter protocol stack (ChipDeviceController in native)

Two different CSRs

  1. User NOC (fabric bootstrap) — The phone’s admin identity. Generated via generateCSR() in secure storage (Android KeyStore / iOS Keychain), signed by RainMaker as a user operational cert. Used by the native commissioner on the fabric.
  2. Device node NOC (during commission) — The Matter device’s identity. The device generates its own CSR during commissioning; RainMaker signs a node operational cert; CHIP installs it on the device.

Terminal success by platform

iOS

On iOS, there is a single terminal COMMISSIONING_COMPLETE with source: IOS_MATTER_FRAMEWORK. Intermediate NODE_NOC_REQUEST and COMMISSIONING_CONFIRMATION_REQUEST events are handled by the SDK — not terminal for your UI.

See iOS Phase 8 — UI success.

Android

On the default ChipTool build, terminal success is a single COMMISSIONING_COMPLETE with source: HEADLESS_JS after cloud confirm. Native failures from ChipToolCommissioningActivity use source: CHIP_TOOL.

If you build with MATTER_COMMISSIONING_METHOD=GooglePlayServices, an extra intermediate complete may appear:

EventSourceMeaningUI action
COMMISSIONING_COMPLETEGPS_SERVICELegacy GPS path — CHIP leg done, cloud pendingIgnore (not terminal)
COMMISSIONING_COMPLETEHEADLESS_JSCloud confirmed, node registeredSuccess → refresh + navigate

See Phase 8 — UI success for isMatterCommissioningTerminalComplete().


Where to start

  1. Read Matter adapters for the TypeScript interface contract.
  2. Read Device commissioning for startCommissioning and manual flows.
  3. Implement the platform guide:

On this page