From 64ae4d8e259b6c3997c4b9b12c3778e517a397cd Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 25 Feb 2025 05:16:27 -0800 Subject: [PATCH 1/8] Align XML definition for Push AV Stream Transport Cluster with spec (#37756) --- .../chip/push-av-stream-transport-cluster.xml | 8 ++++++-- .../zap-generated/cluster-objects.cpp | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml index f7123811868a06..59646c8cc6ee09 100644 --- a/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. XML generated by Alchemy; DO NOT EDIT. Source: src/app_clusters/PushAVStreamTransport.adoc Parameters: in-progress -Git: 1.4-534-g3214b3502 +Git: 0.7-summer-2025-177-gd33ec772f --> @@ -145,7 +145,7 @@ Git: 1.4-534-g3214b3502 - + Cameras Push AV Stream Transport 0x0555 PUSH_AV_STREAM_TRANSPORT_CLUSTER @@ -164,11 +164,13 @@ Git: 1.4-534-g3214b3502 This command SHALL allocate a transport and return a PushTransportConnectionID. + This command SHALL be generated in response to an AllocatePushTransport command. + @@ -203,11 +205,13 @@ Git: 1.4-534-g3214b3502 This command SHALL return the Stream Options Configuration for the specified push transport. + This command SHALL be generated in response to a FindTransport command. + diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 5e37f5c1688bda..5c3c082e5f4d9a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -37432,6 +37432,26 @@ bool CommandHasLargePayload(ClusterId aCluster, CommandId aCommand) { return true; } + if ((aCluster == Clusters::PushAvStreamTransport::Id) && + (aCommand == Clusters::PushAvStreamTransport::Commands::AllocatePushTransport::Id)) + { + return true; + } + if ((aCluster == Clusters::PushAvStreamTransport::Id) && + (aCommand == Clusters::PushAvStreamTransport::Commands::AllocatePushTransportResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::PushAvStreamTransport::Id) && + (aCommand == Clusters::PushAvStreamTransport::Commands::FindTransport::Id)) + { + return true; + } + if ((aCluster == Clusters::PushAvStreamTransport::Id) && + (aCommand == Clusters::PushAvStreamTransport::Commands::FindTransportResponse::Id)) + { + return true; + } return false; } From b5ed1b27cea521bd1573a3485296b654ee73ca3b Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Tue, 25 Feb 2025 14:57:27 +0100 Subject: [PATCH 2/8] Move GenericEventManagementTestEventTriggerHandler to separate source set (#37633) * Move some files to separate source set Move GenericEventManagementTestEventTriggerHandler to separate source set. Signed-off-by: Adrian Gielniewski * Add GeneralFaults header to platform library Signed-off-by: Adrian Gielniewski * [Infineon] Fix examples dependencies Add dependency to src/app/generic-event-management. Signed-off-by: Adrian Gielniewski --------- Signed-off-by: Adrian Gielniewski --- examples/platform/infineon/cyw30739/BUILD.gn | 5 ++++- src/app/BUILD.gn | 15 ++++++++++++--- src/platform/BUILD.gn | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/examples/platform/infineon/cyw30739/BUILD.gn b/examples/platform/infineon/cyw30739/BUILD.gn index 8ec7003633cd40..eacde3a87c912e 100644 --- a/examples/platform/infineon/cyw30739/BUILD.gn +++ b/examples/platform/infineon/cyw30739/BUILD.gn @@ -29,7 +29,10 @@ static_library("platform") { public_configs = [ ":${target_name}-config" ] - deps = [ app_data_model ] + deps = [ + "${chip_root}/src/app:generic-test-event-trigger-handler", + app_data_model, + ] } config("platform-config") { diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 62917c18188221..2c1f9a0b0b49f8 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -466,6 +466,18 @@ source_set("attribute-persistence") { ] } +source_set("generic-test-event-trigger-handler") { + sources = [ + "GenericEventManagementTestEventTriggerHandler.cpp", + "GenericEventManagementTestEventTriggerHandler.h", + ] + + public_deps = [ + ":test-event-trigger", + "${chip_root}/src/platform", + ] +} + # Note to developpers, instead of continuously adding files in the app librabry, it is recommand to create smaller source_sets that app can depend on. # This way, we can have a better understanding of dependencies and other componenets can depend on the different source_sets without needing to depend on the entire app library. static_library("app") { @@ -481,8 +493,6 @@ static_library("app") { "EventManagement.h", "FailSafeContext.cpp", "FailSafeContext.h", - "GenericEventManagementTestEventTriggerHandler.cpp", - "GenericEventManagementTestEventTriggerHandler.h", "OTAUserConsentCommon.h", "ReadHandler.cpp", "TimerDelegates.cpp", @@ -505,7 +515,6 @@ static_library("app") { ":global-attributes", ":interaction-model", ":path-expansion", - ":test-event-trigger", "${chip_root}/src/app/data-model", "${chip_root}/src/app/data-model-provider", "${chip_root}/src/app/icd/server:icd-server-config", diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index cbde538bf22aa9..2d48c57404e19e 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -472,6 +472,7 @@ if (chip_device_platform != "none") { "../include/platform/ConnectivityManager.h", "../include/platform/DeviceControlServer.h", "../include/platform/DeviceInstanceInfoProvider.h", + "../include/platform/GeneralFaults.h", "../include/platform/GeneralUtils.h", "../include/platform/KeyValueStoreManager.h", "../include/platform/KvsPersistentStorageDelegate.h", From 2ca05f9c4199566a2e08ee7ba725ebcfff71eb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pe=C3=B1aranda?= Date: Tue, 25 Feb 2025 11:01:39 -0300 Subject: [PATCH 3/8] Fix conformance errors on RVC app. (#37617) --- examples/rvc-app/rvc-common/rvc-app.matter | 43 ++++- examples/rvc-app/rvc-common/rvc-app.zap | 190 +++++++++++++++------ 2 files changed, 170 insertions(+), 63 deletions(-) diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 45a047db96da5b..80b69915da1f4c 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -546,6 +546,23 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 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; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1576,7 +1593,7 @@ provisional cluster ServiceArea = 336 { } endpoint 0 { - device type ma_rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 3; server cluster Descriptor { @@ -1592,7 +1609,6 @@ endpoint 0 { emits event AccessControlEntryChanged; emits event AccessControlExtensionChanged; callback attribute acl; - callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; @@ -1627,7 +1643,17 @@ endpoint 0 { callback attribute specificationVersion; callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; + ram attribute clusterRevision default = 4; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; } server cluster GeneralCommissioning { @@ -1637,7 +1663,7 @@ endpoint 0 { callback attribute locationCapability; callback attribute supportsConcurrentConnection; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 0x0001; + ram attribute clusterRevision default = 0x0002; handle command ArmFailSafe; handle command ArmFailSafeResponse; @@ -1650,8 +1676,6 @@ endpoint 0 { server cluster NetworkCommissioning { ram attribute maxNetworks; callback attribute networks; - ram attribute scanMaxTimeSeconds; - ram attribute connectMaxTimeSeconds; ram attribute interfaceEnabled; ram attribute lastNetworkingStatus; ram attribute lastNetworkID; @@ -1675,6 +1699,7 @@ endpoint 0 { ram attribute clusterRevision default = 1; handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; } server cluster GeneralDiagnostics { @@ -1751,7 +1776,7 @@ endpoint 0 { } } endpoint 1 { - device type ma_robotic_vacuum_cleaner = 116, version 1; + device type ma_robotic_vacuum_cleaner = 116, version 3; server cluster Identify { @@ -1761,7 +1786,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; handle command Identify; handle command TriggerEffect; @@ -1817,7 +1842,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command Pause; handle command Resume; diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index 4e4425222fc925..a7dd9b7ec8d8d2 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -54,7 +54,7 @@ } ], "deviceVersions": [ - 1 + 3 ], "deviceIdentifiers": [ 22 @@ -193,22 +193,6 @@ "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, @@ -693,7 +677,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "3", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -724,6 +708,128 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -888,7 +994,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x0002", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1010,38 +1116,6 @@ "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, @@ -1155,6 +1229,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -1983,7 +2065,7 @@ } ], "deviceVersions": [ - 1 + 3 ], "deviceIdentifiers": [ 116 @@ -2124,7 +2206,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2762,7 +2844,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, From d389bf4e6a0ecd75b8a1314ff384dd98947a2152 Mon Sep 17 00:00:00 2001 From: Jenny Gallegos <72410844+jennygaz@users.noreply.github.com> Date: Tue, 25 Feb 2025 14:02:42 +0000 Subject: [PATCH 4/8] Update ZAP file to fix `lit-icd-app` conformance (#37518) * Update ZAP conformances on both endpoints, versions * Enable Power Source with ZAP tool * Add BAT conformance to Power Source cluster * Re-Add NetworkCommissioning conformances * Regenerate matter file to match ZAP updates --- .../lit-icd-common/lit-icd-server-app.matter | 378 ++++++++++++++---- .../lit-icd-common/lit-icd-server-app.zap | 335 ++++++++++++---- 2 files changed, 549 insertions(+), 164 deletions(-) diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 642406f5552c1f..465ab9f083cc96 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -622,82 +622,21 @@ cluster OtaSoftwareUpdateProvider = 41 { command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } -/** Provides an interface for downloading and applying OTA software updates */ -cluster OtaSoftwareUpdateRequestor = 42 { +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { 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; + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 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 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; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions @@ -726,6 +665,265 @@ cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + 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; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1844,7 +2042,7 @@ cluster IcdManagement = 70 { } endpoint 0 { - device type ma_rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 3; device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -1864,7 +2062,6 @@ endpoint 0 { server cluster AccessControl { emits event AccessControlEntryChanged; callback attribute acl; - callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; @@ -1896,21 +2093,17 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; + ram attribute clusterRevision default = 4; } - 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; + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; - - handle command AnnounceOTAProvider; } server cluster UnitLocalization { @@ -1921,6 +2114,21 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster PowerSource { + ram attribute status; + ram attribute order; + ram attribute description; + ram attribute batChargeLevel; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 3; + } + server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -1931,7 +2139,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command ArmFailSafe; handle command ArmFailSafeResponse; @@ -2002,7 +2210,7 @@ endpoint 0 { callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster WiFiNetworkDiagnostics { @@ -2128,7 +2336,7 @@ endpoint 0 { } } endpoint 1 { - device type ma_contactsensor = 21, version 1; + device type ma_contactsensor = 21, version 2; server cluster Identify { @@ -2138,7 +2346,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + ram attribute clusterRevision default = 5; handle command Identify; handle command TriggerEffect; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index db31e23cda9236..3eafdc4d2d0c7b 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -19,18 +19,18 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/zcl/zcl.json", - "type": "zcl-properties", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", "category": "matter", - "version": 1, - "description": "Matter SDK ZCL data" + "version": "chip-v1" }, { "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", "category": "matter", - "version": "chip-v1" + "version": 1, + "description": "Matter SDK ZCL data" } ], "endpointTypes": [ @@ -62,7 +62,7 @@ ], "deviceVersions": [ 1, - 1 + 3 ], "deviceIdentifiers": [ 17, @@ -250,22 +250,6 @@ "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": 0, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SubjectsPerAccessControlEntry", "code": 2, @@ -727,7 +711,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "3", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -760,6 +744,14 @@ "isIncoming": 0, "isEnabled": 1 }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "ApplyUpdateRequest", "code": 2, @@ -787,26 +779,32 @@ ] }, { - "name": "OTA Software Update Requestor", - "code": 42, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [ + "attributes": [ { - "name": "AnnounceOTAProvider", + "name": "ActiveLocale", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "DefaultOTAProviders", - "code": 0, + "name": "SupportedLocales", + "code": 1, "mfgCode": null, "side": "server", "type": "array", @@ -821,48 +819,48 @@ "reportableChange": 0 }, { - "name": "UpdatePossible", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UpdateState", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "UpdateStateEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UpdateStateProgress", - "code": 3, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -896,43 +894,222 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "StateTransition", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1 + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "VersionApplied", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1 + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "DownloadError", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1 + "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": "Unit Localization", - "code": 45, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", + "define": "POWER_SOURCE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -991,7 +1168,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1007,7 +1184,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1227,7 +1404,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -2013,7 +2190,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3413,7 +3590,7 @@ } ], "deviceVersions": [ - 1 + 2 ], "deviceIdentifiers": [ 21 @@ -3554,7 +3731,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, From 9c49f284743d5eaf99d969c45126fef00bbbfbfe Mon Sep 17 00:00:00 2001 From: aabgd Date: Tue, 25 Feb 2025 11:13:49 -0300 Subject: [PATCH 5/8] Changed timing in TC-CC-3.1 to fix the wrap problem and removed manual steps (#37336) * steps 1x and 2x * updated 3x and 4x * updated 3x * deleted manual steps from 3x * Updated labels in 3b and 3c * updated comments * removed comments * updated 2x and 3x with tolerance in change and added comments * updated 4x, 5x with tolerance in change and added comments --- .../suites/certification/Test_TC_CC_3_1.yaml | 141 ++++++++---------- 1 file changed, 63 insertions(+), 78 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index ed4cf48f1dea58..30dc9840186ab0 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -39,7 +39,7 @@ tests: arguments: value: 0 - - label: "Step 1b: H sends On command to DUT" + - label: "Step 1b: TH sends On command to DUT" PICS: OO.S.C01.Rsp cluster: "On/Off" command: "On" @@ -98,14 +98,15 @@ tests: - name: "ms" value: 10000 + # In 10s, the value will have changed by (120-60)*10/30 = 20. A 15% tolerance is 3, so value must be in range 80+/-3 => [77, 83] - label: "Step 2c: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 68 - maxValue: 92 + minValue: 77 + maxValue: 83 - label: "Wait 10s" PICS: CC.S.F00 @@ -116,14 +117,15 @@ tests: - name: "ms" value: 10000 + # In 20s, the value will have changed by (120-60)*20/30 = 40. A 15% tolerance is 6, so value must be in range 100+/-6 => [94, 106] - label: "Step 2d: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 85 - maxValue: 115 + minValue: 94 + maxValue: 106 - label: "Wait 10s" PICS: CC.S.F00 @@ -134,14 +136,15 @@ tests: - name: "ms" value: 10000 + # In 30s, the value will have changed by (120-60)*30/30 = 60. A 15% tolerance is 9, so value must be in range 120+/-9 => [111, 129] - label: "Step 2e: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 102 - maxValue: 138 + minValue: 111 + maxValue: 129 - label: "Wait 5s" PICS: CC.S.F00 @@ -158,8 +161,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 102 - maxValue: 138 + minValue: 111 + maxValue: 129 - label: "Step 3a: TH sends MoveToHue command to DUT with Hue=60, @@ -206,61 +209,45 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 10s" + - label: "Wait 5s" PICS: CC.S.F00 cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10000 + value: 5000 - #https://github.com/CHIP-Specifications/chip-test-scripts/issues/416#issuecomment-1228072461 + # In 30s, the value will have changed by 180 (total change) + # In 5s, the value will have changed by 180*5/30 = 30. A 15% tolerance is 4.5, so ~5, and value must be in range 30+/-5 => [25, 35] - label: "Step 3c: TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP - verification: | - ./chip-tool colorcontrol read current-hue 1 1 - Verify response contains a CurrentHue value in TH(chip-tool) Logs: - - [1649661849.854961][8307:8312] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087274517 - [1649661849.855019][8307:8312] CHIP:TOO: current hue: 0 (value can vary) - [1649661849.855097][8307:8312] CHIP:EM: Sending Standalone Ack for MessageCounter:13414799 on exchange 39735i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 25 + maxValue: 35 - - label: "Wait 10s" + - label: "Wait 15s" PICS: CC.S.F00 cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 10000 + value: 15000 - #https://github.com/CHIP-Specifications/chip-test-scripts/issues/493#issuecomment-1422075950 + # In 20s, the value will have changed by 180*20/30 = 120. A 15% tolerance is 18, so value must be in range + # 60-120 = 255-60 = 195+/-18 => [177, 213] - label: "Step 3d: TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP - verification: | - ./chip-tool colorcontrol read current-hue 1 1 - - After another 10 seconds , Verify that CurrentHue value as 195 On TH(chip-tool) Logs: - [1649661821.298198][8292:8297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087274517 - [1649661821.298271][8292:8297] CHIP:TOO: current hue: 195 (value can vary) - [1649661821.298374][8292:8297] CHIP:EM: Sending Standalone Ack for MessageCounter:13643708 on exchange 28536i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 177 + maxValue: 213 - label: "Wait 10s" PICS: CC.S.F00 @@ -271,24 +258,16 @@ tests: - name: "ms" value: 10000 - #https://github.com/CHIP-Specifications/chip-test-scripts/issues/493#issuecomment-1422075950 + # In 30s, the value will have changed by 180*30/30 = 180. A 15% tolerance is 27, so value must be in range + # 60-180 = 255-120 = 135+/-27 => [108, 162] - label: "Step 3e: TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP - verification: | - ./chip-tool colorcontrol read current-hue 1 1 - After another 10 seconds , Verify that CurrentHue value as 135 On TH(chip-tool) Logs: - - [1649661821.298198][8292:8297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087274517 - [1649661821.298271][8292:8297] CHIP:TOO: current hue: 135 - [1649661821.298374][8292:8297] CHIP:EM: Sending Standalone Ack for MessageCounter:13643708 on exchange 28536i" - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 108 + maxValue: 162 - label: "Wait 5s" PICS: CC.S.F00 @@ -305,8 +284,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 115 - maxValue: 155 + minValue: 108 + maxValue: 162 - label: "Step 4a: TH sends MoveToHue command to DUT with Hue=60, @@ -362,14 +341,15 @@ tests: - name: "ms" value: 10000 + # In 10s, the value will have changed by (120-60)*10/30 = 20. A 15% tolerance is 3, so value must be in range 80+/-3 => [77, 83] - label: "Step 4c: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 68 - maxValue: 92 + minValue: 77 + maxValue: 83 - label: "Wait 10s" PICS: CC.S.F00 @@ -380,14 +360,15 @@ tests: - name: "ms" value: 10000 + # In 20s, the value will have changed by (120-60)*20/30 = 40. A 15% tolerance is 6, so value must be in range 100+/-6 => [94, 106] - label: "Step 4d: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 85 - maxValue: 115 + minValue: 94 + maxValue: 106 - label: "Wait 10s" PICS: CC.S.F00 @@ -398,14 +379,15 @@ tests: - name: "ms" value: 10000 + # In 30s, the value will have changed by (120-60)*30/30 = 60. A 15% tolerance is 9, so value must be in range 120+/-9 => [111, 129] - label: "Step 4e: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 102 - maxValue: 138 + minValue: 111 + maxValue: 129 - label: "Wait 5s" PICS: CC.S.F00 @@ -422,8 +404,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 102 - maxValue: 138 + minValue: 111 + maxValue: 129 - label: "Step 5a: TH sends MoveToHue command to DUT with Hue=120, @@ -479,14 +461,15 @@ tests: - name: "ms" value: 10000 + # In 10s, the value will have changed by (120-60)*10/30 = 20. A 15% tolerance is 3, so value must be in range 100+/-3 => [97, 103] - label: "Step 5c: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 85 - maxValue: 115 + minValue: 97 + maxValue: 103 - label: "Wait 10s" PICS: CC.S.F00 @@ -497,14 +480,15 @@ tests: - name: "ms" value: 10000 + # In 20s, the value will have changed by (120-60)*20/30 = 40. A 15% tolerance is 6, so value must be in range 80+/-6 => [74, 86] - label: "Step 5d: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - minValue: 68 - maxValue: 92 + minValue: 74 + maxValue: 86 - label: "Wait 10s" PICS: CC.S.F00 @@ -515,6 +499,7 @@ tests: - name: "ms" value: 10000 + # In 30s, the value will have changed by (120-60)*30/30 = 60. A 15% tolerance is 9, so value must be in range 60+/-9 => [51, 69] - label: "Step 5e: TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" From 18dd4365b8c5f6b4d62093330fe46c9cfb8a3a24 Mon Sep 17 00:00:00 2001 From: Steven Cooreman <4510034+stevew817@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:55:19 +0100 Subject: [PATCH 6/8] [EFR32] Fix missing include of stdio when using snprintf in mbedtls (#37763) Usage of MBEDTLS_PLATFORM_NO_STD_FUNCTIONS means the mbedtls headers are not including stdio by default, leading to usage of snprintf without prior declaration in x509_csr.c. --- src/platform/silabs/efr32/efr32-chip-mbedtls-config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h index d846bfdfe1ae47..466d27c865fc2a 100644 --- a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h +++ b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h @@ -95,6 +95,8 @@ #define MBEDTLS_ECDSA_DETERMINISTIC #endif // SL_MATTER_PROVISION_FLASH +// If defining snprintf we are also responsible for including its declaration +#include #define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf #define MBEDTLS_AES_ROM_TABLES From 9298ce79a090ebc83d1a35cf6fa0b1af080623b3 Mon Sep 17 00:00:00 2001 From: andrei-menzopol <96489227+andrei-menzopol@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:32:42 +0200 Subject: [PATCH 7/8] [NXP] Fix OTA Factory Data compilation (#37703) * [nxp][platform][common] Remove FactoryDataProviderImpl header The PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER macro is set in e different source_set (nxp_factory_data) than nxp_ota where it is used (OTAFactoryDataProcessor.cpp) so it doesn't compile. However FactoryDataProviderImpl is not used in OTAFactoryDataProcessor.cpp so it can be removed. Signed-off-by: Andrei Menzopol * [nxp][platform][mcxw71] Remove FactoryDataProviderImpl header The PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER macro is set in e different source_set (nxp_factory_data) than nxp_ota where it is used (OTAFactoryDataProcessor.cpp) so it doesn't compile. However FactoryDataProviderImpl is not used in OTAFactoryDataProcessor.cpp so it can be removed. Signed-off-by: Andrei Menzopol * Restyled by clang-format --------- Signed-off-by: Andrei Menzopol Co-authored-by: Restyled.io --- src/platform/nxp/common/ota/OTAFactoryDataProcessor.h | 8 +++----- src/platform/nxp/mcxw71_k32w1/BUILD.gn | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h index 570a33ceed5924..9865b2a31fbd00 100644 --- a/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h +++ b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h @@ -24,14 +24,12 @@ #include #include #include -#include PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER namespace chip { -using FactoryProvider = DeviceLayer::FactoryDataProvider; -using FactoryProviderImpl = DeviceLayer::FactoryDataProviderImpl; -using FactoryDataDriver = DeviceLayer::FactoryDataDriver; -using Tags = FactoryProvider::FactoryDataId; +using FactoryProvider = DeviceLayer::FactoryDataProvider; +using FactoryDataDriver = DeviceLayer::FactoryDataDriver; +using Tags = FactoryProvider::FactoryDataId; /** * OTA custom payload that uses Matter TLVs. diff --git a/src/platform/nxp/mcxw71_k32w1/BUILD.gn b/src/platform/nxp/mcxw71_k32w1/BUILD.gn index df4a711f691371..d23295535f00c6 100644 --- a/src/platform/nxp/mcxw71_k32w1/BUILD.gn +++ b/src/platform/nxp/mcxw71_k32w1/BUILD.gn @@ -43,8 +43,6 @@ source_set("nxp_factory_data") { "${chip_root}/src/credentials/CertificationDeclaration.h", ] - defines = [ "PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.h\"" ] - deps = [ ":nxp_platform", "${chip_root}/src/credentials:credentials", From ba981253f3749b6a5edca1955b9670211e819daf Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 26 Feb 2025 07:44:04 +1300 Subject: [PATCH 8/8] Allow platforms to disable BLE-related device events and add BleLayer state accessors (#37759) --- src/ble/BleConfig.h | 10 ++++++++++ src/ble/BleLayer.h | 4 +++- src/include/platform/CHIPDeviceEvent.h | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ble/BleConfig.h b/src/ble/BleConfig.h index c6d7877081f340..90a5daf60fdb03 100644 --- a/src/ble/BleConfig.h +++ b/src/ble/BleConfig.h @@ -129,6 +129,16 @@ #define BLE_READ_REQUEST_CONTEXT void * #endif // BLE_READ_REQUEST_CONTEXT +/** + * @def BLE_USES_DEVICE_EVENTS + * + * @brief Whether the platform uses / supports BLE-related device events. + * @see chip::DeviceLayer::ChipDeviceEvent + */ +#ifndef BLE_USES_DEVICE_EVENTS +#define BLE_USES_DEVICE_EVENTS 1 +#endif + /** * @def BLE_MAX_RECEIVE_WINDOW_SIZE * diff --git a/src/ble/BleLayer.h b/src/ble/BleLayer.h index 7056a09e5e14d6..5a98c6d3079b14 100644 --- a/src/ble/BleLayer.h +++ b/src/ble/BleLayer.h @@ -223,7 +223,7 @@ class DLL_EXPORT BleLayer kState_NotInitialized = 0, kState_Initialized = 1, kState_Disconnecting = 2 - } mState; ///< [READ-ONLY] Current state + } mState; ///< [READ-ONLY] external access is deprecated, use IsInitialized() / IsBleClosing() // This app state is not used by ble transport etc, it will be used by external ble implementation like Android void * mAppState = nullptr; @@ -236,7 +236,9 @@ class DLL_EXPORT BleLayer chip::System::Layer * systemLayer); CHIP_ERROR Init(BlePlatformDelegate * platformDelegate, BleConnectionDelegate * connDelegate, BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer); + bool IsInitialized() { return mState != kState_NotInitialized; } void IndicateBleClosing(); + bool IsBleClosing() { return mState == kState_Disconnecting; } void Shutdown(); CHIP_ERROR CancelBleIncompleteConnection(); diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 9618d93f5faa05..71a1b2b454ad00 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -381,7 +381,10 @@ typedef void (*AsyncWorkFunct)(intptr_t arg); #include CHIPDEVICEPLATFORMEVENT_HEADER #endif // defined(CHIP_DEVICE_LAYER_TARGET) +#if CONFIG_NETWORK_LAYER_BLE #include +#endif + #include #include #include @@ -467,6 +470,7 @@ struct ChipDeviceEvent final uint8_t SessionType; bool IsCommissioner; } SessionEstablished; +#if CONFIG_NETWORK_LAYER_BLE && BLE_USES_DEVICE_EVENTS struct { BLE_CONNECTION_OBJECT ConId; @@ -493,6 +497,7 @@ struct ChipDeviceEvent final { BLE_CONNECTION_OBJECT ConId; } CHIPoBLENotifyConfirm; +#endif // CONFIG_NETWORK_LAYER_BLE && BLE_USES_DEVICE_EVENTS #if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF struct {