Networking and diagnostics49 — Network Commissioning

Matter Cluster 49 — Network Commissioning

Matter Cluster 49 (0x0031) Network Commissioning: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 49 — Network Commissioning Cluster

Matter Cluster 49, also written as 0x0031, is the Network Commissioning Cluster. Network commissioning is part of the overall Node commissioning. The main goal of Network Commissioning Cluster is to associate a Node with or manage a Node's one or more network interfaces. An interface, in this context, is a unique entity that can have an IPv6 address assigned to it and ingress and egress IP packets.

Cluster Identity

FieldValue
Cluster ID decimal49
Cluster ID hex0x0031
Cluster nameNetwork Commissioning
Cluster revision (Matter 1.6.1)2
Roleutility
ScopeNode
PICS codeCNET
Typical endpoint0

Revision history

RevisionChange
1Initial revision
2Support determining capabilities for Wi-Fi and Thread interfaces. Additional Wi-Fi directed scanning requirements.

Shadow Path Format

Cluster 49 values in the device shadow use this format:

endpoint_id / 49 / attribute_id

Example:

{
  "0/49/0": 1
}
PartMeaning
0Endpoint ID
49Network Commissioning cluster
0MaxNetworks attribute

Cluster 49 Features

The FeatureMap attribute (0/49/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.

BitCodeFeatureConformanceMeaning
0WIWiFiNetworkInterfaceOWi-Fi related features
1THThreadNetworkInterfaceOThread related features
2ETEthernetNetworkInterfaceOEthernet related features

Example: FeatureMap = 0 means no optional feature is enabled; 7 means every feature listed above is enabled.


Data Types

NetworkCommissioningStatusEnum

ValueNameConformanceMeaning
0SuccessMOK, no error
1OutOfRangeMValue Outside Range
2BoundsExceededMA collection would exceed its size limit
3NetworkIDNotFoundMThe NetworkID is not among the collection of added networks
4DuplicateNetworkIDMThe NetworkID is already among the collection of added networks
5NetworkNotFoundMCannot find AP: SSID Not found
6RegulatoryErrorMCannot find AP: Mismatch on band/channels/regulatory domain / 2.4GHz vs 5GHz
7AuthFailureMCannot associate due to authentication failure
8UnsupportedSecurityMCannot associate due to unsupported security mode
9OtherConnectionFailureMOther association failure
10IPV6FailedMFailure to generate an IPv6 address
11IPBindFailedMFailure to bind Wi-Fi +<->+ IP interfaces
12UnknownErrorMUnknown error

WiFiBandEnum

WiFiBandEnum encodes a supported Wi-Fi frequency band present in the WiFiBand field of the WiFiInterfaceScanResultStruct.

ValueNameConformanceMeaning
02G4O2.4GHz - 2.401GHz to 2.495GHz (802.11b/g/n/ax)
13G65O3.65GHz - 3.655GHz to 3.695GHz (802.11y)
25GO5GHz - 5.150GHz to 5.895GHz (802.11a/n/ac/ax)
36GO6GHz - 5.925GHz to 7.125GHz (802.11ax / Wi-Fi 6E)
460GO60GHz - 57.24GHz to 70.20GHz (802.11ad/ay)
51GOSub-1GHz - 755MHz to 931MHz (802.11ah)

ThreadCapabilitiesBitmap (bitmap)

The ThreadCapabilitiesBitmap encodes the supported Thread features and capabilities of a Thread-enabled network interface. The valid combinations of capabilities are restricted and dependent on Thread version.

BitNameConformanceMeaning
0IsBorderRouterCapableOThread Border Router functionality is present
1IsRouterCapableORouter mode is supported (interface could be in router or REED mode)
2IsSleepyEndDeviceCapableOSleepy end-device mode is supported
3IsFullThreadDeviceODevice is a full Thread device (opposite of Minimal Thread Device)
4IsSynchronizedSleepyEndDeviceCapableOSynchronized sleepy end-device mode is supported

WiFiSecurityBitmap (bitmap)

WiFiSecurityBitmap encodes the supported Wi-Fi security types present in the Security field of the WiFiInterfaceScanResultStruct.

BitNameConformanceMeaning
0UnencryptedMSupports unencrypted Wi-Fi
1WEPMSupports Wi-Fi using WEP security
2WPA-PERSONALMSupports Wi-Fi using WPA-Personal security
3WPA2-PERSONALMSupports Wi-Fi using WPA2-Personal security
4WPA3-PERSONALMSupports Wi-Fi using WPA3-Personal security

NetworkInfoStruct (struct)

NetworkInfoStruct struct describes an existing network configuration, as provided in the Networks attribute.

FieldNameTypeConformanceConstraintMeaning
0NetworkIDoctstrMlength 1 to 32—
1ConnectedboolM—Indicates the connected status of the associated network, where "connected" means currently linked to the network technology (e.g.

ThreadInterfaceScanResultStruct (struct)

ThreadInterfaceScanResultStruct represents a single Thread network scan result.

FieldNameTypeConformanceConstraintMeaning
0PanIduint16Mmax 65534—
1ExtendedPanIduint64M——
2NetworkNamestringMlength 1 to 16—
3Channeluint16M——
4Versionuint8M——
5ExtendedAddresshwadrMallowed: 6, 8—
6RSSIint8M——
7LQIuint8M——

WiFiInterfaceScanResultStruct (struct)

WiFiInterfaceScanResultStruct represents a single Wi-Fi network scan result.

FieldNameTypeConformanceConstraintMeaning
0SecurityWiFiSecurityBitmapM——
1SSIDoctstrMmax length 32—
2BSSIDoctstrMallowed: 6—
3Channeluint16M——
4WiFiBandWiFiBandEnumO—This field, if present, may be used to differentiate overlapping channel number values across different Wi-Fi frequency bands.
5RSSIint8O——

Cluster 49 Attributes

Cluster 49 defines 11 attributes plus the global attributes. Conformance: M mandatory, O optional, a feature code means "mandatory when that feature is present", square brackets mean "optional when …".

IDHexAttributeTypeConformanceAccessQualitiesDefault
00x0000MaxNetworksuint8MR (read: admin)——
10x0001Networkslist of NetworkInfoStructMR (read: admin)—empty
20x0002ScanMaxTimeSecondsuint8WI | THR (read: view)——
30x0003ConnectMaxTimeSecondsuint8WI | THR (read: view)——
40x0004InterfaceEnabledboolMR/W (read: view, write: admin)persistedtrue
50x0005LastNetworkingStatusNetworkCommissioningStatusEnumMR (read: admin)nullablenull
60x0006LastNetworkIDoctstrMR (read: admin)nullablenull
70x0007LastConnectErrorValueint32MR (read: admin)nullablenull
80x0008SupportedWiFiBandslist of WiFiBandEnumWIR (read: view)—MS
90x0009SupportedThreadFeaturesThreadCapabilitiesBitmapTHR (read: view)—MS
100x000AThreadVersionuint16THR (read: view)—MS

Global attributes

IDHexAttributeMeaning
655280xFFF8GeneratedCommandListResponse command IDs this server generates.
655290xFFF9AcceptedCommandListCommand IDs this server accepts.
655310xFFFBAttributeListAttribute IDs implemented.
655320xFFFCFeatureMapImplemented optional features (see above).
655330xFFFDClusterRevisionCluster revision implemented; 2 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — MaxNetworks

Path example:

0/49/0

This indicates the maximum number of network configuration entries that can be added, based on available device resources. The length of the Networks attribute is less than or equal to this value.

PropertyValue
Typeuint8
ConformanceM
AccessR (read: admin)
Constraintmin 1

Example:

{
  "0/49/0": 1
}

Attribute 1 / 0x0001 — Networks

Path example:

0/49/1

Indicates the network configurations that are usable on the network interface represented by this cluster server instance. The order of configurations in the list reflects precedence. That is, any time the Node attempts to connect to the network it must attempt to do so using the configurations in Networks Attribute in the order as they appear in the list. The order of list items only be modified by the AddOrUpdateThreadNetwork, AddOrUpdateWiFiNetwork and ReorderNetwork commands.

PropertyValue
Typelist of NetworkInfoStruct
ConformanceM
AccessR (read: admin)
Constraintmax MaxNetworks entries
Defaultempty

Each entry is a NetworkInfoStruct (see Data Types).

Example:

{
  "0/49/1": []
}

Attribute 2 / 0x0002 — ScanMaxTimeSeconds

Path example:

0/49/2

No condensed specification text is available for ScanMaxTimeSeconds; use the type, conformance and constraint below together with the cluster description above.

PropertyValue
Typeuint8
ConformanceWI | TH
AccessR (read: view)
Constraintdesc

Example:

{
  "0/49/2": 0
}

Attribute 3 / 0x0003 — ConnectMaxTimeSeconds

Path example:

0/49/3

Indicates the maximum duration taken, in seconds, by the network interface on this cluster server instance to report a successful or failed network connection indication. This maximum time must account for all operations needed until a successful network connection is deemed to have occurred, including, for example, obtaining IP addresses, or the execution of necessary internal retries.

PropertyValue
Typeuint8
ConformanceWI | TH
AccessR (read: view)
Constraintdesc

Example:

{
  "0/49/3": 0
}

Attribute 4 / 0x0004 — InterfaceEnabled

Path example:

0/49/4

Indicates whether the associated network interface is enabled or not. By default all network interfaces should be enabled during initial commissioning (InterfaceEnabled set to true). It is undefined what happens if InterfaceEnabled is written to false on the same interface as that which is used to write the value. In that case, it is possible that the Administrator would have to await expiry of the fail-safe, and associated recovery of network configuration to prior safe values, before being able to communicate with the node again.

PropertyValue
Typebool
ConformanceM
AccessR/W (read: view, write: admin)
Qualitiespersisted
Defaulttrue

Example:

{
  "0/49/4": true
}

Attribute 5 / 0x0005 — LastNetworkingStatus

Path example:

0/49/5

Indicates the status of the last attempt either scan or connect to an operational network, using this interface, whether by invocation of the ConnectNetwork command or by autonomous connection after loss of connectivity or during initial establishment. If no such attempt was made, or no network configurations exist in the Networks attribute, then this attribute is set to null. This attribute is present to assist with error recovery during Network commissioning and to assist in non-concurrent networking commissioning flows.

PropertyValue
TypeNetworkCommissioningStatusEnum
ConformanceM
AccessR (read: admin)
Qualitiesnullable
Defaultnull

Values (NetworkCommissioningStatusEnum):

ValueNameMeaning
0SuccessOK, no error
1OutOfRangeValue Outside Range
2BoundsExceededA collection would exceed its size limit
3NetworkIDNotFoundThe NetworkID is not among the collection of added networks
4DuplicateNetworkIDThe NetworkID is already among the collection of added networks
5NetworkNotFoundCannot find AP: SSID Not found
6RegulatoryErrorCannot find AP: Mismatch on band/channels/regulatory domain / 2.4GHz vs 5GHz
7AuthFailureCannot associate due to authentication failure
8UnsupportedSecurityCannot associate due to unsupported security mode
9OtherConnectionFailureOther association failure
10IPV6FailedFailure to generate an IPv6 address
11IPBindFailedFailure to bind Wi-Fi +<->+ IP interfaces
12UnknownErrorUnknown error

Example:

{
  "0/49/5": 0
}

Attribute 6 / 0x0006 — LastNetworkID

Path example:

0/49/6

No condensed specification text is available for LastNetworkID; use the type, conformance and constraint below together with the cluster description above.

PropertyValue
Typeoctstr
ConformanceM
AccessR (read: admin)
Qualitiesnullable
Constraintlength 1 to 32
Defaultnull

Example:

{
  "0/49/6": "AQID"
}

Attribute 7 / 0x0007 — LastConnectErrorValue

Path example:

0/49/7

Indicates the ErrorValue used in the last failed attempt to connect to an operational network, using this interface, whether by invocation of the ConnectNetwork command or by autonomous connection after loss of connectivity or during initial establishment. If no such attempt was made, or no network configurations exist in the Networks attribute, then this attribute is set to null. If the last connection succeeded, as indicated by a value of Success in the LastNetworkingStatus attribute, then this field is set to null. This attribute is present to assist with error recovery during Network commissioning and to assist in non-concurrent networking commissioning flows.

PropertyValue
Typeint32
ConformanceM
AccessR (read: admin)
Qualitiesnullable
Defaultnull

Example:

{
  "0/49/7": 1
}

Attribute 8 / 0x0008 — SupportedWiFiBands

Path example:

0/49/8

Indicates all the frequency bands supported by the Wi-Fi interface configured by the cluster instance.

PropertyValue
Typelist of WiFiBandEnum
ConformanceWI
AccessR (read: view)
Constraintmin 1 entries
DefaultMS

Example:

{
  "0/49/8": []
}

Attribute 9 / 0x0009 — SupportedThreadFeatures

Path example:

0/49/9

Indicates all of the Thread features supported by the Thread interface configured by the cluster instance. This attribute is primarily used to determine the most important general capabilities of the Thread interface associated with the cluster instance, as opposed to the current runtime dynamic configuration. Most run-time details of the actual Thread interface are found in the Thread Network Diagnostics cluster, if supported.

PropertyValue
TypeThreadCapabilitiesBitmap
ConformanceTH
AccessR (read: view)
DefaultMS

Bits (ThreadCapabilitiesBitmap):

BitNameMeaning
0IsBorderRouterCapableThread Border Router functionality is present
1IsRouterCapableRouter mode is supported (interface could be in router or REED mode)
2IsSleepyEndDeviceCapableSleepy end-device mode is supported
3IsFullThreadDeviceDevice is a full Thread device (opposite of Minimal Thread Device)
4IsSynchronizedSleepyEndDeviceCapableSynchronized sleepy end-device mode is supported

Example:

{
  "0/49/9": 0
}

Attribute 10 / 0x000A — ThreadVersion

Path example:

0/49/10

Indicates the Thread version supported by the Thread interface configured by the cluster instance. The format must match the value mapping found in the "Version TLV" section of Thread specification.

PropertyValue
Typeuint16
ConformanceTH
AccessR (read: view)
DefaultMS

Example:

{
  "0/49/10": 1
}

Cluster 49 Commands

Cluster 49 has 6 client-to-server commands and 3 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00ScanNetworksclient → serverWI | THScanNetworksResponseThis command is used to scan for available networks on the network interface associated with the cluster instance.
10x01ScanNetworksResponseserver → clientWI | TH—This command is used to report the results of a ScanNetworks command.
20x02AddOrUpdateWiFiNetworkclient → serverWINetworkConfigResponseThis command is used to add or update a Wi-Fi network configuration.
30x03AddOrUpdateThreadNetworkclient → serverTHNetworkConfigResponseThis command is used to add or update a Thread network configuration.
40x04RemoveNetworkclient → serverWI | THNetworkConfigResponseThis command is used to remove a network configuration on the network interface associated with the cluster instance.
50x05NetworkConfigResponseserver → clientWI | TH—This command is used to report the results of a network configuration command (AddOrUpdateWiFiNetwork, AddOrUpdateThreadNetwork, or RemoveNetwork).
60x06ConnectNetworkclient → serverWI | THConnectNetworkResponseThis command is used to connect to a network on the network interface associated with the cluster instance.
70x07ConnectNetworkResponseserver → clientWI | TH—This command is used to report the results of a ConnectNetwork command.
80x08ReorderNetworkclient → serverWI | THNetworkConfigResponseThis command is used to re-order the network configuration list.

AcceptedCommandList

The AcceptedCommandList attribute lists the command IDs the endpoint actually implements:

endpoint_id / 49 / 65529
{
  "0/49/65529": [
    0,
    2,
    3,
    4,
    6,
    8
  ]
}

Before sending a Cluster 49 command, check that the command ID exists in endpoint/49/65529. Optional commands are only present when the matching feature is set in FeatureMap.


Bridge Command Payload Format

The bridge accepts Matter commands in this structure:

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "ScanNetworks",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 49, always use "cluster_id": 49. Payload keys are the command field names in lowerCamelCase. Octet-string fields are base64-encoded. timed_request_timeout_ms is required for timed commands and ignored otherwise.


Command: ScanNetworks

Purpose

This command is used to scan for available networks on the network interface associated with the cluster instance. This command must scan on the Cluster instance's associated network interface for either of: - All available networks (non-directed scanning) - Specific networks (directed scanning) Scanning for available networks detects all networks of the type corresponding to the cluster server instance's associated network interface that are possible to join, such as all visible Wi-Fi access points for Wi-Fi cluster server instances, all Thread PANs for Thread cluster server instances, within bounds of the maximum response size.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameScanNetworks
Directionclient → server
ConformanceWI | TH
ResponseScanNetworksResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0SSIDssidoctstr (nullable)[WI]length 1 to 32—
1Breadcrumbbreadcrumbuint64O—The Breadcrumb field, if present, is used to atomically set the Breadcrumb attribute in the General Commissioning cluster on success of the associated command.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "ScanNetworks",
    "payload": {
      "ssid": "AQID",
      "breadcrumb": 1
    }
  }
}

