From bef33615e9b10185264974dee7b29e1c92ad8ace Mon Sep 17 00:00:00 2001 From: Pradip De Date: Mon, 29 Jul 2024 19:51:17 -0700 Subject: [PATCH 01/27] TCP test cases (#34498) Test script for tests defined in https://github.com/CHIP-Specifications/chip-test-plans/pull/4243 --- .github/workflows/tests.yaml | 1 + src/python_testing/TCP_Tests.py | 150 ++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 src/python_testing/TCP_Tests.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 03a364cc17df38..ccc4e460d88984 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -598,6 +598,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCOPSTATE_2_4.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SC_7_1.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SWTCH.py' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TCP_Tests.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestConformanceSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' diff --git a/src/python_testing/TCP_Tests.py b/src/python_testing/TCP_Tests.py new file mode 100644 index 00000000000000..cc2f48c86419d9 --- /dev/null +++ b/src/python_testing/TCP_Tests.py @@ -0,0 +1,150 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === +# +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.interaction_model import InteractionModelError +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + + +class TCP_Tests(MatterBaseTest): + + @async_test_body + async def test_TCPConnectionEstablishment(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + asserts.assert_equal(device.isActiveSession, True, "Large Payload Session should be active over TCP connection") + + @async_test_body + async def test_LargePayloadSessionEstablishment(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.sessionAllowsLargePayload, True, "Session does not have associated TCP connection") + + @async_test_body + async def test_SessionInactiveAfterTCPDisconnect(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + + device.closeTCPConnectionWithPeer() + asserts.assert_equal(device.isActiveSession, False, + "Large Payload Session should not be active after TCP connection closure") + + @async_test_body + async def test_TCPConnectDisconnectThenConnectAgain(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + + device.closeTCPConnectionWithPeer() + asserts.assert_equal(device.isActiveSession, False, + "Large Payload Session should not be active after TCP connection closure") + + # Connect again + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + asserts.assert_equal(device.isActiveSession, True, "Large Payload Session should be active over TCP connection") + + @async_test_body + async def test_OnOffToggleCommandOverTCPSession(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + asserts.assert_equal(device.isActiveSession, True, "Large Payload Session should be active over TCP connection") + asserts.assert_equal(device.sessionAllowsLargePayload, True, "Session does not have associated TCP connection") + + commands = Clusters.Objects.OnOff.Commands + try: + await self.send_single_cmd(cmd=commands.Toggle(), endpoint=1, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except InteractionModelError: + asserts.fail("Unexpected error returned by DUT") + + @async_test_body + async def test_WildCardReadOverTCPSession(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + asserts.assert_equal(device.isActiveSession, True, "Large Payload Session should be active over TCP connection") + asserts.assert_equal(device.sessionAllowsLargePayload, True, "Session does not have associated TCP connection") + + try: + await self.default_controller.Read(self.dut_node_id, [()], payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except InteractionModelError: + asserts.fail("Unexpected error returned by DUT") + + @async_test_body + async def test_UseTCPSessionIfAvailableForMRPInteraction(self): + + try: + device = await self.default_controller.GetConnectedDevice(nodeid=self.dut_node_id, allowPASE=False, timeoutMs=1000, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.LARGE_PAYLOAD) + except TimeoutError: + asserts.fail("Unable to establish a CASE session over TCP to the device") + asserts.assert_equal(device.isSessionOverTCPConnection, True, "Session does not have associated TCP connection") + asserts.assert_equal(device.isActiveSession, True, "Large Payload Session should be active over TCP connection") + asserts.assert_equal(device.sessionAllowsLargePayload, True, "Session does not have associated TCP connection") + + commands = Clusters.Objects.OnOff.Commands + try: + await self.send_single_cmd(cmd=commands.Toggle(), endpoint=1, + payloadCapability=ChipDeviceCtrl.TransportPayloadCapability.MRP_OR_TCP_PAYLOAD) + except InteractionModelError: + asserts.fail("Unexpected error returned by DUT") + + +if __name__ == "__main__": + default_matter_test_main() From d573916cc0906bfc2b43aef545ccb5dbb9ebba61 Mon Sep 17 00:00:00 2001 From: Pradip De Date: Mon, 29 Jul 2024 20:19:04 -0700 Subject: [PATCH 02/27] Enable TCP Keepalive for the received connection on the Server. (#34602) The TCP KeepAlive was enabled on the client side. Enable TCP Keepalive from the server side as well. --- src/transport/raw/TCP.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transport/raw/TCP.cpp b/src/transport/raw/TCP.cpp index 8a15f754d54027..b73540d7956f29 100644 --- a/src/transport/raw/TCP.cpp +++ b/src/transport/raw/TCP.cpp @@ -578,6 +578,9 @@ void TCPBase::HandleIncomingConnection(Inet::TCPEndPoint * listenEndPoint, Inet: tcp->mUsedEndPointCount++; activeConnection->mConnectionState = TCPState::kConnected; + // Set the TCPKeepalive configurations on the received connection + endPoint->EnableKeepAlive(activeConnection->mTCPKeepAliveIntervalSecs, activeConnection->mTCPMaxNumKeepAliveProbes); + char addrStr[Transport::PeerAddress::kMaxToStringSize]; peerAddress.ToString(addrStr); ChipLogProgress(Inet, "Incoming connection established with peer at %s.", addrStr); From 7b488ed44388d340b063967fac3c2faaf23e6a85 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 29 Jul 2024 23:19:40 -0400 Subject: [PATCH 03/27] Add TC_ECOINFO_2_2.py test implementation (#34566) * Add TC_ECOINFO_2_2.py test implementation * Restyled by autopep8 * Fix lint CI issues * Self review edits * One more minor nit edit * Restyled by autopep8 * Address TODO and add default_matter_test_main * Address PR comment * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- src/python_testing/TC_ECOINFO_2_2.py | 123 +++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 src/python_testing/TC_ECOINFO_2_2.py diff --git a/src/python_testing/TC_ECOINFO_2_2.py b/src/python_testing/TC_ECOINFO_2_2.py new file mode 100644 index 00000000000000..c8bb7de4004d56 --- /dev/null +++ b/src/python_testing/TC_ECOINFO_2_2.py @@ -0,0 +1,123 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +_DEVICE_TYPE_AGGREGGATOR = 0x000E + + +class TC_ECOINFO_2_2(MatterBaseTest): + + def steps_TC_ECOINFO_2_2(self) -> list[TestStep]: + steps = [TestStep(1, "Prepare", is_commissioning=True), + TestStep("1a", "Read root endpoint's PartsList"), + TestStep("1b", "For each endpoint in 1a read DeviceType list confirming aggregator endpoint exists"), + TestStep(2, "Add a bridged device"), + TestStep("2a", "(Manual Step) Add a bridged device using method indicated by the manufacturer"), + TestStep("2b", "Read root endpoint's PartsList, validate exactly one endpoint added"), + TestStep("2c", "On newly added endpoint detected in 2b read RemovedOn Ecosystem Information Attribute and validate"), + TestStep(3, "Remove bridged device"), + TestStep("3a", "(Manual Step) Removed bridged device added in step 2a using method indicated by the manufacturer"), + TestStep("3b", "On newly added endpoint detected in 2b read RemovedOn Ecosystem Information Attribute and validate"), + TestStep("3c", "On newly added endpoint detected in 2b read DeviceDirectory Ecosystem Information Attribute and validate"), + TestStep("3d", "On newly added endpoint detected in 2b read LocationDirectory Ecosystem Information Attribute and validate")] + + return steps + + @async_test_body + async def test_TC_ECOINFO_2_2(self): + dev_ctrl = self.default_controller + dut_node_id = self.dut_node_id + + self.print_step(0, "Commissioning, already done") + self.step(1) + self.step("1a") + root_node_endpoint = 0 + root_part_list = await dev_ctrl.ReadAttribute(dut_node_id, [(root_node_endpoint, Clusters.Descriptor.Attributes.PartsList)]) + + self.step("1b") + set_of_endpoints_step_1 = set(root_part_list[root_node_endpoint] + [Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]) + list_of_aggregator_endpoints = [] + for endpoint in set_of_endpoints_step_1: + device_type_list_read = await dev_ctrl.ReadAttribute(dut_node_id, [(endpoint, Clusters.Descriptor.Attributes.DeviceTypeList)]) + device_type_list = device_type_list_read[endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.DeviceTypeList] + for device_type in device_type_list: + if device_type.deviceType == _DEVICE_TYPE_AGGREGGATOR: + list_of_aggregator_endpoints.append(endpoint) + + asserts.assert_greater_equal(len(list_of_aggregator_endpoints), 1, "Did not find any Aggregator device types") + + self.step(2) + self.step("2a") + self.wait_for_user_input(prompt_msg="Add a bridged device using method indicated by the manufacturer") + + self.step("2b") + root_part_list_step_2 = await dev_ctrl.ReadAttribute(dut_node_id, [(root_node_endpoint, Clusters.Descriptor.Attributes.PartsList)]) + set_of_endpoints_step_2 = set( + root_part_list_step_2[root_node_endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]) + + asserts.assert_true(set_of_endpoints_step_2.issuperset(set_of_endpoints_step_1), "Expected only new endpoints to be added") + unique_endpoints_set = set_of_endpoints_step_2 - set_of_endpoints_step_1 + asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint") + + self.step("2c") + newly_added_endpoint = list(unique_endpoints_set)[0] + removed_on = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=newly_added_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) + + asserts.assert_true(removed_on is NullValue, "RemovedOn is expected to be null for a newly added device") + + self.step(3) + self.step("3a") + self.wait_for_user_input(prompt_msg="Removed bridged device added in step 2a using method indicated by the manufacturer") + + self.step("3b") + removed_on = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=newly_added_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) + asserts.assert_true(removed_on is not NullValue, "RemovedOn is expected to have a value") + + self.step("3c") + device_directory = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=newly_added_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.DeviceDirectory, + fabricFiltered=False) + asserts.assert_equal(len(device_directory), 0, "Expected device directory to be empty") + + self.step("3d") + location_directory = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=newly_added_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.LocationDirectory, + fabricFiltered=False) + asserts.assert_equal(len(location_directory), 0, "Expected location directory to be empty") + + +if __name__ == "__main__": + default_matter_test_main() From 085f57f3fc7827b45830c5976ddac16895c2fd3b Mon Sep 17 00:00:00 2001 From: crlonxp <88241281+crlonxp@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:21:28 +0800 Subject: [PATCH 04/27] Add --wifipaf commission in chip-tool and apps of Linux platform (#33977) * [NXP] Add --wifi-paf commission in chip-tool and apps of Linux platform * Need to enable the function by adding "chip_device_config_enable_wifipaf=true" * chip-tool: Add wifi-paf option for pairing. Example: $ chip-tool pairing wifi-paf 1 ap_ssid ap_pwd [setup-pin-code] [discriminator] * apps: Add --wifi-paf. Example: $ chip-all-clusters-app --wifi --wifi-paf Note: Need the usd functions of wpa_supplicant to run this option Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Restyled by gn * * Add the missing compile macro * Restyled by clang-format * Update src/controller/CHIPDeviceController.cpp Co-authored-by: Boris Zbarsky * Update src/include/platform/ConnectivityManager.h Co-authored-by: Boris Zbarsky * Update examples/platform/linux/Options.cpp Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> * Change by following the review's comment: * Change the name of option to [pair_mode]-[network] * Remove redundant compile flags * Move to start the Wi-Fi Manager in initialization stage * Unconditional the defintion * Add the cancel-publish / cancel-subscribe dbus interface * Fix bugs: - Redundant callback function registration - Remove the incorrect StackLock Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Change by following the review's comment: - Unconditional functions in SetUpCodePairer - Change the description of the comment Signed-off-by: Lo,Chin-Ran * * Add the identifier to distinguish connections * Unconditional the SetupCode verification Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Add RendezvousInformationFlag::kWiFiPAF to tests of TestQRCode Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * * Add code-wifi to do WiFiPAF by using code. example: - Linux DUT: sudo ./chip-all-clusters-app --wifi --wifipaf - Controller: sudo ./chip-tool pairing code-wifi 1 ap_ssid ap_pwd MT:-24J0SGJ10KA0648G00 Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Update src/transport/raw/PeerAddress.h Co-authored-by: Boris Zbarsky * Update examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp Co-authored-by: Boris Zbarsky * Update src/include/platform/CHIPDeviceConfig.h Co-authored-by: Boris Zbarsky * Change by following the review's comment: * Add to end of the queue in OnDiscoveredDeviceOverWifiPAF() * Factor out the long expression into local Signed-off-by: Lo,Chin-Ran * Remove the redundant LogErrorOnFailure() Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Use the smart pointer to detect if the caller is still valid in the callback function Signed-off-by: Lo,Chin-Ran * Fix the building error after rebase to TOT of master branch Signed-off-by: Lo,Chin-Ran * Change the dbus interface usage by following the new api update in wpa_supplicant Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * * Add freq_list option to support multiple channels * Add more tests in QRCode test Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * * Change to have the consistent naming of the new added variables * Fix the problem to add tests in TestQRCode.cpp * Use a list to track the validation of the caller object. Signed-off-by: Lo,Chin-Ran * Restyled by clang-format * Cancel the subscription in destructor to avoid the use-after-free issue Signed-off-by: Lo,Chin-Ran * Restyled by clang-format --------- Signed-off-by: Lo,Chin-Ran Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> --- .../chip-tool/commands/pairing/Commands.h | 13 + .../commands/pairing/PairingCommand.cpp | 5 + .../commands/pairing/PairingCommand.h | 10 + .../payload/SetupPayloadParseCommand.cpp | 8 + examples/platform/linux/AppMain.cpp | 19 +- examples/platform/linux/Options.cpp | 19 + examples/platform/linux/Options.h | 4 + src/app/server/CommissioningWindowManager.cpp | 6 + src/app/server/Server.cpp | 8 + src/app/server/Server.h | 7 + src/controller/AutoCommissioner.cpp | 11 +- src/controller/CHIPDeviceController.cpp | 71 ++++ src/controller/CHIPDeviceController.h | 7 +- .../CHIPDeviceControllerFactory.cpp | 7 + src/controller/CHIPDeviceControllerFactory.h | 3 + .../CHIPDeviceControllerSystemState.h | 13 + src/controller/SetUpCodePairer.cpp | 74 ++++ src/controller/SetUpCodePairer.h | 11 +- src/include/platform/CHIPDeviceConfig.h | 9 + src/include/platform/CHIPDeviceEvent.h | 10 +- src/include/platform/ConnectivityManager.h | 61 +++ src/lib/shell/commands/OnboardingCodes.cpp | 7 + src/platform/BUILD.gn | 1 + .../Linux/ConnectivityManagerImpl.cpp | 352 +++++++++++++++++- src/platform/Linux/ConnectivityManagerImpl.h | 41 ++ .../Linux/dbus/wpa/DBusWpaInterface.xml | 32 ++ src/platform/device.gni | 3 + src/setup_payload/SetupPayload.cpp | 2 +- src/setup_payload/SetupPayload.h | 1 + src/setup_payload/tests/TestQRCode.cpp | 32 +- src/transport/raw/BUILD.gn | 7 + src/transport/raw/PeerAddress.h | 10 + src/transport/raw/WiFiPAF.cpp | 113 ++++++ src/transport/raw/WiFiPAF.h | 115 ++++++ 34 files changed, 1078 insertions(+), 14 deletions(-) create mode 100644 src/transport/raw/WiFiPAF.cpp create mode 100644 src/transport/raw/WiFiPAF.h diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index 41a35bb6bae6ad..c202178657df7b 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -181,6 +181,16 @@ class PairSoftAP : public PairingCommand {} }; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +class PairWiFiPAF : public PairingCommand +{ +public: + PairWiFiPAF(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("wifipaf-wifi", PairingMode::WiFiPAF, PairingNetworkType::WiFi, credsIssuerConfig) + {} +}; +#endif + class PairAlreadyDiscovered : public PairingCommand { public: @@ -243,6 +253,9 @@ void registerCommandsPairing(Commands & commands, CredentialIssuerCommands * cre make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + make_unique(credsIssuerConfig), +#endif make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 35ce2ba1cc7aaa..245c9ed57ff82c 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -80,6 +80,11 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) case PairingMode::SoftAP: err = Pair(remoteId, PeerAddress::UDP(mRemoteAddr.address, mRemotePort, mRemoteAddr.interfaceId)); break; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + case PairingMode::WiFiPAF: + err = Pair(remoteId, PeerAddress::WiFiPAF(remoteId)); + break; +#endif case PairingMode::AlreadyDiscovered: err = Pair(remoteId, PeerAddress::UDP(mRemoteAddr.address, mRemotePort, mRemoteAddr.interfaceId)); break; diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 0cf4e1de2de713..9965b663ec111c 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -35,6 +35,9 @@ enum class PairingMode CodePaseOnly, Ble, SoftAP, +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + WiFiPAF, +#endif AlreadyDiscovered, AlreadyDiscoveredByIndex, AlreadyDiscoveredByIndexWithCode, @@ -127,6 +130,13 @@ class PairingCommand : public CHIPCommand, AddArgument("device-remote-port", 0, UINT16_MAX, &mRemotePort); AddArgument("pase-only", 0, 1, &mPaseOnly); break; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + case PairingMode::WiFiPAF: + AddArgument("skip-commissioning-complete", 0, 1, &mSkipCommissioningComplete); + AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode.emplace()); + AddArgument("discriminator", 0, 4096, &mDiscriminator.emplace()); + break; +#endif case PairingMode::AlreadyDiscovered: AddArgument("skip-commissioning-complete", 0, 1, &mSkipCommissioningComplete); AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode.emplace()); diff --git a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp index 7ab62c7da5101d..de1afad1835385 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp @@ -108,6 +108,14 @@ CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) } humanFlags.Add("On IP network"); } + if (payload.rendezvousInformation.Value().Has(RendezvousInformationFlag::kWiFiPAF)) + { + if (!humanFlags.Empty()) + { + humanFlags.Add(", "); + } + humanFlags.Add("Wi-Fi PAF"); + } } else { diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 6a6deae1473084..307b3428126db2 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -367,12 +367,15 @@ int ChipLinuxAppInit(int argc, char * const argv[], OptionSet * customOptions, #if CONFIG_NETWORK_LAYER_BLE RendezvousInformationFlags rendezvousFlags = RendezvousInformationFlag::kBLE; #else // CONFIG_NETWORK_LAYER_BLE - RendezvousInformationFlag rendezvousFlags = RendezvousInformationFlag::kOnNetwork; + RendezvousInformationFlags rendezvousFlags = RendezvousInformationFlag::kOnNetwork; #endif // CONFIG_NETWORK_LAYER_BLE #ifdef CONFIG_RENDEZVOUS_MODE rendezvousFlags = static_cast(CONFIG_RENDEZVOUS_MODE); #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + rendezvousFlags.Set(RendezvousInformationFlag::kWiFiPAF); +#endif err = Platform::MemoryInit(); SuccessOrExit(err); @@ -471,6 +474,20 @@ int ChipLinuxAppInit(int argc, char * const argv[], OptionSet * customOptions, } } #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA +#if CHIP_DEVICE_CONFIG_ENABLE_WPA && CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + ChipLogProgress(NotSpecified, "WiFi-PAF: initialzing"); + if (LinuxDeviceOptions::GetInstance().mWiFi) + { + if (EnsureWiFiIsStarted()) + { + ChipLogProgress(NotSpecified, "Wi-Fi Management started"); + DeviceLayer::ConnectivityManager::WiFiPAFAdvertiseParam args; + args.enable = LinuxDeviceOptions::GetInstance().mWiFiPAF; + args.ExtCmds = LinuxDeviceOptions::GetInstance().mWiFiPAFExtCmds; + DeviceLayer::ConnectivityMgr().SetWiFiPAFAdvertisingEnabled(args); + } + } +#endif #if CHIP_ENABLE_OPENTHREAD if (LinuxDeviceOptions::GetInstance().mThread) diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index 9d6edc8bc43846..9b83d126c1f495 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -106,6 +106,9 @@ enum #if CHIP_WITH_NLFAULTINJECTION kDeviceOption_FaultInjection, #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + kDeviceOption_WiFi_PAF, +#endif }; constexpr unsigned kAppUsageLength = 64; @@ -117,6 +120,9 @@ OptionDef sDeviceOptionDefs[] = { #if CHIP_DEVICE_CONFIG_ENABLE_WIFI { "wifi", kNoArgument, kDeviceOption_WiFi }, { "wifi-supports-5g", kNoArgument, kDeviceOption_WiFiSupports5g }, +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + { "wifipaf", kArgumentRequired, kDeviceOption_WiFi_PAF }, +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA #if CHIP_ENABLE_OPENTHREAD { "thread", kNoArgument, kDeviceOption_Thread }, @@ -189,6 +195,12 @@ const char * sDeviceOptionHelp = " --wifi-supports-5g\n" " Indicate that local Wi-Fi hardware should report 5GHz support.\n" #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + "\n" + " --wifipaf freq_list=,... \n" + " Enable Wi-Fi PAF via wpa_supplicant.\n" + " Give an empty string if not setting freq_list: \"\"\n" +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFIPAFs #if CHIP_ENABLE_OPENTHREAD "\n" " --thread\n" @@ -588,6 +600,13 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier, } break; } +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + case kDeviceOption_WiFi_PAF: { + LinuxDeviceOptions::GetInstance().mWiFiPAF = true; + LinuxDeviceOptions::GetInstance().mWiFiPAFExtCmds = aValue; + break; + } #endif default: PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); diff --git a/examples/platform/linux/Options.h b/examples/platform/linux/Options.h index 51e60f0ab63eca..f921bee4ced554 100644 --- a/examples/platform/linux/Options.h +++ b/examples/platform/linux/Options.h @@ -49,6 +49,10 @@ struct LinuxDeviceOptions bool wifiSupports5g = false; bool mWiFi = false; bool mThread = false; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + bool mWiFiPAF = false; + const char * mWiFiPAFExtCmds = nullptr; +#endif #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE || CHIP_DEVICE_ENABLE_PORT_PARAMS uint16_t securedDevicePort = CHIP_PORT; uint16_t unsecuredCommissionerPort = CHIP_UDC_PORT; diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 229fd67c5bb24b..47bc3e8ff97f07 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -71,6 +71,12 @@ void CommissioningWindowManager::OnPlatformEvent(const DeviceLayer::ChipDeviceEv #if CONFIG_NETWORK_LAYER_BLE && CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION // If in NonConcurrentConnection, this will already have been completed mServer->GetBleLayerObject()->CloseAllBleConnections(); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + DeviceLayer::ConnectivityManager::WiFiPAFAdvertiseParam args; + args.enable = false; + args.ExtCmds = nullptr; + DeviceLayer::ConnectivityMgr().SetWiFiPAFAdvertisingEnabled(args); #endif } else if (event->Type == DeviceLayer::DeviceEventType::kFailSafeTimerExpired) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 33f657f7ec1030..22cd274ba87e39 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -56,6 +56,10 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif + #if defined(CHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT) || defined(CHIP_SUPPORT_ENABLE_STORAGE_LOAD_TEST_AUDIT) #include #endif // defined(CHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT) || defined(CHIP_SUPPORT_ENABLE_STORAGE_LOAD_TEST_AUDIT) @@ -214,6 +218,10 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) TcpListenParameters(DeviceLayer::TCPEndPointManager()) .SetAddressType(IPAddressType::kIPv6) .SetListenPort(mOperationalServicePort) +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + , + Transport::WiFiPAFListenParameters(DeviceLayer::ConnectivityMgr().GetWiFiPAF()) #endif ); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 9e0216877fea61..2f6126a4ace635 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -65,6 +65,9 @@ #if CONFIG_NETWORK_LAYER_BLE #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif #include #include #include @@ -104,6 +107,10 @@ using ServerTransportMgr = chip::TransportMgr +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + , + chip::Transport::WiFiPAFBase #endif >; diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 8232292479ff3f..0e83d7125cf175 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -590,11 +590,16 @@ CHIP_ERROR AutoCommissioner::StartCommissioning(DeviceCommissioner * commissione mStopCommissioning = false; mCommissioner = commissioner; mCommissioneeDeviceProxy = proxy; - mNeedsNetworkSetup = - mCommissioneeDeviceProxy->GetSecureSession().Value()->AsSecureSession()->GetPeerAddress().GetTransportType() == - Transport::Type::kBle; + + auto transportType = + mCommissioneeDeviceProxy->GetSecureSession().Value()->AsSecureSession()->GetPeerAddress().GetTransportType(); + mNeedsNetworkSetup = (transportType == Transport::Type::kBle); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + mNeedsNetworkSetup = mNeedsNetworkSetup || (transportType == Transport::Type::kWiFiPAF); +#endif CHIP_ERROR err = CHIP_NO_ERROR; CommissioningStage nextStage = GetNextCommissioningStage(CommissioningStage::kSecurePairing, err); + mCommissioner->PerformCommissioningStep(mCommissioneeDeviceProxy, nextStage, mParams, this, GetEndpoint(nextStage), GetCommandTimeout(mCommissioneeDeviceProxy, nextStage)); return CHIP_NO_ERROR; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 5212350c913696..955e36bfb0d8a2 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -66,6 +66,9 @@ #include #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif #include #include @@ -466,6 +469,13 @@ DeviceCommissioner::DeviceCommissioner() : mDeviceNOCChainCallback(OnDeviceNOCChainGeneration, this), mSetUpCodePairer(this) {} +DeviceCommissioner::~DeviceCommissioner() +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + DeviceLayer::ConnectivityMgr().WiFiPAFCancelConnect(); +#endif +} + CHIP_ERROR DeviceCommissioner::Init(CommissionerInitParams params) { VerifyOrReturnError(params.operationalCredentialsDelegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -730,6 +740,12 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re peerAddress = Transport::PeerAddress::UDP(params.GetPeerAddress().GetIPAddress(), params.GetPeerAddress().GetPort(), params.GetPeerAddress().GetInterface()); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + else if (params.GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF) + { + peerAddress = Transport::PeerAddress::WiFiPAF(remoteDeviceId); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF current = FindCommissioneeDevice(peerAddress); if (current != nullptr) @@ -804,6 +820,24 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re ExitNow(err = CHIP_ERROR_INVALID_ARGUMENT); } } +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + if (params.GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF) + { + if (DeviceLayer::ConnectivityMgr().GetWiFiPAF()->GetWiFiPAFState() != Transport::WiFiPAFBase::State::kConnected) + { + ChipLogProgress(Controller, "WiFi-PAF: Subscribing the NAN-USD devices"); + if (!DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted()) + { + ChipLogError(Controller, "Wi-Fi Management should have be started now."); + ExitNow(CHIP_ERROR_INTERNAL); + } + mRendezvousParametersForDeviceDiscoveredOverWiFiPAF = params; + DeviceLayer::ConnectivityMgr().WiFiPAFConnect(params.GetSetupDiscriminator().value(), (void *) this, + OnWiFiPAFSubscribeComplete, OnWiFiPAFSubscribeError); + ExitNow(CHIP_NO_ERROR); + } + } #endif session = mSystemState->SessionMgr()->CreateUnauthenticatedSession(params.GetPeerAddress(), params.GetMRPConfig()); VerifyOrExit(session.HasValue(), err = CHIP_ERROR_NO_MEMORY); @@ -872,6 +906,43 @@ void DeviceCommissioner::OnDiscoveredDeviceOverBleError(void * appState, CHIP_ER } #endif // CONFIG_NETWORK_LAYER_BLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +void DeviceCommissioner::OnWiFiPAFSubscribeComplete(void * appState) +{ + auto self = (DeviceCommissioner *) appState; + auto device = self->mDeviceInPASEEstablishment; + + if (nullptr != device && device->GetDeviceTransportType() == Transport::Type::kWiFiPAF) + { + ChipLogProgress(Controller, "WiFi-PAF: Subscription Completed, dev_id = %lu", device->GetDeviceId()); + auto remoteId = device->GetDeviceId(); + auto params = self->mRendezvousParametersForDeviceDiscoveredOverWiFiPAF; + + self->mRendezvousParametersForDeviceDiscoveredOverWiFiPAF = RendezvousParameters(); + self->ReleaseCommissioneeDevice(device); + LogErrorOnFailure(self->EstablishPASEConnection(remoteId, params)); + } +} + +void DeviceCommissioner::OnWiFiPAFSubscribeError(void * appState, CHIP_ERROR err) +{ + auto self = (DeviceCommissioner *) appState; + auto device = self->mDeviceInPASEEstablishment; + + if (nullptr != device && device->GetDeviceTransportType() == Transport::Type::kWiFiPAF) + { + ChipLogError(Controller, "WiFi-PAF: Subscription Error, id = %lu, err = %" CHIP_ERROR_FORMAT, device->GetDeviceId(), + err.Format()); + self->ReleaseCommissioneeDevice(device); + self->mRendezvousParametersForDeviceDiscoveredOverWiFiPAF = RendezvousParameters(); + if (self->mPairingDelegate != nullptr) + { + self->mPairingDelegate->OnPairingComplete(err); + } + } +} +#endif + CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningParameters & params) { if (mDefaultCommissioner == nullptr) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 1c4b490faa891a..4b876156199735 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -468,7 +468,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, { public: DeviceCommissioner(); - ~DeviceCommissioner() override {} + ~DeviceCommissioner() override; #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable /** @@ -847,6 +847,11 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, static void OnDiscoveredDeviceOverBleError(void * appState, CHIP_ERROR err); RendezvousParameters mRendezvousParametersForDeviceDiscoveredOverBle; #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + static void OnWiFiPAFSubscribeComplete(void * appState); + static void OnWiFiPAFSubscribeError(void * appState, CHIP_ERROR err); + RendezvousParameters mRendezvousParametersForDeviceDiscoveredOverWiFiPAF; +#endif static void OnBasicFailure(void * context, CHIP_ERROR err); static void OnBasicSuccess(void * context, const chip::app::DataModel::NullObjectType &); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 24f60ed9d8a50a..dbc55dd7b7327e 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -141,6 +141,9 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) #else stateParams.bleLayer = params.bleLayer; #endif // CONFIG_DEVICE_LAYER +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + stateParams.wifipaf_layer = params.wifipaf_layer; +#endif VerifyOrReturnError(stateParams.bleLayer != nullptr, CHIP_ERROR_INVALID_ARGUMENT); #endif @@ -167,6 +170,10 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) Transport::TcpListenParameters(stateParams.tcpEndPointManager) .SetAddressType(IPAddressType::kIPv6) .SetListenPort(params.listenPort) +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + , + Transport::WiFiPAFListenParameters() #endif )); diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 474357ec4a4bde..16e2ad487126b9 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -145,6 +145,9 @@ struct FactoryInitParams #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + Transport::WiFiPAFLayer * wifipaf_layer = nullptr; +#endif // // Controls enabling server cluster interactions on a controller. This in turn diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index da8f25a75d2541..e040ad14616431 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -52,10 +52,16 @@ #include #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif namespace chip { inline constexpr size_t kMaxDeviceTransportBlePendingPackets = 1; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +inline constexpr size_t kMaxDeviceTransportWiFiPAFPendingPackets = 1; +#endif #if INET_CONFIG_ENABLE_TCP_ENDPOINT inline constexpr size_t kMaxDeviceTransportTcpActiveConnectionCount = CHIP_CONFIG_MAX_ACTIVE_TCP_CONNECTIONS; @@ -76,6 +82,10 @@ using DeviceTransportMgr = #if INET_CONFIG_ENABLE_TCP_ENDPOINT , Transport::TCP +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + , + Transport::WiFiPAF /* WiFiPAF */ #endif >; @@ -93,6 +103,9 @@ struct DeviceControllerSystemStateParams FabricTable * fabricTable = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + Transport::WiFiPAFLayer * wifipaf_layer = nullptr; #endif Credentials::GroupDataProvider * groupDataProvider = nullptr; Crypto::SessionKeystore * sessionKeystore = nullptr; diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index 17f2e5945eb1bf..99e991dfe8c114 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -59,6 +60,13 @@ CHIP_ERROR GetPayload(const char * setUpCode, SetupPayload & payload) } } // namespace +SetUpCodePairer::~SetUpCodePairer() +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + DeviceLayer::ConnectivityMgr().WiFiPAFCancelConnect(); +#endif +} + CHIP_ERROR SetUpCodePairer::PairDevice(NodeId remoteId, const char * setUpCode, SetupCodePairerBehaviour commission, DiscoveryType discoveryType, Optional resolutionData) { @@ -129,6 +137,15 @@ CHIP_ERROR SetUpCodePairer::Connect(SetupPayload & payload) } VerifyOrReturnError(searchOverAll || CHIP_NO_ERROR == err || CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE == err, err); } + if (searchOverAll || payload.rendezvousInformation.Value().Has(RendezvousInformationFlag::kWiFiPAF)) + { + ChipLogProgress(Controller, "WiFi-PAF: has RendezvousInformationFlag::kWiFiPAF"); + if (CHIP_NO_ERROR == (err = StartDiscoverOverWiFiPAF(payload))) + { + isRunning = true; + } + VerifyOrReturnError(searchOverAll || CHIP_NO_ERROR == err || CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE == err, err); + } } // We always want to search on network because any node that has already been commissioned will use on-network regardless of the @@ -243,6 +260,31 @@ CHIP_ERROR SetUpCodePairer::StopConnectOverSoftAP() return CHIP_NO_ERROR; } +CHIP_ERROR SetUpCodePairer::StartDiscoverOverWiFiPAF(SetupPayload & payload) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + ChipLogProgress(Controller, "Starting commissioning discovery over WiFiPAF"); + VerifyOrReturnError(mCommissioner != nullptr, CHIP_ERROR_INCORRECT_STATE); + mWaitingForDiscovery[kWiFiPAFTransport] = true; + CHIP_ERROR err = DeviceLayer::ConnectivityMgr().WiFiPAFConnect(payload.discriminator, (void *) this, OnWiFiPAFSubscribeComplete, + OnWiFiPAFSubscribeError); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Commissioning discovery over WiFiPAF failed, err = %" CHIP_ERROR_FORMAT, err.Format()); + mWaitingForDiscovery[kWiFiPAFTransport] = false; + } + return err; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif // CONFIG_NETWORK_LAYER_BLE +} + +CHIP_ERROR SetUpCodePairer::StopConnectOverWiFiPAF() +{ + mWaitingForDiscovery[kWiFiPAFTransport] = false; + return CHIP_NO_ERROR; +} + bool SetUpCodePairer::ConnectToDiscoveredDevice() { if (mWaitingForPASE) @@ -335,6 +377,37 @@ void SetUpCodePairer::OnBLEDiscoveryError(CHIP_ERROR err) } #endif // CONFIG_NETWORK_LAYER_BLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +void SetUpCodePairer::OnDiscoveredDeviceOverWifiPAF() +{ + ChipLogProgress(Controller, "Discovered device to be commissioned over WiFiPAF, RemoteId: %lu", mRemoteId); + + mWaitingForDiscovery[kWiFiPAFTransport] = false; + auto param = SetUpCodePairerParameters(); + param.SetPeerAddress(Transport::PeerAddress(Transport::Type::kWiFiPAF, mRemoteId)); + mDiscoveredParameters.emplace_back(param); + ConnectToDiscoveredDevice(); +} + +void SetUpCodePairer::OnWifiPAFDiscoveryError(CHIP_ERROR err) +{ + ChipLogError(Controller, "Commissioning discovery over WiFiPAF failed: %" CHIP_ERROR_FORMAT, err.Format()); + mWaitingForDiscovery[kWiFiPAFTransport] = false; +} + +void SetUpCodePairer::OnWiFiPAFSubscribeComplete(void * appState) +{ + auto self = (SetUpCodePairer *) appState; + self->OnDiscoveredDeviceOverWifiPAF(); +} + +void SetUpCodePairer::OnWiFiPAFSubscribeError(void * appState, CHIP_ERROR err) +{ + auto self = (SetUpCodePairer *) appState; + self->OnWifiPAFDiscoveryError(err); +} +#endif + bool SetUpCodePairer::IdIsPresent(uint16_t vendorOrProductID) { return vendorOrProductID != kNotAvailable; @@ -473,6 +546,7 @@ void SetUpCodePairer::ResetDiscoveryState() StopConnectOverBle(); StopConnectOverIP(); StopConnectOverSoftAP(); + StopConnectOverWiFiPAF(); // Just in case any of those failed to reset the waiting state properly. for (auto & waiting : mWaitingForDiscovery) diff --git a/src/controller/SetUpCodePairer.h b/src/controller/SetUpCodePairer.h index e177af7322d391..3414341a2cdd51 100644 --- a/src/controller/SetUpCodePairer.h +++ b/src/controller/SetUpCodePairer.h @@ -77,7 +77,7 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate { public: SetUpCodePairer(DeviceCommissioner * commissioner) : mCommissioner(commissioner) {} - virtual ~SetUpCodePairer() {} + ~SetUpCodePairer(); CHIP_ERROR PairDevice(chip::NodeId remoteId, const char * setUpCode, SetupCodePairerBehaviour connectionType = SetupCodePairerBehaviour::kCommission, @@ -111,6 +111,8 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate CHIP_ERROR StopConnectOverIP(); CHIP_ERROR StartDiscoverOverSoftAP(SetupPayload & payload); CHIP_ERROR StopConnectOverSoftAP(); + CHIP_ERROR StartDiscoverOverWiFiPAF(SetupPayload & payload); + CHIP_ERROR StopConnectOverWiFiPAF(); // Returns whether we have kicked off a new connection attempt. bool ConnectToDiscoveredDevice(); @@ -150,6 +152,7 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate kBLETransport = 0, kIPTransport, kSoftAPTransport, + kWiFiPAFTransport, kTransportTypeCount, }; @@ -165,6 +168,12 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate static void OnDiscoveredDeviceOverBleSuccess(void * appState, BLE_CONNECTION_OBJECT connObj); static void OnDiscoveredDeviceOverBleError(void * appState, CHIP_ERROR err); #endif // CONFIG_NETWORK_LAYER_BLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + void OnDiscoveredDeviceOverWifiPAF(); + void OnWifiPAFDiscoveryError(CHIP_ERROR err); + static void OnWiFiPAFSubscribeComplete(void * appState); + static void OnWiFiPAFSubscribeError(void * appState, CHIP_ERROR err); +#endif bool NodeMatchesCurrentFilter(const Dnssd::DiscoveredNodeData & nodeData) const; static bool IdIsPresent(uint16_t vendorOrProductID); diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index 49a94d75c23fcc..bc13696c8c36a2 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -425,6 +425,15 @@ #define CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME "wlan0" #endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + * + * Enable support for commissioning using Wi-Fi Public Action Frame as the transport. + */ +#ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#define CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF 0 +#endif + // -------------------- WiFi AP Configuration -------------------- /** diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 437b20e670284f..09f4c46b652920 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -281,7 +281,9 @@ enum InternalEventTypes * This event should populate CHIPoBLEConnectionError structure. */ kCHIPoBLEConnectionError, - kCHIPoBLENotifyConfirm + kCHIPoBLENotifyConfirm, + kCHIPoWiFiPAFWriteReceived, + kCHIPoWiFiPAFConnected, }; static_assert(kEventTypeNotSet == 0, "kEventTypeNotSet must be defined as 0"); @@ -491,6 +493,12 @@ struct ChipDeviceEvent final { BLE_CONNECTION_OBJECT ConId; } CHIPoBLENotifyConfirm; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + struct + { + chip::System::PacketBuffer * Data; + } CHIPoWiFiPAFWriteReceived; +#endif struct { bool RoleChanged : 1; diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 817019b3c1c63c..209d7484b92bda 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -35,6 +35,9 @@ #if INET_CONFIG_ENABLE_TCP_ENDPOINT #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif namespace chip { @@ -171,6 +174,19 @@ class ConnectivityManager bool IsWiFiStationProvisioned(); void ClearWiFiStationProvision(); CHIP_ERROR GetAndLogWiFiStatsCounters(); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + struct WiFiPAFAdvertiseParam; + + CHIP_ERROR SetWiFiPAFAdvertisingEnabled(WiFiPAFAdvertiseParam & args); + typedef void (*OnConnectionCompleteFunct)(void * appState); + typedef void (*OnConnectionErrorFunct)(void * appState, CHIP_ERROR err); + CHIP_ERROR WiFiPAFConnect(const SetupDiscriminator & connDiscriminator, void * appState, OnConnectionCompleteFunct onSuccess, + OnConnectionErrorFunct onError); + CHIP_ERROR WiFiPAFCancelConnect(); + CHIP_ERROR WiFiPAFSend(System::PacketBufferHandle && msgBuf); + Transport::WiFiPAFBase * GetWiFiPAF(); + void SetWiFiPAF(Transport::WiFiPAFBase * pmWiFiPAF); +#endif // WiFi AP methods WiFiAPMode GetWiFiAPMode(); @@ -268,6 +284,16 @@ struct ConnectivityManager::SEDIntervalsConfig System::Clock::Milliseconds32 IdleIntervalMS; }; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +struct ConnectivityManager::WiFiPAFAdvertiseParam +{ + /* To enable/disable WiFiPAF Commissioning */ + bool enable; + /* The optional commands */ + const char * ExtCmds; +}; +#endif + /** * Returns a reference to the public interface of the ConnectivityManager singleton object. * @@ -407,6 +433,29 @@ inline CHIP_ERROR ConnectivityManager::GetAndLogWiFiStatsCounters() return static_cast(this)->_GetAndLogWiFiStatsCounters(); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +inline CHIP_ERROR ConnectivityManager::SetWiFiPAFAdvertisingEnabled(WiFiPAFAdvertiseParam & args) +{ + return static_cast(this)->_SetWiFiPAFAdvertisingEnabled(args); +} + +inline CHIP_ERROR ConnectivityManager::WiFiPAFConnect(const SetupDiscriminator & connDiscriminator, void * appState, + OnConnectionCompleteFunct onSuccess, OnConnectionErrorFunct onError) +{ + return static_cast(this)->_WiFiPAFConnect(connDiscriminator, appState, onSuccess, onError); +} + +inline CHIP_ERROR ConnectivityManager::WiFiPAFCancelConnect() +{ + return static_cast(this)->_WiFiPAFCancelConnect(); +} + +inline CHIP_ERROR ConnectivityManager::WiFiPAFSend(chip::System::PacketBufferHandle && msgBuf) +{ + return static_cast(this)->_WiFiPAFSend(std::move(msgBuf)); +} +#endif + inline bool ConnectivityManager::IsThreadEnabled() { return static_cast(this)->_IsThreadEnabled(); @@ -451,6 +500,18 @@ inline void ConnectivityManager::ResetThreadNetworkDiagnosticsCounts() static_cast(this)->_ResetThreadNetworkDiagnosticsCounts(); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +inline Transport::WiFiPAFBase * ConnectivityManager::GetWiFiPAF() +{ + return static_cast(this)->_GetWiFiPAF(); +} + +inline void ConnectivityManager::SetWiFiPAF(Transport::WiFiPAFBase * pWiFiPAF) +{ + return static_cast(this)->_SetWiFiPAF(pWiFiPAF); +} +#endif + inline Ble::BleLayer * ConnectivityManager::GetBleLayer() { return static_cast(this)->_GetBleLayer(); diff --git a/src/lib/shell/commands/OnboardingCodes.cpp b/src/lib/shell/commands/OnboardingCodes.cpp index 1e17812d183a3f..a08a63be68770f 100644 --- a/src/lib/shell/commands/OnboardingCodes.cpp +++ b/src/lib/shell/commands/OnboardingCodes.cpp @@ -128,6 +128,13 @@ static CHIP_ERROR RendezvousStringToFlag(char * str, chip::RendezvousInformation *aRendezvousFlags = chip::RendezvousInformationFlag::kOnNetwork; return CHIP_NO_ERROR; } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + if (strcmp(str, "wifipaf") == 0) + { + *aRendezvousFlags = chip::RendezvousInformationFlag::kWiFiPAF; + return CHIP_NO_ERROR; + } +#endif return CHIP_ERROR_INVALID_ARGUMENT; } diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 474e3c17ce284b..38becc7ede7471 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -140,6 +140,7 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=${chip_use_transitional_commissionable_data_provider}", "CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER=${chip_use_transitional_device_instance_info_provider}", "CHIP_DEVICE_CONFIG_ENABLE_DYNAMIC_MRP_CONFIG=${chip_device_config_enable_dynamic_mrp_config}", + "CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF=${chip_device_config_enable_wifipaf}", ] if (chip_device_platform == "linux" || chip_device_platform == "darwin" || diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index cd3922baaf2b02..0ba16f90d874a9 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,9 @@ #include #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif #endif using namespace ::chip; @@ -152,6 +156,22 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) #if CHIP_DEVICE_CONFIG_ENABLE_THREAD GenericConnectivityManagerImpl_Thread::_OnPlatformEvent(event); #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + switch (event->Type) + { + case DeviceEventType::kCHIPoWiFiPAFWriteReceived: + ChipLogProgress(DeviceLayer, "WiFi-PAF: event: kCHIPoWiFiPAFWriteReceived"); + _GetWiFiPAF()->OnWiFiPAFMessageReceived(System::PacketBufferHandle::Adopt(event->CHIPoWiFiPAFWriteReceived.Data)); + break; + case DeviceEventType::kCHIPoWiFiPAFConnected: + ChipLogProgress(DeviceLayer, "WiFi-PAF: event: kCHIPoWiFiPAFConnected"); + if (mOnPafSubscribeComplete != nullptr) + { + mOnPafSubscribeComplete(mAppState); + } + break; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF } #if CHIP_DEVICE_CONFIG_ENABLE_WPA @@ -797,6 +817,113 @@ bool ConnectivityManagerImpl::IsWiFiManagementStarted() return ret; } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +const char srv_name[] = "_matterc._udp"; +/* + NAN-USD Service Protocol Type: ref: Table 58 of Wi-Fi Aware Specificaiton +*/ +#define MAX_PAF_PUBLISH_SSI_BUFLEN 512 +#define MAX_PAF_TX_SSI_BUFLEN 2048 +#define NAN_SRV_PROTO_MATTER 3 +#define NAM_PUBLISH_PERIOD 300u +#define NAN_PUBLISH_SSI_TAG " ssi=" + +#pragma pack(push, 1) +struct PAFPublishSSI +{ + uint8_t DevOpCode; + uint16_t DevInfo; + uint16_t ProductId; + uint16_t VendorId; +}; +#pragma pack(pop) +CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFPublish(ConnectivityManager::WiFiPAFAdvertiseParam & InArgs) +{ + CHIP_ERROR ret; + GAutoPtr err; + gchar args[MAX_PAF_PUBLISH_SSI_BUFLEN]; + gint publish_id; + size_t req_len; + + snprintf(args, sizeof(args), "service_name=%s srv_proto_type=%u ttl=%u ", srv_name, NAN_SRV_PROTO_MATTER, NAM_PUBLISH_PERIOD); + req_len = strlen(args) + strlen(InArgs.ExtCmds); + if ((InArgs.ExtCmds != nullptr) && (MAX_PAF_PUBLISH_SSI_BUFLEN > req_len)) + { + strcat(args, InArgs.ExtCmds); + } + else + { + ChipLogError(DeviceLayer, "Input cmd is too long: limit:%d, req: %lu", MAX_PAF_PUBLISH_SSI_BUFLEN, req_len); + } + + struct PAFPublishSSI PafPublish_ssi; + VerifyOrReturnError( + (strlen(args) + strlen(NAN_PUBLISH_SSI_TAG) + (sizeof(struct PAFPublishSSI) * 2) < MAX_PAF_PUBLISH_SSI_BUFLEN), + CHIP_ERROR_BUFFER_TOO_SMALL); + PafPublish_ssi.DevOpCode = 0; + VerifyOrDie(DeviceLayer::GetCommissionableDataProvider()->GetSetupDiscriminator(PafPublish_ssi.DevInfo) == CHIP_NO_ERROR); + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(PafPublish_ssi.ProductId) != CHIP_NO_ERROR) + { + PafPublish_ssi.ProductId = 0; + } + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(PafPublish_ssi.VendorId) != CHIP_NO_ERROR) + { + PafPublish_ssi.VendorId = 0; + } + if (MAX_PAF_PUBLISH_SSI_BUFLEN > strlen(args) + strlen(NAN_PUBLISH_SSI_TAG)) + { + strcat(args, NAN_PUBLISH_SSI_TAG); + } + ret = Encoding::BytesToUppercaseHexString((uint8_t *) &PafPublish_ssi, sizeof(PafPublish_ssi), &args[strlen(args)], + MAX_PAF_PUBLISH_SSI_BUFLEN - strlen(args)); + VerifyOrReturnError(ret == CHIP_NO_ERROR, ret); + ChipLogProgress(DeviceLayer, "WiFi-PAF: publish: [%s]", args); + wpa_fi_w1_wpa_supplicant1_interface_call_nanpublish_sync(mWpaSupplicant.iface, args, &publish_id, nullptr, &err.GetReceiver()); + ChipLogProgress(DeviceLayer, "WiFi-PAF: publish_id: %d ! ", publish_id); + + g_signal_connect(mWpaSupplicant.iface, "nan-receive", + G_CALLBACK(+[](WpaFiW1Wpa_supplicant1Interface * proxy, GVariant * obj, ConnectivityManagerImpl * self) { + return self->OnNanReceive(obj); + }), + this); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFCancelPublish() +{ + GAutoPtr err; + gchar args[MAX_PAF_PUBLISH_SSI_BUFLEN]; + + ChipLogProgress(DeviceLayer, "WiFi-PAF: cancel publish_id: %d ! ", mpaf_info.peer_publish_id); + snprintf(args, sizeof(args), "publish_id=%d", mpaf_info.peer_publish_id); + wpa_fi_w1_wpa_supplicant1_interface_call_nancancel_publish_sync(mWpaSupplicant.iface, args, nullptr, &err.GetReceiver()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiPAFAdvertisingEnabled(WiFiPAFAdvertiseParam & args) +{ + if (args.enable == true) + { + return _WiFiPAFPublish(args); + } + else + { + return _WiFiPAFCancelPublish(); + } +} + +Transport::WiFiPAFBase * ConnectivityManagerImpl::_GetWiFiPAF() +{ + return pmWiFiPAF; +} + +void ConnectivityManagerImpl::_SetWiFiPAF(Transport::WiFiPAFBase * pWiFiPAF) +{ + pmWiFiPAF = pWiFiPAF; + return; +} +#endif + void ConnectivityManagerImpl::StartNonConcurrentWiFiManagement() { StartWiFiManagement(); @@ -1226,6 +1353,229 @@ CHIP_ERROR ConnectivityManagerImpl::ConnectWiFiNetworkWithPDCAsync( return _ConnectWiFiNetworkAsync(args, connectCallback); } #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +/* + NAN-USD Service Protocol Type: ref: Table 58 of Wi-Fi Aware Specificaiton +*/ +#define MAX_PAF_SUBSCRIBE_SSI_BUFLEN 128 +#define NAN_SRV_PROTO_MATTER 3 +#define NAM_SUBSCRIBE_PERIOD 30u +void ConnectivityManagerImpl::OnDiscoveryResult(gboolean success, GVariant * discov_info) +{ + ChipLogProgress(Controller, "WiFi-PAF: OnDiscoveryResult, %d", success); + + std::lock_guard lock(mWpaSupplicantMutex); + if (g_variant_n_children(discov_info) == 0) + { + return; + } + + if (success == true) + { + GAutoPtr dataValue(g_variant_lookup_value(discov_info, "discov_info", G_VARIANT_TYPE_BYTESTRING)); + size_t bufferLen; + auto buffer = g_variant_get_fixed_array(dataValue.get(), &bufferLen, sizeof(uint8_t)); + if (((struct wpa_dbus_discov_info *) buffer)->subscribe_id == mpaf_info.subscribe_id) + { + return; + } + memcpy(&mpaf_info, buffer, sizeof(struct wpa_dbus_discov_info)); + ChipLogProgress(DeviceLayer, "WiFi-PAF: subscribe_id: %u", mpaf_info.subscribe_id); + ChipLogProgress(DeviceLayer, "WiFi-PAF: peer_publish_id: %u", mpaf_info.peer_publish_id); + ChipLogProgress(DeviceLayer, "WiFi-PAF: peer_addr: [%02x:%02x:%02x:%02x:%02x:%02x]", mpaf_info.peer_addr[0], + mpaf_info.peer_addr[1], mpaf_info.peer_addr[2], mpaf_info.peer_addr[3], mpaf_info.peer_addr[4], + mpaf_info.peer_addr[5]); + GetWiFiPAF()->SetWiFiPAFState(Transport::WiFiPAFBase::State::kConnected); + + // Read the ssi + GAutoPtr ssiValue(g_variant_lookup_value(discov_info, "ssi", G_VARIANT_TYPE_BYTESTRING)); + size_t ssiBufLen; + g_variant_get_fixed_array(ssiValue.get(), &ssiBufLen, sizeof(uint8_t)); + + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoWiFiPAFConnected; + PlatformMgr().PostEventOrDie(&event); + } + else + { + GetWiFiPAF()->SetWiFiPAFState(Transport::WiFiPAFBase::State::kInitialized); + if (mOnPafSubscribeError != nullptr) + { + mOnPafSubscribeError(mAppState, CHIP_ERROR_TIMEOUT); + } + } + + return; +} + +void ConnectivityManagerImpl::OnNanReceive(GVariant * obj) +{ + if (g_variant_n_children(obj) == 0) + { + return; + } + // Read the rx_info + GAutoPtr dataValueInfo(g_variant_lookup_value(obj, "nanrx_info", G_VARIANT_TYPE_BYTESTRING)); + size_t infoBufferLen; + auto infoBuffer = g_variant_get_fixed_array(dataValueInfo.get(), &infoBufferLen, sizeof(uint8_t)); + + memcpy(&mpaf_nanrx_info, infoBuffer, sizeof(struct wpa_dbus_nanrx_info)); + mpaf_info.subscribe_id = mpaf_nanrx_info.id; + mpaf_info.peer_publish_id = mpaf_nanrx_info.peer_id; + memcpy(mpaf_info.peer_addr, mpaf_nanrx_info.peer_addr, 6); + if (mpaf_nanrx_info.ssi_len == 0) + { + return; + } + // Read the rx_data + GAutoPtr dataValue(g_variant_lookup_value(obj, "ssi", G_VARIANT_TYPE_BYTESTRING)); + size_t bufferLen; + System::PacketBufferHandle buf; + auto rxbuf = g_variant_get_fixed_array(dataValue.get(), &bufferLen, sizeof(uint8_t)); + ChipLogProgress(DeviceLayer, "WiFi-PAF: wpa_supplicant: nan-rx: [len: %lu]", bufferLen); + buf = System::PacketBufferHandle::NewWithData(rxbuf, bufferLen); + + // Post an event to the Chip queue to deliver the data into the Chip stack. + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoWiFiPAFWriteReceived; + event.CHIPoWiFiPAFWriteReceived.Data = std::move(buf).UnsafeRelease(); + PlatformMgr().PostEventOrDie(&event); + + return; +} + +void ConnectivityManagerImpl::OnNanSubscribeTerminated(gint term_subscribe_id, gint reason) +{ + ChipLogProgress(Controller, "WiFi-PAF: Subscription terminated (%d, %d)", term_subscribe_id, reason); + if (mpresubscribe_id == (uint32_t) term_subscribe_id) + { + mpresubscribe_id = 0; + } + if (mpaf_info.subscribe_id == (uint32_t) term_subscribe_id) + { + mpaf_info.subscribe_id = 0; + } + return; +} + +CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFConnect(const SetupDiscriminator & connDiscriminator, void * appState, + OnConnectionCompleteFunct onSuccess, OnConnectionErrorFunct onError) +{ + ChipLogProgress(Controller, "WiFi-PAF: Try to subscribe the NAN-USD devices"); + gchar args[MAX_PAF_SUBSCRIBE_SSI_BUFLEN]; + gint subscribe_id; + snprintf(args, sizeof(args), "service_name=%s srv_proto_type=%u ttl=%u ", srv_name, NAN_SRV_PROTO_MATTER, NAM_SUBSCRIBE_PERIOD); + GAutoPtr err; + CHIP_ERROR ret; + struct PAFPublishSSI PafPublish_ssi; + + VerifyOrReturnError( + (strlen(args) + strlen(NAN_PUBLISH_SSI_TAG) + (sizeof(struct PAFPublishSSI) * 2) < MAX_PAF_PUBLISH_SSI_BUFLEN), + CHIP_ERROR_BUFFER_TOO_SMALL); + mAppState = appState; + PafPublish_ssi.DevOpCode = 0; + PafPublish_ssi.DevInfo = connDiscriminator.GetLongValue(); + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetProductId(PafPublish_ssi.ProductId) != CHIP_NO_ERROR) + { + PafPublish_ssi.ProductId = 0; + } + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(PafPublish_ssi.VendorId) != CHIP_NO_ERROR) + { + PafPublish_ssi.VendorId = 0; + } + strcat(args, NAN_PUBLISH_SSI_TAG); + ret = Encoding::BytesToUppercaseHexString((uint8_t *) &PafPublish_ssi, sizeof(PafPublish_ssi), &args[strlen(args)], + MAX_PAF_PUBLISH_SSI_BUFLEN - strlen(args)); + VerifyOrReturnError(ret == CHIP_NO_ERROR, ret); + ChipLogProgress(DeviceLayer, "WiFi-PAF: subscribe: [%s]", args); + + wpa_fi_w1_wpa_supplicant1_interface_call_nansubscribe_sync(mWpaSupplicant.iface, args, &subscribe_id, nullptr, + &err.GetReceiver()); + ChipLogProgress(DeviceLayer, "WiFi-PAF: subscribe_id: [%d]", subscribe_id); + mpresubscribe_id = subscribe_id; + mOnPafSubscribeComplete = onSuccess; + mOnPafSubscribeError = onError; + g_signal_connect(mWpaSupplicant.iface, "nan-discoveryresult", + G_CALLBACK(+[](WpaFiW1Wpa_supplicant1Interface * proxy, gboolean success, GVariant * obj, + ConnectivityManagerImpl * self) { return self->OnDiscoveryResult(success, obj); }), + this); + + g_signal_connect(mWpaSupplicant.iface, "nan-receive", + G_CALLBACK(+[](WpaFiW1Wpa_supplicant1Interface * proxy, GVariant * obj, ConnectivityManagerImpl * self) { + return self->OnNanReceive(obj); + }), + this); + + g_signal_connect( + mWpaSupplicant.iface, "nan-subscribeterminated", + G_CALLBACK(+[](WpaFiW1Wpa_supplicant1Interface * proxy, gint term_subscribe_id, gint reason, + ConnectivityManagerImpl * self) { return self->OnNanSubscribeTerminated(term_subscribe_id, reason); }), + this); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFCancelConnect() +{ + if (mpresubscribe_id == 0) + { + return CHIP_NO_ERROR; + } + GAutoPtr err; + gchar args[MAX_PAF_PUBLISH_SSI_BUFLEN]; + + snprintf(args, sizeof(args), "subscribe_id=%d", mpresubscribe_id); + wpa_fi_w1_wpa_supplicant1_interface_call_nancancel_subscribe_sync(mWpaSupplicant.iface, args, nullptr, &err.GetReceiver()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFSend(System::PacketBufferHandle && msgBuf) +{ + ChipLogProgress(Controller, "WiFi-PAF: sending PAF Follow-up packets, (%lu)", msgBuf->DataLength()); + CHIP_ERROR ret = CHIP_NO_ERROR; + + if (msgBuf.IsNull()) + { + ChipLogError(Controller, "WiFi-PAF: Invalid Packet (%lu)", msgBuf->DataLength()); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Ensure outgoing message fits in a single contiguous packet buffer, as currently required by the + // message fragmentation and reassembly engine. + if (msgBuf->HasChainedBuffer()) + { + msgBuf->CompactHead(); + + if (msgBuf->HasChainedBuffer()) + { + ret = CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG; + ChipLogError(Controller, "WiFi-PAF: Outbound message too big (%lu), skip temporally", msgBuf->DataLength()); + return ret; + } + } + + // ================================================================================================================ + // Send the packets + GAutoPtr err; + gchar args[MAX_PAF_TX_SSI_BUFLEN]; + + snprintf(args, sizeof(args), "handle=%u req_instance_id=%u address=%02x:%02x:%02x:%02x:%02x:%02x ssi=", mpaf_info.subscribe_id, + mpaf_info.peer_publish_id, mpaf_info.peer_addr[0], mpaf_info.peer_addr[1], mpaf_info.peer_addr[2], + mpaf_info.peer_addr[3], mpaf_info.peer_addr[4], mpaf_info.peer_addr[5]); + + ChipLogProgress(Controller, "===> %s(), (%lu, %u)", __FUNCTION__, (strlen(args) + msgBuf->DataLength()), MAX_PAF_TX_SSI_BUFLEN) + VerifyOrReturnError((strlen(args) + msgBuf->DataLength() < MAX_PAF_TX_SSI_BUFLEN), CHIP_ERROR_BUFFER_TOO_SMALL); + + ret = chip::Encoding::BytesToUppercaseHexString(msgBuf->Start(), msgBuf->DataLength(), &args[strlen(args)], + MAX_PAF_TX_SSI_BUFLEN - strlen(args)); + VerifyOrReturnError(ret == CHIP_NO_ERROR, ret); + ChipLogProgress(DeviceLayer, "WiFi-PAF: ssi: [%s]", args); + wpa_fi_w1_wpa_supplicant1_interface_call_nantransmit_sync(mWpaSupplicant.iface, args, nullptr, &err.GetReceiver()); + ChipLogProgress(Controller, "WiFi-PAF: Outbound message (%lu) done", msgBuf->DataLength()); + return ret; +} + +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * sourceObject, GAsyncResult * res) { @@ -1471,7 +1821,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetConfiguredNetwork(NetworkCommissioning::N const gchar * networkPath = wpa_fi_w1_wpa_supplicant1_interface_get_current_network(mWpaSupplicant.iface); // wpa_supplicant DBus API: if network path of current network is "/", means no networks is currently selected. - if (strcmp(networkPath, "/") == 0) + if ((networkPath == nullptr) || (strcmp(networkPath, "/") == 0)) { return CHIP_ERROR_KEY_NOT_FOUND; } diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index ee5978faf6ff70..2025f228532961 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -48,6 +48,9 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF +#include +#endif #endif #include @@ -137,6 +140,17 @@ class ConnectivityManagerImpl final : public ConnectivityManager, const Crypto::P256Keypair & clientIdentityKeypair, NetworkCommissioning::Internal::WirelessDriver::ConnectCallback * connectCallback); #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + CHIP_ERROR _WiFiPAFConnect(const SetupDiscriminator & connDiscriminator, void * appState, OnConnectionCompleteFunct onSuccess, + OnConnectionErrorFunct onError); + CHIP_ERROR _WiFiPAFCancelConnect(); + void OnDiscoveryResult(gboolean success, GVariant * obj); + void OnNanReceive(GVariant * obj); + void OnNanSubscribeTerminated(gint term_subscribe_id, gint reason); + CHIP_ERROR _WiFiPAFSend(chip::System::PacketBufferHandle && msgBuf); + Transport::WiFiPAFBase * _GetWiFiPAF(); + void _SetWiFiPAF(Transport::WiFiPAFBase * pWiFiPAF); +#endif void PostNetworkConnect(); CHIP_ERROR CommitConfig(); @@ -215,6 +229,33 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void _OnWpaInterfaceReady(GObject * sourceObject, GAsyncResult * res); void _OnWpaInterfaceProxyReady(GObject * sourceObject, GAsyncResult * res); void _OnWpaBssProxyReady(GObject * sourceObject, GAsyncResult * res); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF + struct wpa_dbus_discov_info + { + uint32_t subscribe_id; + uint32_t peer_publish_id; + uint8_t peer_addr[6]; + uint32_t ssi_len; + }; + uint32_t mpresubscribe_id; + struct wpa_dbus_discov_info mpaf_info; + struct wpa_dbus_nanrx_info + { + uint32_t id; + uint32_t peer_id; + uint8_t peer_addr[6]; + uint32_t ssi_len; + }; + struct wpa_dbus_nanrx_info mpaf_nanrx_info; + + OnConnectionCompleteFunct mOnPafSubscribeComplete; + OnConnectionErrorFunct mOnPafSubscribeError; + Transport::WiFiPAFBase * pmWiFiPAF; + void * mAppState; + CHIP_ERROR _SetWiFiPAFAdvertisingEnabled(WiFiPAFAdvertiseParam & args); + CHIP_ERROR _WiFiPAFPublish(WiFiPAFAdvertiseParam & args); + CHIP_ERROR _WiFiPAFCancelPublish(); +#endif bool _GetBssInfo(const gchar * bssPath, NetworkCommissioning::WiFiScanResponse & result); diff --git a/src/platform/Linux/dbus/wpa/DBusWpaInterface.xml b/src/platform/Linux/dbus/wpa/DBusWpaInterface.xml index ef86bdd3b17032..721ca0033cca09 100644 --- a/src/platform/Linux/dbus/wpa/DBusWpaInterface.xml +++ b/src/platform/Linux/dbus/wpa/DBusWpaInterface.xml @@ -56,6 +56,23 @@ + + + + + + + + + + + + + + + + + @@ -92,6 +109,21 @@ + + + + + + + + + + + + + + + diff --git a/src/platform/device.gni b/src/platform/device.gni index 332b4b3ee85716..87e2eb12e8d0d2 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -23,6 +23,9 @@ declare_args() { # Substitute fake platform when building with chip_device_platform=auto. chip_fake_platform = false + + # Include wifi-paf to commission the device or not + chip_device_config_enable_wifipaf = false } if (chip_device_platform == "auto") { diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index 1ef4795d571e4d..9683da21f8a7f9 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -62,7 +62,7 @@ bool PayloadContents::isValidQRCodePayload(ValidationMode mode) const if (mode == ValidationMode::kProduce) { chip::RendezvousInformationFlags valid(RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kOnNetwork, - RendezvousInformationFlag::kSoftAP); + RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kWiFiPAF); VerifyOrReturnValue(rendezvousInformation.Value().HasOnly(valid), false); } diff --git a/src/setup_payload/SetupPayload.h b/src/setup_payload/SetupPayload.h index dc67206dd51867..3d5d101fbf4c6e 100644 --- a/src/setup_payload/SetupPayload.h +++ b/src/setup_payload/SetupPayload.h @@ -101,6 +101,7 @@ enum class RendezvousInformationFlag : uint8_t kSoftAP = 1 << 0, ///< Device supports Wi-Fi softAP kBLE = 1 << 1, ///< Device supports BLE kOnNetwork = 1 << 2, ///< Device supports Setup on network + kWiFiPAF = 1 << 3, ///< Device supports Wi-Fi Public Action Frame for discovery }; using RendezvousInformationFlags = chip::BitFlags; diff --git a/src/setup_payload/tests/TestQRCode.cpp b/src/setup_payload/tests/TestQRCode.cpp index 44c50d9e1e8f5b..e5d68227c2956e 100644 --- a/src/setup_payload/tests/TestQRCode.cpp +++ b/src/setup_payload/tests/TestQRCode.cpp @@ -53,6 +53,9 @@ TEST(TestQRCode, TestRendezvousFlags) inPayload.rendezvousInformation.SetValue(RendezvousInformationFlag::kOnNetwork); EXPECT_TRUE(CheckWriteRead(inPayload)); + inPayload.rendezvousInformation.SetValue(RendezvousInformationFlag::kWiFiPAF); + EXPECT_TRUE(CheckWriteRead(inPayload)); + inPayload.rendezvousInformation.SetValue( RendezvousInformationFlags(RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); EXPECT_TRUE(CheckWriteRead(inPayload)); @@ -61,9 +64,26 @@ TEST(TestQRCode, TestRendezvousFlags) RendezvousInformationFlags(RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kOnNetwork)); EXPECT_TRUE(CheckWriteRead(inPayload)); + inPayload.rendezvousInformation.SetValue( + RendezvousInformationFlags(RendezvousInformationFlag::kWiFiPAF, RendezvousInformationFlag::kOnNetwork)); + EXPECT_TRUE(CheckWriteRead(inPayload)); + inPayload.rendezvousInformation.SetValue(RendezvousInformationFlags( RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); EXPECT_TRUE(CheckWriteRead(inPayload)); + + inPayload.rendezvousInformation.SetValue(RendezvousInformationFlags( + RendezvousInformationFlag::kWiFiPAF, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); + EXPECT_TRUE(CheckWriteRead(inPayload)); + + inPayload.rendezvousInformation.SetValue(RendezvousInformationFlags( + RendezvousInformationFlag::kWiFiPAF, RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kOnNetwork)); + EXPECT_TRUE(CheckWriteRead(inPayload)); + + inPayload.rendezvousInformation.SetValue( + RendezvousInformationFlags(RendezvousInformationFlag::kWiFiPAF, RendezvousInformationFlag::kBLE, + RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); + EXPECT_TRUE(CheckWriteRead(inPayload)); } TEST(TestQRCode, TestCommissioningFlow) @@ -88,8 +108,9 @@ TEST(TestQRCode, TestMaximumValues) inPayload.vendorID = 0xFFFF; inPayload.productID = 0xFFFF; inPayload.commissioningFlow = CommissioningFlow::kCustom; - inPayload.rendezvousInformation.SetValue(RendezvousInformationFlags( - RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); + inPayload.rendezvousInformation.SetValue( + RendezvousInformationFlags(RendezvousInformationFlag::kWiFiPAF, RendezvousInformationFlag::kBLE, + RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork)); inPayload.discriminator.SetLongValue(static_cast((1 << kPayloadDiscriminatorFieldLengthInBits) - 1)); inPayload.setUpPINCode = static_cast((1 << kSetupPINCodeFieldLengthInBits) - 1); @@ -303,9 +324,10 @@ TEST(TestQRCode, TestSetupPayloadVerify) EXPECT_EQ(test_payload.isValidQRCodePayload(), false); // test invalid rendezvousInformation - test_payload = payload; - RendezvousInformationFlags invalid = RendezvousInformationFlags( - RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork); + test_payload = payload; + RendezvousInformationFlags invalid = + RendezvousInformationFlags(RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, + RendezvousInformationFlag::kOnNetwork, RendezvousInformationFlag::kWiFiPAF); invalid.SetRaw(static_cast(invalid.Raw() + 1)); test_payload.rendezvousInformation.SetValue(invalid); EXPECT_EQ(test_payload.isValidQRCodePayload(), false); diff --git a/src/transport/raw/BUILD.gn b/src/transport/raw/BUILD.gn index 3e8d3d4761dca3..f5593c012769e7 100644 --- a/src/transport/raw/BUILD.gn +++ b/src/transport/raw/BUILD.gn @@ -15,6 +15,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/ble/ble.gni") import("${chip_root}/src/inet/inet.gni") +import("${chip_root}/src/platform/device.gni") static_library("raw") { output_name = "libRawTransport" @@ -44,6 +45,12 @@ static_library("raw") { "BLE.h", ] } + if (chip_device_config_enable_wifipaf) { + sources += [ + "WiFiPAF.cpp", + "WiFiPAF.h", + ] + } cflags = [ "-Wconversion" ] diff --git a/src/transport/raw/PeerAddress.h b/src/transport/raw/PeerAddress.h index 64588bc64c062f..896648f76f537a 100644 --- a/src/transport/raw/PeerAddress.h +++ b/src/transport/raw/PeerAddress.h @@ -53,6 +53,7 @@ enum class Type : uint8_t kUdp, kBle, kTcp, + kWiFiPAF, }; /** @@ -64,6 +65,7 @@ class PeerAddress PeerAddress() : mIPAddress(Inet::IPAddress::Any), mTransportType(Type::kUndefined) {} PeerAddress(const Inet::IPAddress & addr, Type type) : mIPAddress(addr), mTransportType(type) {} PeerAddress(Type type) : mTransportType(type) {} + PeerAddress(Type type, NodeId remoteId) : mTransportType(type), mRemoteId(remoteId) {} PeerAddress(PeerAddress &&) = default; PeerAddress(const PeerAddress &) = default; @@ -77,6 +79,8 @@ class PeerAddress return *this; } + NodeId GetRemoteId() const { return mRemoteId; } + Type GetTransportType() const { return mTransportType; } PeerAddress & SetTransportType(Type type) { @@ -167,6 +171,9 @@ class PeerAddress #endif snprintf(buf, bufSize, "TCP:[%s%s]:%d", ip_addr, interface, mPort); break; + case Type::kWiFiPAF: + snprintf(buf, bufSize, "Wi-Fi PAF"); + break; case Type::kBle: // Note that BLE does not currently use any specific address. snprintf(buf, bufSize, "BLE"); @@ -209,6 +216,8 @@ class PeerAddress return TCP(addr).SetPort(port).SetInterface(interface); } + static PeerAddress WiFiPAF(NodeId remoteId) { return PeerAddress(Type::kWiFiPAF); } + static PeerAddress Multicast(chip::FabricId fabric, chip::GroupId group) { constexpr uint8_t scope = 0x05; // Site-Local @@ -237,6 +246,7 @@ class PeerAddress Type mTransportType = Type::kUndefined; uint16_t mPort = CHIP_PORT; ///< Relevant for UDP data sending. Inet::InterfaceId mInterface = Inet::InterfaceId::Null(); + NodeId mRemoteId = 0; }; } // namespace Transport diff --git a/src/transport/raw/WiFiPAF.cpp b/src/transport/raw/WiFiPAF.cpp new file mode 100644 index 00000000000000..97b465dd261e9b --- /dev/null +++ b/src/transport/raw/WiFiPAF.cpp @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the Matter Connection object that maintains a Wi-Fi PAF connection + * + */ + +#include +#include +#include +#include +#include +#include + +using namespace chip::System; + +namespace chip { +namespace Transport { + +WiFiPAFBase::~WiFiPAFBase() +{ + ClearState(); +} + +void WiFiPAFBase::ClearState() +{ + mState = State::kNotReady; +} + +CHIP_ERROR WiFiPAFBase::Init(const WiFiPAFListenParameters & param) +{ + ChipLogDetail(Inet, "WiFiPAFBase::Init - setting/overriding transport"); + VerifyOrReturnError(mState == State::kNotReady, CHIP_ERROR_INCORRECT_STATE); + DeviceLayer::ConnectivityMgr().SetWiFiPAF(this); + mState = State::kInitialized; + + if (!DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted()) + { + ChipLogError(Inet, "Wi-Fi Management has not started, do it now."); + static constexpr useconds_t kWiFiStartCheckTimeUsec = WIFI_START_CHECK_TIME_USEC; + static constexpr uint8_t kWiFiStartCheckAttempts = WIFI_START_CHECK_ATTEMPTS; + DeviceLayer::ConnectivityMgrImpl().StartWiFiManagement(); + { + for (int cnt = 0; cnt < kWiFiStartCheckAttempts; cnt++) + { + if (DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted()) + { + break; + } + usleep(kWiFiStartCheckTimeUsec); + } + } + if (!DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted()) + { + ChipLogError(Inet, "Wi-Fi Management taking too long to start - device configuration will be reset."); + return CHIP_ERROR_INTERNAL; + } + ChipLogProgress(NotSpecified, "Wi-Fi Management is started"); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR WiFiPAFBase::SendMessage(const Transport::PeerAddress & address, System::PacketBufferHandle && msgBuf) +{ + ReturnErrorCodeIf(address.GetTransportType() != Type::kWiFiPAF, CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorCodeIf(mState == State::kNotReady, CHIP_ERROR_INCORRECT_STATE); + DeviceLayer::ConnectivityMgr().WiFiPAFSend(std::move(msgBuf)); + + return CHIP_NO_ERROR; +} + +void WiFiPAFBase::OnWiFiPAFMessageReceived(System::PacketBufferHandle && buffer) +{ + HandleMessageReceived(Transport::PeerAddress(Transport::Type::kWiFiPAF), std::move(buffer)); + return; +} + +CHIP_ERROR WiFiPAFBase::SendAfterConnect(System::PacketBufferHandle && msg) +{ + CHIP_ERROR err = CHIP_ERROR_NO_MEMORY; + + for (size_t i = 0; i < mPendingPacketsSize; i++) + { + if (mPendingPackets[i].IsNull()) + { + mPendingPackets[i] = std::move(msg); + err = CHIP_NO_ERROR; + break; + } + } + + return err; +} + +} // namespace Transport +} // namespace chip diff --git a/src/transport/raw/WiFiPAF.h b/src/transport/raw/WiFiPAF.h new file mode 100644 index 00000000000000..bd54d22cc3e26f --- /dev/null +++ b/src/transport/raw/WiFiPAF.h @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file defines the Matter Connection object that maintains a Wi-Fi PAF connection. + * + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace chip { +namespace Transport { + +class WiFiPAFLayer +{ +public: + WiFiPAFLayer() = default; +}; +class WiFiPAFListenParameters; + +/** + * Implements a transport using Wi-Fi-PAF + */ +class DLL_EXPORT WiFiPAFBase : public Base +{ +public: + /** + * The State of the Wi-Fi-PAF connection + * + */ + enum class State + { + kNotReady = 0, /**< State before initialization. */ + kInitialized = 1, /**< State after class is connected and ready. */ + kConnected = 2, /**< Endpoint connected. */ + }; + WiFiPAFBase() = default; + WiFiPAFBase(System::PacketBufferHandle * packetBuffers, size_t packetBuffersSize) : + mPendingPackets(packetBuffers), mPendingPacketsSize(packetBuffersSize) + {} + ~WiFiPAFBase() override; + + /** + * Initialize a Wi-Fi-PAF transport + * + * @param param Wi-Fi-PAF configuration parameters for this transport + */ + CHIP_ERROR Init(const WiFiPAFListenParameters & param); + CHIP_ERROR SendMessage(const Transport::PeerAddress & address, System::PacketBufferHandle && msgBuf) override; + bool CanSendToPeer(const Transport::PeerAddress & address) override + { + return (mState != State::kNotReady) && (address.GetTransportType() == Type::kWiFiPAF); + } + void OnWiFiPAFMessageReceived(System::PacketBufferHandle && buffer); + void SetWiFiPAFState(State state) { mState = state; }; + State GetWiFiPAFState() { return mState; }; + +private: + void ClearState(); + /** + * Sends the specified message once a connection has been established. + * @param msg - what buffer to send once a connection has been established. + */ + CHIP_ERROR SendAfterConnect(System::PacketBufferHandle && msg); + State mState = State::kNotReady; + + System::PacketBufferHandle * mPendingPackets; + size_t mPendingPacketsSize; +}; + +template +class WiFiPAF : public WiFiPAFBase +{ +public: + WiFiPAF() : WiFiPAFBase(mPendingPackets, kPendingPacketSize) {} + +private: + System::PacketBufferHandle mPendingPackets[kPendingPacketSize]; +}; + +/** Defines parameters for setting up the Wi-Fi PAF transport */ +class WiFiPAFListenParameters +{ +public: + WiFiPAFListenParameters() = default; + explicit WiFiPAFListenParameters(WiFiPAFBase * layer) : mWiFiPAF(layer) {} + +private: + WiFiPAFBase * mWiFiPAF; +}; + +} // namespace Transport +} // namespace chip From 87097db6976c461ad81471a6726b1599dbec9784 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 29 Jul 2024 23:37:01 -0400 Subject: [PATCH 05/27] Add TC_ECOINFO_2_1.py test implementation (#34564) * Add TC_ECOINFO_2_1.py test implementation * Quick fix * Restyled by autopep8 * Fix lint and minor test plan update * add default_matter_test_main * Address PR comments * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- src/python_testing/TC_ECOINFO_2_1.py | 190 +++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 src/python_testing/TC_ECOINFO_2_1.py diff --git a/src/python_testing/TC_ECOINFO_2_1.py b/src/python_testing/TC_ECOINFO_2_1.py new file mode 100644 index 00000000000000..ea9ee43b7f0569 --- /dev/null +++ b/src/python_testing/TC_ECOINFO_2_1.py @@ -0,0 +1,190 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status +from chip.tlv import uint +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + + +class TC_ECOINFO_2_1(MatterBaseTest): + + def _validate_device_directory(self, is_removed_on_null, device_directory): + num_of_devices = len(device_directory) + if is_removed_on_null: + asserts.assert_less_equal(num_of_devices, 256, "Too many device entries") + for device in device_directory: + # TODO do fabric index check first + if device.deviceName is not None: + asserts.assert_true(type_matches(device.deviceName, str), "DeviceName should be a string") + asserts.assert_less_equal(len(device.deviceName), 64, "DeviceName should be <= 64") + asserts.assert_true(type_matches(device.deviceNameLastEdit, uint), "DeviceNameLastEdit should be a uint") + asserts.assert_greater(device.deviceNameLastEdit, 0, "DeviceNameLastEdit must be greater than 0") + else: + asserts.assert_true(device.deviceNameLastEdit is None, + "DeviceNameLastEdit should not be provided when there is no DeviceName") + + asserts.assert_true(type_matches(device.bridgedEndpoint, uint), "BridgedEndpoint should be a uint") + asserts.assert_greater_equal(device.bridgedEndpoint, 0, "BridgedEndpoint >= 0") + asserts.assert_less_equal(device.bridgedEndpoint, 0xffff_ffff, + "BridgedEndpoint less than or equal to Invalid Endpoint value") + + asserts.assert_true(type_matches(device.originalEndpoint, uint), "OriginalEndpoint should be a uint") + asserts.assert_greater_equal(device.originalEndpoint, 0, "OriginalEndpoint >= 0") + asserts.assert_less(device.originalEndpoint, 0xffff_ffff, + "OriginalEndpoint less than or equal to Invalid Endpoint value") + + asserts.assert_true(type_matches(device.deviceTypes, list), "DeviceTypes should be a list") + asserts.assert_greater_equal(len(device.deviceTypes), 1, "DeviceTypes list must contains at least one entry") + for device_type in device.deviceTypes: + asserts.assert_true(type_matches(device_type.deviceType, uint), "DeviceType should be a uint") + # TODO what other validation can we do here to device_type.deviceType + asserts.assert_true(type_matches(device_type.revision, uint), "device type's revision should be a uint") + asserts.assert_greater_equal(device_type.revision, 1, "device type's revision must >= 1") + + asserts.assert_true(type_matches(device.uniqueLocationIDs, list), "UniqueLocationIds should be a list") + num_of_unique_location_ids = len(device.uniqueLocationIDs) + asserts.assert_less_equal(num_of_unique_location_ids, 64, "UniqueLocationIds list should be <= 64") + for location_id in device.uniqueLocationIDs: + asserts.assert_true(type_matches(location_id, str), "UniqueLocationId should be a string") + location_id_string_length = len(location_id) + asserts.assert_greater_equal(location_id_string_length, 1, + "UniqueLocationId must contain at least one character") + asserts.assert_less_equal(location_id_string_length, 64, "UniqueLocationId should be <= 64") + + asserts.assert_true(type_matches(device.uniqueLocationIDsLastEdit, uint), + "UniqueLocationIdsLastEdit should be a uint") + if num_of_unique_location_ids: + asserts.assert_greater(device.uniqueLocationIDsLastEdit, 0, "UniqueLocationIdsLastEdit must be non-zero") + else: + asserts.assert_equal(num_of_devices, 0, "Device was removed, there should be no devices in DeviceDirectory") + + def _validate_location_directory(self, is_removed_on_null, location_directory): + num_of_locations = len(location_directory) + if is_removed_on_null: + asserts.assert_less_equal(num_of_locations, 64, "Too many location entries") + for location in location_directory: + asserts.assert_true(type_matches(location.uniqueLocationID, str), "UniqueLocationId should be a string") + location_id_string_length = len(location.uniqueLocationID) + asserts.assert_greater_equal(location_id_string_length, 1, + "UniqueLocationId must contain at least one character") + asserts.assert_less_equal(location_id_string_length, 64, "UniqueLocationId should be <= 64") + + asserts.assert_true(type_matches(location.locationDescriptor.locationName, str), + "LocationName should be a string") + asserts.assert_less_equal(len(location.locationDescriptor.locationName), 64, "LocationName should be <= 64") + + if location.locationDescriptor.floorNumber is not NullValue: + asserts.assert_true(type_matches(location.locationDescriptor.floorNumber, int), + "FloorNumber should be an int") + # TODO check in range of int16. + + if location.locationDescriptor.areaType is not NullValue: + # TODO check areaType is valid. + pass + + asserts.assert_true(type_matches(location.locationDescriptorLastEdit, uint), + "UniqueLocationIdsLastEdit should be a uint") + asserts.assert_greater(location.locationDescriptorLastEdit, 0, "LocationDescriptorLastEdit must be non-zero") + + else: + asserts.assert_equal(num_of_locations, 0, "Device was removed, there should be no location in LocationDirectory") + + def steps_TC_ECOINFO_2_1(self) -> list[TestStep]: + steps = [TestStep(1, "Identify endpoints with Ecosystem Information Cluster", is_commissioning=True), + TestStep(2, "Reading RemovedOn Attribute"), + TestStep(3, "Reading DeviceDirectory Attribute"), + TestStep(4, "Reading LocationDirectory Attribute"), + TestStep(5, "Try Writing to RemovedOn Attribute"), + TestStep(6, "Try Writing to DeviceDirectory Attribute"), + TestStep(7, "Try Writing to LocationDirectory Attribute"), + TestStep(8, "Repeating steps 2 to 7 for each endpoint identified in step 1")] + return steps + + @async_test_body + async def test_TC_ECOINFO_2_1(self): + dev_ctrl = self.default_controller + dut_node_id = self.dut_node_id + + self.print_step(0, "Commissioning, already done") + + self.step(1) + endpoint_wild_card_read = await dev_ctrl.ReadAttribute(dut_node_id, [(Clusters.EcosystemInformation.Attributes.ClusterRevision)]) + list_of_endpoints = list(endpoint_wild_card_read.keys()) + + for idx, cluster_endpoint in enumerate(list_of_endpoints): + if idx == 0: + self.step(2) + removed_on = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=cluster_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) + + is_removed_on_null = removed_on is NullValue + if not is_removed_on_null: + asserts.assert_true(type_matches(removed_on, uint)) + asserts.assert_greater(removed_on, 0, "RemovedOn must be greater than 0", "RemovedOn should be a uint") + + if idx == 0: + self.step(3) + device_directory = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=cluster_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.DeviceDirectory, + fabricFiltered=False) + + self._validate_device_directory(is_removed_on_null, device_directory) + + if idx == 0: + self.step(4) + location_directory = await self.read_single_attribute( + dev_ctrl, + dut_node_id, + endpoint=cluster_endpoint, + attribute=Clusters.EcosystemInformation.Attributes.LocationDirectory, + fabricFiltered=False) + + self._validate_location_directory(is_removed_on_null, location_directory) + + if idx == 0: + self.step(5) + result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.RemovedOn(2))]) + asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to RemovedOn Attribute") + asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") + + if idx == 0: + self.step(6) + result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.DeviceDirectory([]))]) + asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to DeviceDirectory Attribute") + asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") + + if idx == 0: + self.step(7) + result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.DeviceDirectory([]))]) + asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to LocationDirectory Attribute") + asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") + + if idx == 0: + self.step(8) + + +if __name__ == "__main__": + default_matter_test_main() From 8060d45ffa5593d68a5b3676bba1fc96472562b2 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Tue, 30 Jul 2024 00:28:18 -0400 Subject: [PATCH 06/27] Add Q quality to OperationalState CountdownTime (#34422) * Fix post-review comments on Q quality utils from #34266 - PR #34266 had post review comments See: https://github.com/project-chip/connectedhomeip/pull/34266#pullrequestreview-2173994817 - Fix 0->0 case - Introduce `Timestamp` more places where it makes sense - Simplify some code lines Fixes #34334 Testing done: - Added unit test for 0->0 - Tests still pass * Restyled by clang-format * Address review comments * Restyled by clang-format * Add Q quality to OperationalState CountdownTIme - Update operational state cluster server to report countdown time at edges. - Add a way for cluster delegate to request an update of time. Issue #34421 Testing done: - Existing tests still pass - Will add cert test when the text is finalized (week of July 22) * Restyled by clang-format * Address review comments * Address review comments * Update src/app/clusters/operational-state-server/operational-state-server.cpp * Fix several Opstate test cases * Restyled by autopep8 * Fix minor grammar typo * Restyled by autopep8 * Fix TC-OPSTATE-2.2 --------- Co-authored-by: Restyled.io --- .../operational-state-server.cpp | 70 +++++++++++++++++-- .../operational-state-server.h | 31 ++++++-- src/python_testing/TC_OpstateCommon.py | 22 +++--- 3 files changed, 104 insertions(+), 19 deletions(-) diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index b6ae0d7a221253..c86de02bfab6ae 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -29,6 +29,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -43,6 +44,9 @@ Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClus mDelegate(aDelegate), mEndpointId(aEndpointId), mClusterId(aClusterId) { mDelegate->SetInstance(this); + mCountdownTime.policy() + .Set(QuieterReportingPolicyEnum::kMarkDirtyOnIncrement) + .Set(QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero); } Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId) : Instance(aDelegate, aEndpointId, OperationalState::Id) {} @@ -84,6 +88,7 @@ CHIP_ERROR Instance::SetCurrentPhase(const DataModel::Nullable & aPhase if (mCurrentPhase != oldPhase) { MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CurrentPhase::Id); + UpdateCountdownTimeFromClusterLogic(); } return CHIP_NO_ERROR; } @@ -96,9 +101,11 @@ CHIP_ERROR Instance::SetOperationalState(uint8_t aOpState) return CHIP_ERROR_INVALID_ARGUMENT; } + bool countdownTimeUpdateNeeded = false; if (mOperationalError.errorStateID != to_underlying(ErrorStateEnum::kNoError)) { mOperationalError.Set(to_underlying(ErrorStateEnum::kNoError)); + countdownTimeUpdateNeeded = true; MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalError::Id); } @@ -107,6 +114,12 @@ CHIP_ERROR Instance::SetOperationalState(uint8_t aOpState) if (mOperationalState != oldState) { MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalState::Id); + countdownTimeUpdateNeeded = true; + } + + if (countdownTimeUpdateNeeded) + { + UpdateCountdownTimeFromClusterLogic(); } return CHIP_NO_ERROR; } @@ -143,6 +156,8 @@ void Instance::OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalError::Id); } + UpdateCountdownTimeFromClusterLogic(); + // Generate an ErrorDetected event GenericErrorEvent event(mClusterId, aError); EventNumber eventNumber; @@ -156,7 +171,7 @@ void Instance::OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type void Instance::OnOperationCompletionDetected(uint8_t aCompletionErrorCode, const Optional> & aTotalOperationalTime, - const Optional> & aPausedTime) const + const Optional> & aPausedTime) { ChipLogDetail(Zcl, "OperationalStateServer: OnOperationCompletionDetected"); @@ -169,6 +184,8 @@ void Instance::OnOperationCompletionDetected(uint8_t aCompletionErrorCode, ChipLogError(Zcl, "OperationalStateServer: Failed to record OperationCompletion event: %" CHIP_ERROR_FORMAT, error.Format()); } + + UpdateCountdownTimeFromClusterLogic(); } void Instance::ReportOperationalStateListChange() @@ -179,6 +196,43 @@ void Instance::ReportOperationalStateListChange() void Instance::ReportPhaseListChange() { MatterReportingAttributeChangeCallback(ConcreteAttributePath(mEndpointId, mClusterId, Attributes::PhaseList::Id)); + UpdateCountdownTimeFromClusterLogic(); +} + +void Instance::UpdateCountdownTime(bool fromDelegate) +{ + app::DataModel::Nullable newCountdownTime = mDelegate->GetCountdownTime(); + auto now = System::SystemClock().GetMonotonicTimestamp(); + + bool markDirty = false; + + if (fromDelegate) + { + // Updates from delegate are reduce-reported to every 10s max (choice of this implementation), in addition + // to default change-from-null, change-from-zero and increment policy. + auto predicate = [](const decltype(mCountdownTime)::SufficientChangePredicateCandidate & candidate) -> bool { + if (candidate.lastDirtyValue.IsNull() || candidate.newValue.IsNull()) + { + return false; + } + + uint32_t lastDirtyValue = candidate.lastDirtyValue.Value(); + uint32_t newValue = candidate.newValue.Value(); + uint32_t kNumSecondsDeltaToReport = 10; + return (newValue < lastDirtyValue) && ((lastDirtyValue - newValue) > kNumSecondsDeltaToReport); + }; + markDirty = (mCountdownTime.SetValue(newCountdownTime, now, predicate) == AttributeDirtyState::kMustReport); + } + else + { + auto predicate = [](const decltype(mCountdownTime)::SufficientChangePredicateCandidate &) -> bool { return true; }; + markDirty = (mCountdownTime.SetValue(newCountdownTime, now, predicate) == AttributeDirtyState::kMustReport); + } + + if (markDirty) + { + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CountdownTime::Id); + } } bool Instance::IsSupportedPhase(uint8_t aPhase) @@ -270,6 +324,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) ChipLogDetail(Zcl, "OperationalState: Entering handling derived cluster commands"); InvokeDerivedClusterCommand(handlerContext); + break; } } @@ -294,18 +349,18 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu } return err; }); + break; } - break; case OperationalState::Attributes::OperationalState::Id: { ReturnErrorOnFailure(aEncoder.Encode(GetCurrentOperationalState())); + break; } - break; case OperationalState::Attributes::OperationalError::Id: { ReturnErrorOnFailure(aEncoder.Encode(mOperationalError)); + break; } - break; case OperationalState::Attributes::PhaseList::Id: { @@ -332,18 +387,19 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu ReturnErrorOnFailure(encoder.Encode(phase2)); } }); + break; } - break; case OperationalState::Attributes::CurrentPhase::Id: { ReturnErrorOnFailure(aEncoder.Encode(GetCurrentPhase())); + break; } - break; case OperationalState::Attributes::CountdownTime::Id: { + // Read through to get value closest to reality. ReturnErrorOnFailure(aEncoder.Encode(mDelegate->GetCountdownTime())); + break; } - break; } return CHIP_NO_ERROR; } diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index c1640cb99e9ce7..56229c02541d60 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -22,6 +22,8 @@ #include #include #include +#include +#include namespace chip { namespace app { @@ -113,6 +115,12 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ void GetCurrentOperationalError(GenericOperationalError & error) const; + /** + * @brief Whenever application delegate wants to possibly report a new updated time, + * call this method. The `GetCountdownTime()` method will be called on the delegate. + */ + void UpdateCountdownTimeFromDelegate() { UpdateCountdownTime(/* fromDelegate = */ true); } + // Event triggers /** * @brief Called when the Node detects a OperationalError has been raised. @@ -129,7 +137,7 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ void OnOperationCompletionDetected(uint8_t aCompletionErrorCode, const Optional> & aTotalOperationalTime = NullOptional, - const Optional> & aPausedTime = NullOptional) const; + const Optional> & aPausedTime = NullOptional); // List change reporting /** @@ -192,6 +200,19 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ virtual void InvokeDerivedClusterCommand(HandlerContext & handlerContext) { return; }; + /** + * Causes reporting/udpating of CountdownTime attribute from driver if sufficient changes have + * occurred (based on Q quality definition for operational state). Calls the Delegate::GetCountdownTime() method. + * + * @param fromDelegate true if the change notice was triggered by the delegate, false if internal to cluster logic. + */ + void UpdateCountdownTime(bool fromDelegate); + + /** + * @brief Whenever the cluster logic thinks time should be updated, call this. + */ + void UpdateCountdownTimeFromClusterLogic() { UpdateCountdownTime(/* fromDelegate=*/false); } + private: Delegate * mDelegate; @@ -202,6 +223,7 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface app::DataModel::Nullable mCurrentPhase; uint8_t mOperationalState = 0; // assume 0 for now. GenericOperationalError mOperationalError = to_underlying(ErrorStateEnum::kNoError); + app::QuieterReportingAttribute mCountdownTime{ DataModel::NullNullable }; /** * This method is inherited from CommandHandlerInterface. @@ -262,9 +284,10 @@ class Delegate virtual ~Delegate() = default; /** - * Get the countdown time. - * NOTE: Changes to this attribute should not be reported. - * From the spec: Changes to this value SHALL NOT be reported in a subscription. + * Get the countdown time. This will get called on many edges such as + * commands to change operational state, or when the delegate deals with + * changes. Make sure it becomes null whenever it is appropriate. + * * @return The current countdown time. */ virtual app::DataModel::Nullable GetCountdownTime() = 0; diff --git a/src/python_testing/TC_OpstateCommon.py b/src/python_testing/TC_OpstateCommon.py index 648eea59f2bb3c..09dc73e3344c1f 100644 --- a/src/python_testing/TC_OpstateCommon.py +++ b/src/python_testing/TC_OpstateCommon.py @@ -354,7 +354,7 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): if phase_list is not NullValue: phase_list_len = len(phase_list) asserts.assert_less_equal(phase_list_len, 32, - f"PhaseList length({phase_list_len}) must be less than 32!") + f"PhaseList length({phase_list_len}) must be at most 32 entries!") # STEP 3: TH reads from the DUT the CurrentPhase attribute self.step(3) @@ -364,8 +364,9 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): if (phase_list == NullValue) or (not phase_list): asserts.assert_true(current_phase == NullValue, f"CurrentPhase({current_phase}) should be null") else: - asserts.assert_true(0 <= current_phase and current_phase < phase_list_len, - f"CurrentPhase({current_phase}) must be between 0 and {(phase_list_len - 1)}") + asserts.assert_greater_equal(current_phase, 0, f"CurrentPhase({current_phase}) must be >= 0") + asserts.assert_less(current_phase, phase_list_len, + f"CurrentPhase({current_phase}) must be less than {phase_list_len}") # STEP 4: TH reads from the DUT the CountdownTime attribute self.step(4) @@ -652,7 +653,7 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): if phase_list is not NullValue: phase_list_len = len(phase_list) asserts.assert_less_equal(phase_list_len, 32, - f"PhaseList length({phase_list_len}) must be less than 32!") + f"PhaseList length({phase_list_len}) must be at most 32 entries!") # STEP 9: TH reads from the DUT the CurrentPhase attribute self.step(9) @@ -662,10 +663,10 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): if (phase_list == NullValue) or (not phase_list): asserts.assert_equal(current_phase, NullValue, f"CurrentPhase({current_phase}) should be null") else: - asserts.assert_less_equal(0, current_phase, - f"CurrentPhase({current_phase}) must be greater or equal than 0") - asserts.assert_less(current_phase < phase_list_len, - f"CurrentPhase({current_phase}) must be less then {(phase_list_len - 1)}") + asserts.assert_greater_equal(current_phase, 0, + f"CurrentPhase({current_phase}) must be greater or equal to 0") + asserts.assert_less(current_phase, phase_list_len, + f"CurrentPhase({current_phase}) must be less than {(phase_list_len)}") # STEP 10: TH waits for {PIXIT.WAITTIME.COUNTDOWN} self.step(10) @@ -679,6 +680,8 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): attribute=attributes.CountdownTime) if (countdown_time is not NullValue) and (initial_countdown_time is not NullValue): + logging.info(f" -> Initial countdown time: {initial_countdown_time}") + logging.info(f" -> New countdown time: {countdown_time}") asserts.assert_less_equal(countdown_time, (initial_countdown_time - wait_time), f"The countdown time shall have decreased at least {wait_time:.1f} since start command") @@ -821,6 +824,7 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): initial_countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) if initial_countdown_time is not NullValue: + logging.info(f" -> Initial ountdown time: {initial_countdown_time}") asserts.assert_true(0 <= initial_countdown_time <= 259200, f"CountdownTime({initial_countdown_time}) must be between 0 and 259200") @@ -835,6 +839,8 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): attribute=attributes.CountdownTime) if (countdown_time is not NullValue) and (initial_countdown_time is not NullValue): + logging.info(f" -> Initial countdown time: {initial_countdown_time}") + logging.info(f" -> New countdown time: {countdown_time}") asserts.assert_equal(countdown_time, initial_countdown_time, "The countdown time shall be equal since pause command") From 1baf55d16481b08ce99db553f9ac391562f6a266 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 30 Jul 2024 01:19:46 -0400 Subject: [PATCH 07/27] TC-CCTRL-2.2: Test + Mocks (#34568) * TC-CCTRL-3.1: Mock'd version * implement more of the test. * the rest, I think. * use right name * minor updates to latest testplan spec * rename files with suffix 2_2 * Restyled by autopep8 * Restyled by isort * linter * linter --------- Co-authored-by: Terence Hampson Co-authored-by: Restyled.io --- .../python/chip/clusters/__init__.py | 32 +- src/python_testing/TC_CCTRL_2_2.py | 300 ++++++++++++++++++ .../test_testing/MockTestRunner.py | 6 +- .../test_testing/test_TC_CCNTL_2_2.py | 164 ++++++++++ 4 files changed, 485 insertions(+), 17 deletions(-) create mode 100644 src/python_testing/TC_CCTRL_2_2.py create mode 100644 src/python_testing/test_testing/test_TC_CCNTL_2_2.py diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 11b6f6e02bcf30..779b8c6fe5a4bb 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -27,20 +27,20 @@ ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, - ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagement, - DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, EcosystemInformation, - ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, - EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, - FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, - HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls, - LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput, - MediaPlayback, MicrowaveOvenControl, MicrowaveOvenMode, ModeSelect, NetworkCommissioning, - NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffSwitchConfiguration, - OperationalCredentials, OperationalState, OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, - OvenCavityOperationalState, OvenMode, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, - Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, - PowerTopology, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, - PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, + CommissionerControl, ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, + DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, + EcosystemInformation, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, + EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, + FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, + GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, + KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode, LevelControl, + LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, MicrowaveOvenControl, MicrowaveOvenMode, + ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, + OnOffSwitchConfiguration, OperationalCredentials, OperationalState, OtaSoftwareUpdateProvider, + OtaSoftwareUpdateRequestor, OvenCavityOperationalState, OvenMode, OzoneConcentrationMeasurement, + Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, + PowerSourceConfiguration, PowerTopology, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, + PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode, RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration, @@ -52,8 +52,8 @@ __all__ = [Attribute, CHIPClusters, Command, AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, - CarbonMonoxideConcentrationMeasurement, Channel, - ColorControl, ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, + CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, CommissionerControl, + ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, EcosystemInformation, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py new file mode 100644 index 00000000000000..a4314e24ddf36a --- /dev/null +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -0,0 +1,300 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# TODO: Skip CI for now, we don't have any way to run this. Needs setup. See test_TC_CCTRL.py + +import ipaddress +import logging +import os +import pathlib +import random +import signal +import subprocess +import time +import uuid + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, + per_endpoint_test) +from mobly import asserts + + +class TC_CCTRL_2_2(MatterBaseTest): + + @async_test_body + async def setup_class(self): + super().setup_class() + # TODO: This needs to come from an arg and needs to be something available on the TH + # TODO: confirm whether we can open processes like this on the TH + app = os.path.join(pathlib.Path(__file__).resolve().parent, '..', '..', 'out', + 'linux-x64-all-clusters-no-ble', 'chip-all-clusters-app') + + self.kvs = f'kvs_{str(uuid.uuid4())}' + self.port = 5543 + discriminator = random.randint(0, 4095) + discriminator = 3840 + passcode = 20202021 + app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}' + cmd = f'{app} {app_args}' + # TODO: Determine if we want these logs cooked or pushed to somewhere else + logging.info("Starting TH_SERVER") + self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True) + logging.info("TH_SERVER started") + time.sleep(3) + + logging.info("Commissioning from separate fabric") + + # Create a second controller on a new fabric to communicate to the server + new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) + paa_path = str(self.matter_test_config.paa_trust_store_path) + self.TH_server_controller = new_fabric_admin.NewController(nodeId=112233, paaTrustStorePath=paa_path) + self.server_nodeid = 1111 + await self.TH_server_controller.CommissionOnNetwork(nodeId=self.server_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + logging.info("Commissioning TH_SERVER complete") + + def teardown_class(self): + logging.warning("Stopping app with SIGTERM") + self.app_process.send_signal(signal.SIGTERM.value) + self.app_process.wait() + # TODO: Use timeout, if term doesn't work, try SIGINT + + os.remove(self.kvs) + super().teardown_class() + + def steps_TC_CCTRL_2_2(self) -> list[TestStep]: + steps = [TestStep(1, "Get number of fabrics from TH_SERVER", is_commissioning=True), + TestStep(2, "Reading Attribute VendorId from TH_SERVER"), + TestStep(3, "Reading Attribute ProductId from TH_SERVER"), + TestStep(4, "Reading Event CommissioningRequestResult from DUT"), + TestStep(5, "Send CommissionNode command to DUT with CASE session"), + TestStep(6, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster to DUT with CASE session"), + TestStep(7, "Send CommissionNode command to DUT with PASE session"), + TestStep(8, "Send RequestCommissioningApproval command to DUT with PASE session"), + TestStep(9, "Send RevokeCommissioning command on Administrator Commissioning Cluster to DUT with CASE session"), + TestStep(10, "Reading Event CommissioningRequestResult from DUT, confirm no new events"), + TestStep(11, "Send RequestCommissioningApproval command to DUT with CASE session with incorrect vendorID"), + TestStep(12, "(Manual Step) Approve Commissioning Approval Request on DUT using method indicated by the manufacturer"), + TestStep(13, "Reading Event CommissioningRequestResult from DUT, confirm one new event"), + TestStep(14, "Send CommissionNode command to DUT with CASE session, with invalid RequestId"), + TestStep(15, "Send CommissionNode command to DUT with CASE session, with invalid ResponseTimeoutSeconds too low"), + TestStep(16, "Send CommissionNode command to DUT with CASE session, with invalid ResponseTimeoutSeconds too high"), + TestStep(17, "Send CommissionNode command to DUT with CASE session, with valid parameters"), + TestStep(18, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster sent to TH_SERVER"), + TestStep(19, "Wait for DUT to fail commissioning TH_SERVER, 30 seconds"), + TestStep(20, "Get number of fabrics from TH_SERVER"), + TestStep(21, "Send RevokeCommissioning command on Administrator Commissioning Cluster sent to TH_SERVER"), + TestStep(22, "Send RequestCommissioningApproval command to DUT with CASE session with correct vendorID"), + TestStep(23, "(Manual Step) Approve Commissioning Approval Request on DUT using method indicated by the manufacturer"), + TestStep(24, "Reading Event CommissioningRequestResult from DUT, confirm one new event"), + TestStep(25, "Send CommissionNode command to DUT with CASE session, with valid parameters"), + TestStep(26, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster sent to TH_SERVER"), + TestStep(27, "Wait for DUT to successfully commission TH_SERVER, 30 seconds"), + TestStep(28, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER")] + + return steps + + @per_endpoint_test(has_cluster(Clusters.CommissionerControl)) + async def test_TC_CCTRL_2_2(self): + self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + self.step(1) + th_server_fabrics = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + self.step(2) + th_server_vid = await self.read_single_attribute_check_success(cluster=Clusters.BasicInformation, attribute=Clusters.BasicInformation.Attributes.VendorID, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + self.step(3) + th_server_pid = await self.read_single_attribute_check_success(cluster=Clusters.BasicInformation, attribute=Clusters.BasicInformation.Attributes.ProductID, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + + self.step(4) + event_path = [(self.matter_test_config.endpoint, Clusters.CommissionerControl.Events.CommissioningRequestResult, 1)] + events = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path) + + self.step(5) + ipaddr = ipaddress.IPv6Address('::1') + cmd = Clusters.CommissionerControl.Commands.CommissionNode( + requestId=1, responseTimeoutSeconds=30, ipAddress=ipaddr.packed, port=self.port) + try: + await self.send_single_cmd(cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(6) + params = await self.openCommissioningWindow(dev_ctrl=self.default_controller, node_id=self.dut_node_id) + self.step(7) + pase_nodeid = self.dut_node_id + 1 + await self.default_controller.FindOrEstablishPASESession(setupCode=params.commissioningParameters.setupQRCode, nodeid=pase_nodeid) + try: + await self.send_single_cmd(cmd=cmd, node_id=pase_nodeid) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, "Incorrect error returned") + + self.step(8) + good_request_id = 0x1234567887654321 + cmd = Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=good_request_id, vendorId=th_server_vid, productId=th_server_pid) + try: + await self.send_single_cmd(cmd=cmd, node_id=pase_nodeid) + asserts.fail("Unexpected success on RequestCommissioningApproval over PASE") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, "Incorrect error returned") + + self.step(9) + cmd = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() + # If no exception is raised, this is success + await self.send_single_cmd(cmd) + + self.step(10) + if not events: + new_event = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path) + else: + event_nums = [e.Header.EventNumber for e in events] + new_event = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path, eventNumberFilter=max(event_nums)+1) + asserts.assert_equal(new_event, [], "Unexpected event") + + self.step(11) + # There should be nothing on the TH that uses VID 0x6006 as this is a real vendor ID. + not_th_server_vid = 0x6006 + asserts.assert_not_equal(not_th_server_vid, th_server_vid, "Test implementation assumption incorrect") + cmd = Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=good_request_id, vendorId=not_th_server_vid, productId=th_server_pid) + # If no exception is raised, this is success + await self.send_single_cmd(cmd) + + self.step(12) + if not self.is_ci: + self.wait_for_use_input("Approve Commissioning approval request using manufacturer specified mechanism") + + self.step(13) + if not events: + new_event = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path) + else: + event_nums = [e.Header.EventNumber for e in events] + new_event = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path, eventNumberFilter=max(event_nums)+1) + asserts.assert_equal(len(new_event), 1, "Unexpected event list len") + asserts.assert_equal(new_event[0].Data.statusCode, 0, "Unexpected status code") + asserts.assert_equal(new_event[0].Data.clientNodeId, + self.matter_test_config.controller_node_id, "Unexpected client node id") + asserts.assert_equal(new_event[0].Data.requestId, good_request_id, "Unexpected request ID") + + self.step(14) + bad_request_id = 0x1234567887654322 + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=bad_request_id, responseTimeoutSeconds=30) + try: + await self.send_single_cmd(cmd=cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(15) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=29) + try: + await self.send_single_cmd(cmd=cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(16) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=121) + try: + await self.send_single_cmd(cmd=cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(17) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=30) + resp: Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow = await self.send_single_cmd(cmd) + asserts.assert_equal(type(resp), Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow, + "Incorrect response type") + + self.step(18) + # min commissioning timeout is 3*60 seconds, so use that even though the command said 30. + cmd = Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow(commissioningTimeout=3*60, + PAKEPasscodeVerifier=resp.PAKEPasscodeVerifier, + discriminator=resp.discriminator, + iterations=resp.iterations, salt=resp.salt) + await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) + + self.step(19) + logging.info("Test now waits for 30 seconds") + if not self.is_ci: + time.sleep(30) + + self.step(20) + print(f'server node id {self.server_nodeid}') + th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + asserts.assert_equal(len(th_server_fabrics), len(th_server_fabrics_new), "Unexpected number of fabrics on TH_SERVER") + + self.step(21) + cmd = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() + await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, timedRequestTimeoutMs=5000, endpoint=0) + + self.step(22) + good_request_id = 0x1234567812345678 + cmd = Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=good_request_id, vendorId=th_server_vid, productId=th_server_pid, label="Test Ecosystem") + await self.send_single_cmd(cmd) + + self.step(23) + if not self.is_ci: + self.wait_for_use_input("Approve Commissioning approval request using manufacturer specified mechanism") + + self.step(24) + events = new_event + event_nums = [e.Header.EventNumber for e in events] + new_event = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path, eventNumberFilter=max(event_nums)+1) + asserts.assert_equal(len(new_event), 1, "Unexpected event list len") + asserts.assert_equal(new_event[0].Data.statusCode, 0, "Unexpected status code") + asserts.assert_equal(new_event[0].Data.clientNodeId, + self.matter_test_config.controller_node_id, "Unexpected client node id") + asserts.assert_equal(new_event[0].Data.requestId, good_request_id, "Unexpected request ID") + + self.step(25) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=30) + resp = await self.send_single_cmd(cmd) + asserts.assert_equal(type(resp), Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow, + "Incorrect response type") + + self.step(26) + # min commissioning timeout is 3*60 seconds, so use that even though the command said 30. + cmd = Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow(commissioningTimeout=3*60, + PAKEPasscodeVerifier=resp.PAKEPasscodeVerifier, + discriminator=resp.discriminator, + iterations=resp.iterations, salt=resp.salt) + await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) + + self.step(27) + if not self.is_ci: + time.sleep(30) + + self.step(28) + th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + # TODO: this should be mocked too. + if not self.is_ci: + asserts.assert_equal(len(th_server_fabrics) + 1, len(th_server_fabrics_new), + "Unexpected number of fabrics on TH_SERVER") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/test_testing/MockTestRunner.py b/src/python_testing/test_testing/MockTestRunner.py index c8febc93381fdc..024228db7cd035 100644 --- a/src/python_testing/test_testing/MockTestRunner.py +++ b/src/python_testing/test_testing/MockTestRunner.py @@ -38,10 +38,12 @@ async def __call__(self, *args, **kwargs): class MockTestRunner(): - def __init__(self, filename: str, classname: str, test: str, endpoint: int = 0, pics: dict[str, bool] = None): + def __init__(self, filename: str, classname: str, test: str, endpoint: int = 0, pics: dict[str, bool] = None, paa_trust_store_path=None): self.test = test self.endpoint = endpoint self.pics = pics + self.kvs_storage = 'kvs_admin.json' + self.paa_path = paa_trust_store_path self.set_test(filename, classname, test) self.stack = MatterStackState(self.config) self.default_controller = self.stack.certificate_authorities[0].adminList[0].NewController( @@ -60,6 +62,8 @@ def set_test_config(self, test_config: MatterTestConfig = MatterTestConfig()): self.config = test_config self.config.tests = [self.test] self.config.endpoint = self.endpoint + self.config.storage_path = self.kvs_storage + self.config.paa_trust_store_path = self.paa_path if not self.config.dut_node_ids: self.config.dut_node_ids = [1] if self.pics: diff --git a/src/python_testing/test_testing/test_TC_CCNTL_2_2.py b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py new file mode 100644 index 00000000000000..3fa2481e9fa4c3 --- /dev/null +++ b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py @@ -0,0 +1,164 @@ +#!/usr/bin/env -S python3 -B +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import base64 +import os +import pathlib +import sys +import typing + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.clusters import Attribute +from chip.interaction_model import InteractionModelError, Status +from MockTestRunner import AsyncMock, MockTestRunner + +try: + from matter_testing_support import get_default_paa_trust_store, run_tests_no_exit +except ImportError: + sys.path.append(os.path.abspath( + os.path.join(os.path.dirname(__file__), '..'))) + from matter_testing_support import get_default_paa_trust_store, run_tests_no_exit + +invoke_call_count = 0 +event_call_count = 0 + + +def dynamic_invoke_return(*args, **argv): + global invoke_call_count + invoke_call_count += 1 + + # passcode 20202024 + reverse_open = Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow(commissioningTimeout=30, + PAKEPasscodeVerifier=b"+w1qZQR05Zn0bc2LDyNaDAhsrhDS5iRHPTN10+EmNx8E2OpIPC4SjWRDQVOgqcbnXdYMlpiZ168xLBqn1fx9659gGK/7f9Yc6GxpoJH8kwAUYAYyLGsYeEBt1kL6kpXjgA==", + discriminator=2222, iterations=10000, salt=base64.b64encode(bytes('SaltyMcSalterson', 'utf-8'))) + + print(f'invoke call {invoke_call_count}') + if invoke_call_count == 1: # Commission node with no prior request, return failure - step 5 + raise InteractionModelError(status=Status.Failure) + elif invoke_call_count == 2: # Commission node over pase - return unsupported access - step 7 + raise InteractionModelError(status=Status.UnsupportedAccess) + elif invoke_call_count == 3: # request commissioning approval over pase - return unsupported access - step 8 + raise InteractionModelError(status=Status.UnsupportedAccess) + elif invoke_call_count == 4: # good RevokeCommissioning over CASE with bad vid - step 9 + return None + elif invoke_call_count == 5: # good RequestCommissioningApproval over CASE with bad vid - step 10 + return None + elif invoke_call_count == 6: # CommissionNode with bad request id - step 14 + raise InteractionModelError(status=Status.Failure) + elif invoke_call_count == 7: # CommissionNode with bad timeout (low) - step 15 + raise InteractionModelError(status=Status.Failure) + elif invoke_call_count == 8: # CommissionNode with bad timeout (high) - step 16 + raise InteractionModelError(status=Status.Failure) + elif invoke_call_count == 9: # CommissionNode - step 17 + # passcode 20202024 + return reverse_open + elif invoke_call_count == 10: # RequestCommissioningApproval with good vid - step 22 + return None + elif invoke_call_count == 11: # CommissionNode - step 25 + # passcode 20202024 + return reverse_open + else: + raise InteractionModelError(Status.Failure) + + +def dynamic_event_return(*args, **argv): + global event_call_count + event_call_count += 1 + + if event_call_count == 1: # reading events, start empty - no events + return [] + elif event_call_count == 2: # read event with filter - expect empty + return [] + elif event_call_count == 3: # returned event + header = Attribute.EventHeader(EndpointId=0, ClusterId=Clusters.CommissionerControl.id, + EventId=Clusters.CommissionerControl.Events.CommissioningRequestResult.event_id, EventNumber=1) + data = Clusters.CommissionerControl.Events.CommissioningRequestResult( + requestId=0x1234567887654321, clientNodeId=112233, statusCode=0) + result = Attribute.EventReadResult(Header=header, Status=Status.Success, Data=data) + return [result] + elif event_call_count == 4: # returned event with new request + header = Attribute.EventHeader(EndpointId=0, ClusterId=Clusters.CommissionerControl.id, + EventId=Clusters.CommissionerControl.Events.CommissioningRequestResult.event_id, EventNumber=1) + data = Clusters.CommissionerControl.Events.CommissioningRequestResult( + requestId=0x1234567812345678, clientNodeId=112233, statusCode=0) + result = Attribute.EventReadResult(Header=header, Status=Status.Success, Data=data) + return [result] + else: + raise InteractionModelError(Status.Failure) + + +def wildcard() -> Attribute.AsyncReadTransaction.ReadResponse: + cc = Clusters.CommissionerControl + ei = Clusters.EcosystemInformation + desc = Clusters.Descriptor + bdbi = Clusters.BridgedDeviceBasicInformation + + # EP1 is aggregator device type with a commissioner control cluster + # children - EP2 type bridged node endpoint, ecosystem information, bridged device basic information. Should also have and admin commissioning, but I don't need it for this test. + desc_ep1 = {desc.Attributes.PartsList: [2], desc.Attributes.ServerList: [ + cc.id], desc.Attributes.DeviceTypeList: [desc.Structs.DeviceTypeStruct(deviceType=0x000E, revision=2)]} + desc_ep2 = {desc.Attributes.ServerList: [bdbi.id, ei.id], desc.Attributes.DeviceTypeList: [ + desc.Structs.DeviceTypeStruct(deviceType=0x0013, revision=3)]} + + # I'm not filling anything in here, because I don't care. I just care that the cluster exists. + ei_attrs = {ei.Attributes.AttributeList: [ei.Attributes.DeviceDirectory.attribute_id, + ei.Attributes.LocationDirectory.attribute_id], ei.Attributes.DeviceDirectory: [], ei.Attributes.LocationDirectory: []} + + # This cluster just needs to exist, so I'm just going to throw on the mandatory items for now. + bdbi_attrs = {bdbi.Attributes.AttributeList: [bdbi.Attributes.Reachable.attribute_id, + bdbi.Attributes.UniqueID.attribute_id], bdbi.Attributes.Reachable: True, bdbi.Attributes.UniqueID: 'something'} + + cc_attrs = {cc.Attributes.AttributeList: [cc.Attributes.SupportedDeviceCategories], cc.Attributes.AcceptedCommandList: [cc.Commands.RequestCommissioningApproval, cc.Commands.CommissionNode], + cc.Attributes.GeneratedCommandList: [cc.Commands.RequestCommissioningApproval], cc.Attributes.SupportedDeviceCategories: 1} + + resp = Attribute.AsyncReadTransaction.ReadResponse({}, [], {}) + resp.attributes = {1: {desc: desc_ep1, cc: cc_attrs}, 2: {desc: desc_ep2, ei: ei_attrs, bdbi: bdbi_attrs}} + return resp + + +class MyMock(MockTestRunner): + # TODO consolidate with above + def run_test_with_mock(self, dynamic_invoke_return: typing.Callable, dynamic_event_return: typing.Callable, read_cache: Attribute.AsyncReadTransaction.ReadResponse, hooks=None): + ''' Effects is a list of callable functions with *args, **kwargs parameters. It can either throw an InteractionModelException or return the command response.''' + self.default_controller.Read = AsyncMock(return_value=read_cache) + self.default_controller.SendCommand = AsyncMock(return_value=None, side_effect=dynamic_invoke_return) + # It doesn't actually matter what we return here because I'm going to catch the next pase session connection anyway + params = ChipDeviceCtrl.CommissioningParameters(setupPinCode=0, setupManualCode='', setupQRCode='') + self.default_controller.OpenCommissioningWindow = AsyncMock(return_value=params) + self.default_controller.FindOrEstablishPASESession = AsyncMock(return_value=None) + self.default_controller.ReadEvent = AsyncMock(return_value=[], side_effect=dynamic_event_return) + + return run_tests_no_exit(self.test_class, self.config, hooks, self.default_controller, self.stack) + + +def main(): + root = os.path.abspath(os.path.join(pathlib.Path(__file__).resolve().parent, '..', '..', '..')) + print(f'root = {root}') + paa_path = get_default_paa_trust_store(root) + print(f'paa = {paa_path}') + + pics = {"PICS_SDK_CI_ONLY": True} + test_runner = MyMock('TC_CCTRL_2_2', 'TC_CCTRL_2_2', 'test_TC_CCTRL_2_2', 1, paa_trust_store_path=paa_path, pics=pics) + + test_runner.run_test_with_mock(dynamic_invoke_return, dynamic_event_return, wildcard()) + test_runner.Shutdown() + + +if __name__ == "__main__": + sys.exit(main()) From 29b055aadcc0be5402df4d2cc950a140836073f1 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 30 Jul 2024 01:45:38 -0400 Subject: [PATCH 08/27] TC-LVL-2.3: Add (#34610) * TC-LVL-2.3: Add * add to tests.yaml * linter --- .github/workflows/tests.yaml | 1 + src/python_testing/TC_LVL_2_3.py | 186 +++++++++++++++++++ src/python_testing/matter_testing_support.py | 14 +- 3 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 src/python_testing/TC_LVL_2_3.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ccc4e460d88984..2681222648c394 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -598,6 +598,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCOPSTATE_2_4.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SC_7_1.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SWTCH.py' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_LVL_2_3.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TCP_Tests.py' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestConformanceSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' diff --git a/src/python_testing/TC_LVL_2_3.py b/src/python_testing/TC_LVL_2_3.py new file mode 100644 index 00000000000000..57fbe2b7edc367 --- /dev/null +++ b/src/python_testing/TC_LVL_2_3.py @@ -0,0 +1,186 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import logging +import time + +import chip.clusters as Clusters +import test_plan_support +from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, + has_cluster, per_endpoint_test) +from mobly import asserts + + +class TC_LVL_2_3(MatterBaseTest): + + def steps_TC_LVL_2_3(self) -> list[TestStep]: + THRead = "TH reads" + THcommand = "TH sends the command" + return [TestStep(1, test_plan_support.commission_if_required(), is_commissioning=True), + TestStep(2, f"{THRead} FeatureMap attribute."), + TestStep(3, f"{THRead} MaxLevel attribute and store value as maxLevel", test_plan_support.verify_success()), + TestStep(4, f"{THcommand} MoveWithOnOff with MoveMode field set to Down and remaining fields set to 0", + test_plan_support.verify_success()), + TestStep(5, f"{THRead} CurrentLevel attribute and store value as startCurrentLevel", + test_plan_support.verify_success()), + TestStep(6, "Set up a subscription wildcard subscription for the Level Control Cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 30 and KeepSubscriptions set to false", + "Subscription successfully established"), + TestStep(7, f"{THcommand} MoveToLevel with Level field set to maxLevel, TransitionTime field set to 10 and remaining fields set to 0", + test_plan_support.verify_success()), + TestStep(8, "TH stores the reported values of CurrentLevel in all incoming reports for CurrentLevel attribute, that contains data in reportedCurrentLevelValuesList, over a period of 30 seconds."), + TestStep(9, "TH verifies that reportedCurrentLevelValuesList does not contain more than 10 entries for CurrentLevel", + "reportedCurrentLevelValuesList has 10 or less entries in the list"), + TestStep(10, "If reportedCurrentLevelValuesList only contain a single entry, TH verifies the value of the entry is equal to maxLevel", + "The entry in reportedCurrentLevelValuesList is equal to maxLevel"), + TestStep(11, "If reportedCurrentLevelValuesList contains two or more entries, TH verifies the value of the first entry is larger than startCurrentLevel", + "The first entry in reportedCurrentLevelValuesList is equal to or larger than to startCurrentLevel"), + TestStep(12, "If reportedCurrentLevelValuesList contains two or more entries, TH verifies the value of the last entry is equal to maxLevel", + "The last entry in reportedCurrentLevelValuesList is equal to maxLevel"), + TestStep(13, "If the LT feature is not supported, skip remaining steps and end test case"), + # 14 is missing in the test plan + TestStep(15, "TH stores the reported values of RemainingTime in all incoming reports for RemainingTime attribute, that contains data in reportedRemainingTimeValuesList."), + TestStep(16, f" {THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 10 and remaining fields set to 0", + test_plan_support.verify_success()), + TestStep(17, "Wait for 5 seconds"), + TestStep(18, f"{THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 15 and remaining fields set to 0", + test_plan_support.verify_success()), + TestStep(19, "Wait for 20 seconds"), + TestStep(20, "TH verifies reportedRemainingTimeValuesList contains three entries", + "reportedRemainingTimeValuesList has 3 entries in the list"), + TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is 10", + "The first entry in reportedRemainingTimeValuesList is equal to 10"), + TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is 15", + "The second entry in reportedRemainingTimeValuesList is equal to 15"), + TestStep(23, "TH verifies the third entry in reportedRemainingTimeValuesList is 0", + "The third entry in reportedRemainingTimeValuesList is equal to 0") + ] + + @per_endpoint_test(has_cluster(Clusters.LevelControl)) + async def test_TC_LVL_2_3(self): + # Commissioning - already done + self.step(1) + + lvl = Clusters.LevelControl + + self.step(2) + feature_map = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.FeatureMap) + + self.step(3) + max_level = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.MaxLevel) + + self.step(4) + cmd = Clusters.LevelControl.Commands.MoveWithOnOff(moveMode=lvl.Enums.MoveModeEnum.kDown) + await self.send_single_cmd(cmd) + # NOTE: added this sleep to let the DUT have some time to move + logging.info("Test waits for 5 seconds") + time.sleep(5) + + self.step(5) + start_current_level = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.CurrentLevel) + + self.step(6) + sub_handler = ClusterAttributeChangeAccumulator(lvl) + await sub_handler.start(self.default_controller, self.dut_node_id, self.matter_test_config.endpoint) + + self.step(7) + # NOTE: had to use the WithOnOff version of this command because the dut is off at this point thanks to the above command + # TODO: Need to check above and here that the on/off cluster is actually implemented. + cmd = lvl.Commands.MoveToLevelWithOnOff(level=max_level, transitionTime=100, optionsMask=0, optionsOverride=0) + await self.send_single_cmd(cmd) + + self.step(8) + logging.info('Test will now collect data for 30 seconds') + time.sleep(30) + + self.step(9) + count = sub_handler.attribute_report_counts[lvl.Attributes.CurrentLevel] + asserts.assert_less_equal(count, 10, "Received more than 10 reports for CurrentLevel") + asserts.assert_greater(count, 0, "Did not receive any reports for CurrentLevel") + + self.step(10) + if count == 1: + entry = sub_handler.attribute_reports[lvl.Attributes.CurrentLevel][-1] + asserts.assert_equal(entry.value, max_level, "Entry is not equal to max level") + + if count > 1: + self.step(11) + last_value = start_current_level + for e in sub_handler.attribute_reports[lvl.Attributes.CurrentLevel]: + asserts.assert_greater_equal(e.value, last_value, "Values are not increasing") + + self.step(12) + asserts.assert_equal(e.value, max_level, "Last entry is not max value") + else: + self.skip_step(11) + self.skip_step(12) + + self.step(13) + if (lvl.Bitmaps.Feature.kLighting & feature_map) == 0: + self.skip_all_remaining_steps(15) + + self.step(15) + # reports are stored by the handler, so just reset so we get a clean look + sub_handler.reset() + + self.step(16) + cmd = Clusters.LevelControl.Commands.MoveToLevel( + level=start_current_level, transitionTime=100, optionsMask=0, optionsOverride=0) + await self.send_single_cmd(cmd) + + self.step(17) + logging.info("Test waits for 5 seconds") + time.sleep(5) + + self.step(18) + cmd = Clusters.LevelControl.Commands.MoveToLevel( + level=start_current_level, transitionTime=150, optionsMask=0, optionsOverride=0) + await self.send_single_cmd(cmd) + + self.step(19) + logging.info("Test waits for 20 seconds") + time.sleep(20) + + self.step(20) + count = sub_handler.attribute_report_counts[lvl.Attributes.RemainingTime] + asserts.assert_equal(count, 3, "Unexpected number of remaining time reports") + + self.step(21) + remaining_time = sub_handler.attribute_reports[lvl.Attributes.RemainingTime] + logging.info(f'Reamining time reports: {remaining_time}') + asserts.assert_equal(remaining_time[0].value, 100, "Unexpected first RemainingTime report") + + self.step(22) + asserts.assert_almost_equal(remaining_time[1].value, 150, delta=10, msg="Unexpected second RemainingTime report") + + self.step(23) + asserts.assert_equal(remaining_time[2].value, 0, "Unexpected last RemainingTime report") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 812713f243c953..7149b13106069b 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -327,14 +327,19 @@ class AttributeValue: class ClusterAttributeChangeAccumulator: def __init__(self, expected_cluster: ClusterObjects.Cluster): - self._q = queue.Queue() self._expected_cluster = expected_cluster self._subscription = None + self.reset() + + def reset(self): self._attribute_report_counts = {} - attrs = [cls for name, cls in inspect.getmembers(expected_cluster.Attributes) if inspect.isclass( + attrs = [cls for name, cls in inspect.getmembers(self._expected_cluster.Attributes) if inspect.isclass( cls) and issubclass(cls, ClusterObjects.ClusterAttributeDescriptor)] + self._attribute_reports = {} for a in attrs: self._attribute_report_counts[a] = 0 + self._attribute_reports[a] = [] + self._q = queue.Queue() async def start(self, dev_ctrl, node_id: int, endpoint: int, fabric_filtered: bool = False, min_interval_sec: int = 0, max_interval_sec: int = 5) -> Any: """This starts a subscription for attributes on the specified node_id and endpoint. The cluster is specified when the class instance is created.""" @@ -358,6 +363,7 @@ def __call__(self, path: TypedAttributePath, transaction: SubscriptionTransactio logging.info(f"Got subscription report for {path.AttributeType}: {data}") self._q.put(value) self._attribute_report_counts[path.AttributeType] += 1 + self._attribute_reports[path.AttributeType].append(value) @property def attribute_queue(self) -> queue.Queue: @@ -367,6 +373,10 @@ def attribute_queue(self) -> queue.Queue: def attribute_report_counts(self) -> dict[ClusterObjects.ClusterAttributeDescriptor, int]: return self._attribute_report_counts + @property + def attribute_reports(self) -> dict[ClusterObjects.ClusterAttributeDescriptor, AttributeValue]: + return self._attribute_reports + class InternalTestRunnerHooks(TestRunnerHooks): From 7153cbdf91bc369357f2618f581eed6901d263f7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 30 Jul 2024 07:59:46 -0400 Subject: [PATCH 09/27] Add support for global structs/enums/bitmaps to YAML test harness. (#34616) --- .../matter_yamltests/definitions.py | 23 +++++++++++- .../test_spec_definitions.py | 36 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/scripts/py_matter_yamltests/matter_yamltests/definitions.py b/scripts/py_matter_yamltests/matter_yamltests/definitions.py index 1e4b3635200bb8..bc77e913dd4cbc 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/definitions.py +++ b/scripts/py_matter_yamltests/matter_yamltests/definitions.py @@ -88,6 +88,10 @@ def __init__(self, sources: List[ParseSource]): self.__responses_by_id[code][struct.code] = struct self.__responses_by_name[name][struct.name] = struct.code + self.__global_bitmaps: dict[str, Bitmap] = {b.name: b for b in idl.global_bitmaps} + self.__global_enums: dict[str, Bitmap] = {e.name: e for e in idl.global_enums} + self.__global_structs: dict[str, Bitmap] = {s.name: s for s in idl.global_structs} + def get_cluster_names(self) -> List[str]: return [name for name, _ in self.__clusters_by_name.items()] @@ -257,9 +261,26 @@ def __get_targets_by_cluster_name(self, cluster_name: str, target_type: _ItemTyp _ItemType.Struct: self.__structs_by_name, } + global_target_mapping = { + _ItemType.Request: None, + _ItemType.Response: None, + _ItemType.Attribute: None, + _ItemType.Event: None, + _ItemType.Bitmap: self.__global_bitmaps, + _ItemType.Enum: self.__global_enums, + _ItemType.Struct: self.__global_structs, + } + # The idl parser remove spaces cluster_name = cluster_name.replace(' ', '') - return target_mapping[target_type].get(cluster_name) + global_target = global_target_mapping[target_type] + target = target_mapping[target_type].get(cluster_name) + + if target is None: + return global_target + if global_target is None: + return target + return target | global_target def SpecDefinitionsFromPaths(paths: str, pseudo_clusters: Optional[PseudoClusters] = PseudoClusters([])): diff --git a/scripts/py_matter_yamltests/test_spec_definitions.py b/scripts/py_matter_yamltests/test_spec_definitions.py index a1cce4833ac075..4dd776bf520bcb 100644 --- a/scripts/py_matter_yamltests/test_spec_definitions.py +++ b/scripts/py_matter_yamltests/test_spec_definitions.py @@ -102,6 +102,10 @@ source_bitmap = ''' + + + + @@ -126,6 +130,10 @@ source_enum = ''' + + + + @@ -150,6 +158,10 @@ source_struct = ''' + + + + @@ -310,10 +322,16 @@ def test_get_bitmap_by_name(self): [ParseSource(source=io.StringIO(source_bitmap), name='source_bitmap')]) self.assertIsNone(definitions.get_bitmap_by_name( 'WrongName', 'TestBitmap')) + self.assertIsNone(definitions.get_bitmap_by_name( + 'TestWrong', 'TestBitmap')) self.assertIsNone(definitions.get_bitmap_by_name( 'Test', 'TestWrongBitmap')) self.assertIsInstance(definitions.get_bitmap_by_name( 'Test', 'TestBitmap'), Bitmap) + self.assertIsInstance(definitions.get_bitmap_by_name( + 'Test', 'TestGlobalBitmap'), Bitmap) + self.assertIsInstance(definitions.get_bitmap_by_name( + 'TestWrong', 'TestGlobalBitmap'), Bitmap) self.assertIsNone(definitions.get_bitmap_by_name('test', 'TestBitmap')) self.assertIsNone(definitions.get_bitmap_by_name('Test', 'testbitmap')) @@ -322,10 +340,16 @@ def test_get_enum_by_name(self): [ParseSource(source=io.StringIO(source_enum), name='source_enum')]) self.assertIsNone(definitions.get_enum_by_name( 'WrongName', 'TestEnum')) + self.assertIsNone(definitions.get_enum_by_name( + 'TestWrong', 'TestEnum')) self.assertIsNone(definitions.get_enum_by_name( 'Test', 'TestWrongEnum')) self.assertIsInstance( definitions.get_enum_by_name('Test', 'TestEnum'), Enum) + self.assertIsInstance( + definitions.get_enum_by_name('Test', 'TestGlobalEnum'), Enum) + self.assertIsInstance( + definitions.get_enum_by_name('TestWrong', 'TestGlobalEnum'), Enum) self.assertIsNone(definitions.get_enum_by_name('test', 'TestEnum')) self.assertIsNone(definitions.get_enum_by_name('Test', 'testenum')) @@ -334,10 +358,16 @@ def test_get_struct_by_name(self): [ParseSource(source=io.StringIO(source_struct), name='source_struct')]) self.assertIsNone(definitions.get_struct_by_name( 'WrongName', 'TestStruct')) + self.assertIsNone(definitions.get_struct_by_name( + 'TestWrong', 'TestStruct')) self.assertIsNone(definitions.get_struct_by_name( 'Test', 'TestWrongStruct')) self.assertIsInstance(definitions.get_struct_by_name( 'Test', 'TestStruct'), Struct) + self.assertIsInstance(definitions.get_struct_by_name( + 'Test', 'TestGlobalStruct'), Struct) + self.assertIsInstance(definitions.get_struct_by_name( + 'TestWrong', 'TestGlobalStruct'), Struct) self.assertIsNone(definitions.get_struct_by_name('test', 'TestStruct')) self.assertIsNone(definitions.get_struct_by_name('Test', 'teststruct')) @@ -365,16 +395,22 @@ def test_get_type_by_name(self): [ParseSource(source=io.StringIO(source_bitmap), name='source_bitmap')]) self.assertIsInstance(definitions.get_type_by_name( 'Test', 'TestBitmap'), Bitmap) + self.assertIsInstance(definitions.get_type_by_name( + 'Test', 'TestGlobalBitmap'), Bitmap) definitions = SpecDefinitions( [ParseSource(source=io.StringIO(source_enum), name='source_enum')]) self.assertIsInstance( definitions.get_type_by_name('Test', 'TestEnum'), Enum) + self.assertIsInstance( + definitions.get_type_by_name('Test', 'TestGlobalEnum'), Enum) definitions = SpecDefinitions( [ParseSource(source=io.StringIO(source_struct), name='source_struct')]) self.assertIsInstance(definitions.get_type_by_name( 'Test', 'TestStruct'), Struct) + self.assertIsInstance(definitions.get_type_by_name( + 'Test', 'TestGlobalStruct'), Struct) def test_struct_is_fabric_scoped(self): definitions = SpecDefinitions( From 77824edd53cedacfbbd289fe542afc040271c1cd Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 30 Jul 2024 08:26:48 -0400 Subject: [PATCH 10/27] Add a way to force reporting when setting attr value in ember store. (#34521) When using a QuieterReportingAttribute to track whether reporting is needed, we can end up in a situation where we set a value that we have not reported yet, and then an edge happens that requires reporting to be triggered, without the relevant value changing. In that situation the QuieterReportingAttribute remembers the last-reported value (not just the last-set one), and will return AttributeDirtyState::kMustReport. What was missing was a way to tell the ember data store "go ahead and report this, even though we are not in fact changing the value". We want that, in this case, since the ember data store just knows the last-set value, not the last-reported one. --- src/app/clusters/level-control/level-control.cpp | 10 +++++----- src/app/util/af-types.h | 5 +++++ src/app/util/attribute-table.cpp | 7 ++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 738a7b10ed0ffb..00d8a2e496518f 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -369,7 +369,7 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) /* * @brief * This function is used to update the current level attribute - * while respecting it's defined quiet reporting quality: + * while respecting its defined quiet reporting quality: * The attribute will be reported: * - At most once per second, or * - At the start of the movement/transition, or @@ -386,8 +386,7 @@ static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelContro DataModel::Nullable newValue, bool isStartOrEndOfTransition) { AttributeDirtyState dirtyState; - MarkAttributeDirty markDirty = MarkAttributeDirty::kNo; - auto now = System::SystemClock().GetMonotonicTimestamp(); + auto now = System::SystemClock().GetMonotonicTimestamp(); if (isStartOrEndOfTransition) { @@ -406,9 +405,10 @@ static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelContro dirtyState = state->quietCurrentLevel.SetValue(newValue, now, predicate); } + MarkAttributeDirty markDirty = MarkAttributeDirty::kNo; if (dirtyState == AttributeDirtyState::kMustReport) { - markDirty = MarkAttributeDirty::kIfChanged; + markDirty = MarkAttributeDirty::kYes; } return Attributes::CurrentLevel::Set(endpoint, state->quietCurrentLevel.value(), markDirty); } @@ -542,7 +542,7 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) // - kMarkDirtyOnIncrement : When the value increases. if (state->quietRemainingTime.SetValue(remainingTimeDs, now) == AttributeDirtyState::kMustReport) { - markDirty = MarkAttributeDirty::kIfChanged; + markDirty = MarkAttributeDirty::kYes; } Attributes::RemainingTime::Set(endpoint, state->quietRemainingTime.value().ValueOr(0), markDirty); diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 929ad055d0fc1e..bd5b5ed68ce4bb 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -307,6 +307,11 @@ enum class MarkAttributeDirty { kIfChanged, kNo, + // kYes might need to be used if the attribute value was previously changed + // without reporting, and now is being set in a situation where we know + // reporting needs to be triggered (e.g. because QuieterReportingAttribute + // indicated that). + kYes, }; } // namespace app diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 57b5f43d35071f..303b234ff93862 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -407,7 +407,12 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at if (!valueChanging) { - // Just do nothing. + // Just do nothing, except triggering reporting if forced. + if (markDirty == MarkAttributeDirty::kYes) + { + MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID); + } + return Status::Success; } From 5512b027e88ecb2bf81d2d590ee0810b647f4bdc Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 30 Jul 2024 08:52:27 -0400 Subject: [PATCH 11/27] Add TC_CCTRL_2_1.py test implementation (#34606) * Add TC_CCTRL_2_1.py test implementation * missed stuff from initial push * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- src/python_testing/TC_CCTRL_2_1.py | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/python_testing/TC_CCTRL_2_1.py diff --git a/src/python_testing/TC_CCTRL_2_1.py b/src/python_testing/TC_CCTRL_2_1.py new file mode 100644 index 00000000000000..7822d101b16e02 --- /dev/null +++ b/src/python_testing/TC_CCTRL_2_1.py @@ -0,0 +1,44 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, TestStep, default_matter_test_main, has_cluster, per_endpoint_test +from mobly import asserts + + +class TC_CCTRL_2_1(MatterBaseTest): + + def steps_TC_CCTRL_2_1(self) -> list[TestStep]: + steps = [TestStep(1, "Read MCORE.FS PICS code", is_commissioning=True), + TestStep(2, "Validate SupportedDeviceCategories is set accordingly based on MCORE.FS")] + return steps + + @per_endpoint_test(has_cluster(Clusters.CommissionerControl)) + async def test_TC_CCTRL_2_1(self): + self.step(1) + is_fabric_sync_pics_enabled = self.check_pics("MCORE.FS") + + self.step(2) + supported_device_categories = await self.read_single_attribute_check_success(cluster=Clusters.CommissionerControl, attribute=Clusters.CommissionerControl.Attributes.SupportedDeviceCategories) + is_fabric_sync_bit_set = bool(supported_device_categories & + Clusters.CommissionerControl.Bitmaps.SupportedDeviceCategoryBitmap.kFabricSynchronization) + asserts.assert_equal(is_fabric_sync_bit_set, is_fabric_sync_pics_enabled, + "Mismatch between PICS MCORE.FS value and what attribute indicates") + + +if __name__ == "__main__": + default_matter_test_main() From a8ff6ef5f68027a3da75423506fdca6b315ce60b Mon Sep 17 00:00:00 2001 From: shripad621git <79364691+shripad621git@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:58:06 +0530 Subject: [PATCH 12/27] Update the esp-idf version to v5.3 release. (#34622) --- docs/guides/esp32/setup_idf_chip.md | 14 +++++++------- integrations/docker/images/base/chip-build/version | 2 +- .../images/stage-2/chip-build-esp32/Dockerfile | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index 5a6728c44d8417..035964bdfab1b5 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -13,25 +13,25 @@ step. ### Install Prerequisites -- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/linux-macos-setup.html#for-linux-users) -- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/linux-macos-setup.html#for-macos-users) +- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32/get-started/linux-macos-setup.html#for-linux-users) +- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32/get-started/linux-macos-setup.html#for-macos-users) ### Get IDF v5.1.2 -- Clone ESP-IDF [v5.1.2 - release](https://github.com/espressif/esp-idf/releases/tag/v5.1.2 +- Clone ESP-IDF [v5.3 + release](https://github.com/espressif/esp-idf/releases/tag/v5.3 ``` - git clone -b v5.1.2 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git + git clone -b v5.3 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git cd esp-idf ./install.sh ``` -- To update an existing esp-idf toolchain to v5.1.2: +- To update an existing esp-idf toolchain to v5.3: ``` cd path/to/esp-idf - git fetch --depth 1 origin v5.1.2 + git fetch --depth 1 origin v5.3 git reset --hard FETCH_HEAD git submodule update --depth 1 --recursive --init diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index ba77442b28dc23..9f538399a5cf06 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -66 : [Telink] Update Docker image (Zephyr update) +67 : [ESP32] Update esp-idf to v5.3 diff --git a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile index 2e41b6b3466e27..b50189201598e1 100644 --- a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile @@ -12,7 +12,7 @@ RUN set -x \ && : # last line RUN set -x \ - && git clone --recursive -b v5.1.2 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ + && git clone --recursive -b v5.3 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} From 87393f83f9141489853301466379e225b0d0195e Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 30 Jul 2024 09:45:15 -0400 Subject: [PATCH 13/27] Fix int promotion compile errors on thermostat application (#34627) * Fix int promotion compile errors * Fix cast types * Minimize cast size * Fix typo --------- Co-authored-by: Andrei Litvin --- examples/thermostat/linux/thermostat-delegate-impl.cpp | 4 ++-- examples/thermostat/linux/thermostat-manager.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/thermostat/linux/thermostat-delegate-impl.cpp b/examples/thermostat/linux/thermostat-delegate-impl.cpp index fa7bd9a259a475..491e44a311c3e8 100644 --- a/examples/thermostat/linux/thermostat-delegate-impl.cpp +++ b/examples/thermostat/linux/thermostat-delegate-impl.cpp @@ -96,10 +96,10 @@ void ThermostatDelegate::InitializePresets() const uint8_t handle[] = { static_cast(presetScenario) }; mPresets[index].SetPresetHandle(DataModel::MakeNullable(ByteSpan(handle))); mPresets[index].SetName(NullOptional); - int16_t coolingSetpointValue = 2500 + index * 100; + int16_t coolingSetpointValue = static_cast(2500 + (index * 100)); mPresets[index].SetCoolingSetpoint(MakeOptional(coolingSetpointValue)); - int16_t heatingSetpointValue = 2100 - index * 100; + int16_t heatingSetpointValue = static_cast(2100 - (index * 100)); mPresets[index].SetHeatingSetpoint(MakeOptional(heatingSetpointValue)); mPresets[index].SetBuiltIn(DataModel::MakeNullable(true)); index++; diff --git a/examples/thermostat/linux/thermostat-manager.cpp b/examples/thermostat/linux/thermostat-manager.cpp index 00266161007d59..e96f04a78d49e9 100644 --- a/examples/thermostat/linux/thermostat-manager.cpp +++ b/examples/thermostat/linux/thermostat-manager.cpp @@ -398,8 +398,8 @@ void ThermostatManager::EvalThermostatState() void ThermostatManager::UpdateRunningModeForHeating() { - const int16_t heatingOnThreshold = mOccupiedHeatingSetpoint - mOccupiedSetback * 10; - const int16_t heatingOffThreshold = mOccupiedHeatingSetpoint + mOccupiedSetback * 10; + const int16_t heatingOnThreshold = mOccupiedHeatingSetpoint - static_cast(mOccupiedSetback * 10); + const int16_t heatingOffThreshold = mOccupiedHeatingSetpoint + static_cast(mOccupiedSetback * 10); if (mRunningMode == ThermostatRunningModeEnum::kHeat) { @@ -429,8 +429,8 @@ void ThermostatManager::UpdateRunningModeForHeating() void ThermostatManager::UpdateRunningModeForCooling() { - const int16_t coolingOffThreshold = mOccupiedCoolingSetpoint - mOccupiedSetback * 10; - const int16_t coolingOnThreshold = mOccupiedCoolingSetpoint + mOccupiedSetback * 10; + const int16_t coolingOffThreshold = mOccupiedCoolingSetpoint - static_cast(mOccupiedSetback * 10); + const int16_t coolingOnThreshold = mOccupiedCoolingSetpoint + static_cast(mOccupiedSetback * 10); if (mRunningMode == ThermostatRunningModeEnum::kCool) { From f6454bc45dc310ff40d4e19e771271fafea578d7 Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:43:59 +0200 Subject: [PATCH 14/27] fix for restyle-diff script and merge it with restyled-paths scripts (#34625) --- scripts/helpers/restyle-diff.sh | 52 ++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/scripts/helpers/restyle-diff.sh b/scripts/helpers/restyle-diff.sh index 21c01011a7c60c..5cc9ffa6b081fc 100755 --- a/scripts/helpers/restyle-diff.sh +++ b/scripts/helpers/restyle-diff.sh @@ -21,9 +21,10 @@ # you've written is kosher to CI # # Usage: -# restyle-diff.sh [ref] +# restyle-diff.sh [-d] [ref] # # if unspecified, ref defaults to upstream/master (or master) +# -d sets container's log level to DEBUG, if unspecified the default log level will remain (info level) # here=${0%/*} @@ -33,20 +34,55 @@ set -e CHIP_ROOT=$(cd "$here/../.." && pwd) cd "$CHIP_ROOT" -restyle-paths() { - if hash restyle-path 2>/dev/null; then - echo "$@" | xargs restyle-path +docker_run() { + if [ -t 0 ]; then + exec docker run --tty "$@" + else - url=https://github.com/restyled-io/restyler/raw/main/bin/restyle-path - echo "$@" | xargs sh <(curl --location --proto "=https" --tlsv1.2 "$url" -sSf) + exec docker run "$@" + fi } -ref="$1" +restyle-paths() { + + image=restyled/restyler:edge + + for path in "$@"; do + ( + docker_run --tty --interactive --rm \ + --env LOG_LEVEL \ + --env LOG_DESTINATION \ + --env LOG_FORMAT \ + --env LOG_COLOR \ + --env HOST_DIRECTORY="$PWD" \ + --env UNRESTRICTED=1 \ + --volume "$PWD":/code \ + --volume /tmp:/tmp \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + --entrypoint restyle-path \ + "$image" "$path" + ) + done +} + +while [[ $# -gt 0 ]]; do + case "$1" in + -d) + export LOG_LEVEL="DEBUG" + shift + ;; + *) + ref="$1" + shift + ;; + esac +done + if [[ -z "$ref" ]]; then ref="master" git remote | grep -qxF upstream && ref="upstream/master" fi -declare -a paths=("$(git diff --ignore-submodules --name-only --merge-base "$ref")") +mapfile -t paths < <(git diff --ignore-submodules --name-only --merge-base "$ref") restyle-paths "${paths[@]}" From 7afdb9736f8286703250e3c82afc2baa43c0bf73 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 30 Jul 2024 10:49:14 -0400 Subject: [PATCH 15/27] Adjust timeout on wildcard read for per endpoint tests (#34624) --- src/python_testing/matter_testing_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 7149b13106069b..26437ea54b5b79 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1815,7 +1815,7 @@ def per_endpoint_test(accept_function: EndpointCheckFunction): def per_endpoint_test_internal(body): def per_endpoint_runner(self: MatterBaseTest, *args, **kwargs): asserts.assert_false(self.get_test_pics(self.current_test_info.name), "pics_ method supplied for per_endpoint_test.") - runner_with_timeout = asyncio.wait_for(get_accepted_endpoints_for_test(self, accept_function), timeout=5) + runner_with_timeout = asyncio.wait_for(get_accepted_endpoints_for_test(self, accept_function), timeout=30) endpoints = asyncio.run(runner_with_timeout) if not endpoints: logging.info("No matching endpoints found - skipping test") From e78498cca10735c8b6e92b888a9885377ee5b1fc Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 30 Jul 2024 17:33:13 +0200 Subject: [PATCH 16/27] Python modifcation for check for fabricSynchronization condition on Agregator device (#34626) * Check for FabricSynchronization condition on Aggregator device * Update after code review * Restyled by prettier-yaml * Remove yaml with test --------- Co-authored-by: Arkadiusz Bokowy Co-authored-by: Restyled.io --- scripts/tests/chiptest/__init__.py | 2 ++ scripts/tests/chiptest/linux.py | 1 + scripts/tests/chiptest/test_definition.py | 11 +++++++++-- scripts/tests/run_test_suite.py | 10 +++++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 8d0950f379bae1..9d887a56580713 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -276,6 +276,8 @@ def target_for_name(name: str): return TestTarget.TV if name.startswith("DL_") or name.startswith("Test_TC_DRLK_"): return TestTarget.LOCK + if name.startswith("TestFabricSync"): + return TestTarget.FABRIC_SYNC if name.startswith("OTA_"): return TestTarget.OTA if name.startswith("Test_TC_BRBINFO_") or name.startswith("Test_TC_ACT_"): diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index 0a6df4cd671671..bf3e140981d3a7 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -178,6 +178,7 @@ def PathsWithNetworkNamespaces(paths: ApplicationPaths) -> ApplicationPaths: chip_tool='ip netns exec tool'.split() + paths.chip_tool, all_clusters_app='ip netns exec app'.split() + paths.all_clusters_app, lock_app='ip netns exec app'.split() + paths.lock_app, + fabric_bridge_app='ip netns exec app'.split() + paths.fabric_bridge_app, ota_provider_app='ip netns exec app'.split() + paths.ota_provider_app, ota_requestor_app='ip netns exec app'.split() + paths.ota_requestor_app, tv_app='ip netns exec app'.split() + paths.tv_app, diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 57c43c27a1cbca..484f247f70b1b2 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -175,6 +175,7 @@ class TestTarget(Enum): OTA = auto() BRIDGE = auto() LIT_ICD = auto() + FABRIC_SYNC = auto() MWO = auto() RVC = auto() NETWORK_MANAGER = auto() @@ -185,6 +186,7 @@ class ApplicationPaths: chip_tool: typing.List[str] all_clusters_app: typing.List[str] lock_app: typing.List[str] + fabric_bridge_app: typing.List[str] ota_provider_app: typing.List[str] ota_requestor_app: typing.List[str] tv_app: typing.List[str] @@ -197,8 +199,11 @@ class ApplicationPaths: network_manager_app: typing.List[str] def items(self): - return [self.chip_tool, self.all_clusters_app, self.lock_app, self.ota_provider_app, self.ota_requestor_app, - self.tv_app, self.bridge_app, self.lit_icd_app, self.microwave_oven_app, self.chip_repl_yaml_tester_cmd, self.chip_tool_with_python_cmd, self.rvc_app, self.network_manager_app] + return [self.chip_tool, self.all_clusters_app, self.lock_app, + self.fabric_bridge_app, self.ota_provider_app, self.ota_requestor_app, + self.tv_app, self.bridge_app, self.lit_icd_app, + self.microwave_oven_app, self.chip_repl_yaml_tester_cmd, + self.chip_tool_with_python_cmd, self.rvc_app, self.network_manager_app] @dataclass @@ -301,6 +306,8 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, target_app = paths.tv_app elif self.target == TestTarget.LOCK: target_app = paths.lock_app + elif self.target == TestTarget.FABRIC_SYNC: + target_app = paths.fabric_bridge_app elif self.target == TestTarget.OTA: target_app = paths.ota_requestor_app elif self.target == TestTarget.BRIDGE: diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index d546bb0803b6b9..41b7b540a6dd50 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -239,6 +239,9 @@ def cmd_list(context): @click.option( '--lock-app', help='what lock app to use') +@click.option( + '--fabric-bridge-app', + help='what fabric bridge app to use') @click.option( '--ota-provider-app', help='what ota provider app to use') @@ -294,7 +297,8 @@ def cmd_list(context): help='Number of tests that are expected to fail in each iteration. Overall test will pass if the number of failures matches this. Nonzero values require --keep-going') @click.pass_context def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, ota_requestor_app, - tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, network_manager_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures): + fabric_bridge_app, tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, network_manager_app, chip_repl_yaml_tester, + chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures): if expected_failures != 0 and not keep_going: logging.exception(f"'--expected-failures {expected_failures}' used without '--keep-going'") sys.exit(2) @@ -309,6 +313,9 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o if lock_app is None: lock_app = paths_finder.get('chip-lock-app') + if fabric_bridge_app is None: + fabric_bridge_app = paths_finder.get('fabric-bridge-app') + if ota_provider_app is None: ota_provider_app = paths_finder.get('chip-ota-provider-app') @@ -347,6 +354,7 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o chip_tool=[context.obj.chip_tool], all_clusters_app=[all_clusters_app], lock_app=[lock_app], + fabric_bridge_app=[fabric_bridge_app], ota_provider_app=[ota_provider_app], ota_requestor_app=[ota_requestor_app], tv_app=[tv_app], From cc55c2a33784f43be1526ff17a1bc66f8235c02b Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 30 Jul 2024 11:46:38 -0400 Subject: [PATCH 17/27] DM XMLs: Update for TE2 (#34605) * DM XML: Run new scrape * Change tests to use ToT by default for TE * add Humidistat to word list * Add newly required feature to the acl cluster * Ignore attributes in spec and not in SDk for TE * fix spec parsing test for tot default --- .github/.wordlist.txt | 1 + data_model/master/clusters/ACL-Cluster.xml | 134 +++++++- data_model/master/clusters/AccountLogin.xml | 2 +- .../clusters/AdminCommissioningCluster.xml | 2 +- data_model/master/clusters/AirQuality.xml | 2 +- .../master/clusters/ApplicationBasic.xml | 2 +- .../master/clusters/ApplicationLauncher.xml | 18 +- data_model/master/clusters/AudioOutput.xml | 2 +- .../clusters/BasicInformationCluster.xml | 32 +- .../master/clusters/Binding-Cluster.xml | 2 +- data_model/master/clusters/BooleanState.xml | 2 +- .../clusters/BooleanStateConfiguration.xml | 2 +- data_model/master/clusters/Channel.xml | 2 +- .../clusters/CommissionerControlCluster.xml | 2 +- .../master/clusters/ContentAppObserver.xml | 2 +- data_model/master/clusters/ContentControl.xml | 2 +- .../master/clusters/ContentLauncher.xml | 2 +- .../master/clusters/Descriptor-Cluster.xml | 2 +- .../clusters/DeviceEnergyManagement.xml | 2 +- .../master/clusters/DiagnosticLogsCluster.xml | 2 +- .../master/clusters/DiagnosticsEthernet.xml | 2 +- .../master/clusters/DiagnosticsGeneral.xml | 6 +- .../master/clusters/DiagnosticsSoftware.xml | 2 +- .../master/clusters/DiagnosticsThread.xml | 15 +- .../master/clusters/DiagnosticsWiFi.xml | 2 +- data_model/master/clusters/DoorLock.xml | 257 +-------------- .../clusters/ElectricalEnergyMeasurement.xml | 2 +- .../clusters/ElectricalPowerMeasurement.xml | 2 +- data_model/master/clusters/EnergyCalendar.xml | 4 +- data_model/master/clusters/EnergyEVSE.xml | 22 +- .../master/clusters/EnergyPreference.xml | 2 +- data_model/master/clusters/EnergyPrice.xml | 4 +- data_model/master/clusters/FanControl.xml | 2 +- .../clusters/GeneralCommissioningCluster.xml | 2 +- .../clusters/Group-Key-Management-Cluster.xml | 2 +- data_model/master/clusters/Groups.xml | 2 +- data_model/master/clusters/Humidistat.xml | 2 +- data_model/master/clusters/ICDManagement.xml | 16 +- data_model/master/clusters/Identify.xml | 2 +- .../clusters/JointFabricDatastoreCluster.xml | 307 +++++++++++------- .../master/clusters/JointFabricPKICluster.xml | 2 +- data_model/master/clusters/KeypadInput.xml | 2 +- .../Label-Cluster-FixedLabelCluster.xml | 2 +- .../clusters/Label-Cluster-LabelCluster.xml | 2 +- .../Label-Cluster-UserLabelCluster.xml | 2 +- .../master/clusters/LaundryDryerControls.xml | 2 +- .../master/clusters/LaundryWasherControls.xml | 2 +- data_model/master/clusters/LevelControl.xml | 2 +- .../clusters/LocalizationConfiguration.xml | 2 +- .../clusters/LocalizationTimeFormat.xml | 2 +- .../master/clusters/LocalizationUnit.xml | 2 +- data_model/master/clusters/LowPower.xml | 2 +- data_model/master/clusters/MediaInput.xml | 2 +- data_model/master/clusters/MediaPlayback.xml | 2 +- data_model/master/clusters/Messages.xml | 2 +- .../master/clusters/MicrowaveOvenControl.xml | 2 +- data_model/master/clusters/ModeBase.xml | 4 +- data_model/master/clusters/ModeSelect.xml | 4 +- .../clusters/Mode_DeviceEnergyManagement.xml | 2 +- .../master/clusters/Mode_Dishwasher.xml | 11 +- data_model/master/clusters/Mode_EVSE.xml | 2 +- .../master/clusters/Mode_LaundryWasher.xml | 11 +- .../master/clusters/Mode_MicrowaveOven.xml | 7 +- data_model/master/clusters/Mode_Oven.xml | 21 +- data_model/master/clusters/Mode_RVCClean.xml | 7 +- data_model/master/clusters/Mode_RVCRun.xml | 7 +- .../master/clusters/Mode_Refrigerator.xml | 11 +- .../master/clusters/Mode_WaterHeater.xml | 2 +- .../clusters/NetworkCommissioningCluster.xml | 2 +- .../clusters/NetworkIdentityManagement.xml | 2 +- data_model/master/clusters/OTAProvider.xml | 2 +- data_model/master/clusters/OTARequestor.xml | 2 +- .../master/clusters/OccupancySensing.xml | 2 +- data_model/master/clusters/OnOff.xml | 2 +- .../clusters/OperationalCredentialCluster.xml | 2 +- .../master/clusters/OperationalState.xml | 2 +- .../master/clusters/OperationalState_Oven.xml | 13 +- .../master/clusters/OperationalState_RVC.xml | 2 +- .../master/clusters/PowerSourceCluster.xml | 11 +- .../PowerSourceConfigurationCluster.xml | 2 +- data_model/master/clusters/PowerTopology.xml | 2 +- .../clusters/ProxyConfiguration-Cluster.xml | 2 +- .../clusters/ProxyDiscovery-Cluster.xml | 2 +- .../master/clusters/ResourceMonitoring.xml | 2 +- data_model/master/clusters/ServiceArea.xml | 143 ++++---- data_model/master/clusters/SmokeCOAlarm.xml | 2 +- data_model/master/clusters/Switch.xml | 2 +- .../master/clusters/TargetNavigator.xml | 2 +- .../master/clusters/TemperatureControl.xml | 2 +- data_model/master/clusters/Thermostat.xml | 75 ++--- .../ThermostatUserInterfaceConfiguration.xml | 2 +- .../clusters/ThreadBorderRouterManagement.xml | 8 +- .../clusters/ThreadNetworkDirectory.xml | 32 +- data_model/master/clusters/TimeSync.xml | 2 +- .../master/clusters/ValidProxies-Cluster.xml | 2 +- .../clusters/ValveConfigurationControl.xml | 2 +- data_model/master/clusters/WakeOnLAN.xml | 2 +- .../master/clusters/WaterHeaterManagement.xml | 2 +- .../master/clusters/WiFiNetworkManagement.xml | 11 +- data_model/master/clusters/WindowCovering.xml | 14 +- .../bridge-clusters-ActionsCluster.xml | 2 +- ...s-BridgedDeviceBasicInformationCluster.xml | 18 +- ...e-clusters-EcosystemInformationCluster.xml | 56 ++-- data_model/master/device_types/Aggregator.xml | 2 +- .../master/device_types/AirPurifier.xml | 2 +- .../master/device_types/AirQualitySensor.xml | 2 +- .../master/device_types/BaseDeviceType.xml | 2 +- .../master/device_types/BasicVideoPlayer.xml | 2 +- .../master/device_types/BatteryStorage.xml | 2 +- .../master/device_types/BridgedNode.xml | 2 +- .../device_types/CastingVideoClient.xml | 2 +- .../device_types/CastingVideoPlayer.xml | 2 +- .../master/device_types/ColorDimmerSwitch.xml | 2 +- .../device_types/ColorTemperatureLight.xml | 2 +- .../master/device_types/ContactSensor.xml | 2 +- data_model/master/device_types/ContentApp.xml | 2 +- .../master/device_types/ControlBridge.xml | 2 +- .../master/device_types/CookSurface.xml | 2 +- data_model/master/device_types/Cooktop.xml | 2 +- .../device_types/DeviceEnergyManagement.xml | 2 +- .../master/device_types/DimmableLight.xml | 2 +- .../device_types/DimmablePlug-InUnit.xml | 2 +- .../master/device_types/DimmerSwitch.xml | 2 +- data_model/master/device_types/Dishwasher.xml | 2 +- data_model/master/device_types/DoorLock.xml | 39 ++- .../device_types/DoorLockController.xml | 4 +- data_model/master/device_types/EVSE.xml | 2 +- .../master/device_types/ElectricalSensor.xml | 2 +- .../master/device_types/EnergyTariff.xml | 2 +- .../device_types/EnergyTariffCalendar.xml | 2 +- .../device_types/ExtendedColorLight.xml | 2 +- .../master/device_types/ExtractorHood.xml | 2 +- data_model/master/device_types/Fan.xml | 2 +- data_model/master/device_types/FlowSensor.xml | 2 +- .../master/device_types/GenericSwitch.xml | 2 +- data_model/master/device_types/HeatPump.xml | 2 +- .../device_types/HumidifierDehumidifier.xml | 2 +- .../master/device_types/HumiditySensor.xml | 2 +- .../master/device_types/JointFabricAdmin.xml | 2 +- .../master/device_types/LaundryDryer.xml | 2 +- .../master/device_types/LaundryWasher.xml | 2 +- .../master/device_types/LightSensor.xml | 2 +- .../master/device_types/MicrowaveOven.xml | 2 +- .../device_types/ModeSelectDeviceType.xml | 2 +- .../MountedDimmableLoadControl.xml | 124 +++++++ .../device_types/MountedOnOffControl.xml | 124 +++++++ .../device_types/NetworkInfraManager.xml | 2 +- .../master/device_types/OccupancySensor.xml | 2 +- data_model/master/device_types/OnOffLight.xml | 2 +- .../master/device_types/OnOffLightSwitch.xml | 2 +- .../master/device_types/OnOffPlug-inUnit.xml | 2 +- .../master/device_types/OnOffSensor.xml | 2 +- .../master/device_types/OtaProvider.xml | 2 +- .../master/device_types/OtaRequestor.xml | 2 +- data_model/master/device_types/Oven.xml | 2 +- .../master/device_types/PowerSource.xml | 2 +- .../master/device_types/PressureSensor.xml | 2 +- data_model/master/device_types/Pump.xml | 2 +- .../master/device_types/PumpController.xml | 2 +- data_model/master/device_types/RainSensor.xml | 2 +- .../master/device_types/Refrigerator.xml | 2 +- .../device_types/RoboticVacuumCleaner.xml | 2 +- .../device_types/RoomAirConditioner.xml | 2 +- .../device_types/RootNodeDeviceType.xml | 2 +- .../SecondaryNetworkInterface.xml | 2 +- .../master/device_types/SmokeCOAlarm.xml | 2 +- data_model/master/device_types/SolarPower.xml | 2 +- data_model/master/device_types/Speaker.xml | 2 +- .../TemperatureControlledCabinet.xml | 2 +- .../master/device_types/TemperatureSensor.xml | 2 +- data_model/master/device_types/Thermostat.xml | 52 +-- .../device_types/ThreadBorderRouter.xml | 2 +- .../device_types/VideoRemoteControl.xml | 2 +- .../device_types/WaterFreezeDetector.xml | 2 +- .../master/device_types/WaterHeater.xml | 2 +- .../master/device_types/WaterLeakDetector.xml | 2 +- data_model/master/device_types/WaterValve.xml | 2 +- .../master/device_types/WindowCovering.xml | 11 +- .../device_types/WindowCoveringController.xml | 11 +- data_model/master/spec_sha | 2 +- docs/spec_clusters.md | 15 +- examples/lock-app/lock-common/lock-app.matter | 2 +- examples/lock-app/lock-common/lock-app.zap | 2 +- src/python_testing/TC_DeviceConformance.py | 7 +- src/python_testing/TestSpecParsingSupport.py | 11 +- src/python_testing/spec_parsing_support.py | 4 +- 186 files changed, 1092 insertions(+), 878 deletions(-) create mode 100644 data_model/master/device_types/MountedDimmableLoadControl.xml create mode 100644 data_model/master/device_types/MountedOnOffControl.xml diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index ecfcb937e5b986..c4f48058b70416 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -650,6 +650,7 @@ href HSM hsm HTTPS +Humidistat HW hwadr HydrogenConcentrationMeasurement diff --git a/data_model/master/clusters/ACL-Cluster.xml b/data_model/master/clusters/ACL-Cluster.xml index d5fbf419ba4daf..2278f7c7920ce4 100644 --- a/data_model/master/clusters/ACL-Cluster.xml +++ b/data_model/master/clusters/ACL-Cluster.xml @@ -57,15 +57,18 @@ Davis, CA 95616, USA --> - - + + - + + + + @@ -80,11 +83,6 @@ Davis, CA 95616, USA - - - - - @@ -106,6 +104,20 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + @@ -164,6 +176,45 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -175,7 +226,9 @@ Davis, CA 95616, USA - + + + @@ -196,8 +249,17 @@ Davis, CA 95616, USA - - + + + + + + + + + + + @@ -205,6 +267,27 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + @@ -229,7 +312,9 @@ Davis, CA 95616, USA - + + + @@ -248,5 +333,30 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/AccountLogin.xml b/data_model/master/clusters/AccountLogin.xml index 8a9ed7d9389f40..6205fb6cb73261 100644 --- a/data_model/master/clusters/AccountLogin.xml +++ b/data_model/master/clusters/AccountLogin.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/AdminCommissioningCluster.xml b/data_model/master/clusters/AdminCommissioningCluster.xml index 8e95e46f128db0..77a8862b2eedc7 100644 --- a/data_model/master/clusters/AdminCommissioningCluster.xml +++ b/data_model/master/clusters/AdminCommissioningCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/AirQuality.xml b/data_model/master/clusters/AirQuality.xml index c05717863c5ff4..69387d451a38c0 100644 --- a/data_model/master/clusters/AirQuality.xml +++ b/data_model/master/clusters/AirQuality.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ApplicationBasic.xml b/data_model/master/clusters/ApplicationBasic.xml index 28e47e7800352e..93ffeeb958ad3a 100644 --- a/data_model/master/clusters/ApplicationBasic.xml +++ b/data_model/master/clusters/ApplicationBasic.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ApplicationLauncher.xml b/data_model/master/clusters/ApplicationLauncher.xml index 27fa528a81e8cf..51fcde769007e9 100644 --- a/data_model/master/clusters/ApplicationLauncher.xml +++ b/data_model/master/clusters/ApplicationLauncher.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + - + + @@ -75,10 +76,19 @@ Davis, CA 95616, USA - + - + + + + + + + + + + diff --git a/data_model/master/clusters/AudioOutput.xml b/data_model/master/clusters/AudioOutput.xml index 27bb5a20bb7952..9972a8a87e7a6f 100644 --- a/data_model/master/clusters/AudioOutput.xml +++ b/data_model/master/clusters/AudioOutput.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/BasicInformationCluster.xml b/data_model/master/clusters/BasicInformationCluster.xml index 538b4f5e9e9f8b..168a0353761159 100644 --- a/data_model/master/clusters/BasicInformationCluster.xml +++ b/data_model/master/clusters/BasicInformationCluster.xml @@ -57,20 +57,15 @@ Davis, CA 95616, USA --> - + - + - - - - - @@ -308,23 +303,12 @@ Davis, CA 95616, USA - + - - - - - - - - - - - @@ -351,15 +335,5 @@ Davis, CA 95616, USA - - - - - - - - - - \ No newline at end of file diff --git a/data_model/master/clusters/Binding-Cluster.xml b/data_model/master/clusters/Binding-Cluster.xml index 055725f0b9ee47..72fc1eb6b3282d 100644 --- a/data_model/master/clusters/Binding-Cluster.xml +++ b/data_model/master/clusters/Binding-Cluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/BooleanState.xml b/data_model/master/clusters/BooleanState.xml index ddb16e26a1d6ad..9754a7af60b57a 100644 --- a/data_model/master/clusters/BooleanState.xml +++ b/data_model/master/clusters/BooleanState.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/BooleanStateConfiguration.xml b/data_model/master/clusters/BooleanStateConfiguration.xml index 719cd9569b5ae2..d4ae791ad7649f 100644 --- a/data_model/master/clusters/BooleanStateConfiguration.xml +++ b/data_model/master/clusters/BooleanStateConfiguration.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Channel.xml b/data_model/master/clusters/Channel.xml index 6177bfe6a652cc..a2edf151cb6001 100644 --- a/data_model/master/clusters/Channel.xml +++ b/data_model/master/clusters/Channel.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/CommissionerControlCluster.xml b/data_model/master/clusters/CommissionerControlCluster.xml index eaaa3c51ec4a30..9cda8f414c89da 100644 --- a/data_model/master/clusters/CommissionerControlCluster.xml +++ b/data_model/master/clusters/CommissionerControlCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ContentAppObserver.xml b/data_model/master/clusters/ContentAppObserver.xml index d6808baf982215..7ffe0b11d04377 100644 --- a/data_model/master/clusters/ContentAppObserver.xml +++ b/data_model/master/clusters/ContentAppObserver.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ContentControl.xml b/data_model/master/clusters/ContentControl.xml index 6848886c43ac02..6b72a298ebeead 100644 --- a/data_model/master/clusters/ContentControl.xml +++ b/data_model/master/clusters/ContentControl.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ContentLauncher.xml b/data_model/master/clusters/ContentLauncher.xml index b4d6e7fa26500c..5470a14ce1da64 100644 --- a/data_model/master/clusters/ContentLauncher.xml +++ b/data_model/master/clusters/ContentLauncher.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Descriptor-Cluster.xml b/data_model/master/clusters/Descriptor-Cluster.xml index 9c0bcf0b2348e3..fabc3a2a16c658 100644 --- a/data_model/master/clusters/Descriptor-Cluster.xml +++ b/data_model/master/clusters/Descriptor-Cluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DeviceEnergyManagement.xml b/data_model/master/clusters/DeviceEnergyManagement.xml index efc027f27cdeee..cb7f46c008f5e1 100644 --- a/data_model/master/clusters/DeviceEnergyManagement.xml +++ b/data_model/master/clusters/DeviceEnergyManagement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DiagnosticLogsCluster.xml b/data_model/master/clusters/DiagnosticLogsCluster.xml index 38520e81a85e16..9dc7f4c7ef448d 100644 --- a/data_model/master/clusters/DiagnosticLogsCluster.xml +++ b/data_model/master/clusters/DiagnosticLogsCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DiagnosticsEthernet.xml b/data_model/master/clusters/DiagnosticsEthernet.xml index fd2bb0341ca06c..f000669f64156c 100644 --- a/data_model/master/clusters/DiagnosticsEthernet.xml +++ b/data_model/master/clusters/DiagnosticsEthernet.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DiagnosticsGeneral.xml b/data_model/master/clusters/DiagnosticsGeneral.xml index ff78100fe3a7d3..1266705ba6d0dc 100644 --- a/data_model/master/clusters/DiagnosticsGeneral.xml +++ b/data_model/master/clusters/DiagnosticsGeneral.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -200,12 +200,12 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/master/clusters/DiagnosticsSoftware.xml b/data_model/master/clusters/DiagnosticsSoftware.xml index c7ee8ee842bf02..55e865af040763 100644 --- a/data_model/master/clusters/DiagnosticsSoftware.xml +++ b/data_model/master/clusters/DiagnosticsSoftware.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DiagnosticsThread.xml b/data_model/master/clusters/DiagnosticsThread.xml index 1da3eba21a4e4e..a55412d7fd3eff 100644 --- a/data_model/master/clusters/DiagnosticsThread.xml +++ b/data_model/master/clusters/DiagnosticsThread.xml @@ -55,10 +55,11 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + + @@ -665,6 +666,16 @@ Davis, CA 95616, USA + + + + + + + + + + diff --git a/data_model/master/clusters/DiagnosticsWiFi.xml b/data_model/master/clusters/DiagnosticsWiFi.xml index 6ef28ee4cc09e0..87f7e44dc92b55 100644 --- a/data_model/master/clusters/DiagnosticsWiFi.xml +++ b/data_model/master/clusters/DiagnosticsWiFi.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/DoorLock.xml b/data_model/master/clusters/DoorLock.xml index 138d40bdd544d6..46d659da94a690 100644 --- a/data_model/master/clusters/DoorLock.xml +++ b/data_model/master/clusters/DoorLock.xml @@ -116,9 +116,6 @@ Davis, CA 95616, USA - - - @@ -279,23 +276,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - @@ -494,66 +474,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -598,29 +518,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - @@ -778,56 +675,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -871,7 +718,7 @@ Davis, CA 95616, USA - + @@ -1120,67 +967,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1958,47 +1744,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data_model/master/clusters/ElectricalEnergyMeasurement.xml b/data_model/master/clusters/ElectricalEnergyMeasurement.xml index 77e05665b2d031..259f9f512aec02 100644 --- a/data_model/master/clusters/ElectricalEnergyMeasurement.xml +++ b/data_model/master/clusters/ElectricalEnergyMeasurement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ElectricalPowerMeasurement.xml b/data_model/master/clusters/ElectricalPowerMeasurement.xml index ba9dd22f3fa799..5953d36b9d992e 100644 --- a/data_model/master/clusters/ElectricalPowerMeasurement.xml +++ b/data_model/master/clusters/ElectricalPowerMeasurement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/EnergyCalendar.xml b/data_model/master/clusters/EnergyCalendar.xml index 5e9b3b782a435c..5be0f8ff520aea 100644 --- a/data_model/master/clusters/EnergyCalendar.xml +++ b/data_model/master/clusters/EnergyCalendar.xml @@ -59,9 +59,9 @@ Davis, CA 95616, USA --> - + - + diff --git a/data_model/master/clusters/EnergyEVSE.xml b/data_model/master/clusters/EnergyEVSE.xml index e481e06aa4e5d4..a4c865c3096a60 100644 --- a/data_model/master/clusters/EnergyEVSE.xml +++ b/data_model/master/clusters/EnergyEVSE.xml @@ -57,12 +57,11 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + - + - - + @@ -76,16 +75,25 @@ Davis, CA 95616, USA - + + + + - + + + + - + + + + diff --git a/data_model/master/clusters/EnergyPreference.xml b/data_model/master/clusters/EnergyPreference.xml index cd2b722607a45b..2534ccfc8474c6 100644 --- a/data_model/master/clusters/EnergyPreference.xml +++ b/data_model/master/clusters/EnergyPreference.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/EnergyPrice.xml b/data_model/master/clusters/EnergyPrice.xml index a4efa28e1b0dbf..aae07641398eeb 100644 --- a/data_model/master/clusters/EnergyPrice.xml +++ b/data_model/master/clusters/EnergyPrice.xml @@ -59,10 +59,10 @@ Davis, CA 95616, USA --> - + - + diff --git a/data_model/master/clusters/FanControl.xml b/data_model/master/clusters/FanControl.xml index daae13aff910d4..9eba1df549981c 100644 --- a/data_model/master/clusters/FanControl.xml +++ b/data_model/master/clusters/FanControl.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/GeneralCommissioningCluster.xml b/data_model/master/clusters/GeneralCommissioningCluster.xml index ed10afa8406a5a..2d9e65848f0c85 100644 --- a/data_model/master/clusters/GeneralCommissioningCluster.xml +++ b/data_model/master/clusters/GeneralCommissioningCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Group-Key-Management-Cluster.xml b/data_model/master/clusters/Group-Key-Management-Cluster.xml index 35de0890bd87d3..784bdc903ec186 100644 --- a/data_model/master/clusters/Group-Key-Management-Cluster.xml +++ b/data_model/master/clusters/Group-Key-Management-Cluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Groups.xml b/data_model/master/clusters/Groups.xml index 6c53c1a602f255..214e6c18280afa 100644 --- a/data_model/master/clusters/Groups.xml +++ b/data_model/master/clusters/Groups.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Humidistat.xml b/data_model/master/clusters/Humidistat.xml index c3aac1dab85a20..1af54698489d31 100644 --- a/data_model/master/clusters/Humidistat.xml +++ b/data_model/master/clusters/Humidistat.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ICDManagement.xml b/data_model/master/clusters/ICDManagement.xml index d4731fb545ad9a..830f62fba2a63f 100644 --- a/data_model/master/clusters/ICDManagement.xml +++ b/data_model/master/clusters/ICDManagement.xml @@ -57,10 +57,11 @@ Davis, CA 95616, USA // Update Name --> - + - + + @@ -91,6 +92,14 @@ Davis, CA 95616, USA + + + + + + + + @@ -217,6 +226,9 @@ Davis, CA 95616, USA + + + diff --git a/data_model/master/clusters/Identify.xml b/data_model/master/clusters/Identify.xml index 0ab68abb8b1635..a6682b7233d30a 100644 --- a/data_model/master/clusters/Identify.xml +++ b/data_model/master/clusters/Identify.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/JointFabricDatastoreCluster.xml b/data_model/master/clusters/JointFabricDatastoreCluster.xml index 40e46ecc78519c..79143f34d03f55 100644 --- a/data_model/master/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/master/clusters/JointFabricDatastoreCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -75,14 +75,33 @@ Davis, CA 95616, USA - + + + + + + + + + + + + + + + + + + + + @@ -90,309 +109,376 @@ Davis, CA 95616, USA + - + + + + + + + + + - - + + + - + + - - + + + + + + + + + + + - + + - - - + + + - + + + - + + + - - + + + - + + + - + + - + + - - + + + - + + - - + + + + + - - + + + + + + + + + + + + + + + - + + - + + - + + - + - + - + - + - + - - - - - - - + - + - + - + + - + + - - - - - + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + + - - - - - + + + - + + + - + - - - - + - + - + - + + - + + + + + - + - + + - + - - - - + - + - + - + + - + - + - + - + - + - + - + - + - - - - + - + - + @@ -402,32 +488,23 @@ Davis, CA 95616, USA - + - - - - + - + - + - - - - + - - - - + diff --git a/data_model/master/clusters/JointFabricPKICluster.xml b/data_model/master/clusters/JointFabricPKICluster.xml index 3519a11cec79c6..b8c9474b0163d8 100644 --- a/data_model/master/clusters/JointFabricPKICluster.xml +++ b/data_model/master/clusters/JointFabricPKICluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/KeypadInput.xml b/data_model/master/clusters/KeypadInput.xml index 57d6ef4650e013..efeb92ba28fb73 100644 --- a/data_model/master/clusters/KeypadInput.xml +++ b/data_model/master/clusters/KeypadInput.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Label-Cluster-FixedLabelCluster.xml b/data_model/master/clusters/Label-Cluster-FixedLabelCluster.xml index b915e77bb5a01f..a172d1e281eff5 100644 --- a/data_model/master/clusters/Label-Cluster-FixedLabelCluster.xml +++ b/data_model/master/clusters/Label-Cluster-FixedLabelCluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Label-Cluster-LabelCluster.xml b/data_model/master/clusters/Label-Cluster-LabelCluster.xml index 43148b6dc9186f..2f8a371f74042c 100644 --- a/data_model/master/clusters/Label-Cluster-LabelCluster.xml +++ b/data_model/master/clusters/Label-Cluster-LabelCluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Label-Cluster-UserLabelCluster.xml b/data_model/master/clusters/Label-Cluster-UserLabelCluster.xml index 40dac53a4242cd..466550f12520f1 100644 --- a/data_model/master/clusters/Label-Cluster-UserLabelCluster.xml +++ b/data_model/master/clusters/Label-Cluster-UserLabelCluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LaundryDryerControls.xml b/data_model/master/clusters/LaundryDryerControls.xml index d860d2ef9dcf21..85f7871b267be5 100644 --- a/data_model/master/clusters/LaundryDryerControls.xml +++ b/data_model/master/clusters/LaundryDryerControls.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LaundryWasherControls.xml b/data_model/master/clusters/LaundryWasherControls.xml index 6fbfc0a882d3d1..046ecc3c51d697 100644 --- a/data_model/master/clusters/LaundryWasherControls.xml +++ b/data_model/master/clusters/LaundryWasherControls.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LevelControl.xml b/data_model/master/clusters/LevelControl.xml index 5da823bc1dceb0..28f88b96832c32 100644 --- a/data_model/master/clusters/LevelControl.xml +++ b/data_model/master/clusters/LevelControl.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LocalizationConfiguration.xml b/data_model/master/clusters/LocalizationConfiguration.xml index 7ddfba8efcc9cb..6bc3abd50600ab 100644 --- a/data_model/master/clusters/LocalizationConfiguration.xml +++ b/data_model/master/clusters/LocalizationConfiguration.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LocalizationTimeFormat.xml b/data_model/master/clusters/LocalizationTimeFormat.xml index 2ede281c7352a9..2de3724879701d 100644 --- a/data_model/master/clusters/LocalizationTimeFormat.xml +++ b/data_model/master/clusters/LocalizationTimeFormat.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LocalizationUnit.xml b/data_model/master/clusters/LocalizationUnit.xml index 0157ebb53b0d39..e08ce0e8810f26 100644 --- a/data_model/master/clusters/LocalizationUnit.xml +++ b/data_model/master/clusters/LocalizationUnit.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/LowPower.xml b/data_model/master/clusters/LowPower.xml index cf75cb0c680164..2e91a02c16a4b3 100644 --- a/data_model/master/clusters/LowPower.xml +++ b/data_model/master/clusters/LowPower.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/MediaInput.xml b/data_model/master/clusters/MediaInput.xml index a92985ff924a75..c01567f6e1ae3e 100644 --- a/data_model/master/clusters/MediaInput.xml +++ b/data_model/master/clusters/MediaInput.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/MediaPlayback.xml b/data_model/master/clusters/MediaPlayback.xml index dae60d7a1b2572..e37d5944aeb366 100644 --- a/data_model/master/clusters/MediaPlayback.xml +++ b/data_model/master/clusters/MediaPlayback.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Messages.xml b/data_model/master/clusters/Messages.xml index 402310c4b92eea..d2dbd28ba87f81 100644 --- a/data_model/master/clusters/Messages.xml +++ b/data_model/master/clusters/Messages.xml @@ -98,7 +98,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/MicrowaveOvenControl.xml b/data_model/master/clusters/MicrowaveOvenControl.xml index 360b9edeaa55f1..2169f7b1437945 100644 --- a/data_model/master/clusters/MicrowaveOvenControl.xml +++ b/data_model/master/clusters/MicrowaveOvenControl.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ModeBase.xml b/data_model/master/clusters/ModeBase.xml index 4a70ad670d0dca..c874eee69d3eb6 100644 --- a/data_model/master/clusters/ModeBase.xml +++ b/data_model/master/clusters/ModeBase.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -105,7 +105,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/ModeSelect.xml b/data_model/master/clusters/ModeSelect.xml index 76ebf5874af273..6e6f062182e503 100644 --- a/data_model/master/clusters/ModeSelect.xml +++ b/data_model/master/clusters/ModeSelect.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -116,7 +116,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/Mode_DeviceEnergyManagement.xml b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml index 08c4044617d716..ff8f7e910e94b0 100644 --- a/data_model/master/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Mode_Dishwasher.xml b/data_model/master/clusters/Mode_Dishwasher.xml index 40a19828d44ebb..8069fdddcf0cc3 100644 --- a/data_model/master/clusters/Mode_Dishwasher.xml +++ b/data_model/master/clusters/Mode_Dishwasher.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -80,6 +80,11 @@ Davis, CA 95616, USA + + + + + @@ -88,10 +93,10 @@ Davis, CA 95616, USA - + - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_EVSE.xml b/data_model/master/clusters/Mode_EVSE.xml index f139ab3cbfaf9a..daf8042cc3293b 100644 --- a/data_model/master/clusters/Mode_EVSE.xml +++ b/data_model/master/clusters/Mode_EVSE.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Mode_LaundryWasher.xml b/data_model/master/clusters/Mode_LaundryWasher.xml index 5d3cce891790e1..444d536fd178fd 100644 --- a/data_model/master/clusters/Mode_LaundryWasher.xml +++ b/data_model/master/clusters/Mode_LaundryWasher.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -80,6 +80,11 @@ Davis, CA 95616, USA + + + + + @@ -88,10 +93,10 @@ Davis, CA 95616, USA - + - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_MicrowaveOven.xml b/data_model/master/clusters/Mode_MicrowaveOven.xml index 6f1e8ed895f489..b5076d8c270099 100644 --- a/data_model/master/clusters/Mode_MicrowaveOven.xml +++ b/data_model/master/clusters/Mode_MicrowaveOven.xml @@ -59,12 +59,17 @@ Davis, CA 95616, USA --> - + + + + + + diff --git a/data_model/master/clusters/Mode_Oven.xml b/data_model/master/clusters/Mode_Oven.xml index bf6c1b57928a57..f7e8c8a4268cf2 100644 --- a/data_model/master/clusters/Mode_Oven.xml +++ b/data_model/master/clusters/Mode_Oven.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -79,4 +79,23 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_RVCClean.xml b/data_model/master/clusters/Mode_RVCClean.xml index b48ffa24a35b50..26b5d15c185fe3 100644 --- a/data_model/master/clusters/Mode_RVCClean.xml +++ b/data_model/master/clusters/Mode_RVCClean.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -81,6 +81,11 @@ Davis, CA 95616, USA + + + + + diff --git a/data_model/master/clusters/Mode_RVCRun.xml b/data_model/master/clusters/Mode_RVCRun.xml index ddfad8adc89d2e..ad0d7601a45c22 100644 --- a/data_model/master/clusters/Mode_RVCRun.xml +++ b/data_model/master/clusters/Mode_RVCRun.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -81,6 +81,11 @@ Davis, CA 95616, USA + + + + + diff --git a/data_model/master/clusters/Mode_Refrigerator.xml b/data_model/master/clusters/Mode_Refrigerator.xml index b4550283daf9e5..84410d1ddfc465 100644 --- a/data_model/master/clusters/Mode_Refrigerator.xml +++ b/data_model/master/clusters/Mode_Refrigerator.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -80,6 +80,11 @@ Davis, CA 95616, USA + + + + + @@ -88,10 +93,10 @@ Davis, CA 95616, USA - + - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_WaterHeater.xml b/data_model/master/clusters/Mode_WaterHeater.xml index 482ea0e33d0f9a..1779e74bab8c84 100644 --- a/data_model/master/clusters/Mode_WaterHeater.xml +++ b/data_model/master/clusters/Mode_WaterHeater.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/NetworkCommissioningCluster.xml b/data_model/master/clusters/NetworkCommissioningCluster.xml index 63efd6c3d3cbb2..8eefb234a2920a 100644 --- a/data_model/master/clusters/NetworkCommissioningCluster.xml +++ b/data_model/master/clusters/NetworkCommissioningCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/NetworkIdentityManagement.xml b/data_model/master/clusters/NetworkIdentityManagement.xml index b432b8b68f6b23..cef2f88f6ddad9 100644 --- a/data_model/master/clusters/NetworkIdentityManagement.xml +++ b/data_model/master/clusters/NetworkIdentityManagement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OTAProvider.xml b/data_model/master/clusters/OTAProvider.xml index 2a5be10961f02c..f300a419518675 100644 --- a/data_model/master/clusters/OTAProvider.xml +++ b/data_model/master/clusters/OTAProvider.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OTARequestor.xml b/data_model/master/clusters/OTARequestor.xml index 3a562c9f18a046..83314d14d9551a 100644 --- a/data_model/master/clusters/OTARequestor.xml +++ b/data_model/master/clusters/OTARequestor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OccupancySensing.xml b/data_model/master/clusters/OccupancySensing.xml index 2852ce812f9308..4cd027deb07279 100644 --- a/data_model/master/clusters/OccupancySensing.xml +++ b/data_model/master/clusters/OccupancySensing.xml @@ -410,7 +410,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/OnOff.xml b/data_model/master/clusters/OnOff.xml index b06c96a64376ac..b1ea6ebba4af7d 100644 --- a/data_model/master/clusters/OnOff.xml +++ b/data_model/master/clusters/OnOff.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OperationalCredentialCluster.xml b/data_model/master/clusters/OperationalCredentialCluster.xml index b3811db4a5774a..338a8af007c5b9 100644 --- a/data_model/master/clusters/OperationalCredentialCluster.xml +++ b/data_model/master/clusters/OperationalCredentialCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OperationalState.xml b/data_model/master/clusters/OperationalState.xml index 06c77fc29a2c19..354efa2400bda7 100644 --- a/data_model/master/clusters/OperationalState.xml +++ b/data_model/master/clusters/OperationalState.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/OperationalState_Oven.xml b/data_model/master/clusters/OperationalState_Oven.xml index fbcc634330faa7..710dea9806bf57 100644 --- a/data_model/master/clusters/OperationalState_Oven.xml +++ b/data_model/master/clusters/OperationalState_Oven.xml @@ -59,10 +59,21 @@ Davis, CA 95616, USA --> - + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/OperationalState_RVC.xml b/data_model/master/clusters/OperationalState_RVC.xml index f33791fcf86407..5d2d28db2c2cad 100644 --- a/data_model/master/clusters/OperationalState_RVC.xml +++ b/data_model/master/clusters/OperationalState_RVC.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/PowerSourceCluster.xml b/data_model/master/clusters/PowerSourceCluster.xml index 4596880e32b938..a0b6b91c565dd8 100644 --- a/data_model/master/clusters/PowerSourceCluster.xml +++ b/data_model/master/clusters/PowerSourceCluster.xml @@ -55,10 +55,11 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + + @@ -631,7 +632,7 @@ Davis, CA 95616, USA - + @@ -639,7 +640,7 @@ Davis, CA 95616, USA - + @@ -744,7 +745,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/PowerSourceConfigurationCluster.xml b/data_model/master/clusters/PowerSourceConfigurationCluster.xml index 5348f6f0b091b6..61df60149ca00f 100644 --- a/data_model/master/clusters/PowerSourceConfigurationCluster.xml +++ b/data_model/master/clusters/PowerSourceConfigurationCluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/PowerTopology.xml b/data_model/master/clusters/PowerTopology.xml index b958d03c01aeb1..eb0a2d74f5e585 100644 --- a/data_model/master/clusters/PowerTopology.xml +++ b/data_model/master/clusters/PowerTopology.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ProxyConfiguration-Cluster.xml b/data_model/master/clusters/ProxyConfiguration-Cluster.xml index c33ed5cd03b841..6796e79ac9bf59 100644 --- a/data_model/master/clusters/ProxyConfiguration-Cluster.xml +++ b/data_model/master/clusters/ProxyConfiguration-Cluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ProxyDiscovery-Cluster.xml b/data_model/master/clusters/ProxyDiscovery-Cluster.xml index 159bdff7333853..7353386929c109 100644 --- a/data_model/master/clusters/ProxyDiscovery-Cluster.xml +++ b/data_model/master/clusters/ProxyDiscovery-Cluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ResourceMonitoring.xml b/data_model/master/clusters/ResourceMonitoring.xml index feb6394fd6b47d..b9d26ff6dd9ecf 100644 --- a/data_model/master/clusters/ResourceMonitoring.xml +++ b/data_model/master/clusters/ResourceMonitoring.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ServiceArea.xml b/data_model/master/clusters/ServiceArea.xml index 4980fc5ad40274..6a54264a94928b 100644 --- a/data_model/master/clusters/ServiceArea.xml +++ b/data_model/master/clusters/ServiceArea.xml @@ -57,95 +57,77 @@ Davis, CA 95616, USA --> - + - + - + + + + - - - - - - - - - - - - - - - - - - + - + - + - + - - - - - - - - - - - - - + + - + - - + + + - + + - - - + - - + + + - + + - + @@ -154,7 +136,7 @@ Davis, CA 95616, USA - + @@ -164,92 +146,91 @@ Davis, CA 95616, USA - + - - + + - + - - - + + + + - + - - + - - + - + - - - + + + + - + - + - - - - - - + + + - + - + - - - + + + + - + - + - + + diff --git a/data_model/master/clusters/SmokeCOAlarm.xml b/data_model/master/clusters/SmokeCOAlarm.xml index 4ba9bd2708b476..482a8a82f2abf5 100644 --- a/data_model/master/clusters/SmokeCOAlarm.xml +++ b/data_model/master/clusters/SmokeCOAlarm.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Switch.xml b/data_model/master/clusters/Switch.xml index bb2066269b4f94..92489c1e9228a3 100644 --- a/data_model/master/clusters/Switch.xml +++ b/data_model/master/clusters/Switch.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/TargetNavigator.xml b/data_model/master/clusters/TargetNavigator.xml index c5fb59919585c1..b1fcff6d60cd1e 100644 --- a/data_model/master/clusters/TargetNavigator.xml +++ b/data_model/master/clusters/TargetNavigator.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/TemperatureControl.xml b/data_model/master/clusters/TemperatureControl.xml index 2f2527ce4ad0fa..79519716ea1cf8 100644 --- a/data_model/master/clusters/TemperatureControl.xml +++ b/data_model/master/clusters/TemperatureControl.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/Thermostat.xml b/data_model/master/clusters/Thermostat.xml index 4374bc3f1c8a7d..de1743d8addf1a 100644 --- a/data_model/master/clusters/Thermostat.xml +++ b/data_model/master/clusters/Thermostat.xml @@ -1,6 +1,6 @@ - + @@ -63,8 +63,9 @@ Davis, CA 95616, USA - - + @@ -396,10 +397,10 @@ Davis, CA 95616, USA - + - + @@ -409,6 +410,11 @@ Davis, CA 95616, USA + + + + + @@ -589,7 +595,7 @@ Davis, CA 95616, USA - + @@ -654,12 +660,11 @@ Davis, CA 95616, USA - + - @@ -726,7 +731,7 @@ Davis, CA 95616, USA - + @@ -734,7 +739,7 @@ Davis, CA 95616, USA - + @@ -816,7 +821,7 @@ Davis, CA 95616, USA - + @@ -1047,7 +1052,7 @@ Davis, CA 95616, USA - + @@ -1055,7 +1060,7 @@ Davis, CA 95616, USA - + @@ -1079,16 +1084,7 @@ Davis, CA 95616, USA - - - - - - - - - - + @@ -1223,36 +1219,5 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/master/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/master/clusters/ThermostatUserInterfaceConfiguration.xml index b4ecd49f93ae4a..d6a52248282321 100644 --- a/data_model/master/clusters/ThermostatUserInterfaceConfiguration.xml +++ b/data_model/master/clusters/ThermostatUserInterfaceConfiguration.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ThreadBorderRouterManagement.xml b/data_model/master/clusters/ThreadBorderRouterManagement.xml index b22d4038219647..7ae4edab62f8b3 100644 --- a/data_model/master/clusters/ThreadBorderRouterManagement.xml +++ b/data_model/master/clusters/ThreadBorderRouterManagement.xml @@ -59,12 +59,12 @@ Davis, CA 95616, USA --> - + - + @@ -119,7 +119,7 @@ Davis, CA 95616, USA - + @@ -130,7 +130,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/ThreadNetworkDirectory.xml b/data_model/master/clusters/ThreadNetworkDirectory.xml index aeabdcf19f93d1..098b490fa5d369 100644 --- a/data_model/master/clusters/ThreadNetworkDirectory.xml +++ b/data_model/master/clusters/ThreadNetworkDirectory.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -67,8 +67,9 @@ Davis, CA 95616, USA - + + @@ -77,17 +78,21 @@ Davis, CA 95616, USA + + + - - + + + - + @@ -111,15 +116,17 @@ Davis, CA 95616, USA - + + - + - + + @@ -130,13 +137,4 @@ Davis, CA 95616, USA - - - - - - - - - \ No newline at end of file diff --git a/data_model/master/clusters/TimeSync.xml b/data_model/master/clusters/TimeSync.xml index a506a647aeb8a3..e72a9d32467983 100644 --- a/data_model/master/clusters/TimeSync.xml +++ b/data_model/master/clusters/TimeSync.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ValidProxies-Cluster.xml b/data_model/master/clusters/ValidProxies-Cluster.xml index c5740c90e52433..51cfeedb46926d 100644 --- a/data_model/master/clusters/ValidProxies-Cluster.xml +++ b/data_model/master/clusters/ValidProxies-Cluster.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/ValveConfigurationControl.xml b/data_model/master/clusters/ValveConfigurationControl.xml index 736672bc78f716..03d40acd480ff4 100644 --- a/data_model/master/clusters/ValveConfigurationControl.xml +++ b/data_model/master/clusters/ValveConfigurationControl.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/WakeOnLAN.xml b/data_model/master/clusters/WakeOnLAN.xml index 7f5c08bdd624ad..092e0a8ea8f4de 100644 --- a/data_model/master/clusters/WakeOnLAN.xml +++ b/data_model/master/clusters/WakeOnLAN.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/WaterHeaterManagement.xml b/data_model/master/clusters/WaterHeaterManagement.xml index ee38a0058b50fb..cadf8e0a8af53b 100644 --- a/data_model/master/clusters/WaterHeaterManagement.xml +++ b/data_model/master/clusters/WaterHeaterManagement.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/WiFiNetworkManagement.xml b/data_model/master/clusters/WiFiNetworkManagement.xml index cfa10af25f0dd6..3aad5935d2843d 100644 --- a/data_model/master/clusters/WiFiNetworkManagement.xml +++ b/data_model/master/clusters/WiFiNetworkManagement.xml @@ -59,23 +59,28 @@ Davis, CA 95616, USA --> - + - + + + + + + - + diff --git a/data_model/master/clusters/WindowCovering.xml b/data_model/master/clusters/WindowCovering.xml index 2f087914405cf3..f8c60b46901dc9 100644 --- a/data_model/master/clusters/WindowCovering.xml +++ b/data_model/master/clusters/WindowCovering.xml @@ -340,13 +340,13 @@ Davis, CA 95616, USA - + - + - + @@ -464,7 +464,7 @@ Davis, CA 95616, USA - + @@ -474,7 +474,7 @@ Davis, CA 95616, USA - + @@ -491,7 +491,7 @@ Davis, CA 95616, USA - + @@ -501,7 +501,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/bridge-clusters-ActionsCluster.xml b/data_model/master/clusters/bridge-clusters-ActionsCluster.xml index 5b9b54429b9429..4874aca26bc504 100644 --- a/data_model/master/clusters/bridge-clusters-ActionsCluster.xml +++ b/data_model/master/clusters/bridge-clusters-ActionsCluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 318ad7fa54dd2a..4368d991c832f4 100644 --- a/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -59,17 +59,17 @@ Davis, CA 95616, USA --> - + - + - + @@ -86,9 +86,7 @@ Davis, CA 95616, USA - - - + @@ -148,7 +146,7 @@ Davis, CA 95616, USA - + @@ -178,11 +176,15 @@ Davis, CA 95616, USA - + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml index 4801cbf88800ae..22cc88097acf75 100644 --- a/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml +++ b/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml @@ -59,7 +59,7 @@ Davis, CA 95616, USA --> - + @@ -68,69 +68,79 @@ Davis, CA 95616, USA + - - - + + + - + + - - + + + + + + - + + + - + + - - + + + - - - - + + + + - - + + - - + + - + - - + + - + \ No newline at end of file diff --git a/data_model/master/device_types/Aggregator.xml b/data_model/master/device_types/Aggregator.xml index 48aa4347d850e1..a99ee1108c3b50 100644 --- a/data_model/master/device_types/Aggregator.xml +++ b/data_model/master/device_types/Aggregator.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/AirPurifier.xml b/data_model/master/device_types/AirPurifier.xml index 538d9a4e341efb..62045f090c71a5 100644 --- a/data_model/master/device_types/AirPurifier.xml +++ b/data_model/master/device_types/AirPurifier.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/AirQualitySensor.xml b/data_model/master/device_types/AirQualitySensor.xml index bf56eb754f24c6..756b42e437ac9a 100644 --- a/data_model/master/device_types/AirQualitySensor.xml +++ b/data_model/master/device_types/AirQualitySensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/BaseDeviceType.xml b/data_model/master/device_types/BaseDeviceType.xml index ddcc49f258f0cb..272b74feb5ff67 100644 --- a/data_model/master/device_types/BaseDeviceType.xml +++ b/data_model/master/device_types/BaseDeviceType.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/BasicVideoPlayer.xml b/data_model/master/device_types/BasicVideoPlayer.xml index ed82d08bc7a112..d35bbed3211422 100644 --- a/data_model/master/device_types/BasicVideoPlayer.xml +++ b/data_model/master/device_types/BasicVideoPlayer.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/BatteryStorage.xml b/data_model/master/device_types/BatteryStorage.xml index 321e9f9dfe2159..5f09eeb1d2dac9 100644 --- a/data_model/master/device_types/BatteryStorage.xml +++ b/data_model/master/device_types/BatteryStorage.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/BridgedNode.xml b/data_model/master/device_types/BridgedNode.xml index 59414205c052b5..6f309001975627 100644 --- a/data_model/master/device_types/BridgedNode.xml +++ b/data_model/master/device_types/BridgedNode.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/CastingVideoClient.xml b/data_model/master/device_types/CastingVideoClient.xml index 8f816b3e2a8056..949142a6bca151 100644 --- a/data_model/master/device_types/CastingVideoClient.xml +++ b/data_model/master/device_types/CastingVideoClient.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/CastingVideoPlayer.xml b/data_model/master/device_types/CastingVideoPlayer.xml index 0b65f4f7aab57d..5c88cf92947e0b 100644 --- a/data_model/master/device_types/CastingVideoPlayer.xml +++ b/data_model/master/device_types/CastingVideoPlayer.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ColorDimmerSwitch.xml b/data_model/master/device_types/ColorDimmerSwitch.xml index 190ab6c7fc8b7e..abc027eaec711c 100644 --- a/data_model/master/device_types/ColorDimmerSwitch.xml +++ b/data_model/master/device_types/ColorDimmerSwitch.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ColorTemperatureLight.xml b/data_model/master/device_types/ColorTemperatureLight.xml index 4f7cf64a9fd0a2..56db5416cf02c9 100644 --- a/data_model/master/device_types/ColorTemperatureLight.xml +++ b/data_model/master/device_types/ColorTemperatureLight.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ContactSensor.xml b/data_model/master/device_types/ContactSensor.xml index 6fa5620a77bebb..2767e5e37a384b 100644 --- a/data_model/master/device_types/ContactSensor.xml +++ b/data_model/master/device_types/ContactSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ContentApp.xml b/data_model/master/device_types/ContentApp.xml index 300e3122336ef4..81b967db9c8dc1 100644 --- a/data_model/master/device_types/ContentApp.xml +++ b/data_model/master/device_types/ContentApp.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ControlBridge.xml b/data_model/master/device_types/ControlBridge.xml index 04ff66db808cc9..ab07228e728f52 100644 --- a/data_model/master/device_types/ControlBridge.xml +++ b/data_model/master/device_types/ControlBridge.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/CookSurface.xml b/data_model/master/device_types/CookSurface.xml index a32425e2f1df08..3a0e8f062c7495 100644 --- a/data_model/master/device_types/CookSurface.xml +++ b/data_model/master/device_types/CookSurface.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Cooktop.xml b/data_model/master/device_types/Cooktop.xml index ea94653008d25a..2c7795de12233b 100644 --- a/data_model/master/device_types/Cooktop.xml +++ b/data_model/master/device_types/Cooktop.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/DeviceEnergyManagement.xml b/data_model/master/device_types/DeviceEnergyManagement.xml index cf148dabc13679..85f7c5d9a7cd66 100644 --- a/data_model/master/device_types/DeviceEnergyManagement.xml +++ b/data_model/master/device_types/DeviceEnergyManagement.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/DimmableLight.xml b/data_model/master/device_types/DimmableLight.xml index 059a0802f77906..4d6c53e4ae36fd 100644 --- a/data_model/master/device_types/DimmableLight.xml +++ b/data_model/master/device_types/DimmableLight.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/DimmablePlug-InUnit.xml b/data_model/master/device_types/DimmablePlug-InUnit.xml index 65f6b6e1dd2e9c..73fd2a37c48bab 100644 --- a/data_model/master/device_types/DimmablePlug-InUnit.xml +++ b/data_model/master/device_types/DimmablePlug-InUnit.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/DimmerSwitch.xml b/data_model/master/device_types/DimmerSwitch.xml index 0ad9f23638349a..9dce28fdd7ce71 100644 --- a/data_model/master/device_types/DimmerSwitch.xml +++ b/data_model/master/device_types/DimmerSwitch.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Dishwasher.xml b/data_model/master/device_types/Dishwasher.xml index 6e351f38360e4e..b13f9a42ebcc49 100644 --- a/data_model/master/device_types/Dishwasher.xml +++ b/data_model/master/device_types/Dishwasher.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/DoorLock.xml b/data_model/master/device_types/DoorLock.xml index 8b73bbf8679a6b..121ea179d14589 100644 --- a/data_model/master/device_types/DoorLock.xml +++ b/data_model/master/device_types/DoorLock.xml @@ -57,8 +57,8 @@ Davis, CA 95616, USA --> - - + + @@ -95,14 +95,49 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/device_types/DoorLockController.xml b/data_model/master/device_types/DoorLockController.xml index 64d26eba8d8eeb..101dc46f5ccd40 100644 --- a/data_model/master/device_types/DoorLockController.xml +++ b/data_model/master/device_types/DoorLockController.xml @@ -57,8 +57,8 @@ Davis, CA 95616, USA --> - - + + diff --git a/data_model/master/device_types/EVSE.xml b/data_model/master/device_types/EVSE.xml index a6a1e3854c88eb..d468cb8a180f22 100644 --- a/data_model/master/device_types/EVSE.xml +++ b/data_model/master/device_types/EVSE.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ElectricalSensor.xml b/data_model/master/device_types/ElectricalSensor.xml index 62c6dd9b4128b2..75c4b0bb7cbbed 100644 --- a/data_model/master/device_types/ElectricalSensor.xml +++ b/data_model/master/device_types/ElectricalSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/EnergyTariff.xml b/data_model/master/device_types/EnergyTariff.xml index bf27554ff281db..887bfa420d8fd8 100644 --- a/data_model/master/device_types/EnergyTariff.xml +++ b/data_model/master/device_types/EnergyTariff.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/EnergyTariffCalendar.xml b/data_model/master/device_types/EnergyTariffCalendar.xml index ee3a6b9347db38..70d74b7239f41c 100644 --- a/data_model/master/device_types/EnergyTariffCalendar.xml +++ b/data_model/master/device_types/EnergyTariffCalendar.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ExtendedColorLight.xml b/data_model/master/device_types/ExtendedColorLight.xml index b4057d6b5bc997..0678094669459f 100644 --- a/data_model/master/device_types/ExtendedColorLight.xml +++ b/data_model/master/device_types/ExtendedColorLight.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ExtractorHood.xml b/data_model/master/device_types/ExtractorHood.xml index 6606b377f47a39..3e8064adb149f4 100644 --- a/data_model/master/device_types/ExtractorHood.xml +++ b/data_model/master/device_types/ExtractorHood.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Fan.xml b/data_model/master/device_types/Fan.xml index 8bf8347e93c5b0..e5184cfe22aec7 100644 --- a/data_model/master/device_types/Fan.xml +++ b/data_model/master/device_types/Fan.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/FlowSensor.xml b/data_model/master/device_types/FlowSensor.xml index bcc27b318aac36..6a9023060e12f9 100644 --- a/data_model/master/device_types/FlowSensor.xml +++ b/data_model/master/device_types/FlowSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/GenericSwitch.xml b/data_model/master/device_types/GenericSwitch.xml index acfa0a95005291..b8bc394b96e2e8 100644 --- a/data_model/master/device_types/GenericSwitch.xml +++ b/data_model/master/device_types/GenericSwitch.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/HeatPump.xml b/data_model/master/device_types/HeatPump.xml index ae0ce0e9a4d30a..61f556c6ed2a9b 100644 --- a/data_model/master/device_types/HeatPump.xml +++ b/data_model/master/device_types/HeatPump.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/HumidifierDehumidifier.xml b/data_model/master/device_types/HumidifierDehumidifier.xml index a917cbff4450f0..973919635fb4ae 100644 --- a/data_model/master/device_types/HumidifierDehumidifier.xml +++ b/data_model/master/device_types/HumidifierDehumidifier.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + \ No newline at end of file diff --git a/data_model/master/device_types/HumiditySensor.xml b/data_model/master/device_types/HumiditySensor.xml index 4a1808d7e0c580..c6def400a2a6bb 100644 --- a/data_model/master/device_types/HumiditySensor.xml +++ b/data_model/master/device_types/HumiditySensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/JointFabricAdmin.xml b/data_model/master/device_types/JointFabricAdmin.xml index eb57fad58127a4..7d29cbba1305d5 100644 --- a/data_model/master/device_types/JointFabricAdmin.xml +++ b/data_model/master/device_types/JointFabricAdmin.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/LaundryDryer.xml b/data_model/master/device_types/LaundryDryer.xml index d4692c7ad818a5..36dc182c393bd7 100644 --- a/data_model/master/device_types/LaundryDryer.xml +++ b/data_model/master/device_types/LaundryDryer.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/LaundryWasher.xml b/data_model/master/device_types/LaundryWasher.xml index 03b85f3bd363b4..d88ee7e9fd94ca 100644 --- a/data_model/master/device_types/LaundryWasher.xml +++ b/data_model/master/device_types/LaundryWasher.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/LightSensor.xml b/data_model/master/device_types/LightSensor.xml index 0eca130f921623..e7200e347726aa 100644 --- a/data_model/master/device_types/LightSensor.xml +++ b/data_model/master/device_types/LightSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/MicrowaveOven.xml b/data_model/master/device_types/MicrowaveOven.xml index 3ae1fd8d5bf22d..98d2902d049610 100644 --- a/data_model/master/device_types/MicrowaveOven.xml +++ b/data_model/master/device_types/MicrowaveOven.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ModeSelectDeviceType.xml b/data_model/master/device_types/ModeSelectDeviceType.xml index 7848ba0adc787f..ad4cf56671243b 100644 --- a/data_model/master/device_types/ModeSelectDeviceType.xml +++ b/data_model/master/device_types/ModeSelectDeviceType.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/MountedDimmableLoadControl.xml b/data_model/master/device_types/MountedDimmableLoadControl.xml new file mode 100644 index 00000000000000..2527eb6aaefcd2 --- /dev/null +++ b/data_model/master/device_types/MountedDimmableLoadControl.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/device_types/MountedOnOffControl.xml b/data_model/master/device_types/MountedOnOffControl.xml new file mode 100644 index 00000000000000..1be3cf746418aa --- /dev/null +++ b/data_model/master/device_types/MountedOnOffControl.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/device_types/NetworkInfraManager.xml b/data_model/master/device_types/NetworkInfraManager.xml index a4d17e11c0faaa..58cbae2e7ab440 100644 --- a/data_model/master/device_types/NetworkInfraManager.xml +++ b/data_model/master/device_types/NetworkInfraManager.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OccupancySensor.xml b/data_model/master/device_types/OccupancySensor.xml index 233d04f196e388..f257bab38a7686 100644 --- a/data_model/master/device_types/OccupancySensor.xml +++ b/data_model/master/device_types/OccupancySensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OnOffLight.xml b/data_model/master/device_types/OnOffLight.xml index f71c0bf77fa42c..c74f5f79000919 100644 --- a/data_model/master/device_types/OnOffLight.xml +++ b/data_model/master/device_types/OnOffLight.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OnOffLightSwitch.xml b/data_model/master/device_types/OnOffLightSwitch.xml index d6ac7f79520d26..0cfa5ba7a3702c 100644 --- a/data_model/master/device_types/OnOffLightSwitch.xml +++ b/data_model/master/device_types/OnOffLightSwitch.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OnOffPlug-inUnit.xml b/data_model/master/device_types/OnOffPlug-inUnit.xml index 888f365bed0b83..946f7919516e2d 100644 --- a/data_model/master/device_types/OnOffPlug-inUnit.xml +++ b/data_model/master/device_types/OnOffPlug-inUnit.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OnOffSensor.xml b/data_model/master/device_types/OnOffSensor.xml index 935a438fb0bbef..0fc76f8314a6b5 100644 --- a/data_model/master/device_types/OnOffSensor.xml +++ b/data_model/master/device_types/OnOffSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OtaProvider.xml b/data_model/master/device_types/OtaProvider.xml index 375ab4e36aa987..b148d27ebb74e5 100644 --- a/data_model/master/device_types/OtaProvider.xml +++ b/data_model/master/device_types/OtaProvider.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/OtaRequestor.xml b/data_model/master/device_types/OtaRequestor.xml index 840e322bdccb72..d782ee992c454b 100644 --- a/data_model/master/device_types/OtaRequestor.xml +++ b/data_model/master/device_types/OtaRequestor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Oven.xml b/data_model/master/device_types/Oven.xml index 9c5d23e86afda7..d34bc4c52bfbb6 100644 --- a/data_model/master/device_types/Oven.xml +++ b/data_model/master/device_types/Oven.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/PowerSource.xml b/data_model/master/device_types/PowerSource.xml index 9ed71e905535bd..4e6c6defabccf9 100644 --- a/data_model/master/device_types/PowerSource.xml +++ b/data_model/master/device_types/PowerSource.xml @@ -58,7 +58,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/device_types/PressureSensor.xml b/data_model/master/device_types/PressureSensor.xml index f2b7855db91c83..5b7ef86c25cc3d 100644 --- a/data_model/master/device_types/PressureSensor.xml +++ b/data_model/master/device_types/PressureSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Pump.xml b/data_model/master/device_types/Pump.xml index 461725136abaec..a39cd97b87e7ad 100644 --- a/data_model/master/device_types/Pump.xml +++ b/data_model/master/device_types/Pump.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/PumpController.xml b/data_model/master/device_types/PumpController.xml index 99acf1fa1c5757..25e9a8e982b5ff 100644 --- a/data_model/master/device_types/PumpController.xml +++ b/data_model/master/device_types/PumpController.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/RainSensor.xml b/data_model/master/device_types/RainSensor.xml index 473de6e31d1598..a03060c5415dc0 100644 --- a/data_model/master/device_types/RainSensor.xml +++ b/data_model/master/device_types/RainSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Refrigerator.xml b/data_model/master/device_types/Refrigerator.xml index 4899906c3b985e..c8bdf86e3ef737 100644 --- a/data_model/master/device_types/Refrigerator.xml +++ b/data_model/master/device_types/Refrigerator.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/RoboticVacuumCleaner.xml b/data_model/master/device_types/RoboticVacuumCleaner.xml index 2657a560109829..fd30668cd2e084 100644 --- a/data_model/master/device_types/RoboticVacuumCleaner.xml +++ b/data_model/master/device_types/RoboticVacuumCleaner.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/RoomAirConditioner.xml b/data_model/master/device_types/RoomAirConditioner.xml index 305a893dabc0fe..e2b3061a42b515 100644 --- a/data_model/master/device_types/RoomAirConditioner.xml +++ b/data_model/master/device_types/RoomAirConditioner.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/RootNodeDeviceType.xml b/data_model/master/device_types/RootNodeDeviceType.xml index 7dfd31996cc8e5..c96759503bfb13 100644 --- a/data_model/master/device_types/RootNodeDeviceType.xml +++ b/data_model/master/device_types/RootNodeDeviceType.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/SecondaryNetworkInterface.xml b/data_model/master/device_types/SecondaryNetworkInterface.xml index 51b4dc0e2ec4fa..8217aea71529d0 100644 --- a/data_model/master/device_types/SecondaryNetworkInterface.xml +++ b/data_model/master/device_types/SecondaryNetworkInterface.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/SmokeCOAlarm.xml b/data_model/master/device_types/SmokeCOAlarm.xml index 518809d449e35a..769e6f5f91bbe1 100644 --- a/data_model/master/device_types/SmokeCOAlarm.xml +++ b/data_model/master/device_types/SmokeCOAlarm.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/SolarPower.xml b/data_model/master/device_types/SolarPower.xml index 743da25e7a9a20..7556fb519a685d 100644 --- a/data_model/master/device_types/SolarPower.xml +++ b/data_model/master/device_types/SolarPower.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Speaker.xml b/data_model/master/device_types/Speaker.xml index d1d9d85beb84c8..d3f9b1166e4458 100644 --- a/data_model/master/device_types/Speaker.xml +++ b/data_model/master/device_types/Speaker.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/TemperatureControlledCabinet.xml b/data_model/master/device_types/TemperatureControlledCabinet.xml index 299037e145d901..68788e22d7db06 100644 --- a/data_model/master/device_types/TemperatureControlledCabinet.xml +++ b/data_model/master/device_types/TemperatureControlledCabinet.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/TemperatureSensor.xml b/data_model/master/device_types/TemperatureSensor.xml index d6ccd5c18db89f..bf3221858dc103 100644 --- a/data_model/master/device_types/TemperatureSensor.xml +++ b/data_model/master/device_types/TemperatureSensor.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/Thermostat.xml b/data_model/master/device_types/Thermostat.xml index 6acdf63b10eba0..dfc55d628a5b6e 100644 --- a/data_model/master/device_types/Thermostat.xml +++ b/data_model/master/device_types/Thermostat.xml @@ -55,11 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + + @@ -72,60 +73,27 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + - - - - + + - - - - + + diff --git a/data_model/master/device_types/ThreadBorderRouter.xml b/data_model/master/device_types/ThreadBorderRouter.xml index 73561999d60eba..abe38a81396cd6 100644 --- a/data_model/master/device_types/ThreadBorderRouter.xml +++ b/data_model/master/device_types/ThreadBorderRouter.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/VideoRemoteControl.xml b/data_model/master/device_types/VideoRemoteControl.xml index 7896a6f6ee6be5..de83b02508a89f 100644 --- a/data_model/master/device_types/VideoRemoteControl.xml +++ b/data_model/master/device_types/VideoRemoteControl.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/WaterFreezeDetector.xml b/data_model/master/device_types/WaterFreezeDetector.xml index f3c5f0580af21f..b2f4a49a7847e4 100644 --- a/data_model/master/device_types/WaterFreezeDetector.xml +++ b/data_model/master/device_types/WaterFreezeDetector.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/WaterHeater.xml b/data_model/master/device_types/WaterHeater.xml index 6e80928d792cfc..9d038d89c55563 100644 --- a/data_model/master/device_types/WaterHeater.xml +++ b/data_model/master/device_types/WaterHeater.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/WaterLeakDetector.xml b/data_model/master/device_types/WaterLeakDetector.xml index 0518d148910c78..7277ce69908fb6 100644 --- a/data_model/master/device_types/WaterLeakDetector.xml +++ b/data_model/master/device_types/WaterLeakDetector.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/WaterValve.xml b/data_model/master/device_types/WaterValve.xml index 5c65f4565f6746..21b77edf5fc614 100644 --- a/data_model/master/device_types/WaterValve.xml +++ b/data_model/master/device_types/WaterValve.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/WindowCovering.xml b/data_model/master/device_types/WindowCovering.xml index a2d54453b7337f..a2e16beba60ee1 100644 --- a/data_model/master/device_types/WindowCovering.xml +++ b/data_model/master/device_types/WindowCovering.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -75,15 +75,6 @@ Davis, CA 95616, USA - - - - - - - - - diff --git a/data_model/master/device_types/WindowCoveringController.xml b/data_model/master/device_types/WindowCoveringController.xml index c48f327754c599..189fee3d9d6303 100644 --- a/data_model/master/device_types/WindowCoveringController.xml +++ b/data_model/master/device_types/WindowCoveringController.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + @@ -78,15 +78,6 @@ Davis, CA 95616, USA - - - - - - - - - diff --git a/data_model/master/spec_sha b/data_model/master/spec_sha index 51aac4d9e877f4..16b2cbb1caa026 100644 --- a/data_model/master/spec_sha +++ b/data_model/master/spec_sha @@ -1 +1 @@ -358a64a52ea9583f19be23c7da0e33f19d4b1ee0 +12e2fa3014b316b202eed892cb50dec7b6851d8e diff --git a/docs/spec_clusters.md b/docs/spec_clusters.md index ef58f016154446..05bd215fe583dc 100644 --- a/docs/spec_clusters.md +++ b/docs/spec_clusters.md @@ -7,7 +7,6 @@ This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.p |4 |0x0004 |Groups | |6 |0x0006 |On/Off | |8 |0x0008 |Level Control | -|28 |0x001C |Pulse Width Modulation | |29 |0x001D |Descriptor | |30 |0x001E |Binding | |31 |0x001F |AccessControl | @@ -63,23 +62,31 @@ This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.p |98 |0x0062 |Scenes Management | |113 |0x0071 |HEPA Filter Monitoring | |114 |0x0072 |Activated Carbon Filter Monitoring | +|121 |0x0079 |Water Tank Level Monitoring | |128 |0x0080 |Boolean State Configuration | |129 |0x0081 |Valve Configuration and Control | |144 |0x0090 |Electrical Power Measurement | |145 |0x0091 |Electrical Energy Measurement | +|148 |0x0094 |Water Heater Management | +|149 |0x0095 |Energy Price | +|150 |0x0096 |Demand Response Load Control | |151 |0x0097 |Messages | |152 |0x0098 |Device Energy Management | |153 |0x0099 |Energy EVSE | +|154 |0x009A |Energy Calendar | |155 |0x009B |Energy Preference | |156 |0x009C |Power Topology | |157 |0x009D |Energy EVSE Mode | +|158 |0x009E |Water Heater Mode | |159 |0x009F |Device Energy Management Mode | |257 |0x0101 |Door Lock | |258 |0x0102 |Window Covering | +|336 |0x0150 |Service Area | |512 |0x0200 |Pump Configuration and Control | |513 |0x0201 |Thermostat | |514 |0x0202 |Fan Control | |516 |0x0204 |Thermostat User Interface Configuration | +|517 |0x0205 |Humidistat | |768 |0x0300 |Color Control | |769 |0x0301 |Ballast Configuration | |1024 |0x0400 |Illuminance Measurement | @@ -98,6 +105,10 @@ This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.p |1069 |0x042D |PM10 Concentration Measurement | |1070 |0x042E |Total Volatile Organic Compounds Concentration Measurement| |1071 |0x042F |Radon Concentration Measurement | +|1104 |0x0450 |Network Identity Management | +|1105 |0x0451 |Wi-Fi Network Management | +|1106 |0x0452 |Thread Border Router Management | +|1107 |0x0453 |Thread Network Directory | |1283 |0x0503 |Wake on LAN | |1284 |0x0504 |Channel | |1285 |0x0505 |Target Navigator | @@ -112,3 +123,5 @@ This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.p |1294 |0x050E |Account Login | |1295 |0x050F |Content Control | |1296 |0x0510 |Content App Observer | +|1872 |0x0750 |Ecosystem Information | +|1873 |0x0751 |Commissioner Control | diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 28b6ab7c6fcb1b..7dca226d8287b5 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2603,7 +2603,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; callback attribute clusterRevision; } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 605da39d72da56..8e25d9248c1429 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -401,7 +401,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index c64a3470d19ed1..2a0fe309f20a4c 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -76,8 +76,7 @@ def record_warning(location, problem): ignore_attributes: dict[int, list[int]] = {} if ignore_in_progress: # This is a manually curated list of attributes that are in-progress in the SDK, but have landed in the spec - in_progress_attributes = {Clusters.BasicInformation.id: [0x15, 0x016], - Clusters.PowerSource.id: [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A]} + in_progress_attributes = {Clusters.ThreadNetworkDiagnostics.id: [0x3F, 0x40]} ignore_attributes.update(in_progress_attributes) if is_ci: @@ -337,7 +336,9 @@ async def setup_class(self): await self.setup_class_helper() def test_TC_IDM_10_2(self): - ignore_in_progress = self.user_params.get("ignore_in_progress", False) + # TODO: Turn this off after TE2 + # https://github.com/project-chip/connectedhomeip/issues/34615 + ignore_in_progress = self.user_params.get("ignore_in_progress", True) is_ci = self.check_pics('PICS_SDK_CI_ONLY') success, problems = self.check_conformance(ignore_in_progress, is_ci) self.problems.extend(problems) diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index fadd6a517a4531..0523ebbcd6a6df 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -235,20 +235,17 @@ def setup_class(self): def test_build_xml_override(self): # checks that the 1.3 spec (default) does not contain in-progress clusters and the TOT does tot_xml_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.kMaster) - asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(self.spec_xml_clusters.keys())), + one_three_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_3) + asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(one_three_clusters.keys())), 0, "In progress dir does not contain any clusters not in 1.3") # only the pulse width modulation cluster was removed post 1.3 - asserts.assert_equal(set(self.spec_xml_clusters.keys()) - set(tot_xml_clusters.keys()), + asserts.assert_equal(set(one_three_clusters.keys()) - set(tot_xml_clusters.keys()), set([Clusters.PulseWidthModulation.id]), "There are some 1.3 clusters that are not included in the TOT spec") - str_path = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.3', 'clusters')) + str_path = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'master', 'clusters')) string_override_check, problems = build_xml_clusters(str_path) asserts.assert_equal(string_override_check.keys(), self.spec_xml_clusters.keys(), "Mismatched cluster generation") - path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.3', 'clusters') - path_override_check, problems = build_xml_clusters(path) - asserts.assert_equal(path_override_check.keys(), self.spec_xml_clusters.keys(), "Mismatched cluster generation") - with asserts.assert_raises(SpecParsingException): build_xml_clusters("baddir") diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index e106167e7b5487..1b8e29c4cf33cf 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -517,7 +517,7 @@ def _get_data_model_directory(data_model_directory: typing.Union[PrebuiltDataMod return data_model_directory -def build_xml_clusters(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_3) -> tuple[dict[uint, XmlCluster], list[ProblemNotice]]: +def build_xml_clusters(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kMaster) -> tuple[dict[uint, XmlCluster], list[ProblemNotice]]: dir = _get_data_model_directory(data_model_directory, DataModelLevel.kCluster) clusters: dict[int, XmlCluster] = {} @@ -743,7 +743,7 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot return device_types, problems -def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_3) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: +def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kMaster) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: dir = _get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) device_types: dict[int, XmlDeviceType] = {} problems = [] From 78adc4d2e9254305f30218a7dfeff0aae384a642 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 30 Jul 2024 12:27:44 -0400 Subject: [PATCH 18/27] Make struct name fixup work correctly for nested structs. (#34619) The code that did struct name fixup did not handle nested structs (e.g. struct-typed command fields, or struct-typed struct fields) correctly. In particular, it would not recursively call itself on the value for a field unless it was fixing up the field name. But there might be field names that don't need fixup that have values that are structs whose fields do need name fixup. The fix is to always call StructFieldsNameConverter on field values, and only condition the deletion of the "old name" from the value dictionary on whether the name is being fixed up. --- .../matter_chip_tool_adapter/decoder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py index cd77147fff40d6..68effa7bb30dbc 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py @@ -322,7 +322,7 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool): provided_field_name = provided_field_name[0].lower( ) + provided_field_name[1:] - if provided_field_name in value and provided_field_name != field_name: + if provided_field_name in value: value[field_name] = self.run( specs, value[provided_field_name], @@ -330,7 +330,8 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool): field_type, field_array ) - del value[provided_field_name] + if provided_field_name != field_name: + del value[provided_field_name] if specs.is_fabric_scoped(struct): if _FABRIC_INDEX_FIELD_CODE in value: From 3a9942350c93560c667aec5b3cf8f2d98adf8b10 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 31 Jul 2024 01:43:42 +0900 Subject: [PATCH 19/27] Fix Bootstrap error in Darwin platform (#34608) --- src/messaging/tests/java/BUILD.gn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/messaging/tests/java/BUILD.gn b/src/messaging/tests/java/BUILD.gn index b04e48c2224060..2a1ae118670852 100644 --- a/src/messaging/tests/java/BUILD.gn +++ b/src/messaging/tests/java/BUILD.gn @@ -36,7 +36,11 @@ shared_library("jni") { defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] include_dirs = java_matter_controller_dependent_paths - deps += [ "${chip_root}/src/platform/Linux" ] + if (current_os == "mac") { + deps += [ "${chip_root}/src/platform/Darwin" ] + } else { + deps += [ "${chip_root}/src/platform/Linux" ] + } cflags = [ "-Wno-unknown-pragmas" ] From 268e7ca1e1ef867ea0a0ab8872d3aa2c0d1e46b5 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 30 Jul 2024 13:08:58 -0400 Subject: [PATCH 20/27] Add StayActiveDuration to KeepActive in BridgedDevInfo (#34631) --- .../placeholder/linux/apps/app1/config.matter | 6 +++++- .../placeholder/linux/apps/app2/config.matter | 6 +++++- .../chip/bridged-device-basic-information.xml | 1 + .../data_model/controller-clusters.matter | 6 +++++- .../chip/devicecontroller/ChipClusters.java | 10 +++++++--- .../devicecontroller/ClusterIDMapping.java | 19 ++++++++++++++++++- .../devicecontroller/ClusterInfoMapping.java | 5 +++++ .../BridgedDeviceBasicInformationCluster.kt | 6 +++++- .../python/chip/clusters/CHIPClusters.py | 1 + .../python/chip/clusters/Objects.py | 3 +++ .../CHIP/zap-generated/MTRBaseClusters.h | 4 +--- .../CHIP/zap-generated/MTRBaseClusters.mm | 6 +----- .../CHIP/zap-generated/MTRClusters.h | 4 +--- .../CHIP/zap-generated/MTRClusters.mm | 6 +----- .../zap-generated/MTRCommandPayloadsObjc.h | 2 ++ .../zap-generated/MTRCommandPayloadsObjc.mm | 8 +++++++- .../zap-generated/cluster-objects.cpp | 14 ++++++++++++++ .../zap-generated/cluster-objects.h | 4 ++++ .../zap-generated/cluster/Commands.h | 1 + .../zap-generated/cluster/Commands.h | 7 +++++++ 20 files changed, 94 insertions(+), 25 deletions(-) diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c0c18889b0ad75..3b9a3039f30a7a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2441,8 +2441,12 @@ cluster BridgedDeviceBasicInformation = 57 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct KeepActiveRequest { + int32u stayActiveDuration = 0; + } + /** The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. */ - command KeepActive(): DefaultSuccess = 128; + command KeepActive(KeepActiveRequest): DefaultSuccess = 128; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index bb83b832a456eb..341c9b5b07d725 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2398,8 +2398,12 @@ cluster BridgedDeviceBasicInformation = 57 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct KeepActiveRequest { + int32u stayActiveDuration = 0; + } + /** The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. */ - command KeepActive(): DefaultSuccess = 128; + command KeepActive(KeepActiveRequest): DefaultSuccess = 128; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml index ff118a8a80c162..74f88bea39e623 100644 --- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml @@ -96,6 +96,7 @@ limitations under the License. The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 49270ba950a203..47fdf1ec0a0072 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2346,8 +2346,12 @@ cluster BridgedDeviceBasicInformation = 57 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct KeepActiveRequest { + int32u stayActiveDuration = 0; + } + /** The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. */ - command KeepActive(): DefaultSuccess = 128; + command KeepActive(KeepActiveRequest): DefaultSuccess = 128; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 902e2c58c5f05b..9a39e2f20eecd1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -15050,14 +15050,18 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void keepActive(DefaultClusterCallback callback) { - keepActive(callback, 0); + public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration) { + keepActive(callback, stayActiveDuration, 0); } - public void keepActive(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration, int timedInvokeTimeoutMs) { final long commandId = 128L; ArrayList elements = new ArrayList<>(); + final long stayActiveDurationFieldID = 0L; + BaseTLVType stayActiveDurationtlvValue = new UIntType(stayActiveDuration); + elements.add(new StructElement(stayActiveDurationFieldID, stayActiveDurationtlvValue)); + StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 4f35a400729633..e411dd6acabf6b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -4520,7 +4520,24 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum KeepActiveCommandField {StayActiveDuration(0),; + private final int id; + KeepActiveCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static KeepActiveCommandField value(int id) throws NoSuchFieldError { + for (KeepActiveCommandField field : KeepActiveCommandField.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 32c11522656305..a70357a4d5ae63 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -24259,10 +24259,15 @@ public Map> getCommandMap() { Map bridgedDeviceBasicInformationClusterInteractionInfoMap = new LinkedHashMap<>(); Map bridgedDeviceBasicInformationkeepActiveCommandParams = new LinkedHashMap(); + + CommandParameterInfo bridgedDeviceBasicInformationkeepActivestayActiveDurationCommandParameterInfo = new CommandParameterInfo("stayActiveDuration", Long.class, Long.class); + bridgedDeviceBasicInformationkeepActiveCommandParams.put("stayActiveDuration",bridgedDeviceBasicInformationkeepActivestayActiveDurationCommandParameterInfo); InteractionInfo bridgedDeviceBasicInformationkeepActiveInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.BridgedDeviceBasicInformationCluster) cluster) .keepActive((DefaultClusterCallback) callback + , (Long) + commandArguments.get("stayActiveDuration") ); }, () -> new DelegatedDefaultClusterCallback(), diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt index 45adb1bb8f7820..64742323eec50c 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt @@ -40,6 +40,7 @@ import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag import matter.tlv.TlvReader import matter.tlv.TlvWriter @@ -100,11 +101,14 @@ class BridgedDeviceBasicInformationCluster( object SubscriptionEstablished : AttributeListAttributeSubscriptionState() } - suspend fun keepActive(timedInvokeTimeout: Duration? = null) { + suspend fun keepActive(stayActiveDuration: UInt, timedInvokeTimeout: Duration? = null) { val commandId: UInt = 128u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) + + val TAG_STAY_ACTIVE_DURATION_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STAY_ACTIVE_DURATION_REQ), stayActiveDuration) tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index e5c251bd53d3e4..8822e6da3ddf43 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3269,6 +3269,7 @@ class ChipClusters: "commandId": 0x00000080, "commandName": "KeepActive", "args": { + "stayActiveDuration": "int", }, }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b923462876b988..9f1772de0df353 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -11663,8 +11663,11 @@ class KeepActive(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="stayActiveDuration", Tag=0, Type=uint), ]) + stayActiveDuration: 'uint' = 0 + class Attributes: @dataclass class VendorName(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 88cc90f0b3ed6d..135d257b47def4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -3694,9 +3694,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. */ -- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)keepActiveWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 103f747b59648c..5abe4201d30f97 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -30755,11 +30755,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @implementation MTRBaseClusterBridgedDeviceBasicInformation -- (void)keepActiveWithCompletion:(MTRStatusCompletion)completion -{ - [self keepActiveWithParams:nil completion:completion]; -} -- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 6d876289b45da7..31af660ff48bdd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1705,9 +1705,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRClusterBridgedDeviceBasicInformation : MTRGenericCluster -- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)keepActiveWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f02099707e8492..234021b2e21680 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -4981,11 +4981,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam @implementation MTRClusterBridgedDeviceBasicInformation -- (void)keepActiveWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self keepActiveWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index c342b48733f0ae..4e48aacecef932 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2966,6 +2966,8 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRBridgedDeviceBasicInformationClusterKeepActiveParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 1c169ada167282..2302daefbc7b75 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -7745,6 +7745,8 @@ @implementation MTRBridgedDeviceBasicInformationClusterKeepActiveParams - (instancetype)init { if (self = [super init]) { + + _stayActiveDuration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7755,6 +7757,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; + other.stayActiveDuration = self.stayActiveDuration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7763,7 +7766,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stayActiveDuration:%@; >", NSStringFromClass([self class]), _stayActiveDuration]; return descriptionString; } @@ -7775,6 +7778,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.stayActiveDuration = self.stayActiveDuration.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { 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 ece269d349ee66..5be9fcbca49e35 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 @@ -8104,6 +8104,7 @@ namespace KeepActive { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStayActiveDuration), stayActiveDuration); return encoder.Finalize(); } @@ -8117,6 +8118,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStayActiveDuration)) + { + err = DataModel::Decode(reader, stayActiveDuration); + } + else + { + } + + ReturnErrorOnFailure(err); } } } // namespace KeepActive. 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 c802f8620dcae3..d063efed42f33c 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 @@ -10934,6 +10934,7 @@ namespace Commands { namespace KeepActive { enum class Fields : uint8_t { + kStayActiveDuration = 0, }; struct Type @@ -10943,6 +10944,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::KeepActive::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + uint32_t stayActiveDuration = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10956,6 +10959,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::KeepActive::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + uint32_t stayActiveDuration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace KeepActive diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 34750c907aa558..ef106d4b455b5a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3482,6 +3482,7 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand BridgedDeviceBasicInformationKeepActive(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("keep-active", credsIssuerConfig) { + AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); ClusterCommand::AddArguments(); } 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 185ea72f6e3622..8e3aa2bfd88f09 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -39763,6 +39763,9 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { BridgedDeviceBasicInformationKeepActive() : ClusterCommand("keep-active") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -39777,6 +39780,9 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -39797,6 +39803,7 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { } private: + chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL From 9fc8c773b57ea154535119a3f4dccd12c874918b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:10:51 +0200 Subject: [PATCH 21/27] [Zephyr] Fix build issues with LTO (#34633) * [Zephyr] Fix sys_heap malloc build with LTO Fix the build of Matter samples with sys_heap malloc enabled. The linker errors would occur because: 1. The realloc() function is not used outside the LTO- optimized code. 2. Thus, the LTO linker plugin would mark __wrap_realloc symbol as PREVAILING_DEF_IRONLY, which would enable the compiler to optimize away the function. 3. As a result, undefined references to realloc() could not be resolved by the linker. Mark malloc/calloc/realloc/free as externally visible. Signed-off-by: Damian Krolik * [nrfconnect] Do not link libCHIPShell.a with --whole-archive libCHIPShell.a is already part of libCHIP.a but the former had to be linked additionally with --whole-archive flag to process the shell and init objects defined with SHELL_XXX and SYS_INIT Zephyr macros and, in turn, register Matter shell commands properly. This symbol duplication between the two libraries causes issues when building Matter with LTO, so replace the current approach with explicitly pulling in one symbol from MainLoopZephyr.cpp file. Signed-off-by: Damian Krolik * [nrfconnect] Build all clusters app for nRF7002 with LTO The flash usage on this app/platform is close to the limit. Enable LTO to prevent from blocking the incoming PRs. Signed-off-by: Damian Krolik --------- Signed-off-by: Damian Krolik --- config/nrfconnect/chip-module/CMakeLists.txt | 11 +++++- .../nrfconnect/prj_release.conf | 4 +++ src/lib/shell/MainLoopZephyr.cpp | 4 +-- src/platform/Zephyr/SysHeapMalloc.cpp | 35 +++++++++++-------- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index bccd16b1416160..20c5c692b68633 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -200,7 +200,6 @@ matter_generate_args_tmp_file() # ============================================================================== matter_build(chip - LIB_SHELL ${CONFIG_CHIP_LIB_SHELL} LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS} DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER} GN_DEPENDENCIES kernel @@ -225,6 +224,16 @@ if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE) ) endif() +if (CONFIG_CHIP_LIB_SHELL) + # Force pulling chip::Shell::Engine::RunMainLoop() in the final binary. + # Without this workaround, the linker script does not process the shell and + # init objects defined in MainLoopZephyr.cpp unless the Matter library or + # the Matter shell library is linked using the '--whole-archive' flag. + target_link_options(chip INTERFACE + -Wl,-u,_ZN4chip5Shell6Engine11RunMainLoopEv + ) +endif() + # ============================================================================== # Define 'chip-ota-image' target for building CHIP OTA image # ============================================================================== diff --git a/examples/all-clusters-app/nrfconnect/prj_release.conf b/examples/all-clusters-app/nrfconnect/prj_release.conf index b98004283b64b9..18685a7488fce5 100644 --- a/examples/all-clusters-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-app/nrfconnect/prj_release.conf @@ -62,3 +62,7 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=y # Enable the Read Client for binding purposes CONFIG_CHIP_ENABLE_READ_CLIENT=y + +# Enable LTO to reduce the flash usage +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index 84fca4ef9d29af..108ed2e4385ad7 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -91,7 +91,7 @@ int ExecCommandInShellThread(const struct shell * shell, size_t argc, char ** ar return error == CHIP_NO_ERROR ? 0 : -ENOEXEC; } -int RegisterCommands() +int RegisterMatterCommands() { Shell::Engine::Root().RegisterDefaultCommands(); return 0; @@ -99,7 +99,7 @@ int RegisterCommands() } // namespace -SYS_INIT(RegisterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +SYS_INIT(RegisterMatterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); SHELL_CMD_ARG_REGISTER(matter, NULL, "Matter commands", ExecCommandInShellThread, 1, CHIP_SHELL_MAX_TOKENS); namespace chip { diff --git a/src/platform/Zephyr/SysHeapMalloc.cpp b/src/platform/Zephyr/SysHeapMalloc.cpp index d4f65b05459615..fbd7ba09fc2493 100644 --- a/src/platform/Zephyr/SysHeapMalloc.cpp +++ b/src/platform/Zephyr/SysHeapMalloc.cpp @@ -30,9 +30,6 @@ extern "C" { #include #include -// Construct name of the given function wrapped with the `--wrap=symbol` GCC option. -#define WRAP(f) __wrap_##f - using namespace chip; namespace { @@ -67,7 +64,7 @@ LockGuard::~LockGuard() } } -int initHeap() +int InitSysHeapMalloc() { sys_heap_init(&sHeap, sHeapMemory, sizeof(sHeapMemory)); return 0; @@ -77,7 +74,7 @@ int initHeap() // Initialize the heap in the POST_KERNEL phase to make sure that it is ready even before // C++ static constructors are called (which happens prior to the APPLICATION initialization phase). -SYS_INIT(initHeap, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +SYS_INIT(InitSysHeapMalloc, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); namespace chip { namespace DeviceLayer { @@ -99,7 +96,7 @@ void * Calloc(size_t num, size_t size) return nullptr; } - void * mem = malloc(totalSize); + void * mem = Malloc(totalSize); if (mem) { @@ -156,27 +153,37 @@ void ResetMaxStats() extern "C" { -void * WRAP(malloc)(size_t size) __attribute((alias("_ZN4chip11DeviceLayer6Malloc6MallocEj"))); -void * WRAP(calloc)(size_t num, size_t size) __attribute((alias("_ZN4chip11DeviceLayer6Malloc6CallocEjj"))); -void * WRAP(realloc)(void * mem, size_t size) __attribute((alias("_ZN4chip11DeviceLayer6Malloc7ReallocEPvj"))); -void WRAP(free)(void * mem) __attribute((alias("_ZN4chip11DeviceLayer6Malloc4FreeEPv"))); +// Construct the name of a function wrapped with the `--wrap=symbol` GCC option. +#define WRAP(f) __wrap_##f + +// Define a function as an alias of another function. +#define ALIAS(f) __attribute((alias(f))) + +// Mark a function as externally visible so that it is not optimized-away even +// if LTO or whole-program optimization is enabled. +#define EXTERNALLY_VISIBLE __attribute((externally_visible)) + +EXTERNALLY_VISIBLE void * WRAP(malloc)(size_t size) ALIAS("_ZN4chip11DeviceLayer6Malloc6MallocEj"); +EXTERNALLY_VISIBLE void * WRAP(calloc)(size_t num, size_t size) ALIAS("_ZN4chip11DeviceLayer6Malloc6CallocEjj"); +EXTERNALLY_VISIBLE void * WRAP(realloc)(void * mem, size_t size) ALIAS("_ZN4chip11DeviceLayer6Malloc7ReallocEPvj"); +EXTERNALLY_VISIBLE void WRAP(free)(void * mem) ALIAS("_ZN4chip11DeviceLayer6Malloc4FreeEPv"); -void * WRAP(_malloc_r)(_reent *, size_t size) +EXTERNALLY_VISIBLE void * WRAP(_malloc_r)(_reent *, size_t size) { return WRAP(malloc)(size); } -void * WRAP(_calloc_r)(_reent *, size_t num, size_t size) +EXTERNALLY_VISIBLE void * WRAP(_calloc_r)(_reent *, size_t num, size_t size) { return WRAP(calloc)(num, size); } -void * WRAP(_realloc_r)(_reent *, void * mem, size_t size) +EXTERNALLY_VISIBLE void * WRAP(_realloc_r)(_reent *, void * mem, size_t size) { return WRAP(realloc)(mem, size); } -void WRAP(_free_r)(_reent *, void * mem) +EXTERNALLY_VISIBLE void WRAP(_free_r)(_reent *, void * mem) { WRAP(free)(mem); } From 3263e403469fd66827d923484a50ddb504544112 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 30 Jul 2024 20:44:15 +0200 Subject: [PATCH 22/27] Yaml for check for fabricSynchronization condition on Agregator device (#34629) * Check for FabricSynchronization condition on Aggregator device * Update after code review * Restyled by prettier-yaml * Remove python changes * Exclude TestFabricSyncBridgedNode from required list * Update PICS according to conversation in CHIP-Specification --------- Co-authored-by: Arkadiusz Bokowy Co-authored-by: Restyled.io --- scripts/tests/chiptest/__init__.py | 1 + .../suites/TestFabricSyncBridgedNode.yaml | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 src/app/tests/suites/TestFabricSyncBridgedNode.yaml diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 9d887a56580713..29aa9d47dce42d 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -157,6 +157,7 @@ def _GetInDevelopmentTests() -> Set[str]: # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes # TestEventTriggersEnabled is true, which it's not in CI. + "TestFabricSyncBridgedNode.yaml", # [TODO] fabric-bridge-app lacks some feature so this test currently fails } diff --git a/src/app/tests/suites/TestFabricSyncBridgedNode.yaml b/src/app/tests/suites/TestFabricSyncBridgedNode.yaml new file mode 100644 index 00000000000000..6624e710127442 --- /dev/null +++ b/src/app/tests/suites/TestFabricSyncBridgedNode.yaml @@ -0,0 +1,64 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Test Fabric Synchronization condition on Bridged Node Device Type + +PICS: + - MCORE.FS + +config: + nodeId: 0x12344321 + endpoint: 1 + endpointCommissionerControl: 0 + +tests: + - label: + "Read the DeviceTypeList attribute of the Descriptor cluster and check + whether the device type is Aggregator." + cluster: "Descriptor" + command: "readAttribute" + attribute: "DeviceTypeList" + response: + value: [ + { + DeviceType: 14, # Aggregator + }, + ] + + - label: + "Read the ServerList attribute of the Descriptor cluster and check + whether the Commissioner Control is present." + endpoint: endpointCommissionerControl + cluster: "Descriptor" + command: "readAttribute" + attribute: "ServerList" + response: + constraints: + type: list + contains: [ + 0x0751, # Commissioner Control Cluster + ] + + - label: + "Read the SupportedDeviceCategories attribute of the Commissioner + Control cluster and check whether the FabricSynchronization bit is + set." + endpoint: endpointCommissionerControl + cluster: "CommissionerControl" + command: "readAttribute" + attribute: "SupportedDeviceCategories" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x01] From ccd8da9764597a1f48f712c8eb0098f1d3c51b6e Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Tue, 30 Jul 2024 15:26:09 -0400 Subject: [PATCH 23/27] Fix compile error on older g++ (#34630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Older g++ in Ubuntu 20.04LTS seems to have issues with invalidly doing integer promotion in some cases where it otherwise should not happen. This broke for some developers with: ``` ../../third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp: In member function ‘void chip::app::Clusters::WaterHeaterManagement::WaterHeaterManagementDelegate::DrawOffHotWater(chip::Percent, uint16_t)’: ../../third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp:306:29: error: conversion from ‘int’ to ‘chip::Percent’ {aka ‘unsigned char’} may change value [-Werror=conversion] 306 | mTankPercentage -= percentageReplaced; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ At global scope: cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror] cc1plus: all warnings being treated as errors [17/171] c++ obj/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/src/chip-all-clusters-common.device-energy-management-mode.cpp.o ninja: build stopped: subcommand failed. ``` - This PR fixes the issue (validated with one such user). --- .../all-clusters-common/include/WhmDelegate.h | 2 +- .../all-clusters-common/src/WhmDelegateImpl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h b/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h index ecabfe22792f25..ad73239e77990d 100644 --- a/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h +++ b/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h @@ -167,7 +167,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate * @param percentageReplaced The % of water being replaced with water with a temperature of replacedWaterTemperature. * @param replacedWaterTemperature The temperature of the percentageReplaced water. */ - void DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature); + void DrawOffHotWater(chip::Percent percentageReplaced, uint16_t replacedWaterTemperature); private: /** diff --git a/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp b/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp index fd19a3c59d740b..0568e5c9c7d002 100644 --- a/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp @@ -294,7 +294,7 @@ void WaterHeaterManagementDelegate::SetTargetWaterTemperature(uint16_t targetWat CheckIfHeatNeedsToBeTurnedOnOrOff(); } -void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature) +void WaterHeaterManagementDelegate::DrawOffHotWater(Percent percentageReplaced, uint16_t replacedWaterTemperature) { // Only supported in the kTankPercent is supported. // Replaces percentageReplaced% of the water in the tank with water of a temperature replacedWaterTemperature @@ -303,7 +303,7 @@ void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced, // See if all of the water has now been replaced with replacedWaterTemperature if (mTankPercentage >= percentageReplaced) { - mTankPercentage -= percentageReplaced; + mTankPercentage = static_cast(mTankPercentage - percentageReplaced); } else { From 9032548ea2ce4da2a9f04d26c8dcbd66d9eed71c Mon Sep 17 00:00:00 2001 From: James Swan <122404367+swan-amazon@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:24:49 -0700 Subject: [PATCH 24/27] Add TC feature definitions to General Commissioning Cluster XML files (#34604) * Add TC feature definitions to General Commissioning Cluster XML files This commit introduces the "Terms and Conditions" (TC) feature definitions to the General Commissioning Cluster XML data model files. The changes include new attributes, commands, and commissioning errors related to the TC feature. Changes include: - Added TC feature definition with bitmask. - Introduced new commissioning errors related to TC: - RequiredTCNotAccepted - TCAcknowledgementsNotReceived - TCMinVersionNotMet - Added new attributes for TC: - TCAcceptedVersion - TCMinRequiredVersion - TCAcknowledgements - TCAcknowledgementsRequired - Added new commands for TC acknowledgements: - SetTCAcknowledgements - SetTCAcknowledgementsResponse These changes only modify the XML files. A follow-up commit will regenerate the necessary files. * Zap regen for Enhanced Setup Flow, Terms and Conditions (TC) * Auto-update ZAP files. ```bash python3 ./scripts/tools/zap_regen_all.py ``` --- .../air-purifier-app.matter | 22 + .../air-quality-sensor-app.matter | 22 + .../all-clusters-app.matter | 22 + .../all-clusters-minimal-app.matter | 22 + .../bridge-common/bridge-app.matter | 22 + ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 22 + .../rootnode_airpurifier_73a6fe2651.matter | 22 + ...umiditysensor_thermostat_56de3d5f45.matter | 22 + ...ootnode_airqualitysensor_e63187f6c9.matter | 22 + ...ootnode_basicvideoplayer_0ff86e943b.matter | 22 + ...de_colortemperaturelight_hbUnzYVeyn.matter | 22 + .../rootnode_contactsensor_27f76aeaf5.matter | 22 + .../rootnode_contactsensor_lFAGG1bfRO.matter | 22 + .../rootnode_dimmablelight_bCwGYSDpoe.matter | 22 + ...tnode_dimmablepluginunit_f8a9a0b9d4.matter | 22 + .../rootnode_dishwasher_cc105034fe.matter | 22 + .../rootnode_doorlock_aNKYAreMXE.matter | 22 + ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 22 + .../devices/rootnode_fan_7N2TobIlOX.matter | 22 + .../rootnode_flowsensor_1zVxHedlaV.matter | 22 + .../rootnode_genericswitch_2dfff6e516.matter | 22 + .../rootnode_genericswitch_9866e35d0b.matter | 22 + ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 22 + .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 22 + .../rootnode_laundrywasher_fb10d238c8.matter | 22 + .../rootnode_lightsensor_lZQycTFcJK.matter | 22 + ...rootnode_occupancysensor_iHyVgifZuo.matter | 22 + .../rootnode_onofflight_bbs1b7IaOV.matter | 22 + .../rootnode_onofflight_samplemei.matter | 22 + ...ootnode_onofflightswitch_FsPlMr090Q.matter | 22 + ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 22 + .../rootnode_pressuresensor_s0qC9wLH4k.matter | 22 + .../devices/rootnode_pump_5f904818cc.matter | 22 + .../devices/rootnode_pump_a811bb33a0.matter | 22 + ...eraturecontrolledcabinet_ffdb696680.matter | 22 + ...ode_roboticvacuumcleaner_1807ff0c49.matter | 22 + ...tnode_roomairconditioner_9cf3607804.matter | 22 + .../rootnode_smokecoalarm_686fe0dcb8.matter | 22 + .../rootnode_speaker_RpzeXdimqA.matter | 22 + ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 22 + .../rootnode_thermostat_bm3fb8dhYi.matter | 22 + .../rootnode_windowcovering_RLCxaGi9Yx.matter | 22 + .../contact-sensor-app.matter | 22 + .../nxp/zap-lit/contact-sensor-app.matter | 22 + .../nxp/zap-sit/contact-sensor-app.matter | 22 + .../dishwasher-common/dishwasher-app.matter | 22 + .../energy-management-app.matter | 22 + .../fabric-bridge-app.matter | 22 + .../nxp/zap/laundry-washer-app.matter | 22 + .../light-switch-app.matter | 22 + .../light-switch-app/qpg/zap/switch.matter | 22 + .../data_model/lighting-app-ethernet.matter | 22 + .../data_model/lighting-app-thread.matter | 22 + .../data_model/lighting-app-wifi.matter | 22 + .../lighting-common/lighting-app.matter | 22 + .../nxp/zap/lighting-on-off.matter | 22 + examples/lighting-app/qpg/zap/light.matter | 22 + .../data_model/lighting-thread-app.matter | 22 + .../data_model/lighting-wifi-app.matter | 22 + .../lit-icd-common/lit-icd-server-app.matter | 22 + examples/lock-app/lock-common/lock-app.matter | 22 + examples/lock-app/nxp/zap/lock-app.matter | 22 + examples/lock-app/qpg/zap/lock.matter | 22 + .../log-source-common/log-source-app.matter | 22 + .../microwave-oven-app.matter | 22 + .../network-manager-app.matter | 22 + .../ota-provider-app.matter | 22 + .../ota-requestor-app.matter | 22 + .../placeholder/linux/apps/app1/config.matter | 44 ++ .../placeholder/linux/apps/app2/config.matter | 44 ++ examples/pump-app/pump-common/pump-app.matter | 22 + .../silabs/data_model/pump-thread-app.matter | 22 + .../silabs/data_model/pump-wifi-app.matter | 22 + .../pump-controller-app.matter | 22 + .../refrigerator-app.matter | 22 + examples/rvc-app/rvc-common/rvc-app.matter | 22 + .../smoke-co-alarm-app.matter | 22 + .../temperature-measurement.matter | 22 + .../nxp/zap/thermostat_matter_thread.matter | 22 + .../nxp/zap/thermostat_matter_wifi.matter | 22 + .../qpg/zap/thermostaticRadiatorValve.matter | 22 + .../thermostat-common/thermostat.matter | 22 + examples/tv-app/tv-common/tv-app.matter | 44 ++ .../tv-casting-common/tv-casting-app.matter | 22 + .../virtual-device-app.matter | 22 + examples/window-app/common/window-app.matter | 22 + .../chip/general-commissioning-cluster.xml | 40 +- .../data_model/controller-clusters.matter | 22 + .../chip/devicecontroller/ChipClusters.java | 146 ++++++ .../devicecontroller/ClusterIDMapping.java | 24 +- .../devicecontroller/ClusterInfoMapping.java | 46 ++ .../devicecontroller/ClusterReadMapping.java | 44 ++ .../clusters/GeneralCommissioningCluster.kt | 425 +++++++++++++++++ .../CHIPAttributeTLVValueDecoder.cpp | 64 +++ .../python/chip/clusters/CHIPClusters.py | 32 ++ .../python/chip/clusters/Objects.py | 115 ++++- .../CHIP/templates/availability.yaml | 20 + .../MTRAttributeSpecifiedCheck.mm | 12 + .../MTRAttributeTLVValueDecoder.mm | 44 ++ .../CHIP/zap-generated/MTRBaseClusters.h | 37 ++ .../CHIP/zap-generated/MTRBaseClusters.mm | 168 +++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 6 + .../CHIP/zap-generated/MTRClusterNames.mm | 16 + .../CHIP/zap-generated/MTRClusters.h | 9 + .../CHIP/zap-generated/MTRClusters.mm | 47 ++ .../zap-generated/MTRCommandPayloadsObjc.h | 51 +++ .../zap-generated/MTRCommandPayloadsObjc.mm | 164 +++++++ .../MTRCommandPayloads_Internal.h | 12 + .../zap-generated/attributes/Accessors.cpp | 185 ++++++++ .../zap-generated/attributes/Accessors.h | 24 + .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-enums-check.h | 3 + .../app-common/zap-generated/cluster-enums.h | 21 +- .../zap-generated/cluster-objects.cpp | 81 ++++ .../zap-generated/cluster-objects.h | 129 ++++++ .../app-common/zap-generated/ids/Attributes.h | 16 + .../app-common/zap-generated/ids/Commands.h | 8 + .../zap-generated/cluster/Commands.h | 63 +++ .../cluster/logging/DataModelLogger.cpp | 33 ++ .../cluster/logging/DataModelLogger.h | 3 + .../zap-generated/cluster/Commands.h | 431 ++++++++++++++++++ 121 files changed, 4495 insertions(+), 10 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 6e31f82460ed3a..ddfccaae2a712c 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 @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 c7395570fccff4..9bffe726724599 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 @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 1d15ec2b1d85d6..e33b8841c5d716 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 @@ -1429,6 +1429,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1437,6 +1440,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1447,6 +1454,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1480,12 +1491,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 8dfd81caf3a866..a5c35ac22619af 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 @@ -1309,6 +1309,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1317,6 +1320,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1327,6 +1334,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1360,12 +1371,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index f35fd082eb9900..464f3e2f9a513b 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -948,6 +948,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -956,6 +959,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -966,6 +973,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -999,12 +1010,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index ed03c1ca8ca637..c32b9263f77fd9 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index ae8cdd66b8dd1b..96b3fa5df3f9b5 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -563,6 +563,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -571,6 +574,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -581,6 +588,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -614,12 +625,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 e79a65f165d0d0..915da87f5ec794 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 @@ -414,6 +414,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -422,6 +425,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -432,6 +439,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -465,12 +476,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 7f86f3a66008b6..58038e843e97fc 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -811,6 +811,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -819,6 +822,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -829,6 +836,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -862,12 +873,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index f65d5fc5ad8555..0ce0bdb04dbfa7 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -705,6 +705,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -713,6 +716,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -723,6 +730,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -756,12 +767,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 6f7714fcbbf102..1adf554340e63f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -765,6 +765,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -773,6 +776,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -783,6 +790,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -816,12 +827,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 57718ed32895da..07b6b96881b48c 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -750,6 +750,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -758,6 +761,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -768,6 +775,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -801,12 +812,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 93df8c3e2c0b33..e132687fc65220 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -909,6 +909,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -917,6 +920,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -927,6 +934,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -960,12 +971,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 9dd5331063e27b..17996c2f9bfc42 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index 90b81ab8df5b44..f860ab97b90e25 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 67684011eff2b4..7f236d311fbef9 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -424,6 +424,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -432,6 +435,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -442,6 +449,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -475,12 +486,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index ae0d89f00a685f..38fa4895bc1e3d 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -811,6 +811,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -819,6 +822,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -829,6 +836,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -862,12 +873,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 32244ab3a10758..0ae2064972605a 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 3b0a153455d728..8d41f2e9b0197c 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -629,6 +629,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -637,6 +640,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -647,6 +654,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -680,12 +691,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 8cb484be472e10..5edf324c8213df 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 3a720c7c805fbf..95dcf542a8ab70 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -596,6 +596,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -604,6 +607,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -614,6 +621,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -647,12 +658,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 020c9f0a93c8ed..5e6025b776607f 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -596,6 +596,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -604,6 +607,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -614,6 +621,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -647,12 +658,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 40ddedabc2060d..06ccc592e9c4d4 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 6db777fbefbfe5..39e196626e518a 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 878c3ca1a435c5..460d6988c91959 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -424,6 +424,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -432,6 +435,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -442,6 +449,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -475,12 +486,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 8a6aa2ec17f178..705162a8be6fa8 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 434f47c71fd7f8..3a1a98807efe29 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index d0b5b1a910c11d..9c4ff1c67bc2c0 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 17140385015901..19d0b2d0dd506e 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index cb9f7f2eb6a4ae..ed135332fefbb4 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -794,6 +794,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -802,6 +805,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -812,6 +819,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -845,12 +856,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 627b2c18d523bd..fbc2e10cf430eb 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -722,6 +722,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -730,6 +733,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -740,6 +747,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -773,12 +784,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 67dbddaec37748..002e6fb6ce0f2a 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index 9a2c1905f3ec86..afa0cd4d471863 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -496,6 +496,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -504,6 +507,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -514,6 +521,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -547,12 +558,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index ee410b2a06de4c..6b61dae69dd48c 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -496,6 +496,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -504,6 +507,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -514,6 +521,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -547,12 +558,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 7da74be02935b4..6aca563a77d49c 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -424,6 +424,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -432,6 +435,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -442,6 +449,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -475,12 +486,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 782bfe9c6e8371..bb860795e719bf 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -673,6 +673,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -681,6 +684,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -691,6 +698,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -724,12 +735,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 77bff3c8eea1a3..0f6984304d7da9 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -486,6 +486,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -494,6 +497,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -504,6 +511,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -537,12 +548,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index ed06fdbadaf739..98492723016c84 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -673,6 +673,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -681,6 +684,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -691,6 +698,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -724,12 +735,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index e5ba06a15048b2..24e0be3745fefe 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -770,6 +770,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -778,6 +781,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -788,6 +795,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -821,12 +832,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 85b38d275b7802..d5abd097d394a8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index d532d09cd88569..baa51be533f251 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index f656ebddb7778a..ecb45e1eea68e0 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -650,6 +650,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -658,6 +661,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -668,6 +675,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -701,12 +712,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 e112e8f2e73671..ed76b4fe052c54 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 @@ -629,6 +629,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -637,6 +640,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -647,6 +654,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -680,12 +691,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index 32f653289ae444..cb540a4824742d 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index ae2e6ea4b7b0eb..f7c07ff849ab2f 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index d118b44aed0ac1..81763a112ac05c 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -522,6 +522,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -530,6 +533,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -540,6 +547,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -573,12 +584,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 99512288265038..9abd126fa1c683 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -683,6 +683,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -691,6 +694,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -701,6 +708,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -734,12 +745,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index f776b385bcc383..ca331adef8b9c5 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -466,6 +466,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -474,6 +477,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -484,6 +491,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -517,12 +528,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index ae49f1c25c7bb7..fb8a8c6f57533a 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -1007,6 +1007,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1015,6 +1018,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1025,6 +1032,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1058,12 +1069,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 f5e838972ad2d5..2c8cfc10badd03 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 @@ -772,6 +772,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -780,6 +783,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -790,6 +797,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -823,12 +834,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index bb43ffe002999a..f5baabdef8ef8b 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -1095,6 +1095,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1103,6 +1106,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1113,6 +1120,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1146,12 +1157,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 5b7b85f5857cff..24a8a6e04eba0e 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -826,6 +826,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -834,6 +837,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -844,6 +851,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -877,12 +888,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 1fbfa43ce0ab2e..eff1ba235adbcf 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -826,6 +826,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -834,6 +837,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -844,6 +851,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -877,12 +888,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 a914ba6caeb62b..38e9e739f88365 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -826,6 +826,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -834,6 +837,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -844,6 +851,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -877,12 +888,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 6b50065c4c1c44..55b73e6c35c2ac 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -826,6 +826,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -834,6 +837,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -844,6 +851,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -877,12 +888,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index c990ea3bbfbde3..c6d8d4cd548a24 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -765,6 +765,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -773,6 +776,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -783,6 +790,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -816,12 +827,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 58472a11cb7b1e..82fe03d0f2f725 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -765,6 +765,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -773,6 +776,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -783,6 +790,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -816,12 +827,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 a15d472711c218..e641e8276d81c1 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -826,6 +826,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -834,6 +837,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -844,6 +851,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -877,12 +888,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 1149a126a222d1..4ae7efa1522d83 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1085,6 +1085,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1093,6 +1096,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1103,6 +1110,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1136,12 +1147,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 3e156b926f6e0c..0f0907e3c1a444 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 @@ -517,6 +517,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -525,6 +528,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -535,6 +542,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -568,12 +579,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 7dca226d8287b5..c194f5a6983f05 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -793,6 +793,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -801,6 +804,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -811,6 +818,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -844,12 +855,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 2aa70597fd5266..5684fdc46361b8 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -337,6 +337,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -345,6 +348,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -355,6 +362,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -388,12 +399,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 79aab6924fe618..5cc5f6f354e883 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -568,6 +568,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -576,6 +579,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -586,6 +593,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -619,12 +630,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 c07f3c8a8ffad9..c368032f696621 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 @@ -157,6 +157,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -165,6 +168,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -175,6 +182,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -208,12 +219,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index dd7225e9fa102f..3c686228138dfb 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -381,6 +381,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -389,6 +392,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -399,6 +406,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -432,12 +443,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index e7f55ebbec3808..829518c00e24b0 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -337,6 +337,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -345,6 +348,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -355,6 +362,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -388,12 +399,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 9c1bf10d9330c9..52d40b55ac08d6 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 @@ -553,6 +553,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -561,6 +564,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -571,6 +578,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -604,12 +615,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 055c88a71666e8..f0afcf21730ee4 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 @@ -701,6 +701,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -709,6 +712,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -719,6 +726,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -752,12 +763,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 3b9a3039f30a7a..8d60e86fb52114 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1424,6 +1424,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1432,6 +1435,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1442,6 +1449,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1475,12 +1486,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** This cluster is used to manage global aspects of the Commissioning flow. */ @@ -1493,6 +1515,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1501,6 +1526,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1511,6 +1540,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1544,12 +1577,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 341c9b5b07d725..002e751eeab930 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1381,6 +1381,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1389,6 +1392,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1399,6 +1406,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1432,12 +1443,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** This cluster is used to manage global aspects of the Commissioning flow. */ @@ -1450,6 +1472,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -1458,6 +1483,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1468,6 +1497,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1501,12 +1534,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index e915a40a037fe9..bb24649e1d5373 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -709,6 +709,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -717,6 +720,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -727,6 +734,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -760,12 +771,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 6b6f7894e5268b..98d3fdbfaa2bee 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -709,6 +709,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -717,6 +720,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -727,6 +734,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -760,12 +771,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 6b6f7894e5268b..98d3fdbfaa2bee 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -709,6 +709,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -717,6 +720,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -727,6 +734,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -760,12 +771,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 26ab0343d20e45..58187538be5ba6 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 @@ -584,6 +584,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -592,6 +595,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -602,6 +609,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -635,12 +646,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index 60a01eae22c315..d997c589b9e467 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -374,6 +374,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -382,6 +385,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -392,6 +399,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -425,12 +436,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index fda431160c3622..c22e5758ba17c1 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -337,6 +337,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -345,6 +348,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -355,6 +362,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -388,12 +399,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 346e958ac22fbc..1cfed0b8ce8edc 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 @@ -888,6 +888,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -896,6 +899,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -906,6 +913,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -939,12 +950,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 ccf965c8dd2339..f3dec72d7d33c9 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -528,6 +528,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -536,6 +539,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -546,6 +553,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -579,12 +590,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 3cf062b03c6d2e..6d322db15086c3 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -985,6 +985,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -993,6 +996,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1003,6 +1010,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1036,12 +1047,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index f3065011d62972..2c68853b854ad9 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -985,6 +985,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -993,6 +996,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -1003,6 +1010,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1036,12 +1047,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index a51d01dc8b2633..609460644955c3 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -665,6 +665,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -673,6 +676,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -683,6 +690,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -716,12 +727,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index e63ebeba6df9ae..800182f38d0c67 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -726,6 +726,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -734,6 +737,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -744,6 +751,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -777,12 +788,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index ffc1c6a8ebaaf6..7c50f77e8647ab 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -689,6 +689,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -697,6 +700,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -707,6 +714,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -740,12 +751,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** This cluster is used to manage global aspects of the Commissioning flow. */ @@ -758,6 +780,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -766,6 +791,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -776,6 +805,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -809,12 +842,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 06fba3e02f952a..5dad7807038b48 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 @@ -773,6 +773,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -781,6 +784,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -791,6 +798,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -824,12 +835,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ 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 0a5e801e302ad2..cc933041a0b6d5 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 @@ -929,6 +929,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -937,6 +940,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -947,6 +954,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -980,12 +991,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index ca06461be78396..f95b050278e64b 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -914,6 +914,9 @@ cluster GeneralCommissioning = 48 { kInvalidAuthentication = 2; kNoFailSafe = 3; kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; } enum RegulatoryLocationTypeEnum : enum8 { @@ -922,6 +925,10 @@ cluster GeneralCommissioning = 48 { kIndoorOutdoor = 2; } + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + struct BasicCommissioningInfo { int16u failSafeExpiryLengthSeconds = 0; int16u maxCumulativeFailsafeSeconds = 1; @@ -932,6 +939,10 @@ cluster GeneralCommissioning = 48 { readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -965,12 +976,23 @@ cluster GeneralCommissioning = 48 { char_string debugText = 1; } + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index eabc56a4d95916..da813b60fef2e4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -1,6 +1,6 @@