From 4fe104c8e377e43d6adc1db54ed1e58998015b68 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Thu, 9 Nov 2023 06:45:38 +1300 Subject: [PATCH] xml: Add PDC support to Network Commissioning cluster (#30191) * xml: AddOrUpdateWiFiNetwork.breadcrumb -> Breadcrumb zap_regen_all does not produce any code changes for this change. * xml: Add PDC support to Network Commissioning cluster * QueryIdentityResponse command should be optional * Fix optionality of other commands ScanNetworks, RemoveNetwork, ReorderNetwork, and ConnectNetwork are not mandatory. * Add Darwin availability * zap_regen_all * Remove cli attribute for response * Fix codegen of provisional command fields in darwin-framework-tool Fixes #29969 --- .../air-purifier-app.matter | 9 + .../air-quality-sensor-app.matter | 9 + .../all-clusters-app.matter | 9 + .../all-clusters-minimal-app.matter | 9 + .../bridge-common/bridge-app.matter | 9 + ...umiditysensor_thermostat_56de3d5f45.matter | 9 + ...ootnode_airqualitysensor_e63187f6c9.matter | 9 + ...ootnode_basicvideoplayer_0ff86e943b.matter | 9 + ...de_colortemperaturelight_hbUnzYVeyn.matter | 9 + .../rootnode_contactsensor_lFAGG1bfRO.matter | 9 + .../rootnode_dimmablelight_bCwGYSDpoe.matter | 9 + .../rootnode_dishwasher_cc105034fe.matter | 9 + .../rootnode_doorlock_aNKYAreMXE.matter | 9 + ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 9 + .../devices/rootnode_fan_7N2TobIlOX.matter | 9 + .../rootnode_flowsensor_1zVxHedlaV.matter | 9 + .../rootnode_genericswitch_9866e35d0b.matter | 9 + ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 9 + .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 9 + .../rootnode_laundrywasher_fb10d238c8.matter | 9 + .../rootnode_lightsensor_lZQycTFcJK.matter | 9 + ...rootnode_occupancysensor_iHyVgifZuo.matter | 9 + .../rootnode_onofflight_bbs1b7IaOV.matter | 9 + .../rootnode_onofflight_samplemei.matter | 9 + ...ootnode_onofflightswitch_FsPlMr090Q.matter | 9 + ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 9 + .../rootnode_pressuresensor_s0qC9wLH4k.matter | 9 + .../devices/rootnode_pump_5f904818cc.matter | 9 + .../devices/rootnode_pump_a811bb33a0.matter | 9 + ...eraturecontrolledcabinet_ffdb696680.matter | 9 + ...ode_roboticvacuumcleaner_1807ff0c49.matter | 9 + ...tnode_roomairconditioner_9cf3607804.matter | 9 + .../rootnode_smokecoalarm_686fe0dcb8.matter | 9 + .../rootnode_speaker_RpzeXdimqA.matter | 9 + ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 9 + .../rootnode_thermostat_bm3fb8dhYi.matter | 9 + .../rootnode_windowcovering_RLCxaGi9Yx.matter | 9 + .../contact-sensor-app.matter | 9 + .../templates/commands.zapt | 12 + .../dishwasher-common/dishwasher-app.matter | 9 + .../light-switch-app.matter | 9 + .../data_model/lighting-app-ethernet.matter | 9 + .../data_model/lighting-app-thread.matter | 9 + .../data_model/lighting-app-wifi.matter | 9 + .../lighting-common/lighting-app.matter | 9 + .../nxp/zap/lighting-on-off.matter | 6 + examples/lighting-app/qpg/zap/light.matter | 6 + .../data_model/lighting-thread-app.matter | 9 + .../data_model/lighting-wifi-app.matter | 9 + .../lit-icd-common/lit-icd-server-app.matter | 9 + examples/lock-app/lock-common/lock-app.matter | 9 + examples/lock-app/nxp/zap/lock-app.matter | 6 + examples/lock-app/qpg/zap/lock.matter | 6 + .../log-source-common/log-source-app.matter | 9 + .../ota-provider-app.matter | 9 + .../ota-requestor-app.matter | 9 + .../placeholder/linux/apps/app1/config.matter | 9 + .../placeholder/linux/apps/app2/config.matter | 9 + examples/pump-app/pump-common/pump-app.matter | 6 + .../silabs/data_model/pump-thread-app.matter | 6 + .../silabs/data_model/pump-wifi-app.matter | 6 + .../pump-controller-app.matter | 6 + .../refrigerator-app.matter | 9 + .../resource-monitoring-app.matter | 9 + examples/rvc-app/rvc-common/rvc-app.matter | 9 + .../smoke-co-alarm-app.matter | 9 + .../temperature-measurement.matter | 9 + .../nxp/zap/thermostat_matter_thread.matter | 9 + .../nxp/zap/thermostat_matter_wifi.matter | 9 + .../thermostat-common/thermostat.matter | 9 + examples/tv-app/tv-common/tv-app.matter | 30 +++ .../tv-casting-common/tv-casting-app.matter | 9 + .../virtual-device-app.matter | 9 + examples/window-app/common/window-app.matter | 9 + .../chip/network-commissioning-cluster.xml | 34 ++- .../data_model/controller-clusters.matter | 21 ++ .../chip/devicecontroller/ChipClusters.java | 129 +++++++++- .../chip/devicecontroller/ChipStructs.java | 34 ++- .../devicecontroller/ClusterIDMapping.java | 22 +- .../devicecontroller/ClusterInfoMapping.java | 72 +++++- ...rkCommissioningClusterNetworkInfoStruct.kt | 54 ++++- .../clusters/NetworkCommissioningCluster.kt | 23 +- ...rkCommissioningClusterNetworkInfoStruct.kt | 54 ++++- .../CHIPAttributeTLVValueDecoder.cpp | 57 ++++- .../zap-generated/CHIPInvokeCallbacks.cpp | 116 ++++++++- .../java/zap-generated/CHIPInvokeCallbacks.h | 15 ++ .../java/zap-generated/CHIPReadCallbacks.cpp | 54 ++++- .../python/chip/clusters/CHIPClusters.py | 11 + .../python/chip/clusters/Objects.py | 52 ++++ .../CHIP/templates/availability.yaml | 32 +++ .../MTRAttributeTLVValueDecoder.mm | 18 ++ .../CHIP/zap-generated/MTRBaseClusters.h | 8 + .../CHIP/zap-generated/MTRBaseClusters.mm | 24 ++ .../CHIP/zap-generated/MTRClusterConstants.h | 2 + .../CHIP/zap-generated/MTRClusters.h | 1 + .../CHIP/zap-generated/MTRClusters.mm | 27 +++ .../zap-generated/MTRCommandPayloadsObjc.h | 63 +++++ .../zap-generated/MTRCommandPayloadsObjc.mm | 228 +++++++++++++++++- .../MTRCommandPayloads_Internal.h | 12 + .../CHIP/zap-generated/MTRStructsObjc.h | 2 + .../CHIP/zap-generated/MTRStructsObjc.mm | 8 +- .../app-common/zap-generated/cluster-enums.h | 12 +- .../zap-generated/cluster-objects.cpp | 113 +++++++++ .../zap-generated/cluster-objects.h | 115 ++++++++- .../app-common/zap-generated/ids/Commands.h | 8 + .../zap-generated/cluster/Commands.h | 44 ++++ .../cluster/ComplexArgumentParser.cpp | 16 ++ .../cluster/logging/DataModelLogger.cpp | 32 +++ .../cluster/logging/DataModelLogger.h | 2 + .../zap-generated/cluster/Commands.h | 220 +++++++++++++++++ 110 files changed, 2350 insertions(+), 51 deletions(-) diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index 138e828cab9564..8d419ff58b2efd 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -483,6 +483,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -499,11 +500,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -550,6 +554,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -584,6 +591,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 4ee5d80575496f..8eb854e587e37b 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -477,6 +477,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -493,11 +494,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -544,6 +548,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -578,6 +585,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index b5046f38121963..8cca9f1a741a81 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -1419,6 +1419,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1435,11 +1436,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1486,6 +1490,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1520,6 +1527,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 66804dc6569eb6..e5dcdd9ef793af 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1243,6 +1243,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1259,11 +1260,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1310,6 +1314,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1344,6 +1351,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 1480e89216c583..dbaea821e711bf 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -751,6 +751,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -767,11 +768,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -818,6 +822,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -852,6 +859,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 64dfad6fc4efa2..94f8c902651b55 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -403,6 +403,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -419,11 +420,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -470,6 +474,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -504,6 +511,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 1ebd25fedc1d3b..b890b8577c2718 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -532,6 +532,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -548,11 +549,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -599,6 +603,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -633,6 +640,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 846202f1f4d5b2..1ccb6c4c41c848 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -538,6 +538,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -554,11 +555,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -605,6 +609,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -639,6 +646,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 548750c88aada2..bac397cf01a17f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -715,6 +715,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -731,11 +732,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -782,6 +786,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -816,6 +823,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 51807907fd928b..9986d23d29e88a 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -620,6 +620,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -636,11 +637,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -687,6 +691,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -721,6 +728,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index aaec536fdcfef8..f9b47858a183f5 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -771,6 +771,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -787,11 +788,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -838,6 +842,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -872,6 +879,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index ac6ce558704537..53f0d9557f3e41 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -412,6 +412,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -428,11 +429,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -479,6 +483,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -513,6 +520,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 4ce6920150b03e..dc570ef1525154 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -620,6 +620,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -636,11 +637,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -687,6 +691,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -721,6 +728,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 3b37d37898d03a..770cee286e6c13 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -771,6 +771,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -787,11 +788,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -838,6 +842,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -872,6 +879,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 131960ba6c3e09..2beede15863c4f 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -607,6 +607,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -623,11 +624,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -674,6 +678,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -708,6 +715,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 4f6f95e7797613..1b0079fc78b32b 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index de09288e6eaf13..1f149a49141bc9 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -334,6 +334,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -350,11 +351,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -401,6 +405,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -435,6 +442,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index ed6f00e760d666..fa45ecfee359d9 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -765,6 +765,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -781,11 +782,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -832,6 +836,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -866,6 +873,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index b8b6393786c7c6..2c859f242c244c 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 5930d828f4b306..f3eb75af407253 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -412,6 +412,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -428,11 +429,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -479,6 +483,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -513,6 +520,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 1c7fb19196b0f8..97d93f34716e58 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index e88f8d822fedd4..0caef98633bde1 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 7c51e5dfe95700..21939ef34d78e0 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -771,6 +771,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -787,11 +788,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -838,6 +842,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -872,6 +879,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 6ef987fb4220b0..cc73c38b5c29e1 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -771,6 +771,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -787,11 +788,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -838,6 +842,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -872,6 +879,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index f8255600438656..592f141dd59d6e 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -736,6 +736,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -752,11 +753,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -803,6 +807,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -837,6 +844,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index f7d2edd5ca889a..1d4e16ab74d332 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -670,6 +670,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -686,11 +687,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -737,6 +741,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -771,6 +778,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 091835dc404eb4..bdf2b57582204b 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index ccb84e1f08c5f3..b078a0e9e8e79f 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -449,6 +449,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -465,11 +466,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -516,6 +520,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -550,6 +557,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 03faacdc5b2ac8..2067a28d9e5bb6 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -449,6 +449,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -465,11 +466,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -516,6 +520,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -550,6 +557,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index ab74b5977accda..1b8031b6bc7874 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -412,6 +412,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -428,11 +429,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -479,6 +483,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -513,6 +520,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index b776749b7e2699..cad3129660ac77 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -403,6 +403,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -419,11 +420,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -470,6 +474,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -504,6 +511,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index f4e280c1938122..c10d6819f9b54e 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -449,6 +449,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -465,11 +466,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -516,6 +520,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -550,6 +557,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 2742d918b4aa9d..79c4fdd0da3b2b 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -635,6 +635,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -651,11 +652,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -702,6 +706,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -736,6 +743,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 04f4c22d42bc9e..e174a7093d794e 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -696,6 +696,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -712,11 +713,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -763,6 +767,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -797,6 +804,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index faf2ef72c55b40..cff243e9e73418 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -626,6 +626,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -642,11 +643,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -693,6 +697,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -727,6 +734,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 8888d71c315223..7e257b1fbfb706 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -620,6 +620,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -636,11 +637,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -687,6 +691,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -721,6 +728,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index c829b94170e956..b14f34a64d701c 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -620,6 +620,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -636,11 +637,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -687,6 +691,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -721,6 +728,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 980c24fa04f3da..8faaa13e43c9a0 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -607,6 +607,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -623,11 +624,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -674,6 +678,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -708,6 +715,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index 241a75bd33ecc6..b4fe946cf58258 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -41,6 +41,9 @@ public: {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}(): ClusterCommand("{{cleanse_label_as_kebab_case name}}"){{#zcl_command_arguments}}{{#if_chip_complex}}, mComplex_{{asUpperCamelCase label}}(&mRequest.{{asLowerCamelCase label}}){{/if_chip_complex}}{{/zcl_command_arguments}} { {{#zcl_command_arguments}} + {{#if (isProvisional (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} + #if MTR_ENABLE_PROVISIONAL + {{/if}} {{#if_chip_complex}} AddArgument("{{asUpperCamelCase label}}", &mComplex_{{asUpperCamelCase label}}); {{else if (isString type)}} @@ -48,6 +51,9 @@ public: {{else}} AddArgument("{{asUpperCamelCase label}}", {{as_type_min_value type language='c++'}}, {{as_type_max_value type language='c++'}}, &mRequest.{{asLowerCamelCase label}}); {{/if_chip_complex}} + {{#if (isProvisional (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} + #endif // MTR_ENABLE_PROVISIONAL + {{/if}} {{/zcl_command_arguments}} ClusterCommand::AddArguments(); } @@ -64,7 +70,13 @@ public: __auto_type * params = [[MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; {{#zcl_command_arguments}} + {{#if (isProvisional (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} + #if MTR_ENABLE_PROVISIONAL + {{/if}} {{>decodable_value target=(concat "params." (asStructPropertyName label)) source=(concat "mRequest." (asLowerCamelCase label)) cluster=parent.parent.name type=type depth=0}} + {{#if (isProvisional (asUpperCamelCase parent.parent.name preserveAcronyms=true) command=(asUpperCamelCase parent.name preserveAcronyms=true) commandField=(asStructPropertyName label))}} + #endif // MTR_ENABLE_PROVISIONAL + {{/if}} {{/zcl_command_arguments}} uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 057570068ed17c..d9607978afc0c6 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -500,6 +500,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -516,11 +517,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -567,6 +571,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -601,6 +608,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 3d1c46a07769e9..df878a1ec1492d 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -926,6 +926,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -942,11 +943,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -993,6 +997,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1027,6 +1034,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index a466b86f55ec0b..1b9c61821dafd0 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -779,6 +779,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -795,11 +796,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -846,6 +850,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -880,6 +887,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 76d36f766ae31a..c995fd1131e5a3 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -779,6 +779,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -795,11 +796,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -846,6 +850,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -880,6 +887,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index bc1ca07cf1dc8b..5560e896fb7e80 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -779,6 +779,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -795,11 +796,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -846,6 +850,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -880,6 +887,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 83a898816e870c..4c3a65953e0917 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -930,6 +930,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -946,11 +947,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -997,6 +1001,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1031,6 +1038,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 119c166301e508..4cf0c1917c0c4f 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -709,6 +709,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -725,11 +726,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -804,6 +808,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 738b4d249fac05..69f793b0a23e85 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -717,6 +717,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -733,11 +734,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -812,6 +816,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index e481c5ff944dc8..b532266a52998f 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1187,6 +1187,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1203,11 +1204,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1254,6 +1258,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1288,6 +1295,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 72276cb1aa55ae..eadd7ec2a979a4 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1166,6 +1166,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1182,11 +1183,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1233,6 +1237,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1267,6 +1274,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 204c4bb8f10412..979c24198d8800 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -493,6 +493,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -509,11 +510,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -560,6 +564,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -594,6 +601,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index e434cec4947aa5..695efd9787c1f2 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -845,6 +845,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -861,11 +862,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -912,6 +916,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -946,6 +953,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index db8eee7e4c1964..951255e4a25b30 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -326,6 +326,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -342,11 +343,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -421,6 +425,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index cda734036be091..abbb95e0a5642e 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -552,6 +552,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -568,11 +569,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -647,6 +651,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 207575f2e08c50..fc003cb3e47cda 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -167,6 +167,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -183,11 +184,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -226,6 +230,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -260,6 +267,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index cc9cb2c33dfff5..5a55faf0acb564 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -487,6 +487,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -503,11 +504,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -554,6 +558,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -588,6 +595,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index c540e9c3edcbc2..a82caa410e336d 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -671,6 +671,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -687,11 +688,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -738,6 +742,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -772,6 +779,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 0d2eedbc01d479..32b499ac96d58b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1470,6 +1470,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1486,11 +1487,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1537,6 +1541,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1571,6 +1578,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 49583ea1cac6dc..ef0aa162fd9c1a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1429,6 +1429,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1445,11 +1446,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1496,6 +1500,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1530,6 +1537,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 3d0caf4c56db88..fb5f5a9cbc5860 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -639,6 +639,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -655,11 +656,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -734,6 +738,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 0b53e92fe8207e..bcdc2c05b461a2 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -639,6 +639,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -655,11 +656,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -734,6 +738,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 0b53e92fe8207e..bcdc2c05b461a2 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -639,6 +639,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -655,11 +656,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -734,6 +738,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index ace971a2421210..73dfe6669f45fa 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -564,6 +564,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -580,11 +581,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -659,6 +663,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index f73f0411c1f756..31cc2e8be90fc0 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -367,6 +367,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -383,11 +384,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -434,6 +438,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -468,6 +475,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index c60a06bc035d09..1e397640853ebe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -607,6 +607,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -623,11 +624,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -674,6 +678,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -708,6 +715,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 9be857b09ec61b..724da67819aa69 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -334,6 +334,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -350,11 +351,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -401,6 +405,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -435,6 +442,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 103cf374d7a292..6e3fcceebd5938 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -839,6 +839,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -855,11 +856,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -906,6 +910,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -940,6 +947,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 1653f8e8764bdf..2ab3a6312d7e73 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -367,6 +367,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -383,11 +384,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -434,6 +438,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct RemoveNetworkRequest { @@ -463,6 +470,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 6d1c2337a5f3e1..0a26d44715f2c1 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1049,6 +1049,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1065,11 +1066,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1116,6 +1120,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1150,6 +1157,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 7b9f8c357dcf9e..9bc75ba88c8253 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1049,6 +1049,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1065,11 +1066,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1116,6 +1120,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1150,6 +1157,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 3e7e34ed8000ab..b6cab942fbd3a8 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -698,6 +698,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -714,11 +715,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -765,6 +769,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -799,6 +806,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index e420f9b9793e4c..bb6297fa64b45f 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -697,6 +697,7 @@ client cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -713,11 +714,14 @@ client cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -774,6 +778,9 @@ client cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -790,6 +797,8 @@ client cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } request struct ConnectNetworkRequest { @@ -809,6 +818,16 @@ client cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 2; } + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; + } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; /** Add or update the credentials for a given Wi-Fi network. */ @@ -821,6 +840,8 @@ client cluster NetworkCommissioning = 49 { command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ @@ -854,6 +875,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -870,11 +892,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -921,6 +946,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -955,6 +983,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index be984fb04b229e..343e9fd91e505a 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -732,6 +732,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -748,11 +749,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -799,6 +803,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -833,6 +840,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 14cff8680dd518..f37d7c7d13713c 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -993,6 +993,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1009,11 +1010,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1060,6 +1064,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1094,6 +1101,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index c99a4d4d5f5b9d..a9b36634431a89 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -865,6 +865,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -881,11 +882,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -932,6 +936,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -966,6 +973,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml index 5063f3241053bc..56e98e16d27a6a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml @@ -48,6 +48,7 @@ limitations under the License. + @@ -83,6 +84,8 @@ limitations under the License. + + @@ -90,6 +93,7 @@ limitations under the License. + @@ -138,13 +142,13 @@ limitations under the License. ThreadVersion - + Detemine the set of networks the device sees as available. - + Relay the set of networks the device sees as available back to the client. @@ -155,7 +159,10 @@ limitations under the License. Add or update the credentials for a given Wi-Fi network. - + + + + @@ -164,7 +171,7 @@ limitations under the License. - + Remove the definition of a given network (including its credentials). @@ -175,25 +182,38 @@ limitations under the License. + + - + Connect to the specified network, using previously-defined credentials. - + Command that indicates whether we have succcessfully connected to a network. - + Modify the order in which networks will be presented in the Networks attribute. + + Retrieve details about and optionally proof of possession of a network client identity. + + + + + + Command that contains details about a network client identity and optionally a proof of possession. + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 077b038fc7f293..fdf693d73ae72b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1526,6 +1526,7 @@ client cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1542,11 +1543,14 @@ client cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1603,6 +1607,9 @@ client cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1619,6 +1626,8 @@ client cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } request struct ConnectNetworkRequest { @@ -1638,6 +1647,16 @@ client cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 2; } + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; + } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; /** Add or update the credentials for a given Wi-Fi network. */ @@ -1650,6 +1669,8 @@ client cluster NetworkCommissioning = 49 { command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 8f16a564c1f299..fc241abddf6087 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -9841,11 +9841,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb) { - addOrUpdateWiFiNetwork(callback, ssid, credentials, breadcrumb, 0); + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce) { + addOrUpdateWiFiNetwork(callback, ssid, credentials, breadcrumb, networkIdentity, clientIdentifier, possessionNonce, 0); } - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, int timedInvokeTimeoutMs) { + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); @@ -9861,6 +9861,18 @@ public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[ BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + final long networkIdentityFieldID = 3L; + BaseTLVType networkIdentitytlvValue = networkIdentity.map((nonOptionalnetworkIdentity) -> new ByteArrayType(nonOptionalnetworkIdentity)).orElse(new EmptyType()); + elements.add(new StructElement(networkIdentityFieldID, networkIdentitytlvValue)); + + final long clientIdentifierFieldID = 4L; + BaseTLVType clientIdentifiertlvValue = clientIdentifier.map((nonOptionalclientIdentifier) -> new ByteArrayType(nonOptionalclientIdentifier)).orElse(new EmptyType()); + elements.add(new StructElement(clientIdentifierFieldID, clientIdentifiertlvValue)); + + final long possessionNonceFieldID = 5L; + BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); + elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -9871,6 +9883,10 @@ public void onResponse(StructType invokeStructValue) { Optional debugText = Optional.empty(); final long networkIndexFieldID = 2L; Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9887,9 +9903,19 @@ public void onResponse(StructType invokeStructValue) { UIntType castingValue = element.value(UIntType.class); networkIndex = Optional.of(castingValue.value(Integer.class)); } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } } } - callback.onSuccess(networkingStatus, debugText, networkIndex); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } @@ -9919,6 +9945,10 @@ public void onResponse(StructType invokeStructValue) { Optional debugText = Optional.empty(); final long networkIndexFieldID = 2L; Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9935,9 +9965,19 @@ public void onResponse(StructType invokeStructValue) { UIntType castingValue = element.value(UIntType.class); networkIndex = Optional.of(castingValue.value(Integer.class)); } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } } } - callback.onSuccess(networkingStatus, debugText, networkIndex); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } @@ -9967,6 +10007,10 @@ public void onResponse(StructType invokeStructValue) { Optional debugText = Optional.empty(); final long networkIndexFieldID = 2L; Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9983,9 +10027,19 @@ public void onResponse(StructType invokeStructValue) { UIntType castingValue = element.value(UIntType.class); networkIndex = Optional.of(castingValue.value(Integer.class)); } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } } } - callback.onSuccess(networkingStatus, debugText, networkIndex); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } @@ -10067,6 +10121,10 @@ public void onResponse(StructType invokeStructValue) { Optional debugText = Optional.empty(); final long networkIndexFieldID = 2L; Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -10083,9 +10141,60 @@ public void onResponse(StructType invokeStructValue) { UIntType castingValue = element.value(UIntType.class); networkIndex = Optional.of(castingValue.value(Integer.class)); } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } + } + } + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce) { + queryIdentity(callback, keyIdentifier, possessionNonce, 0); + } + + public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { + final long commandId = 9L; + + ArrayList elements = new ArrayList<>(); + final long keyIdentifierFieldID = 0L; + BaseTLVType keyIdentifiertlvValue = new ByteArrayType(keyIdentifier); + elements.add(new StructElement(keyIdentifierFieldID, keyIdentifiertlvValue)); + + final long possessionNonceFieldID = 1L; + BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); + elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long identityFieldID = 0L; + byte[] identity = null; + final long possessionSignatureFieldID = 1L; + Optional possessionSignature = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == identityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + identity = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } } } - callback.onSuccess(networkingStatus, debugText, networkIndex); + callback.onSuccess(identity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } @@ -10094,13 +10203,17 @@ public interface ScanNetworksResponseCallback extends BaseClusterCallback { } public interface NetworkConfigResponseCallback extends BaseClusterCallback { - void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex); + void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex, Optional clientIdentity, Optional possessionSignature); } public interface ConnectNetworkResponseCallback extends BaseClusterCallback { void onSuccess(Integer networkingStatus, Optional debugText, @Nullable Long errorValue); } + public interface QueryIdentityResponseCallback extends BaseClusterCallback { + void onSuccess(byte[] identity, Optional possessionSignature); + } + public interface NetworksAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index f34eba0b02ef69..6838a3c34779c5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -1304,21 +1304,31 @@ public String toString() { public static class NetworkCommissioningClusterNetworkInfoStruct { public byte[] networkID; public Boolean connected; + public @Nullable Optional networkIdentifier; + public @Nullable Optional clientIdentifier; private static final long NETWORK_I_D_ID = 0L; private static final long CONNECTED_ID = 1L; + private static final long NETWORK_IDENTIFIER_ID = 2L; + private static final long CLIENT_IDENTIFIER_ID = 3L; public NetworkCommissioningClusterNetworkInfoStruct( byte[] networkID, - Boolean connected + Boolean connected, + @Nullable Optional networkIdentifier, + @Nullable Optional clientIdentifier ) { this.networkID = networkID; this.connected = connected; + this.networkIdentifier = networkIdentifier; + this.clientIdentifier = clientIdentifier; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(NETWORK_I_D_ID, new ByteArrayType(networkID))); values.add(new StructElement(CONNECTED_ID, new BooleanType(connected))); + values.add(new StructElement(NETWORK_IDENTIFIER_ID, networkIdentifier != null ? networkIdentifier.map((nonOptionalnetworkIdentifier) -> new ByteArrayType(nonOptionalnetworkIdentifier)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(CLIENT_IDENTIFIER_ID, clientIdentifier != null ? clientIdentifier.map((nonOptionalclientIdentifier) -> new ByteArrayType(nonOptionalclientIdentifier)).orElse(new EmptyType()) : new NullType())); return new StructType(values); } @@ -1329,6 +1339,8 @@ public static NetworkCommissioningClusterNetworkInfoStruct decodeTlv(BaseTLVType } byte[] networkID = null; Boolean connected = null; + @Nullable Optional networkIdentifier = null; + @Nullable Optional clientIdentifier = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == NETWORK_I_D_ID) { if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { @@ -1340,11 +1352,23 @@ public static NetworkCommissioningClusterNetworkInfoStruct decodeTlv(BaseTLVType BooleanType castingValue = element.value(BooleanType.class); connected = castingValue.value(Boolean.class); } + } else if (element.contextTagNum() == NETWORK_IDENTIFIER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + networkIdentifier = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == CLIENT_IDENTIFIER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentifier = Optional.of(castingValue.value(byte[].class)); + } } } return new NetworkCommissioningClusterNetworkInfoStruct( networkID, - connected + connected, + networkIdentifier, + clientIdentifier ); } @@ -1358,6 +1382,12 @@ public String toString() { output.append("\tconnected: "); output.append(connected); output.append("\n"); + output.append("\tnetworkIdentifier: "); + output.append(networkIdentifier.isPresent() ? Arrays.toString(networkIdentifier.get()) : ""); + output.append("\n"); + output.append("\tclientIdentifier: "); + output.append(clientIdentifier.isPresent() ? Arrays.toString(clientIdentifier.get()) : ""); + output.append("\n"); output.append("}\n"); return output.toString(); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index e84a45e606f1e5..a74d88ffd01b4a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -3471,7 +3471,8 @@ public enum Command { AddOrUpdateThreadNetwork(3L), RemoveNetwork(4L), ConnectNetwork(6L), - ReorderNetwork(8L),; + ReorderNetwork(8L), + QueryIdentity(9L),; private final long id; Command(long id) { this.id = id; @@ -3506,7 +3507,7 @@ public static ScanNetworksCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum AddOrUpdateWiFiNetworkCommandField {Ssid(0),Credentials(1),Breadcrumb(2),; + }public enum AddOrUpdateWiFiNetworkCommandField {Ssid(0),Credentials(1),Breadcrumb(2),NetworkIdentity(3),ClientIdentifier(4),PossessionNonce(5),; private final int id; AddOrUpdateWiFiNetworkCommandField(int id) { this.id = id; @@ -3591,6 +3592,23 @@ public static ReorderNetworkCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } + }public enum QueryIdentityCommandField {KeyIdentifier(0),PossessionNonce(1),; + private final int id; + QueryIdentityCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static QueryIdentityCommandField value(int id) throws NoSuchFieldError { + for (QueryIdentityCommandField field : QueryIdentityCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 1e6066ef4643ac..e35ef47f466512 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -3294,7 +3294,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex) { + public void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex, Optional clientIdentity, Optional possessionSignature) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo networkingStatusResponseValue = new CommandResponseInfo("networkingStatus", "Integer"); @@ -3303,6 +3303,10 @@ public void onSuccess(Integer networkingStatus, Optional debugText, Opti responseValues.put(debugTextResponseValue, debugText); CommandResponseInfo networkIndexResponseValue = new CommandResponseInfo("networkIndex", "Optional"); responseValues.put(networkIndexResponseValue, networkIndex); + CommandResponseInfo clientIdentityResponseValue = new CommandResponseInfo("clientIdentity", "Optional"); + responseValues.put(clientIdentityResponseValue, clientIdentity); + CommandResponseInfo possessionSignatureResponseValue = new CommandResponseInfo("possessionSignature", "Optional"); + responseValues.put(possessionSignatureResponseValue, possessionSignature); callback.onSuccess(responseValues); } @@ -3337,6 +3341,30 @@ public void onError(Exception error) { callback.onFailure(error); } } + + public static class DelegatedNetworkCommissioningClusterQueryIdentityResponseCallback implements ChipClusters.NetworkCommissioningCluster.QueryIdentityResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(byte[] identity, Optional possessionSignature) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo identityResponseValue = new CommandResponseInfo("identity", "byte[]"); + responseValues.put(identityResponseValue, identity); + CommandResponseInfo possessionSignatureResponseValue = new CommandResponseInfo("possessionSignature", "Optional"); + responseValues.put(possessionSignatureResponseValue, possessionSignature); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedNetworkCommissioningClusterNetworksAttributeCallback implements ChipClusters.NetworkCommissioningCluster.NetworksAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -18974,6 +19002,15 @@ public Map> getCommandMap() { CommandParameterInfo networkCommissioningaddOrUpdateWiFiNetworkbreadcrumbCommandParameterInfo = new CommandParameterInfo("breadcrumb", Optional.class, Long.class); networkCommissioningaddOrUpdateWiFiNetworkCommandParams.put("breadcrumb",networkCommissioningaddOrUpdateWiFiNetworkbreadcrumbCommandParameterInfo); + + CommandParameterInfo networkCommissioningaddOrUpdateWiFiNetworknetworkIdentityCommandParameterInfo = new CommandParameterInfo("networkIdentity", Optional.class, byte[].class); + networkCommissioningaddOrUpdateWiFiNetworkCommandParams.put("networkIdentity",networkCommissioningaddOrUpdateWiFiNetworknetworkIdentityCommandParameterInfo); + + CommandParameterInfo networkCommissioningaddOrUpdateWiFiNetworkclientIdentifierCommandParameterInfo = new CommandParameterInfo("clientIdentifier", Optional.class, byte[].class); + networkCommissioningaddOrUpdateWiFiNetworkCommandParams.put("clientIdentifier",networkCommissioningaddOrUpdateWiFiNetworkclientIdentifierCommandParameterInfo); + + CommandParameterInfo networkCommissioningaddOrUpdateWiFiNetworkpossessionNonceCommandParameterInfo = new CommandParameterInfo("possessionNonce", Optional.class, byte[].class); + networkCommissioningaddOrUpdateWiFiNetworkCommandParams.put("possessionNonce",networkCommissioningaddOrUpdateWiFiNetworkpossessionNonceCommandParameterInfo); InteractionInfo networkCommissioningaddOrUpdateWiFiNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.NetworkCommissioningCluster) cluster) @@ -18987,6 +19024,15 @@ public Map> getCommandMap() { , (Optional) commandArguments.get("breadcrumb") + , (Optional) + commandArguments.get("networkIdentity") + + , (Optional) + commandArguments.get("clientIdentifier") + + , (Optional) + commandArguments.get("possessionNonce") + ); }, () -> new DelegatedNetworkCommissioningClusterNetworkConfigResponseCallback(), @@ -19096,6 +19142,30 @@ public Map> getCommandMap() { ); networkCommissioningClusterInteractionInfoMap.put("reorderNetwork", networkCommissioningreorderNetworkInteractionInfo); + Map networkCommissioningqueryIdentityCommandParams = new LinkedHashMap(); + + CommandParameterInfo networkCommissioningqueryIdentitykeyIdentifierCommandParameterInfo = new CommandParameterInfo("keyIdentifier", byte[].class, byte[].class); + networkCommissioningqueryIdentityCommandParams.put("keyIdentifier",networkCommissioningqueryIdentitykeyIdentifierCommandParameterInfo); + + CommandParameterInfo networkCommissioningqueryIdentitypossessionNonceCommandParameterInfo = new CommandParameterInfo("possessionNonce", Optional.class, byte[].class); + networkCommissioningqueryIdentityCommandParams.put("possessionNonce",networkCommissioningqueryIdentitypossessionNonceCommandParameterInfo); + InteractionInfo networkCommissioningqueryIdentityInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.NetworkCommissioningCluster) cluster) + .queryIdentity((ChipClusters.NetworkCommissioningCluster.QueryIdentityResponseCallback) callback + , (byte[]) + commandArguments.get("keyIdentifier") + + , (Optional) + commandArguments.get("possessionNonce") + + ); + }, + () -> new DelegatedNetworkCommissioningClusterQueryIdentityResponseCallback(), + networkCommissioningqueryIdentityCommandParams + ); + networkCommissioningClusterInteractionInfoMap.put("queryIdentity", networkCommissioningqueryIdentityInteractionInfo); + commandMap.put("networkCommissioning", networkCommissioningClusterInteractionInfoMap); Map diagnosticLogsClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index e4eee464d0b20d..82f98aeb677204 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -17,6 +17,7 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import java.util.Optional import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader @@ -24,12 +25,16 @@ import matter.tlv.TlvWriter class NetworkCommissioningClusterNetworkInfoStruct( val networkID: ByteArray, - val connected: Boolean + val connected: Boolean, + val networkIdentifier: Optional?, + val clientIdentifier: Optional? ) { override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") + append("\tnetworkIdentifier : $networkIdentifier\n") + append("\tclientIdentifier : $clientIdentifier\n") append("}\n") } @@ -38,6 +43,22 @@ class NetworkCommissioningClusterNetworkInfoStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) put(ContextSpecificTag(TAG_CONNECTED), connected) + if (networkIdentifier != null) { + if (networkIdentifier.isPresent) { + val optnetworkIdentifier = networkIdentifier.get() + put(ContextSpecificTag(TAG_NETWORK_IDENTIFIER), optnetworkIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + } + if (clientIdentifier != null) { + if (clientIdentifier.isPresent) { + val optclientIdentifier = clientIdentifier.get() + put(ContextSpecificTag(TAG_CLIENT_IDENTIFIER), optclientIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + } endStructure() } } @@ -45,15 +66,44 @@ class NetworkCommissioningClusterNetworkInfoStruct( companion object { private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 + private const val TAG_NETWORK_IDENTIFIER = 2 + private const val TAG_CLIENT_IDENTIFIER = 3 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tlvTag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) + val networkIdentifier = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + null + } + val clientIdentifier = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + null + } tlvReader.exitContainer() - return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) + return NetworkCommissioningClusterNetworkInfoStruct( + networkID, + connected, + networkIdentifier, + clientIdentifier + ) } } } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt index 8f0d4adbe40855..053471c8a853f7 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt @@ -34,7 +34,9 @@ class NetworkCommissioningCluster( class NetworkConfigResponse( val networkingStatus: UInt, val debugText: String?, - val networkIndex: UByte? + val networkIndex: UByte?, + val clientIdentity: ByteArray?, + val possessionSignature: ByteArray? ) class ConnectNetworkResponse( @@ -43,6 +45,8 @@ class NetworkCommissioningCluster( val errorValue: Int? ) + class QueryIdentityResponse(val identity: ByteArray, val possessionSignature: ByteArray?) + class NetworksAttribute(val value: List) class LastNetworkingStatusAttribute(val value: UInt?) @@ -79,6 +83,9 @@ class NetworkCommissioningCluster( ssid: ByteArray, credentials: ByteArray, breadcrumb: ULong?, + networkIdentity: ByteArray?, + clientIdentifier: ByteArray?, + possessionNonce: ByteArray?, timedInvokeTimeoutMs: Int? = null ): NetworkConfigResponse { val commandId = 2L @@ -147,6 +154,20 @@ class NetworkCommissioningCluster( } } + suspend fun queryIdentity( + keyIdentifier: ByteArray, + possessionNonce: ByteArray?, + timedInvokeTimeoutMs: Int? = null + ): QueryIdentityResponse { + val commandId = 9L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + suspend fun readMaxNetworksAttribute(): UByte { // Implementation needs to be added here } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 856ed9943059b0..245061cc19fc46 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -16,6 +16,7 @@ */ package matter.devicecontroller.cluster.structs +import java.util.Optional import matter.devicecontroller.cluster.* import matter.tlv.ContextSpecificTag import matter.tlv.Tag @@ -24,12 +25,16 @@ import matter.tlv.TlvWriter class NetworkCommissioningClusterNetworkInfoStruct( val networkID: ByteArray, - val connected: Boolean + val connected: Boolean, + val networkIdentifier: Optional?, + val clientIdentifier: Optional? ) { override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") + append("\tnetworkIdentifier : $networkIdentifier\n") + append("\tclientIdentifier : $clientIdentifier\n") append("}\n") } @@ -38,6 +43,22 @@ class NetworkCommissioningClusterNetworkInfoStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) put(ContextSpecificTag(TAG_CONNECTED), connected) + if (networkIdentifier != null) { + if (networkIdentifier.isPresent) { + val optnetworkIdentifier = networkIdentifier.get() + put(ContextSpecificTag(TAG_NETWORK_IDENTIFIER), optnetworkIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + } + if (clientIdentifier != null) { + if (clientIdentifier.isPresent) { + val optclientIdentifier = clientIdentifier.get() + put(ContextSpecificTag(TAG_CLIENT_IDENTIFIER), optclientIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + } endStructure() } } @@ -45,15 +66,44 @@ class NetworkCommissioningClusterNetworkInfoStruct( companion object { private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 + private const val TAG_NETWORK_IDENTIFIER = 2 + private const val TAG_CLIENT_IDENTIFIER = 3 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tlvTag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) + val networkIdentifier = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + null + } + val clientIdentifier = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + null + } tlvReader.exitContainer() - return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) + return NetworkCommissioningClusterNetworkInfoStruct( + networkID, + connected, + networkIdentifier, + clientIdentifier + ) } } } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 45a3a9f412dfc6..9d18a8972d5679 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -5821,6 +5821,54 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), newElement_0_connectedCtorSignature.c_str(), jninewElement_0_connected, newElement_0_connected); + jobject newElement_0_networkIdentifier; + if (!entry_0.networkIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); + } + else + { + jobject newElement_0_networkIdentifierInsideOptional; + if (entry_0.networkIdentifier.Value().IsNull()) + { + newElement_0_networkIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.networkIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); + newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, + newElement_0_networkIdentifier); + } + jobject newElement_0_clientIdentifier; + if (!entry_0.clientIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); + } + else + { + jobject newElement_0_clientIdentifierInsideOptional; + if (entry_0.clientIdentifier.Value().IsNull()) + { + newElement_0_clientIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.clientIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); + newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, + newElement_0_clientIdentifier); + } jclass networkInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5831,16 +5879,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); return nullptr; } - jmethodID networkInfoStructStructCtor_1 = - env->GetMethodID(networkInfoStructStructClass_1, "", "([BLjava/lang/Boolean;)V"); + jmethodID networkInfoStructStructCtor_1 = env->GetMethodID( + networkInfoStructStructClass_1, "", "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V"); if (networkInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, - newElement_0_connected); + newElement_0 = + env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, + newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 6c7d8b46e8a37d..c5809884403bc2 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -1975,8 +1975,9 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject NetworkingStatus; @@ -2013,8 +2014,41 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( jniNetworkIndexInsideOptional, NetworkIndexInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NetworkIndexInsideOptional, NetworkIndex); } + jobject ClientIdentity; + if (!dataResponse.clientIdentity.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ClientIdentity); + } + else + { + jobject ClientIdentityInsideOptional; + jbyteArray ClientIdentityInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.clientIdentity.Value().size())); + env->SetByteArrayRegion(ClientIdentityInsideOptionalByteArray, 0, + static_cast(dataResponse.clientIdentity.Value().size()), + reinterpret_cast(dataResponse.clientIdentity.Value().data())); + ClientIdentityInsideOptional = ClientIdentityInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(ClientIdentityInsideOptional, ClientIdentity); + } + jobject PossessionSignature; + if (!dataResponse.possessionSignature.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); + } + else + { + jobject PossessionSignatureInsideOptional; + jbyteArray PossessionSignatureInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); + env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, + static_cast(dataResponse.possessionSignature.Value().size()), + reinterpret_cast(dataResponse.possessionSignature.Value().data())); + PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, NetworkIndex); + env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, NetworkIndex, ClientIdentity, + PossessionSignature); } CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CHIPNetworkCommissioningClusterConnectNetworkResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -2103,6 +2137,82 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, ErrorValue); } +CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CHIPNetworkCommissioningClusterQueryIdentityResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([BLjava/util/Optional;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Identity; + jbyteArray IdentityByteArray = env->NewByteArray(static_cast(dataResponse.identity.size())); + env->SetByteArrayRegion(IdentityByteArray, 0, static_cast(dataResponse.identity.size()), + reinterpret_cast(dataResponse.identity.data())); + Identity = IdentityByteArray; + jobject PossessionSignature; + if (!dataResponse.possessionSignature.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); + } + else + { + jobject PossessionSignatureInsideOptional; + jbyteArray PossessionSignatureInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); + env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, + static_cast(dataResponse.possessionSignature.Value().size()), + reinterpret_cast(dataResponse.possessionSignature.Value().data())); + PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Identity, PossessionSignature); +} CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index c6afa9916c41fa..98afa14307e711 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -327,6 +327,21 @@ class CHIPNetworkCommissioningClusterConnectNetworkResponseCallback jobject javaCallbackRef; }; +class CHIPNetworkCommissioningClusterQueryIdentityResponseCallback + : public Callback::Callback +{ +public: + CHIPNetworkCommissioningClusterQueryIdentityResponseCallback(jobject javaCallback); + + ~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 038b013d380d9c..f04f6d92ef32ac 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -8989,6 +8989,54 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), newElement_0_connectedCtorSignature.c_str(), jninewElement_0_connected, newElement_0_connected); + jobject newElement_0_networkIdentifier; + if (!entry_0.networkIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); + } + else + { + jobject newElement_0_networkIdentifierInsideOptional; + if (entry_0.networkIdentifier.Value().IsNull()) + { + newElement_0_networkIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.networkIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); + newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, + newElement_0_networkIdentifier); + } + jobject newElement_0_clientIdentifier; + if (!entry_0.clientIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); + } + else + { + jobject newElement_0_clientIdentifierInsideOptional; + if (entry_0.clientIdentifier.Value().IsNull()) + { + newElement_0_clientIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.clientIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); + newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, + newElement_0_clientIdentifier); + } jclass networkInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -8998,8 +9046,8 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); return; } - jmethodID networkInfoStructStructCtor_1 = - env->GetMethodID(networkInfoStructStructClass_1, "", "([BLjava/lang/Boolean;)V"); + jmethodID networkInfoStructStructCtor_1 = env->GetMethodID( + networkInfoStructStructClass_1, "", "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V"); if (networkInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); @@ -9007,7 +9055,7 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( } newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, - newElement_0_connected); + newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 9a0bd9be08360e..82540f3dfec04c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2190,6 +2190,9 @@ class ChipClusters: "ssid": "bytes", "credentials": "bytes", "breadcrumb": "int", + "networkIdentity": "bytes", + "clientIdentifier": "bytes", + "possessionNonce": "bytes", }, }, 0x00000003: { @@ -2225,6 +2228,14 @@ class ChipClusters: "breadcrumb": "int", }, }, + 0x00000009: { + "commandId": 0x00000009, + "commandName": "QueryIdentity", + "args": { + "keyIdentifier": "bytes", + "possessionNonce": "bytes", + }, + }, }, "attributes": { 0x00000000: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 41ec9209e89084..e933de1f6a9fe1 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -7472,6 +7472,7 @@ class Feature(IntFlag): kWiFiNetworkInterface = 0x1 kThreadNetworkInterface = 0x2 kEthernetNetworkInterface = 0x4 + kPerDeviceCredentials = 0x8 class ThreadCapabilitiesBitmap(IntFlag): kIsBorderRouterCapable = 0x1 @@ -7486,6 +7487,7 @@ class WiFiSecurityBitmap(IntFlag): kWpaPersonal = 0x4 kWpa2Personal = 0x8 kWpa3Personal = 0x10 + kWpa3MatterPdc = 0x20 class Structs: @dataclass @@ -7496,10 +7498,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="networkID", Tag=0, Type=bytes), ClusterObjectFieldDescriptor(Label="connected", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="networkIdentifier", Tag=2, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="clientIdentifier", Tag=3, Type=typing.Union[None, Nullable, bytes]), ]) networkID: 'bytes' = b"" connected: 'bool' = False + networkIdentifier: 'typing.Union[None, Nullable, bytes]' = None + clientIdentifier: 'typing.Union[None, Nullable, bytes]' = None @dataclass class ThreadInterfaceScanResultStruct(ClusterObject): @@ -7602,11 +7608,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ssid", Tag=0, Type=bytes), ClusterObjectFieldDescriptor(Label="credentials", Tag=1, Type=bytes), ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="networkIdentity", Tag=3, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="clientIdentifier", Tag=4, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="possessionNonce", Tag=5, Type=typing.Optional[bytes]), ]) ssid: 'bytes' = b"" credentials: 'bytes' = b"" breadcrumb: 'typing.Optional[uint]' = None + networkIdentity: 'typing.Optional[bytes]' = None + clientIdentifier: 'typing.Optional[bytes]' = None + possessionNonce: 'typing.Optional[bytes]' = None @dataclass class AddOrUpdateThreadNetwork(ClusterCommand): @@ -7658,11 +7670,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="networkingStatus", Tag=0, Type=NetworkCommissioning.Enums.NetworkCommissioningStatusEnum), ClusterObjectFieldDescriptor(Label="debugText", Tag=1, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="networkIndex", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="clientIdentity", Tag=3, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="possessionSignature", Tag=4, Type=typing.Optional[bytes]), ]) networkingStatus: 'NetworkCommissioning.Enums.NetworkCommissioningStatusEnum' = 0 debugText: 'typing.Optional[str]' = None networkIndex: 'typing.Optional[uint]' = None + clientIdentity: 'typing.Optional[bytes]' = None + possessionSignature: 'typing.Optional[bytes]' = None @dataclass class ConnectNetwork(ClusterCommand): @@ -7722,6 +7738,42 @@ def descriptor(cls) -> ClusterObjectDescriptor: networkIndex: 'uint' = 0 breadcrumb: 'typing.Optional[uint]' = None + @dataclass + class QueryIdentity(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000031 + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'QueryIdentityResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="keyIdentifier", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="possessionNonce", Tag=1, Type=typing.Optional[bytes]), + ]) + + keyIdentifier: 'bytes' = b"" + possessionNonce: 'typing.Optional[bytes]' = None + + @dataclass + class QueryIdentityResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000031 + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="identity", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="possessionSignature", Tag=1, Type=typing.Optional[bytes]), + ]) + + identity: 'bytes' = b"" + possessionSignature: 'typing.Optional[bytes]' = None + class Attributes: @dataclass class MaxNetworks(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index f1646b35bc4ade..ea12586385c728 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7832,6 +7832,32 @@ # Targeting Spring 2024 Matter release - TimeSnapshot - TimeSnapshotResponse + NetworkCommissioning: + # Targeting Spring 2024 Matter release + - QueryIdentity + - QueryIdentityResponse + command fields: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + AddOrUpdateWiFiNetwork: + - networkIdentity + - clientIdentifier + - possessionNonce + NetworkConfigResponse: + - clientIdentity + - possessionSignature + QueryIdentity: + - keyIdentifier + - possessionNonce + QueryIdentityResponse: + - identity + - possessionSignature + struct fields: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + NetworkInfoStruct: + - networkIdentifier + - clientIdentifier bitmaps: NetworkCommissioning: # Targeting Spring 2024 Matter release @@ -7841,6 +7867,12 @@ Feature: # Targeting Spring 2024 Matter release - OffOnly + NetworkCommissioning: + # Targeting Spring 2024 Matter release + Feature: + - PerDeviceCredentials + WiFiSecurityBitmap: + - WPA3MatterPDC renames: event fields: WiFiNetworkDiagnostics: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index ec648809ab7d20..caf31a00de1242 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -2419,6 +2419,24 @@ static id _Nullable DecodeAttributeValueForNetworkCommissioningCluster(Attribute newElement_0 = [MTRNetworkCommissioningClusterNetworkInfoStruct new]; newElement_0.networkID = AsData(entry_0.networkID); newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; + if (entry_0.networkIdentifier.HasValue()) { + if (entry_0.networkIdentifier.Value().IsNull()) { + newElement_0.networkIdentifier = nil; + } else { + newElement_0.networkIdentifier = AsData(entry_0.networkIdentifier.Value().Value()); + } + } else { + newElement_0.networkIdentifier = nil; + } + if (entry_0.clientIdentifier.HasValue()) { + if (entry_0.clientIdentifier.Value().IsNull()) { + newElement_0.clientIdentifier = nil; + } else { + newElement_0.clientIdentifier = AsData(entry_0.clientIdentifier.Value().Value()); + } + } else { + newElement_0.clientIdentifier = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index b6ccca15e6cdd5..37e38c896308c5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -2499,6 +2499,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Modify the order in which networks will be presented in the Networks attribute. */ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command QueryIdentity + * + * Retrieve details about and optionally proof of possession of a network client identity. + */ +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams *)params @@ -14398,6 +14404,7 @@ typedef NS_OPTIONS(uint32_t, MTRNetworkCommissioningFeature) { MTRNetworkCommissioningFeatureWiFiNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRNetworkCommissioningFeatureThreadNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, MTRNetworkCommissioningFeatureEthernetNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRNetworkCommissioningFeaturePerDeviceCredentials MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint16_t, MTRNetworkCommissioningThreadCapabilitiesBitmap) { @@ -14414,6 +14421,7 @@ typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurityBitmap) { MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRNetworkCommissioningWiFiSecurityBitmapWPA3MatterPDC MTR_PROVISIONALLY_AVAILABLE = 0x20, } MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurity) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index e6732938737afd..79956f726ddaea 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -20137,6 +20137,30 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa queue:self.callbackQueue completion:responseHandler]; } +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterQueryIdentityParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 4c4af2f16b421f..37b28836957bdb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -5797,6 +5797,8 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, + MTRCommandIDTypeClusterNetworkCommissioningCommandQueryIdentityID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRCommandIDTypeClusterNetworkCommissioningCommandQueryIdentityResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, // Cluster DiagnosticLogs deprecated command id names MTRClusterDiagnosticLogsCommandRetrieveLogsRequestID diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index b8548b9c7a3525..4467511fe29584 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1187,6 +1187,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index c4a957e8bddbd6..bbe8dba6885d44 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -3889,6 +3889,33 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa completion:responseHandler]; } +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterQueryIdentityParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 9e6b0e19d006a4..048d82d3dd2237 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2905,6 +2905,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSData * _Nonnull credentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable networkIdentity MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable clientIdentifier MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3003,6 +3009,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nullable networkIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable clientIdentity MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3137,6 +3147,59 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRNetworkCommissioningClusterQueryIdentityParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull keyIdentifier MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRNetworkCommissioningClusterQueryIdentityResponseParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull identity MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRNetworkCommissioningClusterQueryIdentityResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 8828803e61d273..dfd65c645138db 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -7569,6 +7569,12 @@ - (instancetype)init _credentials = [NSData data]; _breadcrumb = nil; + + _networkIdentity = nil; + + _clientIdentifier = nil; + + _possessionNonce = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7582,6 +7588,9 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.ssid = self.ssid; other.credentials = self.credentials; other.breadcrumb = self.breadcrumb; + other.networkIdentity = self.networkIdentity; + other.clientIdentifier = self.clientIdentifier; + other.possessionNonce = self.possessionNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7590,7 +7599,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; credentials:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], [_credentials base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; credentials:%@; breadcrumb:%@; networkIdentity:%@; clientIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], [_credentials base64EncodedStringWithOptions:0], _breadcrumb, [_networkIdentity base64EncodedStringWithOptions:0], [_clientIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -7614,6 +7623,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader definedValue_0 = self.breadcrumb.unsignedLongLongValue; } } + { + if (self.networkIdentity != nil) { + auto & definedValue_0 = encodableStruct.networkIdentity.Emplace(); + definedValue_0 = AsByteSpan(self.networkIdentity); + } + } + { + if (self.clientIdentifier != nil) { + auto & definedValue_0 = encodableStruct.clientIdentifier.Emplace(); + definedValue_0 = AsByteSpan(self.clientIdentifier); + } + } + { + if (self.possessionNonce != nil) { + auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); + definedValue_0 = AsByteSpan(self.possessionNonce); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -7839,6 +7866,10 @@ - (instancetype)init _debugText = nil; _networkIndex = nil; + + _clientIdentity = nil; + + _possessionSignature = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -7851,6 +7882,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.networkingStatus = self.networkingStatus; other.debugText = self.debugText; other.networkIndex = self.networkIndex; + other.clientIdentity = self.clientIdentity; + other.possessionSignature = self.possessionSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -7858,7 +7891,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _networkIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; clientIdentity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _networkIndex, [_clientIdentity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -7929,6 +7962,20 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkC self.networkIndex = nil; } } + { + if (decodableStruct.clientIdentity.HasValue()) { + self.clientIdentity = AsData(decodableStruct.clientIdentity.Value()); + } else { + self.clientIdentity = nil; + } + } + { + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + } else { + self.possessionSignature = nil; + } + } return CHIP_NO_ERROR; } @@ -8221,6 +8268,183 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRNetworkCommissioningClusterQueryIdentityParams +- (instancetype)init +{ + if (self = [super init]) { + + _keyIdentifier = [NSData data]; + + _possessionNonce = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + + other.keyIdentifier = self.keyIdentifier; + other.possessionNonce = self.possessionNonce; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_keyIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +@end + +@implementation MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.keyIdentifier = AsByteSpan(self.keyIdentifier); + } + { + if (self.possessionNonce != nil) { + auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); + definedValue_0 = AsByteSpan(self.possessionNonce); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _identity = [NSData data]; + + _possessionSignature = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRNetworkCommissioningClusterQueryIdentityResponseParams alloc] init]; + + other.identity = self.identity; + other.possessionSignature = self.possessionSignature; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), [_identity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType &)decodableStruct +{ + { + self.identity = AsData(decodableStruct.identity); + } + { + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + } else { + self.possessionSignature = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 0698f0c97c7a3b..00cc847e451381 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -496,6 +496,18 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType &)decodableStruct; + +@end + @interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 3c197167dacc2c..14c0317f342ab1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -317,6 +317,8 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterNetworkInfoStruct : NSObject @property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, copy) NSNumber * _Nonnull connected MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy) NSData * _Nullable networkIdentifier MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable clientIdentifier MTR_PROVISIONALLY_AVAILABLE; @end MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index c7000fa3be2752..5bb226b973dfd7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -1126,6 +1126,10 @@ - (instancetype)init _networkID = [NSData data]; _connected = @(0); + + _networkIdentifier = nil; + + _clientIdentifier = nil; } return self; } @@ -1136,13 +1140,15 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.networkID = self.networkID; other.connected = self.connected; + other.networkIdentifier = self.networkIdentifier; + other.clientIdentifier = self.clientIdentifier; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; connected:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _connected]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; connected:%@; networkIdentifier:%@; clientIdentifier:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _connected, [_networkIdentifier base64EncodedStringWithOptions:0], [_clientIdentifier base64EncodedStringWithOptions:0]]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index a9d0b9bbb62b98..558ae6a14a86ae 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -922,6 +922,7 @@ enum class Feature : uint32_t kWiFiNetworkInterface = 0x1, kThreadNetworkInterface = 0x2, kEthernetNetworkInterface = 0x4, + kPerDeviceCredentials = 0x8, }; // Bitmap for ThreadCapabilitiesBitmap @@ -937,11 +938,12 @@ enum class ThreadCapabilitiesBitmap : uint16_t // Bitmap for WiFiSecurityBitmap enum class WiFiSecurityBitmap : uint8_t { - kUnencrypted = 0x1, - kWep = 0x2, - kWpaPersonal = 0x4, - kWpa2Personal = 0x8, - kWpa3Personal = 0x10, + kUnencrypted = 0x1, + kWep = 0x2, + kWpaPersonal = 0x4, + kWpa2Personal = 0x8, + kWpa3Personal = 0x10, + kWpa3MatterPdc = 0x20, }; } // namespace NetworkCommissioning diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index e0394c0a0d2626..eef56b27eb6538 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -5618,6 +5618,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kNetworkID), networkID); encoder.Encode(to_underlying(Fields::kConnected), connected); + encoder.Encode(to_underlying(Fields::kNetworkIdentifier), networkIdentifier); + encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); return encoder.Finalize(); } @@ -5643,6 +5645,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, connected); } + else if (__context_tag == to_underlying(Fields::kNetworkIdentifier)) + { + err = DataModel::Decode(reader, networkIdentifier); + } + else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + { + err = DataModel::Decode(reader, clientIdentifier); + } else { } @@ -5882,6 +5892,9 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const encoder.Encode(to_underlying(Fields::kSsid), ssid); encoder.Encode(to_underlying(Fields::kCredentials), credentials); encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + encoder.Encode(to_underlying(Fields::kNetworkIdentity), networkIdentity); + encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); + encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); return encoder.Finalize(); } @@ -5911,6 +5924,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, breadcrumb); } + else if (__context_tag == to_underlying(Fields::kNetworkIdentity)) + { + err = DataModel::Decode(reader, networkIdentity); + } + else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + { + err = DataModel::Decode(reader, clientIdentifier); + } + else if (__context_tag == to_underlying(Fields::kPossessionNonce)) + { + err = DataModel::Decode(reader, possessionNonce); + } else { } @@ -6004,6 +6029,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); encoder.Encode(to_underlying(Fields::kDebugText), debugText); encoder.Encode(to_underlying(Fields::kNetworkIndex), networkIndex); + encoder.Encode(to_underlying(Fields::kClientIdentity), clientIdentity); + encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); return encoder.Finalize(); } @@ -6033,6 +6060,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, networkIndex); } + else if (__context_tag == to_underlying(Fields::kClientIdentity)) + { + err = DataModel::Decode(reader, clientIdentity); + } + else if (__context_tag == to_underlying(Fields::kPossessionSignature)) + { + err = DataModel::Decode(reader, possessionSignature); + } else { } @@ -6168,6 +6203,84 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace ReorderNetwork. +namespace QueryIdentity { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kKeyIdentifier), keyIdentifier); + encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kKeyIdentifier)) + { + err = DataModel::Decode(reader, keyIdentifier); + } + else if (__context_tag == to_underlying(Fields::kPossessionNonce)) + { + err = DataModel::Decode(reader, possessionNonce); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace QueryIdentity. +namespace QueryIdentityResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIdentity), identity); + encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kIdentity)) + { + err = DataModel::Decode(reader, identity); + } + else if (__context_tag == to_underlying(Fields::kPossessionSignature)) + { + err = DataModel::Decode(reader, possessionSignature); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace QueryIdentityResponse. } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 6df68862b367a6..3d888cc28d954d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -7282,8 +7282,10 @@ namespace Structs { namespace NetworkInfoStruct { enum class Fields : uint8_t { - kNetworkID = 0, - kConnected = 1, + kNetworkID = 0, + kConnected = 1, + kNetworkIdentifier = 2, + kClientIdentifier = 3, }; struct Type @@ -7291,6 +7293,8 @@ struct Type public: chip::ByteSpan networkID; bool connected = static_cast(0); + Optional> networkIdentifier; + Optional> clientIdentifier; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -7418,6 +7422,16 @@ struct Type; struct DecodableType; } // namespace ReorderNetwork +namespace QueryIdentity { +struct Type; +struct DecodableType; +} // namespace QueryIdentity + +namespace QueryIdentityResponse { +struct Type; +struct DecodableType; +} // namespace QueryIdentityResponse + } // namespace Commands namespace Commands { @@ -7500,9 +7514,12 @@ struct DecodableType namespace AddOrUpdateWiFiNetwork { enum class Fields : uint8_t { - kSsid = 0, - kCredentials = 1, - kBreadcrumb = 2, + kSsid = 0, + kCredentials = 1, + kBreadcrumb = 2, + kNetworkIdentity = 3, + kClientIdentifier = 4, + kPossessionNonce = 5, }; struct Type @@ -7515,6 +7532,9 @@ struct Type chip::ByteSpan ssid; chip::ByteSpan credentials; Optional breadcrumb; + Optional networkIdentity; + Optional clientIdentifier; + Optional possessionNonce; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7532,6 +7552,9 @@ struct DecodableType chip::ByteSpan ssid; chip::ByteSpan credentials; Optional breadcrumb; + Optional networkIdentity; + Optional clientIdentifier; + Optional possessionNonce; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddOrUpdateWiFiNetwork @@ -7608,9 +7631,11 @@ struct DecodableType namespace NetworkConfigResponse { enum class Fields : uint8_t { - kNetworkingStatus = 0, - kDebugText = 1, - kNetworkIndex = 2, + kNetworkingStatus = 0, + kDebugText = 1, + kNetworkIndex = 2, + kClientIdentity = 3, + kPossessionSignature = 4, }; struct Type @@ -7623,6 +7648,8 @@ struct Type NetworkCommissioningStatusEnum networkingStatus = static_cast(0); Optional debugText; Optional networkIndex; + Optional clientIdentity; + Optional possessionSignature; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7640,6 +7667,8 @@ struct DecodableType NetworkCommissioningStatusEnum networkingStatus = static_cast(0); Optional debugText; Optional networkIndex; + Optional clientIdentity; + Optional possessionSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace NetworkConfigResponse @@ -7754,6 +7783,76 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ReorderNetwork +namespace QueryIdentity { +enum class Fields : uint8_t +{ + kKeyIdentifier = 0, + kPossessionNonce = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + + chip::ByteSpan keyIdentifier; + Optional possessionNonce; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + + chip::ByteSpan keyIdentifier; + Optional possessionNonce; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace QueryIdentity +namespace QueryIdentityResponse { +enum class Fields : uint8_t +{ + kIdentity = 0, + kPossessionSignature = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + + chip::ByteSpan identity; + Optional possessionSignature; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + + chip::ByteSpan identity; + Optional possessionSignature; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace QueryIdentityResponse } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index f8aef6170b41a7..5916de05aaf876 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -410,6 +410,14 @@ namespace ReorderNetwork { static constexpr CommandId Id = 0x00000008; } // namespace ReorderNetwork +namespace QueryIdentity { +static constexpr CommandId Id = 0x00000009; +} // namespace QueryIdentity + +namespace QueryIdentityResponse { +static constexpr CommandId Id = 0x0000000A; +} // namespace QueryIdentityResponse + } // namespace Commands } // namespace NetworkCommissioning diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index e41ae7a21b7eba..1926c40c0a4008 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -2734,6 +2734,7 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand | * RemoveNetwork | 0x04 | | * ConnectNetwork | 0x06 | | * ReorderNetwork | 0x08 | +| * QueryIdentity | 0x09 | |------------------------------------------------------------------------------| | Attributes: | | | * MaxNetworks | 0x0000 | @@ -2808,6 +2809,9 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand AddArgument("Ssid", &mRequest.ssid); AddArgument("Credentials", &mRequest.credentials); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("NetworkIdentity", &mRequest.networkIdentity); + AddArgument("ClientIdentifier", &mRequest.clientIdentifier); + AddArgument("PossessionNonce", &mRequest.possessionNonce); ClusterCommand::AddArguments(); } @@ -2993,6 +2997,45 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; +/* + * Command QueryIdentity + */ +class NetworkCommissioningQueryIdentity : public ClusterCommand +{ +public: + NetworkCommissioningQueryIdentity(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("query-identity", credsIssuerConfig) + { + AddArgument("KeyIdentifier", &mRequest.keyIdentifier); + AddArgument("PossessionNonce", &mRequest.possessionNonce); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster DiagnosticLogs | 0x0032 | |------------------------------------------------------------------------------| @@ -13367,6 +13410,7 @@ void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCo make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index e0c1360460b1c7..151aaec3aa8b17 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -903,6 +903,20 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.connected, value["connected"])); valueCopy.removeMember("connected"); + if (value.isMember("networkIdentifier")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "networkIdentifier"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.networkIdentifier, value["networkIdentifier"])); + } + valueCopy.removeMember("networkIdentifier"); + + if (value.isMember("clientIdentifier")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientIdentifier"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientIdentifier, value["clientIdentifier"])); + } + valueCopy.removeMember("clientIdentifier"); + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -910,6 +924,8 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::NetworkCommissioning:: { ComplexArgumentParser::Finalize(request.networkID); ComplexArgumentParser::Finalize(request.connected); + ComplexArgumentParser::Finalize(request.networkIdentifier); + ComplexArgumentParser::Finalize(request.clientIdentifier); } CHIP_ERROR diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a56df9fc1bcc63..85935b992dda1d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -769,6 +769,22 @@ DataModelLogger::LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("NetworkIdentifier", indent + 1, value.networkIdentifier); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NetworkIdentifier'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ClientIdentifier", indent + 1, value.clientIdentifier); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClientIdentifier'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -4601,6 +4617,8 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); ReturnErrorOnFailure(DataModelLogger::LogValue("networkIndex", indent + 1, value.networkIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("clientIdentity", indent + 1, value.clientIdentity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -4614,6 +4632,15 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("identity", indent + 1, value.identity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & value) { @@ -13814,6 +13841,11 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ConnectNetworkResponse", 1, value); } + case NetworkCommissioning::Commands::QueryIdentityResponse::Id: { + NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("QueryIdentityResponse", 1, value); + } } break; } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 6d2ccf1c0fbc68..20ea4c575eb701 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -458,6 +458,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index cf758744dbc31e..03fa7affb9bb4e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -25525,6 +25525,7 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt | * RemoveNetwork | 0x04 | | * ConnectNetwork | 0x06 | | * ReorderNetwork | 0x08 | +| * QueryIdentity | 0x09 | |------------------------------------------------------------------------------| | Attributes: | | | * MaxNetworks | 0x0000 | @@ -25626,6 +25627,15 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { AddArgument("Ssid", &mRequest.ssid); AddArgument("Credentials", &mRequest.credentials); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); +#if MTR_ENABLE_PROVISIONAL + AddArgument("NetworkIdentity", &mRequest.networkIdentity); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ClientIdentifier", &mRequest.clientIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -25647,6 +25657,27 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { } else { params.breadcrumb = nil; } +#if MTR_ENABLE_PROVISIONAL + if (mRequest.networkIdentity.HasValue()) { + params.networkIdentity = [NSData dataWithBytes:mRequest.networkIdentity.Value().data() length:mRequest.networkIdentity.Value().size()]; + } else { + params.networkIdentity = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.clientIdentifier.HasValue()) { + params.clientIdentifier = [NSData dataWithBytes:mRequest.clientIdentifier.Value().data() length:mRequest.clientIdentifier.Value().size()]; + } else { + params.clientIdentifier = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = nil; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -25914,6 +25945,76 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; +#if MTR_ENABLE_PROVISIONAL +/* + * Command QueryIdentity + */ +class NetworkCommissioningQueryIdentity : public ClusterCommand { +public: + NetworkCommissioningQueryIdentity() + : ClusterCommand("query-identity") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("KeyIdentifier", &mRequest.keyIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.keyIdentifier = [NSData dataWithBytes:mRequest.keyIdentifier.data() length:mRequest.keyIdentifier.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster queryIdentityWithParams:params completion: + ^(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute MaxNetworks */ @@ -39032,7 +39133,9 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { : ClusterCommand("set-trusted-time-source") , mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) { +#if MTR_ENABLE_PROVISIONAL AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -39047,6 +39150,7 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL if (mRequest.trustedTimeSource.IsNull()) { params.trustedTimeSource = nil; } else { @@ -39054,6 +39158,7 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { params.trustedTimeSource.nodeID = [NSNumber numberWithUnsignedLongLong:mRequest.trustedTimeSource.Value().nodeID]; params.trustedTimeSource.endpoint = [NSNumber numberWithUnsignedShort:mRequest.trustedTimeSource.Value().endpoint]; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -39089,7 +39194,9 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { : ClusterCommand("set-time-zone") , mComplex_TimeZone(&mRequest.timeZone) { +#if MTR_ENABLE_PROVISIONAL AddArgument("TimeZone", &mComplex_TimeZone); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -39104,6 +39211,7 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mRequest.timeZone) { @@ -39120,6 +39228,7 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { } params.timeZone = array_0; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -39161,7 +39270,9 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { : ClusterCommand("set-dstoffset") , mComplex_DSTOffset(&mRequest.DSTOffset) { +#if MTR_ENABLE_PROVISIONAL AddArgument("DSTOffset", &mComplex_DSTOffset); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -39176,6 +39287,7 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mRequest.DSTOffset) { @@ -39192,6 +39304,7 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { } params.dstOffset = array_0; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -39226,7 +39339,9 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand { TimeSynchronizationSetDefaultNTP() : ClusterCommand("set-default-ntp") { +#if MTR_ENABLE_PROVISIONAL AddArgument("DefaultNTP", &mRequest.defaultNTP); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -39241,11 +39356,13 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL if (mRequest.defaultNTP.IsNull()) { params.defaultNTP = nil; } else { params.defaultNTP = [[NSString alloc] initWithBytes:mRequest.defaultNTP.Value().data() length:mRequest.defaultNTP.Value().size() encoding:NSUTF8StringEncoding]; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -48937,10 +49054,18 @@ class IcdManagementRegisterClient : public ClusterCommand { IcdManagementRegisterClient() : ClusterCommand("register-client") { +#if MTR_ENABLE_PROVISIONAL AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("Key", &mRequest.key); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -48955,14 +49080,22 @@ class IcdManagementRegisterClient : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.verificationKey.HasValue()) { params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; } else { params.verificationKey = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -49002,8 +49135,12 @@ class IcdManagementUnregisterClient : public ClusterCommand { IcdManagementUnregisterClient() : ClusterCommand("unregister-client") { +#if MTR_ENABLE_PROVISIONAL AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -49018,12 +49155,16 @@ class IcdManagementUnregisterClient : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.verificationKey.HasValue()) { params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; } else { params.verificationKey = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -51467,7 +51608,9 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { LaundryWasherModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -51482,7 +51625,9 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -52484,7 +52629,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -52499,7 +52646,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -54457,7 +54606,9 @@ class RvcRunModeChangeToMode : public ClusterCommand { RvcRunModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -54472,7 +54623,9 @@ class RvcRunModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -55344,7 +55497,9 @@ class RvcCleanModeChangeToMode : public ClusterCommand { RvcCleanModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -55359,7 +55514,9 @@ class RvcCleanModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -56234,8 +56391,12 @@ class TemperatureControlSetTemperature : public ClusterCommand { TemperatureControlSetTemperature() : ClusterCommand("set-temperature") { +#if MTR_ENABLE_PROVISIONAL AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -56250,16 +56411,20 @@ class TemperatureControlSetTemperature : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL if (mRequest.targetTemperature.HasValue()) { params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; } else { params.targetTemperature = nil; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.targetTemperatureLevel.HasValue()) { params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; } else { params.targetTemperatureLevel = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -58124,7 +58289,9 @@ class DishwasherModeChangeToMode : public ClusterCommand { DishwasherModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -58139,7 +58306,9 @@ class DishwasherModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -61503,7 +61672,9 @@ class DishwasherAlarmReset : public ClusterCommand { DishwasherAlarmReset() : ClusterCommand("reset") { +#if MTR_ENABLE_PROVISIONAL AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -61518,7 +61689,9 @@ class DishwasherAlarmReset : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -61552,7 +61725,9 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { DishwasherAlarmModifyEnabledAlarms() : ClusterCommand("modify-enabled-alarms") { +#if MTR_ENABLE_PROVISIONAL AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -61567,7 +61742,9 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -63177,9 +63354,15 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { MicrowaveOvenControlSetCookingParameters() : ClusterCommand("set-cooking-parameters") { +#if MTR_ENABLE_PROVISIONAL AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -63194,21 +63377,27 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL if (mRequest.cookMode.HasValue()) { params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; } else { params.cookMode = nil; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.cookTime.HasValue()) { params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; } else { params.cookTime = nil; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.powerSetting.HasValue()) { params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; } else { params.powerSetting = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -63242,7 +63431,9 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand { MicrowaveOvenControlAddMoreTime() : ClusterCommand("add-more-time") { +#if MTR_ENABLE_PROVISIONAL AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -63257,7 +63448,9 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -70092,7 +70285,9 @@ class DoorLockUnboltDoor : public ClusterCommand { DoorLockUnboltDoor() : ClusterCommand("unbolt-door") { +#if MTR_ENABLE_PROVISIONAL AddArgument("PINCode", &mRequest.PINCode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -70107,11 +70302,13 @@ class DoorLockUnboltDoor : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL if (mRequest.PINCode.HasValue()) { params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; } else { params.pinCode = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -87277,9 +87474,15 @@ class FanControlStep : public ClusterCommand { FanControlStep() : ClusterCommand("step") { +#if MTR_ENABLE_PROVISIONAL AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("Wrap", 0, 1, &mRequest.wrap); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -87294,17 +87497,23 @@ class FanControlStep : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.wrap.HasValue()) { params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; } else { params.wrap = nil; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL if (mRequest.lowestOff.HasValue()) { params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; } else { params.lowestOff = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -154524,8 +154733,12 @@ class SampleMeiAddArguments : public ClusterCommand { SampleMeiAddArguments() : ClusterCommand("add-arguments") { +#if MTR_ENABLE_PROVISIONAL AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -154540,8 +154753,12 @@ class SampleMeiAddArguments : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterSampleMEI alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSampleMEIClusterAddArgumentsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.arg1 = [NSNumber numberWithUnsignedChar:mRequest.arg1]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL params.arg2 = [NSNumber numberWithUnsignedChar:mRequest.arg2]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -156197,6 +156414,9 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), //