The device answers with ScanNetworksResponse (see below).


Command: ScanNetworksResponse

Purpose

This command is used to report the results of a ScanNetworks command. This command contains the status of the last ScanNetworks command, and the associated scan results if the operation was successful. Results are valid only if NetworkingStatus is Success. Before generating a ScanNetworksResponse, the server must set the LastNetworkingStatus attribute value to the NetworkingStatus matching the response.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameScanNetworksResponse
Directionserver → client (response)
ConformanceWI | TH

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkingStatusnetworkingStatusNetworkCommissioningStatusEnumMdescThe NetworkingStatus field indicates the status of the last scan operation, taking one of these values: - Success: Scanning succeeded. - NetworkNotFound: No instance of an explicitly-provided network identifier was found during the scan.
1DebugTextdebugTextstringOmax length 512This field, if present and non-empty, may contain error information which may be communicated to the user in case the NetworkingStatus was not Success. Its purpose is to help developers in troubleshooting errors and may go into logs or crash reports.
2WiFiScanResultswiFiScanResultslist of WiFiInterfaceScanResultStructWIdescIf NetworkingStatus was Success, this field contains the Wi-Fi network scan results. The list may be empty if none were found in range on the bands supported by the interface, or if directed scanning had been used and the desired SSID was not found in range.
3ThreadScanResultsthreadScanResultslist of ThreadInterfaceScanResultStructTHdescIf NetworkingStatus was Success, this field contains the Thread network scan results. The list may be empty if none were found in range on the bands supported by the interface.

NetworkingStatus values (NetworkCommissioningStatusEnum): 0 = Success, 1 = OutOfRange, 2 = BoundsExceeded, 3 = NetworkIDNotFound, 4 = DuplicateNetworkID, 5 = NetworkNotFound, 6 = RegulatoryError, 7 = AuthFailure, 8 = UnsupportedSecurity, 9 = OtherConnectionFailure, 10 = IPV6Failed, 11 = IPBindFailed, 12 = UnknownError


Command: AddOrUpdateWiFiNetwork

Purpose

This command is used to add or update a Wi-Fi network configuration. This command is used to add or modify Wi-Fi network configurations. If this command is received without an armed fail-safe context, then this command must fail with a FAILSAFE_REQUIRED status code sent back to the initiator.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameAddOrUpdateWiFiNetwork
Directionclient → server
ConformanceWI
ResponseNetworkConfigResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0SSIDssidoctstrMmax length 32—
1CredentialscredentialsoctstrMmax length 64Credentials is the passphrase or PSK for the network (if any is needed).
2Breadcrumbbreadcrumbuint64O——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "AddOrUpdateWiFiNetwork",
    "payload": {
      "ssid": "AQID",
      "credentials": "AQID"
    }
  }
}

The device answers with NetworkConfigResponse (see below).


Command: AddOrUpdateThreadNetwork

Purpose

This command is used to add or update a Thread network configuration. This command is used to add or modify Thread network configurations. The XPAN ID in the OperationalDataset serves as the NetworkID for the network configuration to be added or updated. If the Networks attribute does not contain an entry with the same NetworkID as the one provided in the OperationalDataset, the operation is considered an addition, otherwise, it is considered an update.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameAddOrUpdateThreadNetwork
Directionclient → server
ConformanceTH
ResponseNetworkConfigResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0OperationalDatasetoperationalDatasetoctstrMmax length 254Indicates the Thread Network Parameters, including channel, PAN ID, and Extended PAN ID. The encoding for the OperationalDataset field is defined in the Thread specification.
1Breadcrumbbreadcrumbuint64O——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "AddOrUpdateThreadNetwork",
    "payload": {
      "operationalDataset": "AQID"
    }
  }
}

The device answers with NetworkConfigResponse (see below).


Command: RemoveNetwork

Purpose

This command is used to remove a network configuration on the network interface associated with the cluster instance. This command must remove the network configuration from the Cluster if there was already a network configuration with the same NetworkID. The relative order of the entries in the Networks attribute must remain unchanged, except for the removal of the requested network configuration. If this command is received without an armed fail-safe context, then this command must fail with a FAILSAFE_REQUIRED status code sent back to the initiator.

Command Identity

FieldValue
Command ID4
Command hex0x04
Command nameRemoveNetwork
Directionclient → server
ConformanceWI | TH
ResponseNetworkConfigResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkIDnetworkIDoctstrMlength 1 to 32—
1Breadcrumbbreadcrumbuint64O——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "RemoveNetwork",
    "payload": {
      "networkID": "AQID"
    }
  }
}

The device answers with NetworkConfigResponse (see below).


Command: NetworkConfigResponse

Purpose

This command is used to report the results of a network configuration command (AddOrUpdateWiFiNetwork, AddOrUpdateThreadNetwork, or RemoveNetwork). This response command relates status information for some commands which require it as their response command. See each individual cluster server command for the situations that may cause a NetworkingStatus different than Success. Before generating a NetworkConfigResponse, the server must set the LastNetworkingStatus attribute value to the NetworkingStatus matching the response.

Command Identity

FieldValue
Command ID5
Command hex0x05
Command nameNetworkConfigResponse
Directionserver → client (response)
ConformanceWI | TH

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkingStatusnetworkingStatusNetworkCommissioningStatusEnumMdescIndicates the status of the last operation attempting to modify the Networks attribute configuration, taking one of these values: - Success: Operation succeeded. - OutOfRange: Network identifier was invalid (e.g. empty, too long, etc). - BoundsExceeded: …
1DebugTextdebugTextstringOmax length 512—
2NetworkIndexnetworkIndexuint8NetworkingStatus = statusmax computeIndicates the 0-based index of the entry in the Networks attribute that was last added, updated or removed successfully by the associated request command.

