diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index b0b4fef50e15df..ab85bc1f6c9cdf 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:85 + image: ghcr.io/project-chip/chip-build-efr32:89 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.gitmodules b/.gitmodules index 824bd9954e506c..4eca51b5cf03f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -332,6 +332,7 @@ [submodule "third_party/lwip/repo"] path = third_party/lwip/repo url = https://github.com/lwip-tcpip/lwip.git + excluded-platforms = darwin [submodule "third_party/abseil-cpp/src"] path = third_party/abseil-cpp/src url = https://github.com/abseil/abseil-cpp.git diff --git a/examples/chef/common/chef-laundry-washer-controls-delegate-impl.cpp b/examples/chef/common/chef-laundry-washer-controls-delegate-impl.cpp index 4811b458fe8fc0..f63acf8938bb9f 100644 --- a/examples/chef/common/chef-laundry-washer-controls-delegate-impl.cpp +++ b/examples/chef/common/chef-laundry-washer-controls-delegate-impl.cpp @@ -30,8 +30,10 @@ const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = { }; const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = { + NumberOfRinsesEnum::kNone, NumberOfRinsesEnum::kNormal, NumberOfRinsesEnum::kExtra, + NumberOfRinsesEnum::kMax, }; LaundryWasherControlDelegate LaundryWasherControlDelegate::instance; diff --git a/examples/chef/common/chef-laundry-washer-mode.cpp b/examples/chef/common/chef-laundry-washer-mode.cpp index f24e1c6cbcfec6..8ca637ca29404a 100644 --- a/examples/chef/common/chef-laundry-washer-mode.cpp +++ b/examples/chef/common/chef-laundry-washer-mode.cpp @@ -25,6 +25,7 @@ template using List = chip::app::DataModel::List; using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER static LaundryWasherModeDelegate * gLaundryWasherModeDelegate = nullptr; static ModeBase::Instance * gLaundryWasherModeInstance = nullptr; @@ -94,6 +95,61 @@ void LaundryWasherMode::Shutdown() } } +chip::Protocols::InteractionModel::Status chefLaundryWasherModeWriteCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) +{ + VerifyOrReturnError(endpointId == 1 || gLaundryWasherModeInstance != nullptr, + chip::Protocols::InteractionModel::Status::Failure); + + chip::Protocols::InteractionModel::Status ret; + chip::AttributeId attributeId = attributeMetadata->attributeId; + + switch (attributeId) + { + case chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id: { + uint8_t m = buffer[0]; + ret = gLaundryWasherModeInstance->UpdateCurrentMode(m); + if (chip::Protocols::InteractionModel::Status::Success != ret) + { + ChipLogError(DeviceLayer, "Invalid Attribute Update status: %d", static_cast(ret)); + } + } + break; + default: + ret = chip::Protocols::InteractionModel::Status::UnsupportedWrite; + ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast(attributeId)); + break; + } + + return ret; +} + +chip::Protocols::InteractionModel::Status chefLaundryWasherModeReadCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) +{ + VerifyOrReturnValue(maxReadLength > 0, chip::Protocols::InteractionModel::Status::ResourceExhausted); + + chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; + chip::AttributeId attributeId = attributeMetadata->attributeId; + + switch (attributeId) + { + case chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id: { + *buffer = gLaundryWasherModeInstance->GetCurrentMode(); + ChipLogDetail(DeviceLayer, "Reading LaundryWasherMode CurrentMode : %d", static_cast(attributeId)); + } + break; + default: + ret = chip::Protocols::InteractionModel::Status::UnsupportedRead; + ChipLogDetail(DeviceLayer, "Unsupported attributeId %d from reading RvcCleanMode", static_cast(attributeId)); + break; + } + + return ret; +} + void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. @@ -103,3 +159,4 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId) new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, chip::to_underlying(Feature::kOnOff)); gLaundryWasherModeInstance->Init(); } +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER diff --git a/examples/chef/common/chef-laundry-washer-mode.h b/examples/chef/common/chef-laundry-washer-mode.h index 5d35c03d4e50cd..ffbcc453210f0c 100644 --- a/examples/chef/common/chef-laundry-washer-mode.h +++ b/examples/chef/common/chef-laundry-washer-mode.h @@ -82,3 +82,12 @@ void Shutdown(); } // namespace Clusters } // namespace app } // namespace chip + +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER +chip::Protocols::InteractionModel::Status chefLaundryWasherModeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer); +chip::Protocols::InteractionModel::Status chefLaundryWasherModeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength); +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER diff --git a/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.cpp b/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.cpp new file mode 100644 index 00000000000000..045825d8faf312 --- /dev/null +++ b/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.cpp @@ -0,0 +1,78 @@ +/* + * + * 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. + */ + +#include + +#ifdef MATTER_DM_PLUGIN_TEMPERATURE_CONTROL_SERVER +#include "static-supported-temperature-levels.h" +#include + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::TemperatureControl; +using chip::Protocols::InteractionModel::Status; + +app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; + +CharSpan AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions[] = { "Low"_span, "Medium"_span, "High"_span }; + +const AppSupportedTemperatureLevelsDelegate::EndpointPair AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints + [MATTER_DM_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT] = { EndpointPair( + 1 /* endpointId */, AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions, + ArraySize(AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions)) }; + +uint8_t AppSupportedTemperatureLevelsDelegate::Size() +{ + for (auto & endpointPair : AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints) + { + if (endpointPair.mEndpointId == mEndpoint) + { + return endpointPair.mSize; + } + } + return 0; +} + +CHIP_ERROR AppSupportedTemperatureLevelsDelegate::Next(MutableCharSpan & item) +{ + for (auto & endpointPair : AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints) + { + if (endpointPair.mEndpointId == mEndpoint) + { + if (endpointPair.mSize > mIndex) + { + CHIP_ERROR err = CopyCharSpanToMutableCharSpan(endpointPair.mTemperatureLevels[mIndex], item); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error copying char span to mutable char span %s", ErrorStr(err)); + return err; + } + mIndex++; + return CHIP_NO_ERROR; + } + } + } + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; +} +void emberAfTemperatureControlClusterInitCallback(EndpointId endpoint) +{ + static_assert(MATTER_DM_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT == 1, "This cluster is only enabled for endpoint 1"); + + chip::app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); +} +#endif // MATTER_DM_PLUGIN_TEMPERATURE_CONTROL_SERVER diff --git a/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.h b/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.h new file mode 100644 index 00000000000000..c39bb171c93c58 --- /dev/null +++ b/examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.h @@ -0,0 +1,56 @@ +/* + * + * 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. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace TemperatureControl { + +class AppSupportedTemperatureLevelsDelegate : public SupportedTemperatureLevelsIteratorDelegate +{ + struct EndpointPair + { + EndpointId mEndpointId; + CharSpan * mTemperatureLevels; + uint8_t mSize; + + EndpointPair(EndpointId aEndpointId, CharSpan * TemperatureLevels, uint8_t size) : + mEndpointId(aEndpointId), mTemperatureLevels(TemperatureLevels), mSize(size) + {} + }; + + static CharSpan temperatureLevelOptions[3]; + static const EndpointPair supportedOptionsByEndpoints[MATTER_DM_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT]; + +public: + uint8_t Size() override; + + CHIP_ERROR Next(MutableCharSpan & item) override; + + ~AppSupportedTemperatureLevelsDelegate() {} +}; + +} // namespace TemperatureControl +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 687b572a4ceefb..513bb412920d74 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -62,10 +62,22 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] #include "chef-dishwasher-mode-delegate-impl.h" #endif // MATTER_DM_PLUGIN_DISHWASHER_MODE_SERVER +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER +#include "chef-laundry-washer-mode.h" +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER + +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_CONTROLS_SERVER +#include "chef-laundry-washer-controls-delegate-impl.h" +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_CONTROLS_SERVER + #ifdef MATTER_DM_PLUGIN_OPERATIONAL_STATE_SERVER #include "chef-operational-state-delegate-impl.h" #endif // MATTER_DM_PLUGIN_OPERATIONAL_STATE_SERVER +#ifdef MATTER_DM_PLUGIN_TEMPERATURE_CONTROL_SERVER +#include "temperature-control/static-supported-temperature-levels.h" +#endif // MATTER_DM_PLUGIN_TEMPERATURE_CONTROL_SERVER + Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) @@ -124,6 +136,10 @@ Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(Endpoin case chip::app::Clusters::DishwasherMode::Id: return chefDishwasherModeReadCallback(endpoint, clusterId, attributeMetadata, buffer, maxReadLength); #endif // MATTER_DM_PLUGIN_DISHWASHER_MODE_SERVER +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER + case chip::app::Clusters::LaundryWasherMode::Id: + return chefLaundryWasherModeReadCallback(endpoint, clusterId, attributeMetadata, buffer, maxReadLength); +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER #ifdef MATTER_DM_PLUGIN_OPERATIONAL_STATE_SERVER case chip::app::Clusters::OperationalState::Id: return chefOperationalStateReadCallback(endpoint, clusterId, attributeMetadata, buffer, maxReadLength); @@ -202,6 +218,10 @@ Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(Endpoi case chip::app::Clusters::DishwasherMode::Id: return chefDishwasherModeWriteCallback(endpoint, clusterId, attributeMetadata, buffer); #endif // MATTER_DM_PLUGIN_DISHWASHER_MODE_SERVER +#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER + case chip::app::Clusters::LaundryWasherMode::Id: + return chefLaundryWasherModeWriteCallback(endpoint, clusterId, attributeMetadata, buffer); +#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER #ifdef MATTER_DM_PLUGIN_OPERATIONAL_STATE_SERVER case chip::app::Clusters::OperationalState::Id: return chefOperationalStateWriteCallback(endpoint, clusterId, attributeMetadata, buffer); diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index f38dd8f3dfb7fd..2e76d3f34a3a85 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -241,6 +241,78 @@ struct AtomicAttributeStatusStruct { status statusCode = 1; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +cluster OnOff = 6 { + revision 6; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1345,6 +1417,38 @@ cluster LaundryWasherControls = 83 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +cluster TemperatureControl = 86 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional int8u targetTemperatureLevel = 1; + } + + /** Set Temperature */ + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ cluster OperationalState = 96 { revision 1; @@ -1640,6 +1744,19 @@ endpoint 1 { device type ma_laundry_washer = 115, version 1; + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; + + handle command Off; + handle command On; + handle command Toggle; + } + server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1667,8 +1784,8 @@ endpoint 1 { server cluster LaundryWasherControls { callback attribute spinSpeeds; - ram attribute spinSpeedCurrent; - ram attribute numberOfRinses; + ram attribute spinSpeedCurrent default = 1; + ram attribute numberOfRinses default = 1; callback attribute supportedRinses; callback attribute generatedCommandList; callback attribute acceptedCommandList; @@ -1677,11 +1794,24 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel default = 0; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } + server cluster OperationalState { emits event OperationalError; emits event OperationCompletion; callback attribute phaseList; callback attribute currentPhase; + callback attribute countdownTime; callback attribute operationalStateList; callback attribute operationalState; callback attribute operationalError; @@ -1694,6 +1824,7 @@ endpoint 1 { handle command Pause; handle command Stop; handle command Start; + handle command Resume; handle command OperationalCommandResponse; } } diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index 163f7e1b17ee79..4de60f90e7afa2 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -1,6 +1,6 @@ { "fileFormat": 2, - "featureLevel": 103, + "featureLevel": 104, "creator": "zap", "keyValuePairs": [ { @@ -41,14 +41,16 @@ "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -2670,14 +2672,16 @@ "code": 115, "profileId": 259, "label": "MA-laundry-washer", - "name": "MA-laundry-washer" + "name": "MA-laundry-washer", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 115, "profileId": 259, "label": "MA-laundry-washer", - "name": "MA-laundry-washer" + "name": "MA-laundry-washer", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -2690,6 +2694,138 @@ "deviceTypeCode": 115, "deviceTypeProfileId": 259, "clusters": [ + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Descriptor", "code": 29, @@ -2934,22 +3070,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -3034,7 +3154,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3050,7 +3170,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3105,8 +3225,124 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -3146,7 +3382,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3202,6 +3438,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "OperationalCommandResponse", "code": 4, @@ -3244,6 +3488,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "OperationalStateList", "code": 3, diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index 49f3fbabdc7113..5c8963f7735f6d 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -74,6 +74,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/../common/clusters/resource-monitoring/" "${CMAKE_SOURCE_DIR}/../common/clusters/switch/" "${CMAKE_SOURCE_DIR}/../common/clusters/target-navigator/" + "${CMAKE_SOURCE_DIR}/../common/clusters/temperature-control/" "${CMAKE_SOURCE_DIR}/../common/clusters/wake-on-lan/" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index a65e6e7b6ad3a0..360c5fb349d147 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -65,6 +65,7 @@ executable("${sample_name}") { "${project_dir}/common/clusters/switch/SwitchEventHandler.cpp", "${project_dir}/common/clusters/switch/SwitchManager.cpp", "${project_dir}/common/clusters/target-navigator/TargetNavigatorManager.cpp", + "${project_dir}/common/clusters/temperature-control/static-supported-temperature-levels.cpp", "${project_dir}/common/clusters/wake-on-lan/WakeOnLanManager.cpp", "${project_dir}/common/stubs.cpp", "${project_dir}/linux/main.cpp", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 732398cc1bf728..32def1dbf41445 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -101,6 +101,7 @@ target_sources(app PRIVATE ${CHEF}/common/clusters/resource-monitoring/chef-resource-monitoring-delegates.cpp ${CHEF}/common/clusters/switch/SwitchEventHandler.cpp ${CHEF}/common/clusters/switch/SwitchManager.cpp + ${CHEF}/common/clusters/temperature-control/static-supported-temperature-levels.cpp ${CHEF}/common/clusters/target-navigator/TargetNavigatorManager.cpp ${CHEF}/common/clusters/wake-on-lan/WakeOnLanManager.cpp ${CHEF}/common/stubs.cpp diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index 6f92256ff735e4..695af2f764a9c1 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -181,7 +181,12 @@ class ComplexArgumentParser // - 11 is the maximum length of a %d (-2147483648, 2147483647) // - 2 is the length for the "[" and "]" characters. snprintf(labelWithIndex, sizeof(labelWithIndex), "%.241s[%d]", label, i); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithIndex, content[i], value[i])); + auto error = ComplexArgumentParser::Setup(labelWithIndex, content[i], value[i]); + if (CHIP_NO_ERROR != error) + { + chip::Platform::MemoryFree(content); + return error; + } } request = chip::app::DataModel::List(content, value.size()); @@ -415,7 +420,14 @@ class TypedComplexArgument : public ComplexArgument return ComplexArgumentParser::Setup(label, *mRequest, value); } - void Reset() { *mRequest = T(); } + void Reset() + { + if (mRequest != nullptr) + { + ComplexArgumentParser::Finalize(*mRequest); + *mRequest = T(); + } + } private: T * mRequest; diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index e4ced64a51d9f2..d34d7e5789c3cd 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -224,7 +224,7 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service app::DataModel::ReadAttributeRequest request; request.path = path; request.operationFlags.Set(app::DataModel::OperationFlags::kInternal); - request.subjectDescriptor = subjectDescriptor; + request.subjectDescriptor = &subjectDescriptor; std::optional info = provider->GetClusterInfo(path); if (!info.has_value()) diff --git a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h index 50b9cfed5d912b..c94d666de5fa6f 100644 --- a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h @@ -45,6 +45,8 @@ class ClusterCommand : public ModelCommand { ~ClusterCommand() {} + using ModelCommand::SendCommand; + CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { id commandFields; diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.h index 8e5bb8f9842210..6f29bf165dcce5 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.h @@ -52,6 +52,10 @@ class ModelCommand : public CHIPCommandBridge } virtual CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endPointId) = 0; + virtual CHIP_ERROR SendCommand(MTRDevice * _Nonnull device, chip::EndpointId endPointId) { return CHIP_ERROR_NOT_IMPLEMENTED; } + +protected: + chip::Optional mUseMTRDevice; private: chip::NodeId mNodeId; diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm index 47a29f80c3a4e5..c430364f53b96d 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -26,10 +26,18 @@ CHIP_ERROR ModelCommand::RunCommand() { ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); - auto * device = BaseDeviceWithNodeId(mNodeId); - VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR err = SendCommand(device, mEndPointId); + CHIP_ERROR err = CHIP_NO_ERROR; + + if (mUseMTRDevice.ValueOr(false)) { + auto * device = DeviceWithNodeId(mNodeId); + VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); + err = SendCommand(device, mEndPointId); + } else { + auto * device = BaseDeviceWithNodeId(mNodeId); + VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); + err = SendCommand(device, mEndPointId); + } if (err != CHIP_NO_ERROR) { ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index 1a2612b7e3b13d..cd8125e3b12273 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -28,7 +28,7 @@ class ReadAttribute : public ModelCommand { AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId); AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - ModelCommand::AddArguments(); + AddCommonByIdArguments(); } ReadAttribute(chip::ClusterId clusterId) @@ -37,7 +37,7 @@ class ReadAttribute : public ModelCommand { { AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - ModelCommand::AddArguments(); + AddCommonByIdArguments(); } ReadAttribute(const char * _Nonnull attributeName) @@ -83,7 +83,46 @@ class ReadAttribute : public ModelCommand { return CHIP_NO_ERROR; } + CHIP_ERROR SendCommand(MTRDevice * _Nonnull device, chip::EndpointId endpointId) override + { + MTRReadParams * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(mClusterId); + __auto_type * attribute = @(mAttributeId); + __auto_type values = [device readAttributeWithEndpointID:endpoint + clusterID:cluster + attributeID:attribute + params:params]; + + NSError * error = nil; + if (nil == values) { + __auto_type * userInfo = @ { @"reason" : @"No value available." }; + error = [NSError errorWithDomain:@"Error" code:0 userInfo:userInfo]; + LogNSError("Error reading attribute", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(endpoint, cluster, attribute, error); + } else { + for (id item in values) { + NSLog(@"Response Item: %@", [item description]); + } + RemoteDataModelLogger::LogAttributeAsJSON(endpoint, cluster, attribute, values); + } + + SetCommandExitStatus(error); + return CHIP_NO_ERROR; + } + protected: + void AddCommonByIdArguments() + { + AddArgument("use-mtr-device", 0, 1, &mUseMTRDevice, + "Use MTRDevice instead of MTRBaseDevice to send this command. Default is false."); + ModelCommand::AddArguments(); + } + chip::Optional mFabricFiltered; private: diff --git a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h index f274ea21aa654b..0a779740b9dc05 100644 --- a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h @@ -25,6 +25,8 @@ #import "MTRError_Utils.h" #import +constexpr uint32_t kDefaultExpectedValueInterval = 60000; + class WriteAttribute : public ModelCommand { public: WriteAttribute() @@ -33,7 +35,7 @@ class WriteAttribute : public ModelCommand { AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId); AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); AddArgument("attribute-value", &mAttributeValue); - AddArguments(); + AddCommonByIdArguments(); } WriteAttribute(chip::ClusterId clusterId) @@ -42,7 +44,7 @@ class WriteAttribute : public ModelCommand { { AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); AddArgument("attribute-value", &mAttributeValue); - AddArguments(); + AddCommonByIdArguments(); } ~WriteAttribute() {} @@ -54,6 +56,13 @@ class WriteAttribute : public ModelCommand { return WriteAttribute::SendCommand(device, endpointId, mClusterId, mAttributeId, value); } + CHIP_ERROR SendCommand(MTRDevice * _Nonnull device, chip::EndpointId endpointId) override + { + id value; + ReturnErrorOnFailure(GetValue(&value)); + return WriteAttribute::SendCommand(device, endpointId, mClusterId, mAttributeId, value); + } + CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, id _Nonnull value) { @@ -87,6 +96,28 @@ class WriteAttribute : public ModelCommand { return CHIP_NO_ERROR; } + CHIP_ERROR SendCommand(MTRDevice * _Nonnull device, chip::EndpointId endpointId, chip::ClusterId clusterId, + chip::AttributeId attributeId, id _Nonnull value) + { + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(mClusterId); + __auto_type * attribute = @(mAttributeId); + __auto_type * expectedValueInterval = @(mExpectedValueInterval.ValueOr(kDefaultExpectedValueInterval)); + __auto_type * timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() + ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] + : nil; + + [device writeAttributeWithEndpointID:endpoint + clusterID:cluster + attributeID:attribute + value:value + expectedValueInterval:expectedValueInterval + timedWriteTimeout:timedWriteTimeout]; + + SetCommandExitStatus(CHIP_NO_ERROR); + return CHIP_NO_ERROR; + } + protected: WriteAttribute(const char * _Nonnull attributeName) : ModelCommand("write") @@ -95,6 +126,14 @@ class WriteAttribute : public ModelCommand { // Subclasses are responsible for calling AddArguments. } + void AddCommonByIdArguments() + { + AddArgument("use-mtr-device", 0, 1, &mUseMTRDevice, + "Use MTRDevice instead of MTRBaseDevice to send this command. Default is false."); + AddArgument("expectedValueInterval", 0, UINT32_MAX, &mExpectedValueInterval, "When the write is issued using an MTRDevice (via –use-mtr-device), specify the maximum interval (in milliseconds) during which reads of the attribute will return the expected value. The default is 60000 milliseconds (60 seconds)."); + AddArguments(); + } + void AddArguments() { AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs, @@ -104,6 +143,7 @@ class WriteAttribute : public ModelCommand { } chip::Optional mTimedInteractionTimeoutMs; + chip::Optional mExpectedValueInterval; chip::Optional mDataVersion; private: diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h index f58251bff48dd0..477e1ed8105101 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h @@ -42,7 +42,7 @@ class CHIPCommandBridge : public Command { "commissioner-name. Interactive mode will only set a single commissioner on the inital command. " "The commissioner node ID will be persisted until a different one is specified."); AddArgument("commissioner-shared-storage", 0, 1, &mCommissionerSharedStorage, - "Use a shared storage instance instead of individual storage for each commissioner. Default is true."); + "Use a shared storage instance instead of individual storage for each commissioner. Default is false."); AddArgument("paa-trust-store-path", &mPaaTrustStorePath, "Path to directory holding PAA certificate information. Can be absolute or relative to the current working " "directory."); @@ -97,6 +97,10 @@ class CHIPCommandBridge : public Command { // Will utilize an existing PASE connection if the device is being commissioned. MTRBaseDevice * BaseDeviceWithNodeId(chip::NodeId nodeId); + // Returns the MTRDevice for the specified node ID. + // Will utilize an existing PASE connection if the device is being commissioned. + MTRDevice * DeviceWithNodeId(chip::NodeId nodeId); + // Will log the given string and given error (as progress if success, error // if failure). void LogNSError(const char * logString, NSError * error); diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 724a9a20c3a571..55df92f8b98a11 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -139,7 +139,7 @@ productAttestationAuthorityCertificates = nil; } - sUseSharedStorage = mCommissionerSharedStorage.ValueOr(true); + sUseSharedStorage = mCommissionerSharedStorage.ValueOr(false); if (sUseSharedStorage) { return SetUpStackWithSharedStorage(productAttestationAuthorityCertificates); } @@ -185,6 +185,10 @@ intermediateCertificate:nil rootCertificate:certificateIssuer.rootCertificate]; [params setOperationalCertificateIssuer:certificateIssuer queue:controllerStorageQueue]; + + __auto_type * otaDelegateQueue = dispatch_queue_create("com.chip.ota", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + [params setOTAProviderDelegate:mOTADelegate queue:otaDelegateQueue]; + params.productAttestationAuthorityCertificates = productAttestationAuthorityCertificates; __auto_type * controller = [[MTRDeviceController alloc] initWithParameters:params error:&error]; @@ -285,6 +289,17 @@ ?: [MTRBaseDevice deviceWithNodeID:@(nodeId) controller:controller]; } +MTRDevice * CHIPCommandBridge::DeviceWithNodeId(chip::NodeId nodeId) +{ + __auto_type * controller = CurrentCommissioner(); + VerifyOrReturnValue(nil != controller, nil); + + __auto_type * device = [MTRDevice deviceWithNodeID:@(nodeId) controller:controller]; + VerifyOrReturnValue(nil != device, nil); + + return device; +} + void CHIPCommandBridge::StopCommissioners() { for (auto & pair : mControllers) { diff --git a/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm b/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm index bd12878c6addd7..c86a41490b08c5 100644 --- a/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm +++ b/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm @@ -21,6 +21,8 @@ #include +constexpr const uint32_t kIssuerId = 12345678; + @interface CertificateIssuer () - (MTRCertificateDERBytes _Nullable)issueOperationalCertificateForNodeID:(NSNumber *)nodeID fabricID:(NSNumber *)fabricID @@ -67,7 +69,7 @@ - (void)startWithStorage:(id)storage return; } - __auto_type * rootCertificate = [MTRCertificates createRootCertificate:signingKey issuerID:nil fabricID:nil error:error]; + __auto_type * rootCertificate = [MTRCertificates createRootCertificate:signingKey issuerID:@(kIssuerId) fabricID:nil error:error]; if (nil == rootCertificate) { *error = [NSError errorWithDomain:@"Error" code:0 userInfo:@{ @"reason" : @"Error creating root certificate" }]; return; diff --git a/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp b/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp index c751c71c268255..cf7e4806a7828a 100644 --- a/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp +++ b/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp @@ -196,12 +196,12 @@ void ElectricalSensorManager::UpdateEPMAttributes(OperationalStateEnum state) { if (gEPMDelegate) { - uint16_t updateState = to_underlying(state); - uint16_t ERROR_STATE_INDEX = ArraySize(kAttributes) - 1; + uint8_t updateState = to_underlying(state); + // Check state range - if ((updateState < 0) || (updateState > ERROR_STATE_INDEX)) + if (updateState >= ArraySize(kAttributes)) { - updateState = ERROR_STATE_INDEX; + updateState = ArraySize(kAttributes) - 1; } ChipLogDetail(AppServer, "UpdateAllAttributes to Operational State : %d", updateState); diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md index c6b4ba7eb3577f..bdfb82d5ac5d8d 100644 --- a/examples/fabric-admin/README.md +++ b/examples/fabric-admin/README.md @@ -23,13 +23,13 @@ For Raspberry Pi 4 example: ### Pull Docker Images ``` -docker pull connectedhomeip/chip-build-vscode:latest +docker pull ghcr.io/project-chip/chip-build-crosscompile:81 ``` ### Run docker ``` -docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash +docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash ``` ### Build @@ -38,8 +38,6 @@ docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-bu cd /var/connectedhomeip git config --global --add safe.directory /var/connectedhomeip -git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo -git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md index ede6ce26399062..fdb466147e3cf4 100644 --- a/examples/fabric-bridge-app/linux/README.md +++ b/examples/fabric-bridge-app/linux/README.md @@ -100,13 +100,13 @@ defined: Pull Docker Images ``` - docker pull connectedhomeip/chip-build-vscode:latest + docker pull ghcr.io/project-chip/chip-build-crosscompile:81 ``` Run docker ``` - docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash ``` Build @@ -115,8 +115,6 @@ defined: cd /var/connectedhomeip git config --global --add safe.directory /var/connectedhomeip - git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo - git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md index 6cbe9da9e9428d..0309218725f02b 100644 --- a/examples/fabric-sync/README.md +++ b/examples/fabric-sync/README.md @@ -92,13 +92,13 @@ defined: Pull Docker Images ``` - docker pull connectedhomeip/chip-build-vscode:latest + docker pull ghcr.io/project-chip/chip-build-crosscompile:81 ``` Run docker ``` - docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash ``` Build @@ -107,8 +107,6 @@ defined: cd /var/connectedhomeip git config --global --add safe.directory /var/connectedhomeip - git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo - git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/examples/fabric-sync/main.cpp b/examples/fabric-sync/main.cpp index 84c014dfcbf010..66541b32de91f9 100644 --- a/examples/fabric-sync/main.cpp +++ b/examples/fabric-sync/main.cpp @@ -20,14 +20,69 @@ using namespace chip; +namespace { + +constexpr char kFabricSyncLogFilePath[] = "/tmp/fabric_sync.log"; + +// File pointer for the log file +FILE * sLogFile = nullptr; + +void OpenLogFile(const char * filePath) +{ + sLogFile = fopen(filePath, "a"); + if (sLogFile == nullptr) + { + perror("Failed to open log file"); + } +} + +void CloseLogFile() +{ + if (sLogFile != nullptr) + { + fclose(sLogFile); + sLogFile = nullptr; + } +} + +void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + if (sLogFile == nullptr) + { + return; + } + + uint64_t timeMs = System::SystemClock().GetMonotonicMilliseconds64().count(); + uint64_t seconds = timeMs / 1000; + uint64_t milliseconds = timeMs % 1000; + + flockfile(sLogFile); + + fprintf(sLogFile, "[%llu.%06llu] CHIP:%s: ", static_cast(seconds), + static_cast(milliseconds), module); + vfprintf(sLogFile, msg, args); + fprintf(sLogFile, "\n"); + fflush(sLogFile); + + funlockfile(sLogFile); +} + +} // namespace + void ApplicationInit() { ChipLogProgress(NotSpecified, "Fabric-Sync: ApplicationInit()"); + + OpenLogFile(kFabricSyncLogFilePath); + + // Redirect logs to the custom logging callback + Logging::SetLogRedirectCallback(LoggingCallback); } void ApplicationShutdown() { ChipLogDetail(NotSpecified, "Fabric-Sync: ApplicationShutdown()"); + CloseLogFile(); } int main(int argc, char * argv[]) diff --git a/examples/light-switch-app/light-switch-common/BUILD.gn b/examples/light-switch-app/light-switch-common/BUILD.gn index 8ec49aac0fa870..e9ec438656e43d 100644 --- a/examples/light-switch-app/light-switch-common/BUILD.gn +++ b/examples/light-switch-app/light-switch-common/BUILD.gn @@ -14,8 +14,13 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/app/chip_data_model.gni") +import("${chip_root}/src/app/icd/icd.gni") chip_data_model("light-switch-common") { - zap_file = "light-switch-app.zap" + if (chip_enable_icd_lit) { + zap_file = "icd-lit-light-switch-app.zap" + } else { + zap_file = "light-switch-app.zap" + } is_server = true } diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter new file mode 100644 index 00000000000000..67ed0ab5715709 --- /dev/null +++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter @@ -0,0 +1,3244 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +cluster Groups = 4 { + revision 4; + + bitmap Feature : bitmap32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : bitmap8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + response struct AddGroupResponse = 0 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + enum8 status = 0; + group_id groupID = 1; + char_string<16> groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable int8u capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +cluster OnOff = 6 { + revision 6; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +cluster Binding = 30 { + revision 1; // NOTE: Default/not specifically set + + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(write: manage) TargetStruct binding[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + int16u productID = 1; + int32u softwareVersion = 2; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + 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; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + 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. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : enum8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : enum8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + int16u reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailureCause = 0; + int16u status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster EthernetNetworkDiagnostics = 55 { + revision 1; // NOTE: Default/not specifically set + + enum PHYRateEnum : enum8 { + kRate10M = 0; + kRate100M = 1; + kRate1G = 2; + kRate25G = 3; + kRate5G = 4; + kRate10G = 5; + kRate40G = 6; + kRate100G = 7; + kRate200G = 8; + kRate400G = 9; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */ +cluster TimeSynchronization = 56 { + revision 2; + + enum GranularityEnum : enum8 { + kNoTimeGranularity = 0; + kMinutesGranularity = 1; + kSecondsGranularity = 2; + kMillisecondsGranularity = 3; + kMicrosecondsGranularity = 4; + } + + enum StatusCode : enum8 { + kTimeNotAccepted = 2; + } + + enum TimeSourceEnum : enum8 { + kNone = 0; + kUnknown = 1; + kAdmin = 2; + kNodeTimeCluster = 3; + kNonMatterSNTP = 4; + kNonMatterNTP = 5; + kMatterSNTP = 6; + kMatterNTP = 7; + kMixedNTP = 8; + kNonMatterSNTPNTS = 9; + kNonMatterNTPNTS = 10; + kMatterSNTPNTS = 11; + kMatterNTPNTS = 12; + kMixedNTPNTS = 13; + kCloudSource = 14; + kPTP = 15; + kGNSS = 16; + } + + enum TimeZoneDatabaseEnum : enum8 { + kFull = 0; + kPartial = 1; + kNone = 2; + } + + bitmap Feature : bitmap32 { + kTimeZone = 0x1; + kNTPClient = 0x2; + kNTPServer = 0x4; + kTimeSyncClient = 0x8; + } + + struct DSTOffsetStruct { + int32s offset = 0; + epoch_us validStarting = 1; + nullable epoch_us validUntil = 2; + } + + struct FabricScopedTrustedTimeSourceStruct { + node_id nodeID = 0; + endpoint_no endpoint = 1; + } + + struct TimeZoneStruct { + int32s offset = 0; + epoch_us validAt = 1; + optional char_string<64> name = 2; + } + + struct TrustedTimeSourceStruct { + fabric_idx fabricIndex = 0; + node_id nodeID = 1; + endpoint_no endpoint = 2; + } + + info event DSTTableEmpty = 0 { + } + + info event DSTStatus = 1 { + boolean DSTOffsetActive = 0; + } + + info event TimeZoneStatus = 2 { + int32s offset = 0; + optional char_string name = 1; + } + + info event TimeFailure = 3 { + } + + info event MissingTrustedTimeSource = 4 { + } + + readonly attribute nullable epoch_us UTCTime = 0; + readonly attribute GranularityEnum granularity = 1; + readonly attribute optional TimeSourceEnum timeSource = 2; + readonly attribute optional nullable TrustedTimeSourceStruct trustedTimeSource = 3; + readonly attribute optional nullable char_string<128> defaultNTP = 4; + readonly attribute optional TimeZoneStruct timeZone[] = 5; + readonly attribute optional DSTOffsetStruct DSTOffset[] = 6; + readonly attribute optional nullable epoch_us localTime = 7; + readonly attribute optional TimeZoneDatabaseEnum timeZoneDatabase = 8; + readonly attribute optional boolean NTPServerAvailable = 9; + readonly attribute optional int8u timeZoneListMaxSize = 10; + readonly attribute optional int8u DSTOffsetListMaxSize = 11; + readonly attribute optional boolean supportsDNSResolve = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SetUTCTimeRequest { + epoch_us UTCTime = 0; + GranularityEnum granularity = 1; + optional TimeSourceEnum timeSource = 2; + } + + request struct SetTrustedTimeSourceRequest { + nullable FabricScopedTrustedTimeSourceStruct trustedTimeSource = 0; + } + + request struct SetTimeZoneRequest { + TimeZoneStruct timeZone[] = 0; + } + + response struct SetTimeZoneResponse = 3 { + boolean DSTOffsetRequired = 0; + } + + request struct SetDSTOffsetRequest { + DSTOffsetStruct DSTOffset[] = 0; + } + + request struct SetDefaultNTPRequest { + nullable char_string<128> defaultNTP = 0; + } + + /** This command MAY be issued by Administrator to set the time. */ + command access(invoke: administer) SetUTCTime(SetUTCTimeRequest): DefaultSuccess = 0; + /** This command SHALL set TrustedTimeSource. */ + fabric command access(invoke: administer) SetTrustedTimeSource(SetTrustedTimeSourceRequest): DefaultSuccess = 1; + /** This command SHALL set TimeZone. */ + command access(invoke: manage) SetTimeZone(SetTimeZoneRequest): SetTimeZoneResponse = 2; + /** This command SHALL set DSTOffset. */ + command access(invoke: manage) SetDSTOffset(SetDSTOffsetRequest): DefaultSuccess = 4; + /** This command is used to set DefaultNTP. */ + command access(invoke: administer) SetDefaultNTP(SetDefaultNTPRequest): DefaultSuccess = 5; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +cluster Switch = 59 { + revision 2; + + bitmap Feature : bitmap32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + kActionSwitch = 0x20; + } + + info event SwitchLatched = 0 { + int8u newPosition = 0; + } + + info event InitialPress = 1 { + int8u newPosition = 0; + } + + info event LongPress = 2 { + int8u newPosition = 0; + } + + info event ShortRelease = 3 { + int8u previousPosition = 0; + } + + info event LongRelease = 4 { + int8u previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + int8u newPosition = 0; + int8u currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + int8u previousPosition = 0; + int8u totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +cluster IcdManagement = 70 { + revision 3; + + enum ClientTypeEnum : enum8 { + kPermanent = 0; + kEphemeral = 1; + } + + enum OperatingModeEnum : enum8 { + kSIT = 0; + kLIT = 1; + } + + bitmap Feature : bitmap32 { + kCheckInProtocolSupport = 0x1; + kUserActiveModeTrigger = 0x2; + kLongIdleTimeSupport = 0x4; + kDynamicSitLitSupport = 0x8; + } + + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive ClientTypeEnum clientType = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeDuration = 0; + readonly attribute int32u activeModeDuration = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + provisional readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + provisional readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; + provisional readonly attribute optional OperatingModeEnum operatingMode = 8; + provisional readonly attribute optional int32u maximumCheckInBackOff = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + ClientTypeEnum clientType = 4; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + request struct StayActiveRequestRequest { + int32u stayActiveDuration = 0; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3; +} + +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 1; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + } + + struct AttributeValuePairStruct { + attrib_id attributeID = 0; + optional int8u valueUnsigned8 = 1; + optional int8s valueSigned8 = 2; + optional int16u valueUnsigned16 = 3; + optional int16s valueSigned16 = 4; + optional int32u valueUnsigned32 = 5; + optional int32s valueSigned32 = 6; + optional int64u valueUnsigned64 = 7; + optional int64s valueSigned64 = 8; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePairStruct attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional nullable node_id lastConfiguredBy = 0; + readonly attribute int16u sceneTableSize = 1; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int32u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int32u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int32u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 64 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeID": VALUE, "Value*": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; +} + +/** Attributes and commands for controlling the color properties of a color-capable light. */ +cluster ColorControl = 768 { + revision 7; + + enum ColorLoopActionEnum : enum8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; + } + + enum ColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + } + + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; + kUp = 2; + kDown = 3; + } + + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; + } + + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; + } + + enum MoveModeEnum : enum8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum StepModeEnum : enum8 { + kUp = 1; + kDown = 3; + } + + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; + } + + bitmap Feature : bitmap32 { + kHueAndSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; + } + + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; + readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToHueRequest { + int8u hue = 0; + DirectionEnum direction = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveHueRequest { + MoveModeEnum moveMode = 0; + int8u rate = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct StepHueRequest { + StepModeEnum stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + int8u saturation = 0; + int16u transitionTime = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct MoveSaturationRequest { + MoveModeEnum moveMode = 0; + int8u rate = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct StepSaturationRequest { + StepModeEnum stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + int8u hue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveToColorRequest { + int16u colorX = 0; + int16u colorY = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveColorRequest { + int16s rateX = 0; + int16s rateY = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct StepColorRequest { + int16s stepX = 0; + int16s stepY = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + int16u colorTemperatureMireds = 0; + int16u transitionTime = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + int16u enhancedHue = 0; + DirectionEnum direction = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + MoveModeEnum moveMode = 0; + int16u rate = 1; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + StepModeEnum stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + int16u enhancedHue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; + int16u time = 3; + int16u startHue = 4; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; + } + + request struct StopMoveStepRequest { + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + MoveModeEnum moveMode = 0; + int16u rate = 1; + int16u colorTemperatureMinimumMireds = 2; + int16u colorTemperatureMaximumMireds = 3; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + StepModeEnum stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + int16u colorTemperatureMinimumMireds = 3; + int16u colorTemperatureMaximumMireds = 4; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; + } + + /** Move to specified hue. */ + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ + command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ + command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 2; + + handle command ResetCounts; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute PHYRate; + callback attribute fullDuplex; + callback attribute packetRxCount; + callback attribute packetTxCount; + callback attribute txErrCount; + callback attribute collisionCount; + callback attribute overrunCount; + callback attribute carrierDetect; + callback attribute timeSinceReset; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster TimeSynchronization { + emits event DSTTableEmpty; + emits event DSTStatus; + emits event TimeZoneStatus; + emits event TimeFailure; + emits event MissingTrustedTimeSource; + callback attribute UTCTime; + callback attribute granularity; + ram attribute timeSource default = 0x00; + callback attribute trustedTimeSource; + callback attribute defaultNTP; + callback attribute timeZone; + callback attribute DSTOffset; + callback attribute localTime; + ram attribute timeZoneDatabase default = 0; + callback attribute timeZoneListMaxSize; + callback attribute DSTOffsetListMaxSize; + ram attribute supportsDNSResolve default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0x0B; + ram attribute clusterRevision default = 2; + + handle command SetUTCTime; + handle command SetTrustedTimeSource; + handle command SetTimeZone; + handle command SetTimeZoneResponse; + handle command SetDSTOffset; + handle command SetDefaultNTP; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster IcdManagement { + callback attribute idleModeDuration; + callback attribute activeModeDuration; + callback attribute activeModeThreshold; + callback attribute registeredClients; + callback attribute ICDCounter; + callback attribute clientsSupportedPerFabric; + ram attribute userActiveModeTriggerHint default = 0x1115; + ram attribute userActiveModeTriggerInstruction default = "Power Cycle"; + ram attribute operatingMode default = 0; + callback attribute maximumCheckInBackOff; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 3; + + handle command RegisterClient; + handle command RegisterClientResponse; + handle command UnregisterClient; + handle command StayActiveRequest; + handle command StayActiveResponse; + } +} +endpoint 1 { + device type ma_onofflightswitch = 259, version 1; + + binding cluster Identify; + binding cluster OnOff; + binding cluster ScenesManagement; + binding cluster ColorControl; + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command AddGroup; + handle command AddGroupResponse; + handle command ViewGroup; + handle command ViewGroupResponse; + handle command GetGroupMembership; + handle command GetGroupMembershipResponse; + handle command RemoveGroup; + handle command RemoveGroupResponse; + handle command RemoveAllGroups; + handle command AddGroupIfIdentifying; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 2 { + device type ma_genericswitch = 15, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster Switch { + emits event InitialPress; + ram attribute numberOfPositions default = 2; + ram attribute currentPosition default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 6; + ram attribute clusterRevision default = 2; + } +} + + diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.zap b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.zap new file mode 100644 index 00000000000000..bc81c51ff705c8 --- /dev/null +++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.zap @@ -0,0 +1,5812 @@ +{ + "fileFormat": 2, + "featureLevel": 104, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Wi-Fi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Synchronization", + "code": 56, + "mfgCode": null, + "define": "TIME_SYNCHRONIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetUTCTime", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTrustedTimeSource", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTimeZone", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTimeZoneResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetDSTOffset", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetDefaultNTP", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "UTCTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Granularity", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "GranularityEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSource", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "TimeSourceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TrustedTimeSource", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "TrustedTimeSourceStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultNTP", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZone", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DSTOffset", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTime", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZoneDatabase", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "TimeZoneDatabaseEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZoneListMaxSize", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DSTOffsetListMaxSize", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsDNSResolve", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0B", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "DSTTableEmpty", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DSTStatus", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "TimeZoneStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "TimeFailure", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MissingTrustedTimeSource", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClient", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UnregisterClient", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserActiveModeTriggerHint", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "UserActiveModeTriggerBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1115", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserActiveModeTriggerInstruction", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Power Cycle", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaximumCheckInBackOff", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "15", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-onofflightswitch", + "deviceTypeRef": { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], + "deviceTypeName": "MA-onofflightswitch", + "deviceTypeCode": 259, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes Management", + "code": 98, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + } + ] + }, + { + "id": 3, + "name": "MA-genericswitch", + "deviceTypeRef": { + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 15 + ], + "deviceTypeName": "MA-genericswitch", + "deviceTypeCode": 15, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "InitialPress", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-onofflightswitch", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-genericswitch", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 8dd097480220b0..4ec1c04a927404 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -29,14 +29,17 @@ sl_enable_test_event_trigger = true # ICD Default configurations chip_enable_icd_server = true +chip_enable_icd_lit = true +chip_enable_icd_dsls = true + chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true # Openthread Configuration flags -sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals -sl_ot_active_interval_ms = 500 # 500ms Active Intervals +sl_ot_idle_interval_ms = 2100000 # 35 minutes Idle Intervals +sl_ot_active_interval_ms = 1000 # 1000ms Active Intervals # ICD Matter Configuration flags -sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration -sl_active_mode_duration_ms = 60000 # 60s Active Mode Duration -sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold +sl_idle_mode_duration_s = 1800 # 30min Idle Mode Duration +sl_active_mode_duration_ms = 0 # 0s Active Mode Duration +sl_active_mode_threshold_ms = 5000 # 5s Active Mode Threshold diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 6ef009e9064d75..c8048dc71e3b4b 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -30,6 +30,7 @@ chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true chip_enable_icd_lit = true +chip_enable_icd_dsls = true # ICD Matter Configuration flags sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index e84e7be8ed1292..c09176354a3d76 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -34,6 +34,7 @@ chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true +chip_enable_icd_dsls = true # Openthread Configuration flags sl_ot_idle_interval_ms = 3600000 # 60mins Idle Polling Interval diff --git a/examples/lit-icd-app/silabs/src/ShellCommands.cpp b/examples/lit-icd-app/silabs/src/ShellCommands.cpp deleted file mode 100644 index 52f305eb275333..00000000000000 --- a/examples/lit-icd-app/silabs/src/ShellCommands.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ -#if defined(ENABLE_CHIP_SHELL) - -#include "ShellCommands.h" -#include -#include -#include - -using namespace chip; -using namespace chip::app; - -namespace LitICDCommands { - -using Shell::Engine; -using Shell::shell_command_t; -using Shell::streamer_get; -using Shell::streamer_printf; - -/** - * @brief configures lit icd matter shell - */ -void RegisterSwitchCommands() -{ - // Blank structure for now - static const shell_command_t sLitICDCommand = {}; - - Engine::Root().RegisterCommands(&sLitICDCommand, 1); -} - -} // namespace LitICDCommands - -#endif // ENABLE_CHIP_SHELL diff --git a/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h b/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h index 932812aa711659..a8890d9a0ed78e 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h +++ b/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h @@ -53,6 +53,7 @@ #define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 #define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#define OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE 0 #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 0 #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index a8a6c4b9a8f6a5..bfa382305cf951 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -37,9 +37,13 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER #include // nogncheck -#endif +#ifdef ENABLE_CHIP_SHELL +#include +#endif // ENABLE_CHIP_SHELL +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + #include #include #include @@ -125,7 +129,7 @@ app::Clusters::NetworkCommissioning::Instance bool sIsEnabled = false; bool sIsAttached = false; -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) +#if !(CHIP_CONFIG_ENABLE_ICD_SERVER) bool sHaveBLEConnections = false; #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -305,6 +309,12 @@ CHIP_ERROR BaseApplication::Init() sStatusLED.Init(SYSTEM_STATE_LED); #endif // ENABLE_WSTK_LEDS +#ifdef ENABLE_CHIP_SHELL +#if CHIP_CONFIG_ENABLE_ICD_SERVER + ICDCommands::RegisterCommands(); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER +#endif // ENABLE_CHIP_SHELL + #ifdef PERFORMANCE_TEST_ENABLED RegisterPerfTestCommands(); #endif // PERFORMANCE_TEST_ENABLED @@ -342,7 +352,7 @@ void BaseApplication::FunctionEventHandler(AppEvent * aEvent) { // The factory reset sequence was in motion. The cancellation window expired. // Factory Reset the device now. -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StopStatusLEDTimer(); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -407,7 +417,7 @@ bool BaseApplication::ActivateStatusLedPatterns() } #endif // MATTER_DM_PLUGIN_IDENTIFY_SERVER -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) +#if !(CHIP_CONFIG_ENABLE_ICD_SERVER) // Identify Patterns have priority over Status patterns if (!isPatternSet) { @@ -463,7 +473,7 @@ void BaseApplication::LightEventHandler() // locked while these values are queried. However we use a non-blocking // lock request (TryLockCHIPStack()) to avoid blocking other UI activities // when the CHIP task is busy (e.g. with a long crypto operation). -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) +#if !(CHIP_CONFIG_ENABLE_ICD_SERVER) if (PlatformMgr().TryLockChipStack()) { #ifdef SL_WIFI @@ -606,7 +616,7 @@ void BaseApplication::StartFactoryResetSequence() StartFunctionTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); sIsFactoryResetTriggered = true; -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StartStatusLEDTimer(); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -622,7 +632,7 @@ void BaseApplication::CancelFactoryResetSequence() { CancelFunctionTimer(); -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StopStatusLEDTimer(); #endif if (sIsFactoryResetTriggered) @@ -660,7 +670,7 @@ void BaseApplication::OnIdentifyStart(Identify * identify) ChipLogProgress(Zcl, "onIdentifyStart"); latest_active_endpoint = identify->mEndpoint; -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StartStatusLEDTimer(); #endif } @@ -670,7 +680,7 @@ void BaseApplication::OnIdentifyStop(Identify * identify) ChipLogProgress(Zcl, "onIdentifyStop"); latest_active_endpoint = identify->mEndpoint; -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StopStatusLEDTimer(); #endif } @@ -680,7 +690,7 @@ void BaseApplication::OnTriggerIdentifyEffectCompleted(chip::System::Layer * sys ChipLogProgress(Zcl, "Trigger Identify Complete"); sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StopStatusLEDTimer(); #endif } @@ -695,7 +705,7 @@ void BaseApplication::OnTriggerIdentifyEffect(Identify * identify) ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); } -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#if CHIP_CONFIG_ENABLE_ICD_SERVER StartStatusLEDTimer(); #endif diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 20f73ab6811e58..4440fcf58444ca 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -33,7 +33,7 @@ #endif #ifdef ENABLE_CHIP_SHELL -#include "matter_shell.h" +#include "MatterShell.h" #endif #ifdef HEAP_MONITORING diff --git a/examples/platform/silabs/matter_shell.cpp b/examples/platform/silabs/MatterShell.cpp similarity index 99% rename from examples/platform/silabs/matter_shell.cpp rename to examples/platform/silabs/MatterShell.cpp index 3e70764a08a1d5..6088eeb2ca9404 100644 --- a/examples/platform/silabs/matter_shell.cpp +++ b/examples/platform/silabs/MatterShell.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "matter_shell.h" +#include "MatterShell.h" #include "sl_component_catalog.h" #include #include diff --git a/examples/platform/silabs/matter_shell.h b/examples/platform/silabs/MatterShell.h similarity index 100% rename from examples/platform/silabs/matter_shell.h rename to examples/platform/silabs/MatterShell.h diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index cf7b7aedbf1cfa..6756cc28c726ce 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -91,22 +91,20 @@ source_set("test-event-trigger") { ] } -source_set("siwx917-matter-shell") { - if (chip_build_libshell) { - defines = [ "ENABLE_CHIP_SHELL" ] +source_set("matter-shell") { + defines = [ "ENABLE_CHIP_SHELL" ] - sources = [ "${silabs_common_plat_dir}/matter_shell.cpp" ] - include_dirs = [ - ".", - "${silabs_common_plat_dir}", - ] + sources = [ "${silabs_common_plat_dir}/MatterShell.cpp" ] + include_dirs = [ + ".", + "${silabs_common_plat_dir}", + ] - public_deps = [ - "${chip_root}/examples/shell/shell_common:shell_common", - "${chip_root}/src/lib/shell:shell", - "${chip_root}/src/lib/shell:shell_core", - ] - } + public_deps = [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + "${chip_root}/src/lib/shell:shell_core", + ] } config("siwx917-common-config") { @@ -226,7 +224,11 @@ source_set("siwx917-common") { } if (chip_build_libshell) { - deps += [ ":siwx917-matter-shell" ] + deps += [ ":matter-shell" ] + + if (chip_enable_icd_server) { + deps += [ "${silabs_common_plat_dir}/shell:icd" ] + } } # DIC diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index f5c79a22524812..2d417c22c1a641 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -123,22 +123,20 @@ source_set("openthread_core_config_efr32_chip_examples") { } } -source_set("efr-matter-shell") { - if (chip_build_libshell) { - defines = [ "ENABLE_CHIP_SHELL" ] +source_set("matter-shell") { + defines = [ "ENABLE_CHIP_SHELL" ] - sources = [ "${silabs_common_plat_dir}/matter_shell.cpp" ] - include_dirs = [ - ".", - "${silabs_common_plat_dir}", - ] + sources = [ "${silabs_common_plat_dir}/MatterShell.cpp" ] + include_dirs = [ + ".", + "${silabs_common_plat_dir}", + ] - public_deps = [ - "${chip_root}/examples/shell/shell_common:shell_common", - "${chip_root}/src/lib/shell:shell", - "${chip_root}/src/lib/shell:shell_core", - ] - } + public_deps = [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + "${chip_root}/src/lib/shell:shell_core", + ] } config("efr32-common-config") { @@ -294,7 +292,11 @@ source_set("efr32-common") { } if (chip_build_libshell) { - deps += [ ":efr-matter-shell" ] + deps += [ ":matter-shell" ] + + if (chip_enable_icd_server) { + deps += [ "${silabs_common_plat_dir}/shell:icd" ] + } } public_deps += [ diff --git a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp index 6a889b5bffeb06..5180e031f07238 100644 --- a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp +++ b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp @@ -29,6 +29,11 @@ #include #include #include +#ifndef NDEBUG +#if defined(SL_MATTER_TEST_EVENT_TRIGGER_ENABLED) && (SL_MATTER_GN_BUILD == 0) +#include +#endif // defined(SL_MATTER_TEST_EVENT_TRIGGER_ENABLED) && (SL_MATTER_GN_BUILD == 0) +#endif // NDEBUG #ifdef OTA_ENCRYPTION_ENABLE #include #endif // OTA_ENCRYPTION_ENABLE diff --git a/examples/platform/silabs/shell/BUILD.gn b/examples/platform/silabs/shell/BUILD.gn new file mode 100644 index 00000000000000..74613aeac91031 --- /dev/null +++ b/examples/platform/silabs/shell/BUILD.gn @@ -0,0 +1,39 @@ +# 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. + +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("${chip_root}/src/app/icd/icd.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +# This is necessary since the BUILD.gn for both platforms are still split +shell_dependency_path = "${chip_root}/examples/platform/silabs/efr32" +if (use_SiWx917) { + shell_dependency_path = "${chip_root}/examples/platform/silabs/SiWx917" +} + +config("shell-config") { + include_dirs = [ "." ] +} + +source_set("icd") { + sources = [ + "ICDShellCommands.cpp", + "ICDShellCommands.h", + ] + + public_configs = [ ":shell-config" ] + + deps = [ "${shell_dependency_path}:matter-shell" ] +} diff --git a/examples/platform/silabs/shell/ICDShellCommands.cpp b/examples/platform/silabs/shell/ICDShellCommands.cpp new file mode 100644 index 00000000000000..4bd3910634b6a1 --- /dev/null +++ b/examples/platform/silabs/shell/ICDShellCommands.cpp @@ -0,0 +1,119 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +namespace { + +Engine sShellICDSubCommands; + +#if defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS +Engine sShellDynamicSitLitSubCommands; +#endif // defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + +CHIP_ERROR HelpHandler(int argc, char ** argv) +{ + sShellICDSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return HelpHandler(argc, argv); + } + + return sShellICDSubCommands.ExecCommand(argc, argv); +} + +#if defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS +namespace DynamicSitLit { + +CHIP_ERROR HelpHandler(int argc, char ** argv) +{ + sShellDynamicSitLitSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return DynamicSitLit::HelpHandler(argc, argv); + } + + return sShellDynamicSitLitSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR SetSitModeReq(int argc, char ** argv) +{ + return chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestNotification(); }, 0); +} + +CHIP_ERROR RemoveSitModeReq(int argc, char ** argv) +{ + return chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestWithdrawal(); }, 0); +} + +} // namespace DynamicSitLit +#endif // defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + +} // namespace + +namespace ICDCommands { + +/** + * @brief configures ICD matter shell + */ +void RegisterCommands() +{ + static const shell_command_t sLitICDSubCommands[] = { +#if defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + { DynamicSitLit::CommandHandler, "dsls", "Dynamic Sit/Lit commands. Usage: dsls " }, +#endif // defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + { &HelpHandler, "help", "Usage: icd " } + }; + sShellICDSubCommands.RegisterCommands(sLitICDSubCommands, ArraySize(sLitICDSubCommands)); + +#if defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + static const shell_command_t sDynamicSitLitSubCommands[] = { + { &DynamicSitLit::SetSitModeReq, "add", "Add SIT mode requirement." }, + { &DynamicSitLit::RemoveSitModeReq, "remove", "Removes SIT mode requirement." }, + { &DynamicSitLit::HelpHandler, "help", "Usage : icd dsls ." } + }; + sShellDynamicSitLitSubCommands.RegisterCommands(sDynamicSitLitSubCommands, ArraySize(sDynamicSitLitSubCommands)); +#endif // defined(CHIP_CONFIG_ENABLE_ICD_DSLS) && CHIP_CONFIG_ENABLE_ICD_DSLS + + static const shell_command_t sICDCommand = { &CommandHandler, "icd", "ICD commands. Usage: icd " }; + Engine::Root().RegisterCommands(&sICDCommand, 1); +} + +} // namespace ICDCommands diff --git a/examples/lit-icd-app/silabs/include/ShellCommands.h b/examples/platform/silabs/shell/ICDShellCommands.h similarity index 82% rename from examples/lit-icd-app/silabs/include/ShellCommands.h rename to examples/platform/silabs/shell/ICDShellCommands.h index 8817c41bfbf3a6..9c276f0e0a2cc9 100644 --- a/examples/lit-icd-app/silabs/include/ShellCommands.h +++ b/examples/platform/silabs/shell/ICDShellCommands.h @@ -15,15 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once -#ifdef ENABLE_CHIP_SHELL - -namespace LitICDCommands { - -void RegisterLitICDCommands(); +namespace ICDCommands { -} // namespace LitICDCommands +void RegisterCommands(); -#endif // ENABLE_CHIP_SHELL +} // namespace ICDCommands diff --git a/examples/platform/silabs/uart.cpp b/examples/platform/silabs/uart.cpp index 390e151cb7fbbf..6ef768ac652e19 100644 --- a/examples/platform/silabs/uart.cpp +++ b/examples/platform/silabs/uart.cpp @@ -16,7 +16,9 @@ * limitations under the License. */ #include "AppConfig.h" -#include "matter_shell.h" +#ifdef ENABLE_CHIP_SHELL +#include "MatterShell.h" // nogncheck +#endif #include #include #include diff --git a/examples/thermostat/silabs/include/SensorManager.h b/examples/thermostat/silabs/include/SensorManager.h index 03b916de699d2b..8a88d775207fa1 100644 --- a/examples/thermostat/silabs/include/SensorManager.h +++ b/examples/thermostat/silabs/include/SensorManager.h @@ -37,8 +37,9 @@ class SensorManager osTimerId_t mSensorTimer; - // Reads new generated sensor value, stores it, and updates local temperature attribute static void SensorTimerEventHandler(void * arg); + // Reads new generated sensor value, stores it, and updates local temperature attribute + static void TemperatureUpdateEventHandler(AppEvent * aEvent); static SensorManager sSensorManager; }; diff --git a/examples/thermostat/silabs/src/SensorManager.cpp b/examples/thermostat/silabs/src/SensorManager.cpp index 3522e9f5a30d1d..e4186664c6f36e 100644 --- a/examples/thermostat/silabs/src/SensorManager.cpp +++ b/examples/thermostat/silabs/src/SensorManager.cpp @@ -78,6 +78,15 @@ CHIP_ERROR SensorManager::Init() } void SensorManager::SensorTimerEventHandler(void * arg) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = TemperatureUpdateEventHandler; + + AppTask::GetAppTask().PostEvent(&event); +} + +void SensorManager::TemperatureUpdateEventHandler(AppEvent * aEvent) { int16_t temperature = 0; static int16_t lastTemperature = 0; diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 824b79d6ce1a22..02e73512c43928 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:85" + - name: "ghcr.io/project-chip/chip-build-vscode:89" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index f44401475bad25..299a0b9cae5531 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -86 : [Tizen] Pass runner's path as QEMU argument \ No newline at end of file +89 : [Silabs] Leave Simplicity SDK components for SLC generation CI diff --git a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile index 3d65e2c52fa606..3d8c0ae774c782 100644 --- a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile @@ -18,21 +18,27 @@ RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6 && unzip /tmp/simplicity_sdk.zip -d /tmp/simplicity_sdk \ && rm -rf /tmp/simplicity_sdk.zip \ # Deleting files that are not needed to save space - && rm -rf /tmp/simplicity_sdk/protocol/flex /tmp/simplicity_sdk/protocol/z-wave /tmp/simplicity_sdk/protocol/zigbee /tmp/simplicity_sdk/protocol/wisun \ + && rm -rf /tmp/simplicity_sdk/protocol/flex /tmp/simplicity_sdk/protocol/z-wave /tmp/simplicity_sdk/protocol/zigbee /tmp/simplicity_sdk/protocol/wisun /tmp/simplicity_sdk/util/third_party/tensorflow_extra \ + /tmp/simplicity_sdk/util/third_party/sqlite /tmp/simplicity_sdk/util/third_party/ot-br-posix /tmp/simplicity_sdk/util/third_party/tflite-micro /tmp/simplicity_sdk/util/third_party/tflite-fatfs /tmp/simplicity_sdk/util/third_party/unity_test_framework \ + /tmp/simplicity_sdk/platform/radio/efr32_multiphy_configurator \ && find /tmp/simplicity_sdk/protocol/bluetooth /tmp/simplicity_sdk/platform -name "*.a" -type f -delete \ && find /tmp/simplicity_sdk/protocol/openthread -name "*efr32mg21*" -delete \ + && find /tmp/simplicity_sdk \( -name "libsl_platform_ftd_efr32mg2*" -o -name "libsl_ot_stack_mtd_efr32mg2*" \) -type f -delete \ + && find /tmp/simplicity_sdk/hardware/board/config -mindepth 1 -maxdepth 1 -type d ! \( -name '*brd4186c*' -o -name '*brd4187c*' -o -name '*brd4186a*' -o -name '*brd4187a*' -o -name '*brd2601b*' -o -name '*brd2703a*' -o -name '*brd2704a*' -o -name '*component*' \ + -o -name '*brd4316a*' -o -name '*brd4317a*' -o -name '*brd4318a*' -o -name '*brd4319a*' -o -name '*brd4116a*' -o -name '*brd4117a*' -o -name '*brd4118a*' -o -name '*brd2608a*' \) -exec rm -rf {} + \ + && find /tmp/simplicity_sdk/platform/Device/SiliconLabs -mindepth 1 -maxdepth 1 -type d ! \( -name 'EFR32MG24' -o -name 'EFR32MG26' -o -name 'MGM24' \) -exec rm -rf {} + \ && : # last line # Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.3 (b6d6cb5) RUN git clone --depth=1 --single-branch --branch=2.10.3 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk && \ cd /tmp/wiseconnect-wifi-bt-sdk && \ - rm -rf .git \ + rm -rf .git examples \ && : # last line # Clone WiSeConnect SDK v3.3.3 (a6390dd) RUN git clone --depth=1 --single-branch --branch=v3.3.3 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \ cd /tmp/wifi_sdk && \ - rm -rf .git \ + rm -rf .git examples components/device/stm32 \ && : # last line # SLC-cli install diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index 0290182b5b4bff..4d527148c7d9b0 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -66,6 +66,18 @@ def load_module_info() -> None: platforms = set(filter(None, platforms)) assert not ( platforms - ALL_PLATFORMS), "Submodule's platform not contained in ALL_PLATFORMS" + + # Check for explicitly excluded platforms + excluded_platforms = module.get('excluded-platforms', '').split(',') + excluded_platforms = set(filter(None, excluded_platforms)) + assert not ( + excluded_platforms - ALL_PLATFORMS), "Submodule excluded on platforms not contained in ALL_PLATFORMS" + + if len(excluded_platforms) != 0: + if len(platforms) == 0: + platforms = ALL_PLATFORMS + platforms = platforms - excluded_platforms + recursive = module.getboolean('recursive', False) name = name.replace('submodule "', '').replace('"', '') yield Module(name=name, path=module['path'], platforms=platforms, recursive=recursive) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f3565cf5d9a5e1..13a15f2d7c87be 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -76,6 +76,7 @@ buildconfig_header("app_buildconfig") { "CHIP_DEVICE_CONFIG_DYNAMIC_SERVER=${chip_build_controller_dynamic_server}", "CHIP_CONFIG_ENABLE_BUSY_HANDLING_FOR_OPERATIONAL_SESSION_SETUP=${chip_enable_busy_handling_for_operational_session_setup}", "CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE=${chip_data_model_check_die_on_failure}", + "CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING=${chip_data_model_extra_logging}", ] if (chip_use_data_model_interface == "disabled") { diff --git a/src/app/CommandHandlerImpl.cpp b/src/app/CommandHandlerImpl.cpp index 2142af63494348..80373dc32ad755 100644 --- a/src/app/CommandHandlerImpl.cpp +++ b/src/app/CommandHandlerImpl.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -391,10 +392,11 @@ Status CommandHandlerImpl::ProcessCommandDataIB(CommandDataIB::Parser & aCommand VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); { + Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); DataModel::InvokeRequest request; request.path = concretePath; - request.subjectDescriptor = GetSubjectDescriptor(); + request.subjectDescriptor = &subjectDescriptor; request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); @@ -513,10 +515,11 @@ Status CommandHandlerImpl::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo const ConcreteCommandPath concretePath(mapping.endpoint_id, clusterId, commandId); { + Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); DataModel::InvokeRequest request; request.path = concretePath; - request.subjectDescriptor = GetSubjectDescriptor(); + request.subjectDescriptor = &subjectDescriptor; request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index d88299c29da412..40ec6e71b3210b 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -1646,10 +1646,12 @@ void InteractionModelEngine::DispatchCommand(CommandHandlerImpl & apCommandObj, { #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + Access::SubjectDescriptor subjectDescriptor = apCommandObj.GetSubjectDescriptor(); + DataModel::InvokeRequest request; request.path = aCommandPath; request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, apCommandObj.IsTimedInvoke()); - request.subjectDescriptor = apCommandObj.GetSubjectDescriptor(); + request.subjectDescriptor = &subjectDescriptor; std::optional status = GetDataModelProvider()->Invoke(request, apPayload, &apCommandObj); @@ -1702,7 +1704,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::ValidateCommandCanBe Protocols::InteractionModel::Status InteractionModelEngine::CheckCommandAccess(const DataModel::InvokeRequest & aRequest) { - if (!aRequest.subjectDescriptor.has_value()) + if (aRequest.subjectDescriptor == nullptr) { return Status::UnsupportedAccess; // we require a subject for invoke } diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 67a5c7a3ac99d9..7a1bbc5d57c668 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -108,8 +108,13 @@ void WriteHandler::Close() std::optional WriteHandler::IsListAttributePath(const ConcreteAttributePath & path) { #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE - VerifyOrReturnValue(mDataModelProvider != nullptr, std::nullopt, - ChipLogError(DataManagement, "Null data model while checking attribute properties.")); + if (mDataModelProvider == nullptr) + { +#if CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING + ChipLogError(DataManagement, "Null data model while checking attribute properties."); +#endif + return std::nullopt; + } auto info = mDataModelProvider->GetAttributeInfo(path); if (!info.has_value()) @@ -774,7 +779,7 @@ CHIP_ERROR WriteHandler::WriteClusterData(const Access::SubjectDescriptor & aSub DataModel::WriteAttributeRequest request; request.path = aPath; - request.subjectDescriptor = aSubject; + request.subjectDescriptor = &aSubject; request.previousSuccessPath = mLastSuccessfullyWrittenPath; request.writeFlags.Set(DataModel::WriteFlags::kTimed, IsTimedWrite()); diff --git a/src/app/clusters/chime-server/chime-server.cpp b/src/app/clusters/chime-server/chime-server.cpp new file mode 100644 index 00000000000000..b2b2367f9b826f --- /dev/null +++ b/src/app/clusters/chime-server/chime-server.cpp @@ -0,0 +1,279 @@ +/* + * + * 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. + */ + +/****************************************************************************' + * @file + * @brief Implementation for the Chime Server Cluster + ***************************************************************************/ + +#include "chime-server.h" + +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::Chime; +using namespace chip::app::Clusters::Chime::Attributes; +using chip::Protocols::InteractionModel::Status; +using ChimeSoundStructType = Structs::ChimeSoundStruct::Type; + +namespace chip { +namespace app { +namespace Clusters { + +ChimeServer::ChimeServer(EndpointId endpointId, ChimeDelegate & delegate) : + AttributeAccessInterface(MakeOptional(endpointId), Chime::Id), CommandHandlerInterface(MakeOptional(endpointId), Chime::Id), + mDelegate(delegate), mActiveChimeID(0), mEnabled(true) +{ + mDelegate.SetChimeServer(this); +} + +ChimeServer::~ChimeServer() +{ + // null out the ref to us on the delegate + mDelegate.SetChimeServer(nullptr); + + // unregister + CommandHandlerInterfaceRegistry::Instance().UnregisterCommandHandler(this); + AttributeAccessInterfaceRegistry::Instance().Unregister(this); +} + +CHIP_ERROR ChimeServer::Init() +{ + LoadPersistentAttributes(); + + VerifyOrReturnError(AttributeAccessInterfaceRegistry::Instance().Register(this), CHIP_ERROR_INTERNAL); + ReturnErrorOnFailure(CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler(this)); + return CHIP_NO_ERROR; +} + +void ChimeServer::LoadPersistentAttributes() +{ + // Load Active Chime ID + uint8_t storedActiveChimeID; + CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(GetEndpointId(), Chime::Id, ActiveChimeID::Id), storedActiveChimeID); + if (err == CHIP_NO_ERROR) + { + mActiveChimeID = storedActiveChimeID; + } + else + { + // otherwise defaults + ChipLogDetail(Zcl, "Chime: Unable to load the ActiveChimeID attribute from the KVS. Defaulting to %u", mActiveChimeID); + } + + // Load Enabled + bool storedEnabled; + err = GetSafeAttributePersistenceProvider()->ReadScalarValue(ConcreteAttributePath(GetEndpointId(), Chime::Id, Enabled::Id), + storedEnabled); + if (err == CHIP_NO_ERROR) + { + mEnabled = storedEnabled; + } + else + { + // otherwise take the default + ChipLogDetail(Zcl, "Chime: Unable to load the Enabled attribute from the KVS. Defaulting to %u", mEnabled); + } +} + +// AttributeAccessInterface +CHIP_ERROR ChimeServer::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + VerifyOrDie(aPath.mClusterId == Chime::Id); + + switch (aPath.mAttributeId) + { + case ActiveChimeID::Id: + ReturnErrorOnFailure(aEncoder.Encode(mActiveChimeID)); + break; + case Enabled::Id: + ReturnErrorOnFailure(aEncoder.Encode(mEnabled)); + break; + case InstalledChimeSounds::Id: + ChimeServer * cs = this; + CHIP_ERROR err = + aEncoder.EncodeList([cs](const auto & encoder) -> CHIP_ERROR { return cs->EncodeSupportedChimeSounds(encoder); }); + return err; + } + + return CHIP_NO_ERROR; +} + +uint8_t ChimeServer::GetActiveChimeID() const +{ + return mActiveChimeID; +} + +bool ChimeServer::GetEnabled() const +{ + return mEnabled; +} + +// helper method to get the Chime Sounds one by one and encode into a list +CHIP_ERROR ChimeServer::EncodeSupportedChimeSounds(const AttributeValueEncoder::ListEncodeHelper & encoder) +{ + + for (uint8_t i = 0; true; i++) + { + ChimeSoundStructType chimeSound; + + // Get the chime sound + // We pass in a MutableCharSpan to avoid any ownership issues - Delegate needs to use + // CopyCharSpanToMutableCharSpan to copy data in + char buffer[kMaxChimeSoundNameSize]; + MutableCharSpan name(buffer); + auto err = mDelegate.GetChimeSoundByIndex(i, chimeSound.chimeID, name); + + // return if we've run off the end of the Chime Sound List on the delegate + if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + { + return CHIP_NO_ERROR; + } + + ReturnErrorOnFailure(err); + + // set the name on the struct + chimeSound.name = name; + + // and now encode the struct + ReturnErrorOnFailure(encoder.Encode(chimeSound)); + } + return CHIP_NO_ERROR; +} + +// helper method to check if the chimeID param is supported by the delegate +bool ChimeServer::IsSupportedChimeID(uint8_t chimeID) +{ + uint8_t supportedChimeID; + for (uint8_t i = 0; mDelegate.GetChimeIDByIndex(i, supportedChimeID) != CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; i++) + { + if (supportedChimeID == chimeID) + { + return true; + } + } + + ChipLogDetail(Zcl, "Cannot find a supported ChimeID with value %u", chimeID); + return false; +} + +CHIP_ERROR ChimeServer::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +{ + VerifyOrDie(aPath.mClusterId == Chime::Id); + Status status; + + switch (aPath.mAttributeId) + { + case ActiveChimeID::Id: { + uint8_t newValue; + ReturnErrorOnFailure(aDecoder.Decode(newValue)); + status = SetActiveChimeID(newValue); + return StatusIB(status).ToChipError(); + } + case Enabled::Id: { + bool newValue; + ReturnErrorOnFailure(aDecoder.Decode(newValue)); + status = SetEnabled(newValue); + return StatusIB(status).ToChipError(); + } + + default: + // Unknown attribute + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } +} + +Status ChimeServer::SetActiveChimeID(uint8_t chimeID) +{ + if (!IsSupportedChimeID(chimeID)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + + bool activeIDChanged = !(mActiveChimeID == chimeID); + if (activeIDChanged) + { + mActiveChimeID = chimeID; + + // Write new value to persistent storage. + auto endpointId = GetEndpointId(); + ConcreteAttributePath path = ConcreteAttributePath(endpointId, Chime::Id, ActiveChimeID::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mActiveChimeID); + + // and mark as dirty + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +Status ChimeServer::SetEnabled(bool Enabled) +{ + bool enableChanged = !(mEnabled == Enabled); + + if (enableChanged) + { + mEnabled = Enabled; + + // Write new value to persistent storage. + auto endpointId = GetEndpointId(); + ConcreteAttributePath path = ConcreteAttributePath(endpointId, Chime::Id, Enabled::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mEnabled); + + // and mark as dirty + MatterReportingAttributeChangeCallback(path); + } + + return Protocols::InteractionModel::Status::Success; +} + +void ChimeServer::InvokeCommand(HandlerContext & ctx) +{ + switch (ctx.mRequestPath.mCommandId) + { + case Commands::PlayChimeSound::Id: + CommandHandlerInterface::HandleCommand( + ctx, [this](HandlerContext & ctx, const auto & req) { HandlePlayChimeSound(ctx, req); }); + break; + } +} + +void ChimeServer::HandlePlayChimeSound(HandlerContext & ctx, const Commands::PlayChimeSound::DecodableType & req) +{ + + ChipLogDetail(Zcl, "Chime: PlayChimeSound"); + + // call the delegate to play the chime + Status status = mDelegate.PlayChimeSound(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); +} + +} // namespace Clusters +} // namespace app +} // namespace chip + +/** @brief Chime Cluster Server Init + * + * Server Init + * + */ +void MatterChimePluginServerInitCallback() {} diff --git a/src/app/clusters/chime-server/chime-server.h b/src/app/clusters/chime-server/chime-server.h new file mode 100644 index 00000000000000..7e98f741987219 --- /dev/null +++ b/src/app/clusters/chime-server/chime-server.h @@ -0,0 +1,178 @@ +/* + * + * 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. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class ChimeDelegate; + +class ChimeServer : private AttributeAccessInterface, private CommandHandlerInterface +{ +public: + /** + * Creates a chime server instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aDelegate A reference to the delegate to be used by this server. + * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. + */ + ChimeServer(EndpointId endpointId, ChimeDelegate & delegate); + ~ChimeServer(); + + /** + * Initialise the chime server instance. + * @return Returns an error if the CommandHandler or AttributeHandler registration fails. + */ + CHIP_ERROR Init(); + + // Attribute Setters + /** + * Sets the ActiveChimeID attribute. Note, this also handles writing the new value into non-volatile storage. + * @param chimeSoundID The value to which the ActiveChimeID is to be set. + * @return Returns a ConstraintError if the chimeSoundID value is not valid. Returns Success otherwise. + */ + Protocols::InteractionModel::Status SetActiveChimeID(uint8_t chimeSoundID); + + /** + * Sets the Enabled attribute. Note, this also handles writing the new value into non-volatile storage. + * @param Enabled The value to which the Enabled is to be set. + */ + Protocols::InteractionModel::Status SetEnabled(bool Enabled); + + // Attribute Getters + /** + * @return The Current ActiveChimeID. + */ + uint8_t GetActiveChimeID() const; + + /** + * @return The Enabled attribute.. + */ + bool GetEnabled() const; + + /** + * @return The endpoint ID. + */ + EndpointId GetEndpointId() { return AttributeAccessInterface::GetEndpointId().Value(); } + + // Cluster constants from the spec + static constexpr uint8_t kMaxChimeSoundNameSize = 48; + + // List Change Reporting + /** + * Reports that the contents of the InstalledChimeSounds attribute have changed. + * The device SHALL call this method whenever it changes the list of installed chime sounds. + */ + void ReportInstalledChimeSoundsChange(); + +private: + ChimeDelegate & mDelegate; + + // Attribute local storage + uint8_t mActiveChimeID; + bool mEnabled; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + void HandlePlayChimeSound(HandlerContext & ctx, const Chime::Commands::PlayChimeSound::DecodableType & req); + + // Helpers + // Loads all the persistent attributes from the KVS. + void LoadPersistentAttributes(); + + // Checks if the chimeID is supported by the delegate + bool IsSupportedChimeID(uint8_t chimeID); + + // Encodes all Installed Chime Sounds + CHIP_ERROR EncodeSupportedChimeSounds(const AttributeValueEncoder::ListEncodeHelper & encoder); +}; + +/** @brief + * Defines methods for implementing application-specific logic for the Chime Cluster. + */ +class ChimeDelegate +{ +public: + ChimeDelegate() = default; + + virtual ~ChimeDelegate() = default; + + /** + * Get the installed chime sounds. + * @param index The index of the chime sound to be returned. It is assumed that chime sounds are indexable from 0 and with no + * gaps. + * @param chimeID a reference to the uint8_t variable that is to contain the ChimeID value. + * @param name A reference to the mutable char span which will be mutated to receive the chime sound name on success. Use + * CopyCharSpanToMutableCharSpan to copy into the MutableCharSpan. + * @return Returns a CHIP_NO_ERROR if there was no error and the chime sound details were returned successfully, + * CHIP_ERROR_NOT_FOUND if the index in beyond the list of available chime sounds. + * + * Note: This is used by the SDK to populate the InstalledChimeSounds attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportInstalledChimeSoundsChange method to report that this attribute has changed. + */ + virtual CHIP_ERROR GetChimeSoundByIndex(uint8_t chimeIndex, uint8_t & chimeID, MutableCharSpan & name) = 0; + + /** + * Get the installed chime sound IDs + * @param index The index of the chime ID to be returned. It is assumed that chime sounds are indexable from 0 and with no + * gaps. + * @param chimeID a reference to the uint8_t variable that is to contain the ChimeID value. + * @return Returns a CHIP_NO_ERROR if there was no error and the ChimeID was returned successfully, + * CHIP_ERROR_NOT_FOUND if the index in beyond the list of available chime sounds. + * + * Note: This is used by the SDK to help populate the InstalledChimeSounds attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportInstalledChimeSoundsChange method to report that this attribute has changed. + */ + virtual CHIP_ERROR GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID) = 0; + + // Commands + /** + * @brief Delegate should implement a handler to play the currently active chime sound. + * It should report Status::Success if successful and may + * return other Status codes if it fails + */ + virtual Protocols::InteractionModel::Status PlayChimeSound() = 0; + +protected: + friend class ChimeServer; + + ChimeServer * mChimeServer = nullptr; + + // sets the Chime Server pointer + void SetChimeServer(ChimeServer * chimeServer) { mChimeServer = chimeServer; } + ChimeServer * GetChimeServer() const { return mChimeServer; } +}; + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp index 2fb542c768aac0..dd320e5d03780a 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp @@ -31,6 +31,7 @@ #include #include #include +#include // separated out for code-reuse #include @@ -40,84 +41,32 @@ namespace chip { namespace app { -namespace { +namespace detail { -/// Handles going through callback-based enumeration of generated/accepted commands -/// for CommandHandlerInterface based items. -/// -/// Offers the ability to focus on some operation for finding a given -/// command id: -/// - FindFirst will return the first found element -/// - FindExact finds the element with the given id -/// - FindNext finds the element following the given id -class EnumeratorCommandFinder -{ -public: - using HandlerCallbackFunction = CHIP_ERROR (CommandHandlerInterface::*)(const ConcreteClusterPath &, - CommandHandlerInterface::CommandIdCallback, void *); - - enum class Operation - { - kFindFirst, // Find the first value in the list - kFindExact, // Find the given value - kFindNext // Find the value AFTER this value - }; - - EnumeratorCommandFinder(HandlerCallbackFunction callback) : - mCallback(callback), mOperation(Operation::kFindFirst), mTarget(kInvalidCommandId) - {} - - /// Find the given command ID that matches the given operation/path. - /// - /// If operation is kFindFirst, then path commandID is ignored. Otherwise it is used as a key to - /// kFindExact or kFindNext. - /// - /// Returns: - /// - std::nullopt if no command found using the command handler interface - /// - kInvalidCommandId if the find failed (but command handler interface does provide a list) - /// - valid id if command handler interface usage succeeds - std::optional FindCommandId(Operation operation, const ConcreteCommandPath & path); - - /// Uses FindCommandId to find the given command and loads the command entry data - std::optional FindCommandEntry(Operation operation, const ConcreteCommandPath & path); - -private: - HandlerCallbackFunction mCallback; - Operation mOperation; - CommandId mTarget; - std::optional mFound = std::nullopt; - - Loop HandlerCallback(CommandId id) - { - switch (mOperation) +Loop EnumeratorCommandFinder::HandlerCallback(CommandId id) +{ + switch (mOperation) + { + case Operation::kFindFirst: + mFound = id; + return Loop::Break; + case Operation::kFindExact: + if (mTarget == id) { - case Operation::kFindFirst: - mFound = id; + mFound = id; // found it return Loop::Break; - case Operation::kFindExact: - if (mTarget == id) - { - mFound = id; // found it - return Loop::Break; - } - break; - case Operation::kFindNext: - if (mTarget == id) - { - // Once we found the ID, get the first - mOperation = Operation::kFindFirst; - } - break; } - return Loop::Continue; // keep searching - } - - static Loop HandlerCallbackFn(CommandId id, void * context) - { - auto self = static_cast(context); - return self->HandlerCallback(id); + break; + case Operation::kFindNext: + if (mTarget == id) + { + // Once we found the ID, get the first + mOperation = Operation::kFindFirst; + } + break; } -}; + return Loop::Continue; // keep searching +} std::optional EnumeratorCommandFinder::FindCommandId(Operation operation, const ConcreteCommandPath & path) { @@ -140,23 +89,43 @@ std::optional EnumeratorCommandFinder::FindCommandId(Operation operat if (err != CHIP_NO_ERROR) { +#if CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING // Report the error here since we lose actual error. This generally should NOT be possible as CommandHandlerInterface // usually returns unimplemented or should just work for our use case (our callback never fails) ChipLogError(DataManagement, "Enumerate error: %" CHIP_ERROR_FORMAT, err.Format()); +#endif return kInvalidCommandId; } return mFound.value_or(kInvalidCommandId); } +} // namespace detail + +using detail::EnumeratorCommandFinder; + +namespace { + +const chip::CommandId * AcceptedCommands(const EmberAfCluster & cluster) +{ + return cluster.acceptedCommandList; +} + +const chip::CommandId * GeneratedCommands(const EmberAfCluster & cluster) +{ + return cluster.generatedCommandList; +} + /// Load the cluster information into the specified destination std::variant LoadClusterInfo(const ConcreteClusterPath & path, const EmberAfCluster & cluster) { DataVersion * versionPtr = emberAfDataVersionStorage(path); if (versionPtr == nullptr) { +#if CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING ChipLogError(AppServer, "Failed to get data version for %d/" ChipLogFormatMEI, static_cast(path.mEndpointId), ChipLogValueMEI(cluster.clusterId)); +#endif return CHIP_ERROR_NOT_FOUND; } @@ -211,7 +180,7 @@ DataModel::ClusterEntry FirstServerClusterEntry(EndpointId endpointId, const Emb return *entryValue; } -#if CHIP_ERROR_LOGGING +#if CHIP_ERROR_LOGGING && CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING if (CHIP_ERROR * errValue = std::get_if(&entry)) { ChipLogError(AppServer, "Failed to load cluster entry: %" CHIP_ERROR_FORMAT, errValue->Format()); @@ -278,20 +247,6 @@ DataModel::CommandEntry CommandEntryFrom(const ConcreteClusterPath & clusterPath return entry; } -std::optional EnumeratorCommandFinder::FindCommandEntry(Operation operation, - const ConcreteCommandPath & path) -{ - - std::optional id = FindCommandId(operation, path); - - if (!id.has_value()) - { - return std::nullopt; - } - - return (*id == kInvalidCommandId) ? DataModel::CommandEntry::kInvalid : CommandEntryFrom(path, *id); -} - // TODO: DeviceTypeEntry content is IDENTICAL to EmberAfDeviceType, so centralizing // to a common type is probably better. Need to figure out dependencies since // this would make ember return datamodel-provider types. @@ -571,7 +526,7 @@ std::optional CodegenDataModelProvider::GetClusterInfo(c if (CHIP_ERROR * err = std::get_if(&info)) { -#if CHIP_ERROR_LOGGING +#if CHIP_ERROR_LOGGING && CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING ChipLogError(AppServer, "Failed to load cluster info: %" CHIP_ERROR_FORMAT, err->Format()); #else (void) err->Format(); @@ -635,6 +590,35 @@ const EmberAfCluster * CodegenDataModelProvider::FindServerCluster(const Concret return cluster; } +CommandId CodegenDataModelProvider::FindCommand(const ConcreteCommandPath & path, detail::EnumeratorCommandFinder & handlerFinder, + detail::EnumeratorCommandFinder::Operation operation, + CodegenDataModelProvider::EmberCommandListIterator & emberIterator, + CommandListGetter commandListGetter) +{ + + std::optional handlerCommandId = handlerFinder.FindCommandId(operation, path); + if (handlerCommandId.has_value()) + { + return *handlerCommandId; + } + + const EmberAfCluster * cluster = FindServerCluster(path); + VerifyOrReturnValue(cluster != nullptr, kInvalidCommandId); + + const CommandId * commandList = commandListGetter(*cluster); + + switch (operation) + { + case EnumeratorCommandFinder::Operation::kFindFirst: + return emberIterator.First(commandList).value_or(kInvalidCommandId); + case EnumeratorCommandFinder::Operation::kFindNext: + return emberIterator.Next(commandList, path.mCommandId).value_or(kInvalidCommandId); + case EnumeratorCommandFinder::Operation::kFindExact: + default: + return emberIterator.Exists(commandList, path.mCommandId) ? path.mCommandId : kInvalidCommandId; + } +} + DataModel::AttributeEntry CodegenDataModelProvider::NextAttribute(const ConcreteAttributePath & before) { const EmberAfCluster * cluster = FindServerCluster(before); @@ -682,106 +666,58 @@ std::optional CodegenDataModelProvider::GetAttributeIn DataModel::CommandEntry CodegenDataModelProvider::FirstAcceptedCommand(const ConcreteClusterPath & path) { - auto handlerInterfaceValue = EnumeratorCommandFinder(&CommandHandlerInterface::EnumerateAcceptedCommands) - .FindCommandEntry(EnumeratorCommandFinder::Operation::kFindFirst, - ConcreteCommandPath(path.mEndpointId, path.mClusterId, kInvalidCommandId)); - - if (handlerInterfaceValue.has_value()) - { - return *handlerInterfaceValue; - } - - const EmberAfCluster * cluster = FindServerCluster(path); + EnumeratorCommandFinder handlerFinder(&CommandHandlerInterface::EnumerateAcceptedCommands); - VerifyOrReturnValue(cluster != nullptr, DataModel::CommandEntry::kInvalid); + CommandId commandId = + FindCommand(ConcreteCommandPath(path.mEndpointId, path.mClusterId, kInvalidCommandId), handlerFinder, + detail::EnumeratorCommandFinder::Operation::kFindFirst, mAcceptedCommandsIterator, AcceptedCommands); - std::optional commandId = mAcceptedCommandsIterator.First(cluster->acceptedCommandList); - VerifyOrReturnValue(commandId.has_value(), DataModel::CommandEntry::kInvalid); - - return CommandEntryFrom(path, *commandId); + VerifyOrReturnValue(commandId != kInvalidCommandId, DataModel::CommandEntry::kInvalid); + return CommandEntryFrom(path, commandId); } DataModel::CommandEntry CodegenDataModelProvider::NextAcceptedCommand(const ConcreteCommandPath & before) { - // TODO: `Next` redirecting to a callback is slow O(n^2). - // see https://github.com/project-chip/connectedhomeip/issues/35790 - auto handlerInterfaceValue = EnumeratorCommandFinder(&CommandHandlerInterface::EnumerateAcceptedCommands) - .FindCommandEntry(EnumeratorCommandFinder::Operation::kFindNext, before); - - if (handlerInterfaceValue.has_value()) - { - return *handlerInterfaceValue; - } - - const EmberAfCluster * cluster = FindServerCluster(before); - VerifyOrReturnValue(cluster != nullptr, DataModel::CommandEntry::kInvalid); + EnumeratorCommandFinder handlerFinder(&CommandHandlerInterface::EnumerateAcceptedCommands); + CommandId commandId = FindCommand(before, handlerFinder, detail::EnumeratorCommandFinder::Operation::kFindNext, + mAcceptedCommandsIterator, AcceptedCommands); - std::optional commandId = mAcceptedCommandsIterator.Next(cluster->acceptedCommandList, before.mCommandId); - VerifyOrReturnValue(commandId.has_value(), DataModel::CommandEntry::kInvalid); - - return CommandEntryFrom(before, *commandId); + VerifyOrReturnValue(commandId != kInvalidCommandId, DataModel::CommandEntry::kInvalid); + return CommandEntryFrom(before, commandId); } std::optional CodegenDataModelProvider::GetAcceptedCommandInfo(const ConcreteCommandPath & path) { - auto handlerInterfaceValue = EnumeratorCommandFinder(&CommandHandlerInterface::EnumerateAcceptedCommands) - .FindCommandEntry(EnumeratorCommandFinder::Operation::kFindExact, path); - if (handlerInterfaceValue.has_value()) - { - return handlerInterfaceValue->IsValid() ? std::make_optional(handlerInterfaceValue->info) : std::nullopt; - } - - const EmberAfCluster * cluster = FindServerCluster(path); + EnumeratorCommandFinder handlerFinder(&CommandHandlerInterface::EnumerateAcceptedCommands); + CommandId commandId = FindCommand(path, handlerFinder, detail::EnumeratorCommandFinder::Operation::kFindExact, + mAcceptedCommandsIterator, AcceptedCommands); - VerifyOrReturnValue(cluster != nullptr, std::nullopt); - VerifyOrReturnValue(mAcceptedCommandsIterator.Exists(cluster->acceptedCommandList, path.mCommandId), std::nullopt); - - return CommandEntryFrom(path, path.mCommandId).info; + VerifyOrReturnValue(commandId != kInvalidCommandId, std::nullopt); + return CommandEntryFrom(path, commandId).info; } ConcreteCommandPath CodegenDataModelProvider::FirstGeneratedCommand(const ConcreteClusterPath & path) { - std::optional commandId = - EnumeratorCommandFinder(&CommandHandlerInterface::EnumerateGeneratedCommands) - .FindCommandId(EnumeratorCommandFinder::Operation::kFindFirst, - ConcreteCommandPath(path.mEndpointId, path.mClusterId, kInvalidCommandId)); - if (commandId.has_value()) - { - return *commandId == kInvalidCommandId ? kInvalidCommandPath - : ConcreteCommandPath(path.mEndpointId, path.mClusterId, *commandId); - } + EnumeratorCommandFinder handlerFinder(&CommandHandlerInterface::EnumerateGeneratedCommands); + CommandId commandId = + FindCommand(ConcreteCommandPath(path.mEndpointId, path.mClusterId, kInvalidCommandId), handlerFinder, + detail::EnumeratorCommandFinder::Operation::kFindFirst, mGeneratedCommandsIterator, GeneratedCommands); - const EmberAfCluster * cluster = FindServerCluster(path); - VerifyOrReturnValue(cluster != nullptr, kInvalidCommandPath); - - commandId = mGeneratedCommandsIterator.First(cluster->generatedCommandList); - VerifyOrReturnValue(commandId.has_value(), kInvalidCommandPath); - return ConcreteCommandPath(path.mEndpointId, path.mClusterId, *commandId); + VerifyOrReturnValue(commandId != kInvalidCommandId, kInvalidCommandPath); + return ConcreteCommandPath(path.mEndpointId, path.mClusterId, commandId); } ConcreteCommandPath CodegenDataModelProvider::NextGeneratedCommand(const ConcreteCommandPath & before) { - // TODO: `Next` redirecting to a callback is slow O(n^2). - // see https://github.com/project-chip/connectedhomeip/issues/35790 - auto nextId = EnumeratorCommandFinder(&CommandHandlerInterface::EnumerateGeneratedCommands) - .FindCommandId(EnumeratorCommandFinder::Operation::kFindNext, before); - - if (nextId.has_value()) - { - return (*nextId == kInvalidCommandId) ? kInvalidCommandPath - : ConcreteCommandPath(before.mEndpointId, before.mClusterId, *nextId); - } - - const EmberAfCluster * cluster = FindServerCluster(before); - - VerifyOrReturnValue(cluster != nullptr, kInvalidCommandPath); + EnumeratorCommandFinder handlerFinder(&CommandHandlerInterface::EnumerateGeneratedCommands); - std::optional commandId = mGeneratedCommandsIterator.Next(cluster->generatedCommandList, before.mCommandId); - VerifyOrReturnValue(commandId.has_value(), kInvalidCommandPath); + CommandId commandId = FindCommand(before, handlerFinder, detail::EnumeratorCommandFinder::Operation::kFindNext, + mGeneratedCommandsIterator, GeneratedCommands); - return ConcreteCommandPath(before.mEndpointId, before.mClusterId, *commandId); + VerifyOrReturnValue(commandId != kInvalidCommandId, kInvalidCommandPath); + return ConcreteCommandPath(before.mEndpointId, before.mClusterId, commandId); } std::optional CodegenDataModelProvider::FirstDeviceType(EndpointId endpoint) diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.h b/src/app/codegen-data-model-provider/CodegenDataModelProvider.h index 085ae67ec392ab..5c87e264fd2aea 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.h +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider.h @@ -16,14 +16,71 @@ */ #pragma once -#include "app/data-model-provider/ActionReturnStatus.h" +#include "app/ConcreteCommandPath.h" #include +#include +#include #include namespace chip { namespace app { +namespace detail { + +/// Handles going through callback-based enumeration of generated/accepted commands +/// for CommandHandlerInterface based items. +/// +/// Offers the ability to focus on some operation for finding a given +/// command id: +/// - FindFirst will return the first found element +/// - FindExact finds the element with the given id +/// - FindNext finds the element following the given id +class EnumeratorCommandFinder +{ +public: + using HandlerCallbackFunction = CHIP_ERROR (CommandHandlerInterface::*)(const ConcreteClusterPath &, + CommandHandlerInterface::CommandIdCallback, void *); + + enum class Operation + { + kFindFirst, // Find the first value in the list + kFindExact, // Find the given value + kFindNext // Find the value AFTER this value + }; + + EnumeratorCommandFinder(HandlerCallbackFunction callback) : + mCallback(callback), mOperation(Operation::kFindFirst), mTarget(kInvalidCommandId) + {} + + /// Find the given command ID that matches the given operation/path. + /// + /// If operation is kFindFirst, then path commandID is ignored. Otherwise it is used as a key to + /// kFindExact or kFindNext. + /// + /// Returns: + /// - std::nullopt if no command found using the command handler interface + /// - kInvalidCommandId if the find failed (but command handler interface does provide a list) + /// - valid id if command handler interface usage succeeds + std::optional FindCommandId(Operation operation, const ConcreteCommandPath & path); + +private: + HandlerCallbackFunction mCallback; + Operation mOperation; + CommandId mTarget; + std::optional mFound = std::nullopt; + + Loop HandlerCallback(CommandId id); + + static Loop HandlerCallbackFn(CommandId id, void * context) + { + auto self = static_cast(context); + return self->HandlerCallback(id); + } +}; + +} // namespace detail + /// An implementation of `InteractionModel::Model` that relies on code-generation /// via zap/ember. /// @@ -152,6 +209,12 @@ class CodegenDataModelProvider : public chip::app::DataModel::Provider /// Find the index of the given endpoint id std::optional TryFindEndpointIndex(chip::EndpointId id) const; + + using CommandListGetter = const chip::CommandId *(const EmberAfCluster &); + + CommandId FindCommand(const ConcreteCommandPath & path, detail::EnumeratorCommandFinder & handlerFinder, + detail::EnumeratorCommandFinder::Operation operation, + CodegenDataModelProvider::EmberCommandListIterator & emberIterator, CommandListGetter commandListGetter); }; } // namespace app diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp index 6ce5d282f89d30..aa357ce4dfb5cb 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include @@ -85,173 +87,6 @@ std::optional TryReadViaAccessInterface(const ConcreteAttributePath return encoder.TriedEncode() ? std::make_optional(CHIP_NO_ERROR) : std::nullopt; } -/// Metadata of what a ember/pascal short string means (prepended by a u8 length) -struct ShortPascalString -{ - using LengthType = uint8_t; - static constexpr LengthType kNullLength = 0xFF; - - static size_t GetLength(ByteSpan buffer) - { - VerifyOrDie(buffer.size() >= 1); - // NOTE: we do NOT use emberAfStringLength from ember-strings.h because that will result in 0 - // length for null sizes (i.e. 0xFF is translated to 0 and we do not want that here) - return buffer[0]; - } -}; - -/// Metadata of what a ember/pascal LONG string means (prepended by a u16 length) -struct LongPascalString -{ - using LengthType = uint16_t; - static constexpr LengthType kNullLength = 0xFFFF; - - static size_t GetLength(ByteSpan buffer) - { - // NOTE: we do NOT use emberAfLongStringLength from ember-strings.h because that will result in 0 - // length for null sizes (i.e. 0xFFFF is translated to 0 and we do not want that here) - VerifyOrDie(buffer.size() >= 2); - const uint8_t * data = buffer.data(); - return Encoding::LittleEndian::Read16(data); - } -}; - -// ember assumptions ... should just work -static_assert(sizeof(ShortPascalString::LengthType) == 1); -static_assert(sizeof(LongPascalString::LengthType) == 2); - -/// Given a ByteSpan containing data from ember, interpret it -/// as a span of type OUT (i.e. ByteSpan or CharSpan) given a ENCODING -/// where ENCODING is Short or Long pascal strings. -template -std::optional ExtractEmberString(ByteSpan data) -{ - constexpr size_t kLengthTypeSize = sizeof(typename ENCODING::LengthType); - VerifyOrDie(kLengthTypeSize <= data.size()); - auto len = ENCODING::GetLength(data); - - if (len == ENCODING::kNullLength) - { - return std::nullopt; - } - - VerifyOrDie(len + sizeof(len) <= data.size()); - return std::make_optional(reinterpret_cast(data.data() + kLengthTypeSize), len); -} - -/// Encode a value inside `encoder` -/// -/// The value encoded will be of type T (e.g. CharSpan or ByteSpan) and it will be decoded -/// via the given ENCODING (i.e. ShortPascalString or LongPascalString) -/// -/// isNullable defines if the value of NULL is allowed to be encoded. -template -CHIP_ERROR EncodeStringLike(ByteSpan data, bool isNullable, AttributeValueEncoder & encoder) -{ - std::optional value = ExtractEmberString(data); - if (!value.has_value()) - { - if (isNullable) - { - return encoder.EncodeNull(); - } - return CHIP_ERROR_INCORRECT_STATE; - } - - // encode value as-is - return encoder.Encode(*value); -} - -/// Encodes a numeric data value of type T from the given ember-encoded buffer `data`. -/// -/// isNullable defines if the value of NULL is allowed to be encoded. -template -CHIP_ERROR EncodeFromSpan(ByteSpan data, bool isNullable, AttributeValueEncoder & encoder) -{ - typename NumericAttributeTraits::StorageType value; - - VerifyOrReturnError(data.size() >= sizeof(value), CHIP_ERROR_INVALID_ARGUMENT); - memcpy(&value, data.data(), sizeof(value)); - - if (isNullable && NumericAttributeTraits::IsNullValue(value)) - { - return encoder.EncodeNull(); - } - - if (!NumericAttributeTraits::CanRepresentValue(isNullable, value)) - { - return CHIP_ERROR_INCORRECT_STATE; - } - - return encoder.Encode(NumericAttributeTraits::StorageToWorking(value)); -} - -/// Converts raw ember data from `data` into the encoder -/// -/// Uses the attribute `metadata` to determine how the data is encoded into `data` and -/// write a suitable value into `encoder`. -CHIP_ERROR EncodeEmberValue(ByteSpan data, const EmberAfAttributeMetadata * metadata, AttributeValueEncoder & encoder) -{ - VerifyOrReturnError(metadata != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - const bool isNullable = metadata->IsNullable(); - - switch (AttributeBaseType(metadata->attributeType)) - { - case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data - return encoder.EncodeNull(); - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_SINGLE_ATTRIBUTE_TYPE: // 32-bit float - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_DOUBLE_ATTRIBUTE_TYPE: // 64-bit float - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string - return EncodeStringLike(data, isNullable, encoder); - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - return EncodeStringLike(data, isNullable, encoder); - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string - return EncodeStringLike(data, isNullable, encoder); - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - return EncodeStringLike(data, isNullable, encoder); - default: - ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(metadata->attributeType)); - return CHIP_IM_GLOBAL_STATUS(Failure); - } -} - } // namespace /// separated-out ReadAttribute implementation (given existing complexity) @@ -271,7 +106,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data // ACL check for non-internal requests if (!request.operationFlags.Has(DataModel::OperationFlags::kInternal)) { - VerifyOrReturnError(request.subjectDescriptor.has_value(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(request.subjectDescriptor != nullptr, CHIP_ERROR_INVALID_ARGUMENT); Access::RequestPath requestPath{ .cluster = request.path.mClusterId, .endpoint = request.path.mEndpointId, @@ -343,7 +178,11 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); } - return EncodeEmberValue(gEmberAttributeIOBufferSpan, attributeMetadata, encoder); + VerifyOrReturnError(attributeMetadata != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + MutableByteSpan data = gEmberAttributeIOBufferSpan; + Ember::EmberAttributeDataBuffer emberData(attributeMetadata, data); + return encoder.Encode(emberData); } } // namespace app diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp index 51807fe98cf47d..de2f8886476707 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp @@ -159,7 +159,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat if (checkAcl) { - VerifyOrReturnError(request.subjectDescriptor.has_value(), Status::UnsupportedAccess); + VerifyOrReturnError(request.subjectDescriptor != nullptr, Status::UnsupportedAccess); Access::RequestPath requestPath{ .cluster = request.path.mClusterId, .endpoint = request.path.mEndpointId, diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp index ab8891657fde50..2c764241ebf3d8 100644 --- a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp +++ b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp @@ -17,14 +17,18 @@ #include #include +#include #include #include #include +#include #include +#include #include #include #include +#include #include namespace chip { @@ -43,7 +47,7 @@ constexpr uint32_t MaxLength(EmberAttributeDataBuffer::PascalStringType s) { return std::numeric_limits::max() - 1; } - // EmberAttributeBuffer::PascalStringType::kLong: + // EmberAttributeDataBuffer::PascalStringType::kLong: return std::numeric_limits::max() - 1; } @@ -116,6 +120,55 @@ constexpr SignedDecodeInfo GetSignedDecodeInfo(EmberAfAttributeType type) chipDie(); } +/// Encodes the string of type stringType pointed to by `reader` into the TLV `writer`. +/// Then encoded string will be at tag `tag` and of type `tlvType` +CHIP_ERROR EncodeString(EmberAttributeDataBuffer::PascalStringType stringType, TLV::TLVType tlvType, TLV::TLVWriter & writer, + TLV::Tag tag, EmberAttributeDataBuffer::EndianReader & reader, bool nullable) +{ + unsigned stringLen; + if (stringType == EmberAttributeDataBuffer::PascalStringType::kShort) + { + uint8_t len; + if (!reader.Read8(&len).IsSuccess()) + { + return reader.StatusCode(); + } + if (len == NumericAttributeTraits::kNullValue) + { + VerifyOrReturnError(nullable, CHIP_ERROR_INVALID_ARGUMENT); + return writer.PutNull(tag); + } + stringLen = len; + } + else + { + uint16_t len; + if (!reader.Read16(&len).IsSuccess()) + { + return reader.StatusCode(); + } + if (len == NumericAttributeTraits::kNullValue) + { + VerifyOrReturnError(nullable, CHIP_ERROR_INVALID_ARGUMENT); + return writer.PutNull(tag); + } + stringLen = len; + } + + const uint8_t * data; + if (!reader.ZeroCopyProcessBytes(stringLen, &data).IsSuccess()) + { + return reader.StatusCode(); + } + + if (tlvType == TLV::kTLVType_UTF8String) + { + return writer.PutString(tag, reinterpret_cast(data), stringLen); + } + + return writer.PutBytes(tag, data, stringLen); +} + } // namespace CHIP_ERROR EmberAttributeDataBuffer::DecodeUnsignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer) @@ -191,6 +244,7 @@ CHIP_ERROR EmberAttributeDataBuffer::DecodeAsString(chip::TLV::TLVReader & reade writer.Put16(NumericAttributeTraits::kNullValue); break; } + return CHIP_NO_ERROR; } @@ -321,6 +375,200 @@ CHIP_ERROR EmberAttributeDataBuffer::Decode(chip::TLV::TLVReader & reader) return CHIP_NO_ERROR; } +CHIP_ERROR EmberAttributeDataBuffer::EncodeInteger(chip::TLV::TLVWriter & writer, TLV::Tag tag, EndianReader & reader) const +{ + // Encodes an integer by first reading as raw bytes and then + // bitshift-convert + // + // This optimizes code size rather than readability at this point. + + uint8_t raw_bytes[8]; + + bool isSigned = (mAttributeType == ZCL_INT8S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT16S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT24S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT32S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT40S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT48S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT56S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT64S_ATTRIBUTE_TYPE); + + unsigned byteCount; + uint64_t nullValue; + + if (isSigned) + { + const SignedDecodeInfo info = GetSignedDecodeInfo(mAttributeType); + byteCount = info.byteCount; + nullValue = static_cast(info.minValue); // just a bit cast for easy compare + } + else + { + const UnsignedDecodeInfo info = GetUnsignedDecodeInfo(mAttributeType); + byteCount = info.byteCount; + nullValue = info.maxValue; + } + + VerifyOrDie(sizeof(raw_bytes) >= byteCount); + if (!reader.ReadBytes(raw_bytes, byteCount).IsSuccess()) + { + return reader.StatusCode(); + } + + // At this point, RAW_VALUE contains the actual value, need to make it "real" + union + { + int64_t int_value; + uint64_t uint_value; + } value; + + value.uint_value = 0; + +#if CHIP_CONFIG_BIG_ENDIAN_TARGET + bool isNegative = isSigned && (raw_bytes[0] >= 0x80); + if (isNegative) + { + value.int_value = -1; + } + for (int i = 0; i < static_cast(byteCount); i++) + { +#else + bool isNegative = isSigned && (raw_bytes[byteCount - 1] >= 0x80); + if (isNegative) + { + value.int_value = -1; + } + for (int i = static_cast(byteCount) - 1; i >= 0; i--) + { +#endif + value.uint_value <<= 8; + value.uint_value = (value.uint_value & ~0xFFULL) | raw_bytes[i]; + } + + if (mIsNullable && (value.uint_value == nullValue)) + { + // MaxValue is used for NULL setting + return writer.PutNull(tag); + } + + switch (mAttributeType) + { + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + case ZCL_INT56U_ATTRIBUTE_TYPE: // Signed 56-bit integer + case ZCL_INT64U_ATTRIBUTE_TYPE: // Signed 64-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + return writer.Put(tag, static_cast(value.int_value)); + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + return writer.Put(tag, static_cast(value.int_value)); + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + return writer.Put(tag, static_cast(value.int_value)); + default: + return writer.Put(tag, static_cast(value.int_value)); + } +} + +CHIP_ERROR EmberAttributeDataBuffer::Encode(chip::TLV::TLVWriter & writer, TLV::Tag tag) const +{ + EndianReader endianReader(mDataBuffer.data(), mDataBuffer.size()); + + switch (mAttributeType) + { + case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data + return writer.PutNull(tag); + case ZCL_BOOLEAN_ATTRIBUTE_TYPE: { // Boolean + uint8_t value; + if (!endianReader.Read8(&value).IsSuccess()) + { + return endianReader.StatusCode(); + } + switch (value) + { + case 0: + case 1: + return writer.PutBoolean(tag, value != 0); + case 0xFF: + return writer.PutNull(tag); + default: + // Unknown types + return CHIP_ERROR_INCORRECT_STATE; + } + } + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer + case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer + case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer + case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer + case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer + return EncodeInteger(writer, tag, endianReader); + case ZCL_SINGLE_ATTRIBUTE_TYPE: { // 32-bit float + union + { + uint8_t raw[sizeof(float)]; + float value; + } value; + + if (!endianReader.ReadBytes(value.raw, sizeof(value)).IsSuccess()) + { + return endianReader.StatusCode(); + } + if (NumericAttributeTraits::IsNullValue(value.value)) + { + return writer.PutNull(tag); + } + return writer.Put(tag, value.value); + } + case ZCL_DOUBLE_ATTRIBUTE_TYPE: { // 64-bit float + union + { + uint8_t raw[sizeof(double)]; + double value; + } value; + + if (!endianReader.ReadBytes(value.raw, sizeof(value)).IsSuccess()) + { + return endianReader.StatusCode(); + } + if (NumericAttributeTraits::IsNullValue(value.value)) + { + return writer.PutNull(tag); + } + return writer.Put(tag, value.value); + } + + case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string + return EncodeString(PascalStringType::kShort, TLV::kTLVType_UTF8String, writer, tag, endianReader, mIsNullable); + case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: + return EncodeString(PascalStringType::kLong, TLV::kTLVType_UTF8String, writer, tag, endianReader, mIsNullable); + case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string + return EncodeString(PascalStringType::kShort, TLV::kTLVType_ByteString, writer, tag, endianReader, mIsNullable); + case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: + return EncodeString(PascalStringType::kLong, TLV::kTLVType_ByteString, writer, tag, endianReader, mIsNullable); + default: + ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(mAttributeType)); + return CHIP_IM_GLOBAL_STATUS(Failure); + } +} + } // namespace Ember } // namespace app } // namespace chip diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h index a4f24c78c0476b..c3d7acfcafb72b 100644 --- a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h +++ b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h @@ -16,10 +16,12 @@ */ #pragma once +#include "lib/core/TLVWriter.h" #include #include #include #include +#include #include #include @@ -39,6 +41,14 @@ namespace Ember { class EmberAttributeDataBuffer { public: +#if CHIP_CONFIG_BIG_ENDIAN_TARGET + using EndianWriter = Encoding::BigEndian::BufferWriter; + using EndianReader = Encoding::BigEndian::Reader; +#else + using EndianWriter = Encoding::LittleEndian::BufferWriter; + using EndianReader = Encoding::LittleEndian::Reader; +#endif + enum class PascalStringType { kShort, @@ -59,12 +69,14 @@ class EmberAttributeDataBuffer /// modified by this call. CHIP_ERROR Decode(chip::TLV::TLVReader & reader); + /// Writes the data encoded in the underlying buffer into the given `writer` + /// + /// The data in the internal data buffer is assumed to be already formatted correctly + /// HOWEVER the size inside it will not be fully considered (i.e. encoding will use + /// the data encoding line integer or string sizes and NOT the databuffer max size) + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, TLV::Tag tag) const; + private: -#if CHIP_CONFIG_BIG_ENDIAN_TARGET - using EndianWriter = Encoding::BigEndian::BufferWriter; -#else - using EndianWriter = Encoding::LittleEndian::BufferWriter; -#endif /// Decodes the UNSIGNED integer stored in `reader` and places its content into `writer` /// Takes into account internal mIsNullable. CHIP_ERROR DecodeUnsignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer); @@ -73,6 +85,10 @@ class EmberAttributeDataBuffer /// Takes into account internal mIsNullable. CHIP_ERROR DecodeSignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer); + /// Encodes the UNSIGNED integer into `writer`. + /// Takes into account internal mIsNullable. + CHIP_ERROR EncodeInteger(chip::TLV::TLVWriter & writer, TLV::Tag tag, EndianReader & reader) const; + /// Decodes the string/byte string contained in `reader` and stores it into `writer`. /// String is encoded using a pascal-prefix of size `stringType`. /// Takes into account internal mIsNullable. @@ -96,6 +112,11 @@ inline CHIP_ERROR Decode(TLV::TLVReader & reader, Ember::EmberAttributeDataBuffe return buffer.Decode(reader); } +inline CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, Ember::EmberAttributeDataBuffer & buffer) +{ + return buffer.Encode(writer, tag); +} + } // namespace DataModel } // namespace app } // namespace chip diff --git a/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp b/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp index 7d46360029c529..dc83773454d1ff 100644 --- a/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp +++ b/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp @@ -101,6 +101,56 @@ class EncodeResult std::optional mResult; }; +template +bool IsEqual(const T & a, const T & b) +{ + return a == b; +} + +template <> +bool IsEqual(const ByteSpan & a, const ByteSpan & b) +{ + return a.data_equal(b); +} + +template <> +bool IsEqual(const CharSpan & a, const CharSpan & b) +{ + return a.data_equal(b); +} + +template +bool IsEqual(const std::optional & a, const std::optional & b) +{ + if (a.has_value() != b.has_value()) + { + return false; + } + + if (!a.has_value()) + { + return true; + } + + return IsEqual(*a, *b); +} + +template +bool IsEqual(const DataModel::Nullable & a, const DataModel::Nullable & b) +{ + if (a.IsNull() != b.IsNull()) + { + return false; + } + + if (a.IsNull()) + { + return true; + } + + return IsEqual(a.Value(), b.Value()); +} + /// Validates that an encoded value in ember takes a specific format template class EncodeTester @@ -122,7 +172,6 @@ class EncodeTester CHIP_ERROR err = buffer.Decode(reader); if (err != CHIP_NO_ERROR) { - ChipLogError(Test, "Decoding failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; } @@ -142,6 +191,42 @@ class EncodeTester return EncodeResult::Ok(); } + template + EncodeResult TryDecode(const T & value, const uint8_t (&arr)[N]) + { + // Write data to TLV + { + uint8_t mutableBuffer[N]; + memcpy(mutableBuffer, arr, N); + + MutableByteSpan data_span(mutableBuffer); + Ember::EmberAttributeDataBuffer buffer(mMetaData, data_span); + + TLV::TLVWriter writer; + writer.Init(mEmberAttributeDataBuffer, sizeof(mEmberAttributeDataBuffer)); + ReturnErrorOnFailure(buffer.Encode(writer, TLV::AnonymousTag())); + ReturnErrorOnFailure(writer.Finalize()); + } + + // Data was written in TLV. Take it back out + + TLV::TLVReader reader; + reader.Init(mEmberAttributeDataBuffer, sizeof(mEmberAttributeDataBuffer)); + + ReturnErrorOnFailure(reader.Next()); + + T encodedValue; + ReturnErrorOnFailure(DataModel::Decode(reader, encodedValue)); + + if (!IsEqual(encodedValue, value)) + { + ChipLogError(Test, "Encode mismatch: different data"); + return CHIP_ERROR_INTERNAL; + } + + return EncodeResult::Ok(); + } + private: const EmberAfAttributeMetadata * mMetaData; uint8_t mEmberAttributeDataBuffer[kMaxSize]; @@ -570,7 +655,7 @@ TEST(TestEmberAttributeBuffer, TestEncodeStrings) } } -TEST(TestEmberAttributeBuffer, TestFailures) +TEST(TestEmberAttributeBuffer, TestEncodeFailures) { { // attribute type that is not handled @@ -581,11 +666,38 @@ TEST(TestEmberAttributeBuffer, TestFailures) { // Insufficient space EncodeTester<3> tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + // Empty is ok EXPECT_TRUE(tester.TryEncode(""_span, { 0 }).IsSuccess()); + + // Short strings (with and without count) is wrong. EXPECT_EQ(tester.TryEncode("test"_span, { 0 }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("foo"_span, { 3, 'f', 'o' }), CHIP_ERROR_NO_MEMORY); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); } + { + // Insufficient space + EncodeTester<3> tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + // Empty is ok + EXPECT_TRUE(tester.TryEncode(""_span, { 0, 0 }).IsSuccess()); + + // Short strings (with and without count) is wrong. + EXPECT_EQ(tester.TryEncode("test"_span, { 0 }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("foo"_span, { 0, 3, 'f', 'o' }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("test"_span, { 0xFF }), CHIP_ERROR_NO_MEMORY); + + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + + { + // Insufficient space even for length + EncodeTester<1> tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_EQ(tester.TryEncode(""_span, { 0 }), CHIP_ERROR_NO_MEMORY); + } + // bad type casts { EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); @@ -596,3 +708,429 @@ TEST(TestEmberAttributeBuffer, TestFailures) EXPECT_EQ(tester.TryEncode(true, { 0 }), CHIP_ERROR_WRONG_TLV_TYPE); } } + +TEST(TestEmberAttributeBuffer, TestNoData) +{ + EncodeTester tester(CreateFakeMeta(ZCL_NO_DATA_ATTRIBUTE_TYPE, true /* nullable */)); + + // support a always-null type + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); +} + +TEST(TestEmberAttributeBuffer, TestDecodeFailures) +{ + { + // attribute type that is not handled + EncodeTester tester(CreateFakeMeta(ZCL_UNKNOWN_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_EQ(tester.TryDecode>(DataModel::NullNullable, { 0 }), CHIP_IM_GLOBAL_STATUS(Failure)); + } + + { + // Insufficient input + EncodeTester<3> tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_EQ(tester.TryDecode("test"_span, { 10 }), CHIP_ERROR_BUFFER_TOO_SMALL); + EXPECT_EQ(tester.TryDecode("foo"_span, { 3, 'f', 'o' }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(123, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_SINGLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(1.5f, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(1.5, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Bad boolean data + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(true, { 123 }), CHIP_ERROR_INCORRECT_STATE); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeSignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-128, { 0x80 }).IsSuccess()); + + // longer data is ok + EXPECT_TRUE(tester.TryDecode(-128, { 0x80, 1, 2, 3, 4 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-127, { 0x81 }).IsSuccess()); + + // NULL can be decoded + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x80 }).IsSuccess()); + + // decoding as nullable proceeds as normal + EXPECT_TRUE(tester.TryDecode>(-127, { 0x81 }).IsSuccess()); + } + + { + + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-128, { 0x80, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(std::numeric_limits::min(), { 0x0, 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF }).IsSuccess()); + + // NULL decoding + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x80 }).IsSuccess()); + } + + // Odd size integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x00, 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40S_ATTRIBUTE_TYPE, true /* nullable */)); + + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-123456789, { 0xeb, 0x32, 0xa4, 0xf8, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-12345678910, { 0xc2, 0xe3, 0x23, 0x20, 0xfd }).IsSuccess()); + + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x00, 0x00, 0x00, 0x80 }).IsSuccess()); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // min/max ranges too + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min(), { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeUnsignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + + // NULL decoding should work + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFFFF, { 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + + // NULL SUPPORT + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0, 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x1234567, { 0x67, 0x45, 0x23, 0x01, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xAABBCCDDEEFF1122, { 0x22, 0x11, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max() - 1, { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, false /* nullable */)); + + // we should be able to encode the maximum value + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + } + + /// Odd sized integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFFFFFF, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(0x1234, { 0x34, 0x12, 0x00 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456FFFF, { 0xFF, 0xFF, 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0, 0, 0, 0 }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeStrings) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("foo"_span, { 3, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("foo"_span, { 3, 0, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + + const uint8_t kOctetData[] = { 1, 2, 3 }; + + // Binary data + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeBool) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(false, { 0 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode>(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(false, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeFloatingPoint) +{ + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_SINGLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0, 0, 0xC0, 0x7F }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F }).IsSuccess()); + } +} diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 61e7c45582268a..f5259748d9421c 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -36,6 +36,7 @@ CommandHandlerInterfaceOnlyClusters: - RVC Operational State - Sample MEI - Microwave Oven Control + - Chime - Energy EVSE - Energy EVSE Mode - Device Energy Management diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index d3e7ce34bf0338..e5d5748153d09c 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -40,4 +40,11 @@ declare_args() { # If/once the chip_use_data_model_interface flag is removed or does not support # a `check` option, this should alwo be removed chip_data_model_check_die_on_failure = false + + # This controls if more logging is supposed to be enabled into the data models. + # This is an optimization for small-flash size devices as extra logging requires + # additional flash for messages & code for formatting. + chip_data_model_extra_logging = + current_os == "linux" || current_os == "ios" || current_os == "mac" || + current_os == "android" } diff --git a/src/app/data-model-provider/OperationTypes.h b/src/app/data-model-provider/OperationTypes.h index 6bfffccc655f00..294bf2616435b4 100644 --- a/src/app/data-model-provider/OperationTypes.h +++ b/src/app/data-model-provider/OperationTypes.h @@ -55,7 +55,7 @@ struct OperationRequest /// - operationFlags.Has(OperationFlags::kInternal) MUST NOT have this set /// /// NOTE: once kInternal flag is removed, this will become non-optional - std::optional subjectDescriptor; + const chip::Access::SubjectDescriptor * subjectDescriptor = nullptr; /// Accessing fabric index is the subjectDescriptor fabric index (if any). /// This is a readability convenience function. @@ -63,7 +63,8 @@ struct OperationRequest /// Returns kUndefinedFabricIndex if no subject descriptor is available FabricIndex GetAccessingFabricIndex() const { - return subjectDescriptor.has_value() ? subjectDescriptor->fabricIndex : kUndefinedFabricIndex; + VerifyOrReturnValue(subjectDescriptor != nullptr, kUndefinedFabricIndex); + return subjectDescriptor->fabricIndex; } }; diff --git a/src/app/data-model-provider/tests/ReadTesting.h b/src/app/data-model-provider/tests/ReadTesting.h index f7cee20c27123b..e34a83377313ab 100644 --- a/src/app/data-model-provider/tests/ReadTesting.h +++ b/src/app/data-model-provider/tests/ReadTesting.h @@ -136,7 +136,7 @@ class ReadOperation ReadOperation(const ConcreteAttributePath & path) { mRequest.path = path; - mRequest.subjectDescriptor = kDenySubjectDescriptor; + mRequest.subjectDescriptor = &kDenySubjectDescriptor; } ReadOperation(EndpointId endpoint, ClusterId cluster, AttributeId attribute) : @@ -146,7 +146,7 @@ class ReadOperation ReadOperation & SetSubjectDescriptor(const chip::Access::SubjectDescriptor & descriptor) { VerifyOrDie(mState == State::kInitializing); - mRequest.subjectDescriptor = descriptor; + mRequest.subjectDescriptor = &descriptor; return *this; } diff --git a/src/app/data-model-provider/tests/WriteTesting.h b/src/app/data-model-provider/tests/WriteTesting.h index d18fb93fdd70cc..7651ffe37940f3 100644 --- a/src/app/data-model-provider/tests/WriteTesting.h +++ b/src/app/data-model-provider/tests/WriteTesting.h @@ -47,7 +47,7 @@ class WriteOperation WriteOperation(const ConcreteDataAttributePath & path) { mRequest.path = path; - mRequest.subjectDescriptor = kDenySubjectDescriptor; + mRequest.subjectDescriptor = &kDenySubjectDescriptor; } WriteOperation(EndpointId endpoint, ClusterId cluster, AttributeId attribute) : @@ -56,7 +56,7 @@ class WriteOperation WriteOperation & SetSubjectDescriptor(const chip::Access::SubjectDescriptor & descriptor) { - mRequest.subjectDescriptor = descriptor; + mRequest.subjectDescriptor = &descriptor; return *this; } @@ -123,7 +123,11 @@ class WriteOperation AttributeValueDecoder DecoderFor(const T & value) { mTLVReader = ReadEncodedValue(value); - return AttributeValueDecoder(mTLVReader, mRequest.subjectDescriptor.value_or(kDenySubjectDescriptor)); + if (mRequest.subjectDescriptor == nullptr) + { + AttributeValueDecoder(mTLVReader, kDenySubjectDescriptor); + } + return AttributeValueDecoder(mTLVReader, *mRequest.subjectDescriptor); } private: diff --git a/src/app/data-model/DecodableList.h b/src/app/data-model/DecodableList.h index bff54ca532bbde..b05db43c1522bf 100644 --- a/src/app/data-model/DecodableList.h +++ b/src/app/data-model/DecodableList.h @@ -27,6 +27,68 @@ namespace chip { namespace app { namespace DataModel { +namespace detail { + +/* + * Base class of DecodableList to minimize template usage + */ +class DecodableListBase +{ +public: + DecodableListBase() { ClearReader(); } + + /* + * @brief + * + * This call stores a TLV reader positioned on the list this class is to manage. + * + * Specifically, the passed-in reader should be pointing into the list just after + * having called `OpenContainer` on the list element. + */ + void SetReader(const TLV::TLVReader & reader) { mReader = reader; } + + /* + * @brief + * + * This call clears the TLV reader managed by this class, so it can be reused. + */ + void ClearReader() { mReader.Init(nullptr, 0); } + + /* + * Compute the size of the list. This can fail if the TLV is malformed. If + * this succeeds, that does not guarantee that the individual items can be + * successfully decoded; consumers should check Iterator::GetStatus() when + * actually decoding them. If there is no list then the size is considered + * to be zero. + */ + CHIP_ERROR ComputeSize(size_t * size) const + { + if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) + { + *size = 0; + return CHIP_NO_ERROR; + } + + return mReader.CountRemainingInContainer(size); + } + + CHIP_ERROR Decode(TLV::TLVReader & reader) + { + VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Array, CHIP_ERROR_SCHEMA_MISMATCH); + TLV::TLVType type; + ReturnErrorOnFailure(reader.EnterContainer(type)); + SetReader(reader); + ReturnErrorOnFailure(reader.ExitContainer(type)); + return CHIP_NO_ERROR; + } + +protected: + TLV::TLVReader mReader; + chip::Optional mFabricIndex; +}; + +} // namespace detail + /* * @brief * @@ -47,30 +109,13 @@ namespace DataModel { * */ template -class DecodableList +class DecodableList : public detail::DecodableListBase { public: - DecodableList() { ClearReader(); } + DecodableList() {} static constexpr bool kIsFabricScoped = DataModel::IsFabricScoped::value; - /* - * @brief - * - * This call stores a TLV reader positioned on the list this class is to manage. - * - * Specifically, the passed-in reader should be pointing into the list just after - * having called `OpenContainer` on the list element. - */ - void SetReader(const TLV::TLVReader & reader) { mReader = reader; } - - /* - * @brief - * - * This call clears the TLV reader managed by this class, so it can be reused. - */ - void ClearReader() { mReader.Init(nullptr, 0); } - template ::value, bool> = true> void SetFabricIndex(FabricIndex fabricIndex) { @@ -189,38 +234,6 @@ class DecodableList }; Iterator begin() const { return Iterator(mReader, mFabricIndex); } - - /* - * Compute the size of the list. This can fail if the TLV is malformed. If - * this succeeds, that does not guarantee that the individual items can be - * successfully decoded; consumers should check Iterator::GetStatus() when - * actually decoding them. If there is no list then the size is considered - * to be zero. - */ - CHIP_ERROR ComputeSize(size_t * size) const - { - if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) - { - *size = 0; - return CHIP_NO_ERROR; - } - - return mReader.CountRemainingInContainer(size); - } - - CHIP_ERROR Decode(TLV::TLVReader & reader) - { - VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Array, CHIP_ERROR_SCHEMA_MISMATCH); - TLV::TLVType type; - ReturnErrorOnFailure(reader.EnterContainer(type)); - SetReader(reader); - ReturnErrorOnFailure(reader.ExitContainer(type)); - return CHIP_NO_ERROR; - } - -private: - TLV::TLVReader mReader; - chip::Optional mFabricIndex; }; } // namespace DataModel diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index ba349b22b972a5..6efa43875fdf46 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -117,13 +117,13 @@ void ICDManager::Shutdown() bool ICDManager::SupportsFeature(Feature feature) { // Can't use attribute accessors/Attributes::FeatureMap::Get in unit tests -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) uint32_t featureMap = 0; bool success = (Attributes::FeatureMap::Get(kRootEndpointId, &featureMap) == Status::Success); return success ? ((featureMap & to_underlying(feature)) != 0) : false; #else return ((mFeatureMap & to_underlying(feature)) != 0); -#endif // !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#endif // !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) } uint32_t ICDManager::StayActiveRequest(uint32_t stayActiveDuration) @@ -145,7 +145,7 @@ uint32_t ICDManager::StayActiveRequest(uint32_t stayActiveDuration) #if CHIP_CONFIG_ENABLE_ICD_CIP void ICDManager::SendCheckInMsgs() { -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) VerifyOrDie(mStorage != nullptr); VerifyOrDie(mFabricTable != nullptr); @@ -213,7 +213,7 @@ void ICDManager::SendCheckInMsgs() } } } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST +#endif // !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) } bool ICDManager::CheckInMessagesWouldBeSent(const std::function & shouldCheckInMsgsBeSentFunction) @@ -396,7 +396,7 @@ void ICDManager::UpdateICDMode() ICDConfigurationData::GetInstance().SetICDMode(tempMode); // Can't use attribute accessors/Attributes::OperatingMode::Set in unit tests -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) Attributes::OperatingMode::Set(kRootEndpointId, static_cast(tempMode)); #endif diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index dc516673df8d40..eae0adbc1a28de 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -233,7 +233,7 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS && !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION bool GetIsBootUpResumeSubscriptionExecuted() { return mIsBootUpResumeSubscriptionExecuted; }; #endif // !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION && CHIP_CONFIG_PERSIST_SUBSCRIPTIONS -#endif +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST // Implementation of ICDListener functions. // Callers must origin from the chip task context or hold the ChipStack lock. @@ -382,10 +382,10 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler ObjectPool mICDSenderPool; #endif // CHIP_CONFIG_ENABLE_ICD_CIP -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST // feature map that can be changed at runtime for testing purposes uint32_t mFeatureMap = 0; -#endif +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST }; } // namespace app diff --git a/src/app/reporting/Read-DataModel.cpp b/src/app/reporting/Read-DataModel.cpp index 9342961cefdc78..584536bdeb9606 100644 --- a/src/app/reporting/Read-DataModel.cpp +++ b/src/app/reporting/Read-DataModel.cpp @@ -47,7 +47,7 @@ DataModel::ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataMode { readRequest.readFlags.Set(DataModel::ReadFlags::kFabricFiltered); } - readRequest.subjectDescriptor = subjectDescriptor; + readRequest.subjectDescriptor = &subjectDescriptor; readRequest.path = path; DataVersion version = 0; @@ -97,7 +97,9 @@ DataModel::ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataMode if (!status.IsOutOfSpaceEncodingResponse()) { DataModel::ActionReturnStatus::StringStorage storage; +#if CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING ChipLogError(DataManagement, "Failed to read attribute: %s", status.c_str(storage)); +#endif } return status; } diff --git a/src/app/tests/TestCommissioningWindowManager.cpp b/src/app/tests/TestCommissioningWindowManager.cpp index 5df7a4b6ce861d..297a95e299a30b 100644 --- a/src/app/tests/TestCommissioningWindowManager.cpp +++ b/src/app/tests/TestCommissioningWindowManager.cpp @@ -113,9 +113,8 @@ class TestCommissioningWindowManager : public ::testing::Test static chip::SimpleTestEventTriggerDelegate sSimpleTestEventTriggerDelegate; initParams.testEventTriggerDelegate = &sSimpleTestEventTriggerDelegate; (void) initParams.InitializeStaticResourcesBeforeServerInit(); - // Set a randomized server port(slightly shifted from CHIP_PORT) for testing - initParams.operationalServicePort = - static_cast(initParams.operationalServicePort + chip::Crypto::GetRandU16() % 20); + // Use whatever server port the kernel decides to give us. + initParams.operationalServicePort = 0; ASSERT_EQ(chip::Server::GetInstance().Init(initParams), CHIP_NO_ERROR); diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml deleted file mode 100644 index 34faee27709d22..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml +++ /dev/null @@ -1,399 +0,0 @@ -# Copyright (c) 2021 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: 42.1.5. [TC-ACE-1.5] Multi-fabric - -PICS: - - MCORE.ROLE.COMMISSIONEE - - APPDEVICE.S - -config: - nodeId: 0x12344321 - cluster: "Access Control" - endpoint: 0 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" - discriminator: - type: int16u - defaultValue: 3840 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" - -tests: - - label: "Step 1: TH1 commissions DUT using admin node ID N1" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH1 reads the fabric index" - cluster: "Operational Credentials" - command: "readAttribute" - attribute: "CurrentFabricIndex" - response: - saveAs: th1FabricIndex - - - label: - "Step 2 & 3: TH1 puts DUT into commissioning mode, TH2 commissions DUT - using admin node ID N2" - verification: | - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - On TH1(chip-tool) note the manual pairing code for commissioning the TH2 - - [1684416077.831754][118314:118316] CHIP:CTL: Successfully opened pairing window on the device - [1684416077.831763][118314:118316] CHIP:CTL: Manual pairing code: [36283142515] - [1684416077.831771][118314:118316] CHIP:CTL: SetupQRCode: [MT:-24J0IRV010UJE7ZH10] - [1684416077.831791][118314:118316] CHIP:DMG: ICR moving to [AwaitingDe] - - ./chip-tool pairing code 2 36283142515 --commissioner-name beta - - On TH2 (chip-tool) verify the commissioning completed with success - - [1684416247.482777][118352:118354] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1684416247.482789][118352:118354] CHIP:TOO: Device commissioning completed with success - [1684416247.482823][118352:118354] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Step 2: TH1 opens the commissioning window on the DUT" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - PICS: PICS_SDK_CI_ONLY - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: PICS_SDK_CI_ONLY - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "Step 3: TH2 commissions DUT using admin node ID N2" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: PICS_SDK_CI_ONLY - arguments: - values: - - name: "nodeId" - value: nodeId - - name: "payload" - value: payload - - - label: "Wait for the commissioned device to be retrieved for TH2" - identity: beta - cluster: "DelayCommands" - command: "WaitForCommissionee" - PICS: PICS_SDK_CI_ONLY - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Step 4: TH2 reads its fabric index from the Operational Credentials - cluster CurrentFabricIndex attribute" - identity: "beta" - PICS: PICS_SDK_CI_ONLY - cluster: "Operational Credentials" - command: "readAttribute" - attribute: "CurrentFabricIndex" - response: - saveAs: th2FabricIndex - - #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - - label: "Step 4: TH2 reads the fabric index" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta - - On TH2 (chip-tool) note the CurrentFabricIndex for the further use - - [1684416368.885484][118383:118385] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3654336520 - [1684416368.885511][118383:118385] CHIP:TOO: CurrentFabricIndex: 2 - [1684416368.885577][118383:118385] CHIP:EM: <<< [E:65212i S:18077 M:83303022 (Ack:184536262)] (S) Msg TX to 2:0000000000000002 [C33E] --- Type 0000:10 (SecureChannel:StandaloneAck) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Read the commissioner node ID from the alpha fabric" - identity: "alpha" - cluster: "CommissionerCommands" - command: "GetCommissionerNodeId" - response: - values: - - name: "nodeId" - saveAs: commissionerNodeIdAlpha - - - label: - "Step 5: TH1 writes DUT Endpoint 0 AccessControl cluster ACL - attribute,value is list of AccessControlEntryStruct containing 2 - elements 1.Struct : a)Fabric Index: 1 b)Privilege field: Administer - (5) c)AuthMode field: CASE (2) d)Subjects field: [N1] e)Targets - field:[{Cluster: AccessControl (0x001f), Endpoint: 0}] 2.struct : - a)Fabric Index: 1 b)Privilege field: View (1) c)AuthMode field: CASE - (2) d)Subjects field: null e)Targets field: [{Cluster: Descriptor - (0x001d), Endpoint: 0}]" - command: "writeAttribute" - attribute: "ACL" - arguments: - value: [ - { - FabricIndex: th1FabricIndex, - Privilege: 5, # administer - AuthMode: 2, # case - Subjects: [commissionerNodeIdAlpha], - Targets: - [{ Cluster: 0x001f, Endpoint: 0, DeviceType: null }], - }, - { - FabricIndex: th1FabricIndex, - Privilege: 1, # view - AuthMode: 2, # case - Subjects: null, - Targets: - [{ Cluster: 0x001d, Endpoint: 0, DeviceType: null }], - }, - ] - - - label: "Read the commissioner node ID from the beta fabric" - PICS: PICS_SDK_CI_ONLY - identity: "beta" - cluster: "CommissionerCommands" - command: "GetCommissionerNodeId" - response: - values: - - name: "nodeId" - saveAs: commissionerNodeIdBeta - - - label: - "Step 6: TH2 writes DUT Endpoint 0 AccessControl cluster ACL - attribute,value is list of AccessControlEntryStruct containing 2 - elements 1.Struct : a)Fabric Index: th2FabricIndex b)Privilege field: - Administer (5) c)AuthMode field: CASE (2) d)Subjects field: [N2] - e)Targets field: [{Cluster: AccessControl (0x001f), Endpoint: 0}]" - identity: beta - PICS: PICS_SDK_CI_ONLY - command: "writeAttribute" - attribute: "ACL" - arguments: - value: [ - { - FabricIndex: th2FabricIndex, - Privilege: 5, # administer - AuthMode: 2, # case - Subjects: [commissionerNodeIdBeta], - Targets: - [{ Cluster: 0x001f, Endpoint: 0, DeviceType: null }], - }, - { - FabricIndex: th2FabricIndex, - Privilege: 1, # view - AuthMode: 2, # case - Subjects: null, - Targets: - [{ Cluster: 0x0028, Endpoint: 0, DeviceType: null }], - }, - ] - - #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - - label: "Step 6: TH2 writes ACL giving view privilge for basic cluster" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 2, "privilege": 5, "authMode": 2, "subjects": [223344], "targets": [{ "cluster": 31, "endpoint": 0, "deviceType": null }]}, {"fabricIndex": 2, "privilege": 1, "authMode": 2, "subjects": null, "targets": [{ "cluster": 40, "endpoint": 0, "deviceType": null }]}]' 2 0 --commissioner-name beta - - On TH2 (chip-tool) verify the success response for the write function - - [1684416510.660175][118418:118420] CHIP:DMG: StatusIB = - [1684416510.660184][118418:118420] CHIP:DMG: { - [1684416510.660192][118418:118420] CHIP:DMG: status = 0x00 (SUCCESS), - [1684416510.660201][118418:118420] CHIP:DMG: }, - [1684416510.660211][118418:118420] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH1 reads DUT Endpoint 0 Descriptor cluster DeviceTypeList - attribute" - command: "readAttribute" - cluster: "Descriptor" - attribute: "DeviceTypeList" - - - label: - "Step 8: TH1 reads DUT Endpoint 0 Basic Information cluster VendorID - attribute" - command: "readAttribute" - cluster: "Basic Information" - attribute: "VendorID" - response: - error: UNSUPPORTED_ACCESS - - - label: - "Step 9: TH2 reads DUT Endpoint 0 Descriptor cluster DeviceTypeList - attribute" - identity: "beta" - PICS: PICS_SDK_CI_ONLY - command: "readAttribute" - cluster: "Descriptor" - attribute: "DeviceTypeList" - response: - error: UNSUPPORTED_ACCESS - - #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - - label: "Step 9: TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS" - verification: | - ./chip-tool descriptor read device-type-list 2 0 --commissioner-name beta - - On TH2(chip-tool) verify the UNSUPPORTED_ACCESS (0x7e) response - - [1684416700.274460][118482:118484] CHIP:DMG: StatusIB = - [1684416700.274467][118482:118484] CHIP:DMG: { - [1684416700.274475][118482:118484] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1684416700.274482][118482:118484] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "Step 10: TH2 reads DUT Endpoint 0 Basic Information cluster VendorID - attribute" - identity: "beta" - PICS: PICS_SDK_CI_ONLY - command: "readAttribute" - cluster: "Basic Information" - attribute: "VendorID" - - #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - - label: - "Step 10: TH2 reads DUT Endpoint 0 Basic Information cluster VendorID - attribute - expect SUCCESS" - verification: | - ./chip-tool basicinformation read vendor-id 2 0 --commissioner-name beta - - On TH2(chip-tool) verify the success with the Vendor-id - - [1684416789.682243][118505:118507] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0002 DataVersion: 2033462723 - [1684416789.682271][118505:118507] CHIP:TOO: VendorID: 65521 - [1684416789.682327][118505:118507] CHIP:EM: <<< [E:11340i S:29188 M:208193949 (Ack:232576417)] (S) Msg TX to 2:0000000000000002 [C33E] --- Type 0000:10 (SecureChannel:StandaloneAck) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "Step 11: TH1 resets the ACLs to the default value bywriting DUT - Endpoint 0 AccessControl cluster ACL attribute,value is list of - AccessControlEntryStruct containing 1 elements 1.Struct : a)Fabric - Index: 1 b)Privilege field: Administer (5) c)AuthMode field: CASE (2) - d)Subjects field: [N1] e)Targets field: null" - command: "writeAttribute" - attribute: "ACL" - arguments: - value: [ - { - FabricIndex: 1, - Privilege: 5, # administer - AuthMode: 2, # case - Subjects: [commissionerNodeIdAlpha], - Targets: null, - }, - ] - - - label: - "Step 12: TH1 removes the TH2 fabric by sending the RemoveFabric - command to the DUT with the FabricIndex set to th2FabricIndex" - cluster: "Operational Credentials" - PICS: PICS_SDK_CI_ONLY - command: "RemoveFabric" - arguments: - values: - - name: "FabricIndex" - value: th2FabricIndex - - #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - - label: - "Step 12: TH1 removes the TH2 fabric by sending the RemoveFabric - commandto the DUT with the FabricIndex set to th2FabricIndex" - verification: | - ./chip-tool operationalcredentials remove-fabric 2 1 0 - - On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) - - [1684416866.004187][118527:118529] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1684416866.004214][118527:118529] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - [1684416866.004236][118527:118529] CHIP:TOO: NOCResponse: { - [1684416866.004250][118527:118529] CHIP:TOO: statusCode: 0 - [1684416866.004255][118527:118529] CHIP:TOO: fabricIndex: 2 - [1684416866.004259][118527:118529] CHIP:TOO: } - [1684416866.004270][118527:118529] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml deleted file mode 100644 index f020b75bee18dd..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2023 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 atour sweet -# -# 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: - 12.4.4. [TC-CNET-4.4] [WiFi] Verification for ScanNetworks command - [DUT-Server] - -PICS: - - CNET.S.F00 - -config: - nodeId: 0x12344321 - cluster: "Network Commissioning" - #PIXIT.CNET.ENDPOINT_WIFI - endpoint: 0 - PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID: - type: octet_string - defaultValue: "hex:47524C50726976617465" - -tests: - - label: "Precondition: TH reads FeatureMap attribute from the DUT" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 1 - constraints: - type: bitmap32 - - - label: - "Step 1a: TH sends ScanNetworks command to the DUT with the SSID field - set to 'null' and Breadcrumb field set to 1" - PICS: CNET.S.C00.Rsp && CNET.S.C01.Tx - command: "ScanNetworks" - arguments: - values: - - name: "SSID" - value: null - - name: "Breadcrumb" - value: 1 - response: - values: - - name: "NetworkingStatus" - constraints: - anyOf: [0, 1, 5, 6, 12] - - name: "DebugText" - constraints: - maxLength: 512 - - name: "WiFiScanResults" - constraints: - type: list - - - label: - "Step 1a: Verify each element in the WiFiScanResults list will have - the following fields:" - verification: | - Via the TH (chip-tool), verify: - -the Security value is in the type of map8 with length range 0 to 254. - -the SSID value is in the ype of octstr with length range 1 to 32. - -the BSSID value is in the type of octstr with length range of 6. - -the Channel is in the type of uint16 with range 0 to 65,535. - -the WiFi Band is in the of type enum8 with a range of -128 to 127. - -the RSSI is in the of type int8 with a range of -120 to 0. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.C00.Rsp && CNET.S.C01.Tx - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 1b: TH reads Breadcrumb attribute from the General Commissioning - Cluster" - cluster: "General Commissioning" - command: "readAttribute" - attribute: "Breadcrumb" - response: - value: 1 - constraints: - type: int64u - - - label: - "Step 2a: TH sends ScanNetworks Command to the DUT with SSID field set - to PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID and Breadcrumb field set to 2" - PICS: CNET.S.C00.Rsp && CNET.S.C01.Tx - command: "ScanNetworks" - arguments: - values: - - name: "SSID" - value: PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID - - name: "Breadcrumb" - value: 2 - response: - values: - - name: "NetworkingStatus" - value: 0 - - name: "DebugText" - constraints: - maxLength: 512 - - name: "WiFiScanResults" - constraints: - type: list - - - label: - "Step 2a: Verify each element in the WiFiScanResults list will have - the following fields: " - verification: | - Via the TH (chip-tool), verify: - -the Security value is in the type of map8 with length range 0 to 254. - -the SSID value is in the ype of octstr with length range 1 to 32. - -the BSSID value is in the type of octstr with length range of 6. - -the Channel is in the type of uint16 with range 0 to 65,535. - -the WiFi Band is in the of type enum8 with a range of -128 to 127. - -the RSSI is in the of type int8 with a range of -120 to 0. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.C00.Rsp && CNET.S.C01.Tx - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 2b: TH reads Breadcrumb attribute from the General Commissioning - Cluster" - cluster: "General Commissioning" - command: "readAttribute" - attribute: "Breadcrumb" - response: - value: 2 - constraints: - type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index 8954d44a658d97..47393f449386e8 100755 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -194,9 +194,7 @@ tests: value: 2 - label: "Step 1j: Simulate a not fully locked scenario on the DUT." - PICS: - DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && - PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && PICS_USER_PROMPT verification: | vendor will give instructions on how to simulate if applicable and if that is possible, then send the below command to read the lock state attribute. @@ -317,7 +315,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 5c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0004 && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0004 && PICS_USER_PROMPT verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -371,7 +369,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 6c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0005 && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0005 && PICS_USER_PROMPT verification: | This is an Optional attribute, so its not compulsory to get the expected outcome diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml deleted file mode 100644 index a4974d02df7e3d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml +++ /dev/null @@ -1,437 +0,0 @@ -# Copyright (c) 2021 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 15.2.2. [TC-OPCREDS-3.2] Attribute-CurrentFabricIndex validation - [DUT-Server] - -PICS: - - OPCREDS.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - This test case assumes that during Commissioning AddNOC will be sent with ICACValue - disabled: true - - - label: "Step 1: Factory Reset DUT" - verification: | - On both DUT and TH side use the below command - sudo rm -rf /tmp/chip_* - disabled: true - - - label: - "Step 2: Commission DUT to TH1s Fabric When DUT sends NOC response - save FabricIndex as FabricIndex_TH1" - verification: | - DUT side: - sudo ./chip-all-clusters-app --wifi - - TH side: - ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1 - - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success" - - - After commissioning DUT to TH1's fabric read nocs - - Save the FabricIndex and NOC value during commissioning in TH Log - - [1673248033.951950][1706:1708] CHIP:CTL: OperationalSessionSetup[1:0000000000000001]: State change 2 --> 3 - [1673248033.952156][1706:1708] CHIP:IN: SecureSession[0xffffa803fa40]: Allocated Type:2 LSID:14065 - [1673248033.952247][1706:1708] CHIP:SC: Initiating session on local FabricIndex 1 from 0x000000000001B669 -> 0x0000000000000001 - [1673248033.954558][1706:1708] CHIP:EM: <<< [E:44273i M:220413667] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) - [1673248033.954856][1706:1708] CHIP:IN: (U) Sending msg 220413667 to IP address 'UDP:[fe80::e65f:1ff:fe0e:be36%eth0]:5540' - [1673248033.955496][1706:1708] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be36%eth0]:5540 | 220413667 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '1' (0x30) / Session = 0 / Exchange = 44273] - [1679562607.575771][126855:126857] CHIP:DMG: } - [1679562607.575776][126855:126857] CHIP:DMG: - [1679562607.575833][126855:126857] CHIP:DMG: NOCValue (241) = - [1679562607.575852][126855:126857] CHIP:DMG: { - FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVASQRARgkBwEkCAEwCUEECq7oyCv/0OLZ4DyFaO6+SuXasHNJcvBFGJcsjh7K/OU92vFP6+dVfa72+vn0Bj2zE2yEB/xGY6firv0ccIYCaDcKNQEoARgkAgE2AwQCBAEYMAQUyGYyV+0qHvlilDYdFF5//OTDeCcwBRSTcEvTAX3+cztsuvoZoqtHd61F3BgwC0BOygoI269loXpAssEaxpMPqplxS9GHmVhY04u/WVsNODFSFnzgBMd4Bd4yl75UoEIYkQ9SNMbuE6wMidFO1b8OGA== - [1679562607.575866][126855:126857] CHIP:DMG: } - [1679562607.575872][126855:126857] CHIP:DMG: - [1679562607.575878][126855:126857] CHIP:DMG: ICACValue (231) = - [1679562607.575893][126855:126857] CHIP:DMG: { - FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEE9/MhX0otpexJN0+X1TLOLaojJWg4sd+DU6GaVBPRmauhGVxJSCocNTl86dugdU9BNSyZ4YKvzTFNi9ahXKwboDcKNQEpARgkAmAwBBSTcEvTAX3+cztsuvoZoqtHd61F3DAFFOA5rOqBb2KMCwcU5FTt/zF2IvMBGDALQEUmrbTN1Y4du9eHicbE5iKphxlrBRyscULxD/ZfaWyN38XuXZKOGdkGhfLL1tYLjhc7wVd9mLLl3RtNJEUDBtgY - [1679562607.575908][126855:126857] CHIP:DMG: } - [1679562607.575914][126855:126857] CHIP:DMG: - [1679562607.575930][126855:126857] CHIP:DMG: InvokeRequestMessage = - [1679562607.575937][126855:126857] CHIP:DMG: { - [1679562607.575944][126855:126857] CHIP:DMG: suppressResponse = false, - [1679562607.575952][126855:126857] CHIP:DMG: timedRequest = false, - [1679562607.575958][126855:126857] CHIP:DMG: InvokeRequests = - [1679562607.575971][126855:126857] CHIP:DMG: [ - [1679562607.575978][126855:126857] CHIP:DMG: CommandDataIB = - [1679562607.575987][126855:126857] CHIP:DMG: { - [1679562607.575993][126855:126857] CHIP:DMG: CommandPathIB = - [1679562607.576002][126855:126857] CHIP:DMG: { - [1679562607.576011][126855:126857] CHIP:DMG: EndpointId = 0x0, - [1679562607.576020][126855:126857] CHIP:DMG: ClusterId = 0x3e, - [1679562607.576028][126855:126857] CHIP:DMG: CommandId = 0x6, - [1679562607.576039][126855:126857] CHIP:DMG: }, - [1679562607.576048][126855:126857] CHIP:DMG: - [1679562607.576055][126855:126857] CHIP:DMG: CommandFields = - [1679562607.576065][126855:126857] CHIP:DMG: { - [1679562607.576074][126855:126857] CHIP:DMG: 0x0 = [ - [1679562607.576127][126855:126857] CHIP:DMG: 0x15, 0x30, 0x1, 0x1, 0x1, 0x24, 0x2, 0x1, 0x37, 0x3, 0x24, 0x13, 0x1, 0x18, 0x26, 0x4, 0x80, 0x22, 0x81, 0x27, 0x26, 0x5, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x6, 0x24, 0x15, 0x1, 0x24, 0x11, 0x1, 0x18, 0x24, 0x7, 0x1, 0x24, 0x8, 0x1, 0x30, 0x9, 0x41, 0x4, 0x94, 0x5b, 0xb6, 0xd3, 0x14, 0x0, 0x45, 0x35, 0xf0, 0x64, 0x25, 0x7d, 0xb7, 0x8a, 0x56, 0x9d, 0x5, 0x0, 0x56, 0xec, 0xbc, 0xa9, 0xb5, 0xdc, 0xfa, 0xa4, 0x93, 0x28, 0x14, 0x1d, 0x7, 0x3a, 0xc9, 0x7d, 0x1c, 0x9d, 0x21, 0x56, 0xf4, 0xec, 0xc8, 0x7d, 0x3c, 0x87, 0x6f, 0x51, 0xa3, 0x65, 0x89, 0x92, 0x4d, 0xcf, 0xd9, 0x11, 0x71, 0xab, 0x4e, 0x99, 0xcb, 0x90, 0x72, 0xb5, 0x45, 0xa9, 0x37, 0xa, 0x35, 0x1, 0x28, 0x1, 0x18, 0x24, 0x2, 0x1, 0x36, 0x3, 0x4, 0x2, 0x4, 0x1, 0x18, 0x30, 0x4, 0x14, 0xf2, 0x2d, 0x91, 0xb, 0xf2, 0xb1, 0xce, 0xdb, 0x60, 0x10, 0x23, 0x97, 0x31, 0xfd, 0x43, 0xc4, 0x40, 0x46, 0x5a, 0x99, 0x30, 0x5, 0x14, 0xf9, 0x94, 0xad, 0x9e, 0x2b, 0x0, 0x6b, 0xa9, 0xc1, 0x27, 0x6d, 0x20, 0xcb, 0x27, 0xa4, 0xf1, 0x21, 0x2b, 0xc9, 0x8b, 0x18, 0x30, 0xb, 0x40, 0xa1, 0xd2, 0x49, 0x5c, 0xa, 0xc1, 0x58, 0x12, 0x71, 0xd, 0x1a, 0x37, 0xe4, 0x7b, 0x3d, 0xbd, 0x19, 0xe, 0xe8, 0x86, 0xa8, 0x49, 0x4, 0x8, 0x7b, 0x20, 0x94, 0xfa, 0x21, 0xe8, 0x5b, 0xbf, 0x58, 0xc, 0x7d, 0x93, 0x4b, 0x89, 0x88, 0x78, 0xeb, 0xf2, 0x9, 0xf9, 0x3e, 0x6, 0xf7, 0x85, 0xbe, 0xa2, 0xa1, 0xf, 0xc8, 0x40, 0x64, 0xd5, 0xdf, 0x97, 0x6f, 0xef, 0x2c, 0xad, 0xbc, 0xcc, 0x18, - [1679562607.576155][126855:126857] CHIP:DMG: ] (241 bytes) - disabled: true - - - label: "Step 3: Save TH1s Fabric ID as FabricID1" - verification: | - Refer the above step - disabled: true - - - label: - "Step 4: Commission DUT to TH2s Fabric When DUT sends NOC response - save FabricIndex as FabricIndex_TH2" - verification: | - To commission DUT to TH2 follow below procedure - - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - Verify in TH1 Log: - - CHIP:IN: Sending encrypted msg 0xaaaad3464d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5805157 msec - [1635691999.946536][3822:3827] CHIP:DMG: ICR moving to [CommandSen] - [1635691999.946586][3822:3827] CHIP:CTL: Manual pairing code: [35407541839] - [1635691999.946650][3822:3827] CHIP:CTL: SetupQRCode: [MT:00000CQM00G6V851H10] - [1635691999.946802][3822:3827] CHIP:EM: Sending Standalone Ack for MessageCounter:3234931243 on exchange 35324i - [1635691999.946850][3822:3827] CHIP:IN: Prepared plaintext message 0xffffaa58a960 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 35324i with MessageCounter:1726016118. - [1635691999.946895][3822:3827] CHIP:IN: Sending plaintext msg 0xffffaa58a960 with MessageCounter:1726016118 to 0x0000000000000000 at monotonic time: 5805158 msec - [1635691999.946983][3822:3827] CHIP:EM: Flushed pending ack for MessageCounter:3234931243 on exchange 35324i - - 2. On 2nd controller, using chip-tool connect using manual code. - Below is the example when using chip tool as controller (considering 35998938564 as the manual code generated by 1st controller) - - - ./chip-tool pairing code 2 35407541839 --commissioner-name beta --trace_decode 1 - Verify whether you got below message in the log of TH - Device commissioning completed with success - - After commissioning DUT to TH2's fabric read nocs - - Save the the FabricIndex and NOC value during commissioning in TH2 Log - - - [1673249259.166158][1742:1744] CHIP:DIS: Keeping DNSSD lookup active - [1673249259.362947][1742:1744] CHIP:DIS: Checking node lookup status after 200 ms - [1673249259.363205][1742:1744] CHIP:DIS: OperationalSessionSetup[2:0000000000000002]: Updating device address to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:5540 while in state 2 - [1673249259.363267][1742:1744] CHIP:CTL: OperationalSessionSetup[2:0000000000000002]: State change 2 --> 3 - [1673249259.363467][1742:1744] CHIP:IN: SecureSession[0xffff98011400]: Allocated Type:2 LSID:60039 - [1673249259.363558][1742:1744] CHIP:SC: Initiating session on local FabricIndex 2 from 0x000000000001B669 -> 0x0000000000000002 - [1673249259.365555][1742:1744] CHIP:EM: <<< [E:13995i M:219921998] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) - [1681213277.146543][2983:2985] CHIP:DMG: - [1681213277.146631][2983:2985] CHIP:DMG: NOCValue (241) = - [1681213277.146662][2983:2985] CHIP:DMG: { - FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVAiQRAhgkBwEkCAEwCUEEooiu0bizmyLUR9k8phgWrcsaLfWIrjF3MmJuMrM2rGsjl/k8nxqkNtfiVCPUbMfo+Z2vMByAa74UKVnvxz4a2DcKNQEoARgkAgE2AwQCBAEYMAQUmZjxv4X5S8T6+5BRACiWMwvb2hIwBRTzEAaDTxWHp9yNRa21A/LaQylK9BgwC0DyL4TkYg6tVc5DCXnE+ZXq6wRE1oCi72icy+9rcsptmfXdgWjew2uiEfQiJIQJdzM1mZN8OKLlJx8aY4CVsC/AGA== - [1681213277.146693][2983:2985] CHIP:DMG: } - [1681213277.146708][2983:2985] CHIP:DMG: - [1681213277.146725][2983:2985] CHIP:DMG: ICACValue (231) = - [1681213277.146748][2983:2985] CHIP:DMG: { - FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEjjgt8C2SvzhTjCUn3polJfTxEfZhJ5Dg7B24NEfypWrVKu3MsEmx4eHexmohFV9+Najv+bp7ns53w6vakJqo7TcKNQEpARgkAmAwBBTzEAaDTxWHp9yNRa21A/LaQylK9DAFFJg1jJGztPg2TbeXsehGcGT67Ry2GDALQEZnfw7LkGjbDUPw8p0OReBz4hQAuVmQ7myxWcX0LPxsKm4lV0TC9bXnwmrQ8rMz0uY/gxdXfbWdd87SPbp2698Y - [1681213277.146780][2983:2985] CHIP:DMG: } - [1681213277.146795][2983:2985] CHIP:DMG: - [1681213277.146826][2983:2985] CHIP:DMG: InvokeRequestMessage = - [1681213277.146844][2983:2985] CHIP:DMG: { - [1681213277.146862][2983:2985] CHIP:DMG: suppressResponse = false, - [1681213277.146883][2983:2985] CHIP:DMG: timedRequest = false, - [1681213277.146902][2983:2985] CHIP:DMG: InvokeRequests = - [1681213277.146928][2983:2985] CHIP:DMG: [ - [1681213277.146947][2983:2985] CHIP:DMG: CommandDataIB = - [1681213277.146970][2983:2985] CHIP:DMG: { - [1681213277.146990][2983:2985] CHIP:DMG: CommandPathIB = - [1681213277.147013][2983:2985] CHIP:DMG: { - [1681213277.147037][2983:2985] CHIP:DMG: EndpointId = 0x0, - [1681213277.147063][2983:2985] CHIP:DMG: ClusterId = 0x3e, - [1681213277.147088][2983:2985] CHIP:DMG: CommandId = 0x6, - [1681213277.147111][2983:2985] CHIP:DMG: }, - [1681213277.147136][2983:2985] CHIP:DMG: - [1681213277.147156][2983:2985] CHIP:DMG: CommandFields = - [1681213277.147179][2983:2985] CHIP:DMG: { - [1681213277.147204][2983:2985] CHIP:DMG: 0x0 = [ - [1681213277.147296][2983:2985] CHIP:DMG: 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x13, 0x02, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x15, 0x02, 0x24, 0x11, 0x02, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xa2, 0x88, 0xae, 0xd1, 0xb8, 0xb3, 0x9b, 0x22, 0xd4, 0x47, 0xd9, 0x3c, 0xa6, 0x18, 0x16, 0xad, 0xcb, 0x1a, 0x2d, 0xf5, 0x88, 0xae, 0x31, 0x77, 0x32, 0x62, 0x6e, 0x32, 0xb3, 0x36, 0xac, 0x6b, 0x23, 0x97, 0xf9, 0x3c, 0x9f, 0x1a, 0xa4, 0x36, 0xd7, 0xe2, 0x54, 0x23, 0xd4, 0x6c, 0xc7, 0xe8, 0xf9, 0x9d, 0xaf, 0x30, 0x1c, 0x80, 0x6b, 0xbe, 0x14, 0x29, 0x59, 0xef, 0xc7, 0x3e, 0x1a, 0xd8, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0x99, 0x98, 0xf1, 0xbf, 0x85, 0xf9, 0x4b, 0xc4, 0xfa, 0xfb, 0x90, 0x51, 0x00, 0x28, 0x96, 0x33, 0x0b, 0xdb, 0xda, 0x12, 0x30, 0x05, 0x14, 0xf3, 0x10, 0x06, 0x83, 0x4f, 0x15, 0x87, 0xa7, 0xdc, 0x8d, 0x45, 0xad, 0xb5, 0x03, 0xf2, 0xda, 0x43, 0x29, 0x4a, 0xf4, 0x18, 0x30, 0x0b, 0x40, 0xf2, 0x2f, 0x84, 0xe4, 0x62, 0x0e, 0xad, 0x55, 0xce, 0x43, 0x09, 0x79, 0xc4, 0xf9, 0x95, 0xea, 0xeb, 0x04, 0x44, 0xd6, 0x80, 0xa2, 0xef, 0x68, 0x9c, 0xcb, 0xef, 0x6b, 0x72, 0xca, 0x6d, 0x99, 0xf5, 0xdd, 0x81, 0x68, 0xde, 0xc3, 0x6b, 0xa2, 0x11, 0xf4, 0x22, 0x24, 0x84, 0x09, 0x77, 0x33, 0x35, 0x99, 0x93, 0x7c, 0x38, 0xa2, 0xe5, 0x27, 0x1f, 0x1a, 0x63, 0x80, 0x95, 0xb0, 0x2f, 0xc0, 0x18, - [1681213277.147347][2983:2985] CHIP:DMG: ] (241 bytes) - disabled: true - - - label: "Step 5: Save TH2s Fabric ID as FabricID2" - verification: | - Refer the above step - disabled: true - - - label: "Step 6: From TH1 read the CurrentFabricIndex" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - - Verify the current fabric index in TH1 Log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 2445178920 - CHIP:TOO: CurrentFabricIndex: 1 - CHIP:EM: Sending Standalone Ack for MessageCounter:7141893 on exchange 26909i - disabled: true - - - label: "Step 7: Verify that CurrentFabricIndex = FabricIndex_TH1" - verification: | - Verify that CurrentFabricIndex = FabricIndex_TH1 - disabled: true - - - label: - "Step 8: From TH1 read the entire NOCs List attribute with a - non-fabric-filtered read" - verification: | - ./chip-tool operationalcredentials read nocs 1 0 - - Verify the NOCs List in TH1 Log - - [1658819541.245848][8318:8323] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819541.245960][8318:8323] CHIP:TOO: NOCs: 1 entries - [1658819541.246062][8318:8323] CHIP:TOO: [1]: { - [1658819541.246104][8318:8323] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - [1658819541.246163][8318:8323] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A370624130118240701240801300941045C9D561F53AAB6D9473DF2EE5170B03332BC38EF461842C37954CE99ADC4D55B272B3E545BB9FB2440CB712BA70BDDE27A318BEE1348D5F8C2D2C98CDBAD63C9370A3501290118240260300414F994AD9E2B006BA9C1276D20CB27A4F1212BC98B3005149040FBAF6F57D4E32188CD360DD4959272745D7618300B40C5EFCC41A18A4FAD6B1DAE6B12675D0C3FF1690728C31D1E95629511F23A4336DB5392E1FEF05EF1BA1DA46080A29BAB60EC613DEF031E2ED9850BB2E3B48B1118 - [1658819541.246198][8318:8323] CHIP:TOO: FabricIndex: 1 - [1658819541.246224][8318:8323] CHIP:TOO: } - disabled: true - - - label: - "Step 9: Verify that there is only data for the entry whose - FabricIndex field is equal to FabricIndex_TH1" - verification: | - Verify that Noc"s list has only data for FabricIndex_TH1 - - [1658819541.245848][8318:8323] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819541.245960][8318:8323] CHIP:TOO: NOCs: 1 entries - [1658819541.246062][8318:8323] CHIP:TOO: [1]: { - [1658819541.246104][8318:8323] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - [1658819541.246163][8318:8323] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A370624130118240701240801300941045C9D561F53AAB6D9473DF2EE5170B03332BC38EF461842C37954CE99ADC4D55B272B3E545BB9FB2440CB712BA70BDDE27A318BEE1348D5F8C2D2C98CDBAD63C9370A3501290118240260300414F994AD9E2B006BA9C1276D20CB27A4F1212BC98B3005149040FBAF6F57D4E32188CD360DD4959272745D7618300B40C5EFCC41A18A4FAD6B1DAE6B12675D0C3FF1690728C31D1E95629511F23A4336DB5392E1FEF05EF1BA1DA46080A29BAB60EC613DEF031E2ED9850BB2E3B48B1118 - [1658819541.246198][8318:8323] CHIP:TOO: FabricIndex: 1 - [1658819541.246224][8318:8323] CHIP:TOO: } - disabled: true - - - label: - "Step 10: From TH1 read the entire NOCs List attribute with a - fabric-filtered read" - verification: | - ./chip-tool operationalcredentials read nocs 1 0 --fabric-filtered 1 - - Verify the NOCs List in TH1 Log - - [1658819590.504973][8327:8332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819590.505058][8327:8332] CHIP:TOO: NOCs: 1 entries - [1658819590.505131][8327:8332] CHIP:TOO: [1]: { - [1658819590.505173][8327:8332] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - [1658819590.505232][8327:8332] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A370624130118240701240801300941045C9D561F53AAB6D9473DF2EE5170B03332BC38EF461842C37954CE99ADC4D55B272B3E545BB9FB2440CB712BA70BDDE27A318BEE1348D5F8C2D2C98CDBAD63C9370A3501290118240260300414F994AD9E2B006BA9C1276D20CB27A4F1212BC98B3005149040FBAF6F57D4E32188CD360DD4959272745D7618300B40C5EFCC41A18A4FAD6B1DAE6B12675D0C3FF1690728C31D1E95629511F23A4336DB5392E1FEF05EF1BA1DA46080A29BAB60EC613DEF031E2ED9850BB2E3B48B1118 - [1658819590.505266][8327:8332] CHIP:TOO: FabricIndex: 1 - [1658819590.505292][8327:8332] CHIP:TOO: } - disabled: true - - - label: - "Step 11: Verify that there is only data for the entry whose - FabricIndex field is equal to FabricIndex_TH1" - verification: | - Verify that Noc"s list has only data for FabricIndex_TH1 - - [1658819590.504973][8327:8332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819590.505058][8327:8332] CHIP:TOO: NOCs: 1 entries - [1658819590.505131][8327:8332] CHIP:TOO: [1]: { - [1658819590.505173][8327:8332] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - [1658819590.505232][8327:8332] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A370624130118240701240801300941045C9D561F53AAB6D9473DF2EE5170B03332BC38EF461842C37954CE99ADC4D55B272B3E545BB9FB2440CB712BA70BDDE27A318BEE1348D5F8C2D2C98CDBAD63C9370A3501290118240260300414F994AD9E2B006BA9C1276D20CB27A4F1212BC98B3005149040FBAF6F57D4E32188CD360DD4959272745D7618300B40C5EFCC41A18A4FAD6B1DAE6B12675D0C3FF1690728C31D1E95629511F23A4336DB5392E1FEF05EF1BA1DA46080A29BAB60EC613DEF031E2ED9850BB2E3B48B1118 - [1658819590.505266][8327:8332] CHIP:TOO: FabricIndex: 1 - [1658819590.505292][8327:8332] CHIP:TOO: } - disabled: true - - - label: "Step 12: Read NOCStruct values from entry at index 0" - verification: | - ./chip-tool operationalcredentials read nocs 1 0 --fabric-filtered 1 - - Verify FabricIndex field equal to FabricIndex_TH1 in TH1 Log - - [1658819590.504973][8327:8332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819590.505058][8327:8332] CHIP:TOO: NOCs: 1 entries - [1658819590.505131][8327:8332] CHIP:TOO: [1]: { - [1658819590.505173][8327:8332] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - [1658819590.505232][8327:8332] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A370624130118240701240801300941045C9D561F53AAB6D9473DF2EE5170B03332BC38EF461842C37954CE99ADC4D55B272B3E545BB9FB2440CB712BA70BDDE27A318BEE1348D5F8C2D2C98CDBAD63C9370A3501290118240260300414F994AD9E2B006BA9C1276D20CB27A4F1212BC98B3005149040FBAF6F57D4E32188CD360DD4959272745D7618300B40C5EFCC41A18A4FAD6B1DAE6B12675D0C3FF1690728C31D1E95629511F23A4336DB5392E1FEF05EF1BA1DA46080A29BAB60EC613DEF031E2ED9850BB2E3B48B1118 - [1658819590.505266][8327:8332] CHIP:TOO: FabricIndex: 1 - [1658819590.505292][8327:8332] CHIP:TOO: } - disabled: true - - - label: - "Step 13: From the NOCStruct values verify the following: NOC matches - the NOC sent to the DUT during commissioning process ICAC matches the - ICAC sent to the DUT during commissioning process from AddNOC in - pre-condition" - verification: | - Verify NOC and ICAC value in step 12 and 2 matches - - NOC value of step 12 - Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104945BB6D314004535F064257DB78A569D050056ECBCA9B5DCFAA49328141D073AC97D1C9D2156F4ECC87D3C876F51A36589924DCFD91171AB4E99CB9072B545A9370A350128011824020136030402040118300414F22D910BF2B1CEDB6010239731FD43C440465A99300514F994AD9E2B006BA9C1276D20CB27A4F1212BC98B18300B40A1D2495C0AC15812710D1A37E47B3DBD190EE886A84904087B2094FA21E85BBF580C7D934B898878EBF209F93E06F785BEA2A10FC84064D5DF976FEF2CADBCCC18 - - NOC value of Step 2 - - 0x15, 0x30, 0x1, 0x1, 0x1, 0x24, 0x2, 0x1, 0x37, 0x3, 0x24, 0x13, 0x1, 0x18, 0x26, 0x4, 0x80, 0x22, 0x81, 0x27, 0x26, 0x5, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x6, 0x24, 0x15, 0x1, 0x24, 0x11, 0x1, 0x18, 0x24, 0x7, 0x1, 0x24, 0x8, 0x1, 0x30, 0x9, 0x41, 0x4, 0x94, 0x5b, 0xb6, 0xd3, 0x14, 0x0, 0x45, 0x35, 0xf0, 0x64, 0x25, 0x7d, 0xb7, 0x8a, 0x56, 0x9d, 0x5, 0x0, 0x56, 0xec, 0xbc, 0xa9, 0xb5, 0xdc, 0xfa, 0xa4, 0x93, 0x28, 0x14, 0x1d, 0x7, 0x3a, 0xc9, 0x7d, 0x1c, 0x9d, 0x21, 0x56, 0xf4, 0xec, 0xc8, 0x7d, 0x3c, 0x87, 0x6f, 0x51, 0xa3, 0x65, 0x89, 0x92, 0x4d, 0xcf, 0xd9, 0x11, 0x71, 0xab, 0x4e, 0x99, 0xcb, 0x90, 0x72, 0xb5, 0x45, 0xa9, 0x37, 0xa, 0x35, 0x1, 0x28, 0x1, 0x18, 0x24, 0x2, 0x1, 0x36, 0x3, 0x4, 0x2, 0x4, 0x1, 0x18, 0x30, 0x4, 0x14, 0xf2, 0x2d, 0x91, 0xb, 0xf2, 0xb1, 0xce, 0xdb, 0x60, 0x10, 0x23, 0x97, 0x31, 0xfd, 0x43, 0xc4, 0x40, 0x46, 0x5a, 0x99, 0x30, 0x5, 0x14, 0xf9, 0x94, 0xad, 0x9e, 0x2b, 0x0, 0x6b, 0xa9, 0xc1, 0x27, 0x6d, 0x20, 0xcb, 0x27, 0xa4, 0xf1, 0x21, 0x2b, 0xc9, 0x8b, 0x18, 0x30, 0xb, 0x40, 0xa1, 0xd2, 0x49, 0x5c, 0xa, 0xc1, 0x58, 0x12, 0x71, 0xd, 0x1a, 0x37, 0xe4, 0x7b, 0x3d, 0xbd, 0x19, 0xe, 0xe8, 0x86, 0xa8, 0x49, 0x4, 0x8, 0x7b, 0x20, 0x94, 0xfa, 0x21, 0xe8, 0x5b, 0xbf, 0x58, 0xc, 0x7d, 0x93, 0x4b, 0x89, 0x88, 0x78, 0xeb, 0xf2, 0x9, 0xf9, 0x3e, 0x6, 0xf7, 0x85, 0xbe, 0xa2, 0xa1, 0xf, 0xc8, 0x40, 0x64, 0xd5, 0xdf, 0x97, 0x6f, 0xef, 0x2c, 0xad, 0xbc, 0xcc, 0x18, - disabled: true - - - label: - "Step 14: Read the Fabrics List and get the FabricDescriptorStruct for - the entry where FabricIndex = FabricIndex_TH1 from DUT" - verification: | - ./chip-tool operationalcredentials read fabrics 1 0 - - Verify FabricIndex = FabricIndex_TH1 in TH1 Log - - [1657693240.722099][15129:15134] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 908345149 - [1657693240.722200][15129:15134] CHIP:TOO: Fabrics: 1 entries - [1657693240.722273][15129:15134] CHIP:TOO: [1]: { - [1657693240.722316][15129:15134] CHIP:TOO: RootPublicKey: 04038A93AE14428E9179C2ACC3BA1522D4D19BC20A3203BE97FEC0BE47EBC6CCCD4AD5F7B1CE0A02F85FF1B14216FAFCA034B3B312C16B0517267804D5B03582EF - [1657693240.722368][15129:15134] CHIP:TOO: VendorId: 65521 - [1657693240.722401][15129:15134] CHIP:TOO: FabricId: 1 - [1657693240.722431][15129:15134] CHIP:TOO: NodeId: 1 - [1657693240.722462][15129:15134] CHIP:TOO: Label: - [1657693240.722492][15129:15134] CHIP:TOO: FabricIndex: 1 - [1657693240.722522][15129:15134] CHIP:TOO: } - disabled: true - - - label: - "Step 15: Verify that TH1 is able to read the FabricDescriptorStruct - values Verify that Fabrics list does not have any entry as FabricID = - FabricID2" - verification: | - Verify the FabricDescriptorStruct values has no entry log FabricID2 on TH1 - - [1657693240.722099][15129:15134] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 908345149 - [1657693240.722200][15129:15134] CHIP:TOO: Fabrics: 1 entries - [1657693240.722273][15129:15134] CHIP:TOO: [1]: { - [1657693240.722316][15129:15134] CHIP:TOO: RootPublicKey: 04038A93AE14428E9179C2ACC3BA1522D4D19BC20A3203BE97FEC0BE47EBC6CCCD4AD5F7B1CE0A02F85FF1B14216FAFCA034B3B312C16B0517267804D5B03582EF - [1657693240.722368][15129:15134] CHIP:TOO: VendorId: 65521 - [1657693240.722401][15129:15134] CHIP:TOO: FabricId: 1 - [1657693240.722431][15129:15134] CHIP:TOO: NodeId: 1 - [1657693240.722462][15129:15134] CHIP:TOO: Label: - [1657693240.722492][15129:15134] CHIP:TOO: FabricIndex: 1 - [1657693240.722522][15129:15134] CHIP:TOO: } - disabled: true - - - label: "Step 16: From TH2 read the CurrentFabricIndex" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta - - Verify current fabric index in TH2 Log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 2445178920 - CHIP:TOO: CurrentFabricIndex: 2 - CHIP:EM: Sending Standalone Ack for MessageCounter:8900122 on exchange 26519i - disabled: true - - - label: "Step 17: Verify that CurrentFabricIndex = FabricIndex_TH2" - verification: | - Verify that CurrentFabricIndex = FabricIndex_TH2 - disabled: true - - - label: - "Step 18: From TH2 read the entire NOCs List attribute with a - non-fabric-filtered read" - verification: | - ./chip-tool operationalcredentials read nocs 2 0 --commissioner-name beta - - - Verify the NOCs List in TH2 Log - - [1658819643.546022][8397:8402] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819643.546148][8397:8402] CHIP:TOO: NOCs: 1 entries - [1658819643.546258][8397:8402] CHIP:TOO: [1]: { - [1658819643.546307][8397:8402] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411021824070124080130094104FF8D28DB36902F674F4BF312985CDEA52231E0B3C4795E54E3EFC0D6DE9AED140DEF653EDE9160B10BF446D6E2FAC5DBD38BF85597E095136A209F0990E54394370A3501280118240201360304020401183004144F0F08EA1F5414C324914019EB74CA31C9819AC6300514FF5D080583B5B132C45F800B8D2E184E7D599F5118300B40D434A0D9DA1C7D61784D8BCBEE3E7179A4818499442DD23919A81933C0170673FF33D0E8654312388EE717161DF5E1B6E14402380602B873D551174B2BA0D8E718 - [1658819643.546407][8397:8402] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104A58C57E9D8919152DE03DAC991155D750A5D8C93093D75E166E1C5CF86381EA926E108BFE78DAD9FFFB4363A706DA88B9F3B8EF5D80F428F44EAE26472C81B47370A3501290118240260300414FF5D080583B5B132C45F800B8D2E184E7D599F513005143036AAD3B8EDBF6075364A85A96F9A0583EEC49718300B4014BEAF33C7B547857AC36A17AD1CDD4D90D7045889C5B576CA644C78F021B6C21498EDDC43730AFEAD6AF5A945728D1C4F7DF7EE37C313D5AE27E78F0509DB9918 - [1658819643.546447][8397:8402] CHIP:TOO: FabricIndex: 2 - [1658819643.546478][8397:8402] CHIP:TOO: } - disabled: true - - - label: - "Step 19: Verify that there is only data for the entry whose - FabricIndex field is equal to FabricIndex_TH2" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta - - Verify current fabric index in TH2 Log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 2445178920 - CHIP:TOO: CurrentFabricIndex: 2 - CHIP:EM: Sending Standalone Ack for MessageCounter:8900122 on exchange 26519i - disabled: true - - - label: - "Step 20: From TH2 read the entire NOCs List attribute with a - fabric-filtered read" - verification: | - ./chip-tool operationalcredentials read nocs 2 0 --fabric-filtered 1 --commissioner-name beta - - - Verify the NOCs List in TH2 Log - - [1658819643.546022][8397:8402] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819643.546148][8397:8402] CHIP:TOO: NOCs: 1 entries - [1658819643.546258][8397:8402] CHIP:TOO: [1]: { - [1658819643.546307][8397:8402] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411021824070124080130094104FF8D28DB36902F674F4BF312985CDEA52231E0B3C4795E54E3EFC0D6DE9AED140DEF653EDE9160B10BF446D6E2FAC5DBD38BF85597E095136A209F0990E54394370A3501280118240201360304020401183004144F0F08EA1F5414C324914019EB74CA31C9819AC6300514FF5D080583B5B132C45F800B8D2E184E7D599F5118300B40D434A0D9DA1C7D61784D8BCBEE3E7179A4818499442DD23919A81933C0170673FF33D0E8654312388EE717161DF5E1B6E14402380602B873D551174B2BA0D8E718 - [1658819643.546407][8397:8402] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104A58C57E9D8919152DE03DAC991155D750A5D8C93093D75E166E1C5CF86381EA926E108BFE78DAD9FFFB4363A706DA88B9F3B8EF5D80F428F44EAE26472C81B47370A3501290118240260300414FF5D080583B5B132C45F800B8D2E184E7D599F513005143036AAD3B8EDBF6075364A85A96F9A0583EEC49718300B4014BEAF33C7B547857AC36A17AD1CDD4D90D7045889C5B576CA644C78F021B6C21498EDDC43730AFEAD6AF5A945728D1C4F7DF7EE37C313D5AE27E78F0509DB9918 - [1658819643.546447][8397:8402] CHIP:TOO: FabricIndex: 2 - [1658819643.546478][8397:8402] CHIP:TOO: } - disabled: true - - - label: - "Step 21: Verify that there is only data for the entry whose - FabricIndex field is equal to FabricIndex_TH2" - verification: | - Verify that Noc"s list has only data for FabricIndex_TH2 - - [1658819643.546022][8397:8402] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819643.546148][8397:8402] CHIP:TOO: NOCs: 1 entries - [1658819643.546258][8397:8402] CHIP:TOO: [1]: { - [1658819643.546307][8397:8402] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411021824070124080130094104FF8D28DB36902F674F4BF312985CDEA52231E0B3C4795E54E3EFC0D6DE9AED140DEF653EDE9160B10BF446D6E2FAC5DBD38BF85597E095136A209F0990E54394370A3501280118240201360304020401183004144F0F08EA1F5414C324914019EB74CA31C9819AC6300514FF5D080583B5B132C45F800B8D2E184E7D599F5118300B40D434A0D9DA1C7D61784D8BCBEE3E7179A4818499442DD23919A81933C0170673FF33D0E8654312388EE717161DF5E1B6E14402380602B873D551174B2BA0D8E718 - [1658819643.546407][8397:8402] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104A58C57E9D8919152DE03DAC991155D750A5D8C93093D75E166E1C5CF86381EA926E108BFE78DAD9FFFB4363A706DA88B9F3B8EF5D80F428F44EAE26472C81B47370A3501290118240260300414FF5D080583B5B132C45F800B8D2E184E7D599F513005143036AAD3B8EDBF6075364A85A96F9A0583EEC49718300B4014BEAF33C7B547857AC36A17AD1CDD4D90D7045889C5B576CA644C78F021B6C21498EDDC43730AFEAD6AF5A945728D1C4F7DF7EE37C313D5AE27E78F0509DB9918 - [1658819643.546447][8397:8402] CHIP:TOO: FabricIndex: 2 - [1658819643.546478][8397:8402] CHIP:TOO: } - disabled: true - - - label: "Step 22: Read NOCStruct values from entry at index 1" - verification: | - ./chip-tool operationalcredentials read nocs 2 0 --commissioner-name beta - - Verify FabricIndex = FabricIndex_TH2 in TH2 Log - - [1658819643.546022][8397:8402] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 2645922631 - [1658819643.546148][8397:8402] CHIP:TOO: NOCs: 1 entries - [1658819643.546258][8397:8402] CHIP:TOO: [1]: { - [1658819643.546307][8397:8402] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411021824070124080130094104FF8D28DB36902F674F4BF312985CDEA52231E0B3C4795E54E3EFC0D6DE9AED140DEF653EDE9160B10BF446D6E2FAC5DBD38BF85597E095136A209F0990E54394370A3501280118240201360304020401183004144F0F08EA1F5414C324914019EB74CA31C9819AC6300514FF5D080583B5B132C45F800B8D2E184E7D599F5118300B40D434A0D9DA1C7D61784D8BCBEE3E7179A4818499442DD23919A81933C0170673FF33D0E8654312388EE717161DF5E1B6E14402380602B873D551174B2BA0D8E718 - [1658819643.546407][8397:8402] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104A58C57E9D8919152DE03DAC991155D750A5D8C93093D75E166E1C5CF86381EA926E108BFE78DAD9FFFB4363A706DA88B9F3B8EF5D80F428F44EAE26472C81B47370A3501290118240260300414FF5D080583B5B132C45F800B8D2E184E7D599F513005143036AAD3B8EDBF6075364A85A96F9A0583EEC49718300B4014BEAF33C7B547857AC36A17AD1CDD4D90D7045889C5B576CA644C78F021B6C21498EDDC43730AFEAD6AF5A945728D1C4F7DF7EE37C313D5AE27E78F0509DB9918 - [1658819643.546447][8397:8402] CHIP:TOO: FabricIndex: 2 - [1658819643.546478][8397:8402] CHIP:TOO: } - disabled: true - - - label: - "Step 23: From the NOCStruct values verify the following: NOC matches - the NOC sent to the DUT during commissioning process ICAC matches the - ICAC sent to the DUT during commissioning process from AddNOC in - pre-condition" - verification: | - Verify the value of NOC and ICAC are same in step 22 and 4 are same - - Step 22 Log: - Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411021824070124080130094104FF8D28DB36902F674F4BF312985CDEA52231E0B3C4795E54E3EFC0D6DE9AED140DEF653EDE9160B10BF446D6E2FAC5DBD38BF85597E095136A209F0990E54394370A3501280118240201360304020401183004144F0F08EA1F5414C324914019EB74CA31C9819AC6300514FF5D080583B5B132C45F800B8D2E184E7D599F5118300B40D434A0D9DA1C7D61784D8BCBEE3E7179A4818499442DD23919A81933C0170673FF33D0E8654312388EE717161DF5E1B6E14402380602B873D551174B2BA0D8E718 - - Step 4 Log - 0x15, 0x30, 0x1, 0x1, 0x1, 0x24, 0x2, 0x1, 0x37, 0x3, 0x24, 0x13, 0x1, 0x18, 0x26, 0x4, 0x80, 0x22, 0x81, 0x27, 0x26, 0x5, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x6, 0x24, 0x15, 0x1, 0x24, 0x11, 0x2, 0x18, 0x24, 0x7, 0x1, 0x24, 0x8, 0x1, 0x30, 0x9, 0x41, 0x4, 0xff, 0x8d, 0x28, 0xdb, 0x36, 0x90, 0x2f, 0x67, 0x4f, 0x4b, 0xf3, 0x12, 0x98, 0x5c, 0xde, 0xa5, 0x22, 0x31, 0xe0, 0xb3, 0xc4, 0x79, 0x5e, 0x54, 0xe3, 0xef, 0xc0, 0xd6, 0xde, 0x9a, 0xed, 0x14, 0xd, 0xef, 0x65, 0x3e, 0xde, 0x91, 0x60, 0xb1, 0xb, 0xf4, 0x46, 0xd6, 0xe2, 0xfa, 0xc5, 0xdb, 0xd3, 0x8b, 0xf8, 0x55, 0x97, 0xe0, 0x95, 0x13, 0x6a, 0x20, 0x9f, 0x9, 0x90, 0xe5, 0x43, 0x94, 0x37, 0xa, 0x35, 0x1, 0x28, 0x1, 0x18, 0x24, 0x2, 0x1, 0x36, 0x3, 0x4, 0x2, 0x4, 0x1, 0x18, 0x30, 0x4, 0x14, 0x4f, 0xf, 0x8, 0xea, 0x1f, 0x54, 0x14, 0xc3, 0x24, 0x91, 0x40, 0x19, 0xeb, 0x74, 0xca, 0x31, 0xc9, 0x81, 0x9a, 0xc6, 0x30, 0x5, 0x14, 0xff, 0x5d, 0x8, 0x5, 0x83, 0xb5, 0xb1, 0x32, 0xc4, 0x5f, 0x80, 0xb, 0x8d, 0x2e, 0x18, 0x4e, 0x7d, 0x59, 0x9f, 0x51, 0x18, 0x30, 0xb, 0x40, 0xd4, 0x34, 0xa0, 0xd9, 0xda, 0x1c, 0x7d, 0x61, 0x78, 0x4d, 0x8b, 0xcb, 0xee, 0x3e, 0x71, 0x79, 0xa4, 0x81, 0x84, 0x99, 0x44, 0x2d, 0xd2, 0x39, 0x19, 0xa8, 0x19, 0x33, 0xc0, 0x17, 0x6, 0x73, 0xff, 0x33, 0xd0, 0xe8, 0x65, 0x43, 0x12, 0x38, 0x8e, 0xe7, 0x17, 0x16, 0x1d, 0xf5, 0xe1, 0xb6, 0xe1, 0x44, 0x2, 0x38, 0x6, 0x2, 0xb8, 0x73, 0xd5, 0x51, 0x17, 0x4b, 0x2b, 0xa0, 0xd8, 0xe7, 0x18, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml index 8c6391cbd2aa14..7cd57ba2535c21 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml @@ -29,28 +29,22 @@ tests: Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true - - label: "Precondition" - verification: | - TH and DUT are commissioned - disabled: true - - label: "Step 1: Factory Reset TH (to ensure NOC list is empty at the beginning of the following steps)" verification: | - On Raspi factory reset with the below command. + On both DUT and TH side, on Raspi we do factory reset with the below command. The DUT for cert should follow vendor specific procedure for factory reset sudo rm -rf /tmp/chip_* disabled: true - label: "Step 2: Start the commissioning process of TH with DUT" verification: | On dut(chip-tool) side: - ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 + ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 [1641381202.376419][5628:5633] CHIP:CTL: Received success response 0x3df8 - On TH(all-clusters-app) - ./all-clusters-app --wifi + ./all-clusters-app --wifi --trace_decode 1 [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true @@ -58,210 +52,82 @@ tests: "Step 3: Verify that TH receives AttestationRequest Command from DUT" PICS: OPCREDS.C.C00.Tx verification: | - Verify that the TH(all-clusters-app) Receives AttestationRequest Command from DUT(chip-tool) in commissioning log - - Command=0x0000_0000 - [1689679303.594633][52705:52705] CHIP:ZCL: OpCreds: Received an AttestationRequest command - [1689679303.594696][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581348 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 47827 / Exchange = 36146] - [1689679303.594702][52705:52705] CHIP:DMG: Header Flags = - [1689679303.594704][52705:52705] CHIP:DMG: { - [1689679303.594708][52705:52705] CHIP:DMG: Exchange (0x02) = - [1689679303.594711][52705:52705] CHIP:DMG: { - [1689679303.594713][52705:52705] CHIP:DMG: AckMsg = 135880641 - [1689679303.594716][52705:52705] CHIP:DMG: } - [1689679303.594721][52705:52705] CHIP:DMG: } - [1689679303.594724][52705:52705] CHIP:DMG: - [1689679303.594731][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.594733][52705:52705] CHIP:DMG: { - [1689679303.594737][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.594740][52705:52705] CHIP:DMG: } - [1689679303.594742][52705:52705] CHIP:DMG: - [1689679303.594752][52705:52705] CHIP:EM: <<< [E:36146r S:3817 M:151581348 (Ack:135880641)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689679303.594758][52705:52705] CHIP:IN: (S) Sending msg 151581348 on secure session with LSID: 3817 - [1689679303.594776][52705:52705] CHIP:EM: Flushed pending ack for MessageCounter:135880641 on exchange 36146r - [1689679303.595410][52705:52705] CHIP:ZCL: OpCreds: AttestationRequest successful. - [1689679303.595420][52705:52705] CHIP:DMG: Command handler moving to [ Preparing] - [1689679303.595424][52705:52705] CHIP:DMG: Command handler moving to [AddingComm] - [1689679303.595430][52705:52705] CHIP:DMG: Command handler moving to [AddedComma] - [1689679303.595440][52705:52705] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1689679303.595540][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581349 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 47827 / Exchange = 36146] - [1689679303.595546][52705:52705] CHIP:DMG: Header Flags = - [1689679303.595549][52705:52705] CHIP:DMG: { - [1689679303.595556][52705:52705] CHIP:DMG: Exchange (0x06) = - [1689679303.595559][52705:52705] CHIP:DMG: { - [1689679303.595563][52705:52705] CHIP:DMG: AckMsg = 135880641 - [1689679303.595566][52705:52705] CHIP:DMG: NeedsAck = true - [1689679303.595568][52705:52705] CHIP:DMG: } - [1689679303.595574][52705:52705] CHIP:DMG: } - [1689679303.595576][52705:52705] CHIP:DMG: - [1689679303.595579][52705:52705] CHIP:DMG: Decrypted Payload (684 bytes) = - [1689679303.595581][52705:52705] CHIP:DMG: { - [1689679303.595583][52705:52705] CHIP:DMG: data = 1528003601153500370024000024013e240201183501310047021531011b023082021706092a864886f70d010702a082020830820204020103310d300b06096086480165030402013082017006092a864886f70d010701a08201610482015d152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c0413435341303030303053574330303030302d303024050024060024070124080018317c307a0201038014fe343f959947763b61ee4539131338494fe67d8e300b0609608648016503040201300a06082a8648ce3d0403020446304402204a12f8d42f90235c05a77121cbebae15d590146558e9c9b47a1a38f7a36a7dc5022020a4742897c30aeda0a56b36e14ebbc85bbdb74493f993581eb0444ed6ca940b3002200b26be8be08e49a87cd4a4f1af3f46185863568e60caab947202f2c01e4b25392403001830014062e6a464e67c20b4f666201c73e453d451d64cdaa6fa33c12f1c652570b95aa0ac4d43fcd279420a50e7ad596242491c94d750041ab65d9cdaf305483d164f2b1818181824ff0118 - [1689679303.595595][52705:52705] CHIP:DMG: } - [1689679303.595597][52705:52705] CHIP:DMG: - [1689679303.595624][52705:52705] CHIP:DMG: Attestation Elements (583 bytes) = - [1689679303.595626][52705:52705] CHIP:DMG: { - [1689679303.595628][52705:52705] CHIP:DMG: Certification Declaration = - [1689679303.595631][52705:52705] CHIP:DMG: { - [1689679303.595830][52705:52705] CHIP:DMG: Format Version = 1 - [1689679303.595836][52705:52705] CHIP:DMG: Vendor Id = 65521 - [1689679303.595839][52705:52705] CHIP:DMG: Product Ids = - [1689679303.595842][52705:52705] CHIP:DMG: { - [1689679303.595844][52705:52705] CHIP:DMG: Product Id = 32768 - [1689679303.595847][52705:52705] CHIP:DMG: Product Id = 32769 - [1689679303.595849][52705:52705] CHIP:DMG: Product Id = 32770 - [1689679303.595853][52705:52705] CHIP:DMG: Product Id = 32771 - [1689679303.595855][52705:52705] CHIP:DMG: Product Id = 32772 - [1689679303.595857][52705:52705] CHIP:DMG: Product Id = 32773 - [1689679303.595859][52705:52705] CHIP:DMG: Product Id = 32774 - [1689679303.595862][52705:52705] CHIP:DMG: Product Id = 32775 - [1689679303.595864][52705:52705] CHIP:DMG: Product Id = 32776 - [1689679303.595867][52705:52705] CHIP:DMG: Product Id = 32777 - [1689679303.595869][52705:52705] CHIP:DMG: Product Id = 32778 - [1689679303.595872][52705:52705] CHIP:DMG: Product Id = 32779 - [1689679303.595875][52705:52705] CHIP:DMG: Product Id = 32780 - [1689679303.595879][52705:52705] CHIP:DMG: Product Id = 32781 - [1689679303.595883][52705:52705] CHIP:DMG: Product Id = 32782 - [1689679303.595887][52705:52705] CHIP:DMG: Product Id = 32783 - [1689679303.595891][52705:52705] CHIP:DMG: Product Id = 32784 - [1689679303.595895][52705:52705] CHIP:DMG: Product Id = 32785 - [1689679303.595898][52705:52705] CHIP:DMG: Product Id = 32786 - [1689679303.595902][52705:52705] CHIP:DMG: Product Id = 32787 - [1689679303.595905][52705:52705] CHIP:DMG: Product Id = 32788 - [1689679303.595909][52705:52705] CHIP:DMG: Product Id = 32789 - [1689679303.595913][52705:52705] CHIP:DMG: Product Id = 32790 - [1689679303.595919][52705:52705] CHIP:DMG: Product Id = 32791 - [1689679303.595927][52705:52705] CHIP:DMG: Product Id = 32792 - [1689679303.595930][52705:52705] CHIP:DMG: Product Id = 32793 - [1689679303.595933][52705:52705] CHIP:DMG: Product Id = 32794 - [1689679303.595937][52705:52705] CHIP:DMG: Product Id = 32795 - [1689679303.595941][52705:52705] CHIP:DMG: Product Id = 32796 - [1689679303.595942][52705:52705] CHIP:DMG: Product Id = 32797 - [1689679303.595946][52705:52705] CHIP:DMG: Product Id = 32798 - [1689679303.595950][52705:52705] CHIP:DMG: Product Id = 32799 - [1689679303.595952][52705:52705] CHIP:DMG: Product Id = 32800 - [1689679303.595955][52705:52705] CHIP:DMG: Product Id = 32801 - [1689679303.595959][52705:52705] CHIP:DMG: Product Id = 32802 - [1689679303.595960][52705:52705] CHIP:DMG: Product Id = 32803 - [1689679303.595964][52705:52705] CHIP:DMG: Product Id = 32804 - [1689679303.595967][52705:52705] CHIP:DMG: Product Id = 32805 - [1689679303.595969][52705:52705] CHIP:DMG: Product Id = 32806 - [1689679303.595973][52705:52705] CHIP:DMG: Product Id = 32807 - [1689679303.595976][52705:52705] CHIP:DMG: Product Id = 32808 - [1689679303.595978][52705:52705] CHIP:DMG: Product Id = 32809 - [1689679303.595981][52705:52705] CHIP:DMG: Product Id = 32810 - [1689679303.595983][52705:52705] CHIP:DMG: Product Id = 32811 - [1689679303.595987][52705:52705] CHIP:DMG: Product Id = 32812 - [1689679303.595990][52705:52705] CHIP:DMG: Product Id = 32813 - [1689679303.595992][52705:52705] CHIP:DMG: Product Id = 32814 - [1689679303.595995][52705:52705] CHIP:DMG: Product Id = 32815 - [1689679303.595999][52705:52705] CHIP:DMG: Product Id = 32816 - [1689679303.596003][52705:52705] CHIP:DMG: Product Id = 32817 - [1689679303.596006][52705:52705] CHIP:DMG: Product Id = 32818 - [1689679303.596010][52705:52705] CHIP:DMG: Product Id = 32819 - [1689679303.596013][52705:52705] CHIP:DMG: Product Id = 32820 - [1689679303.596017][52705:52705] CHIP:DMG: Product Id = 32821 - [1689679303.596020][52705:52705] CHIP:DMG: Product Id = 32822 - [1689679303.596024][52705:52705] CHIP:DMG: Product Id = 32823 - [1689679303.596028][52705:52705] CHIP:DMG: Product Id = 32824 - [1689679303.596032][52705:52705] CHIP:DMG: Product Id = 32825 - [1689679303.596035][52705:52705] CHIP:DMG: Product Id = 32826 - [1689679303.596038][52705:52705] CHIP:DMG: Product Id = 32827 - [1689679303.596041][52705:52705] CHIP:DMG: Product Id = 32828 - [1689679303.596044][52705:52705] CHIP:DMG: Product Id = 32829 - [1689679303.596047][52705:52705] CHIP:DMG: Product Id = 32830 - [1689679303.596051][52705:52705] CHIP:DMG: Product Id = 32831 - [1689679303.596054][52705:52705] CHIP:DMG: Product Id = 32832 - [1689679303.596056][52705:52705] CHIP:DMG: Product Id = 32833 - [1689679303.596060][52705:52705] CHIP:DMG: Product Id = 32834 - [1689679303.596063][52705:52705] CHIP:DMG: Product Id = 32835 - [1689679303.596066][52705:52705] CHIP:DMG: Product Id = 32836 - [1689679303.596068][52705:52705] CHIP:DMG: Product Id = 32837 - [1689679303.596072][52705:52705] CHIP:DMG: Product Id = 32838 - [1689679303.596075][52705:52705] CHIP:DMG: Product Id = 32839 - [1689679303.596079][52705:52705] CHIP:DMG: Product Id = 32840 - [1689679303.596083][52705:52705] CHIP:DMG: Product Id = 32841 - [1689679303.596086][52705:52705] CHIP:DMG: Product Id = 32842 - [1689679303.596090][52705:52705] CHIP:DMG: Product Id = 32843 - [1689679303.596091][52705:52705] CHIP:DMG: Product Id = 32844 - [1689679303.596095][52705:52705] CHIP:DMG: Product Id = 32845 - [1689679303.596098][52705:52705] CHIP:DMG: Product Id = 32846 - [1689679303.596100][52705:52705] CHIP:DMG: Product Id = 32847 - [1689679303.596104][52705:52705] CHIP:DMG: Product Id = 32848 - [1689679303.596107][52705:52705] CHIP:DMG: Product Id = 32849 - [1689679303.596109][52705:52705] CHIP:DMG: Product Id = 32850 - [1689679303.596111][52705:52705] CHIP:DMG: Product Id = 32851 - [1689679303.596113][52705:52705] CHIP:DMG: Product Id = 32852 - [1689679303.596115][52705:52705] CHIP:DMG: Product Id = 32853 - [1689679303.596118][52705:52705] CHIP:DMG: Product Id = 32854 - [1689679303.596121][52705:52705] CHIP:DMG: Product Id = 32855 - [1689679303.596125][52705:52705] CHIP:DMG: Product Id = 32856 - [1689679303.596129][52705:52705] CHIP:DMG: Product Id = 32857 - [1689679303.596133][52705:52705] CHIP:DMG: Product Id = 32858 - [1689679303.596137][52705:52705] CHIP:DMG: Product Id = 32859 - [1689679303.596140][52705:52705] CHIP:DMG: Product Id = 32860 - [1689679303.596144][52705:52705] CHIP:DMG: Product Id = 32861 - [1689679303.596151][52705:52705] CHIP:DMG: Product Id = 32862 - [1689679303.596155][52705:52705] CHIP:DMG: Product Id = 32863 - [1689679303.596158][52705:52705] CHIP:DMG: Product Id = 32864 - [1689679303.596161][52705:52705] CHIP:DMG: Product Id = 32865 - [1689679303.596164][52705:52705] CHIP:DMG: Product Id = 32866 - [1689679303.596168][52705:52705] CHIP:DMG: Product Id = 32867 - [1689679303.596171][52705:52705] CHIP:DMG: } - [1689679303.596174][52705:52705] CHIP:DMG: Device Type Id = 22 - [1689679303.596178][52705:52705] CHIP:DMG: Certificate Id (19) = CSA00000SWC00000-00 - [1689679303.596182][52705:52705] CHIP:DMG: Security Level = 0 - [1689679303.596185][52705:52705] CHIP:DMG: Security Information = 0 - [1689679303.596188][52705:52705] CHIP:DMG: Version Number = 1 - [1689679303.596191][52705:52705] CHIP:DMG: Certification Type = 0 - [1689679303.596194][52705:52705] CHIP:DMG: } - [1689679303.596199][52705:52705] CHIP:DMG: Attestation Nonce (32) = 0B26BE8BE08E49A87CD4A4F1AF3F46185863568E60CAAB947202F2C01E4B2539 - [1689679303.596202][52705:52705] CHIP:DMG: Timestamp = 0 - [1689679303.596204][52705:52705] CHIP:DMG: } - [1689679303.596207][52705:52705] CHIP:DMG: - [1689679303.596216][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689679303.596220][52705:52705] CHIP:DMG: { - [1689679303.596222][52705:52705] CHIP:DMG: suppressResponse = false, - [1689679303.596225][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689679303.596231][52705:52705] CHIP:DMG: [ - [1689679303.596235][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689679303.596241][52705:52705] CHIP:DMG: { - [1689679303.596244][52705:52705] CHIP:DMG: CommandDataIB = - [1689679303.596248][52705:52705] CHIP:DMG: { - [1689679303.596252][52705:52705] CHIP:DMG: CommandPathIB = - [1689679303.596256][52705:52705] CHIP:DMG: { - [1689679303.596260][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689679303.596265][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689679303.596268][52705:52705] CHIP:DMG: CommandId = 0x1, - [1689679303.596270][52705:52705] CHIP:DMG: }, - [1689679303.596274][52705:52705] CHIP:DMG: - [1689679303.596277][52705:52705] CHIP:DMG: CommandFields = - [1689679303.596281][52705:52705] CHIP:DMG: { - [1689679303.596285][52705:52705] CHIP:DMG: 0x0 = [ - [1689679303.596311][52705:52705] CHIP:DMG: 0x15, 0x31, 0x01, 0x1b, 0x02, 0x30, 0x82, 0x02, 0x17, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x08, 0x30, 0x82, 0x02, 0x04, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x82, 0x01, 0x70, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01, 0x61, 0x04, 0x82, 0x01, 0x5d, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x - [1689679303.596324][52705:52705] CHIP:DMG: ] (583 bytes) - [1689679303.596329][52705:52705] CHIP:DMG: 0x1 = [ - [1689679303.596346][52705:52705] CHIP:DMG: 0x62, 0xe6, 0xa4, 0x64, 0xe6, 0x7c, 0x20, 0xb4, 0xf6, 0x66, 0x20, 0x1c, 0x73, 0xe4, 0x53, 0xd4, 0x51, 0xd6, 0x4c, 0xda, 0xa6, 0xfa, 0x33, 0xc1, 0x2f, 0x1c, 0x65, 0x25, 0x70, 0xb9, 0x5a, 0xa0, 0xac, 0x4d, 0x43, 0xfc, 0xd2, 0x79, 0x42, 0x0a, 0x50, 0xe7, 0xad, 0x59, 0x62, 0x42, 0x49, 0x1c, 0x94, 0xd7, 0x50, 0x04, 0x1a, 0xb6, 0x5d, 0x9c, 0xda, 0xf3, 0x05, 0x48, 0x3d, 0x16, 0x4f, 0x2b, - [1689679303.596354][52705:52705] CHIP:DMG: ] (64 bytes) - [1689679303.596360][52705:52705] CHIP:DMG: }, - [1689679303.596363][52705:52705] CHIP:DMG: }, - [1689679303.596369][52705:52705] CHIP:DMG: - [1689679303.596372][52705:52705] CHIP:DMG: }, - [1689679303.596378][52705:52705] CHIP:DMG: - [1689679303.596381][52705:52705] CHIP:DMG: ], - [1689679303.596387][52705:52705] CHIP:DMG: - [1689679303.596390][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689679303.596393][52705:52705] CHIP:DMG: }, - [1689679303.596396][52705:52705] CHIP:DMG: - [1689679303.596406][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.596408][52705:52705] CHIP:DMG: { - [1689679303.596412][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.596415][52705:52705] CHIP:DMG: } - [1689679303.596418][52705:52705] CHIP:DMG: - [1689679303.596432][52705:52705] CHIP:EM: <<< [E:36146r S:3817 M:151581349 (Ack:135880641)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) - [1689679303.596439][52705:52705] CHIP:IN: (S) Sending msg 151581349 on secure session with LSID: 3817 - [1689679303.596473][52705:52705] CHIP:DMG: Command handler moving to [CommandSen] - [1689679303.596477][52705:52705] CHIP:DMG: Command handler moving to [AwaitingDe] + Verify that the TH(all-clusters-app) Receives AttestationRequest Command from DUT(chip-tool) in commissioning log + + [1720691676.026] [2537:2537] [EM] >>> [E:41765r S:27758 M:74843053 (Ack:113637238)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1720691676.026] [2537:2537] [EM] Found matching exchange: 41765r, Delegate: (nil) + [1720691676.026] [2537:2537] [EM] Rxd Ack; Removing MessageCounter:113637238 from Retrans Table on exchange 41765r + [1720691676.031] [2537:2537] [DMG] << from UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 74843054 | [Interaction Model (1) / InvokeCommandRequest (0x08) / Session = 27758 / Exchange = 41767] + [1720691676.031] [2537:2537] [DMG] Header Flags = + [1720691676.031] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] Exchange (0x05) = + [1720691676.032] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] Initiator = true + [1720691676.032] [2537:2537] [DMG] NeedsAck = true + [1720691676.032] [2537:2537] [DMG] } + [1720691676.032] [2537:2537] [DMG] } + [1720691676.032] [2537:2537] [DMG] + [1720691676.032] [2537:2537] [DMG] Decrypted Payload (64 bytes) = + [1720691676.032] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] data = 1528002801360215370024000024013e2402001835013000207c68d54ee8c0f3f8776e9ee70759635be542b72023c0709a5b88c6c8cb80b53918181824ff0b18 + [1720691676.032] [2537:2537] [DMG] } + [1720691676.032] [2537:2537] [DMG] + [1720691676.032] [2537:2537] [DMG] + [1720691676.032] [2537:2537] [DMG] Additional Fields = + [1720691676.032] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.032] [2537:2537] [DMG] } + [1720691676.032] [2537:2537] [DMG] + [1720691676.032] [2537:2537] [EM] >>> [E:41767r S:27758 M:74843054] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691676.032] [2537:2537] [EM] Handling via exchange: 41767r, Delegate: 0xaaaad99c9368 + [1720691676.032] [2537:2537] [DMG] InvokeRequestMessage = + [1720691676.032] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] suppressResponse = false, + [1720691676.032] [2537:2537] [DMG] timedRequest = false, + [1720691676.032] [2537:2537] [DMG] InvokeRequests = + [1720691676.032] [2537:2537] [DMG] [ + [1720691676.032] [2537:2537] [DMG] CommandDataIB = + [1720691676.032] [2537:2537] [DMG] { + [1720691676.032] [2537:2537] [DMG] CommandPathIB = + [1720691676.033] [2537:2537] [DMG] { + [1720691676.033] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.033] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.033] [2537:2537] [DMG] CommandId = 0x0, + [1720691676.033] [2537:2537] [DMG] }, + [1720691676.033] [2537:2537] [DMG] + [1720691676.033] [2537:2537] [DMG] CommandFields = + [1720691676.033] [2537:2537] [DMG] { + [1720691676.033] [2537:2537] [DMG] 0x0 = [ + [1720691676.033] [2537:2537] [DMG] 0x7c, 0x68, 0xd5, 0x4e, 0xe8, 0xc0, 0xf3, 0xf8, 0x77, 0x6e, 0x9e, 0xe7, 0x07, 0x59, 0x63, 0x5b, 0xe5, 0x42, 0xb7, 0x20, 0x23, 0xc0, 0x70, 0x9a, 0x5b, 0x88, 0xc6, 0xc8, 0xcb, 0x80, 0xb5, 0x39, + [1720691676.033] [2537:2537] [DMG] ] (32 bytes) + [1720691676.033] [2537:2537] [DMG] }, + [1720691676.033] [2537:2537] [DMG] }, + [1720691676.033] [2537:2537] [DMG] + [1720691676.033] [2537:2537] [DMG] ], + [1720691676.033] [2537:2537] [DMG] + [1720691676.033] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.033] [2537:2537] [DMG] }, + [1720691676.033] [2537:2537] [DMG] AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a + [1720691676.033] [2537:2537] [DMG] AccessControl: implicit admin (PASE) + [1720691676.033] [2537:2537] [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0000 + [1720691676.033] [2537:2537] [ZCL] OpCreds: Received an AttestationRequest command + [1720691676.034] [2537:2537] [DMG] >> to UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 113637240 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 38450 / Exchange = 41767] + [1720691676.034] [2537:2537] [DMG] Header Flags = + [1720691676.034] [2537:2537] [DMG] { + [1720691676.034] [2537:2537] [DMG] Exchange (0x02) = + [1720691676.034] [2537:2537] [DMG] { + [1720691676.034] [2537:2537] [DMG] AckMsg = 74843054 + [1720691676.034] [2537:2537] [DMG] } + [1720691676.034] [2537:2537] [DMG] } + [1720691676.034] [2537:2537] [DMG] + [1720691676.034] [2537:2537] [DMG] Additional Fields = + [1720691676.034] [2537:2537] [DMG] { + [1720691676.034] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.034] [2537:2537] [DMG] } + [1720691676.034] [2537:2537] [DMG] + [1720691676.034] [2537:2537] [EM] <<< [E:41767r S:27758 M:113637240 (Ack:74843054)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1720691676.034] [2537:2537] [EM] Flushed pending ack for MessageCounter:74843054 on exchange 41767r + [1720691676.035] [2537:2537] [ZCL] OpCreds: AttestationRequest successful. disabled: true - label: @@ -271,100 +137,51 @@ tests: verification: | Verify that the TH (all-clusters-app) Receives CertificateChainRequest Command from DUT in commissioning log - [1689679303.591413][52705:52705] CHIP:ZCL: OpCreds: Certificate Chain request received for PAI - [1689679303.591421][52705:52705] CHIP:DMG: Command handler moving to [ Preparing] - [1689679303.591426][52705:52705] CHIP:DMG: Command handler moving to [AddingComm] - [1689679303.591432][52705:52705] CHIP:DMG: Command handler moving to [AddedComma] - [1689679303.591440][52705:52705] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1689679303.591524][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581346 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 47827 / Exchange = 36144] - [1689679303.591532][52705:52705] CHIP:DMG: Header Flags = - [1689679303.591535][52705:52705] CHIP:DMG: { - [1689679303.591542][52705:52705] CHIP:DMG: Exchange (0x06) = - [1689679303.591545][52705:52705] CHIP:DMG: { - [1689679303.591550][52705:52705] CHIP:DMG: AckMsg = 135880637 - [1689679303.591553][52705:52705] CHIP:DMG: NeedsAck = true - [1689679303.591556][52705:52705] CHIP:DMG: } - [1689679303.591562][52705:52705] CHIP:DMG: } - [1689679303.591565][52705:52705] CHIP:DMG: - [1689679303.591569][52705:52705] CHIP:DMG: Decrypted Payload (497 bytes) = - [1689679303.591571][52705:52705] CHIP:DMG: { - [1689679303.591574][52705:52705] CHIP:DMG: data = 1528003601153500370024000024013e2402031835013100cf01308201cb30820171a003020102020856ad8222ad945b64300a06082a8648ce3d04030230303118301606035504030c0f4d617474657220546573742050414131143012060a2b0601040182a27c02010c04464646313020170d3232303230353030303030305a180f39393939313233313233353935395a303d3125302306035504030c1c4d6174746572204465762050414920307846464631206e6f2050494431143012060a2b0601040182a27c02010c04464646313059301306072a8648ce3d020106082a8648ce3d03010703420004419a9315c2173e0c8c876d03ccfc944852647f7fec5e5082f4059928eca894c594151309ac631e4cb03392af684b0bafb7e65b3b8162c2f52bf931b8e77aaa82a366306430120603551d130101ff040830060101ff020100300e0603551d0f0101ff040403020106301d0603551d0e0416041463540e47f64b1c38d13884a462d16c195d8ffb3c301f0603551d230418301680146afd22771f511fecbf1641976710dcdc31a1717e300a06082a8648ce3d0403020348003045022100b2ef27f49ae9b50fb91eeac94c4d0bdbb8d7929c6cb88face529368d12054c0c0220655dc92b86bd909882a6c62177b825d7d05edbe7c22f9fea71220e7ea703f8911818181824ff0118 - [1689679303.591583][52705:52705] CHIP:DMG: } - [1689679303.591586][52705:52705] CHIP:DMG: - [1689679303.591613][52705:52705] CHIP:DMG: DAC/PAI (463) = - [1689679303.591625][52705:52705] CHIP:DMG: { - -----BEGIN CERTIFICATE----- - MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP - TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw - MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ - QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO - PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU - xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E - CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk - YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI - zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl - Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== - -----END CERTIFICATE----- - [1689679303.591637][52705:52705] CHIP:DMG: } - [1689679303.591638][52705:52705] CHIP:DMG: - [1689679303.591646][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689679303.591648][52705:52705] CHIP:DMG: { - [1689679303.591651][52705:52705] CHIP:DMG: suppressResponse = false, - [1689679303.591654][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689679303.591661][52705:52705] CHIP:DMG: [ - [1689679303.591664][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689679303.591669][52705:52705] CHIP:DMG: { - [1689679303.591672][52705:52705] CHIP:DMG: CommandDataIB = - [1689679303.591676][52705:52705] CHIP:DMG: { - [1689679303.591679][52705:52705] CHIP:DMG: CommandPathIB = - [1689679303.591683][52705:52705] CHIP:DMG: { - [1689679303.591687][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689679303.591692][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689679303.591695][52705:52705] CHIP:DMG: CommandId = 0x3, - [1689679303.591699][52705:52705] CHIP:DMG: }, - [1689679303.591704][52705:52705] CHIP:DMG: - [1689679303.591706][52705:52705] CHIP:DMG: CommandFields = - [1689679303.591711][52705:52705] CHIP:DMG: { - [1689679303.591714][52705:52705] CHIP:DMG: 0x0 = [ - [1689679303.591741][52705:52705] CHIP:DMG: 0x30, 0x82, 0x01, 0xcb, 0x30, 0x82, 0x01, 0x71, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x56, 0xad, 0x82, 0x22, 0xad, 0x94, 0x5b, 0x64, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x30, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x3d, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x50, 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x41, 0x9a, 0x93, 0x15, 0xc2, 0x17, 0x3e, 0x0c, 0x8c, 0x87, 0x6d, 0x03, 0xcc, 0xfc, 0x94, 0x48, 0x52, 0x64, 0x7f, 0x7f, 0xec, 0x5e, 0x50, 0x82, 0xf4, 0x05, 0x99, 0x28, 0xec, 0xa8, 0x94, 0xc5, 0x94, 0x15, 0x13, 0x09, 0xac, 0x63, 0x1e, 0x4c, 0xb0, 0x33, 0x92, 0xaf, 0x68, 0x4b, 0x0b, 0xaf, 0xb7, 0xe6, 0x5b, 0x3b, 0x81, 0x62, 0xc2, 0xf5, 0x2b, 0xf9, 0x31, 0xb8, 0xe7, 0x7a, 0xaa, 0x82, 0xa3, 0x66, 0x30, 0x64, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x - [1689679303.591755][52705:52705] CHIP:DMG: ] (463 bytes) - [1689679303.591759][52705:52705] CHIP:DMG: }, - [1689679303.591763][52705:52705] CHIP:DMG: }, - [1689679303.591769][52705:52705] CHIP:DMG: - [1689679303.591773][52705:52705] CHIP:DMG: }, - [1689679303.591779][52705:52705] CHIP:DMG: - [1689679303.591781][52705:52705] CHIP:DMG: ], - [1689679303.591787][52705:52705] CHIP:DMG: - [1689679303.591790][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689679303.591794][52705:52705] CHIP:DMG: }, - [1689679303.591797][52705:52705] CHIP:DMG: - [1689679303.591804][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.591806][52705:52705] CHIP:DMG: { - [1689679303.591810][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.591813][52705:52705] CHIP:DMG: } - [1689679303.591815][52705:52705] CHIP:DMG: - [1689679303.591827][52705:52705] CHIP:EM: <<< [E:36144r S:3817 M:151581346 (Ack:135880637)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) - [1689679303.591834][52705:52705] CHIP:IN: (S) Sending msg 151581346 on secure session with LSID: 3817 - [1689679303.591861][52705:52705] CHIP:DMG: Command handler moving to [CommandSen] - [1689679303.591864][52705:52705] CHIP:DMG: Command handler moving to [AwaitingDe] - [1689679303.591938][52705:52705] CHIP:DMG: << from UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 135880638 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 3817 / Exchange = 36143] - [1689679303.591946][52705:52705] CHIP:DMG: Header Flags = - [1689679303.591949][52705:52705] CHIP:DMG: { - [1689679303.591955][52705:52705] CHIP:DMG: Exchange (0x03) = - [1689679303.591958][52705:52705] CHIP:DMG: { - [1689679303.591960][52705:52705] CHIP:DMG: Initiator = true - [1689679303.591964][52705:52705] CHIP:DMG: AckMsg = 151581345 - [1689679303.591967][52705:52705] CHIP:DMG: } - [1689679303.591971][52705:52705] CHIP:DMG: } - [1689679303.591973][52705:52705] CHIP:DMG: - [1689679303.591978][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.591980][52705:52705] CHIP:DMG: { - [1689679303.591982][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.591986][52705:52705] CHIP:DMG: } - [1689679303.591989][52705:52705] CHIP:DMG: - [1689679303.591995][52705:52705] CHIP:EM: >>> [E:36143r S:3817 M:135880638 (Ack:151581345)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689679303.591999][52705:52705] CHIP:EM: Found matching exchange: 36143r, Delegate: (nil) - [1689679303.592007][52705:52705] CHIP:EM: Rxd Ack; Removing MessageCounter:151581345 from Retrans Table on exchange 36143r + [1720691676.009] [2537:2537] [DMG] Decrypted Payload (32 bytes) = + [1720691676.009] [2537:2537] [DMG] { + [1720691676.009] [2537:2537] [DMG] data = 1528002801360215370024000024013e24020218350124000218181824ff0b18 + [1720691676.009] [2537:2537] [DMG] } + [1720691676.009] [2537:2537] [DMG] + [1720691676.009] [2537:2537] [DMG] + [1720691676.009] [2537:2537] [DMG] Additional Fields = + [1720691676.009] [2537:2537] [DMG] { + [1720691676.009] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.009] [2537:2537] [DMG] } + [1720691676.009] [2537:2537] [DMG] + [1720691676.010] [2537:2537] [EM] >>> [E:41765r S:27758 M:74843050] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691676.010] [2537:2537] [EM] Handling via exchange: 41765r, Delegate: 0xaaaad99c9368 + [1720691676.010] [2537:2537] [DMG] InvokeRequestMessage = + [1720691676.010] [2537:2537] [DMG] { + [1720691676.010] [2537:2537] [DMG] suppressResponse = false, + [1720691676.010] [2537:2537] [DMG] timedRequest = false, + [1720691676.010] [2537:2537] [DMG] InvokeRequests = + [1720691676.010] [2537:2537] [DMG] [ + [1720691676.010] [2537:2537] [DMG] CommandDataIB = + [1720691676.010] [2537:2537] [DMG] { + [1720691676.010] [2537:2537] [DMG] CommandPathIB = + [1720691676.010] [2537:2537] [DMG] { + [1720691676.010] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.010] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.010] [2537:2537] [DMG] CommandId = 0x2, + [1720691676.010] [2537:2537] [DMG] }, + [1720691676.010] [2537:2537] [DMG] + [1720691676.010] [2537:2537] [DMG] CommandFields = + [1720691676.010] [2537:2537] [DMG] { + [1720691676.010] [2537:2537] [DMG] 0x0 = 2 (unsigned), + [1720691676.010] [2537:2537] [DMG] }, + [1720691676.010] [2537:2537] [DMG] }, + [1720691676.010] [2537:2537] [DMG] + [1720691676.010] [2537:2537] [DMG] ], + [1720691676.010] [2537:2537] [DMG] + [1720691676.010] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.010] [2537:2537] [DMG] }, + [1720691676.011] [2537:2537] [DMG] AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a + [1720691676.011] [2537:2537] [DMG] AccessControl: implicit admin (PASE) + [1720691676.011] [2537:2537] [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0002 + [1720691676.011] [2537:2537] [ZCL] OpCreds: Certificate Chain request received for PAI + [1720691676.011] [2537:2537] [DMG] Command handler moving to [NewRespons] + [1720691676.011] [2537:2537] [DMG] Command handler moving to [ Preparing] + [1720691676.011] [2537:2537] [DMG] Command handler moving to [AddingComm] disabled: true - label: "Step 5a: Verify that the TH receives CSRRequest command from DUT" @@ -372,104 +189,75 @@ tests: verification: | Verify that the TH (all-clusters-app) Receives CSRRequest command from DUT in commissioning log - [1689679303.601215][52705:52705] CHIP:ZCL: OpCreds: Received a CSRRequest command - [1689679303.601220][52705:52705] CHIP:ZCL: OpCreds: Finding fabric with fabricIndex 0x0 - [1689679303.601291][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581350 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 47827 / Exchange = 36147] - [1689679303.601299][52705:52705] CHIP:DMG: Header Flags = - [1689679303.601302][52705:52705] CHIP:DMG: { - [1689679303.601309][52705:52705] CHIP:DMG: Exchange (0x02) = - [1689679303.601312][52705:52705] CHIP:DMG: { - [1689679303.601316][52705:52705] CHIP:DMG: AckMsg = 135880643 - [1689679303.601319][52705:52705] CHIP:DMG: } - [1689679303.601325][52705:52705] CHIP:DMG: } - [1689679303.601328][52705:52705] CHIP:DMG: - [1689679303.601335][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.601338][52705:52705] CHIP:DMG: { - [1689679303.601342][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.601345][52705:52705] CHIP:DMG: } - [1689679303.601348][52705:52705] CHIP:DMG: - [1689679303.601360][52705:52705] CHIP:EM: <<< [E:36147r S:3817 M:151581350 (Ack:135880643)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689679303.601367][52705:52705] CHIP:IN: (S) Sending msg 151581350 on secure session with LSID: 3817 - [1689679303.601389][52705:52705] CHIP:EM: Flushed pending ack for MessageCounter:135880643 on exchange 36147r - [1689679303.601653][52705:52705] CHIP:ZCL: OpCreds: AllocatePendingOperationalKey succeeded - [1689679303.601730][52705:52705] CHIP:ZCL: OpCreds: CSRRequest successful. - [1689679303.601738][52705:52705] CHIP:DMG: Command handler moving to [ Preparing] - [1689679303.601743][52705:52705] CHIP:DMG: Command handler moving to [AddingComm] - [1689679303.601753][52705:52705] CHIP:DMG: Command handler moving to [AddedComma] - [1689679303.601762][52705:52705] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1689679303.601845][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581351 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 47827 / Exchange = 36147] - [1689679303.601853][52705:52705] CHIP:DMG: Header Flags = - [1689679303.601856][52705:52705] CHIP:DMG: { - [1689679303.601864][52705:52705] CHIP:DMG: Exchange (0x06) = - [1689679303.601866][52705:52705] CHIP:DMG: { - [1689679303.601870][52705:52705] CHIP:DMG: AckMsg = 135880643 - [1689679303.601874][52705:52705] CHIP:DMG: NeedsAck = true - [1689679303.601877][52705:52705] CHIP:DMG: } - [1689679303.601883][52705:52705] CHIP:DMG: } - [1689679303.601885][52705:52705] CHIP:DMG: - [1689679303.601889][52705:52705] CHIP:DMG: Decrypted Payload (342 bytes) = - [1689679303.601892][52705:52705] CHIP:DMG: { - [1689679303.601895][52705:52705] CHIP:DMG: data = 1528003601153500370024000024013e2402051835013000f2153001ca3081c73070020100300e310c300a060355040a0c034353523059301306072a8648ce3d020106082a8648ce3d03010703420004f294d4aa30dad41668bdb0e24ac0d830b0ba335c8877c5b60af62b985cff212395197314d3025963a4501b4acb8a2202eccc10ed657cff7fae8f9912b393c1cda000300a06082a8648ce3d040302034700304402207d0d5ec6c11550ce1eecd34804f76bc35c227f97452b711af1fa56ae402d1c73022075316e7e662f136e3b1538ebea710286029bcff9057d4858e042456988984a97300220173607ce4fb48e1db8f246f4bf61bc44bd92a69ebaf25139350f73d4db7e9b09183001402ee3db400d018543d99c5561a6f646eae5f8bebb4489740ff6982c7225397932f3737af0fdfbb763a073e4ad112da39ba6361d852bf2562a80b562f810a84a051818181824ff0118 - [1689679303.601900][52705:52705] CHIP:DMG: } - [1689679303.601902][52705:52705] CHIP:DMG: - [1689679303.601927][52705:52705] CHIP:DMG: NOCSR Elements = - [1689679303.601930][52705:52705] CHIP:DMG: { - [1689679303.601937][52705:52705] CHIP:DMG: CSR (202) = 3081C73070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D03010703420004F294D4AA30DAD41668BDB0E24AC0D830B0BA335C8877C5B60AF62B985CFF212395197314D3025963A4501B4ACB8A2202ECCC10ED657CFF7FAE8F9912B393C1CDA000300A06082A8648CE3D040302034700304402207D0D5EC6C11550CE1EECD34804F76BC35C227F97452B711AF1FA56AE402D1C73022075316E7E662F136E3B1538EBEA710286029BCFF9057D4858E042456988984A97 - [1689679303.601943][52705:52705] CHIP:DMG: CSRNonce (32) = 173607CE4FB48E1DB8F246F4BF61BC44BD92A69EBAF25139350F73D4DB7E9B09 - [1689679303.601946][52705:52705] CHIP:DMG: } - [1689679303.601949][52705:52705] CHIP:DMG: - [1689679303.601953][52705:52705] CHIP:DMG: CSR (202) = - [1689679303.601962][52705:52705] CHIP:DMG: { - -----BEGIN CERTIFICATE REQUEST----- - MIHHMHACAQAwDjEMMAoGA1UECgwDQ1NSMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD - QgAE8pTUqjDa1BZovbDiSsDYMLC6M1yId8W2CvYrmFz/ISOVGXMU0wJZY6RQG0rL - iiIC7MwQ7WV8/3+uj5kSs5PBzaAAMAoGCCqGSM49BAMCA0cAMEQCIH0NXsbBFVDO - HuzTSAT3a8NcIn+XRStxGvH6Vq5ALRxzAiB1MW5+Zi8TbjsVOOvqcQKGApvP+QV9 - SFjgQkVpiJhKlw== - -----END CERTIFICATE REQUEST----- - [1689679303.601969][52705:52705] CHIP:DMG: } - [1689679303.601972][52705:52705] CHIP:DMG: - [1689679303.601978][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689679303.601981][52705:52705] CHIP:DMG: { - [1689679303.601983][52705:52705] CHIP:DMG: suppressResponse = false, - [1689679303.601986][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689679303.601990][52705:52705] CHIP:DMG: [ - [1689679303.601993][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689679303.602000][52705:52705] CHIP:DMG: { - [1689679303.602003][52705:52705] CHIP:DMG: CommandDataIB = - [1689679303.602005][52705:52705] CHIP:DMG: { - [1689679303.602008][52705:52705] CHIP:DMG: CommandPathIB = - [1689679303.602010][52705:52705] CHIP:DMG: { - [1689679303.602013][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689679303.602017][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689679303.602020][52705:52705] CHIP:DMG: CommandId = 0x5, - [1689679303.602023][52705:52705] CHIP:DMG: }, - [1689679303.602029][52705:52705] CHIP:DMG: - [1689679303.602031][52705:52705] CHIP:DMG: CommandFields = - [1689679303.602035][52705:52705] CHIP:DMG: { - [1689679303.602041][52705:52705] CHIP:DMG: 0x0 = [ - [1689679303.602061][52705:52705] CHIP:DMG: 0x15, 0x30, 0x01, 0xca, 0x30, 0x81, 0xc7, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xf2, 0x94, 0xd4, 0xaa, 0x30, 0xda, 0xd4, 0x16, 0x68, 0xbd, 0xb0, 0xe2, 0x4a, 0xc0, 0xd8, 0x30, 0xb0, 0xba, 0x33, 0x5c, 0x88, 0x77, 0xc5, 0xb6, 0x0a, 0xf6, 0x2b, 0x98, 0x5c, 0xff, 0x21, 0x23, 0x95, 0x19, 0x73, 0x14, 0xd3, 0x02, 0x59, 0x63, 0xa4, 0x50, 0x1b, 0x4a, 0xcb, 0x8a, 0x22, 0x02, 0xec, 0xcc, 0x10, 0xed, 0x65, 0x7c, 0xff, 0x7f, 0xae, 0x8f, 0x99, 0x12, 0xb3, 0x93, 0xc1, 0xcd, 0xa0, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x7d, 0x0d, 0x5e, 0xc6, 0xc1, 0x15, 0x50, 0xce, 0x1e, 0xec, 0xd3, 0x48, 0x04, 0xf7, 0x6b, 0xc3, 0x5c, 0x22, 0x7f, 0x97, 0x45, 0x2b, 0x71, 0x1a, 0xf1, 0xfa, 0x56, 0xae, 0x40, 0x2d, 0x1c, 0x73, 0x02, 0x20, 0x75, 0x31, 0x6e, 0x7e, 0x66, 0x2f, 0x13, 0x6e, 0x3b, 0x15, 0x38, 0xeb, 0xea, 0x71, 0x02, 0x86, 0x02, 0x9b, 0xcf, 0xf9, 0x05, 0x7d, 0x48, 0x58, 0xe0, 0x42, 0x45, 0x69, 0x88, 0x98, 0x4a, 0x97, 0x30, 0x02, 0x20, 0x17, 0x36, 0x07, 0xce, 0x4f, 0xb4, 0x8e, 0x1d, 0xb8, 0xf2, 0x46, 0xf4, 0xbf, 0x61, 0xbc, 0x44, 0xbd, 0x92, 0xa6, 0x9e, 0xba, 0xf2, 0x51, 0x39, 0x35, 0x0f, 0x73, 0xd4, 0xdb, 0x7e, 0x9b, 0x09, 0x18, - [1689679303.602072][52705:52705] CHIP:DMG: ] (242 bytes) - [1689679303.602075][52705:52705] CHIP:DMG: 0x1 = [ - [1689679303.602083][52705:52705] CHIP:DMG: 0x2e, 0xe3, 0xdb, 0x40, 0x0d, 0x01, 0x85, 0x43, 0xd9, 0x9c, 0x55, 0x61, 0xa6, 0xf6, 0x46, 0xea, 0xe5, 0xf8, 0xbe, 0xbb, 0x44, 0x89, 0x74, 0x0f, 0xf6, 0x98, 0x2c, 0x72, 0x25, 0x39, 0x79, 0x32, 0xf3, 0x73, 0x7a, 0xf0, 0xfd, 0xfb, 0xb7, 0x63, 0xa0, 0x73, 0xe4, 0xad, 0x11, 0x2d, 0xa3, 0x9b, 0xa6, 0x36, 0x1d, 0x85, 0x2b, 0xf2, 0x56, 0x2a, 0x80, 0xb5, 0x62, 0xf8, 0x10, 0xa8, 0x4a, 0x05, - [1689679303.602087][52705:52705] CHIP:DMG: ] (64 bytes) - [1689679303.602090][52705:52705] CHIP:DMG: }, - [1689679303.602095][52705:52705] CHIP:DMG: }, - [1689679303.602100][52705:52705] CHIP:DMG: - [1689679303.602102][52705:52705] CHIP:DMG: }, - [1689679303.602106][52705:52705] CHIP:DMG: - [1689679303.602108][52705:52705] CHIP:DMG: ], - [1689679303.602112][52705:52705] CHIP:DMG: - [1689679303.602114][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689679303.602116][52705:52705] CHIP:DMG: }, - [1689679303.602118][52705:52705] CHIP:DMG: - [1689679303.602124][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.602126][52705:52705] CHIP:DMG: { - [1689679303.602128][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.602131][52705:52705] CHIP:DMG: } - [1689679303.602135][52705:52705] CHIP:DMG: - [1689679303.602146][52705:52705] CHIP:EM: <<< [E:36147r S:3817 M:151581351 (Ack:135880643)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) - [1689679303.602152][52705:52705] CHIP:IN: (S) Sending msg 151581351 on secure session with LSID: 3817 + [1720691676.043] [2537:2537] [EM] Rxd Ack; Removing MessageCounter:113637239 from Retrans Table on exchange 41766r + [1720691676.074] [2537:2537] [DMG] << from UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 74843056 | [Interaction Model (1) / InvokeCommandRequest (0x08) / Session = 27758 / Exchange = 41768] + [1720691676.075] [2537:2537] [DMG] Header Flags = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] Exchange (0x05) = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] Initiator = true + [1720691676.075] [2537:2537] [DMG] NeedsAck = true + [1720691676.075] [2537:2537] [DMG] } + [1720691676.075] [2537:2537] [DMG] } + [1720691676.075] [2537:2537] [DMG] + [1720691676.075] [2537:2537] [DMG] Decrypted Payload (64 bytes) = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] data = 1528002801360215370024000024013e24020418350130002037353c156dff31a01df3e159a0385de766d3fb980705918594edeb19f504124018181824ff0b18 + [1720691676.075] [2537:2537] [DMG] } + [1720691676.075] [2537:2537] [DMG] + [1720691676.075] [2537:2537] [DMG] + [1720691676.075] [2537:2537] [DMG] Additional Fields = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.075] [2537:2537] [DMG] } + [1720691676.075] [2537:2537] [DMG] + [1720691676.075] [2537:2537] [EM] >>> [E:41768r S:27758 M:74843056] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691676.075] [2537:2537] [EM] Handling via exchange: 41768r, Delegate: 0xaaaad99c9368 + [1720691676.075] [2537:2537] [DMG] InvokeRequestMessage = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] suppressResponse = false, + [1720691676.075] [2537:2537] [DMG] timedRequest = false, + [1720691676.075] [2537:2537] [DMG] InvokeRequests = + [1720691676.075] [2537:2537] [DMG] [ + [1720691676.075] [2537:2537] [DMG] CommandDataIB = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] CommandPathIB = + [1720691676.075] [2537:2537] [DMG] { + [1720691676.075] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.076] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.076] [2537:2537] [DMG] CommandId = 0x4, + [1720691676.076] [2537:2537] [DMG] }, + [1720691676.076] [2537:2537] [DMG] + [1720691676.076] [2537:2537] [DMG] CommandFields = + [1720691676.076] [2537:2537] [DMG] { + [1720691676.076] [2537:2537] [DMG] 0x0 = [ + [1720691676.076] [2537:2537] [DMG] 0x37, 0x35, 0x3c, 0x15, 0x6d, 0xff, 0x31, 0xa0, 0x1d, 0xf3, 0xe1, 0x59, 0xa0, 0x38, 0x5d, 0xe7, 0x66, 0xd3, 0xfb, 0x98, 0x07, 0x05, 0x91, 0x85, 0x94, 0xed, 0xeb, 0x19, 0xf5, 0x04, 0x12, 0x40, + [1720691676.076] [2537:2537] [DMG] ] (32 bytes) + [1720691676.076] [2537:2537] [DMG] }, + [1720691676.076] [2537:2537] [DMG] }, + [1720691676.076] [2537:2537] [DMG] + [1720691676.076] [2537:2537] [DMG] ], + [1720691676.076] [2537:2537] [DMG] + [1720691676.076] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.076] [2537:2537] [DMG] }, + [1720691676.076] [2537:2537] [DMG] AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a + [1720691676.076] [2537:2537] [DMG] AccessControl: implicit admin (PASE) + [1720691676.076] [2537:2537] [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0004 + [1720691676.076] [2537:2537] [ZCL] OpCreds: Received a CSRRequest command + [1720691676.076] [2537:2537] [ZCL] OpCreds: Finding fabric with fabricIndex 0x0 + [1720691676.076] [2537:2537] [DMG] >> to UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 113637242 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 38450 / Exchange = 41768] + [1720691676.076] [2537:2537] [DMG] Header Flags = + [1720691676.077] [2537:2537] [DMG] { + [1720691676.077] [2537:2537] [DMG] Exchange (0x02) = + [1720691676.077] [2537:2537] [DMG] { + [1720691676.077] [2537:2537] [DMG] AckMsg = 74843056 + [1720691676.077] [2537:2537] [DMG] } + [1720691676.077] [2537:2537] [DMG] } + [1720691676.077] [2537:2537] [DMG] + [1720691676.077] [2537:2537] [DMG] Additional Fields = + [1720691676.077] [2537:2537] [DMG] { + [1720691676.077] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.077] [2537:2537] [DMG] } disabled: true - label: @@ -479,63 +267,78 @@ tests: verification: | Extract the CSRResponse and NOCSRElements values from TH (all-clusters-app) in commissioning log - [1689679303.601927][52705:52705] CHIP:DMG: NOCSR Elements = - [1689679303.601930][52705:52705] CHIP:DMG: { - [1689679303.601937][52705:52705] CHIP:DMG: CSR (202) = 3081C73070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D03010703420004F294D4AA30DAD41668BDB0E24AC0D830B0BA335C8877C5B60AF62B985CFF212395197314D3025963A4501B4ACB8A2202ECCC10ED657CFF7FAE8F9912B393C1CDA000300A06082A8648CE3D040302034700304402207D0D5EC6C11550CE1EECD34804F76BC35C227F97452B711AF1FA56AE402D1C73022075316E7E662F136E3B1538EBEA710286029BCFF9057D4858E042456988984A97 - [1689679303.601943][52705:52705] CHIP:DMG: CSRNonce (32) = 173607CE4FB48E1DB8F246F4BF61BC44BD92A69EBAF25139350F73D4DB7E9B09 - [1689679303.601946][52705:52705] CHIP:DMG: } - [1689679303.601949][52705:52705] CHIP:DMG: - [1689679303.601953][52705:52705] CHIP:DMG: CSR (202) = - [1689679303.601962][52705:52705] CHIP:DMG: { + [1720691676.079] [2537:2537] [DMG] >> to UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 113637243 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 38450 / Exchange = 41768] + [1720691676.079] [2537:2537] [DMG] Header Flags = + [1720691676.079] [2537:2537] [DMG] { + [1720691676.079] [2537:2537] [DMG] Exchange (0x06) = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] AckMsg = 74843056 + [1720691676.080] [2537:2537] [DMG] NeedsAck = true + [1720691676.080] [2537:2537] [DMG] } + [1720691676.080] [2537:2537] [DMG] } + [1720691676.080] [2537:2537] [DMG] + [1720691676.080] [2537:2537] [DMG] Decrypted Payload (343 bytes) = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] data = 1528003601153500370024000024013e2402051835013000f3153001cb3081c83070020100300e310c300a060355040a0c034353523059301306072a8648ce3d020106082a8648ce3d030107034200044a270345ab219ad87b15d3019b537913f9b4141b65086f20310e9c6beb10e1d1bb6c38408a4e3060e521ec23d003223aaf91be2b0d4aba01d5936f28e4e472b0a000300a06082a8648ce3d0403020348003045022100c74c410513566f3079690fa1d8abe9df58c0fc60cfaf5d704dbdfd2a8db9ac4602206b31521e0840b2b23e2c36f15b6b2ca41c041e0217fd19b5f64f7870b241596d30022037353c156dff31a01df3e159a0385de766d3fb980705918594edeb19f50412401830014028810eea9532046bec7c1bb243bb72991d82cffd686e6eec5bb44e0b477d06df4abe6fd462fabd6d8a85e0e76b16a9f0e1aa9a96e31c3cd61ebf95c3d6aaa0191818181824ff0b18 + [1720691676.080] [2537:2537] [DMG] } + [1720691676.080] [2537:2537] [DMG] + [1720691676.080] [2537:2537] [DMG] NOCSR Elements = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] CSR (203) = 3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200044A270345AB219AD87B15D3019B537913F9B4141B65086F20310E9C6BEB10E1D1BB6C38408A4E3060E521EC23D003223AAF91BE2B0D4ABA01D5936F28E4E472B0A000300A06082A8648CE3D0403020348003045022100C74C410513566F3079690FA1D8ABE9DF58C0FC60CFAF5D704DBDFD2A8DB9AC4602206B31521E0840B2B23E2C36F15B6B2CA41C041E0217FD19B5F64F7870B241596D + [1720691676.080] [2537:2537] [DMG] CSRNonce (32) = 37353C156DFF31A01DF3E159A0385DE766D3FB980705918594EDEB19F5041240 + [1720691676.080] [2537:2537] [DMG] } + [1720691676.080] [2537:2537] [DMG] + [1720691676.080] [2537:2537] [DMG] CSR (203) = + [1720691676.080] [2537:2537] [DMG] { -----BEGIN CERTIFICATE REQUEST----- - MIHHMHACAQAwDjEMMAoGA1UECgwDQ1NSMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD - QgAE8pTUqjDa1BZovbDiSsDYMLC6M1yId8W2CvYrmFz/ISOVGXMU0wJZY6RQG0rL - iiIC7MwQ7WV8/3+uj5kSs5PBzaAAMAoGCCqGSM49BAMCA0cAMEQCIH0NXsbBFVDO - HuzTSAT3a8NcIn+XRStxGvH6Vq5ALRxzAiB1MW5+Zi8TbjsVOOvqcQKGApvP+QV9 - SFjgQkVpiJhKlw== + MIHIMHACAQAwDjEMMAoGA1UECgwDQ1NSMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD + QgAESicDRashmth7FdMBm1N5E/m0FBtlCG8gMQ6ca+sQ4dG7bDhAik4wYOUh7CPQ + AyI6r5G+Kw1KugHVk28o5ORysKAAMAoGCCqGSM49BAMCA0gAMEUCIQDHTEEFE1Zv + MHlpD6HYq+nfWMD8YM+vXXBNvf0qjbmsRgIgazFSHghAsrI+LDbxW2sspBwEHgIX + /Rm19k94cLJBWW0= -----END CERTIFICATE REQUEST----- - [1689679303.601969][52705:52705] CHIP:DMG: } - [1689679303.601972][52705:52705] CHIP:DMG: - [1689679303.601978][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689679303.601981][52705:52705] CHIP:DMG: { - [1689679303.601983][52705:52705] CHIP:DMG: suppressResponse = false, - [1689679303.601986][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689679303.601990][52705:52705] CHIP:DMG: [ - [1689679303.601993][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689679303.602000][52705:52705] CHIP:DMG: { - [1689679303.602003][52705:52705] CHIP:DMG: CommandDataIB = - [1689679303.602005][52705:52705] CHIP:DMG: { - [1689679303.602008][52705:52705] CHIP:DMG: CommandPathIB = - [1689679303.602010][52705:52705] CHIP:DMG: { - [1689679303.602013][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689679303.602017][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689679303.602020][52705:52705] CHIP:DMG: CommandId = 0x5, - [1689679303.602023][52705:52705] CHIP:DMG: }, - [1689679303.602029][52705:52705] CHIP:DMG: - [1689679303.602031][52705:52705] CHIP:DMG: CommandFields = - [1689679303.602035][52705:52705] CHIP:DMG: { - [1689679303.602041][52705:52705] CHIP:DMG: 0x0 = [ - [1689679303.602061][52705:52705] CHIP:DMG: 0x15, 0x30, 0x01, 0xca, 0x30, 0x81, 0xc7, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xf2, 0x94, 0xd4, 0xaa, 0x30, 0xda, 0xd4, 0x16, 0x68, 0xbd, 0xb0, 0xe2, 0x4a, 0xc0, 0xd8, 0x30, 0xb0, 0xba, 0x33, 0x5c, 0x88, 0x77, 0xc5, 0xb6, 0x0a, 0xf6, 0x2b, 0x98, 0x5c, 0xff, 0x21, 0x23, 0x95, 0x19, 0x73, 0x14, 0xd3, 0x02, 0x59, 0x63, 0xa4, 0x50, 0x1b, 0x4a, 0xcb, 0x8a, 0x22, 0x02, 0xec, 0xcc, 0x10, 0xed, 0x65, 0x7c, 0xff, 0x7f, 0xae, 0x8f, 0x99, 0x12, 0xb3, 0x93, 0xc1, 0xcd, 0xa0, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x7d, 0x0d, 0x5e, 0xc6, 0xc1, 0x15, 0x50, 0xce, 0x1e, 0xec, 0xd3, 0x48, 0x04, 0xf7, 0x6b, 0xc3, 0x5c, 0x22, 0x7f, 0x97, 0x45, 0x2b, 0x71, 0x1a, 0xf1, 0xfa, 0x56, 0xae, 0x40, 0x2d, 0x1c, 0x73, 0x02, 0x20, 0x75, 0x31, 0x6e, 0x7e, 0x66, 0x2f, 0x13, 0x6e, 0x3b, 0x15, 0x38, 0xeb, 0xea, 0x71, 0x02, 0x86, 0x02, 0x9b, 0xcf, 0xf9, 0x05, 0x7d, 0x48, 0x58, 0xe0, 0x42, 0x45, 0x69, 0x88, 0x98, 0x4a, 0x97, 0x30, 0x02, 0x20, 0x17, 0x36, 0x07, 0xce, 0x4f, 0xb4, 0x8e, 0x1d, 0xb8, 0xf2, 0x46, 0xf4, 0xbf, 0x61, 0xbc, 0x44, 0xbd, 0x92, 0xa6, 0x9e, 0xba, 0xf2, 0x51, 0x39, 0x35, 0x0f, 0x73, 0xd4, 0xdb, 0x7e, 0x9b, 0x09, 0x18, - [1689679303.602072][52705:52705] CHIP:DMG: ] (242 bytes) - [1689679303.602075][52705:52705] CHIP:DMG: 0x1 = [ - [1689679303.602083][52705:52705] CHIP:DMG: 0x2e, 0xe3, 0xdb, 0x40, 0x0d, 0x01, 0x85, 0x43, 0xd9, 0x9c, 0x55, 0x61, 0xa6, 0xf6, 0x46, 0xea, 0xe5, 0xf8, 0xbe, 0xbb, 0x44, 0x89, 0x74, 0x0f, 0xf6, 0x98, 0x2c, 0x72, 0x25, 0x39, 0x79, 0x32, 0xf3, 0x73, 0x7a, 0xf0, 0xfd, 0xfb, 0xb7, 0x63, 0xa0, 0x73, 0xe4, 0xad, 0x11, 0x2d, 0xa3, 0x9b, 0xa6, 0x36, 0x1d, 0x85, 0x2b, 0xf2, 0x56, 0x2a, 0x80, 0xb5, 0x62, 0xf8, 0x10, 0xa8, 0x4a, 0x05, - [1689679303.602087][52705:52705] CHIP:DMG: ] (64 bytes) - [1689679303.602090][52705:52705] CHIP:DMG: }, - [1689679303.602095][52705:52705] CHIP:DMG: }, - [1689679303.602100][52705:52705] CHIP:DMG: - [1689679303.602102][52705:52705] CHIP:DMG: }, - [1689679303.602106][52705:52705] CHIP:DMG: - [1689679303.602108][52705:52705] CHIP:DMG: ], - [1689679303.602112][52705:52705] CHIP:DMG: - [1689679303.602114][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689679303.602116][52705:52705] CHIP:DMG: }, - [1689679303.602118][52705:52705] CHIP:DMG: - [1689679303.602124][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.602126][52705:52705] CHIP:DMG: { - [1689679303.602128][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.602131][52705:52705] CHIP:DMG: } - [1689679303.602135][52705:52705] CHIP:DMG: - [1689679303.602146][52705:52705] CHIP:EM: <<< [E:36147r S:3817 M:151581351 (Ack:135880643)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) + [1720691676.080] [2537:2537] [DMG] } + [1720691676.080] [2537:2537] [DMG] + [1720691676.080] [2537:2537] [DMG] InvokeResponseMessage = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] suppressResponse = false, + [1720691676.080] [2537:2537] [DMG] InvokeResponseIBs = + [1720691676.080] [2537:2537] [DMG] [ + [1720691676.080] [2537:2537] [DMG] InvokeResponseIB = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] CommandDataIB = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] CommandPathIB = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.080] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.080] [2537:2537] [DMG] CommandId = 0x5, + [1720691676.080] [2537:2537] [DMG] }, + [1720691676.080] [2537:2537] [DMG] + [1720691676.080] [2537:2537] [DMG] CommandFields = + [1720691676.080] [2537:2537] [DMG] { + [1720691676.080] [2537:2537] [DMG] 0x0 = [ + [1720691676.081] [2537:2537] [DMG] 0x15, 0x30, 0x01, 0xcb, 0x30, 0x81, 0xc8, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x4a, 0x27, 0x03, 0x45, 0xab, 0x21, 0x9a, 0xd8, 0x7b, 0x15, 0xd3, 0x01, 0x9b, 0x53, 0x79, 0x13, 0xf9, 0xb4, 0x14, 0x1b, 0x65, 0x08, 0x6f, 0x20, 0x31, 0x0e, 0x9c, 0x6b, 0xeb, 0x10, 0xe1, 0xd1, 0xbb, 0x6c, 0x38, 0x40, 0x8a, 0x4e, 0x30, 0x60, 0xe5, 0x21, 0xec, 0x23, 0xd0, 0x03, 0x22, 0x3a, 0xaf, 0x91, 0xbe, 0x2b, 0x0d, 0x4a, 0xba, 0x01, 0xd5, 0x93, 0x6f, 0x28, 0xe4, 0xe4, 0x72, 0xb0, 0xa0, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xc7, 0x4c, 0x41, 0x05, 0x13, 0x56, 0x6f, 0x30, 0x79, 0x69, 0x0f, 0xa1, 0xd8, 0xab, 0xe9, 0xdf, 0x58, 0xc0, 0xfc, 0x60, 0xcf, 0xaf, 0x5d, 0x70, 0x4d, 0xbd, 0xfd, 0x2a, 0x8d, 0xb9, 0xac, 0x46, 0x02, 0x20, 0x6b, 0x31, 0x52, 0x1e, 0x08, 0x40, 0xb2, 0xb2, 0x3e, 0x2c, 0x36, 0xf1, 0x5b, 0x6b, 0x2c, 0xa4, 0x1c, 0x04, 0x1e, 0x02, 0x17, 0xfd, 0x19, 0xb5, 0xf6, 0x4f, 0x78, 0x70, 0xb2, 0x41, 0x59, 0x6d, 0x30, 0x02, 0x20, 0x37, 0x35, 0x3c, 0x15, 0x6d, 0xff, 0x31, 0xa0, 0x1d, 0xf3, 0xe1, 0x59, 0xa0, 0x38, 0x5d, 0xe7, 0x66, 0xd3, 0xfb, 0x98, 0x07, 0x05, 0x91, 0x85, 0x94, 0xed, 0xeb, 0x19, 0xf5, 0x04, 0x12, 0x40, 0x18, + [1720691676.081] [2537:2537] [DMG] ] (243 bytes) + [1720691676.081] [2537:2537] [DMG] 0x1 = [ + [1720691676.081] [2537:2537] [DMG] 0x28, 0x81, 0x0e, 0xea, 0x95, 0x32, 0x04, 0x6b, 0xec, 0x7c, 0x1b, 0xb2, 0x43, 0xbb, 0x72, 0x99, 0x1d, 0x82, 0xcf, 0xfd, 0x68, 0x6e, 0x6e, 0xec, 0x5b, 0xb4, 0x4e, 0x0b, 0x47, 0x7d, 0x06, 0xdf, 0x4a, 0xbe, 0x6f, 0xd4, 0x62, 0xfa, 0xbd, 0x6d, 0x8a, 0x85, 0xe0, 0xe7, 0x6b, 0x16, 0xa9, 0xf0, 0xe1, 0xaa, 0x9a, 0x96, 0xe3, 0x1c, 0x3c, 0xd6, 0x1e, 0xbf, 0x95, 0xc3, 0xd6, 0xaa, 0xa0, 0x19, + [1720691676.081] [2537:2537] [DMG] ] (64 bytes) + [1720691676.081] [2537:2537] [DMG] }, + [1720691676.081] [2537:2537] [DMG] }, + [1720691676.081] [2537:2537] [DMG] + [1720691676.081] [2537:2537] [DMG] }, + [1720691676.081] [2537:2537] [DMG] + [1720691676.081] [2537:2537] [DMG] ], + [1720691676.081] [2537:2537] [DMG] + [1720691676.081] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.081] [2537:2537] [DMG] }, + [1720691676.081] [2537:2537] [DMG] + [1720691676.081] [2537:2537] [DMG] Additional Fields = + [1720691676.081] [2537:2537] [DMG] { + [1720691676.081] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.081] [2537:2537] [DMG] } + [1720691676.081] [2537:2537] [DMG] + [1720691676.081] [2537:2537] [EM] <<< [E:41768r S:27758 M:113637243 (Ack:74843056)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167] --- Type 0001 disabled: true - label: @@ -545,25 +348,46 @@ tests: verification: | Verify that the TH (all-clusters-app) receives AddTrustedRootCertificate command from DUT in commissioning log - [1689679303.611362][52705:52705] CHIP:ZCL: OpCreds: Received an AddTrustedRootCertificate command - [1689679303.611456][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581352 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 47827 / Exchange = 36148] - [1689679303.611465][52705:52705] CHIP:DMG: Header Flags = - [1689679303.611468][52705:52705] CHIP:DMG: { - [1689679303.611475][52705:52705] CHIP:DMG: Exchange (0x02) = - [1689679303.611478][52705:52705] CHIP:DMG: { - [1689679303.611482][52705:52705] CHIP:DMG: AckMsg = 135880645 - [1689679303.611486][52705:52705] CHIP:DMG: } - [1689679303.611492][52705:52705] CHIP:DMG: } - [1689679303.611496][52705:52705] CHIP:DMG: - [1689679303.611501][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.611504][52705:52705] CHIP:DMG: { - [1689679303.611506][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.611509][52705:52705] CHIP:DMG: } - [1689679303.611512][52705:52705] CHIP:DMG: - [1689679303.611528][52705:52705] CHIP:EM: <<< [E:36148r S:3817 M:151581352 (Ack:135880645)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689679303.611536][52705:52705] CHIP:IN: (S) Sending msg 151581352 on secure session with LSID: 3817 - [1689679303.611568][52705:52705] CHIP:EM: Flushed pending ack for MessageCounter:135880645 on exchange 36148r - [1689679303.611820][52705:52705] CHIP:ZCL: OpCreds: AddTrustedRootCertificate successful. + [1720691676.098] [2537:2537] [DMG] Additional Fields = + [1720691676.098] [2537:2537] [DMG] { + [1720691676.098] [2537:2537] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 + [1720691676.098] [2537:2537] [DMG] } + [1720691676.098] [2537:2537] [DMG] + [1720691676.098] [2537:2537] [EM] >>> [E:41769r S:27758 M:74843058] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691676.098] [2537:2537] [EM] Handling via exchange: 41769r, Delegate: 0xaaaad99c9368 + [1720691676.098] [2537:2537] [DMG] InvokeRequestMessage = + [1720691676.098] [2537:2537] [DMG] { + [1720691676.098] [2537:2537] [DMG] suppressResponse = false, + [1720691676.098] [2537:2537] [DMG] timedRequest = false, + [1720691676.098] [2537:2537] [DMG] InvokeRequests = + [1720691676.098] [2537:2537] [DMG] [ + [1720691676.098] [2537:2537] [DMG] CommandDataIB = + [1720691676.098] [2537:2537] [DMG] { + [1720691676.099] [2537:2537] [DMG] CommandPathIB = + [1720691676.099] [2537:2537] [DMG] { + [1720691676.099] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.099] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.099] [2537:2537] [DMG] CommandId = 0xb, + [1720691676.099] [2537:2537] [DMG] }, + [1720691676.099] [2537:2537] [DMG] + [1720691676.099] [2537:2537] [DMG] CommandFields = + [1720691676.099] [2537:2537] [DMG] { + [1720691676.099] [2537:2537] [DMG] 0x0 = [ + [1720691676.099] [2537:2537] [DMG] 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x14, 0x01, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x14, 0x01, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x2b, 0xa1, 0xae, 0xdb, 0x8f, 0xcf, 0xbd, 0xfe, 0xb1, 0xeb, 0xd4, 0xb7, 0xe1, 0x77, 0xba, 0x69, 0x59, 0xaa, 0xc4, 0x26, 0xe4, 0x90, 0xe9, 0x40, 0xbb, 0xc0, 0x69, 0xab, 0x3e, 0xcb, 0x5f, 0x11, 0x97, 0xe4, 0x67, 0x75, 0x5d, 0x4a, 0x82, 0x8f, 0xc2, 0x50, 0x82, 0x34, 0xea, 0xbf, 0xc0, 0x46, 0x7f, 0x2d, 0x60, 0x22, 0x4d, 0x33, 0xa2, 0xde, 0x3f, 0xa3, 0x30, 0xba, 0x1f, 0x6c, 0xdf, 0x23, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x24, 0x54, 0xc7, 0x22, 0x5b, 0x7e, 0x25, 0x9a, 0x9f, 0xee, 0x54, 0x91, 0x23, 0x43, 0x28, 0xfd, 0x15, 0x49, 0x0e, 0xa8, 0x30, 0x05, 0x14, 0x24, 0x54, 0xc7, 0x22, 0x5b, 0x7e, 0x25, 0x9a, 0x9f, 0xee, 0x54, 0x91, 0x23, 0x43, 0x28, 0xfd, 0x15, 0x49, 0x0e, 0xa8, 0x18, 0x30, 0x0b, 0x40, 0xcc, 0x32, 0x98, 0xc2, 0x30, 0xe6, 0x45, 0xf2, 0x1f, 0x51, 0x6c, 0xe1, 0xf5, 0xc0, 0x3e, 0xb1, 0x59, 0xd1, 0xf9, 0x5e, 0x64, 0x6f, 0xfd, 0x1f, 0xf8, 0x6d, 0x09, 0x7f, 0x7f, 0xc9, 0x48, 0xe8, 0xde, 0x72, 0x88, 0xd6, 0x6e, 0xe1, 0x74, 0x33, 0x76, 0xc4, 0x64, 0xfc, 0xb6, 0xbc, 0xd7, 0x73, 0xe1, 0xc4, 0x2f, 0x3a, 0xa6, 0xa5, 0xc3, 0x13, 0xbb, 0xdf, 0xfc, 0xe7, 0x92, 0xc6, 0x45, 0x0f, 0x18, + [1720691676.099] [2537:2537] [DMG] ] (231 bytes) + [1720691676.099] [2537:2537] [DMG] }, + [1720691676.099] [2537:2537] [DMG] }, + [1720691676.099] [2537:2537] [DMG] + [1720691676.099] [2537:2537] [DMG] ], + [1720691676.099] [2537:2537] [DMG] + [1720691676.099] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.099] [2537:2537] [DMG] }, + [1720691676.099] [2537:2537] [DMG] AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a + [1720691676.099] [2537:2537] [DMG] AccessControl: implicit admin (PASE) + [1720691676.099] [2537:2537] [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_000B + [1720691676.099] [2537:2537] [ZCL] OpCreds: Received an AddTrustedRootCertificate command + [1720691676.100] [2537:2537] [DMG] >> to UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 113637244 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 38450 / Exchange = 41769] + [1720691676.100] [2537:2537] [DMG] Header Flags = disabled: true - label: "Step 7a: Verify that TH receives AddNOC Command from DUT" @@ -571,26 +395,49 @@ tests: verification: | Verify that the TH (all-clusters-app) receives AddNOC command from DUT in commissioning log - [1689679303.613590][52705:52705] CHIP:ZCL: OpCreds: Received an AddNOC command - [1689679303.613687][52705:52705] CHIP:DMG: >> to UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 | 151581354 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 47827 / Exchange = 36149] - [1689679303.613696][52705:52705] CHIP:DMG: Header Flags = - [1689679303.613699][52705:52705] CHIP:DMG: { - [1689679303.613707][52705:52705] CHIP:DMG: Exchange (0x02) = - [1689679303.613710][52705:52705] CHIP:DMG: { - [1689679303.613714][52705:52705] CHIP:DMG: AckMsg = 135880647 - [1689679303.613717][52705:52705] CHIP:DMG: } - [1689679303.613723][52705:52705] CHIP:DMG: } - [1689679303.613726][52705:52705] CHIP:DMG: - [1689679303.613733][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.613737][52705:52705] CHIP:DMG: { - [1689679303.613741][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.613744][52705:52705] CHIP:DMG: } - [1689679303.613747][52705:52705] CHIP:DMG: - [1689679303.613760][52705:52705] CHIP:EM: <<< [E:36149r S:3817 M:151581354 (Ack:135880647)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689679303.613767][52705:52705] CHIP:IN: (S) Sending msg 151581354 on secure session with LSID: 3817 - [1689679303.613791][52705:52705] CHIP:EM: Flushed pending ack for MessageCounter:135880647 on exchange 36149r - [1689679303.613883][52705:52705] CHIP:FP: Validating NOC chain - [1689679303.614555][52705:52705] CHIP:FP: NOC chain validation successful + [1720691676.111] [2537:2537] [EM] >>> [E:41770r S:27758 M:74843060] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691676.111] [2537:2537] [EM] Handling via exchange: 41770r, Delegate: 0xaaaad99c9368 + [1720691676.111] [2537:2537] [DMG] InvokeRequestMessage = + [1720691676.111] [2537:2537] [DMG] { + [1720691676.111] [2537:2537] [DMG] suppressResponse = false, + [1720691676.111] [2537:2537] [DMG] timedRequest = false, + [1720691676.111] [2537:2537] [DMG] InvokeRequests = + [1720691676.111] [2537:2537] [DMG] [ + [1720691676.111] [2537:2537] [DMG] CommandDataIB = + [1720691676.111] [2537:2537] [DMG] { + [1720691676.111] [2537:2537] [DMG] CommandPathIB = + [1720691676.111] [2537:2537] [DMG] { + [1720691676.111] [2537:2537] [DMG] EndpointId = 0x0, + [1720691676.111] [2537:2537] [DMG] ClusterId = 0x3e, + [1720691676.111] [2537:2537] [DMG] CommandId = 0x6, + [1720691676.111] [2537:2537] [DMG] }, + [1720691676.111] [2537:2537] [DMG] + [1720691676.111] [2537:2537] [DMG] CommandFields = + [1720691676.111] [2537:2537] [DMG] { + [1720691676.111] [2537:2537] [DMG] 0x0 = [ + [1720691676.111] [2537:2537] [DMG] 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x13, 0x02, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x15, 0x01, 0x24, 0x11, 0x01, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x4a, 0x27, 0x03, 0x45, 0xab, 0x21, 0x9a, 0xd8, 0x7b, 0x15, 0xd3, 0x01, 0x9b, 0x53, 0x79, 0x13, 0xf9, 0xb4, 0x14, 0x1b, 0x65, 0x08, 0x6f, 0x20, 0x31, 0x0e, 0x9c, 0x6b, 0xeb, 0x10, 0xe1, 0xd1, 0xbb, 0x6c, 0x38, 0x40, 0x8a, 0x4e, 0x30, 0x60, 0xe5, 0x21, 0xec, 0x23, 0xd0, 0x03, 0x22, 0x3a, 0xaf, 0x91, 0xbe, 0x2b, 0x0d, 0x4a, 0xba, 0x01, 0xd5, 0x93, 0x6f, 0x28, 0xe4, 0xe4, 0x72, 0xb0, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xc5, 0x8c, 0xaa, 0x91, 0x3e, 0x06, 0x86, 0xb4, 0x91, 0xd2, 0x34, 0x99, 0xeb, 0xe3, 0x8b, 0x10, 0x7f, 0xa1, 0x7d, 0x86, 0x30, 0x05, 0x14, 0x09, 0x03, 0x79, 0xf4, 0x13, 0xa2, 0xde, 0xe5, 0x49, 0x95, 0x8f, 0xd8, 0x79, 0x95, 0xea, 0xf9, 0xcf, 0xc6, 0x34, 0x24, 0x18, 0x30, 0x0b, 0x40, 0x17, 0x0c, 0x5f, 0x4f, 0xdb, 0x33, 0x79, 0x62, 0xd8, 0x53, 0x13, 0x84, 0x2e, 0xc8, 0xd6, 0x44, 0x62, 0x5a, 0x88, 0x16, 0x7d, 0xa9, 0xc8, 0xcb, 0x69, 0x58, 0xaa, 0x6d, 0x24, 0x37, 0x6e, 0xdf, 0x78, 0x73, 0x7f, 0x55, 0x41, 0xac, 0xe9, 0xff, 0x01, 0xe9, 0xcb, 0x94, 0xd4, 0xcf, 0x1f, 0x9a, 0x70, 0xc9, 0x42, 0xe6, 0xa9, 0x0a, 0x1a, 0xcb, 0x29, 0xb5, 0xf0, 0xab, 0x86, 0x19, 0xcf, 0xac, 0x18, + [1720691676.112] [2537:2537] [DMG] ] (241 bytes) + [1720691676.112] [2537:2537] [DMG] 0x1 = [ + [1720691676.112] [2537:2537] [DMG] 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x14, 0x01, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x13, 0x02, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x2a, 0xb1, 0xeb, 0xcb, 0xcc, 0x54, 0x41, 0xd4, 0xd9, 0xc6, 0x4e, 0x96, 0xe7, 0xa2, 0x2f, 0xd6, 0xd9, 0xa9, 0xdb, 0xd5, 0xdd, 0xb0, 0x41, 0xd5, 0x88, 0xc6, 0xd9, 0x2a, 0xd3, 0xe0, 0xbb, 0x20, 0x50, 0x77, 0x09, 0x9d, 0x77, 0x49, 0x5c, 0xa9, 0x6e, 0xae, 0x12, 0x61, 0x3f, 0x4a, 0x36, 0x74, 0x07, 0xfb, 0x71, 0xc9, 0x5f, 0x14, 0x10, 0x96, 0x53, 0xa1, 0xa1, 0x07, 0x67, 0x24, 0x9b, 0xfc, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x09, 0x03, 0x79, 0xf4, 0x13, 0xa2, 0xde, 0xe5, 0x49, 0x95, 0x8f, 0xd8, 0x79, 0x95, 0xea, 0xf9, 0xcf, 0xc6, 0x34, 0x24, 0x30, 0x05, 0x14, 0x24, 0x54, 0xc7, 0x22, 0x5b, 0x7e, 0x25, 0x9a, 0x9f, 0xee, 0x54, 0x91, 0x23, 0x43, 0x28, 0xfd, 0x15, 0x49, 0x0e, 0xa8, 0x18, 0x30, 0x0b, 0x40, 0xde, 0xc8, 0x17, 0xaa, 0x07, 0xa8, 0x60, 0xdc, 0xfb, 0x62, 0xc2, 0xf4, 0x70, 0x05, 0x4d, 0xc0, 0xa5, 0x1a, 0xf3, 0xd0, 0xe6, 0x7e, 0xa4, 0x5d, 0x1e, 0x24, 0x83, 0x5c, 0xb6, 0x89, 0x5d, 0x77, 0x68, 0xef, 0x6e, 0xdf, 0xf8, 0xfb, 0x70, 0xa3, 0x84, 0xf1, 0x3d, 0xa5, 0x81, 0xb6, 0x83, 0x1b, 0x7c, 0x7f, 0x4f, 0x5d, 0x77, 0xfe, 0xc7, 0xd5, 0x29, 0x8a, 0xf0, 0x5b, 0xd6, 0x32, 0xf7, 0x76, 0x18, + [1720691676.112] [2537:2537] [DMG] ] (231 bytes) + [1720691676.112] [2537:2537] [DMG] 0x2 = [ + [1720691676.112] [2537:2537] [DMG] 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x70, 0x6b, 0x20, 0x30, 0x31, + [1720691676.112] [2537:2537] [DMG] ] (16 bytes) + [1720691676.112] [2537:2537] [DMG] 0x3 = 112233 (unsigned), + [1720691676.112] [2537:2537] [DMG] 0x4 = 65521 (unsigned), + [1720691676.112] [2537:2537] [DMG] }, + [1720691676.112] [2537:2537] [DMG] }, + [1720691676.112] [2537:2537] [DMG] + [1720691676.112] [2537:2537] [DMG] ], + [1720691676.112] [2537:2537] [DMG] + [1720691676.112] [2537:2537] [DMG] InteractionModelRevision = 11 + [1720691676.112] [2537:2537] [DMG] }, + [1720691676.112] [2537:2537] [DMG] AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a + [1720691676.112] [2537:2537] [DMG] AccessControl: implicit admin (PASE) + [1720691676.112] [2537:2537] [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0006 + [1720691676.112] [2537:2537] [ZCL] OpCreds: Received an AddNOC command + [1720691676.113] [2537:2537] [DMG] >> to UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:36167 | 113637246 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 38450 / Exchange = 41770] + [1720691676.113] [2537:2537] [DMG] Header Flags = disabled: true - label: @@ -620,7 +467,7 @@ tests: Example: 0x2 = [ - [1689679303.613506][52705:52705] CHIP:DMG: 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x70, 0x6b, 0x20, 0x30, 0x31, + [1689679303.613506][52705:52705] CHIP:DMG: 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x70, 0x6b, 0x20, 0x30, 0x31, 4. CaseAdminSubject as caseadmin1 Example: @@ -646,43 +493,49 @@ tests: 4. NodeID 5. Label - [1689681605.068131][52705:52705] CHIP:DMG: ReportDataMessage = - [1689681605.068135][52705:52705] CHIP:DMG: { - [1689681605.068138][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689681605.068146][52705:52705] CHIP:DMG: [ - [1689681605.068149][52705:52705] CHIP:DMG: AttributeReportIB = - [1689681605.068156][52705:52705] CHIP:DMG: { - [1689681605.068160][52705:52705] CHIP:DMG: AttributeDataIB = - [1689681605.068164][52705:52705] CHIP:DMG: { - [1689681605.068169][52705:52705] CHIP:DMG: DataVersion = 0x65bf1426, - [1689681605.068174][52705:52705] CHIP:DMG: AttributePathIB = - [1689681605.068178][52705:52705] CHIP:DMG: { - [1689681605.068183][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689681605.068188][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689681605.068193][52705:52705] CHIP:DMG: Attribute = 0x0000_0001, - [1689681605.068198][52705:52705] CHIP:DMG: } - [1689681605.068202][52705:52705] CHIP:DMG: - [1689681605.068207][52705:52705] CHIP:DMG: Data = [ - [1689681605.068211][52705:52705] CHIP:DMG: - [1689681605.068216][52705:52705] CHIP:DMG: { - [1689681605.068220][52705:52705] CHIP:DMG: 0x1 = [ - [1689681605.068229][52705:52705] CHIP:DMG: 0x04, 0x8e, 0x70, 0xf4, 0x2e, 0xcb, 0xad, 0x8a, 0xc7, 0x98, 0x04, 0xa7, 0x5e, 0x1e, 0xe8, 0x33, 0xc8, 0x33, 0xb0, 0x76, 0xd9, 0x02, 0x93, 0x0a, 0x79, 0xff, 0xc3, 0xcd, 0x26, 0x78, 0xa9, 0xf6, 0xe8, 0xfe, 0xe8, 0x8b, 0x72, 0x3e, 0x31, 0x4e, 0x8e, 0xd7, 0x63, 0x7d, 0x9e, 0x90, 0x73, 0x20, 0x71, 0x1b, 0xbf, 0xfd, 0x1c, 0xc0, 0x8c, 0x4d, 0x6f, 0xb8, 0x75, 0x5f, 0xcb, 0x41, 0xef, 0x96, 0xb9, - [1689681605.068235][52705:52705] CHIP:DMG: ] (65 bytes) - [1689681605.068239][52705:52705] CHIP:DMG: 0x2 = 65521, - [1689681605.068244][52705:52705] CHIP:DMG: 0x3 = 1, - [1689681605.068248][52705:52705] CHIP:DMG: 0x4 = 1, - [1689681605.068253][52705:52705] CHIP:DMG: 0x5 = "" (0 chars), - [1689681605.068257][52705:52705] CHIP:DMG: 0xfe = 1, - [1689681605.068263][52705:52705] CHIP:DMG: }, - [1689681605.068266][52705:52705] CHIP:DMG: ], - [1689681605.068270][52705:52705] CHIP:DMG: }, - [1689681605.068276][52705:52705] CHIP:DMG: - [1689681605.068279][52705:52705] CHIP:DMG: }, - [1689681605.068284][52705:52705] CHIP:DMG: - [1689681605.068287][52705:52705] CHIP:DMG: ], - [1689681605.068292][52705:52705] CHIP:DMG: - [1689681605.068295][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689681605.068297][52705:52705] CHIP:DMG: InteractionModelRevision = 1 + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] ReportDataMessage = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] AttributeReportIBs = + [1720690525.192] [2401:2401] [DMG] [ + [1720690525.192] [2401:2401] [DMG] AttributeReportIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] AttributeDataIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] DataVersion = 0x3aff7739, + [1720690525.192] [2401:2401] [DMG] AttributePathIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] Endpoint = 0x0, + [1720690525.192] [2401:2401] [DMG] Cluster = 0x3e, + [1720690525.192] [2401:2401] [DMG] Attribute = 0x0000_0001, + [1720690525.192] [2401:2401] [DMG] } + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] Data = [ + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] 0x1 = [ + [1720690525.193] [2401:2401] [DMG] 0x04, 0x6b, 0xc8, 0xe7, 0x50, 0x37, 0x5e, 0xb5, 0xc9, 0xc8, 0xf3, 0x0a, 0x8b, 0x1e, 0xcc, 0xc9, 0x97, 0xfe, 0x26, 0xec, 0xb6, 0x23, 0xa6, 0x04, 0xf0, 0xaa, 0x78, 0xd2, 0xc4, 0x40, 0x73, 0xc9, 0x3b, 0x21, 0xbd, 0xd9, 0x28, 0xb6, 0x09, 0x0b, 0xa9, 0x60, 0xa3, 0x7d, 0xe5, 0xa0, 0x63, 0x44, 0x2f, 0x37, 0xf3, 0x80, 0x1c, 0xea, 0xaf, 0x48, 0xb4, 0x87, 0x08, 0xf8, 0xee, 0x1f, 0x0f, 0xab, 0xab, + [1720690525.193] [2401:2401] [DMG] ] (65 bytes) + [1720690525.193] [2401:2401] [DMG] 0x2 = 65521 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x3 = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x4 = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x5 = "" (0 chars), + [1720690525.193] [2401:2401] [DMG] 0xfe = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] ], + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] ], + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] SuppressResponse = true, + [1720690525.193] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690525.193] [2401:2401] [DMG] } + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] Additional Fields = + [1720690525.193] [2401:2401] [DMG] { + [1720690525.193] [2401:2401] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:45224 disabled: true - label: @@ -702,43 +555,49 @@ tests: 4. Verify the FabricID (0x4) is same as matter-fabric-id 5. Verify the size of Label is maximum of 32 bytes - [1689681605.068131][52705:52705] CHIP:DMG: ReportDataMessage = - [1689681605.068135][52705:52705] CHIP:DMG: { - [1689681605.068138][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689681605.068146][52705:52705] CHIP:DMG: [ - [1689681605.068149][52705:52705] CHIP:DMG: AttributeReportIB = - [1689681605.068156][52705:52705] CHIP:DMG: { - [1689681605.068160][52705:52705] CHIP:DMG: AttributeDataIB = - [1689681605.068164][52705:52705] CHIP:DMG: { - [1689681605.068169][52705:52705] CHIP:DMG: DataVersion = 0x65bf1426, - [1689681605.068174][52705:52705] CHIP:DMG: AttributePathIB = - [1689681605.068178][52705:52705] CHIP:DMG: { - [1689681605.068183][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689681605.068188][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689681605.068193][52705:52705] CHIP:DMG: Attribute = 0x0000_0001, - [1689681605.068198][52705:52705] CHIP:DMG: } - [1689681605.068202][52705:52705] CHIP:DMG: - [1689681605.068207][52705:52705] CHIP:DMG: Data = [ - [1689681605.068211][52705:52705] CHIP:DMG: - [1689681605.068216][52705:52705] CHIP:DMG: { - [1689681605.068220][52705:52705] CHIP:DMG: 0x1 = [ - [1689681605.068229][52705:52705] CHIP:DMG: 0x04, 0x8e, 0x70, 0xf4, 0x2e, 0xcb, 0xad, 0x8a, 0xc7, 0x98, 0x04, 0xa7, 0x5e, 0x1e, 0xe8, 0x33, 0xc8, 0x33, 0xb0, 0x76, 0xd9, 0x02, 0x93, 0x0a, 0x79, 0xff, 0xc3, 0xcd, 0x26, 0x78, 0xa9, 0xf6, 0xe8, 0xfe, 0xe8, 0x8b, 0x72, 0x3e, 0x31, 0x4e, 0x8e, 0xd7, 0x63, 0x7d, 0x9e, 0x90, 0x73, 0x20, 0x71, 0x1b, 0xbf, 0xfd, 0x1c, 0xc0, 0x8c, 0x4d, 0x6f, 0xb8, 0x75, 0x5f, 0xcb, 0x41, 0xef, 0x96, 0xb9, - [1689681605.068235][52705:52705] CHIP:DMG: ] (65 bytes) - [1689681605.068239][52705:52705] CHIP:DMG: 0x2 = 65521, - [1689681605.068244][52705:52705] CHIP:DMG: 0x3 = 1, - [1689681605.068248][52705:52705] CHIP:DMG: 0x4 = 1, - [1689681605.068253][52705:52705] CHIP:DMG: 0x5 = "" (0 chars), - [1689681605.068257][52705:52705] CHIP:DMG: 0xfe = 1, - [1689681605.068263][52705:52705] CHIP:DMG: }, - [1689681605.068266][52705:52705] CHIP:DMG: ], - [1689681605.068270][52705:52705] CHIP:DMG: }, - [1689681605.068276][52705:52705] CHIP:DMG: - [1689681605.068279][52705:52705] CHIP:DMG: }, - [1689681605.068284][52705:52705] CHIP:DMG: - [1689681605.068287][52705:52705] CHIP:DMG: ], - [1689681605.068292][52705:52705] CHIP:DMG: - [1689681605.068295][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689681605.068297][52705:52705] CHIP:DMG: InteractionModelRevision = 1 + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] ReportDataMessage = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] AttributeReportIBs = + [1720690525.192] [2401:2401] [DMG] [ + [1720690525.192] [2401:2401] [DMG] AttributeReportIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] AttributeDataIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] DataVersion = 0x3aff7739, + [1720690525.192] [2401:2401] [DMG] AttributePathIB = + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] Endpoint = 0x0, + [1720690525.192] [2401:2401] [DMG] Cluster = 0x3e, + [1720690525.192] [2401:2401] [DMG] Attribute = 0x0000_0001, + [1720690525.192] [2401:2401] [DMG] } + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] Data = [ + [1720690525.192] [2401:2401] [DMG] + [1720690525.192] [2401:2401] [DMG] { + [1720690525.192] [2401:2401] [DMG] 0x1 = [ + [1720690525.193] [2401:2401] [DMG] 0x04, 0x6b, 0xc8, 0xe7, 0x50, 0x37, 0x5e, 0xb5, 0xc9, 0xc8, 0xf3, 0x0a, 0x8b, 0x1e, 0xcc, 0xc9, 0x97, 0xfe, 0x26, 0xec, 0xb6, 0x23, 0xa6, 0x04, 0xf0, 0xaa, 0x78, 0xd2, 0xc4, 0x40, 0x73, 0xc9, 0x3b, 0x21, 0xbd, 0xd9, 0x28, 0xb6, 0x09, 0x0b, 0xa9, 0x60, 0xa3, 0x7d, 0xe5, 0xa0, 0x63, 0x44, 0x2f, 0x37, 0xf3, 0x80, 0x1c, 0xea, 0xaf, 0x48, 0xb4, 0x87, 0x08, 0xf8, 0xee, 0x1f, 0x0f, 0xab, 0xab, + [1720690525.193] [2401:2401] [DMG] ] (65 bytes) + [1720690525.193] [2401:2401] [DMG] 0x2 = 65521 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x3 = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x4 = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] 0x5 = "" (0 chars), + [1720690525.193] [2401:2401] [DMG] 0xfe = 1 (unsigned), + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] ], + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] }, + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] ], + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] SuppressResponse = true, + [1720690525.193] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690525.193] [2401:2401] [DMG] } + [1720690525.193] [2401:2401] [DMG] + [1720690525.193] [2401:2401] [DMG] Additional Fields = + [1720690525.193] [2401:2401] [DMG] { + [1720690525.193] [2401:2401] [DMG] peer_address = UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:45224 disabled: true - label: @@ -753,66 +612,32 @@ tests: verification: | During commissioning, Verify that UpdateNOC Command is received in TH (all-clusters-app) - [1689679303.613181][52705:52705] CHIP:DMG: { - [1689679303.613184][52705:52705] CHIP:DMG: data = 1528002801360215370024000024013e2402061835013000f11530010101240201370324130218260480228127260580254d3a37062415012411011824070124080130094104f294d4aa30dad41668bdb0e24ac0d830b0ba335c8877c5b60af62b985cff212395197314d3025963a4501b4acb8a2202eccc10ed657cff7fae8f9912b393c1cd370a350128011824020136030402040118300414b34d04681e4b091989a9a5f2bde11fdc5ecea94d300514c518cd9b17c67c4a0501f29e842d578a63d4c2be18300b4059ae97324240ad84e1aaf93ba0b0ec8e938b1408e8e4250ce53012dead0a7e9fc41c422b190ff18820d8440ba630e67c4ec9ddac66b10d723cbb5d050cb5256c183001e71530010101240201370324140118260480228127260580254d3a3706241302182407012408013009410450083b6a78969912e9b7ec753c00665af4231ee13e4362205dbc18f060654363fae48e0c5bd559809e2e083f54ba8a1ff6ab5ef1f8e07b55bde1be3de763efac370a3501290118240260300414c518cd9b17c67c4a0501f29e842d578a63d4c2be300514cf9b3f36437a3e7c8c8aeee80385260a4f4a6bf318300b408ab09e46ec4ab5e3c38af468366f0ce54517d33b7f23997dc6636271c31a5fde55f2de5f68613b6acc55ae0ea137b4f7e2b94e5e1a599eff5fa3b73a66dfdbd01830021074656d706f726172792069706b203031260369b601002504f1ff18181824ff0118 - [1689679303.613193][52705:52705] CHIP:DMG: } - [1689679303.613195][52705:52705] CHIP:DMG: - [1689679303.613238][52705:52705] CHIP:DMG: NOCValue (241) = - [1689679303.613248][52705:52705] CHIP:DMG: { - FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVASQRARgkBwEkCAEwCUEE8pTUqjDa1BZovbDiSsDYMLC6M1yId8W2CvYrmFz/ISOVGXMU0wJZY6RQG0rLiiIC7MwQ7WV8/3+uj5kSs5PBzTcKNQEoARgkAgE2AwQCBAEYMAQUs00EaB5LCRmJqaXyveEf3F7OqU0wBRTFGM2bF8Z8SgUB8p6ELVeKY9TCvhgwC0BZrpcyQkCthOGq+TugsOyOk4sUCOjkJQzlMBLerQp+n8QcQisZD/GIINhEC6Yw5nxOyd2sZrENcjy7XQUMtSVsGA== - [1689679303.613255][52705:52705] CHIP:DMG: } - [1689679303.613257][52705:52705] CHIP:DMG: - [1689679303.613261][52705:52705] CHIP:DMG: ICACValue (231) = - [1689679303.613269][52705:52705] CHIP:DMG: { - FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEUAg7aniWmRLpt+x1PABmWvQjHuE+Q2IgXbwY8GBlQ2P65I4MW9VZgJ4uCD9Uuoof9qte8fjge1W94b4952PvrDcKNQEpARgkAmAwBBTFGM2bF8Z8SgUB8p6ELVeKY9TCvjAFFM+bPzZDej58jIru6AOFJgpPSmvzGDALQIqwnkbsSrXjw4r0aDZvDOVFF9M7fyOZfcZjYnHDGl/eVfLeX2hhO2rMVa4OoTe09+K5Tl4aWZ7/X6O3Ombf29AY - [1689679303.613277][52705:52705] CHIP:DMG: } - [1689679303.613280][52705:52705] CHIP:DMG: - [1689679303.613285][52705:52705] CHIP:DMG: - [1689679303.613293][52705:52705] CHIP:DMG: Additional Fields = - [1689679303.613295][52705:52705] CHIP:DMG: { - [1689679303.613299][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:33479 - [1689679303.613302][52705:52705] CHIP:DMG: } - [1689679303.613305][52705:52705] CHIP:DMG: - [1689679303.613312][52705:52705] CHIP:EM: >>> [E:36149r S:3817 M:135880647] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) - [1689679303.613320][52705:52705] CHIP:EM: Handling via exchange: 36149r, Delegate: 0x55d103190208 - [1689679303.613338][52705:52705] CHIP:DMG: InvokeRequestMessage = - [1689679303.613342][52705:52705] CHIP:DMG: { - [1689679303.613345][52705:52705] CHIP:DMG: suppressResponse = false, - [1689679303.613349][52705:52705] CHIP:DMG: timedRequest = false, - [1689679303.613352][52705:52705] CHIP:DMG: InvokeRequests = - [1689679303.613359][52705:52705] CHIP:DMG: [ - [1689679303.613363][52705:52705] CHIP:DMG: CommandDataIB = - [1689679303.613367][52705:52705] CHIP:DMG: { - [1689679303.613370][52705:52705] CHIP:DMG: CommandPathIB = - [1689679303.613374][52705:52705] CHIP:DMG: { - [1689679303.613377][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689679303.613381][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689679303.613385][52705:52705] CHIP:DMG: CommandId = 0x6, - [1689679303.613388][52705:52705] CHIP:DMG: }, - [1689679303.613393][52705:52705] CHIP:DMG: - [1689679303.613396][52705:52705] CHIP:DMG: CommandFields = - [1689679303.613400][52705:52705] CHIP:DMG: { - [1689679303.613404][52705:52705] CHIP:DMG: 0x0 = [ - [1689679303.613437][52705:52705] CHIP:DMG: 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x13, 0x02, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x15, 0x01, 0x24, 0x11, 0x01, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xf2, 0x94, 0xd4, 0xaa, 0x30, 0xda, 0xd4, 0x16, 0x68, 0xbd, 0xb0, 0xe2, 0x4a, 0xc0, 0xd8, 0x30, 0xb0, 0xba, 0x33, 0x5c, 0x88, 0x77, 0xc5, 0xb6, 0x0a, 0xf6, 0x2b, 0x98, 0x5c, 0xff, 0x21, 0x23, 0x95, 0x19, 0x73, 0x14, 0xd3, 0x02, 0x59, 0x63, 0xa4, 0x50, 0x1b, 0x4a, 0xcb, 0x8a, 0x22, 0x02, 0xec, 0xcc, 0x10, 0xed, 0x65, 0x7c, 0xff, 0x7f, 0xae, 0x8f, 0x99, 0x12, 0xb3, 0x93, 0xc1, 0xcd, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xb3, 0x4d, 0x04, 0x68, 0x1e, 0x4b, 0x09, 0x19, 0x89, 0xa9, 0xa5, 0xf2, 0xbd, 0xe1, 0x1f, 0xdc, 0x5e, 0xce, 0xa9, 0x4d, 0x30, 0x05, 0x14, 0xc5, 0x18, 0xcd, 0x9b, 0x17, 0xc6, 0x7c, 0x4a, 0x05, 0x01, 0xf2, 0x9e, 0x84, 0x2d, 0x57, 0x8a, 0x63, 0xd4, 0xc2, 0xbe, 0x18, 0x30, 0x0b, 0x40, 0x59, 0xae, 0x97, 0x32, 0x42, 0x40, 0xad, 0x84, 0xe1, 0xaa, 0xf9, 0x3b, 0xa0, 0xb0, 0xec, 0x8e, 0x93, 0x8b, 0x14, 0x08, 0xe8, 0xe4, 0x25, 0x0c, 0xe5, 0x30, 0x12, 0xde, 0xad, 0x0a, 0x7e, 0x9f, 0xc4, 0x1c, 0x42, 0x2b, 0x19, 0x0f, 0xf1, 0x88, 0x20, 0xd8, 0x44, 0x0b, 0xa6, 0x30, 0xe6, 0x7c, 0x4e, 0xc9, 0xdd, 0xac, 0x66, 0xb1, 0x0d, 0x72, 0x3c, 0xbb, 0x5d, 0x05, 0x0c, 0xb5, 0x25, 0x6c, 0x18, - [1689679303.613450][52705:52705] CHIP:DMG: ] (241 bytes) - [1689679303.613454][52705:52705] CHIP:DMG: 0x1 = [ - [1689679303.613484][52705:52705] CHIP:DMG: 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x14, 0x01, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x13, 0x02, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x50, 0x08, 0x3b, 0x6a, 0x78, 0x96, 0x99, 0x12, 0xe9, 0xb7, 0xec, 0x75, 0x3c, 0x00, 0x66, 0x5a, 0xf4, 0x23, 0x1e, 0xe1, 0x3e, 0x43, 0x62, 0x20, 0x5d, 0xbc, 0x18, 0xf0, 0x60, 0x65, 0x43, 0x63, 0xfa, 0xe4, 0x8e, 0x0c, 0x5b, 0xd5, 0x59, 0x80, 0x9e, 0x2e, 0x08, 0x3f, 0x54, 0xba, 0x8a, 0x1f, 0xf6, 0xab, 0x5e, 0xf1, 0xf8, 0xe0, 0x7b, 0x55, 0xbd, 0xe1, 0xbe, 0x3d, 0xe7, 0x63, 0xef, 0xac, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xc5, 0x18, 0xcd, 0x9b, 0x17, 0xc6, 0x7c, 0x4a, 0x05, 0x01, 0xf2, 0x9e, 0x84, 0x2d, 0x57, 0x8a, 0x63, 0xd4, 0xc2, 0xbe, 0x30, 0x05, 0x14, 0xcf, 0x9b, 0x3f, 0x36, 0x43, 0x7a, 0x3e, 0x7c, 0x8c, 0x8a, 0xee, 0xe8, 0x03, 0x85, 0x26, 0x0a, 0x4f, 0x4a, 0x6b, 0xf3, 0x18, 0x30, 0x0b, 0x40, 0x8a, 0xb0, 0x9e, 0x46, 0xec, 0x4a, 0xb5, 0xe3, 0xc3, 0x8a, 0xf4, 0x68, 0x36, 0x6f, 0x0c, 0xe5, 0x45, 0x17, 0xd3, 0x3b, 0x7f, 0x23, 0x99, 0x7d, 0xc6, 0x63, 0x62, 0x71, 0xc3, 0x1a, 0x5f, 0xde, 0x55, 0xf2, 0xde, 0x5f, 0x68, 0x61, 0x3b, 0x6a, 0xcc, 0x55, 0xae, 0x0e, 0xa1, 0x37, 0xb4, 0xf7, 0xe2, 0xb9, 0x4e, 0x5e, 0x1a, 0x59, 0x9e, 0xff, 0x5f, 0xa3, 0xb7, 0x3a, 0x66, 0xdf, 0xdb, 0xd0, 0x18, - [1689679303.613497][52705:52705] CHIP:DMG: ] (231 bytes) - [1689679303.613501][52705:52705] CHIP:DMG: 0x2 = [ - [1689679303.613506][52705:52705] CHIP:DMG: 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x69, 0x70, 0x6b, 0x20, 0x30, 0x31, - [1689679303.613511][52705:52705] CHIP:DMG: ] (16 bytes) - [1689679303.613515][52705:52705] CHIP:DMG: 0x3 = 112233, - [1689679303.613519][52705:52705] CHIP:DMG: 0x4 = 65521, - [1689679303.613523][52705:52705] CHIP:DMG: }, - [1689679303.613526][52705:52705] CHIP:DMG: }, - [1689679303.613533][52705:52705] CHIP:DMG: - [1689679303.613535][52705:52705] CHIP:DMG: ], - [1689679303.613542][52705:52705] CHIP:DMG: - [1689679303.613545][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689679303.613548][52705:52705] CHIP:DMG: }, - [1689679303.613569][52705:52705] CHIP:DMG: AccessControl: checking f=0 a=p s=0xFFFFFFFB00000000 t= c=0x0000_003E e=0 p=a - [1689679303.613574][52705:52705] CHIP:DMG: AccessControl: implicit admin (PASE) - [1689679303.613579][52705:52705] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0006 + [1720691676.110] [2537:2537] [DMG] { + [1720691676.110] [2537:2537] [DMG] Exchange (0x05) = + [1720691676.110] [2537:2537] [DMG] { + [1720691676.110] [2537:2537] [DMG] Initiator = true + [1720691676.110] [2537:2537] [DMG] NeedsAck = true + [1720691676.110] [2537:2537] [DMG] } + [1720691676.110] [2537:2537] [DMG] } + [1720691676.110] [2537:2537] [DMG] + [1720691676.110] [2537:2537] [DMG] Decrypted Payload (536 bytes) = + [1720691676.110] [2537:2537] [DMG] { + [1720691676.110] [2537:2537] [DMG] data = 1528002801360215370024000024013e2402061835013000f11530010101240201370324130218260480228127260580254d3a370624150124110118240701240801300941044a270345ab219ad87b15d3019b537913f9b4141b65086f20310e9c6beb10e1d1bb6c38408a4e3060e521ec23d003223aaf91be2b0d4aba01d5936f28e4e472b0370a350128011824020136030402040118300414c58caa913e0686b491d23499ebe38b107fa17d86300514090379f413a2dee549958fd87995eaf9cfc6342418300b40170c5f4fdb337962d85313842ec8d644625a88167da9c8cb6958aa6d24376edf78737f5541ace9ff01e9cb94d4cf1f9a70c942e6a90a1acb29b5f0ab8619cfac183001e71530010101240201370324140118260480228127260580254d3a370624130218240701240801300941042ab1ebcbcc5441d4d9c64e96e7a22fd6d9a9dbd5ddb041d588c6d92ad3e0bb205077099d77495ca96eae12613f4a367407fb71c95f14109653a1a10767249bfc370a3501290118240260300414090379f413a2dee549958fd87995eaf9cfc634243005142454c7225b7e259a9fee5491234328fd15490ea818300b40dec817aa07a860dcfb62c2f470054dc0a51af3d0e67ea45d1e24835cb6895d7768ef6edff8fb70a384f13da581b6831b7c7f4f5d77fec7d5298af05bd632f7761830021074656d706f726172792069706b203031260369b601002504f1ff18181824ff0b18 + [1720691676.110] [2537:2537] [DMG] } + [1720691676.110] [2537:2537] [DMG] + [1720691676.110] [2537:2537] [DMG] NOCValue (241) = + [1720691676.110] [2537:2537] [DMG] { + FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVASQRARgkBwEkCAEwCUEESicDRashmth7FdMBm1N5E/m0FBtlCG8gMQ6ca+sQ4dG7bDhAik4wYOUh7CPQAyI6r5G+Kw1KugHVk28o5ORysDcKNQEoARgkAgE2AwQCBAEYMAQUxYyqkT4GhrSR0jSZ6+OLEH+hfYYwBRQJA3n0E6Le5UmVj9h5ler5z8Y0JBgwC0AXDF9P2zN5YthTE4QuyNZEYlqIFn2pyMtpWKptJDdu33hzf1VBrOn/AenLlNTPH5pwyULmqQoayym18KuGGc+sGA== + [1720691676.110] [2537:2537] [DMG] } + [1720691676.110] [2537:2537] [DMG] + [1720691676.110] [2537:2537] [DMG] ICACValue (231) = + [1720691676.110] [2537:2537] [DMG] { + FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEKrHry8xUQdTZxk6W56Iv1tmp29XdsEHViMbZKtPguyBQdwmdd0lcqW6uEmE/SjZ0B/txyV8UEJZToaEHZySb/DcKNQEpARgkAmAwBBQJA3n0E6Le5UmVj9h5ler5z8Y0JDAFFCRUxyJbfiWan+5UkSNDKP0VSQ6oGDALQN7IF6oHqGDc+2LC9HAFTcClGvPQ5n6kXR4kg1y2iV13aO9u3/j7cKOE8T2lgbaDG3x/T113/sfVKYrwW9Yy93YY + [1720691676.110] [2537:2537] [DMG] } + [1720691676.110] [2537:2537] [DMG] + [1720691676.111] [2537:2537] [DMG] + [1720691676.111] [2537:2537] [DMG] Additional Fields = + [1720691676.111] [2537:2537] [DMG] { disabled: true - label: "Step 12: Trigger the DUT to send UpdateFabricLabel to TH" @@ -820,37 +645,35 @@ tests: verification: | ./chip-tool operationalcredentials update-fabric-label node1 1 0 - Verify UpdateFabricLabel in TH (all-clusters-app) - - [1689681999.862864][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689681999.862866][52705:52705] CHIP:DMG: { - [1689681999.862869][52705:52705] CHIP:DMG: suppressResponse = false, - [1689681999.862871][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689681999.862876][52705:52705] CHIP:DMG: [ - [1689681999.862878][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689681999.862882][52705:52705] CHIP:DMG: { - [1689681999.862885][52705:52705] CHIP:DMG: CommandDataIB = - [1689681999.862887][52705:52705] CHIP:DMG: { - [1689681999.862890][52705:52705] CHIP:DMG: CommandPathIB = - [1689681999.862892][52705:52705] CHIP:DMG: { - [1689681999.862895][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689681999.862898][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689681999.862901][52705:52705] CHIP:DMG: CommandId = 0x8, - [1689681999.862904][52705:52705] CHIP:DMG: }, - [1689681999.862907][52705:52705] CHIP:DMG: - [1689681999.862910][52705:52705] CHIP:DMG: CommandFields = - [1689681999.862913][52705:52705] CHIP:DMG: { - [1689681999.862916][52705:52705] CHIP:DMG: 0x0 = 0, - [1689681999.862919][52705:52705] CHIP:DMG: 0x1 = 1, - [1689681999.862922][52705:52705] CHIP:DMG: }, - [1689681999.862924][52705:52705] CHIP:DMG: }, - [1689681999.862928][52705:52705] CHIP:DMG: - [1689681999.862930][52705:52705] CHIP:DMG: }, - [1689681999.862934][52705:52705] CHIP:DMG: - [1689681999.862937][52705:52705] CHIP:DMG: ], - [1689681999.862941][52705:52705] CHIP:DMG: - [1689681999.862943][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689681999.862945][52705:52705] CHIP:DMG: }, + ON TH(all-clusters-app) Verify that TH receives UpdateFabricLabel Command from DUT successfully. + [1720690667.618] [2401:2401] [EM] Handling via exchange: 53457r, Delegate: 0xaaaaab219368 + [1720690667.618] [2401:2401] [DMG] InvokeRequestMessage = + [1720690667.618] [2401:2401] [DMG] { + [1720690667.618] [2401:2401] [DMG] suppressResponse = false, + [1720690667.618] [2401:2401] [DMG] timedRequest = false, + [1720690667.618] [2401:2401] [DMG] InvokeRequests = + [1720690667.618] [2401:2401] [DMG] [ + [1720690667.618] [2401:2401] [DMG] CommandDataIB = + [1720690667.618] [2401:2401] [DMG] { + [1720690667.618] [2401:2401] [DMG] CommandPathIB = + [1720690667.618] [2401:2401] [DMG] { + [1720690667.618] [2401:2401] [DMG] EndpointId = 0x0, + [1720690667.618] [2401:2401] [DMG] ClusterId = 0x3e, + [1720690667.618] [2401:2401] [DMG] CommandId = 0x9, + [1720690667.619] [2401:2401] [DMG] }, + [1720690667.619] [2401:2401] [DMG] + [1720690667.619] [2401:2401] [DMG] CommandFields = + [1720690667.619] [2401:2401] [DMG] { + [1720690667.619] [2401:2401] [DMG] 0x0 = "node1" (5 chars), + [1720690667.619] [2401:2401] [DMG] }, + [1720690667.619] [2401:2401] [DMG] }, + [1720690667.619] [2401:2401] [DMG] + [1720690667.619] [2401:2401] [DMG] ], + [1720690667.619] [2401:2401] [DMG] + [1720690667.619] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690667.619] [2401:2401] [DMG] }, + [1720690667.619] [2401:2401] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_003E e=0 p=a + [1720690667.619] [2401:2401] [DMG] AccessControl: allowed disabled: true - label: "Step 13: Trigger the DUT to Read SupportedFabrics from TH" @@ -858,35 +681,30 @@ tests: verification: | ./chip-tool operationalcredentials read supported-fabrics 1 0 - Verify that the DUT reads the SupportedFabrics from TH (all-clusters-app) successfully. - - [1689682043.096159][52705:52705] CHIP:DMG: ReportDataMessage = - [1689682043.096163][52705:52705] CHIP:DMG: { - [1689682043.096166][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689682043.096172][52705:52705] CHIP:DMG: [ - [1689682043.096176][52705:52705] CHIP:DMG: AttributeReportIB = - [1689682043.096182][52705:52705] CHIP:DMG: { - [1689682043.096185][52705:52705] CHIP:DMG: AttributeDataIB = - [1689682043.096190][52705:52705] CHIP:DMG: { - [1689682043.096194][52705:52705] CHIP:DMG: DataVersion = 0x65bf1428, - [1689682043.096198][52705:52705] CHIP:DMG: AttributePathIB = - [1689682043.096202][52705:52705] CHIP:DMG: { - [1689682043.096206][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689682043.096211][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689682043.096215][52705:52705] CHIP:DMG: Attribute = 0x0000_0002, - [1689682043.096219][52705:52705] CHIP:DMG: } - [1689682043.096224][52705:52705] CHIP:DMG: - [1689682043.096229][52705:52705] CHIP:DMG: Data = 16, - [1689682043.096233][52705:52705] CHIP:DMG: }, - [1689682043.096239][52705:52705] CHIP:DMG: - [1689682043.096242][52705:52705] CHIP:DMG: }, - [1689682043.096248][52705:52705] CHIP:DMG: - [1689682043.096251][52705:52705] CHIP:DMG: ], - [1689682043.096257][52705:52705] CHIP:DMG: - [1689682043.096261][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689682043.096264][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689682043.096267][52705:52705] CHIP:DMG: } - [1689682043.096270][52705:52705] CHIP:DMG: + On TH(all-clusters-app), Verify that TH receives read SupportedFabrics attribute from DUT successfully + + [1720690734.362] [2401:2401] [EM] Handling via exchange: 58383r, Delegate: 0xaaaaab219368 + [1720690734.362] [2401:2401] [IM] Received Read request + [1720690734.362] [2401:2401] [DMG] ReadRequestMessage = + [1720690734.362] [2401:2401] [DMG] { + [1720690734.362] [2401:2401] [DMG] AttributePathIBs = + [1720690734.362] [2401:2401] [DMG] [ + [1720690734.362] [2401:2401] [DMG] AttributePathIB = + [1720690734.362] [2401:2401] [DMG] { + [1720690734.362] [2401:2401] [DMG] Endpoint = 0x0, + [1720690734.362] [2401:2401] [DMG] Cluster = 0x3e, + [1720690734.362] [2401:2401] [DMG] Attribute = 0x0000_0002, + [1720690734.362] [2401:2401] [DMG] } + [1720690734.362] [2401:2401] [DMG] + [1720690734.362] [2401:2401] [DMG] ], + [1720690734.362] [2401:2401] [DMG] + [1720690734.362] [2401:2401] [DMG] isFabricFiltered = true, + [1720690734.362] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690734.362] [2401:2401] [DMG] }, + [1720690734.362] [2401:2401] [DMG] IM RH moving to [CanStartReporting] + [1720690734.362] [2401:2401] [DMG] Building Reports for ReadHandler with LastReportGeneration = 0x0000000000000000 DirtyGeneration = 0x0000000000000000 + [1720690734.362] [2401:2401] [DMG] Cluster 3e, Attribute 2 is dirty + [1720690734.362] [2401:2401] [DMG] Reading attribute: Cluster=0x0000_003E Endpoint=0 AttributeId=0x0000_0002 (expanded=0) disabled: true - label: @@ -896,39 +714,30 @@ tests: verification: | ./chip-tool operationalcredentials read commissioned-fabrics 1 0 - Verify that the DUT reads the CommissionedFabrics from TH (all-clusters-app) successfully. - - [1689682091.425466][52705:52705] CHIP:DMG: ReportDataMessage = - [1689682091.425468][52705:52705] CHIP:DMG: { - [1689682091.425471][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689682091.425475][52705:52705] CHIP:DMG: [ - [1689682091.425477][52705:52705] CHIP:DMG: AttributeReportIB = - [1689682091.425481][52705:52705] CHIP:DMG: { - [1689682091.425484][52705:52705] CHIP:DMG: AttributeDataIB = - [1689682091.425487][52705:52705] CHIP:DMG: { - [1689682091.425490][52705:52705] CHIP:DMG: DataVersion = 0x65bf1428, - [1689682091.425492][52705:52705] CHIP:DMG: AttributePathIB = - [1689682091.425495][52705:52705] CHIP:DMG: { - [1689682091.425499][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689682091.425502][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689682091.425505][52705:52705] CHIP:DMG: Attribute = 0x0000_0003, - [1689682091.425507][52705:52705] CHIP:DMG: } - [1689682091.425512][52705:52705] CHIP:DMG: - [1689682091.425515][52705:52705] CHIP:DMG: Data = 1, - [1689682091.425518][52705:52705] CHIP:DMG: }, - [1689682091.425522][52705:52705] CHIP:DMG: - [1689682091.425524][52705:52705] CHIP:DMG: }, - [1689682091.425528][52705:52705] CHIP:DMG: - [1689682091.425531][52705:52705] CHIP:DMG: ], - [1689682091.425536][52705:52705] CHIP:DMG: - [1689682091.425538][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689682091.425541][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689682091.425543][52705:52705] CHIP:DMG: } - [1689682091.425545][52705:52705] CHIP:DMG: - [1689682091.425550][52705:52705] CHIP:DMG: Additional Fields = - [1689682091.425552][52705:52705] CHIP:DMG: { - [1689682091.425555][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:60204 - [1689682091.425557][52705:52705] CHIP:DMG: } + On TH(all-clusters-app), Verify that TH receives read CommissionedFabrics attribute from DUT successfully. + + [1720690759.037] [2401:2401] [EM] Handling via exchange: 8730r, Delegate: 0xaaaaab219368 + [1720690759.037] [2401:2401] [IM] Received Read request + [1720690759.037] [2401:2401] [DMG] ReadRequestMessage = + [1720690759.037] [2401:2401] [DMG] { + [1720690759.037] [2401:2401] [DMG] AttributePathIBs = + [1720690759.037] [2401:2401] [DMG] [ + [1720690759.037] [2401:2401] [DMG] AttributePathIB = + [1720690759.037] [2401:2401] [DMG] { + [1720690759.037] [2401:2401] [DMG] Endpoint = 0x0, + [1720690759.037] [2401:2401] [DMG] Cluster = 0x3e, + [1720690759.037] [2401:2401] [DMG] Attribute = 0x0000_0003, + [1720690759.037] [2401:2401] [DMG] } + [1720690759.037] [2401:2401] [DMG] + [1720690759.037] [2401:2401] [DMG] ], + [1720690759.037] [2401:2401] [DMG] + [1720690759.037] [2401:2401] [DMG] isFabricFiltered = true, + [1720690759.037] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690759.037] [2401:2401] [DMG] }, + [1720690759.037] [2401:2401] [DMG] IM RH moving to [CanStartReporting] + [1720690759.037] [2401:2401] [DMG] Building Reports for ReadHandler with LastReportGeneration = 0x0000000000000000 DirtyGeneration = 0x0000000000000000 + [1720690759.037] [2401:2401] [DMG] Cluster 3e, Attribute 3 is dirty + [1720690759.037] [2401:2401] [DMG] Reading attribute: Cluster=0x0000_003E Endpoint=0 AttributeId=0x0000_0003 (expanded=0) disabled: true - label: @@ -938,43 +747,29 @@ tests: verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - Verify that the DUT reads the TrustedRootCertificates from TH (all-clusters-app) successfully. - - [1689682131.190884][52705:52705] CHIP:DMG: ReportDataMessage = - [1689682131.190889][52705:52705] CHIP:DMG: { - [1689682131.190892][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689682131.190901][52705:52705] CHIP:DMG: [ - [1689682131.190905][52705:52705] CHIP:DMG: AttributeReportIB = - [1689682131.190913][52705:52705] CHIP:DMG: { - [1689682131.190917][52705:52705] CHIP:DMG: AttributeDataIB = - [1689682131.190922][52705:52705] CHIP:DMG: { - [1689682131.190928][52705:52705] CHIP:DMG: DataVersion = 0x65bf1428, - [1689682131.190932][52705:52705] CHIP:DMG: AttributePathIB = - [1689682131.190937][52705:52705] CHIP:DMG: { - [1689682131.190943][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689682131.190948][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689682131.190953][52705:52705] CHIP:DMG: Attribute = 0x0000_0004, - [1689682131.190958][52705:52705] CHIP:DMG: } - [1689682131.190965][52705:52705] CHIP:DMG: - [1689682131.190970][52705:52705] CHIP:DMG: Data = [ - [1689682131.190976][52705:52705] CHIP:DMG: [ - [1689682131.191022][52705:52705] CHIP:DMG: 0x15, 0x30, 0x01, 0x01, 0x01, 0x24, 0x02, 0x01, 0x37, 0x03, 0x24, 0x14, 0x01, 0x18, 0x26, 0x04, 0x80, 0x22, 0x81, 0x27, 0x26, 0x05, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x06, 0x24, 0x14, 0x01, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x8e, 0x70, 0xf4, 0x2e, 0xcb, 0xad, 0x8a, 0xc7, 0x98, 0x04, 0xa7, 0x5e, 0x1e, 0xe8, 0x33, 0xc8, 0x33, 0xb0, 0x76, 0xd9, 0x02, 0x93, 0x0a, 0x79, 0xff, 0xc3, 0xcd, 0x26, 0x78, 0xa9, 0xf6, 0xe8, 0xfe, 0xe8, 0x8b, 0x72, 0x3e, 0x31, 0x4e, 0x8e, 0xd7, 0x63, 0x7d, 0x9e, 0x90, 0x73, 0x20, 0x71, 0x1b, 0xbf, 0xfd, 0x1c, 0xc0, 0x8c, 0x4d, 0x6f, 0xb8, 0x75, 0x5f, 0xcb, 0x41, 0xef, 0x96, 0xb9, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xcf, 0x9b, 0x3f, 0x36, 0x43, 0x7a, 0x3e, 0x7c, 0x8c, 0x8a, 0xee, 0xe8, 0x03, 0x85, 0x26, 0x0a, 0x4f, 0x4a, 0x6b, 0xf3, 0x30, 0x05, 0x14, 0xcf, 0x9b, 0x3f, 0x36, 0x43, 0x7a, 0x3e, 0x7c, 0x8c, 0x8a, 0xee, 0xe8, 0x03, 0x85, 0x26, 0x0a, 0x4f, 0x4a, 0x6b, 0xf3, 0x18, 0x30, 0x0b, 0x40, 0x03, 0x3a, 0x99, 0xd5, 0xbd, 0x12, 0x8c, 0xdf, 0x45, 0xa2, 0x5b, 0x9c, 0xa1, 0x5d, 0xb0, 0x25, 0x43, 0xa2, 0x96, 0x17, 0x05, 0x18, 0x97, 0x7c, 0x64, 0x8a, 0xe2, 0xc4, 0x15, 0xeb, 0x7a, 0x4e, 0xe3, 0x4d, 0x42, 0x60, 0x78, 0x0d, 0x83, 0x32, 0x56, 0x26, 0xa7, 0xe5, 0x1d, 0x77, 0x4e, 0x71, 0x23, 0xe2, 0xac, 0x0a, 0x93, 0x7d, 0x53, 0x6d, 0xe3, 0xa4, 0x8b, 0xcc, 0xb7, 0x10, 0xd4, 0xc3, 0x18, - [1689682131.191039][52705:52705] CHIP:DMG: ] (231 bytes) - [1689682131.191045][52705:52705] CHIP:DMG: ], - [1689682131.191049][52705:52705] CHIP:DMG: }, - [1689682131.191056][52705:52705] CHIP:DMG: - [1689682131.191060][52705:52705] CHIP:DMG: }, - [1689682131.191068][52705:52705] CHIP:DMG: - [1689682131.191071][52705:52705] CHIP:DMG: ], - [1689682131.191079][52705:52705] CHIP:DMG: - [1689682131.191084][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689682131.191089][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689682131.191092][52705:52705] CHIP:DMG: } - [1689682131.191096][52705:52705] CHIP:DMG: - [1689682131.191106][52705:52705] CHIP:DMG: Additional Fields = - [1689682131.191109][52705:52705] CHIP:DMG: { - [1689682131.191114][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:56707 - [1689682131.191118][52705:52705] CHIP:DMG: } + On TH(all-clusters-app), Verify that TH receives read TrustedRootCertificates from DUT successfully. + [1720690787.895] [2401:2401] [EM] Handling via exchange: 45935r, Delegate: 0xaaaaab219368 + [1720690787.895] [2401:2401] [IM] Received Read request + [1720690787.895] [2401:2401] [DMG] ReadRequestMessage = + [1720690787.895] [2401:2401] [DMG] { + [1720690787.895] [2401:2401] [DMG] AttributePathIBs = + [1720690787.895] [2401:2401] [DMG] [ + [1720690787.895] [2401:2401] [DMG] AttributePathIB = + [1720690787.895] [2401:2401] [DMG] { + [1720690787.895] [2401:2401] [DMG] Endpoint = 0x0, + [1720690787.895] [2401:2401] [DMG] Cluster = 0x3e, + [1720690787.895] [2401:2401] [DMG] Attribute = 0x0000_0004, + [1720690787.895] [2401:2401] [DMG] } + [1720690787.896] [2401:2401] [DMG] + [1720690787.896] [2401:2401] [DMG] ], + [1720690787.896] [2401:2401] [DMG] + [1720690787.896] [2401:2401] [DMG] isFabricFiltered = true, + [1720690787.896] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690787.896] [2401:2401] [DMG] }, + [1720690787.896] [2401:2401] [DMG] IM RH moving to [CanStartReporting] + [1720690787.896] [2401:2401] [DMG] Building Reports for ReadHandler with LastReportGeneration = 0x0000000000000000 DirtyGeneration = 0x0000000000000000 + [1720690787.896] [2401:2401] [DMG] Cluster 3e, Attribute 4 is dirty + [1720690787.896] [2401:2401] [DMG] Reading attribute: Cluster=0x0000_003E Endpoint=0 AttributeId=0x0000_0004 (expanded=0) disabled: true - label: @@ -983,39 +778,30 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - Verify that the DUT reads the CurrentFabricIndex from TH (all-clusters-app) successfully. - - [1689682171.239348][52705:52705] CHIP:DMG: ReportDataMessage = - [1689682171.239351][52705:52705] CHIP:DMG: { - [1689682171.239353][52705:52705] CHIP:DMG: AttributeReportIBs = - [1689682171.239359][52705:52705] CHIP:DMG: [ - [1689682171.239361][52705:52705] CHIP:DMG: AttributeReportIB = - [1689682171.239367][52705:52705] CHIP:DMG: { - [1689682171.239370][52705:52705] CHIP:DMG: AttributeDataIB = - [1689682171.239373][52705:52705] CHIP:DMG: { - [1689682171.239378][52705:52705] CHIP:DMG: DataVersion = 0x65bf1428, - [1689682171.239382][52705:52705] CHIP:DMG: AttributePathIB = - [1689682171.239387][52705:52705] CHIP:DMG: { - [1689682171.239391][52705:52705] CHIP:DMG: Endpoint = 0x0, - [1689682171.239396][52705:52705] CHIP:DMG: Cluster = 0x3e, - [1689682171.239400][52705:52705] CHIP:DMG: Attribute = 0x0000_0005, - [1689682171.239404][52705:52705] CHIP:DMG: } - [1689682171.239410][52705:52705] CHIP:DMG: - [1689682171.239415][52705:52705] CHIP:DMG: Data = 1, - [1689682171.239419][52705:52705] CHIP:DMG: }, - [1689682171.239424][52705:52705] CHIP:DMG: - [1689682171.239427][52705:52705] CHIP:DMG: }, - [1689682171.239432][52705:52705] CHIP:DMG: - [1689682171.239434][52705:52705] CHIP:DMG: ], - [1689682171.239440][52705:52705] CHIP:DMG: - [1689682171.239443][52705:52705] CHIP:DMG: SuppressResponse = true, - [1689682171.239447][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689682171.239450][52705:52705] CHIP:DMG: } - [1689682171.239453][52705:52705] CHIP:DMG: - [1689682171.239459][52705:52705] CHIP:DMG: Additional Fields = - [1689682171.239462][52705:52705] CHIP:DMG: { - [1689682171.239465][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:48841 - [1689682171.239468][52705:52705] CHIP:DMG: } + On TH(all-clusters-app), Verify that TH receives read CurrentFabricIndex from DUT successfully. + 00001B669 [2E0F] --- Type 0001:02 (IM:ReadRequest) + [1720690810.143] [2401:2401] [EM] Handling via exchange: 58403r, Delegate: 0xaaaaab219368 + [1720690810.143] [2401:2401] [IM] Received Read request + [1720690810.143] [2401:2401] [DMG] ReadRequestMessage = + [1720690810.143] [2401:2401] [DMG] { + [1720690810.143] [2401:2401] [DMG] AttributePathIBs = + [1720690810.143] [2401:2401] [DMG] [ + [1720690810.143] [2401:2401] [DMG] AttributePathIB = + [1720690810.143] [2401:2401] [DMG] { + [1720690810.143] [2401:2401] [DMG] Endpoint = 0x0, + [1720690810.143] [2401:2401] [DMG] Cluster = 0x3e, + [1720690810.143] [2401:2401] [DMG] Attribute = 0x0000_0005, + [1720690810.143] [2401:2401] [DMG] } + [1720690810.143] [2401:2401] [DMG] + [1720690810.143] [2401:2401] [DMG] ], + [1720690810.143] [2401:2401] [DMG] + [1720690810.143] [2401:2401] [DMG] isFabricFiltered = true, + [1720690810.143] [2401:2401] [DMG] InteractionModelRevision = 11 + [1720690810.143] [2401:2401] [DMG] }, + [1720690810.143] [2401:2401] [DMG] IM RH moving to [CanStartReporting] + [1720690810.144] [2401:2401] [DMG] Building Reports for ReadHandler with LastReportGeneration = 0x0000000000000000 DirtyGeneration = 0x0000000000000000 + [1720690810.144] [2401:2401] [DMG] Cluster 3e, Attribute 5 is dirty + [1720690810.144] [2401:2401] [DMG] Reading attribute: Cluster=0x000 disabled: true - label: "Step 17: Trigger the DUT to send RemoveFabric command to TH" @@ -1023,41 +809,35 @@ tests: verification: | ./chip-tool operationalcredentials remove-fabric 1 1 0 - Verify that the TH receives RemoveFabric Command on TH(all-clusters-app) Log - - [1689682243.817862][52705:52705] CHIP:DMG: InvokeResponseMessage = - [1689682243.817866][52705:52705] CHIP:DMG: { - [1689682243.817869][52705:52705] CHIP:DMG: suppressResponse = false, - [1689682243.817872][52705:52705] CHIP:DMG: InvokeResponseIBs = - [1689682243.817879][52705:52705] CHIP:DMG: [ - [1689682243.817882][52705:52705] CHIP:DMG: InvokeResponseIB = - [1689682243.817888][52705:52705] CHIP:DMG: { - [1689682243.817892][52705:52705] CHIP:DMG: CommandDataIB = - [1689682243.817895][52705:52705] CHIP:DMG: { - [1689682243.817899][52705:52705] CHIP:DMG: CommandPathIB = - [1689682243.817906][52705:52705] CHIP:DMG: { - [1689682243.817910][52705:52705] CHIP:DMG: EndpointId = 0x0, - [1689682243.817915][52705:52705] CHIP:DMG: ClusterId = 0x3e, - [1689682243.817919][52705:52705] CHIP:DMG: CommandId = 0x8, - [1689682243.817924][52705:52705] CHIP:DMG: }, - [1689682243.817930][52705:52705] CHIP:DMG: - [1689682243.817934][52705:52705] CHIP:DMG: CommandFields = - [1689682243.817938][52705:52705] CHIP:DMG: { - [1689682243.817944][52705:52705] CHIP:DMG: 0x0 = 0, - [1689682243.817949][52705:52705] CHIP:DMG: 0x1 = 1, - [1689682243.817954][52705:52705] CHIP:DMG: }, - [1689682243.817958][52705:52705] CHIP:DMG: }, - [1689682243.817965][52705:52705] CHIP:DMG: - [1689682243.817968][52705:52705] CHIP:DMG: }, - [1689682243.817976][52705:52705] CHIP:DMG: - [1689682243.817979][52705:52705] CHIP:DMG: ], - [1689682243.817986][52705:52705] CHIP:DMG: - [1689682243.817989][52705:52705] CHIP:DMG: InteractionModelRevision = 1 - [1689682243.817993][52705:52705] CHIP:DMG: }, - [1689682243.817997][52705:52705] CHIP:DMG: - [1689682243.818005][52705:52705] CHIP:DMG: Additional Fields = - [1689682243.818008][52705:52705] CHIP:DMG: { - [1689682243.818012][52705:52705] CHIP:DMG: peer_address = UDP:[fe80::df9b:2ab4:71bf:d31b%wlp0s20f3]:59605 - [1689682243.818016][52705:52705] CHIP:DMG: } - [1689682243.818019][52705:52705] CHIP:DMG: + On TH(all-clusters-app), Verify that TH receives RemoveFabric Command for the FabricID saved from FabricDescriptor + + [1720691521.510] [2497:2497] [EM] >>> [E:54592r S:29126 M:138609799] (S) Msg RX from 1:000000000001B669 [5C12] --- Type 0001:08 (IM:InvokeCommandRequest) + [1720691521.510] [2497:2497] [EM] Handling via exchange: 54592r, Delegate: 0xaaaae7e69368 + [1720691521.510] [2497:2497] [DMG] InvokeRequestMessage = + [1720691521.510] [2497:2497] [DMG] { + [1720691521.510] [2497:2497] [DMG] suppressResponse = false, + [1720691521.510] [2497:2497] [DMG] timedRequest = false, + [1720691521.510] [2497:2497] [DMG] InvokeRequests = + [1720691521.511] [2497:2497] [DMG] [ + [1720691521.511] [2497:2497] [DMG] CommandDataIB = + [1720691521.511] [2497:2497] [DMG] { + [1720691521.511] [2497:2497] [DMG] CommandPathIB = + [1720691521.511] [2497:2497] [DMG] { + [1720691521.511] [2497:2497] [DMG] EndpointId = 0x0, + [1720691521.511] [2497:2497] [DMG] ClusterId = 0x3e, + [1720691521.511] [2497:2497] [DMG] CommandId = 0xa, + [1720691521.511] [2497:2497] [DMG] }, + [1720691521.511] [2497:2497] [DMG] + [1720691521.511] [2497:2497] [DMG] CommandFields = + [1720691521.511] [2497:2497] [DMG] { + [1720691521.511] [2497:2497] [DMG] 0x0 = 1 (unsigned), + [1720691521.511] [2497:2497] [DMG] }, + [1720691521.511] [2497:2497] [DMG] }, + [1720691521.511] [2497:2497] [DMG] + [1720691521.511] [2497:2497] [DMG] ], + [1720691521.511] [2497:2497] [DMG] + [1720691521.511] [2497:2497] [DMG] InteractionModelRevision = 11 + [1720691521.511] [2497:2497] [DMG] }, + [1720691521.511] [2497:2497] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_003E e=0 p=a + [1720691521.511] [2497:2497] [DMG] AccessControl: allowed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index 0d78bccbe64e05..abbc71a32afccc 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -874,7 +874,7 @@ tests: to 60 000 000 (60 000s) and a set of extension fields appropriate to AC1." verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x01 60000000 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4001", "ValueUnsigned8": "0x01"}]}]' 1 1 + ./chip-tool scenesmanagement add-scene 0x0001 0x01 60000000 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4000", "valueUnsigned16": "0x01"}]}]' 1 1 Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1 and the SceneID field set to 0x01 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 01d98213b3e279..bee33964dfac50 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -82,7 +82,6 @@ "DeviceManagement": [ "Test_TC_BINFO_3_1", "Test_TC_OPCREDS_3_1", - "Test_TC_OPCREDS_3_2", "Test_TC_OPCREDS_3_3", "Test_TC_OPCREDS_3_4", "Test_TC_OPCREDS_3_5", @@ -90,7 +89,6 @@ "Test_TC_CNET_4_1", "Test_TC_CNET_4_2", "Test_TC_CNET_4_3", - "Test_TC_CNET_4_4", "Test_TC_CNET_4_5", "Test_TC_CNET_4_6", "Test_TC_CNET_4_9", diff --git a/src/app/tests/test-interaction-model-api.cpp b/src/app/tests/test-interaction-model-api.cpp index b69c4234273cb9..33097d320bc880 100644 --- a/src/app/tests/test-interaction-model-api.cpp +++ b/src/app/tests/test-interaction-model-api.cpp @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "access/SubjectDescriptor.h" #include #include @@ -171,8 +172,13 @@ ActionReturnStatus TestImCustomDataModel::ReadAttribute(const ReadAttributeReque { AttributeEncodeState mutableState(&encoder.GetState()); // provide a state copy to start. - CHIP_ERROR err = ReadSingleClusterData(request.subjectDescriptor.value_or(Access::SubjectDescriptor()), - request.readFlags.Has(ReadFlags::kFabricFiltered), request.path, + Access::SubjectDescriptor subjectDescriptor; + if (request.subjectDescriptor != nullptr) + { + subjectDescriptor = *request.subjectDescriptor; + } + + CHIP_ERROR err = ReadSingleClusterData(subjectDescriptor, request.readFlags.Has(ReadFlags::kFabricFiltered), request.path, TestOnlyAttributeValueEncoderAccessor(encoder).Builder(), &mutableState); // state must survive CHIP_ERRORs as it is used for chunking diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index ff485bbf6bba81..bdccfbe39e1582 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2741,4 +2741,76 @@ limitations under the License. + + MA-heatpump + CHIP + Heat Pump + 0x0103 + 0x0309 + Simple + Endpoint + + + CLIENT_LIST + DEVICE_TYPE_LIST + PARTS_LIST + SERVER_LIST + + + IDENTIFY_TIME + IDENTIFY_TYPE + Identify + + + CONTROL_SEQUENCE_OF_OPERATION + LOCAL_TEMPERATURE + SYSTEM_MODE + SetpointRaiseLower + + + + + MA-solarpower + CHIP + Solar Power + 0x0103 + 0x0017 + Simple + Endpoint + + + CLIENT_LIST + DEVICE_TYPE_LIST + PARTS_LIST + SERVER_LIST + + + IDENTIFY_TIME + IDENTIFY_TYPE + Identify + + + + + MA-batterystorage + CHIP + Battery Storage + 0x0103 + 0x0018 + Simple + Endpoint + + + CLIENT_LIST + DEVICE_TYPE_LIST + PARTS_LIST + SERVER_LIST + + + IDENTIFY_TIME + IDENTIFY_TYPE + Identify + + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 3ad401afb3e47a..39301cdc30cecc 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -196,6 +196,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], + "Chime": ["ActiveChimeID", "Enabled"], "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ "ESAType", @@ -290,7 +291,8 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "MaximumCheckInBackOff" ], "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], "Operational Credentials": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index c291fc651f6aa0..c2de6acabf2951 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -190,6 +190,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], + "Chime": ["ActiveChimeID", "Enabled"], "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ "ESAType", @@ -284,7 +285,8 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "MaximumCheckInBackOff" ], "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], "Operational Credentials": [ diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index e38e8809616f45..4de99f1b7aaf3d 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -171,7 +171,7 @@ "concentration-measurement-server" ], "CHANNEL_CLUSTER": ["channel-server"], - "CHIME_CLUSTER": [], + "CHIME_CLUSTER": ["chime-server"], "COLOR_CONTROL_CLUSTER": ["color-control-server"], "COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"], "COMMISSIONING_CLUSTER": [], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 1a1f8539267101..8c1eba99077039 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -2955,6 +2955,25 @@ } ] }, + { + "name": "Chime", + "code": 1366, + "mfgCode": null, + "define": "CHIME_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "PlayChimeSound", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, { "name": "Unit Testing", "code": 4294048773, diff --git a/src/controller/tests/data_model/DataModelFixtures.cpp b/src/controller/tests/data_model/DataModelFixtures.cpp index a5533dc51de57c..f007275c9b3bc2 100644 --- a/src/controller/tests/data_model/DataModelFixtures.cpp +++ b/src/controller/tests/data_model/DataModelFixtures.cpp @@ -18,6 +18,7 @@ #include "DataModelFixtures.h" +#include #include #include #include @@ -522,8 +523,13 @@ ActionReturnStatus CustomDataModel::ReadAttribute(const ReadAttributeRequest & r } #endif // CHIP_CONFIG_USE_EMBER_DATA_MODEL && CHIP_CONFIG_USE_DATA_MODEL_INTERFACE - CHIP_ERROR err = ReadSingleClusterData(request.subjectDescriptor.value_or(Access::SubjectDescriptor()), - request.readFlags.Has(ReadFlags::kFabricFiltered), request.path, + Access::SubjectDescriptor subjectDescriptor; + if (request.subjectDescriptor != nullptr) + { + subjectDescriptor = *request.subjectDescriptor; + } + + CHIP_ERROR err = ReadSingleClusterData(subjectDescriptor, request.readFlags.Has(ReadFlags::kFabricFiltered), request.path, TestOnlyAttributeValueEncoderAccessor(encoder).Builder(), &mutableState); // state must survive CHIP_ERRORs as it is used for chunking diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 2f75038eda97a2..3868060175bb1b 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -23,6 +23,7 @@ #import "MTRCluster.h" #import "MTRClusterStateCacheContainer_Internal.h" #import "MTRCluster_Internal.h" +#import "MTRDeviceDataValidation.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" #import "MTREventTLVValueDecoder_Internal.h" diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 075ee99da20990..fa766463e3e025 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -18,7 +18,7 @@ #import "MTRBaseDevice.h" #import -#import "MTRDeviceDataValueDictionary.h" +#import "MTRDefines_Internal.h" #include #include diff --git a/src/darwin/Framework/CHIP/MTRDefines_Internal.h b/src/darwin/Framework/CHIP/MTRDefines_Internal.h index 71a03aa09184c5..ba7d6be51d61f5 100644 --- a/src/darwin/Framework/CHIP/MTRDefines_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDefines_Internal.h @@ -65,6 +65,11 @@ typedef struct {} variable_hidden_by_mtr_hide; // Default timed interaction timeout, in ms, if another one is not provided. #define MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS 10000 +// Useful building block for type-checking machinery. Uses C-style cast so it +// can be used in .m files as well. +#define MTR_SAFE_CAST(object, classname) \ + ([object isKindOfClass:[classname class]] ? (classname *) (object) : nil) + #pragma mark - XPC Defines #define MTR_SIMPLE_REMOTE_XPC_GETTER(XPC_CONNECTION, NAME, TYPE, DEFAULT_VALUE, GETTER_NAME, PREFIX) \ @@ -179,3 +184,15 @@ typedef struct {} variable_hidden_by_mtr_hide; #define MTR_ABSTRACT_METHOD() \ _MTR_ABSTRACT_METHOD_IMPL("%@ or some ancestor must implement %@", self.class, NSStringFromSelector(_cmd)) + +#pragma mark - Typedefs for some commonly used types. + +/** + * A data-value as defined in MTRBaseDevice.h. + */ +typedef NSDictionary * MTRDeviceDataValueDictionary; + +/** + * A response-value as defined in MTRBaseDevice.h. + */ +typedef NSDictionary * MTRDeviceResponseValueDictionary; diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 5a8dcb8de08355..5b19eb3bf434e4 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -107,6 +107,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ @property (nonatomic, readonly, nullable, copy) NSNumber * estimatedSubscriptionLatency MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); +/** + * The Vendor Identifier associated with the device. + * + * A non-nil value if the vendor identifier has been determined from the device, nil if unknown. + */ +@property (nonatomic, readonly, nullable, copy) NSNumber * vendorID MTR_NEWLY_AVAILABLE; + +/** + * The Product Identifier associated with the device. + * + * A non-nil value if the product identifier has been determined from the device, nil if unknown. + */ +@property (nonatomic, readonly, nullable, copy) NSNumber * productID MTR_NEWLY_AVAILABLE; + /** * Set the delegate to receive asynchronous callbacks about the device. * diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 8e379980578f58..2337d0eae625f5 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -25,7 +25,6 @@ #import "MTRConversion.h" #import "MTRDefines_Internal.h" #import "MTRDeviceController_Internal.h" -#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" #import "MTRLogging_Internal.h" diff --git a/src/darwin/Framework/CHIP/MTRDeviceClusterData.h b/src/darwin/Framework/CHIP/MTRDeviceClusterData.h index d34ada90e9a7f2..2abdc6113b44af 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceClusterData.h +++ b/src/darwin/Framework/CHIP/MTRDeviceClusterData.h @@ -17,7 +17,6 @@ #import #import "MTRDefines_Internal.h" -#import "MTRDeviceDataValueDictionary.h" NS_ASSUME_NONNULL_BEGIN diff --git a/src/darwin/Framework/CHIP/MTRDeviceDataValidation.h b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.h new file mode 100644 index 00000000000000..5d448d8aa4fcba --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.h @@ -0,0 +1,42 @@ +/** + * 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. + */ + +#import + +#import "MTRDefines_Internal.h" + +NS_ASSUME_NONNULL_BEGIN + +// Returns whether a data-value dictionary is well-formed (in the sense that all +// the types of the objects inside are as expected, so it's actually a valid +// representation of some TLV). Implemented in MTRBaseDevice.mm because that's +// where the pieces needed to implement it are, but declared here so our tests +// can see it. +MTR_EXTERN MTR_TESTABLE BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value); + +// Returns whether the provided attribute report actually has the right sorts of +// objects in the right places. +MTR_EXTERN MTR_TESTABLE BOOL MTRAttributeReportIsWellFormed(NSArray * report); + +// Returns whether the provided event report actually has the right sorts of +// objects in the right places. +MTR_EXTERN MTR_TESTABLE BOOL MTREventReportIsWellFormed(NSArray * report); + +// Returns whether the provided invoke response actually has the right sorts of +// objects in the right places. +MTR_EXTERN MTR_TESTABLE BOOL MTRInvokeResponseIsWellFormed(NSArray * response); + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm new file mode 100644 index 00000000000000..55014b453132a3 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm @@ -0,0 +1,216 @@ +/** + * 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. + */ + +#import "MTRDeviceDataValidation.h" + +#import "MTRBaseDevice.h" + +#import "MTRLogging_Internal.h" + +// MTRDataValueDictionaryIsWellFormed lives in MTRBaseDevice.mm, because it uses +// static functions defined in that file. + +#pragma mark - Helpers used by multiple validators + +#define MTR_CHECK_CLASS(className) \ + ^(className * arg) { return MTR_SAFE_CAST(arg, className) != nil; } + +// input is not known to be an NSDictionary yet on entry. +// +// expectedShape maps keys to value validator blocks. +static BOOL MTRDictionaryHasExpectedShape(NSDictionary * input, NSDictionary * expectedShape) +{ + if (!MTR_SAFE_CAST(input, NSDictionary)) { + return NO; + } + + for (id key in expectedShape) { + id value = input[key]; + if (!value) { + return NO; + } + auto validator = static_cast(expectedShape[key]); + if (!validator(value)) { + return NO; + } + } + + return YES; +} + +#pragma mark - Attribute report validation + +static const auto sAttributeDataShape = @{ + MTRAttributePathKey : MTR_CHECK_CLASS(MTRAttributePath), + MTRDataKey : (^(MTRDeviceDataValueDictionary arg) { + return MTRDataValueDictionaryIsWellFormed(arg); + }), +}; + +static const auto sAttributeErrorShape = @{ + MTRAttributePathKey : MTR_CHECK_CLASS(MTRAttributePath), + MTRErrorKey : MTR_CHECK_CLASS(NSError), +}; + +BOOL MTRAttributeReportIsWellFormed(NSArray * report) +{ + if (!MTR_SAFE_CAST(report, NSArray)) { + MTR_LOG_ERROR("Attribute report is not an array: %@", report); + return NO; + } + + for (MTRDeviceResponseValueDictionary item in report) { + // item can be a value report or an error report. + if (!MTRDictionaryHasExpectedShape(item, sAttributeDataShape) && !MTRDictionaryHasExpectedShape(item, sAttributeErrorShape)) { + MTR_LOG_ERROR("Attribute report contains a weird entry: %@", item); + return NO; + } + + // Now we know item is in fact a dictionary, and it has at least one of MTRDataKey and MTRErrorKey. Make sure it's + // not claiming both, which could confuse code that examines it. + if (item[MTRDataKey] != nil && item[MTRErrorKey] != nil) { + MTR_LOG_ERROR("Attribute report contains an entry that claims to be both data and error: %@", item); + return NO; + } + } + + return YES; +} + +#pragma mark - Event report validation + +// MTREventIsHistoricalKey is claimed to be present no matter what, as +// long as MTREventPathKey is present. +static const auto sEventDataShape = @{ + MTREventPathKey : MTR_CHECK_CLASS(MTREventPath), + MTRDataKey : (^(MTRDeviceDataValueDictionary arg) { + return MTRDataValueDictionaryIsWellFormed(arg); + }), + MTREventIsHistoricalKey : MTR_CHECK_CLASS(NSNumber), + MTREventNumberKey : MTR_CHECK_CLASS(NSNumber), + MTREventPriorityKey : MTR_CHECK_CLASS(NSNumber), + MTREventTimeTypeKey : MTR_CHECK_CLASS(NSNumber), +}; + +static const auto sEventErrorShape = @{ + MTREventPathKey : MTR_CHECK_CLASS(MTREventPath), + MTRErrorKey : MTR_CHECK_CLASS(NSError), + MTREventIsHistoricalKey : MTR_CHECK_CLASS(NSNumber), +}; + +BOOL MTREventReportIsWellFormed(NSArray * report) +{ + if (!MTR_SAFE_CAST(report, NSArray)) { + MTR_LOG_ERROR("Event report is not an array: %@", report); + return NO; + } + + for (MTRDeviceResponseValueDictionary item in report) { + // item can be a value report or an error report. + if (!MTRDictionaryHasExpectedShape(item, sEventDataShape) && !MTRDictionaryHasExpectedShape(item, sEventErrorShape)) { + MTR_LOG_ERROR("Event report contains a weird entry: %@", item); + return NO; + } + + // Now we know item is in fact a dictionary, and it has at least one of MTRDataKey and MTRErrorKey. Make sure it's + // not claiming both, which could confuse code that examines it. + if (item[MTRDataKey] != nil && item[MTRErrorKey] != nil) { + MTR_LOG_ERROR("Event report contains an entry that claims to be both data and error: %@", item); + return NO; + } + + if (item[MTRDataKey]) { + // Check well-formedness of our timestamps. Note that we have + // already validated the type of item[MTREventTimeTypeKey]. + uint64_t eventTimeType = [item[MTREventTimeTypeKey] unsignedLongLongValue]; + switch (eventTimeType) { + case MTREventTimeTypeSystemUpTime: { + if (!MTR_SAFE_CAST(item[MTREventSystemUpTimeKey], NSNumber)) { + MTR_LOG_ERROR("Event report claims system uptime timing but does not have the time: %@", item); + return NO; + } + break; + } + case MTREventTimeTypeTimestampDate: { + if (!MTR_SAFE_CAST(item[MTREventTimestampDateKey], NSDate)) { + MTR_LOG_ERROR("Event report claims epoch timing but does not have the time: %@", item); + return NO; + } + break; + } + default: + MTR_LOG_ERROR("Uknown time type for event report: %@", item); + return NO; + } + } + } + + return YES; +} + +#pragma mark - Invoke response validation + +BOOL MTRInvokeResponseIsWellFormed(NSArray * response) +{ + if (!MTR_SAFE_CAST(response, NSArray)) { + MTR_LOG_ERROR("Invoke response is not an array: %@", response); + return NO; + } + + // Input is an array with a single value that must have MTRCommandPathKey. + if (response.count != 1) { + MTR_LOG_ERROR("Invoke response is not an array with exactly one entry: %@", response); + return NO; + } + + MTRDeviceResponseValueDictionary responseValue = response[0]; + + if (!MTR_SAFE_CAST(responseValue, NSDictionary) || !MTR_SAFE_CAST(responseValue[MTRCommandPathKey], MTRCommandPath)) { + MTR_LOG_ERROR("Invoke response is not an array with the right things in it: %@", response); + return NO; + } + + MTRDeviceDataValueDictionary _Nullable data = responseValue[MTRDataKey]; + NSError * _Nullable error = responseValue[MTRErrorKey]; + + if (data != nil && error != nil) { + MTR_LOG_ERROR("Invoke response claims to have both data and error: %@", responseValue); + return NO; + } + + if (error != nil) { + return MTR_SAFE_CAST(error, NSError) != nil; + } + + if (data == nil) { + // This is valid: indicates a success status response. + return YES; + } + + if (!MTRDataValueDictionaryIsWellFormed(data)) { + MTR_LOG_ERROR("Invoke response claims to have data that is not a data-value: %@", data); + return NO; + } + + // Now we know data is a dictionary (in fact a data-value). The only thing + // we promise about it is that it has type MTRStructureValueType. + if (data[MTRTypeKey] != MTRStructureValueType) { + MTR_LOG_ERROR("Invoke response data is not of structure type: %@", data); + return NO; + } + + return YES; +} diff --git a/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h b/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h deleted file mode 100644 index 53a6b2e6f914b7..00000000000000 --- a/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** - * A data-value as defined in MTRBaseDevice.h. - */ -typedef NSDictionary * MTRDeviceDataValueDictionary; - -NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 2423e4e8769c45..12b6250e0bcadb 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -31,7 +31,7 @@ #import "MTRDeviceConnectivityMonitor.h" #import "MTRDeviceControllerOverXPC.h" #import "MTRDeviceController_Internal.h" -#import "MTRDeviceDataValueDictionary.h" +#import "MTRDeviceDataValidation.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" @@ -488,6 +488,18 @@ - (NSDictionary *)_internalProperties return properties; } +- (nullable NSNumber *)vendorID +{ + std::lock_guard lock(_descriptionLock); + return [_vid copy]; +} + +- (nullable NSNumber *)productID +{ + std::lock_guard lock(_descriptionLock); + return [_pid copy]; +} + - (void)_notifyDelegateOfPrivateInternalPropertiesChanges { os_unfair_lock_assert_owner(&self->_lock); @@ -1887,8 +1899,13 @@ - (void)_handleAttributeReport:(NSArray *> *)attrib } // BEGIN DRAGON: This is used by the XPC Server to inject reports into local cache and broadcast them -- (void)_injectAttributeReport:(NSArray *> *)attributeReport fromSubscription:(BOOL)isFromSubscription +- (void)_injectAttributeReport:(NSArray *)attributeReport fromSubscription:(BOOL)isFromSubscription { + if (!MTRAttributeReportIsWellFormed(attributeReport)) { + MTR_LOG_ERROR("%@ injected attribute report is not well-formed: %@", self, attributeReport); + return; + } + [_deviceController asyncDispatchToMatterQueue:^{ MTR_LOG("%@ injected attribute report (%p) %@", self, attributeReport, attributeReport); [self _handleReportBegin]; @@ -1899,8 +1916,13 @@ - (void)_injectAttributeReport:(NSArray *> *)attrib } errorHandler:nil]; } -- (void)_injectEventReport:(NSArray *> *)eventReport +- (void)_injectEventReport:(NSArray *)eventReport { + if (!MTREventReportIsWellFormed(eventReport)) { + MTR_LOG_ERROR("%@ injected event report is not well-formed: %@", self, eventReport); + return; + } + // [_deviceController asyncDispatchToMatterQueue:^{ // TODO: This wasn't used previously, not sure why, so keeping it here for thought, but preserving existing behavior dispatch_async(self.queue, ^{ [self _handleEventReport:eventReport]; diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 4414b3c6133b07..35cc25e26949da 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -22,7 +22,6 @@ #import "MTRAsyncWorkQueue.h" #import "MTRDefines_Internal.h" -#import "MTRDeviceDataValueDictionary.h" #import "MTRDeviceStorageBehaviorConfiguration_Internal.h" NS_ASSUME_NONNULL_BEGIN @@ -176,13 +175,6 @@ MTR_DIRECT_MEMBERS - (void)devicePrivateInternalStateChanged:(MTRDevice *)device internalState:(NSDictionary *)state; @end -// Returns whether a data-value dictionary is well-formed (in the sense that all -// the types of the objects inside are as expected, so it's actually a valid -// representation of some TLV). Implemented in MTRBaseDevice.mm because that's -// where the pieces needed to implement it are, but declared here so our tests -// can see it. -MTR_EXTERN MTR_TESTABLE BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value); - #pragma mark - Constants static NSString * const kDefaultSubscriptionPoolSizeOverrideKey = @"subscriptionPoolSizeOverride"; diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index 7782509fb79bcd..8a5f745a1dfc70 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -41,7 +41,7 @@ #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRDeviceController_Concrete.h" #import "MTRDeviceController_XPC.h" -#import "MTRDeviceDataValueDictionary.h" +#import "MTRDeviceDataValidation.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" #import "MTRDevice_XPC_Internal.h" @@ -131,27 +131,62 @@ - (NSString *)description _deviceController.uniqueIdentifier]; } +- (nullable NSNumber *)vendorID +{ + return [[self._internalState objectForKey:kMTRDeviceInternalPropertyKeyVendorID] copy]; +} + +- (nullable NSNumber *)productID +{ + return [[self._internalState objectForKey:kMTRDeviceInternalPropertyKeyProductID] copy]; +} + #pragma mark - Client Callbacks (MTRDeviceDelegate) // required methods for MTRDeviceDelegates - (oneway void)device:(NSNumber *)nodeID stateChanged:(MTRDeviceState)state { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid device:stateChanged: nodeID: %@", self, nodeID); + return; + } + MTR_LOG("%s", __PRETTY_FUNCTION__); [self _lockAndCallDelegatesWithBlock:^(id delegate) { [delegate device:self stateChanged:state]; }]; } -- (oneway void)device:(NSNumber *)nodeID receivedAttributeReport:(NSArray *> *)attributeReport +- (oneway void)device:(NSNumber *)nodeID receivedAttributeReport:(NSArray *)attributeReport { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid device:receivedAttributeReport: nodeID: %@", self, nodeID); + return; + } + + if (!MTRAttributeReportIsWellFormed(attributeReport)) { + MTR_LOG_ERROR("%@ invalid device:receivedAttributeReport: attributeReport: %@", self, attributeReport); + return; + } + MTR_LOG("%s", __PRETTY_FUNCTION__); [self _lockAndCallDelegatesWithBlock:^(id delegate) { [delegate device:self receivedAttributeReport:attributeReport]; }]; } -- (oneway void)device:(NSNumber *)nodeID receivedEventReport:(NSArray *> *)eventReport +- (oneway void)device:(NSNumber *)nodeID receivedEventReport:(NSArray *)eventReport { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid device:receivedEventReport: nodeID: %@", self, nodeID); + return; + } + + if (!MTREventReportIsWellFormed(eventReport)) { + MTR_LOG_ERROR("%@ invalid device:receivedEventReport: eventReport: %@", self, eventReport); + return; + } + MTR_LOG("%s", __PRETTY_FUNCTION__); [self _lockAndCallDelegatesWithBlock:^(id delegate) { [delegate device:self receivedEventReport:eventReport]; @@ -161,6 +196,11 @@ - (oneway void)device:(NSNumber *)nodeID receivedEventReport:(NSArray delegate) { if ([delegate respondsToSelector:@selector(deviceBecameActive:)]) { @@ -171,6 +211,11 @@ - (oneway void)deviceBecameActive:(NSNumber *)nodeID - (oneway void)deviceCachePrimed:(NSNumber *)nodeID { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid deviceCachePrimed: nodeID: %@", self, nodeID); + return; + } + [self _lockAndCallDelegatesWithBlock:^(id delegate) { if ([delegate respondsToSelector:@selector(deviceCachePrimed:)]) { [delegate deviceCachePrimed:self]; @@ -180,6 +225,11 @@ - (oneway void)deviceCachePrimed:(NSNumber *)nodeID - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid deviceConfigurationChanged: nodeID: %@", self, nodeID); + return; + } + [self _lockAndCallDelegatesWithBlock:^(id delegate) { if ([delegate respondsToSelector:@selector(deviceConfigurationChanged:)]) { [delegate deviceConfigurationChanged:self]; @@ -187,14 +237,55 @@ - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID }]; } +static const auto * requiredInternalStateKeys = @[ kMTRDeviceInternalPropertyDeviceState, kMTRDeviceInternalPropertyLastSubscriptionAttemptWait ]; +static const auto * optionalInternalStateKeys = @[ kMTRDeviceInternalPropertyKeyVendorID, kMTRDeviceInternalPropertyKeyProductID, kMTRDeviceInternalPropertyNetworkFeatures, kMTRDeviceInternalPropertyMostRecentReportTime, kMTRDeviceInternalPropertyLastSubscriptionFailureTime ]; + +- (BOOL)_internalState:(NSDictionary *)dictionary hasValidValuesForKeys:(const NSArray *)keys valueRequired:(BOOL)required +{ + // All the keys are NSNumber-valued. + for (NSString * key in keys) { + id value = dictionary[key]; + if (!value) { + if (required) { + MTR_LOG_ERROR("%@ device:internalStateUpdated: handed state with no value for \"%@\": %@", self, key, value); + return NO; + } + + continue; + } + if (!MTR_SAFE_CAST(value, NSNumber)) { + MTR_LOG_ERROR("%@ device:internalStateUpdated: handed state with invalid value for \"%@\": %@", self, key, value); + return NO; + } + } + + return YES; +} + - (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary { + if (!MTR_SAFE_CAST(nodeID, NSNumber)) { + MTR_LOG_ERROR("%@ invalid device:internalStateUpdated: nodeID: %@", self, nodeID); + return; + } + + if (!MTR_SAFE_CAST(dictionary, NSDictionary)) { + MTR_LOG_ERROR("%@ invalid device:internalStateUpdated dictionary: %@", self, dictionary); + return; + } + + VerifyOrReturn([self _internalState:dictionary hasValidValuesForKeys:requiredInternalStateKeys valueRequired:YES]); + VerifyOrReturn([self _internalState:dictionary hasValidValuesForKeys:optionalInternalStateKeys valueRequired:NO]); + [self _setInternalState:dictionary]; MTR_LOG("%@ internal state updated", self); } #pragma mark - Remote Commands +// TODO: Figure out how to validate the return values for the various +// MTR_DEVICE_*_XPC macros below. + MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(state, MTRDeviceState, MTRDeviceStateUnknown, getStateWithReply) MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(deviceCachePrimed, BOOL, NO, getDeviceCachePrimedWithReply) MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(estimatedStartTime, NSDate * _Nullable, nil, getEstimatedStartTimeWithReply) @@ -263,7 +354,34 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID expectedValueInterval:expectedValueInterval timedInvokeTimeout:timeout serverSideProcessingTimeout:serverSideProcessingTimeout - completion:completion]; + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + if (values == nil && error == nil) { + MTR_LOG_ERROR("%@ got invoke response for (%@, %@, %@) without values or error", self, endpointID, clusterID, commandID); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]); + return; + } + + if (error != nil && !MTR_SAFE_CAST(error, NSError)) { + MTR_LOG_ERROR("%@ got invoke response for (%@, %@, %@) that has invalid error object: %@", self, endpointID, clusterID, commandID, error); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]); + return; + } + + if (values != nil && !MTRInvokeResponseIsWellFormed(values)) { + MTR_LOG_ERROR("%@ got invoke response for (%@, %@, %@) that has invalid data: %@", self, clusterID, commandID, values, values); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]); + return; + } + + if (values != nil && error != nil) { + MTR_LOG_ERROR("%@ got invoke response for (%@, %@, %@) with both values and error: %@, %@", self, endpointID, clusterID, commandID, values, error); + // Just propagate through the error. + completion(nil, error); + return; + } + + completion(values, error); + }]; } @catch (NSException * exception) { MTR_LOG_ERROR("Exception sending XPC message: %@", exception); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index da2ce72f59373d..c44b789060f895 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -7572,6 +7572,8 @@ typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) { MTRDeviceTypeIDTypeOTAProviderID MTR_NEWLY_AVAILABLE = 0x00000014, MTRDeviceTypeIDTypeContactSensorID MTR_NEWLY_AVAILABLE = 0x00000015, MTRDeviceTypeIDTypeRootNodeID MTR_NEWLY_AVAILABLE = 0x00000016, + MTRDeviceTypeIDTypeSolarPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000017, + MTRDeviceTypeIDTypeBatteryStorageID MTR_PROVISIONALLY_AVAILABLE = 0x00000018, MTRDeviceTypeIDTypeSecondaryNetworkInterfaceID MTR_NEWLY_AVAILABLE = 0x00000019, MTRDeviceTypeIDTypeSpeakerID MTR_NEWLY_AVAILABLE = 0x00000022, MTRDeviceTypeIDTypeCastingVideoPlayerID MTR_NEWLY_AVAILABLE = 0x00000023, @@ -7623,6 +7625,7 @@ typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) { MTRDeviceTypeIDTypePressureSensorID MTR_NEWLY_AVAILABLE = 0x00000305, MTRDeviceTypeIDTypeFlowSensorID MTR_NEWLY_AVAILABLE = 0x00000306, MTRDeviceTypeIDTypeHumiditySensorID MTR_NEWLY_AVAILABLE = 0x00000307, + MTRDeviceTypeIDTypeHeatPumpID MTR_PROVISIONALLY_AVAILABLE = 0x00000309, MTRDeviceTypeIDTypeEVSEID MTR_NEWLY_AVAILABLE = 0x0000050C, MTRDeviceTypeIDTypeDeviceEnergyManagementID MTR_NEWLY_AVAILABLE = 0x0000050D, MTRDeviceTypeIDTypeWaterHeaterID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index b4ea67c2ed66fe..fc9d8c7d930d88 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -32,6 +32,8 @@ { 0x00000014, MTRDeviceTypeClass::Utility, "OTA Provider" }, { 0x00000015, MTRDeviceTypeClass::Simple, "Contact Sensor" }, { 0x00000016, MTRDeviceTypeClass::Node, "Root Node" }, + { 0x00000017, MTRDeviceTypeClass::Simple, "Solar Power" }, + { 0x00000018, MTRDeviceTypeClass::Simple, "Battery Storage" }, { 0x00000019, MTRDeviceTypeClass::Utility, "Secondary Network Interface" }, { 0x00000022, MTRDeviceTypeClass::Simple, "Speaker" }, { 0x00000023, MTRDeviceTypeClass::Simple, "Casting Video Player" }, @@ -83,6 +85,7 @@ { 0x00000305, MTRDeviceTypeClass::Simple, "Pressure Sensor" }, { 0x00000306, MTRDeviceTypeClass::Simple, "Flow Sensor" }, { 0x00000307, MTRDeviceTypeClass::Simple, "Humidity Sensor" }, + { 0x00000309, MTRDeviceTypeClass::Simple, "Heat Pump" }, { 0x0000050C, MTRDeviceTypeClass::Simple, "EVSE" }, { 0x0000050D, MTRDeviceTypeClass::Simple, "Device Energy Management" }, { 0x0000050F, MTRDeviceTypeClass::Simple, "Water Heater" }, diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 3fa4ff45449f89..d5faaec24b63b3 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -27,6 +27,7 @@ #import "MTRCommandPayloadExtensions_Internal.h" #import "MTRDeviceClusterData.h" #import "MTRDeviceControllerLocalTestStorage.h" +#import "MTRDeviceDataValidation.h" #import "MTRDeviceStorageBehaviorConfiguration.h" #import "MTRDeviceTestDelegate.h" #import "MTRDevice_Internal.h" @@ -1505,7 +1506,14 @@ - (void)test017_TestMTRDeviceBasics [device unitTestInjectEventReport:@[ @{ MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(1) clusterID:@(1) eventID:@(1)], MTREventTimeTypeKey : @(MTREventTimeTypeTimestampDate), - MTREventTimestampDateKey : [NSDate date] + MTREventTimestampDateKey : [NSDate date], + MTREventIsHistoricalKey : @(NO), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventNumberKey : @(1), // Doesn't matter, in practice + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, } ]]; #endif }; @@ -4139,7 +4147,14 @@ - (void)test037_MTRDeviceMultipleDelegatesGetReports MTREventPathKey : [MTREventPath eventPathWithEndpointID:endpointID clusterID:clusterID eventID:eventID], MTREventTimeTypeKey : @(MTREventTimeTypeTimestampDate), MTREventTimestampDateKey : [NSDate date], - // For unit test no real data is needed, but timestamp is required + MTREventIsHistoricalKey : @(NO), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventNumberKey : @(1), // Doesn't matter, in practice + // Empty payload. + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, }; } @@ -5187,6 +5202,306 @@ - (void)test041_AttributeDataValueValidation } } +- (void)test042_AttributeReportWellFormedness +{ + __auto_type * testData = @[ + @{ + @"input" : @[], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : @(YES), + }, + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : @(YES), + }, + }, + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(1)], + MTRErrorKey : [NSError errorWithDomain:MTRErrorDomain code:0 userInfo:nil], + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(0)], + }, + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(1)], + MTRErrorKey : [NSError errorWithDomain:MTRErrorDomain code:0 userInfo:nil], + }, + ], + // Missing both error and data + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(6) attributeID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : @("abc"), + }, + }, + ], + // Data dictionary is broken. + @"valid" : @(NO), + }, + @{ + @"input" : @ {}, + // Input is not an array. + @"valid" : @(NO), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual(MTRAttributeReportIsWellFormed(test[@"input"]), [test[@"valid"] boolValue], + "input: %@", test[@"input"]); + } +} + +- (void)test043_EventReportWellFormedness +{ + __auto_type * testData = @[ + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRErrorKey : [NSError errorWithDomain:MTRErrorDomain code:0 userInfo:nil], + MTREventIsHistoricalKey : @(NO), + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @(5), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventTimeTypeKey : @(MTREventTimeTypeTimestampDate), + MTREventTimestampDateKey : [NSDate now], + MTREventIsHistoricalKey : @(NO), + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @(5), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventTimeTypeKey : @(MTREventTimeTypeSystemUpTime), + MTREventSystemUpTimeKey : @(5), + MTREventIsHistoricalKey : @(NO), + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @(5), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventTimeTypeKey : @(MTREventTimeTypeTimestampDate), + MTREventTimestampDateKey : @(5), + MTREventIsHistoricalKey : @(NO), + }, + ], + // Wrong date type + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @("abc"), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventTimeTypeKey : @(MTREventTimeTypeSystemUpTime), + MTREventSystemUpTimeKey : @(5), + MTREventIsHistoricalKey : @(NO), + }, + ], + // Wrong type of EventNumber + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @(5), + MTREventPriorityKey : @("abc"), + MTREventTimeTypeKey : @(MTREventTimeTypeSystemUpTime), + MTREventSystemUpTimeKey : @(5), + MTREventIsHistoricalKey : @(NO), + }, + ], + // Wrong type of EventPriority + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTREventPathKey : [MTREventPath eventPathWithEndpointID:@(0) clusterID:@(6) eventID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // No fields + }, + MTREventNumberKey : @(5), + MTREventPriorityKey : @(MTREventPriorityInfo), + MTREventTimeTypeKey : @("abc"), + MTREventSystemUpTimeKey : @(5), + MTREventIsHistoricalKey : @(NO), + }, + ], + // Wrong type of EventTimeType + @"valid" : @(NO), + }, + @{ + @"input" : @[ @(5) ], + // Wrong type of data entirely. + @"valid" : @(NO), + }, + @{ + @"input" : @ {}, + // Not even an array. + @"valid" : @(NO), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual(MTREventReportIsWellFormed(test[@"input"]), [test[@"valid"] boolValue], + "input: %@", test[@"input"]); + } +} + +- (void)test044_InvokeResponseWellFormedness +{ + __auto_type * testData = @[ + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + }, + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + }, + ], + // Multiple responses + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + MTRErrorKey : [NSError errorWithDomain:MTRErrorDomain code:0 userInfo:nil], + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // Empty structure, valid + }, + }, + ], + @"valid" : @(YES), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], // Empty structure, valid + }, + MTRErrorKey : [NSError errorWithDomain:MTRErrorDomain code:0 userInfo:nil], + }, + ], + // Having both data and error not valid. + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + }, + }, + ], + // Data is not a struct. + @"valid" : @(NO), + }, + @{ + @"input" : @[ + @{ + MTRCommandPathKey : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)], + MTRDataKey : @(6), + }, + ], + // Data is not a data-value at all.. + @"valid" : @(NO), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual(MTRInvokeResponseIsWellFormed(test[@"input"]), [test[@"valid"] boolValue], + "input: %@", test[@"input"]); + } +} + @end @interface MTRDeviceEncoderTests : XCTestCase diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index 721cb09b994e25..071566381cc69c 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -19,9 +19,9 @@ #import #import +#import "MTRDefines_Internal.h" #import "MTRDeviceClusterData.h" #import "MTRDeviceControllerLocalTestStorage.h" -#import "MTRDeviceDataValueDictionary.h" #import "MTRDeviceStorageBehaviorConfiguration.h" #import "MTRDeviceTestDelegate.h" #import "MTRDevice_Internal.h" diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h index b00507d665a9f0..591110b34ea712 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h @@ -18,8 +18,8 @@ #import #import +#import "MTRDefines_Internal.h" #import "MTRDeviceClusterData.h" -#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Internal.h" NS_ASSUME_NONNULL_BEGIN diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index a08a406778458e..6a802900d8d30c 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -134,7 +134,8 @@ 5109E9B72CB8B83D0006884B /* MTRDeviceTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */; }; 5109E9BA2CC1F23E0006884B /* MTRDeviceClusterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9B82CC1F23E0006884B /* MTRDeviceClusterData.h */; }; 5109E9BB2CC1F23E0006884B /* MTRDeviceClusterData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9B92CC1F23E0006884B /* MTRDeviceClusterData.mm */; }; - 5109E9BD2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */; }; + 5109E9C02CCAD64F0006884B /* MTRDeviceDataValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9BE2CCAD64F0006884B /* MTRDeviceDataValidation.h */; }; + 5109E9C12CCAD64F0006884B /* MTRDeviceDataValidation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9BF2CCAD64F0006884B /* MTRDeviceDataValidation.mm */; }; 510A07492A685D3900A9241C /* Matter.apinotes in Headers */ = {isa = PBXBuildFile; fileRef = 510A07482A685D3900A9241C /* Matter.apinotes */; settings = {ATTRIBUTES = (Public, ); }; }; 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */; }; 5117DD3829A931AE00FFA1AA /* MTROperationalBrowser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */; }; @@ -589,7 +590,8 @@ 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRDeviceTypeTests.m; sourceTree = ""; }; 5109E9B82CC1F23E0006884B /* MTRDeviceClusterData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceClusterData.h; sourceTree = ""; }; 5109E9B92CC1F23E0006884B /* MTRDeviceClusterData.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceClusterData.mm; sourceTree = ""; }; - 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceDataValueDictionary.h; sourceTree = ""; }; + 5109E9BE2CCAD64F0006884B /* MTRDeviceDataValidation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceDataValidation.h; sourceTree = ""; }; + 5109E9BF2CCAD64F0006884B /* MTRDeviceDataValidation.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceDataValidation.mm; sourceTree = ""; }; 510A07482A685D3900A9241C /* Matter.apinotes */ = {isa = PBXFileReference; lastKnownFileType = text.apinotes; name = Matter.apinotes; path = CHIP/Matter.apinotes; sourceTree = ""; }; 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTROperationalCertificateIssuerTests.m; sourceTree = ""; }; 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalBrowser.mm; sourceTree = ""; }; @@ -1425,7 +1427,8 @@ 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */, 5A6FEC9427B5976200F25F42 /* MTRDeviceControllerXPCConnection.h */, 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm */, - 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */, + 5109E9BE2CCAD64F0006884B /* MTRDeviceDataValidation.h */, + 5109E9BF2CCAD64F0006884B /* MTRDeviceDataValidation.mm */, 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */, 5A6FEC9727B5C6AF00F25F42 /* MTRDeviceOverXPC.mm */, 754784632BFE65B70089C372 /* MTRDeviceStorageBehaviorConfiguration.h */, @@ -1707,7 +1710,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 5109E9BD2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h in Headers */, 51D0B1282B617246006E3511 /* MTRServerEndpoint.h in Headers */, 51565CB62A7B0D6600469F18 /* MTRDeviceControllerParameters.h in Headers */, 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */, @@ -1767,6 +1769,7 @@ 516415FD2B6ACA8300D5CE11 /* MTRServerAccessControl.h in Headers */, 3CF134AB289D8DF70017A19E /* MTRDeviceAttestationInfo.h in Headers */, B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */, + 5109E9C02CCAD64F0006884B /* MTRDeviceDataValidation.h in Headers */, 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */, 88E07D612B9A89A4005FD53E /* MTRMetricKeys.h in Headers */, 3D4733B32BE2D1DA003DC19B /* MTRUtilities.h in Headers */, @@ -2157,6 +2160,7 @@ 7596A85528788557004DAE0E /* MTRClusters.mm in Sources */, 88EBF8CF27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm in Sources */, 5A6FEC9827B5C6AF00F25F42 /* MTRDeviceOverXPC.mm in Sources */, + 5109E9C12CCAD64F0006884B /* MTRDeviceDataValidation.mm in Sources */, 9BDA2A062C5D9AF800A32BDD /* MTRDevice_Concrete.mm in Sources */, 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */, 1E4D655229C30A8700BC3478 /* MTRCommissionableBrowser.mm in Sources */, diff --git a/src/lib/shell/MainLoopSilabs.cpp b/src/lib/shell/MainLoopSilabs.cpp index 8a8d60af2d6716..8613c48b552f6f 100644 --- a/src/lib/shell/MainLoopSilabs.cpp +++ b/src/lib/shell/MainLoopSilabs.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "matter_shell.h" +#include "MatterShell.h" #include "streamer.h" #include #include diff --git a/src/lwip/lwip.gni b/src/lwip/lwip.gni index 89b4808af8fa5a..cbbf0a4f74c901 100644 --- a/src/lwip/lwip.gni +++ b/src/lwip/lwip.gni @@ -14,7 +14,8 @@ declare_args() { # Have the lwIP library available. - chip_with_lwip = current_os != "zephyr" && current_os != "mbed" + chip_with_lwip = current_os != "zephyr" && current_os != "mbed" && + current_os != "mac" && current_os != "ios" # lwIP platform: standalone, freertos. lwip_platform = "" diff --git a/src/platform/Linux/ConnectivityUtils.cpp b/src/platform/Linux/ConnectivityUtils.cpp index 8084ceca43b55a..1b12bf5edb3c0e 100644 --- a/src/platform/Linux/ConnectivityUtils.cpp +++ b/src/platform/Linux/ConnectivityUtils.cpp @@ -272,6 +272,10 @@ InterfaceTypeEnum ConnectivityUtils::GetInterfaceConnectionType(const char * ifn if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) ret = InterfaceTypeEnum::kEthernet; } + else if (strncmp(ifname, "br", 2) == 0) + { + ret = InterfaceTypeEnum::kEthernet; + } close(sock); diff --git a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h index e8d392fb793604..c4e77e87b4b9ad 100644 --- a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h @@ -28,7 +28,11 @@ // ==================== Platform Adaptations ==================== #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#if CONFIG_CHIP_WIFI || CHIP_DEVICE_CONFIG_ENABLE_WPA +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#else #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 +#endif // CONFIG_CHIP_WIFI || CHIP_DEVICE_CONFIG_ENABLE_WPA #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 1fc16ed47f4d52..51fe90751ae219 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -102,7 +102,7 @@ source_set("efr32_test_main") { deps += [ "${chip_root}/third_party/openthread:openthread", "${chip_root}/third_party/openthread:openthread-platform", - "${examples_plat_dir}:efr-matter-shell", + "${examples_plat_dir}:matter-shell", ] } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 762cedbf1b5aa3..a1caa8052ae71e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -9091,53 +9091,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters } // namespace OperatingMode -namespace MaximumCheckInBackOff { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::IcdManagement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace MaximumCheckInBackOff - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) @@ -38777,98 +38730,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) namespace Chime { namespace Attributes { -namespace ActiveChimeID { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace ActiveChimeID - -namespace Enabled { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} - -} // namespace Enabled - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 98aebd50964980..bb11fdf51607d1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1431,12 +1431,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters MarkAttributeDirty markDirty); } // namespace OperatingMode -namespace MaximumCheckInBackOff { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace MaximumCheckInBackOff - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); @@ -5867,18 +5861,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar namespace Chime { namespace Attributes { -namespace ActiveChimeID { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace ActiveChimeID - -namespace Enabled { -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); -} // namespace Enabled - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 90be2632818072..430eb0bd3821fd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -6930,12 +6930,6 @@ bool emberAfWebRTCTransportRequestorClusterICECandidateCallback( bool emberAfWebRTCTransportRequestorClusterEndCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::WebRTCTransportRequestor::Commands::End::DecodableType & commandData); -/** - * @brief Chime Cluster PlayChimeSound Command callback (from client) - */ -bool emberAfChimeClusterPlayChimeSoundCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::Chime::Commands::PlayChimeSound::DecodableType & commandData); /** * @brief Commissioner Control Cluster RequestCommissioningApproval Command callback (from client) */ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp index 7c4c38ae6cec3f..caa60d3532e401 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -6389,6 +6389,10 @@ char const * DeviceTypeIdToText(chip::DeviceTypeId id) return "Contact Sensor"; case 0x00000016: return "Root Node"; + case 0x00000017: + return "Solar Power"; + case 0x00000018: + return "Battery Storage"; case 0x00000019: return "Secondary Network Interface"; case 0x00000022: @@ -6491,6 +6495,8 @@ char const * DeviceTypeIdToText(chip::DeviceTypeId id) return "Flow Sensor"; case 0x00000307: return "Humidity Sensor"; + case 0x00000309: + return "Heat Pump"; case 0x0000050C: return "EVSE"; case 0x0000050D: