GeneralCommissioning Cluster
Cluster ID: 0x0030 |
Endpoint: Fixed on Endpoint 0 (Root Endpoint)
GeneralCommissioning is the master control Cluster for the Matter commissioning flow — responsible for managing the entire commissioning lifecycle. It does not handle specific network credentials (that is NetworkCommissioning's job), but rather controls the "start," "progress," and "end" of the commissioning flow, and ensures the device can safely roll back on failure through the Fail-Safe mechanism.
If the commissioning flow is like a database transaction, GeneralCommissioning is the role responsible for BEGIN / COMMIT / ROLLBACK.
ArmFailSafe is equivalent to BEGIN (start transaction), CommissioningComplete is equivalent to COMMIT (commit transaction),
and Fail-Safe timeout automatically triggers ROLLBACK (rollback all changes).
Commands
The GeneralCommissioning Cluster has 3 request commands, each with a corresponding response command. These three commands form the backbone of the commissioning flow: first start the safety timer, then set regulatory configuration, and finally submit completion. Click a command ID in the table below to jump to its detailed description.
Client → Server (Request Commands)
| ID | Name | Description | Response |
|---|---|---|---|
0x00 |
ArmFailSafe | Start/renew the Fail-Safe timer | ArmFailSafeResponse |
0x02 |
SetRegulatoryConfig | Set the device regulatory area configuration | SetRegulatoryConfigResponse |
0x04 |
CommissioningComplete | Confirm commissioning complete, commit all changes | CommissioningCompleteResponse |
Server → Client (Response Commands)
| ID | Name | Description | Corresponding Request |
|---|---|---|---|
0x01 |
ArmFailSafeResponse | Return Fail-Safe activation result | ArmFailSafe |
0x03 |
SetRegulatoryConfigResponse | Return regulatory configuration result | SetRegulatoryConfig |
0x05 |
CommissioningCompleteResponse | Return commissioning complete result | CommissioningComplete |
ArmFailSafe — Start Fail-Safe (0x00)
Starts or renews the Fail-Safe timer. This is the first step in the commissioning flow — before any commissioning operation, this must be called to enable safety protection. Once the Fail-Safe timer starts, the device enters a "commissionable" state; if the timer expires before commissioning completes (CommissioningComplete not received), the device will automatically roll back all commissioning changes and restore to its pre-commissioning state.
| Parameter | Type | Description |
|---|---|---|
| ExpiryLengthSeconds | uint16 | Fail-Safe timeout in seconds. Set to 0 to immediately cancel the current Fail-Safe (active rollback) |
| Breadcrumb | uint64 | Commissioning progress marker, written to the device's Breadcrumb attribute |
ArmFailSafeResponse Response Fields
| Field | Type | Description |
|---|---|---|
| ErrorCode | CommissioningErrorEnum | Operation result |
| DebugText | String | Optional debug information |
ExpiryLengthSeconds cannot exceed BasicCommissioningInfo.MaxCumulativeFailsafeSeconds (typically 900 seconds = 15 minutes).
Exceeding this limit returns a ValueOutsideRange error.
Additionally, only one Commissioner can hold the Fail-Safe at a time — if another Commissioner is already commissioning,
a BusyWithOtherAdmin error is returned.
Usage Scenarios & Notes
The Commissioner (App) calls ArmFailSafe to start the timer at the beginning of commissioning.
If the commissioning process takes a long time (e.g., waiting for the user to enter the Wi-Fi password), ArmFailSafe can be called again to renew before timeout.
Setting ExpiryLengthSeconds to 0 is the way to actively abandon commissioning — the device will immediately roll back all changes.
SetRegulatoryConfig — Set Regulatory Configuration (0x02)
Set the device's regulatory area (indoor/outdoor) and country code. Different countries and regions have different regulatory requirements for wireless devices (e.g., transmission power, available bands), and the device needs to adjust its wireless parameters based on the regulatory configuration.
| Parameter | Type | Description |
|---|---|---|
| NewRegulatoryConfig | RegulatoryLocationTypeEnum | Target regulatory configuration (Indoor / Outdoor / IndoorOutdoor) |
| CountryCode | String (2 characters) | ISO 3166-1 alpha-2 country code (e.g., "CN", "US"). "XX" means unspecified |
| Breadcrumb | uint64 | Commissioning progress marker |
SetRegulatoryConfigResponse Response Fields
| Field | Type | Description |
|---|---|---|
| ErrorCode | CommissioningErrorEnum | Operation result |
| DebugText | String | Optional debug information |
The NewRegulatoryConfig setting cannot exceed the device's LocationCapability.
For example: if the device's LocationCapability is Indoor (indoor only),
you cannot set RegulatoryConfig to Outdoor, or a ValueOutsideRange error is returned.
Most consumer devices have LocationCapability set to IndoorOutdoor (unrestricted), so this check rarely fails.
Usage Scenarios & Notes
Called after ArmFailSafe and before CommissioningComplete. Typically the Commissioner automatically obtains the user's geographic location
and fills in the corresponding country code. If the location cannot be determined, "XX" can be used to indicate unspecified.
Regulatory configuration affects which Wi-Fi channels and transmission power the device can use; incorrect settings may prevent the device from connecting to certain networks.
CommissioningComplete — Complete Commissioning (0x04)
The final step of the commissioning flow. After a successful call, the device will:
- Stop the Fail-Safe timer
- Permanently save all changes made during commissioning (network credentials, NOC certificates, ACL permissions, etc.)
- Reset Breadcrumb to
0
This command has no parameters. Only the Commissioner currently holding the Fail-Safe can call it.
CommissioningCompleteResponse Response Fields
| Field | Type | Description |
|---|---|---|
| ErrorCode | CommissioningErrorEnum | Operation result |
| DebugText | String | Optional debug information |
CommissioningComplete must be called while the Fail-Safe is active, and the caller must be the same Commissioner that started the Fail-Safe.
If there is no active Fail-Safe, a NoFailSafe error is returned;
if called by a different Commissioner, an InvalidAuthentication error is returned.
Usage Scenarios & Notes
After all commissioning steps (network configuration, NOC certificate installation, ACL permission setup, etc.) are complete, send this command to lock in the changes. Once called successfully, the device officially joins the Matter Fabric and can be managed by controllers within the Fabric. If this command fails or is not sent, the device automatically rolls back after the Fail-Safe timeout, restoring everything to its original state.
Attributes
The GeneralCommissioning Cluster has 5 attributes. Click an attribute ID in the summary table below to jump to its detailed description.
| ID | Name | Type | Group | Description |
|---|---|---|---|---|
0x0000 |
Breadcrumb | uint64 | Commissioning Tracking | Progress marker set by the Commissioner |
0x0001 |
BasicCommissioningInfo | struct | Basic Commissioning Info | Fail-Safe timeout parameters |
0x0002 |
RegulatoryConfig | RegulatoryLocationTypeEnum | Regulatory Config | Current regulatory area configuration |
0x0003 |
LocationCapability | RegulatoryLocationTypeEnum | Regulatory Config | Device's supported regulatory area capability |
0x0004 |
SupportsConcurrentConnection | bool | Connection Capability | Whether concurrent connections are supported during commissioning |
Commissioning Tracking (0x0000)
Used by the Commissioner to track the progress of the commissioning flow.
| ID | Name | Type | Description |
|---|---|---|---|
0x0000 |
Breadcrumb Progress Marker |
uint64 |
Progress tracking value written by the Commissioner through command parameters.
Each commissioning command (ArmFailSafe, SetRegulatoryConfig, etc.) includes a Breadcrumb parameter,
and the device updates this attribute upon successful execution. The Commissioner can read it to confirm whether the previous command actually took effect.
Automatically reset to 0 after commissioning completes (CommissioningComplete)
|
Breadcrumb is a simple but practical "which step has been executed" marker. For example, the Commissioner sets Breadcrumb = 1 during ArmFailSafe, 2 during SetRegulatoryConfig, and 3 when writing network credentials. If commissioning encounters an error mid-way and needs to retry, reading Breadcrumb reveals which step was last executed, allowing resumption from the checkpoint instead of starting over.
Basic Commissioning Info (0x0001)
Describes the device's Fail-Safe time limits, which the Commissioner uses to set reasonable timeout parameters.
| ID | Name | Type | Description |
|---|---|---|---|
0x0001 |
BasicCommissioningInfo Basic Commissioning Info |
struct | Contains key Fail-Safe timeout parameters (see structure below) |
BasicCommissioningInfo Structure
| Field | Type | Description |
|---|---|---|
| FailSafeExpiryLengthSeconds | uint16 | Default Fail-Safe timeout in seconds. The Commissioner typically uses this value in the ArmFailSafe command |
| MaxCumulativeFailsafeSeconds | uint16 | Maximum cumulative Fail-Safe duration. ArmFailSafe's ExpiryLengthSeconds cannot exceed this value, otherwise ValueOutsideRange is returned |
Most devices have FailSafeExpiryLengthSeconds of 60 seconds and MaxCumulativeFailsafeSeconds of 900 seconds (15 minutes).
This means a single ArmFailSafe can be set to a maximum of 900 seconds. If the commissioning flow needs more time (e.g., waiting for user action),
the Commissioner needs to call ArmFailSafe again to renew before timeout, but the total duration cannot exceed 900 seconds.
Regulatory Config (0x0002, 0x0003)
Describes the device's regulatory area configuration and its capability constraints.
| ID | Name | Type | Description |
|---|---|---|---|
0x0002 |
RegulatoryConfig Current Regulatory Config |
RegulatoryLocationTypeEnum | The device's current regulatory area setting. Modified via the SetRegulatoryConfig command |
0x0003 |
LocationCapability Location Capability |
RegulatoryLocationTypeEnum | The regulatory area range supported by the device hardware. RegulatoryConfig values cannot exceed this capability. Read-only attribute determined by device firmware |
In practice, most consumer Matter devices have LocationCapability set to IndoorOutdoor (2),
and correspondingly RegulatoryConfig also defaults to IndoorOutdoor.
Only industrial or special-purpose devices are restricted to Indoor-only or Outdoor-only.
Connection Capability (0x0004)
Describes the device's network connection capability during commissioning.
| ID | Name | Type | Description |
|---|---|---|---|
0x0004 |
SupportsConcurrentConnection Supports Concurrent Connection |
bool |
Whether the device can maintain multiple network connections simultaneously during commissioning.
true = device can maintain BLE channel while connecting to Wi-Fi (most devices);
false = device disconnects BLE after connecting to Wi-Fi, Commissioner needs to rediscover the device through the Wi-Fi network
|
When this attribute is false, the Commissioner loses communication with the device after sending ConnectNetwork.
The Commissioner then needs to:
(1) Rediscover the device on the target network via mDNS;
(2) Establish a CASE secure channel (since the PASE channel has disconnected);
(3) Only then can it continue sending CommissioningComplete.
This increases the complexity and duration of the commissioning flow.
Enum Definitions
CommissioningErrorEnum
All GeneralCommissioning command responses include this error code to indicate the operation result.
ArmFailSafe returns BusyWithOtherAdmin → Another App or controller is commissioning this device, wait for it to complete or timeout; CommissioningComplete returns NoFailSafe → The Fail-Safe has already timed out and auto-rolled back, the entire commissioning flow needs to restart; SetRegulatoryConfig returns ValueOutsideRange → Check the device's LocationCapability and select a supported area type.
RegulatoryLocationTypeEnum
Identifies the device's regulatory use scenario. Used for the RegulatoryConfig and LocationCapability attributes and the SetRegulatoryConfig command.
Example Data
Attribute Data Example
The following is typical attribute data for a GeneralCommissioning Cluster of a device currently being commissioned:
{
// --- Commissioning Tracking ---
"0x0000": 3, // Breadcrumb = 3(Progress marker set by the Commissioner)
// --- Basic Commissioning Info ---
"0x0001": { // BasicCommissioningInfo
"failSafeExpiryLengthSeconds": 60, // Fail-Safe default 60 seconds
"maxCumulativeFailsafeSeconds": 900 // Maximum cumulative 900 seconds (15 minutes)
},
// --- Regulatory Config ---
"0x0002": 2, // RegulatoryConfig = IndoorOutdoor (current config)
"0x0003": 2, // LocationCapability = IndoorOutdoor (device capability)
// --- Concurrent Connection ---
"0x0004": true // SupportsConcurrentConnection = true (supports concurrent connection)
}
ArmFailSafe Interaction Example
Commissioner request and response for starting the Fail-Safe timer:
// Commissioner → Device: Start Fail-Safe timer
{
"invokeRequests": [{
"commandPath": {
"endpointId": 0,
"clusterId": "0x0030",
"commandId": "0x00" // ArmFailSafe
},
"commandFields": {
"expiryLengthSeconds": 60, // 60 second timeout
"breadcrumb": 1 // Commissioning progress marker
}
}]
}
// Device → Commissioner: Confirm Fail-Safe started
{
"errorCode": 0, // OK
"debugText": ""
}
CommissioningComplete Interaction Example
Final confirmation when commissioning completes:
// Commissioner → Device: Complete commissioning
{
"invokeRequests": [{
"commandPath": {
"endpointId": 0,
"clusterId": "0x0030",
"commandId": "0x04" // CommissioningComplete
},
"commandFields": {} // No parameters
}]
}
// Device → Commissioner: Confirm commissioning complete
{
"errorCode": 0, // OK
"debugText": ""
}
In practice, Commissioner SDKs (such as Android's chip-tool or iOS's Matter.framework) typically handle the GeneralCommissioning command sequence automatically. App developers rarely need to send these commands manually, but understanding how they work helps troubleshoot commissioning failures.
Common Scenarios
Scenario 1: Standard Commissioning Flow (Normal Path)
- Commissioner establishes a PASE secure channel with the device via BLE
- Read
BasicCommissioningInfo (0x0001)to get Fail-Safe timeout parameters - Send
ArmFailSafe (0x00)with ExpiryLengthSeconds = 60, Breadcrumb = 1 - Send
SetRegulatoryConfig (0x02)to set country code and regulatory area, Breadcrumb = 2 - Configure network credentials and connect via NetworkCommissioning (0x0031)
- Install NOC certificate (OperationalCredentials Cluster)
- Set ACL permissions (AccessControl Cluster)
- Send
CommissioningComplete (0x04)to commit all changes - Commissioning complete, device officially joins the Fabric
The entire flow typically completes within 30 seconds (excluding user input time).
Scenario 2: Fail-Safe Timeout Rollback
- Commissioner sends ArmFailSafe (60 second timeout)
- Successfully wrote Wi-Fi credentials
- But encountered an error during NOC certificate installation, Commissioner decides to abandon
- Commissioner does not send CommissioningComplete
- After 60 seconds, the Fail-Safe timer expires
- Device automatically rolls back: deletes the just-written Wi-Fi credentials, resets Breadcrumb to 0
- Device returns to its pre-commissioning state, ready to restart commissioning
Active rollback is also possible: Send ArmFailSafe(ExpiryLengthSeconds = 0) to trigger an immediate rollback
without waiting for the 60-second timeout. This is faster and more courteous than waiting for timeout.
Scenario 3: Regulatory Configuration Handling
- Read
LocationCapability (0x0003)to confirm supported area types - Determine CountryCode based on the user's region (e.g., China =
"CN", US ="US") - Select RegulatoryConfig based on the device's actual use scenario:
- Smart lights, plugs, sensors → typically
IndoorOutdoor (2) - Outdoor security cameras →
Outdoor (1) - Unsure → use
IndoorOutdoor (2)(if the device supports it)
- Smart lights, plugs, sensors → typically
- Send
SetRegulatoryConfig - If
ValueOutsideRangeis returned, fall back to a value allowed by the device's LocationCapability and retry