NetworkingStatus values (NetworkCommissioningStatusEnum): 0 = Success, 1 = OutOfRange, 2 = BoundsExceeded, 3 = NetworkIDNotFound, 4 = DuplicateNetworkID, 5 = NetworkNotFound, 6 = RegulatoryError, 7 = AuthFailure, 8 = UnsupportedSecurity, 9 = OtherConnectionFailure, 10 = IPV6Failed, 11 = IPBindFailed, 12 = UnknownError


Command: ConnectNetwork

Purpose

This command is used to connect to a network on the network interface associated with the cluster instance. This command must attempt to connect to a network whose configuration was previously added by either the AddOrUpdateWiFiNetwork or AddOrUpdateThreadNetwork commands. Network is identified by its NetworkID. This command must fail with a BUSY status code returned to the initiator if the server is currently unable to proceed with such an operation, such as if it is currently attempting to connect in the background, or is already proceeding with a prior ConnectNetwork.

Command Identity

FieldValue
Command ID6
Command hex0x06
Command nameConnectNetwork
Directionclient → server
ConformanceWI | TH
ResponseConnectNetworkResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkIDnetworkIDoctstrMlength 1 to 32—
1Breadcrumbbreadcrumbuint64O——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "ConnectNetwork",
    "payload": {
      "networkID": "AQID"
    }
  }
}

The device answers with ConnectNetworkResponse (see below).


Command: ConnectNetworkResponse

Purpose

This command is used to report the results of a ConnectNetwork command. Before generating a ConnectNetworkResponse, the server must: - Set the LastNetworkingStatus attribute value to the NetworkingStatus matching the response. - Set the LastNetworkID attribute value to the NetworkID that was used in the ConnectNetwork command which caused the response to be generated. - Set the LastConnectErrorValue attribute value to the ErrorValue matching the response, including setting it to null if the ErrorValue is not applicable.

Command Identity

FieldValue
Command ID7
Command hex0x07
Command nameConnectNetworkResponse
Directionserver → client (response)
ConformanceWI | TH

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkingStatusnetworkingStatusNetworkCommissioningStatusEnumM—Indicates the status of the last connection attempt, taking one of these values: - Success: Connection succeeded. - NetworkNotFound: No instance of an explicitly-provided network identifier was found during the attempt to join the network. - OutOfRange: …
1DebugTextdebugTextstringO——
2ErrorValueerrorValueint32 (nullable)M—Indicates the status of the associated request command. - ErrorValue interpretation for Wi-Fi association errors: - On any association failure during enabling of a network, the ErrorValue field is set to the Status Code value that was present in the last …

NetworkingStatus values (NetworkCommissioningStatusEnum): 0 = Success, 1 = OutOfRange, 2 = BoundsExceeded, 3 = NetworkIDNotFound, 4 = DuplicateNetworkID, 5 = NetworkNotFound, 6 = RegulatoryError, 7 = AuthFailure, 8 = UnsupportedSecurity, 9 = OtherConnectionFailure, 10 = IPV6Failed, 11 = IPBindFailed, 12 = UnknownError


Command: ReorderNetwork

Purpose

This command is used to re-order the network configuration list. This command must set the specific order of the network configuration selected by its NetworkID in the Networks attribute to match the position given by NetworkIndex.

Command Identity

FieldValue
Command ID8
Command hex0x08
Command nameReorderNetwork
Directionclient → server
ConformanceWI | TH
ResponseNetworkConfigResponse
Access(invoke: admin)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0NetworkIDnetworkIDoctstrMlength 1 to 32—
1NetworkIndexnetworkIndexuint8MdescIndicates the 0-based index of the new desired position of the entry in the Networks attribute.
2Breadcrumbbreadcrumbuint64O——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 49,
    "command_name": "ReorderNetwork",
    "payload": {
      "networkID": "AQID",
      "networkIndex": 1
    }
  }
}

The device answers with NetworkConfigResponse (see below).


Cluster 49 Events

Cluster 49 defines no events.


SmartphoneKey Notes

  • Used during commissioning only. AcceptedCommandList tells you whether a device is a Thread (AddOrUpdateThreadNetwork, id 3) or Wi-Fi (AddOrUpdateWiFiNetwork, id 2) device.
  • Shadow paths follow endpoint/49/attribute; attribute values that the device reports as unreadable are written as n/a.
  • Attribute IDs, command IDs and enum values on this page come from the CSA Matter 1.6.1 data model; descriptions are condensed from the specification text.