From 9db615b3192a0930899807655eaf45a47978019f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 31 Aug 2023 17:20:18 -0400 Subject: [PATCH 01/29] Modify Matter.framework to allow per-controller storage. (#28533) * Modify Matter.framework to allow per-controller storage. This also allows starting multiple controllers with different node IDs on a single fabric. Public API changes: * It's now possible to initialize MTRDeviceControllerFactoryParams without storage. When a factory is then started with those params, it will expect storage to be provided for every controller that is created. * Controllers to be created in the new setup use MTRDeviceControllerStartupParameters, not MTRDeviceControllerStartupParams. * When starting a controller, API clients provide a UUID for that controller (which is then exposed on the MTRDeviceController) and a storage delegate. * For now, the only supported controller startup mode is for the client to provide the full certificate chain, operational key and vendor ID, via MTRDeviceControllerExternalCertificateStartupParameters. For controllers that will commission devices, that means also providing an MTROperationalCertificateIssuer. * The new "create a controller" API is called createController. * The new MTRDeviceControllerStorageDelegate API provides some context for the key/value pairs in terms of whether they need to be stored in encrypted storage or not, and whether they can be shared across multiple devices and under what conditions. Implementation notes: * MTRDemuxingStorage handles directing storage requests to the right per-controller storage object. * MTRDeviceControllerDataStore wraps the raw storage delegate and provides a semantic API on top of its key/value storage for the storage operations we actually want to perform. * MTRSessionResumptionStorageBridge implements session resumption storage, acting as an adapter between the Matter session resumption storage API and MTRDeviceControllerDataStore. In particular, it happens locating the right controller(s) to talk to and so on. This avoids dealing with the default Matter implementation's use of non-fabric-index-scoped keys for storing session resumption information. Fixes https://github.com/project-chip/connectedhomeip/issues/27394 * Require consumers to provide a dispatch queue for the storage delegate. * Address review comments. * Apply spelling/grammar suggestions from code review Co-authored-by: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> * Address review comments. * Address more review comments. * Address more review comments. * Address more review comments. * Add some validation when deserializing node IDs and CATs. * Stop trusting the secure coding stuff to actually enforce types correctly. For built-in types it seems to not do that. * Remove NSMutableArray and NSSet from controller storage classes, since we no longer encode those. --------- Co-authored-by: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> --- .../Framework/CHIP/MTRDemuxingStorage.h | 70 + .../Framework/CHIP/MTRDemuxingStorage.mm | 416 ++++++ .../Framework/CHIP/MTRDeviceController.h | 5 + .../Framework/CHIP/MTRDeviceController.mm | 29 +- .../CHIP/MTRDeviceControllerDataStore.h | 66 + .../CHIP/MTRDeviceControllerDataStore.mm | 359 ++++++ .../CHIP/MTRDeviceControllerFactory.h | 40 +- .../CHIP/MTRDeviceControllerFactory.mm | 356 +++++- .../MTRDeviceControllerFactory_Internal.h | 9 + .../MTRDeviceControllerStartupParameters.h | 89 ++ .../CHIP/MTRDeviceControllerStartupParams.mm | 254 +++- ...TRDeviceControllerStartupParams_Internal.h | 67 +- .../CHIP/MTRDeviceControllerStorageDelegate.h | 110 ++ .../CHIP/MTRDeviceController_Internal.h | 15 +- .../CHIP/MTRSessionResumptionStorageBridge.h | 59 + .../CHIP/MTRSessionResumptionStorageBridge.mm | 149 +++ src/darwin/Framework/CHIP/Matter.h | 2 + .../Framework/CHIPTests/MTRControllerTests.m | 7 - .../CHIPTests/MTRPerControllerStorageTests.m | 1124 +++++++++++++++++ .../Matter.xcodeproj/project.pbxproj | 36 + 20 files changed, 3195 insertions(+), 67 deletions(-) create mode 100644 src/darwin/Framework/CHIP/MTRDemuxingStorage.h create mode 100644 src/darwin/Framework/CHIP/MTRDemuxingStorage.mm create mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h create mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm create mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h create mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h create mode 100644 src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h create mode 100644 src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm create mode 100644 src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m diff --git a/src/darwin/Framework/CHIP/MTRDemuxingStorage.h b/src/darwin/Framework/CHIP/MTRDemuxingStorage.h new file mode 100644 index 00000000000000..bfff6369800bc7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDemuxingStorage.h @@ -0,0 +1,70 @@ +/** + * 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 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 + +#include +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * A PersistentStorageDelegate implementation that does the following: + * + * 1) Ensures that any "global" storage keys are stored in RAM as needed so that + * the Matter stack has access to them. + * 2) Hands off fabric-index-specific keys to the controller that corresponds to + * that fabric index, if any. + */ +class MTRDemuxingStorage : public chip::PersistentStorageDelegate { +public: + MTRDemuxingStorage(MTRDeviceControllerFactory * factory); + ~MTRDemuxingStorage() {} + + // PersistentStorageDelegate API. + CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; + + CHIP_ERROR SyncSetKeyValue(const char * key, const void * value, uint16_t size) override; + + CHIP_ERROR SyncDeleteKeyValue(const char * key) override; + +private: + /** + * Methods for reading/writing/deleting things. The index-specific ones + * will have the "f/index/" bit already stripped of from the front of the key. + */ + NSData * _Nullable GetGlobalValue(NSString * key); + NSData * _Nullable GetIndexSpecificValue(chip::FabricIndex index, NSString * key); + + CHIP_ERROR SetGlobalValue(NSString * key, NSData * data); + CHIP_ERROR SetIndexSpecificValue(chip::FabricIndex index, NSString * key, NSData * data); + + CHIP_ERROR DeleteGlobalValue(NSString * key); + CHIP_ERROR DeleteIndexSpecificValue(chip::FabricIndex index, NSString * key); + + /** + * Methods for modifying our in-memory store for fully qualified keys. + */ + NSData * _Nullable GetInMemoryValue(NSString * key); + CHIP_ERROR SetInMemoryValue(NSString * key, NSData * data); + CHIP_ERROR DeleteInMemoryValue(NSString * key); + + MTRDeviceControllerFactory * mFactory; + NSMutableDictionary * mInMemoryStore; +}; + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm b/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm new file mode 100644 index 00000000000000..5d4162ef321c55 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm @@ -0,0 +1,416 @@ +/** + * 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 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 "MTRDemuxingStorage.h" + +#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRDeviceController_Internal.h" +#import "MTRLogging_Internal.h" + +#include +#include +#include + +using namespace chip; + +static bool IsGlobalKey(NSString * key) { return [key hasPrefix:@"g/"]; } + +/** + * Checks for a key that is scoped to a specific fabric index. + */ +static bool IsIndexSpecificKey(NSString * key) { return [key hasPrefix:@"f/"]; } + +/** + * Extracts the fabric index from an index-specific key. Fails if the key + * is not index-specific or if a numeric FabricIndex could not be extracted + * from it. + */ +static CHIP_ERROR ExtractIndexFromKey(NSString * key, FabricIndex * index) +{ + if (!IsIndexSpecificKey(key)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * components = [key componentsSeparatedByString:@"/"]; + if (components.count < 3) { + // Unexpected "f/something" without any actual data. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * indexString = components[1]; + auto * scanner = [NSScanner scannerWithString:indexString]; + + auto * charset = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdefABCDEF"]; + charset = [charset invertedSet]; + + if ([scanner scanCharactersFromSet:charset intoString:nil] == YES) { + // Leading non-hex chars. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + unsigned int value; + if ([scanner scanHexInt:&value] == NO) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (scanner.atEnd == NO) { + // Trailing garbage chars. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CanCastTo(value)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + *index = static_cast(value); + return CHIP_NO_ERROR; +} + +/** + * Extracts the "index-specific" part of an index-specific key (i.e. the + * part after "f/index/"). + */ +static CHIP_ERROR ExtractIndexSpecificKey(NSString * key, NSString * __autoreleasing * extractedKey) +{ + if (!IsIndexSpecificKey(key)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * components = [key componentsSeparatedByString:@"/"]; + if (components.count < 3) { + // Unexpected "f/something" without any actual data. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + components = [components subarrayWithRange:NSMakeRange(2, components.count - 2)]; + *extractedKey = [components componentsJoinedByString:@"/"]; + return CHIP_NO_ERROR; +} + +/** + * Method to test whether a global key should be stored in memory only, as + * opposed to being passed on to the actual storage related to controllers. + */ +static bool IsMemoryOnlyGlobalKey(NSString * key) +{ + if ([key isEqualToString:@"g/fidx"]) { + // Fabric index list only needs to be stored in-memory, not persisted, + // because we do not tie controllers to specific fabric indices. + return true; + } + + if ([key isEqualToString:@"g/fs/c"] || [key isEqualToString:@"g/fs/n"]) { + // Just store the fail-safe markers in memory as well. We could + // plausibly not store them at all, since we never actually need to + // clean up anything by fabric index, but this is safer in case + // consumers try to read back right after writing. + return true; + } + + if ([key isEqualToString:@"g/lkgt"]) { + // Store Last Known Good Time in memory only. We never need this in + // general, because we can always provide the wall-clock time. + return true; + } + + // We do not expect to see the "g/sri" or "g/s/*" keys for session + // resumption, because we implement SessionResumptionStorage ourselves. + + // For now, put group global counters in memory. + // TODO: we should inject a group counter manager that makes these counters + // per-controller, not globally handled via storage. + // See https://github.com/project-chip/connectedhomeip/issues/28510 + if ([key isEqualToString:@"g/gdc"] || [key isEqualToString:@"g/gcc"]) { + return true; + } + + // We do not expect to see "g/userlbl/*" User Label keys. + + // We do not expect to see the "g/gfl" key for endpoint-to-group + // associations. + + // We do not expect to see the "g/a/*" keys for attribute values. + + // We do not expect to see the "g/bt" and "g/bt/*" keys for the binding + // table. + + // We do not expect to see the "g/o/*" OTA Requestor keys. + + // We do not expect to see the "g/im/ec" event number counter key. + + // We do not expect to see the "g/su/*" and "g/sum" keys for server-side + // subscription resumption storage. + + // We do not expect to see the "g/scc/*" scenes keys. + + // We do not expect to see the "g/ts/tts", "g/ts/dntp", "g/ts/tz", + // "g/ts/dsto" Time Synchronization keys. + + return false; +} + +/** + * Method to test whether an index-specific key should be stored in memory only, as + * opposed to being passed on to the actual storage related to controllers. + * The key string will have the "f/index/" bit already stripped off the + * front of the key. + */ +static bool IsMemoryOnlyIndexSpecificKey(NSString * key) +{ + // Store all the fabric table bits in memory only. This is done because the + // fabric table expects none of these things to be stored in the case of a + // "new fabric addition", which is what we always do when using + // per-controller storage. + // + // TODO: Figure out which, if any, of these things we should also store for + // later recall when starting a controller with storage we have used before. + // + // For future reference: + // + // n == NOC + // i == ICAC + // r == RCAC + // m == Fabric metadata (TLV containing the vendor ID) + // o == operational key, only written if internally generated. + if ([key isEqualToString:@"n"] || [key isEqualToString:@"i"] || [key isEqualToString:@"r"] || [key isEqualToString:@"m"] || + [key isEqualToString:@"o"]) { + return true; + } + + // We do not expect to see the "s/*" keys for session resumption, because we + // implement SessionResumptionStorage ourselves. + + // We do not expect to see the "ac/*" keys for ACL entries. + + // We do not expect to see the "g" or "g/*" keys for which endpoints are in which + // group. + + // For now, just store group keysets and group keys in memory. + // TODO: We want to start persisting these, per-controller, if we're going + // to support group keys. Or inject a GroupDataProvider of our own instead + // of using Credentials::GroupDataProviderImp and then + // not be tied to whatever storage format that uses. + // https://github.com/project-chip/connectedhomeip/issues/28511 + if ([key hasPrefix:@"gk/"] || [key hasPrefix:@"k/"]) { + return true; + } + + // We do not expect to see the "icd/*" keys for the ICD Management table. + + // We do not expect to see the "e/*" scenes keys. + + return false; +} + +/** + * Method to convert an index-specific key into a fully qualified key. + */ +static NSString * FullyQualifiedKey(FabricIndex index, NSString * key) +{ + return [NSString stringWithFormat:@"f/%x/%s", index, key.UTF8String]; +} + +MTRDemuxingStorage::MTRDemuxingStorage(MTRDeviceControllerFactory * factory) + : mFactory(factory) +{ + mInMemoryStore = [[NSMutableDictionary alloc] init]; +} + +CHIP_ERROR MTRDemuxingStorage::SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) +{ + assertChipStackLockedByCurrentThread(); + if (buffer == nullptr && size != 0) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + NSString * keyString = [NSString stringWithUTF8String:key]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Sync Get Value for Key: %@", keyString); +#endif + + NSData * value; + if (IsGlobalKey(keyString)) { + value = GetGlobalValue(keyString); + } else if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + value = GetIndexSpecificValue(index, keyString); + } else { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (value == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + + if (value.length > UINT16_MAX) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + uint16_t valueSize = static_cast(value.length); + if (valueSize > size) { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + size = valueSize; + + if (size != 0) { + // buffer is known to be non-null here. + memcpy(buffer, value.bytes, size); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRDemuxingStorage::SyncSetKeyValue(const char * key, const void * value, uint16_t size) +{ + if (value == nullptr && size != 0) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + NSString * keyString = [NSString stringWithUTF8String:key]; + NSData * valueData = (value == nullptr) ? [NSData data] : [NSData dataWithBytes:value length:size]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Set Key %@", keyString); +#endif + + if (IsGlobalKey(keyString)) { + return SetGlobalValue(keyString, valueData); + } + + if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + return SetIndexSpecificValue(index, keyString, valueData); + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + +CHIP_ERROR MTRDemuxingStorage::SyncDeleteKeyValue(const char * key) +{ + NSString * keyString = [NSString stringWithUTF8String:key]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Delete Key: %@", keyString); +#endif + + if (IsGlobalKey(keyString)) { + return DeleteGlobalValue(keyString); + } + + if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + return DeleteIndexSpecificValue(index, keyString); + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + +NSData * _Nullable MTRDemuxingStorage::GetGlobalValue(NSString * key) +{ + if (IsMemoryOnlyGlobalKey(key)) { + return GetInMemoryValue(key); + } + + MTR_LOG_ERROR("MTRDemuxingStorage reading unknown global key: %@", key); + + return nil; +} + +NSData * _Nullable MTRDemuxingStorage::GetIndexSpecificValue(FabricIndex index, NSString * key) +{ + if (IsMemoryOnlyIndexSpecificKey(key)) { + return GetInMemoryValue(FullyQualifiedKey(index, key)); + } + + return nil; +} + +CHIP_ERROR MTRDemuxingStorage::SetGlobalValue(NSString * key, NSData * data) +{ + if (IsMemoryOnlyGlobalKey(key)) { + // Fabric index list only needs to be stored in-memory, not persisted, + // because we do not tie controllers to specific fabric indices. + return SetInMemoryValue(key, data); + } + + MTR_LOG_ERROR("MTRDemuxingStorage setting unknown global key: %@", key); + + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +CHIP_ERROR MTRDemuxingStorage::SetIndexSpecificValue(FabricIndex index, NSString * key, NSData * data) +{ + if ([key isEqualToString:@"n"]) { + // Index-scoped "n" is NOC. + auto * controller = [mFactory runningControllerForFabricIndex:index]; + if (controller == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + ReturnErrorOnFailure([controller.controllerDataStore storeLastLocallyUsedNOC:data]); + } + + if (IsMemoryOnlyIndexSpecificKey(key)) { + return SetInMemoryValue(FullyQualifiedKey(index, key), data); + } + + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteGlobalValue(NSString * key) +{ + if (IsMemoryOnlyGlobalKey(key)) { + return DeleteInMemoryValue(key); + } + + MTR_LOG_ERROR("MTRDemuxingStorage deleting unknown global key: %@", key); + + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteIndexSpecificValue(FabricIndex index, NSString * key) +{ + if (IsMemoryOnlyIndexSpecificKey(key)) { + return DeleteInMemoryValue(FullyQualifiedKey(index, key)); + } + + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} + +NSData * _Nullable MTRDemuxingStorage::GetInMemoryValue(NSString * key) { return mInMemoryStore[key]; } + +CHIP_ERROR MTRDemuxingStorage::SetInMemoryValue(NSString * key, NSData * data) +{ + mInMemoryStore[key] = data; + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteInMemoryValue(NSString * key) +{ + BOOL present = (mInMemoryStore[key] != nil); + if (present) { + [mInMemoryStore removeObjectForKey:key]; + } + return present ? CHIP_NO_ERROR : CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index fce1a88002aaf8..670e12bbd0caaf 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -47,6 +47,11 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS */ @property (readonly, nonatomic, getter=isRunning) BOOL running; +/** + * The ID assigned to this controller at creation time. + */ +@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE; + /** * Return the Node ID assigned to the controller. Will return nil if the * controller is not running (and hence does not know its node id). diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 4b2c32d9c2bf0d..403bc8a0906183 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -114,9 +114,30 @@ @interface MTRDeviceController () { @implementation MTRDeviceController -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory + queue:(dispatch_queue_t)queue + storageDelegate:(id _Nullable)storageDelegate + storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier { if (self = [super init]) { + // Make sure our storage is all set up to work as early as possible, + // before we start doing anything else with the controller. + _uniqueIdentifier = uniqueIdentifier; + if (storageDelegate != nil) { + if (storageDelegateQueue == nil) { + MTR_LOG_ERROR("storageDelegate provided without storageDelegateQueue"); + return nil; + } + + _controllerDataStore = [[MTRDeviceControllerDataStore alloc] initWithController:self + storageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue]; + if (_controllerDataStore == nil) { + return nil; + } + } + _chipWorkQueue = queue; _factory = factory; _deviceMapLock = OS_UNFAIR_LOCK_INIT; @@ -191,8 +212,11 @@ - (void)shutDownCppController // _cppCommissioner, so we're not in a state where we claim to be // running but are actually partially shut down. _cppCommissioner = nullptr; - _storedFabricIndex = chip::kUndefinedFabricIndex; commissionerToShutDown->Shutdown(); + // Don't clear out our fabric index association until controller + // shutdown completes, in case it wants to write to storage as it + // shuts down. + _storedFabricIndex = chip::kUndefinedFabricIndex; delete commissionerToShutDown; if (_operationalCredentialsDelegate != nil) { _operationalCredentialsDelegate->SetDeviceCommissioner(nullptr); @@ -365,6 +389,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams // bring-up. commissionerParams.removeFromFabricTableOnShutdown = false; commissionerParams.deviceAttestationVerifier = _factory.deviceAttestationVerifier; + commissionerParams.permitMultiControllerFabrics = startupParams.allowMultipleControllersPerFabric; auto & factory = chip::Controller::DeviceControllerFactory::GetInstance(); diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h new file mode 100644 index 00000000000000..8d10c7af3e810b --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -0,0 +1,66 @@ +/** + * 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 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 +#import +#import + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Interface that represents a single CASE session resumption entry. + */ +MTR_HIDDEN +@interface MTRCASESessionResumptionInfo : NSObject +@property (nonatomic) NSNumber * nodeID; +@property (nonatomic) NSData * resumptionID; +@property (nonatomic) NSData * sharedSecret; +@property (nonatomic) NSSet * caseAuthenticatedTags; +@end + +/** + * Interface that wraps a type-safe API around + * MTRDeviceControllerStorageDelegate. + */ +MTR_HIDDEN +@interface MTRDeviceControllerDataStore : NSObject + +- (nullable instancetype)initWithController:(MTRDeviceController *)controller + storageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue; + +/** + * Resumption info APIs. + */ +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByNodeID:(NSNumber *)nodeID; +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByResumptionID:(NSData *)resumptionID; +- (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo; +- (void)clearAllResumptionInfo; + +/** + * Storage of the last NOC we used on this device. This is local-only storage, + * because it's used to invalidate (or not) the local-only session resumption + * storage. + */ +- (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc; +- (MTRCertificateTLVBytes _Nullable)fetchLastLocallyUsedNOC; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm new file mode 100644 index 00000000000000..4732009ade3513 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -0,0 +1,359 @@ +/** + * 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 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 "MTRDeviceControllerDataStore.h" +#import "MTRLogging_Internal.h" + +#include +#include +#include + +// FIXME: Are these good key strings? https://github.com/project-chip/connectedhomeip/issues/28973 +static NSString * sResumptionNodeListKey = @"caseResumptionNodeList"; +static NSString * sLastLocallyUsedNOCKey = @"lastLocallyUsedControllerNOC"; + +static NSString * ResumptionByNodeIDKey(NSNumber * nodeID) +{ + return [NSString stringWithFormat:@"caseResumptionByNodeID/%llx", nodeID.unsignedLongLongValue]; +} + +static NSString * ResumptionByResumptionIDKey(NSData * resumptionID) +{ + return + [NSString stringWithFormat:@"caseResumptionByResumptionID/%s", [resumptionID base64EncodedStringWithOptions:0].UTF8String]; +} + +static bool IsUnsignedIntegerNumber(id _Nullable value) +{ + if (value == nil) { + return false; + } + + if (![value isKindOfClass:[NSNumber class]]) { + return false; + } + + NSNumber * number = value; + + // Not sure how to check for the number being an integer. + + if ([number compare:@(0)] == NSOrderedAscending) { + return false; + } + + return true; +} + +static bool IsValidNodeIDNumber(id _Nullable value) +{ + // Node IDs cannot be negative. + if (!IsUnsignedIntegerNumber(value)) { + return false; + } + + NSNumber * number = value; + + // Validate that this is a valid operational ID, not some garbage unsigned + // int value that can't be a node id. + uint64_t unsignedValue = number.unsignedLongLongValue; + if (!chip::IsOperationalNodeId(unsignedValue)) { + return false; + } + + return true; +} + +static bool IsValidCATNumber(id _Nullable value) +{ + // CATs cannot be negative. + if (!IsUnsignedIntegerNumber(value)) { + return false; + } + + NSNumber * number = value; + + // Validate that this is a valid CAT value and, not some garbage unsigned int + // value that can't be a CAT. + uint64_t unsignedValue = number.unsignedLongLongValue; + if (!chip::CanCastTo(unsignedValue)) { + return false; + } + + auto tag = static_cast(unsignedValue); + if (!chip::IsValidCASEAuthTag(tag)) { + return false; + } + + return true; +} + +@implementation MTRDeviceControllerDataStore { + id _storageDelegate; + dispatch_queue_t _storageDelegateQueue; + MTRDeviceController * _controller; + // Array of nodes with resumption info, oldest-stored first. + NSMutableArray * _nodesWithResumptionInfo; +} + +- (nullable instancetype)initWithController:(MTRDeviceController *)controller + storageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue +{ + if (!(self = [super init])) { + return nil; + } + + _controller = controller; + _storageDelegate = storageDelegate; + _storageDelegateQueue = storageDelegateQueue; + + __block id resumptionNodeList; + dispatch_sync(_storageDelegateQueue, ^{ + resumptionNodeList = [_storageDelegate controller:_controller + valueForKey:sResumptionNodeListKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + if (resumptionNodeList != nil) { + if (![resumptionNodeList isKindOfClass:[NSArray class]]) { + MTR_LOG_ERROR("List of CASE resumption node IDs is not an array"); + return nil; + } + for (id value in resumptionNodeList) { + if (!IsValidNodeIDNumber(value)) { + MTR_LOG_ERROR("Resumption node ID contains invalid value: %@", value); + return nil; + } + } + _nodesWithResumptionInfo = [NSMutableArray arrayWithCapacity:[resumptionNodeList count]]; + [_nodesWithResumptionInfo addObjectsFromArray:resumptionNodeList]; + } else { + _nodesWithResumptionInfo = [[NSMutableArray alloc] init]; + } + return self; +} + +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByNodeID:(NSNumber *)nodeID +{ + return [self _findResumptionInfoWithKey:ResumptionByNodeIDKey(nodeID)]; +} + +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByResumptionID:(NSData *)resumptionID +{ + return [self _findResumptionInfoWithKey:ResumptionByResumptionIDKey(resumptionID)]; +} + +- (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo +{ + auto * oldInfo = [self findResumptionInfoByNodeID:resumptionInfo.nodeID]; + dispatch_sync(_storageDelegateQueue, ^{ + if (oldInfo != nil) { + // Remove old resumption id key. No need to do that for the + // node id, because we are about to overwrite it. + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByResumptionIDKey(oldInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_nodesWithResumptionInfo removeObject:resumptionInfo.nodeID]; + } + + [_storageDelegate controller:_controller + storeValue:resumptionInfo + forKey:ResumptionByNodeIDKey(resumptionInfo.nodeID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_storageDelegate controller:_controller + storeValue:resumptionInfo + forKey:ResumptionByResumptionIDKey(resumptionInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + + // Update our resumption info node list. + [_nodesWithResumptionInfo addObject:resumptionInfo.nodeID]; + [_storageDelegate controller:_controller + storeValue:[NSArray arrayWithArray:_nodesWithResumptionInfo] + forKey:sResumptionNodeListKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); +} + +- (void)clearAllResumptionInfo +{ + // Can we do less dispatch? We would need to have a version of + // _findResumptionInfoWithKey that assumes we are already on the right queue. + for (NSNumber * nodeID in _nodesWithResumptionInfo) { + auto * oldInfo = [self findResumptionInfoByNodeID:nodeID]; + if (oldInfo != nil) { + dispatch_sync(_storageDelegateQueue, ^{ + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByResumptionIDKey(oldInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByNodeIDKey(oldInfo.nodeID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + } + } + + [_nodesWithResumptionInfo removeAllObjects]; +} + +- (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc +{ + __block BOOL ok; + dispatch_sync(_storageDelegateQueue, ^{ + ok = [_storageDelegate controller:_controller + storeValue:noc + forKey:sLastLocallyUsedNOCKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + return ok ? CHIP_NO_ERROR : CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +- (MTRCertificateTLVBytes _Nullable)fetchLastLocallyUsedNOC +{ + __block id data; + dispatch_sync(_storageDelegateQueue, ^{ + data = [_storageDelegate controller:_controller + valueForKey:sLastLocallyUsedNOCKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + + if (data == nil) { + return nil; + } + + if (![data isKindOfClass:[NSData class]]) { + return nil; + } + + return data; +} + +- (nullable MTRCASESessionResumptionInfo *)_findResumptionInfoWithKey:(nullable NSString *)key +{ + // key could be nil if [NSString stringWithFormat] returns nil for some reason. + if (key == nil) { + return nil; + } + + __block id resumptionInfo; + dispatch_sync(_storageDelegateQueue, ^{ + resumptionInfo = [_storageDelegate controller:_controller + valueForKey:key + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + + if (resumptionInfo == nil) { + return nil; + } + + if (![resumptionInfo isKindOfClass:[MTRCASESessionResumptionInfo class]]) { + return nil; + } + + return resumptionInfo; +} + +@end + +@implementation MTRCASESessionResumptionInfo + +#pragma mark - NSSecureCoding + +static NSString * const sNodeIDKey = @"nodeID"; +static NSString * const sResumptionIDKey = @"resumptionID"; +static NSString * const sSharedSecretKey = @"sharedSecret"; +static NSString * const sCATsKey = @"CATs"; + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (nullable instancetype)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _nodeID = [decoder decodeObjectOfClass:[NSNumber class] forKey:sNodeIDKey]; + // For some built-in classes decoder will decode to them even if we ask for a + // different class (!). So sanity-check what we got. + if (_nodeID != nil && ![_nodeID isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for node ID, not NSNumber.", _nodeID); + return nil; + } + if (!IsValidNodeIDNumber(_nodeID)) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo node ID has invalid value: %@", _nodeID); + return nil; + } + + _resumptionID = [decoder decodeObjectOfClass:[NSData class] forKey:sResumptionIDKey]; + if (_resumptionID != nil && ![_resumptionID isKindOfClass:[NSData class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for resumption ID, not NSData.", _resumptionID); + return nil; + } + + _sharedSecret = [decoder decodeObjectOfClass:[NSData class] forKey:sSharedSecretKey]; + if (_sharedSecret != nil && ![_sharedSecret isKindOfClass:[NSData class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for shared secret, not NSData.", _sharedSecret); + return nil; + } + + auto caseAuthenticatedTagArray = [decoder decodeArrayOfObjectsOfClass:[NSNumber class] forKey:sCATsKey]; + for (id value in caseAuthenticatedTagArray) { + if (!IsValidCATNumber(value)) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo CASE tag has invalid value: %@", value); + return nil; + } + + // Range-checking will be done when we try to convert the set to CATValues. + } + + _caseAuthenticatedTags = [NSSet setWithArray:caseAuthenticatedTagArray]; + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:self.nodeID forKey:sNodeIDKey]; + [coder encodeObject:self.resumptionID forKey:sResumptionIDKey]; + [coder encodeObject:self.sharedSecret forKey:sSharedSecretKey]; + // Encode the CATs as an array, so that we can decodeArrayOfObjectsOfClass + // to get type-safe decoding for them. + [coder encodeObject:[self.caseAuthenticatedTags allObjects] forKey:sCATsKey]; +} + +@end + +NSSet * MTRDeviceControllerStorageClasses() +{ + static NSSet * const sStorageClasses = [NSSet setWithArray:@[ + [NSNumber class], + [NSData class], + [NSArray class], + [MTRCASESessionResumptionInfo class], + ]]; + return sStorageClasses; +} diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h index 0423aeae585c70..6471db8b005ccb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h @@ -22,6 +22,7 @@ #import #import +#import NS_ASSUME_NONNULL_BEGIN @@ -37,9 +38,11 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRDeviceControllerFactoryParams : NSObject /* - * Storage delegate must be provided for correct functioning of Matter - * controllers. It is used to store persistent information for the fabrics the - * controllers ends up interacting with. + * Storage used to store persistent information for the fabrics the + * controllers ends up interacting with. This is only used if "initWithStorage" + * is used to initialize the MTRDeviceControllerFactoryParams. If "init" is + * used, this property will contain a dummy storage that will not be used for + * anything. */ @property (nonatomic, strong, readonly) id storage; @@ -83,8 +86,19 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) */ @property (nonatomic, assign) BOOL shouldStartServer; -- (instancetype)init NS_UNAVAILABLE; +/* + * Initialize the device controller factory with storage. In this mode, the + * storage will be used to store various information needed by the Matter + * framework. + */ - (instancetype)initWithStorage:(id)storage; + +/* + * Initialize the device controller factory without storage. In this mode, + * device controllers will need to have per-controller storage provided to allow + * storing controller-specific information. + */ +- (instancetype)init MTR_NEWLY_AVAILABLE; @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -145,6 +159,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The fabric is identified by the root public key and fabric id in * the startupParams. + * + * This method can only be used if the factory was initialized with storage. + * When using per-controller storage, use createController. */ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error; @@ -156,10 +173,25 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The fabric is identified by the root public key and fabric id in * the startupParams. + * + * This method can only be used if the factory was initialized with storage. + * When using per-controller storage, use createController. */ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error; +/** + * Create an MTRDeviceController. Returns nil on failure. + * + * This method will fail if there is already a controller running for the given + * node identity. + * + * This method will fail if the controller factory was not initialized in + * storage-per-controller mode. + */ +- (MTRDeviceController * _Nullable)createController:(MTRDeviceControllerStartupParameters *)startupParameters + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + @end MTR_DEPRECATED( diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 64e4af1ba29fc9..95282450952ef2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -20,6 +20,7 @@ #import "MTRAttestationTrustStoreBridge.h" #import "MTRCertificates.h" #import "MTRControllerAccessControl.h" +#import "MTRDemuxingStorage.h" #import "MTRDeviceController.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" @@ -32,6 +33,7 @@ #import "MTROperationalBrowser.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" +#import "MTRSessionResumptionStorageBridge.h" #import "NSDataSpanConversion.h" #import @@ -55,6 +57,7 @@ using namespace chip::Controller; static NSString * const kErrorPersistentStorageInit = @"Init failure while creating a persistent storage delegate"; +static NSString * const kErrorSessionResumptionStorageInit = @"Init failure while creating a session resumption storage delegate"; static NSString * const kErrorAttestationTrustStoreInit = @"Init failure while creating the attestation trust store"; static NSString * const kErrorDACVerifierInit = @"Init failure while creating the device attestation verifier"; static NSString * const kErrorGroupProviderInit = @"Init failure while initializing group data provider"; @@ -90,21 +93,36 @@ @interface MTRDeviceControllerFactory () @property () chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; @property (readonly) BOOL advertiseOperational; @property (nonatomic, readonly) Credentials::IgnoreCertificateValidityPeriodPolicy * certificateValidityPolicy; -// Lock used to serialize access to the "controllers" array, since it needs to -// be touched from both whatever queue is starting controllers and from the -// Matter queue. The way this lock is used assumes that: +@property (readonly) MTRSessionResumptionStorageBridge * sessionResumptionStorage; +// Lock used to serialize access to the "controllers" array and the +// "_controllerBeingStarted" and "_controllerBeingShutDown" ivars, since those +// need to be touched from both whatever queue is starting controllers and from +// the Matter queue. The way this lock is used assumes that: +// +// 1) The only mutating accesses to the controllers array and the ivars happen +// when the current queue is not the Matter queue or in a block that was +// sync-dispatched to the Matter queue. This is a good assumption, because +// the implementations of the functions that mutate these do sync dispatch to +// the Matter queue, which would deadlock if they were called when that queue +// was the current queue. // -// 1) The only mutating accesses to the controllers array happen when the -// current queue is not the Matter queue. This is a good assumption, because -// the implementation of the functions that mutate the array do sync dispatch -// to the Matter queue, which would deadlock if they were called when that -// queue was the current queue. // 2) It's our API consumer's responsibility to serialize access to us from // outside. // -// This means that we only take the lock around mutations of the array and -// accesses to the array that are from code running on the Matter queue. - +// These assumptions mean that if we are in a block that was sync-dispatched to +// the Matter queue, that block cannot race with either the Matter queue nor the +// non-Matter queue. Similarly, if we are in a situation where the Matter queue +// has been shut down, any accesses to the variables cannot race anything else. +// +// This means that: +// +// A. In a sync-dispatched block, or if the Matter queue has been shut down, we +// do not need to lock and can do read or write access. +// B. Apart from item A, mutations of the array and ivars must happen outside the +// Matter queue and must lock. +// C. Apart from item A, accesses on the Matter queue must be reads only and +// must lock. +// D. Locking around reads not from the Matter queue is OK but not required. @property (nonatomic, readonly) os_unfair_lock controllersLock; - (BOOL)findMatchingFabric:(FabricTable &)fabricTable @@ -114,7 +132,34 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; @end -@implementation MTRDeviceControllerFactory +@interface MTRDeviceControllerFactoryParams () + +// Flag to keep track of whether our .storage is real consumer-provided storage +// or just the fake thing we made up. +@property (nonatomic, assign) BOOL hasStorage; + +@end + +@implementation MTRDeviceControllerFactory { + // _usingPerControllerStorage is only written once, during controller + // factory start. After that it is only read, and can be read from + // arbitrary threads. + BOOL _usingPerControllerStorage; + + // See documentation for controllersLock above for the rules for accessing + // _controllerBeingStarted. + MTRDeviceController * _controllerBeingStarted; + + // See documentation for controllersLock above for the rules for access + // _controllerBeingShutDown. + MTRDeviceController * _controllerBeingShutDown; + + // Next available fabric index. Only valid when _controllerBeingStarted is + // non-nil, and then it corresponds to the controller being started. This + // is only accessed on the Matter queue or after the Matter queue has shut + // down. + FabricIndex _nextAvailableFabricIndex; +} + (void)initialize { @@ -273,12 +318,23 @@ - (void)cleanupStartupObjects _opCertStore = nullptr; } + if (_sessionResumptionStorage) { + delete _sessionResumptionStorage; + _sessionResumptionStorage = nullptr; + } + if (_persistentStorageDelegate) { delete _persistentStorageDelegate; _persistentStorageDelegate = nullptr; } } +- (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable +{ + return fabricTable.Init( + { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); +} + - (nullable NSArray *)knownFabrics { [self _assertCurrentQueueIsNotMatterQueue]; @@ -291,9 +347,7 @@ - (void)cleanupStartupObjects __block BOOL listFilled = NO; auto fillListBlock = ^{ FabricTable fabricTable; - CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegate, - .operationalKeystore = self->_keystore, - .opCertStore = self->_opCertStore }); + CHIP_ERROR err = [self _initFabricTable:fabricTable]; if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't initialize fabric table when getting known fabrics: %s", err.AsString()); return; @@ -348,7 +402,22 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegate = new MTRPersistentStorageDelegateBridge(startupParams.storage); + if (startupParams.hasStorage) { + _persistentStorageDelegate = new (std::nothrow) MTRPersistentStorageDelegateBridge(startupParams.storage); + _sessionResumptionStorage = nullptr; + _usingPerControllerStorage = NO; + } else { + _persistentStorageDelegate = new (std::nothrow) MTRDemuxingStorage(self); + _sessionResumptionStorage = new (std::nothrow) MTRSessionResumptionStorageBridge(self); + _usingPerControllerStorage = YES; + + if (_sessionResumptionStorage == nil) { + MTR_LOG_ERROR("Error: %@", kErrorSessionResumptionStorageInit); + errorCode = CHIP_ERROR_NO_MEMORY; + return; + } + } + if (_persistentStorageDelegate == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); errorCode = CHIP_ERROR_NO_MEMORY; @@ -486,6 +555,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams params.operationalKeystore = _keystore; params.opCertStore = _opCertStore; params.certificateValidityPolicy = _certificateValidityPolicy; + params.sessionResumptionStorage = _sessionResumptionStorage; errorCode = _controllerFactory->Init(params); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorControllerFactoryInit); @@ -559,7 +629,7 @@ - (void)stopControllerFactory * return nil if pre-startup fabric table checks fail, and set fabricError to * the right error value in that situation. */ -- (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams +- (MTRDeviceController * _Nullable)_startDeviceController:(id)startupParams fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)(FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError))fabricChecker @@ -572,9 +642,45 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt return nil; } + id storageDelegate; + dispatch_queue_t storageDelegateQueue; + NSUUID * uniqueIdentifier; + if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParameters class]]) { + MTRDeviceControllerStartupParameters * params = startupParams; + storageDelegate = params.storageDelegate; + storageDelegateQueue = params.storageDelegateQueue; + uniqueIdentifier = params.uniqueIdentifier; + } else if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParams class]]) { + MTRDeviceControllerStartupParams * params = startupParams; + storageDelegate = nil; + storageDelegateQueue = nil; + uniqueIdentifier = params.uniqueIdentifier; + } else { + MTR_LOG_ERROR("Unknown kind of startup params: %@", startupParams); + return nil; + } + + if (_usingPerControllerStorage && storageDelegate == nil) { + MTR_LOG_ERROR("Must have a controller storage delegate when we do not have storage for the controller factory"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } + return nil; + } + + if (!_usingPerControllerStorage && storageDelegate != nil) { + MTR_LOG_ERROR("Must not have a controller storage delegate when we have storage for the controller factory"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } + return nil; + } + // Create the controller, so we start the event loop, since we plan to do // our fabric table operations there. - auto * controller = [self createController]; + auto * controller = [self _createController:storageDelegate + storageDelegateQueue:storageDelegateQueue + uniqueIdentifier:uniqueIdentifier]; if (controller == nil) { if (error != nil) { *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; @@ -591,7 +697,39 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt FabricTable * fabricTable = &fabricTableInstance; dispatch_sync(_chipWorkQueue, ^{ + fabricError = [self _initFabricTable:*fabricTable]; + if (fabricError != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't initialize fabric table: %s", fabricError.AsString()); + return; + } + params = fabricChecker(fabricTable, controller, fabricError); + + if (params == nil) { + return; + } + + // Check that we are not trying to start a controller with a uniqueIdentifier that + // matches a running controller. + auto * controllersCopy = [self getRunningControllers]; + for (MTRDeviceController * existing in controllersCopy) { + if (existing != controller && [existing.uniqueIdentifier compare:params.uniqueIdentifier] == NSOrderedSame) { + MTR_LOG_ERROR("Already have running controller with uniqueIdentifier %@", existing.uniqueIdentifier); + fabricError = CHIP_ERROR_INVALID_ARGUMENT; + params = nil; + return; + } + } + + // Save off the next available fabric index, in case we are starting a + // controller with a new fabric index. This just needs to happen before + // we set _controllerBeingStarted below. + fabricError = fabricTable->PeekFabricIndexForNextAddition(self->_nextAvailableFabricIndex); + if (fabricError != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Out of space in the fabric table"); + params = nil; + return; + } }); if (params == nil) { @@ -602,7 +740,16 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt return nil; } + os_unfair_lock_lock(&_controllersLock); + _controllerBeingStarted = controller; + os_unfair_lock_unlock(&_controllersLock); + BOOL ok = [controller startup:params]; + + os_unfair_lock_lock(&_controllersLock); + _controllerBeingStarted = nil; + os_unfair_lock_unlock(&_controllersLock); + if (ok == NO) { // TODO: get error from controller's startup. if (error != nil) { @@ -625,6 +772,16 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo { [self _assertCurrentQueueIsNotMatterQueue]; + if (_usingPerControllerStorage) { + // We can never have an "existing fabric" for a new controller to be + // created on, in the sense of createControllerOnExistingFabric. + MTR_LOG_ERROR("Can't createControllerOnExistingFabric when using per-controller data store"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + return nil; + } + return [self _startDeviceController:startupParams fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { @@ -728,11 +885,36 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl error:error]; } -- (MTRDeviceController * _Nullable)createController +- (MTRDeviceController * _Nullable)createController:(MTRDeviceControllerStartupParameters *)startupParameters + error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; - MTRDeviceController * controller = [[MTRDeviceController alloc] initWithFactory:self queue:_chipWorkQueue]; + return [self _startDeviceController:startupParameters + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + return + [[MTRDeviceControllerStartupParamsInternal alloc] initForNewController:controller + fabricTable:fabricTable + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParameters + error:fabricError]; + } + error:error]; +} + +- (MTRDeviceController * _Nullable)_createController:(id _Nullable)storageDelegate + storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier +{ + [self _assertCurrentQueueIsNotMatterQueue]; + + MTRDeviceController * controller = [[MTRDeviceController alloc] initWithFactory:self + queue:_chipWorkQueue + storageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue + uniqueIdentifier:uniqueIdentifier]; if (controller == nil) { MTR_LOG_ERROR("Failed to init controller"); return nil; @@ -761,7 +943,7 @@ - (MTRDeviceController * _Nullable)createController // Returns NO on failure, YES on success. If YES is returned, the // outparam will be written to, but possibly with a null value. // -// fabricTable should be an un-initialized fabric table. It needs to +// fabricTable should be an initialized fabric table. It needs to // outlive the consumer's use of the FabricInfo we return, which is // why it's provided by the caller. - (BOOL)findMatchingFabric:(FabricTable &)fabricTable @@ -770,16 +952,9 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable { assertChipStackLockedByCurrentThread(); - CHIP_ERROR err = fabricTable.Init( - { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't initialize fabric table: %s", ErrorStr(err)); - return NO; - } - Crypto::P256PublicKey pubKey; if (params.rootCertificate != nil) { - err = ExtractPubkeyFromX509Cert(AsByteSpan(params.rootCertificate), pubKey); + CHIP_ERROR err = ExtractPubkeyFromX509Cert(AsByteSpan(params.rootCertificate), pubKey); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't extract public key from root certificate: %s", ErrorStr(err)); return NO; @@ -787,7 +962,7 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable } else { // No root certificate means the nocSigner is using the root keys, because // consumers must provide a root certificate whenever an ICA is used. - err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(params.nocSigner.publicKey, &pubKey); + CHIP_ERROR err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(params.nocSigner.publicKey, &pubKey); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't extract public key from MTRKeypair: %s", ErrorStr(err)); return NO; @@ -850,9 +1025,33 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller } os_unfair_lock_lock(&_controllersLock); + // Make sure to set _controllerBeingShutDown and do the remove in the same + // locked section, so there is never a time when the controller is gone from + // both places as viewed from the Matter thread, as long as it's locking + // around its reads. + _controllerBeingShutDown = controller; [_controllers removeObject:controller]; os_unfair_lock_unlock(&_controllersLock); + // Snapshot the controller's fabric index, if any, before it clears it + // out in shutDownCppController. + __block FabricIndex controllerFabricIndex = controller.fabricIndex; + + // This block runs either during sync dispatch to the Matter queue or after + // Matter queue shutdown, so it can touch any of our members without + // worrying about locking, since nothing else will race it. + auto sharedCleanupBlock = ^{ + assertChipStackLockedByCurrentThread(); + + [controller shutDownCppController]; + + self->_controllerBeingShutDown = nil; + if (self->_controllerBeingStarted == controller) { + controllerFabricIndex = self->_nextAvailableFabricIndex; + self->_controllerBeingStarted = nil; + } + }; + if ([_controllers count] == 0) { dispatch_sync(_chipWorkQueue, ^{ delete self->_operationalBrowser; @@ -867,7 +1066,23 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller _otaProviderDelegateBridge->Shutdown(); } - [controller shutDownCppController]; + sharedCleanupBlock(); + + // Now that our per-controller storage for the controller being shut + // down is guaranteed to be disconnected, go ahead and clean up the + // fabric table entry for the controller if we're in per-controller + // storage mode. + if (self->_usingPerControllerStorage) { + // We have to use a new fabric table to do this cleanup, because + // our system state is gone now. + FabricTable fabricTable; + CHIP_ERROR err = [self _initFabricTable:fabricTable]; + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to clean up fabric entries. Expect things to act oddly: %" CHIP_ERROR_FORMAT, err.Format()); + } else { + fabricTable.Delete(controllerFabricIndex); + } + } } else { // Do the controller shutdown on the Matter work queue. dispatch_sync(_chipWorkQueue, ^{ @@ -875,7 +1090,19 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller _otaProviderDelegateBridge->ControllerShuttingDown(controller); } - [controller shutDownCppController]; + sharedCleanupBlock(); + + // Now that our per-controller storage for the controller being shut + // down is guaranteed to be disconnected, go ahead and clean up the + // fabric table entry for the controller if we're in per-controller + // storage mode. + if (self->_usingPerControllerStorage) { + // Make sure to delete controllerFabricIndex from the system state's + // fabric table. We know there's a system state here, because we + // still have a running controller. + auto * systemState = _controllerFactory->GetSystemState(); + systemState->Fabrics()->Delete(controllerFabricIndex); + } }); } @@ -890,21 +1117,42 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller return controllersCopy; } -- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(FabricIndex)fabricIndex + includeControllerStartingUp:(BOOL)includeControllerStartingUp + includeControllerShuttingDown:(BOOL)includeControllerShuttingDown { assertChipStackLockedByCurrentThread(); auto * controllersCopy = [self getRunningControllers]; + os_unfair_lock_lock(&_controllersLock); + MTRDeviceController * controllerBeingStarted = _controllerBeingStarted; + MTRDeviceController * controllerBeingShutDown = _controllerBeingShutDown; + os_unfair_lock_unlock(&_controllersLock); + for (MTRDeviceController * existing in controllersCopy) { - if ([existing fabricIndex] == fabricIndex) { + if (existing.fabricIndex == fabricIndex) { return existing; } } + if (includeControllerStartingUp == YES && controllerBeingStarted != nil && fabricIndex == _nextAvailableFabricIndex) { + return controllerBeingStarted; + } + + if (includeControllerShuttingDown == YES && controllerBeingShutDown != nil + && controllerBeingShutDown.fabricIndex == fabricIndex) { + return controllerBeingShutDown; + } + return nil; } +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +{ + return [self runningControllerForFabricIndex:fabricIndex includeControllerStartingUp:YES includeControllerShuttingDown:YES]; +} + - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); @@ -936,6 +1184,25 @@ - (PersistentStorageDelegate *)storageDelegate @end +MTR_HIDDEN +@interface MTRDummyStorage : NSObject +@end + +@implementation MTRDummyStorage +- (nullable NSData *)storageDataForKey:(NSString *)key +{ + return nil; +} +- (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key +{ + return NO; +} +- (BOOL)removeStorageDataForKey:(NSString *)key +{ + return NO; +} +@end + @implementation MTRDeviceControllerFactoryParams - (instancetype)initWithStorage:(id)storage @@ -945,6 +1212,27 @@ - (instancetype)initWithStorage:(id)storage } _storage = storage; + _hasStorage = YES; + _otaProviderDelegate = nil; + _productAttestationAuthorityCertificates = nil; + _certificationDeclarationCertificates = nil; + _port = nil; + _shouldStartServer = NO; + + return self; +} + +- (instancetype)init +{ + if (!(self = [super init])) { + return nil; + } + + // We promise to have a non-null storage for purposes of our attribute, but + // now we're allowing initialization without storage. Make up a dummy + // storage just so we don't have nil there. + _storage = [[MTRDummyStorage alloc] init]; + _hasStorage = NO; _otaProviderDelegate = nil; _productAttestationAuthorityCertificates = nil; _certificationDeclarationCertificates = nil; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index dc0b968b427782..4ffcb3af545506 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -53,6 +53,15 @@ NS_ASSUME_NONNULL_BEGIN */ - (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex; +/** + * Find a running controller, if any, for the given fabric index. Allows + * controlling whether to include a controller that is in the middle of startup + * or shutdown. + */ +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex + includeControllerStartingUp:(BOOL)includeControllerStartingUp + includeControllerShuttingDown:(BOOL)includeControllerShuttingDown; + /** * Notify the controller factory that a new operational instance with the given * compressed fabric id and node id has been observed. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h new file mode 100644 index 00000000000000..7087bd87fbaf8e --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h @@ -0,0 +1,89 @@ +/** + * 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 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +MTR_NEWLY_AVAILABLE +@interface MTRDeviceControllerStartupParameters : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + * Set an MTROperationalCertificateIssuer to call (on the provided queue) when + * operational certificates need to be provided during commissioning. + */ +- (void)setOperationalCertificateIssuer:(id)operationalCertificateIssuer + queue:(dispatch_queue_t)queue; + +@end + +MTR_NEWLY_AVAILABLE +@interface MTRDeviceControllerExternalCertificateStartupParameters : MTRDeviceControllerStartupParameters + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + * Prepare to initialize a controller that is not able to sign operational + * certificates itself, and therefore needs to be provided with a complete + * operational certificate chain. + * + * A controller created from MTRDeviceControllerStartupParams initialized with + * this method will not be able to commission devices unless + * operationalCertificateIssuer and operationalCertificateIssuerQueue are set. + * + * The fabric id and node id to use for the controller will be derived from the provided + * operationalCertificate. + * + * @param storageDelegate The storage to use for the controller. This will be + * called into on storageDelegateQueue. + * + * @param storageDelegateQueue The queue for calls into storageDelegate. See + * MTRDeviceControllerStorageDelegate documentation + * for the rules about what work is allowed to be + * done on this queue. + * + * @param uniqueIdentifier The unique id to assign to the controller. + * + * @param vendorID The vendor ID (allocated by the Connectivity Standards Alliance) for + * this controller. Must not be the "standard" vendor id (0). + * + * @param ipk The Identity Protection Key. Must be 16 bytes in length. + * + * @param intermediateCertificate Must be nil if operationalCertificate is + * directly signed by rootCertificate. Otherwise + * must be the certificate that signed + * operationalCertificate. + */ +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index ca92c63bf2171b..9fb71429a07720 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -18,10 +18,13 @@ #import "MTRCertificates.h" #import "MTRConversion.h" #import "MTRDeviceControllerStartupParams_Internal.h" +#import "MTRDeviceController_Internal.h" #import "MTRLogging_Internal.h" #import "MTRP256KeypairBridge.h" #import "NSDataSpanConversion.h" +#import + #include #include #include @@ -29,6 +32,41 @@ using namespace chip; +static CHIP_ERROR ExtractNodeIDFabricIDFromNOC( + MTRCertificateDERBytes noc, NSNumber * __autoreleasing * nodeID, NSNumber * __autoreleasing * fabricID) +{ + // ExtractNodeIdFabricIdFromOpCert needs a TLV-encoded opcert, not a DER-encoded one. + auto * tlvNOC = [MTRCertificates convertX509Certificate:noc]; + if (tlvNOC == nil) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ByteSpan nocSpan = AsByteSpan(tlvNOC); + + FabricId certFabricID = kUndefinedFabricId; + NodeId certNodeID = kUndefinedNodeId; + CHIP_ERROR err = Credentials::ExtractNodeIdFabricIdFromOpCert(nocSpan, &certNodeID, &certFabricID); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Unable to extract node ID and fabric ID from operational certificate: %s", err.AsString()); + return err; + } + *nodeID = @(certNodeID); + *fabricID = @(certFabricID); + return CHIP_NO_ERROR; +} + +static CHIP_ERROR ExtractFabricIDFromNOC(MTRCertificateDERBytes noc, NSNumber * __autoreleasing * fabricID) +{ + NSNumber * ignored; + return ExtractNodeIDFabricIDFromNOC(noc, &ignored, fabricID); +} + +static CHIP_ERROR ExtractNodeIDFromNOC(MTRCertificateDERBytes noc, NSNumber * __autoreleasing * nodeID) +{ + NSNumber * ignored; + return ExtractNodeIDFabricIDFromNOC(noc, nodeID, &ignored); +} + @implementation MTRDeviceControllerStartupParams - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner @@ -45,6 +83,7 @@ - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigne _nocSigner = nocSigner; _fabricID = [fabricID copy]; _ipk = [ipk copy]; + _uniqueIdentifier = [NSUUID UUID]; return self; } @@ -59,24 +98,13 @@ - (instancetype)initWithIPK:(NSData *)ipk return nil; } - { // Scope for temporaries - // ExtractNodeIdFabricIdFromOpCert needs a TLV-encoded opcert, not a DER-encoded one. - uint8_t tlvOpCertBuf[Credentials::kMaxCHIPCertLength]; - MutableByteSpan tlvOpCert(tlvOpCertBuf); - CHIP_ERROR err = Credentials::ConvertX509CertToChipCert(AsByteSpan(operationalCertificate), tlvOpCert); + { // Scope for temporary + NSNumber * fabricID; + CHIP_ERROR err = ExtractFabricIDFromNOC(operationalCertificate, &fabricID); if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Unable to convert operational certificate to TLV: %s", ErrorStr(err)); return nil; } - - FabricId fabricId = kUndefinedFabricId; - NodeId unused = kUndefinedNodeId; - err = Credentials::ExtractNodeIdFabricIdFromOpCert(tlvOpCert, &unused, &fabricId); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Unable to extract fabric id from operational certificate: %s", ErrorStr(err)); - return nil; - } - _fabricID = @(fabricId); + _fabricID = fabricID; } _operationalKeypair = operationalKeypair; @@ -84,6 +112,7 @@ - (instancetype)initWithIPK:(NSData *)ipk _intermediateCertificate = [intermediateCertificate copy]; _rootCertificate = [rootCertificate copy]; _ipk = [ipk copy]; + _uniqueIdentifier = [NSUUID UUID]; return self; } @@ -106,6 +135,50 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params _operationalKeypair = params.operationalKeypair; _operationalCertificateIssuer = params.operationalCertificateIssuer; _operationalCertificateIssuerQueue = params.operationalCertificateIssuerQueue; + _uniqueIdentifier = params.uniqueIdentifier; + + return self; +} + +- (instancetype)initWithParameters:(MTRDeviceControllerStartupParameters *)params error:(CHIP_ERROR &)error +{ + if (!(self = [super init])) { + error = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + if (![params isKindOfClass:[MTRDeviceControllerExternalCertificateStartupParameters class]]) { + MTR_LOG_ERROR("Unexpected subclass of MTRDeviceControllerStartupParameters"); + error = CHIP_ERROR_INVALID_ARGUMENT; + return nil; + } + + _nocSigner = nil; + + NSNumber * fabricID; + error = ExtractFabricIDFromNOC(params.operationalCertificate, &fabricID); + if (error != CHIP_NO_ERROR) { + return nil; + } + _fabricID = fabricID; + + _ipk = params.ipk; + _vendorID = params.vendorID; + // Note: Since we have an operationalCertificate, we do not need a nodeID as + // part of our params; it will not be used. Don't even initialize it, to + // avoid confusion about that. + // + // We don't really use the fabricID for anything either, but we promise to + // have a non-nil one, which is why we set it above. + _nodeID = nil; + _caseAuthenticatedTags = nil; + _rootCertificate = params.rootCertificate; + _intermediateCertificate = params.intermediateCertificate; + _operationalCertificate = params.operationalCertificate; + _operationalKeypair = params.operationalKeypair; + _operationalCertificateIssuer = params.operationalCertificateIssuer; + _operationalCertificateIssuerQueue = params.operationalCertificateIssuerQueue; + _uniqueIdentifier = params.uniqueIdentifier; return self; } @@ -120,7 +193,7 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params MutableByteSpan derCert(buf); CHIP_ERROR err = Credentials::ConvertChipCertToX509Cert(cert, derCert); if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Failed do convert Matter certificate to X.509 DER: %s", ErrorStr(err)); + MTR_LOG_ERROR("Failed to convert Matter certificate to X.509 DER: %s", ErrorStr(err)); return nil; } @@ -174,6 +247,68 @@ - (instancetype)initWithOperationalKeypair:(id)operationalKeypair @end +@implementation MTRDeviceControllerStartupParameters +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate +{ + if (!(self = [super init])) { + return nil; + } + + _ipk = ipk; + _vendorID = vendorID; + _rootCertificate = rootCertificate; + _intermediateCertificate = intermediateCertificate; + _operationalCertificate = operationalCertificate; + _operationalKeypair = operationalKeypair; + + _operationalCertificateIssuer = nil; + _operationalCertificateIssuerQueue = nil; + _storageDelegate = storageDelegate; + _storageDelegateQueue = storageDelegateQueue; + _uniqueIdentifier = uniqueIdentifier; + + return self; +} + +- (void)setOperationalCertificateIssuer:(id)operationalCertificateIssuer + queue:(dispatch_queue_t)queue +{ + _operationalCertificateIssuer = operationalCertificateIssuer; + _operationalCertificateIssuerQueue = queue; +} +@end + +@implementation MTRDeviceControllerExternalCertificateStartupParameters +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate +{ + return [super initWithStorageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue + uniqueIdentifier:uniqueIdentifier + ipk:ipk + vendorID:vendorID + operationalKeypair:operationalKeypair + operationalCertificate:operationalCertificate + intermediateCertificate:intermediateCertificate + rootCertificate:rootCertificate]; +} +@end + @implementation MTRDeviceControllerStartupParamsInternal - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params @@ -182,6 +317,9 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params return nil; } + _storageDelegate = nil; + _storageDelegateQueue = nil; + if (self.nocSigner == nil && self.rootCertificate == nil) { MTR_LOG_ERROR("nocSigner and rootCertificate are both nil; no public key available to identify the fabric"); return nil; @@ -249,6 +387,7 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable _fabricTable = fabricTable; _keystore = keystore; _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = NO; return self; } @@ -379,6 +518,89 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable _fabricIndex.Emplace(fabricIndex); _keystore = keystore; _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = NO; + + return self; +} + +- (instancetype)initForNewController:(MTRDeviceController *)controller + fabricTable:(chip::FabricTable *)fabricTable + keystore:(chip::Crypto::OperationalKeystore *)keystore + advertiseOperational:(BOOL)advertiseOperational + params:(MTRDeviceControllerStartupParameters *)params + error:(CHIP_ERROR &)error +{ + if (!(self = [super initWithParameters:params error:error])) { + return nil; + } + + Crypto::P256PublicKey pubKey; + error = ExtractPubkeyFromX509Cert(AsByteSpan(self.rootCertificate), pubKey); + if (error != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't extract public key from root certificate: %s", error.AsString()); + return nil; + } + + NSNumber * nodeID; + error = ExtractNodeIDFromNOC(self.operationalCertificate, &nodeID); + if (error != CHIP_NO_ERROR) { + // Already logged. + return nil; + } + + if (fabricTable->FindIdentity(pubKey, self.fabricID.unsignedLongLongValue, nodeID.unsignedLongLongValue)) { + MTR_LOG_ERROR("Trying to start a controller identity that is already running"); + error = CHIP_ERROR_INVALID_ARGUMENT; + return nil; + } + + auto * oldNOCTLV = [controller.controllerDataStore fetchLastLocallyUsedNOC]; + if (oldNOCTLV != nil) { + ByteSpan oldNOCSpan = AsByteSpan(oldNOCTLV); + + FabricId ignored = kUndefinedFabricId; + NodeId oldNodeID = kUndefinedNodeId; + CHIP_ERROR err = Credentials::ExtractNodeIdFabricIdFromOpCert(oldNOCSpan, &oldNodeID, &ignored); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Unable to extract node ID and fabric ID from old operational certificate: %s", err.AsString()); + return nil; + } + + CATValues oldCATs; + err = Credentials::ExtractCATsFromOpCert(oldNOCSpan, oldCATs); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to extract CATs from old operational certificate: %s", err.AsString()); + return nil; + } + + auto * tlvNOC = [MTRCertificates convertX509Certificate:self.operationalCertificate]; + if (tlvNOC == nil) { + return nil; + } + + ByteSpan nocSpan = AsByteSpan(tlvNOC); + CATValues newCATs; + err = Credentials::ExtractCATsFromOpCert(nocSpan, newCATs); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to extract CATs from new operational certificate: %s", err.AsString()); + return nil; + } + + if (nodeID.unsignedLongLongValue != oldNodeID || oldCATs != newCATs) { + // Our NOC has changed in a way that would affect ACL checks. Clear + // out our session resumption storage, because resuming those CASE + // sessions will end up doing ACL checks against our old NOC. + MTR_LOG_DEFAULT("Node ID or CATs changed. Clearing CASE resumption storage."); + [controller.controllerDataStore clearAllResumptionInfo]; + } + } + + _fabricTable = fabricTable; + _keystore = keystore; + _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = YES; + _storageDelegate = params.storageDelegate; + _storageDelegateQueue = params.storageDelegateQueue; return self; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 24acc7a2dbb3a8..53cec273ebdc52 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -19,6 +19,8 @@ #import "MTRDeviceControllerStartupParams.h" #import #import +#import +#import #include #include @@ -39,18 +41,52 @@ NS_ASSUME_NONNULL_BEGIN // MTRDeviceControllerStartupParamsInternal. @property (nonatomic, copy, nullable) MTRCertificateDERBytes operationalCertificate; +// uniqueIdentifier, so that we always have one. +@property (nonatomic, strong, readonly) NSUUID * uniqueIdentifier; + // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @end +@interface MTRDeviceControllerStartupParameters () + +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate; + +// When we have other subclasses of MTRDeviceControllerStartupParameters, we may +// need to make more things nullable here and/or add more fields. But for now +// we know exactly what information we have. +@property (nonatomic, copy, readonly) NSData * ipk; +@property (nonatomic, copy, readonly) NSNumber * vendorID; +@property (nonatomic, copy, readonly) MTRCertificateDERBytes rootCertificate; +@property (nonatomic, copy, readonly, nullable) MTRCertificateDERBytes intermediateCertificate; +@property (nonatomic, copy, readonly) MTRCertificateDERBytes operationalCertificate; +@property (nonatomic, strong, readonly) id operationalKeypair; + +@property (nonatomic, strong, nullable, readonly) id operationalCertificateIssuer; +@property (nonatomic, strong, nullable, readonly) dispatch_queue_t operationalCertificateIssuerQueue; + +@property (nonatomic, strong, readonly) id storageDelegate; +@property (nonatomic, strong, readonly) dispatch_queue_t storageDelegateQueue; +@property (nonatomic, strong, readonly) NSUUID * uniqueIdentifier; + +@end + MTR_HIDDEN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. @property (nonatomic, assign, readonly) chip::FabricTable * fabricTable; -// Fabric index we're starting on. Only has a value when starting on an -// existing fabric. +// Fabric index we're starting on. Only has a value when starting against an +// existing fabric table entry. @property (nonatomic, assign, readonly) chip::Optional fabricIndex; // Key store we're using with our fabric table, for sanity checks. @@ -58,6 +94,21 @@ MTR_HIDDEN @property (nonatomic, assign, readonly) BOOL advertiseOperational; +@property (nonatomic, assign, readonly) BOOL allowMultipleControllersPerFabric; + +/** + * A storage delegate that can be provided when initializing the startup params. + * This must be provided if and only if the controller factory was initialized + * without storage. + */ +@property (nonatomic, strong, nullable, readonly) id storageDelegate; + +/** + * The queue to use for storageDelegate. This will be nil if and only if + * storageDelegate is nil. + */ +@property (nonatomic, strong, nullable, readonly) dispatch_queue_t storageDelegateQueue; + /** * Helper method that checks that our keypairs match our certificates. * Specifically: @@ -90,7 +141,17 @@ MTR_HIDDEN params:(MTRDeviceControllerStartupParams *)params; /** - * Should use initForExistingFabric or initForNewFabric to initialize + * Initialize for controller bringup with per-controller storage. + */ +- (instancetype)initForNewController:(MTRDeviceController *)controller + fabricTable:(chip::FabricTable *)fabricTable + keystore:(chip::Crypto::OperationalKeystore *)keystore + advertiseOperational:(BOOL)advertiseOperational + params:(MTRDeviceControllerStartupParameters *)params + error:(CHIP_ERROR &)error; + +/** + * Should use initForExistingFabric or initForNewFabric or initForController to initialize * internally. */ - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h new file mode 100644 index 00000000000000..1fee9c65ae460c --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h @@ -0,0 +1,110 @@ +/** + * 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 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 + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTRStorageSecurityLevel) { + // Data must be stored in secure (encrypted) storage. + MTRStorageSecurityLevelSecure, + // Data may be stored in the clear. + MTRStorageSecurityLevelNotSecure, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { + // Data must not be shared at all (just store locally). + MTRStorageSharingTypeNotShared, + + // Data must be shared, but only between controllers that have the same node + // identity (same fabric, same node ID, same CATs). + MTRStorageSharingTypeSameIdentity, + + // Data must be shared, but only between controllers that have the same + // access to devices (e.g. controllers that all have the same CATs if ACLs + // are being done via CATs). + MTRStorageSharingTypeSameACLs, + + // Data must be shared across all controllers on a given fabric. + MTRStorageSharingTypeSameFabric, +} MTR_NEWLY_AVAILABLE; + +/** + * Protocol for storing and retrieving controller-specific data. + * + * Implementations of this protocol MUST keep two things in mind: + * + * 1) The controller provided to the delegate methods may not be fully + * initialized when the callbacks are called. The only safe thing to do with + * it is to get its controllerID. + * + * 2) The delegate method calls will happen on the queue that was provided along + * with the delegate. All Matter work will be blocked until the method + * completes, and these calls may themselves block other Matter API calls + * from completing. Attempting to call any Matter API on the queue used for + * this delegate, apart from de-serializing and serializing the items being + * stored and calling MTRDeviceControllerStorageClasses(), is likely to lead + * to deadlocks. + */ +MTR_NEWLY_AVAILABLE +@protocol MTRDeviceControllerStorageDelegate +@required +/** + * Return the stored value for the given key, if any, for the provided + * controller. Returns nil if there is no stored value. + * + * securityLevel and dataType will always be the same for any given key value + * and are just present here to help locate the data if storage location is + * separated out by security level and data type. + * + * The set of classes that might be decoded by this function is available by + * calling MTRDeviceControllerStorageClasses(). + */ +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +/** + * Store a value for the given key. Returns whether the store succeeded. + * + * securityLevel and dataType will always be the same for any given key value + * and are present here as a hint to how the value should be stored. + */ +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +/** + * Remove the stored value for the given key. Returns whether the remove succeeded. + * + * securityLevel and dataType will always be the same for any given key value + * and are just present here to help locate the data if storage location is + * separated out by security level and data type. + */ +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +@end + +// TODO: FIXME: Is this a sane place to put this API? +MTR_EXTERN MTR_NEWLY_AVAILABLE NSSet * MTRDeviceControllerStorageClasses(void); + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 28beb9b8244a13..89db3a9f951d3e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -29,6 +29,10 @@ #import "MTRBaseDevice.h" #import "MTRDeviceController.h" +#import "MTRDeviceControllerDataStore.h" +#import "MTRDeviceControllerStorageDelegate.h" + +#import @class MTRDeviceControllerStartupParamsInternal; @class MTRDeviceControllerFactory; @@ -73,12 +77,21 @@ NS_ASSUME_NONNULL_BEGIN */ @property (readonly, nullable) NSNumber * compressedFabricID; +/** + * The per-controller data store this controller was initialized with, if any. + */ +@property (nonatomic, nullable) MTRDeviceControllerDataStore * controllerDataStore; + /** * Init a newly created controller. * * Only MTRDeviceControllerFactory should be calling this. */ -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue; +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory + queue:(dispatch_queue_t)queue + storageDelegate:(id _Nullable)storageDelegate + storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier; /** * Check whether this controller is running on the given fabric, as represented diff --git a/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h new file mode 100644 index 00000000000000..389fcc2a9eba10 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h @@ -0,0 +1,59 @@ +/** + * 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 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 + +#import "MTRDeviceControllerDataStore.h" + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Implements SessionResumptionStorage and dispatches the relevant lookup + * requests to running controllers as needed. + */ +class MTRSessionResumptionStorageBridge : public chip::SessionResumptionStorage +{ +public: + MTRSessionResumptionStorageBridge(MTRDeviceControllerFactory * factory); + + ~MTRSessionResumptionStorageBridge() {} + + // SessionResumptionStorage API. + CHIP_ERROR FindByScopedNodeId(const chip::ScopedNodeId & node, ResumptionIdStorage & resumptionId, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) override; + + CHIP_ERROR FindByResumptionId(ConstResumptionIdView resumptionId, chip::ScopedNodeId & node, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) override; + CHIP_ERROR Save(const chip::ScopedNodeId & node, ConstResumptionIdView resumptionId, + const chip::Crypto::P256ECDHDerivedSecret & sharedSecret, const chip::CATValues & peerCATs) override; + CHIP_ERROR DeleteAll(chip::FabricIndex fabricIndex) override; + +private: + /** + * Helper method to convert a MTRCASESessionResumptionInfo into the pieces + * we need to return from our Find* methods. + */ + static CHIP_ERROR DeconstructResumptionInfo(MTRCASESessionResumptionInfo * resumptionInfo, chip::NodeId & nodeID, + ResumptionIdStorage & resumptionId, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs); + + MTRDeviceControllerFactory * mFactory; +}; + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm new file mode 100644 index 00000000000000..56fe7bc7beb6f8 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm @@ -0,0 +1,149 @@ +/** + * 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 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 "MTRSessionResumptionStorageBridge.h" + +#import "MTRConversion.h" +#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRDeviceController_Internal.h" +#import "MTRLogging_Internal.h" +#import "NSDataSpanConversion.h" + +#include + +using namespace chip; + +MTRSessionResumptionStorageBridge::MTRSessionResumptionStorageBridge(MTRDeviceControllerFactory * factory) + : mFactory(factory) +{ +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::FindByScopedNodeId(const chip::ScopedNodeId & node, + ResumptionIdStorage & resumptionId, chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * controller = [mFactory runningControllerForFabricIndex:node.GetFabricIndex()]; + if (controller == nil) { + return CHIP_ERROR_KEY_NOT_FOUND; + } + + auto * resumptionInfo = [controller.controllerDataStore findResumptionInfoByNodeID:@(node.GetNodeId())]; + if (resumptionInfo == nil) { + return CHIP_ERROR_KEY_NOT_FOUND; + } + + NodeId ignored; + return DeconstructResumptionInfo(resumptionInfo, ignored, resumptionId, sharedSecret, peerCATs); +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::FindByResumptionId(ConstResumptionIdView resumptionId, chip::ScopedNodeId & node, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * resumptionIDData = AsData(resumptionId); + + auto * controllerList = [mFactory getRunningControllers]; + for (MTRDeviceController * controller in controllerList) { + FabricIndex fabricIndex = controller.fabricIndex; + if (!IsValidFabricIndex(fabricIndex)) { + // This controller is not sufficiently "running"; it does not have a + // fabric index yet. Just skip it. + continue; + } + + auto * resumptionInfo = [controller.controllerDataStore findResumptionInfoByResumptionID:resumptionIDData]; + if (resumptionInfo != nil) { + NodeId nodeID; + ResumptionIdStorage ignored; + ReturnErrorOnFailure(DeconstructResumptionInfo(resumptionInfo, nodeID, ignored, sharedSecret, peerCATs)); + node = ScopedNodeId(nodeID, fabricIndex); + return CHIP_NO_ERROR; + } + } + + // None of the controllers matched. + return CHIP_ERROR_KEY_NOT_FOUND; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::Save(const chip::ScopedNodeId & node, ConstResumptionIdView resumptionId, + const chip::Crypto::P256ECDHDerivedSecret & sharedSecret, const chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * controller = [mFactory runningControllerForFabricIndex:node.GetFabricIndex()]; + if (controller == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + auto * resumptionInfo = [[MTRCASESessionResumptionInfo alloc] init]; + resumptionInfo.nodeID = @(node.GetNodeId()); + resumptionInfo.resumptionID = AsData(resumptionId); + resumptionInfo.sharedSecret = AsData(ByteSpan(sharedSecret.ConstBytes(), sharedSecret.Length())); + resumptionInfo.caseAuthenticatedTags = CATValuesToSet(peerCATs); + + [controller.controllerDataStore storeResumptionInfo:resumptionInfo]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::DeleteAll(chip::FabricIndex fabricIndex) +{ + assertChipStackLockedByCurrentThread(); + + // NOTE: During controller startup, the Matter SDK thinks that the cert for + // a fabric index is changing and hence that it must remove session + // resumption data for that fabric index. For us that does not matter, + // since we don't key that data on fabric index anyway. But we do want to + // avoid doing this delete-on-startup so we can actually store session + // resumption data persistently. + + // And that is the only use of DeleteAll for controllers in practice, in the + // situations where we are using MTRSessionResumptionStorageBridge at all. + // So just no-op this function, but verify that our assumptions hold. + auto * controller = [mFactory runningControllerForFabricIndex:fabricIndex + includeControllerStartingUp:NO + includeControllerShuttingDown:YES]; + VerifyOrDieWithMsg(controller == nil, Controller, "Deleting resumption storage for controller outside startup"); + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::DeconstructResumptionInfo(MTRCASESessionResumptionInfo * resumptionInfo, + chip::NodeId & nodeID, ResumptionIdStorage & resumptionId, chip::Crypto::P256ECDHDerivedSecret & sharedSecret, + chip::CATValues & peerCATs) +{ + if (resumptionInfo.resumptionID.length != resumptionId.size()) { + MTR_LOG_ERROR("Unable to return resumption ID: Stored size %llu does not match required size %llu", + static_cast(resumptionInfo.resumptionID.length), + static_cast(resumptionId.size())); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + if (resumptionInfo.sharedSecret.length > sharedSecret.Capacity()) { + MTR_LOG_ERROR("Unable to return resumption shared secret: Stored size %llu is larger than allowed size %llu", + static_cast(resumptionInfo.sharedSecret.length), + static_cast(sharedSecret.Capacity())); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + nodeID = resumptionInfo.nodeID.unsignedLongLongValue; + memcpy(resumptionId.data(), resumptionInfo.resumptionID.bytes, resumptionInfo.resumptionID.length); + sharedSecret.SetLength(resumptionInfo.sharedSecret.length); + memcpy(sharedSecret.Bytes(), resumptionInfo.sharedSecret.bytes, resumptionInfo.sharedSecret.length); + ReturnErrorOnFailure(SetToCATValues(resumptionInfo.caseAuthenticatedTags, peerCATs)); + + return CHIP_NO_ERROR; +} diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 9a5ce73864f2c2..26c74cd80487d2 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -40,7 +40,9 @@ #import #import #import +#import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index e7a18bcb13804f..63a5baf32b64d5 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -1524,8 +1524,6 @@ - (void)testControllerCATs [controller shutdown]; XCTAssertFalse([controller isRunning]); - fprintf(stderr, "DOING TOO LONG TEST\n"); - // // Trying to bring up the same fabric with too-long CATs should fail, if we // are taking the provided CATs into account. @@ -1536,8 +1534,6 @@ - (void)testControllerCATs controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); - fprintf(stderr, "DOING INVALID TEST\n"); - // // Trying to bring up the same fabric with invalid CATs should fail, if we // are taking the provided CATs into account. @@ -1545,12 +1541,9 @@ - (void)testControllerCATs params.nodeID = @(17); params.operationalKeypair = operationalKeys; params.caseAuthenticatedTags = invalidCATs; - fprintf(stderr, "BRINGING UP CONTROLLER\n"); controller = [factory createControllerOnExistingFabric:params error:nil]; - fprintf(stderr, "CONTROLLER SHOULD BE NIL\n"); XCTAssertNil(controller); - fprintf(stderr, "STOPPING FACTORY\n"); [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m new file mode 100644 index 00000000000000..fdf03eab12ba36 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -0,0 +1,1124 @@ +/* + * 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 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 + +// system dependencies +#import + +#import "MTRErrorTestUtils.h" +#import "MTRFabricInfoChecker.h" +#import "MTRTestKeys.h" +#import "MTRTestResetCommissioneeHelper.h" +#import "MTRTestStorage.h" + +static const uint16_t kPairingTimeoutInSeconds = 10; +static const uint16_t kTimeoutInSeconds = 3; +static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; +static const uint16_t kLocalPort = 5541; +static const uint16_t kTestVendorId = 0xFFF1u; + +@interface MTRPerControllerStorageTestsControllerDelegate : NSObject +@property (nonatomic, strong) XCTestExpectation * expectation; +@property (nonatomic, strong) NSNumber * deviceID; +@end + +@implementation MTRPerControllerStorageTestsControllerDelegate +- (id)initWithExpectation:(XCTestExpectation *)expectation newNodeID:(NSNumber *)newNodeID +{ + self = [super init]; + if (self) { + _expectation = expectation; + _deviceID = newNodeID; + } + return self; +} + +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + + __auto_type * params = [[MTRCommissioningParameters alloc] init]; + + NSError * commissionError = nil; + [controller commissionNodeWithID:self.deviceID commissioningParams:params error:&commissionError]; + XCTAssertNil(commissionError); + + // Keep waiting for controller:commissioningComplete: +} + +- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + [_expectation fulfill]; + _expectation = nil; +} + +@end + +@interface MTRPerControllerStorageTestsStorageDelegate : NSObject +@property (nonatomic, readonly) NSMutableDictionary * storage; +@property (nonatomic, readonly) NSUUID * controllerID; +@end + +@implementation MTRPerControllerStorageTestsStorageDelegate + +- (instancetype)initWithControllerID:(NSUUID *)controllerID +{ + if (!(self = [super init])) { + return nil; + } + + _storage = [[NSMutableDictionary alloc] init]; + _controllerID = controllerID; + return self; +} + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + __auto_type * data = self.storage[key]; + if (data == nil) { + return data; + } + + NSError * error; + id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + return value; +} + +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + NSError * error; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + self.storage[key] = data; + return YES; +} + +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + self.storage[key] = nil; + return YES; +} + +@end + +@interface MTRPerControllerStorageTestsCertificateIssuer : NSObject +- (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + signingKey:(id)signingKey + fabricID:(NSNumber *)fabricID; + +@property (nonatomic, readonly) MTRCertificateDERBytes rootCertificate; +@property (nonatomic, readonly, nullable) MTRCertificateDERBytes intermediateCertificate; +@property (nonatomic, readonly) id signingKey; +@property (nonatomic, readonly) NSNumber * fabricID; + +// The node ID to use for the next operational certificate we issue. This will +// be set to null after every certificate issuance. +@property (nonatomic, nullable) NSNumber * nextNodeID; + +@property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; + +@end + +@implementation MTRPerControllerStorageTestsCertificateIssuer + +- (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + signingKey:(id)signingKey + fabricID:(NSNumber *)fabricID +{ + if (!(self = [super init])) { + return nil; + } + + _rootCertificate = rootCertificate; + _intermediateCertificate = intermediateCertificate; + _signingKey = signingKey; + _fabricID = fabricID; + _nextNodeID = nil; + _shouldSkipAttestationCertificateValidation = NO; + + return self; +} + +- (void)issueOperationalCertificateForRequest:(MTROperationalCSRInfo *)csrInfo + attestationInfo:(MTRDeviceAttestationInfo *)attestationInfo + controller:(MTRDeviceController *)controller + completion:(void (^)(MTROperationalCertificateChain * _Nullable info, + NSError * _Nullable error))completion +{ + if (self.nextNodeID == nil) { + completion(nil, [NSError errorWithDomain:@"TestError" code:0 userInfo:@{ @"reason" : @"nextNodeID is nil" }]); + return; + } + + MTRCertificateDERBytes signingCertificate; + if (self.intermediateCertificate != nil) { + signingCertificate = self.intermediateCertificate; + } else { + signingCertificate = self.rootCertificate; + } + + __auto_type * csr = csrInfo.csr; + XCTAssertNotNil(csr); + + NSError * error; + __auto_type * rawPublicKey = [MTRCertificates publicKeyFromCSR:csr error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(rawPublicKey); + + if (error != nil) { + completion(nil, error); + return; + } + + NSDictionary * attributes = @{ + (__bridge NSString *) kSecAttrKeyType : (__bridge NSString *) kSecAttrKeyTypeECSECPrimeRandom, + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic + }; + CFErrorRef keyCreationError = NULL; + SecKeyRef publicKey + = SecKeyCreateWithData((__bridge CFDataRef) rawPublicKey, (__bridge CFDictionaryRef) attributes, &keyCreationError); + XCTAssertNil((__bridge id) keyCreationError); + XCTAssertNotNil((__bridge id) publicKey); + + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:self.signingKey + signingCertificate:signingCertificate + operationalPublicKey:publicKey + fabricID:self.fabricID + nodeID:self.nextNodeID + caseAuthenticatedTags:nil + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(operationalCert); + + if (error != nil) { + completion(nil, error); + return; + } + + __auto_type * certChain = [[MTROperationalCertificateChain alloc] initWithOperationalCertificate:operationalCert + intermediateCertificate:self.intermediateCertificate + rootCertificate:self.rootCertificate + adminSubject:nil]; + completion(certChain, nil); +} + +@end + +@interface MTRPerControllerStorageTests : XCTestCase +@end + +@implementation MTRPerControllerStorageTests { + dispatch_queue_t _storageQueue; +} + ++ (void)tearDown +{ +} + +- (void)setUp +{ + // Per-test setup, runs before each test. + [super setUp]; + [self setContinueAfterFailure:NO]; + + _storageQueue = dispatch_queue_create("test.storage.queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + + [self startFactory]; +} + +- (void)tearDown +{ + // Per-test teardown, runs after each test. + [self stopFactory]; + _storageQueue = nil; + [super tearDown]; +} + +- (void)startFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] init]; + factoryParams.port = @(kLocalPort); + + NSError * error; + BOOL ok = [factory startControllerFactory:factoryParams error:&error]; + XCTAssertNil(error); + XCTAssertTrue(ok); +} + +- (void)stopFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + [factory stopControllerFactory]; + XCTAssertFalse(factory.isRunning); +} + +// Test helpers + +- (void)commissionWithController:(MTRDeviceController *)controller newNodeID:(NSNumber *)newNodeID +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; + + __auto_type * deviceControllerDelegate = [[MTRPerControllerStorageTestsControllerDelegate alloc] initWithExpectation:expectation + newNodeID:newNodeID]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); + + [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + + NSError * error; + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(payload); + + [controller setupCommissioningSessionWithPayload:payload newNodeID:newNodeID error:&error]; + XCTAssertNil(error); + + [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags + error:(NSError * __autoreleasing *)error + certificateIssuer: + (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer +{ + XCTAssertTrue(error != NULL); + + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + // Specify a fixed issuerID, so we get the same cert if we use the same keys. + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:@(1) fabricID:nil error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(root); + + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:fabricID + nodeID:nodeID + caseAuthenticatedTags:caseAuthenticatedTags + error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(operational); + + __auto_type * params = + [[MTRDeviceControllerExternalCertificateStartupParameters alloc] initWithStorageDelegate:storage + storageDelegateQueue:_storageQueue + uniqueIdentifier:storage.controllerID + ipk:rootKeys.ipk + vendorID:@(kTestVendorId) + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; + XCTAssertNotNil(params); + + __auto_type * ourCertificateIssuer = [[MTRPerControllerStorageTestsCertificateIssuer alloc] initWithRootCertificate:root + intermediateCertificate:nil + signingKey:rootKeys + fabricID:fabricID]; + XCTAssertNotNil(ourCertificateIssuer); + + if (certificateIssuer) { + *certificateIssuer = ourCertificateIssuer; + } + + [params setOperationalCertificateIssuer:ourCertificateIssuer queue:dispatch_get_main_queue()]; + + return [factory createController:params error:error]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + error:(NSError * __autoreleasing *)error + certificateIssuer: + (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + caseAuthenticatedTags:nil + error:error + certificateIssuer:certificateIssuer]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags + error:(NSError * __autoreleasing *)error +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + caseAuthenticatedTags:caseAuthenticatedTags + error:error + certificateIssuer:nil]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + error:(NSError * __autoreleasing *)error +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + error:error + certificateIssuer:nil]; +} + +- (void)test001_BasicControllerStartup +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // This was the first controller we brought up, so it should have come up + // with fabric index 1. + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID, + @"nodeID" : nodeID, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + ]]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test002_TryStartingTwoControllersWithSameNodeID +{ + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Try to bring up another controller with the same identity. This should + // fail, since our controller is still running + MTRDeviceController * otherController = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(otherController); + XCTAssertNotNil(error); + + // Our controller should still be running. + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test003_TestTwoControllersSameUUID +{ + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * fabricID = @(456); + + NSNumber * nodeID1 = @(123); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID1); + + // Try to bring up another controller with the same uniqueIdentifier (but a different + // node identity). This should fail, since our controller is still running. + NSNumber * nodeID2 = @(789); + MTRDeviceController * otherController = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate + error:&error]; + XCTAssertNil(otherController); + XCTAssertNotNil(error); + + // Our controller should still be running. + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test004_TestBasicSessionResumption +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Now commission the device, to test that that works. + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // Start the controller again using the same identity. This should work, + // because we cleared out the fabric info when the controller shut down. + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Now we should have come up with fabric index 2. + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID, + @"nodeID" : nodeID, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(2), + }, + ]]); + + // Try sending an attribute read and make sure it works. + __auto_type * device = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should have done CASE resumption, so not done any new signing using + // our keys. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Reset our commissionee. + ResetCommissionee(device, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test005_TestSessionResumptionDataClearingNodeIDChanged +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID1 = @(123); + NSNumber * nodeID2 = @(246); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID1); + + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + + // Now change ACLs so that nodeID2 has access and nodeID1 does not. + __auto_type * admin = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin.subjects = @[ nodeID2 ]; + + __auto_type * aclCluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * aclWriteExpectation = [self expectationWithDescription:@"ACLs changed so new node ID can administer"]; + [aclCluster writeAttributeACLWithValue:@[ admin ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [aclWriteExpectation fulfill]; + }]; + + [self waitForExpectations:@[ aclWriteExpectation ] timeout:kTimeoutInSeconds]; + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // There should have been no more CASE establishment going on. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Bring up a controller with the same storage and keys and so on but nodeID2. + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID2); + + // Try sending an attribute read and make sure it works. + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should note have done CASE resumption, since our identity changed. + XCTAssertEqual(operationalKeys.signatureCount, 2); + + // Reset our commissionee. + ResetCommissionee(device2, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test006_TestSessionResumptionDataClearingCATsChanged +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + + // Now change ACLs so that CAT 0x12340001 has access and nodeID does not. + uint32_t cat = 0x12340001; + NSNumber * catSubject = @(0xFFFFFFFD00000000 | cat); + __auto_type * admin = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin.subjects = @[ catSubject ]; + + __auto_type * aclCluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * aclWriteExpectation = [self expectationWithDescription:@"ACLs changed so new node ID can administer"]; + [aclCluster writeAttributeACLWithValue:@[ admin ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [aclWriteExpectation fulfill]; + }]; + + [self waitForExpectations:@[ aclWriteExpectation ] timeout:kTimeoutInSeconds]; + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // There should have been no more CASE establishment going on. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Bring up a controller with the same storage and keys and so on but using + // our new CAT + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + caseAuthenticatedTags:[NSSet setWithArray:@[ @(cat) ]] + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Try sending an attribute read and make sure it works. + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should note have done CASE resumption, since our CATs changed. + XCTAssertEqual(operationalKeys.signatureCount, 2); + + // Reset our commissionee. + ResetCommissionee(device2, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test007_TestMultipleControllers +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + NSNumber * nodeID1 = @(123); + NSNumber * nodeID2 = @(456); + NSNumber * fabricID1 = @(1); + NSNumber * fabricID2 = @(2); + + __auto_type * storageDelegate1 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + + // Start several controllers that have distinct identities but share some + // node/fabric IDs. + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller1 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID1 + storage:storageDelegate1 + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller1); + XCTAssertTrue([controller1 isRunning]); + + __auto_type * storageDelegate2 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + MTRDeviceController * controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID2 + storage:storageDelegate2 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + + __auto_type * storageDelegate3 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + MTRDeviceController * controller3 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID2 + nodeID:nodeID1 + storage:storageDelegate3 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller3); + XCTAssertTrue([controller3 isRunning]); + + // Now check our fabric table + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID2, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(2), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID2, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(3), + }, + ]]); + + // Restart controller2 + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID2 + storage:storageDelegate2 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + + // Now check our fabric table again. + fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID2, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(4), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID2, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(3), + }, + ]]); + + // Now commission the device from controller1 + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller1 newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Ensure that controller2 does not have the same node ID as controller1. + XCTAssertNotEqualObjects(controller1.controllerNodeID, controller2.controllerNodeID); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller1]; + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller2]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + __auto_type * onOff1 = [[MTRBaseClusterOnOff alloc] initWithDevice:device1 endpointID:@(1) queue:queue]; + __auto_type * onOff2 = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + + // Check that device1 can read the On/Off attribute + XCTestExpectation * canReadExpectation1 = [self expectationWithDescription:@"Initial commissioner can read on/off"]; + [onOff1 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation1 ] timeout:kTimeoutInSeconds]; + + // Check that device2 cannot read the On/Off attribute due to missing ACLs. + XCTestExpectation * cantReadExpectation1 = [self expectationWithDescription:@"New node can't read on/off yet"]; + [onOff2 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(value); + XCTAssertNotNil(err); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], MTRInteractionErrorCodeUnsupportedAccess); + [cantReadExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ cantReadExpectation1 ] timeout:kTimeoutInSeconds]; + + // Now change ACLs so that device2 can read. + __auto_type * admin1 = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin1.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin1.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin1.subjects = @[ controller1.controllerNodeID ]; + + __auto_type * admin2 = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin2.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin2.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin2.subjects = @[ controller2.controllerNodeID ]; + + __auto_type * acl1 = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * let2ReadExpectation = [self expectationWithDescription:@"ACLs changed so new node can read"]; + [acl1 writeAttributeACLWithValue:@[ admin1, admin2 ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [let2ReadExpectation fulfill]; + }]; + + [self waitForExpectations:@[ let2ReadExpectation ] timeout:kTimeoutInSeconds]; + + // Check that device2 can read the On/Off attribute + XCTestExpectation * canReadExpectation2 = [self expectationWithDescription:@"New node can read on/off"]; + [onOff2 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation2 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation2 ] timeout:kTimeoutInSeconds]; + + // Check that device1 can still read the On/Off attribute + XCTestExpectation * canReadExpectation3 = [self expectationWithDescription:@"Initial commissioner can still read on/off"]; + [onOff1 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation3 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation3 ] timeout:kTimeoutInSeconds]; + + // Check that the two devices are running on the same fabric. + __auto_type * opCreds1 = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device1 endpoint:0 queue:queue]; + __auto_type * opCreds2 = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device2 endpoint:0 queue:queue]; + + __block NSNumber * fabricIndex; + XCTestExpectation * readFabricIndexExpectation1 = + [self expectationWithDescription:@"Fabric index read by initial commissioner"]; + [opCreds1 readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + fabricIndex = value; + [readFabricIndexExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ readFabricIndexExpectation1 ] timeout:kTimeoutInSeconds]; + + XCTestExpectation * readFabricIndexExpectation2 = [self expectationWithDescription:@"Fabric index read by new node"]; + [opCreds2 readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + XCTAssertEqualObjects(value, fabricIndex); + [readFabricIndexExpectation2 fulfill]; + }]; + + [self waitForExpectations:@[ readFabricIndexExpectation2 ] timeout:kTimeoutInSeconds]; + + // Reset our commissionee. + ResetCommissionee(device1, queue, self, kTimeoutInSeconds); + + [controller1 shutdown]; + XCTAssertFalse([controller1 isRunning]); + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + [controller3 shutdown]; + XCTAssertFalse([controller3 isRunning]); +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 5481acdf5ea66a..1520c2a9d12082 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -153,7 +153,13 @@ 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51431AFA27D29CA4008A7943 /* ota-provider.cpp */; }; 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */; }; + 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */; }; + 5146544B2A72F9F500904E61 /* MTRDemuxingStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */; }; 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CAD2A79D42100469F18 /* MTRConversion.mm */; }; + 51565CB12A7AD77600469F18 /* MTRDeviceControllerDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */; }; + 51565CB22A7AD77600469F18 /* MTRDeviceControllerDataStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */; }; + 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51565CB62A7B0D6600469F18 /* MTRDeviceControllerStartupParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB52A7B0D6600469F18 /* MTRDeviceControllerStartupParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; 515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */; }; 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */; }; 51669AF02913204400F4AA36 /* MTRBackwardsCompatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */; }; @@ -182,6 +188,9 @@ 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */; }; 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */; }; + 51E95DF82A78110900A434F0 /* MTRPerControllerStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */; }; + 51E95DFB2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */; }; + 51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */; }; 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */; }; 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.mm */; }; @@ -457,7 +466,13 @@ 51431AFA27D29CA4008A7943 /* ota-provider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ota-provider.cpp"; path = "clusters/ota-provider/ota-provider.cpp"; sourceTree = ""; }; 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MatterTests-Bridging-Header.h"; sourceTree = ""; }; 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MTRSwiftPairingTests.swift; sourceTree = ""; }; + 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDemuxingStorage.mm; sourceTree = ""; }; + 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDemuxingStorage.h; sourceTree = ""; }; 51565CAD2A79D42100469F18 /* MTRConversion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRConversion.mm; sourceTree = ""; }; + 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDataStore.h; sourceTree = ""; }; + 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDataStore.mm; sourceTree = ""; }; + 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStorageDelegate.h; sourceTree = ""; }; + 51565CB52A7B0D6600469F18 /* MTRDeviceControllerStartupParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParameters.h; sourceTree = ""; }; 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRFramework.mm; sourceTree = ""; }; 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFramework.h; sourceTree = ""; }; 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRBackwardsCompatTests.m; sourceTree = ""; }; @@ -488,6 +503,9 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams.h; sourceTree = ""; }; 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams_Internal.h; sourceTree = ""; }; 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerStartupParams.mm; sourceTree = ""; }; + 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRPerControllerStorageTests.m; sourceTree = ""; }; + 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRSessionResumptionStorageBridge.h; sourceTree = ""; }; + 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRSessionResumptionStorageBridge.mm; sourceTree = ""; }; 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBackwardsCompatShims.h; sourceTree = ""; }; 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRClusterStateCacheContainer+XPC.h"; sourceTree = ""; }; 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceOverXPC.h; sourceTree = ""; }; @@ -1045,6 +1063,8 @@ 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */, 5A7947E327C0129500434CF2 /* MTRDeviceController+XPC.mm */, 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */, + 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */, + 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */, 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */, 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */, 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */, @@ -1056,6 +1076,8 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */, 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */, 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */, + 51565CB52A7B0D6600469F18 /* MTRDeviceControllerStartupParameters.h */, + 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */, 5A6FEC9427B5976200F25F42 /* MTRDeviceControllerXPCConnection.h */, 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm */, 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */, @@ -1088,6 +1110,10 @@ 998F287026D56940001846C6 /* MTRP256KeypairBridge.mm */, 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */, 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */, + 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */, + 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */, + 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */, + 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */, B2E0D7AC245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h */, B2E0D7AE245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm */, B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */, @@ -1132,6 +1158,7 @@ 51339B1E2A0DA64D00C798C1 /* MTRCertificateValidityTests.m */, 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */, 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */, + 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */, B202529D2459E34F00F97062 /* Info.plist */, 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */, ); @@ -1198,6 +1225,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 51565CB62A7B0D6600469F18 /* MTRDeviceControllerStartupParameters.h in Headers */, + 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */, 510A07492A685D3900A9241C /* Matter.apinotes in Headers */, 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */, 5173A47729C0E2ED00F67F48 /* MTRFabricInfo.h in Headers */, @@ -1273,12 +1302,15 @@ 2C222ADF255C811800E446B9 /* MTRBaseDevice_Internal.h in Headers */, 511913FC28C100EF009235E9 /* MTRBaseSubscriptionCallback.h in Headers */, 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */, + 51565CB12A7AD77600469F18 /* MTRDeviceControllerDataStore.h in Headers */, 3D843713294977000070D20A /* NSDataSpanConversion.h in Headers */, 991DC08B247704DC00C13860 /* MTRLogging_Internal.h in Headers */, 1E4D655029C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h in Headers */, 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, + 51E95DFB2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, + 5146544B2A72F9F500904E61 /* MTRDemuxingStorage.h in Headers */, 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1485,6 +1517,7 @@ 75B765C32A1D82D30014719B /* MTRAttributeSpecifiedCheck.mm in Sources */, AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */, 3D84374B29498BAE0070D20A /* privilege-storage.cpp in Sources */, + 51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */, 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */, 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */, 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */, @@ -1496,6 +1529,7 @@ 514304202914CED9004DC7FE /* generic-callback-stubs.cpp in Sources */, 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, + 51565CB22A7AD77600469F18 /* MTRDeviceControllerDataStore.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */, @@ -1523,6 +1557,7 @@ 7596A85528788557004DAE0E /* MTRClusters.mm in Sources */, 88EBF8CF27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm in Sources */, 5A6FEC9827B5C6AF00F25F42 /* MTRDeviceOverXPC.mm in Sources */, + 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */, 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */, 1E4D655229C30A8700BC3478 /* MTRCommissionableBrowser.mm in Sources */, 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */, @@ -1561,6 +1596,7 @@ 51E24E73274E0DAC007CCF6E /* MTRErrorTestUtils.mm in Sources */, 519498322A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m in Sources */, 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */, + 51E95DF82A78110900A434F0 /* MTRPerControllerStorageTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From bf23b78f7aed93fe6278a0bdd5a6b49067260219 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 31 Aug 2023 20:47:12 -0400 Subject: [PATCH 02/29] Allow per-controller control of PAAs and CD signing keys. (#28998) * Allow per-controller control of PAAs and CD signing keys. * Address review comments. Also fixes some API docs and init bits. --- .../Framework/CHIP/MTRDeviceController.mm | 51 +++++++++++- .../CHIP/MTRDeviceControllerFactory.mm | 81 ++++++------------- .../MTRDeviceControllerFactory_Internal.h | 3 +- .../MTRDeviceControllerStartupParameters.h | 19 +++++ .../CHIP/MTRDeviceControllerStartupParams.mm | 5 ++ ...TRDeviceControllerStartupParams_Internal.h | 3 + 6 files changed, 101 insertions(+), 61 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 403bc8a0906183..44d3b63712d426 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -18,6 +18,7 @@ #import "MTRDeviceController_Internal.h" +#import "MTRAttestationTrustStoreBridge.h" #import "MTRBaseDevice_Internal.h" #import "MTRCommissionableBrowser.h" #import "MTRCommissionableBrowserResult_Internal.h" @@ -86,6 +87,7 @@ static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge"; static NSString * const kErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed"; static NSString * const kErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed"; +static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; typedef void (^SyncWorkQueueBlock)(void); typedef id (^SyncWorkQueueBlockWithReturnValue)(void); @@ -101,6 +103,7 @@ @interface MTRDeviceController () { @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) chip::Credentials::PartialDACVerifier * partialDACVerifier; +@property (readonly) chip::Credentials::DefaultDACVerifier * defaultDACVerifier; @property (readonly) MTRDeviceControllerDelegateBridge * deviceControllerDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @@ -110,6 +113,8 @@ @interface MTRDeviceController () { @property (readonly) NSMutableDictionary * nodeIDToDeviceMap; @property (readonly) os_unfair_lock deviceMapLock; // protects nodeIDToDeviceMap @property (readonly) MTRCommissionableBrowser * commissionableBrowser; +@property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; + @end @implementation MTRDeviceController @@ -234,6 +239,16 @@ - (void)cleanup { VerifyOrDie(_cppCommissioner == nullptr); + if (_defaultDACVerifier) { + delete _defaultDACVerifier; + _defaultDACVerifier = nullptr; + } + + if (_attestationTrustStoreBridge) { + delete _attestationTrustStoreBridge; + _attestationTrustStoreBridge = nullptr; + } + [self clearDeviceAttestationDelegateBridge]; if (_operationalCredentialsDelegate) { @@ -388,9 +403,41 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams // fabric information for the relevant fabric indices on controller // bring-up. commissionerParams.removeFromFabricTableOnShutdown = false; - commissionerParams.deviceAttestationVerifier = _factory.deviceAttestationVerifier; commissionerParams.permitMultiControllerFabrics = startupParams.allowMultipleControllersPerFabric; + // Set up our attestation verifier. Assume we want to use the default + // one, until something tells us otherwise. + const chip::Credentials::AttestationTrustStore * trustStore; + if (startupParams.productAttestationAuthorityCertificates) { + _attestationTrustStoreBridge + = new MTRAttestationTrustStoreBridge(startupParams.productAttestationAuthorityCertificates); + trustStore = _attestationTrustStoreBridge; + } else { + // TODO: Replace testingRootStore with a AttestationTrustStore that has the necessary official PAA roots available + trustStore = chip::Credentials::GetTestAttestationTrustStore(); + } + + _defaultDACVerifier = new chip::Credentials::DefaultDACVerifier(trustStore); + + if (startupParams.certificationDeclarationCertificates) { + auto cdTrustStore = _defaultDACVerifier->GetCertificationDeclarationTrustStore(); + if (cdTrustStore == nullptr) { + errorCode = CHIP_ERROR_INCORRECT_STATE; + } + if ([self checkForStartError:errorCode logMsg:kErrorCDCertStoreInit]) { + return; + } + + for (NSData * cdSigningCert in startupParams.certificationDeclarationCertificates) { + errorCode = cdTrustStore->AddTrustedKey(AsByteSpan(cdSigningCert)); + if ([self checkForStartError:errorCode logMsg:kErrorCDCertStoreInit]) { + return; + } + } + } + + commissionerParams.deviceAttestationVerifier = _defaultDACVerifier; + auto & factory = chip::Controller::DeviceControllerFactory::GetInstance(); errorCode = factory.SetupCommissioner(commissionerParams, *_cppCommissioner); @@ -725,7 +772,7 @@ - (BOOL)setOperationalCertificateIssuer:(nullable id_cppCommissioner->SetDeviceAttestationVerifier(self->_factory.deviceAttestationVerifier); + self->_cppCommissioner->SetDeviceAttestationVerifier(self->_defaultDACVerifier); } return YES; }; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 95282450952ef2..97785a45a9db99 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -17,7 +17,6 @@ #import "MTRDeviceControllerFactory.h" #import "MTRDeviceControllerFactory_Internal.h" -#import "MTRAttestationTrustStoreBridge.h" #import "MTRCertificates.h" #import "MTRControllerAccessControl.h" #import "MTRDemuxingStorage.h" @@ -43,8 +42,6 @@ #include #include #include -#include -#include #include #include #include @@ -58,15 +55,12 @@ static NSString * const kErrorPersistentStorageInit = @"Init failure while creating a persistent storage delegate"; static NSString * const kErrorSessionResumptionStorageInit = @"Init failure while creating a session resumption storage delegate"; -static NSString * const kErrorAttestationTrustStoreInit = @"Init failure while creating the attestation trust store"; -static NSString * const kErrorDACVerifierInit = @"Init failure while creating the device attestation verifier"; static NSString * const kErrorGroupProviderInit = @"Init failure while initializing group data provider"; static NSString * const kErrorControllersInit = @"Init controllers array failure"; static NSString * const kErrorCertificateValidityPolicyInit = @"Init certificate validity policy failure"; static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; -static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; static NSString * const kErrorSessionKeystoreInit = @"Init failure while initializing session keystore"; @@ -78,7 +72,6 @@ @interface MTRDeviceControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; @property (readonly) PersistentStorageDelegate * persistentStorageDelegate; -@property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; @property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) Crypto::RawKeySessionKeystore * sessionKeystore; // We use TestPersistentStorageDelegate just to get an in-memory store to back @@ -90,7 +83,12 @@ @interface MTRDeviceControllerFactory () @property (readonly) PersistentStorageOperationalKeystore * keystore; @property (readonly) Credentials::PersistentStorageOpCertStore * opCertStore; @property (readonly) MTROperationalBrowser * operationalBrowser; -@property () chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; + +// productAttestationAuthorityCertificates and certificationDeclarationCertificates are just copied +// from MTRDeviceControllerFactoryParams. +@property (readonly, nullable) NSArray * productAttestationAuthorityCertificates; +@property (readonly, nullable) NSArray * certificationDeclarationCertificates; + @property (readonly) BOOL advertiseOperational; @property (nonatomic, readonly) Credentials::IgnoreCertificateValidityPeriodPolicy * certificateValidityPolicy; @property (readonly) MTRSessionResumptionStorageBridge * sessionResumptionStorage; @@ -291,16 +289,6 @@ - (void)cleanupInitObjects - (void)cleanupStartupObjects { - if (_deviceAttestationVerifier) { - delete _deviceAttestationVerifier; - _deviceAttestationVerifier = nullptr; - } - - if (_attestationTrustStoreBridge) { - delete _attestationTrustStoreBridge; - _attestationTrustStoreBridge = nullptr; - } - if (_otaProviderDelegateBridge) { delete _otaProviderDelegateBridge; _otaProviderDelegateBridge = nullptr; @@ -504,44 +492,8 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - // Initialize device attestation verifier - const Credentials::AttestationTrustStore * trustStore; - if (startupParams.productAttestationAuthorityCertificates) { - _attestationTrustStoreBridge - = new MTRAttestationTrustStoreBridge(startupParams.productAttestationAuthorityCertificates); - if (_attestationTrustStoreBridge == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorAttestationTrustStoreInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } - trustStore = _attestationTrustStoreBridge; - } else { - // TODO: Replace testingRootStore with a AttestationTrustStore that has the necessary official PAA roots available - trustStore = Credentials::GetTestAttestationTrustStore(); - } - _deviceAttestationVerifier = new Credentials::DefaultDACVerifier(trustStore); - if (_deviceAttestationVerifier == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorDACVerifierInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } - - if (startupParams.certificationDeclarationCertificates) { - auto cdTrustStore = _deviceAttestationVerifier->GetCertificationDeclarationTrustStore(); - if (cdTrustStore == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); - errorCode = CHIP_ERROR_INCORRECT_STATE; - return; - } - - for (NSData * cdSigningCert in startupParams.certificationDeclarationCertificates) { - errorCode = cdTrustStore->AddTrustedKey(AsByteSpan(cdSigningCert)); - if (errorCode != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); - return; - } - } - } + _productAttestationAuthorityCertificates = [startupParams.productAttestationAuthorityCertificates copy]; + _certificationDeclarationCertificates = [startupParams.certificationDeclarationCertificates copy]; chip::Controller::FactoryInitParams params; if (startupParams.port != nil) { @@ -827,6 +779,9 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; + } else { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; } return params; @@ -879,6 +834,9 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; + } else { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; } return params; } @@ -893,13 +851,22 @@ - (MTRDeviceController * _Nullable)createController:(MTRDeviceControllerStartupP return [self _startDeviceController:startupParameters fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { - return + auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewController:controller fabricTable:fabricTable keystore:self->_keystore advertiseOperational:self.advertiseOperational params:startupParameters error:fabricError]; + if (params != nil) { + if (params.productAttestationAuthorityCertificates == nil) { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + } + if (params.certificationDeclarationCertificates == nil) { + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; + } + } + return params; } error:error]; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 4ffcb3af545506..9717f5062c93f5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -30,7 +30,6 @@ namespace chip { namespace Credentials { class GroupDataProvider; - class DeviceAttestationVerifier; } // namespace Credentials } // namespace chip @@ -70,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN @property (readonly) chip::PersistentStorageDelegate * storageDelegate; @property (readonly) chip::Credentials::GroupDataProvider * groupData; -@property (readonly) chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h index 7087bd87fbaf8e..b592849f066974 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h @@ -27,6 +27,25 @@ MTR_NEWLY_AVAILABLE - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; +/** + * The Product Attestation Authority certificates that are trusted to sign + * device attestation information (and in particular to sign Product Attestation + * Intermediate certificates, which then sign Device Attestation Certificates). + * + * Defaults to nil. + */ +@property (nonatomic, copy, nullable) NSArray * productAttestationAuthorityCertificates; + +/** + * The Certification Declaration certificates whose public keys correspond to + * private keys that are trusted to sign certification declarations. Defaults + * to nil. + * + * These certificates are used in addition to, not replacing, the default set of + * well-known certification declaration signing keys. + */ +@property (nonatomic, copy, nullable) NSArray * certificationDeclarationCertificates; + /** * Set an MTROperationalCertificateIssuer to call (on the provided queue) when * operational certificates need to be provided during commissioning. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 9fb71429a07720..c4ad49dda014cd 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -262,6 +262,9 @@ - (instancetype)initWithStorageDelegate:(id) return nil; } + _productAttestationAuthorityCertificates = nil; + _certificationDeclarationCertificates = nil; + _ipk = ipk; _vendorID = vendorID; _rootCertificate = rootCertificate; @@ -601,6 +604,8 @@ - (instancetype)initForNewController:(MTRDeviceController *)controller _allowMultipleControllersPerFabric = YES; _storageDelegate = params.storageDelegate; _storageDelegateQueue = params.storageDelegateQueue; + _productAttestationAuthorityCertificates = params.productAttestationAuthorityCertificates; + _certificationDeclarationCertificates = params.certificationDeclarationCertificates; return self; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 53cec273ebdc52..cb7540c2e16e65 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -96,6 +96,9 @@ MTR_HIDDEN @property (nonatomic, assign, readonly) BOOL allowMultipleControllersPerFabric; +@property (nonatomic, nullable) NSArray * productAttestationAuthorityCertificates; +@property (nonatomic, nullable) NSArray * certificationDeclarationCertificates; + /** * A storage delegate that can be provided when initializing the startup params. * This must be provided if and only if the controller factory was initialized From 08f00d5d4d9aa43c43bd361fe16ba0f35b39bcf8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 31 Aug 2023 21:12:37 -0400 Subject: [PATCH 03/29] Address some review comments on Darwin controller data store. (#29003) 1) More efficient copying of arrays. 2) Make it clear what classes need to go in our storage class list. --- src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm index 4732009ade3513..7336b27f225cee 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -138,8 +138,7 @@ - (nullable instancetype)initWithController:(MTRDeviceController *)controller return nil; } } - _nodesWithResumptionInfo = [NSMutableArray arrayWithCapacity:[resumptionNodeList count]]; - [_nodesWithResumptionInfo addObjectsFromArray:resumptionNodeList]; + _nodesWithResumptionInfo = [resumptionNodeList mutableCopy]; } else { _nodesWithResumptionInfo = [[NSMutableArray alloc] init]; } @@ -184,7 +183,7 @@ - (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo // Update our resumption info node list. [_nodesWithResumptionInfo addObject:resumptionInfo.nodeID]; [_storageDelegate controller:_controller - storeValue:[NSArray arrayWithArray:_nodesWithResumptionInfo] + storeValue:[_nodesWithResumptionInfo copy] forKey:sResumptionNodeListKey securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared]; @@ -349,6 +348,9 @@ - (void)encodeWithCoder:(NSCoder *)coder NSSet * MTRDeviceControllerStorageClasses() { + // This only needs to return the classes for toplevel things we are storing, + // plus NSNumber because some archivers use that internally to store + // information about what's being archived. static NSSet * const sStorageClasses = [NSSet setWithArray:@[ [NSNumber class], [NSData class], From f3e9cfdcef91b84cc4c1ab5457a8429a6d4e076f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 31 Aug 2023 21:16:53 -0400 Subject: [PATCH 04/29] Factor out per-controller storage into test helper. (#28999) --- .../CHIPTests/MTRPerControllerStorageTests.m | 95 +++---------------- .../TestHelpers/MTRTestPerControllerStorage.h | 43 +++++++++ .../TestHelpers/MTRTestPerControllerStorage.m | 85 +++++++++++++++++ .../Matter.xcodeproj/project.pbxproj | 6 ++ 4 files changed, 148 insertions(+), 81 deletions(-) create mode 100644 src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h create mode 100644 src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index fdf03eab12ba36..894eb5f3893464 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -22,8 +22,8 @@ #import "MTRErrorTestUtils.h" #import "MTRFabricInfoChecker.h" #import "MTRTestKeys.h" +#import "MTRTestPerControllerStorage.h" #import "MTRTestResetCommissioneeHelper.h" -#import "MTRTestStorage.h" static const uint16_t kPairingTimeoutInSeconds = 10; static const uint16_t kTimeoutInSeconds = 3; @@ -69,73 +69,6 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr @end -@interface MTRPerControllerStorageTestsStorageDelegate : NSObject -@property (nonatomic, readonly) NSMutableDictionary * storage; -@property (nonatomic, readonly) NSUUID * controllerID; -@end - -@implementation MTRPerControllerStorageTestsStorageDelegate - -- (instancetype)initWithControllerID:(NSUUID *)controllerID -{ - if (!(self = [super init])) { - return nil; - } - - _storage = [[NSMutableDictionary alloc] init]; - _controllerID = controllerID; - return self; -} - -- (nullable id)controller:(MTRDeviceController *)controller - valueForKey:(NSString *)key - securityLevel:(MTRStorageSecurityLevel)securityLevel - sharingType:(MTRStorageSharingType)sharingType -{ - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - - __auto_type * data = self.storage[key]; - if (data == nil) { - return data; - } - - NSError * error; - id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; - XCTAssertNil(error); - XCTAssertNotNil(data); - - return value; -} - -- (BOOL)controller:(MTRDeviceController *)controller - storeValue:(id)value - forKey:(NSString *)key - securityLevel:(MTRStorageSecurityLevel)securityLevel - sharingType:(MTRStorageSharingType)sharingType -{ - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - - NSError * error; - NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; - XCTAssertNil(error); - XCTAssertNotNil(data); - - self.storage[key] = data; - return YES; -} - -- (BOOL)controller:(MTRDeviceController *)controller - removeValueForKey:(NSString *)key - securityLevel:(MTRStorageSecurityLevel)securityLevel - sharingType:(MTRStorageSharingType)sharingType -{ - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - self.storage[key] = nil; - return YES; -} - -@end - @interface MTRPerControllerStorageTestsCertificateIssuer : NSObject - (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate @@ -319,7 +252,7 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo operationalKeys:(MTRTestKeys *)operationalKeys fabricID:(NSNumber *)fabricID nodeID:(NSNumber *)nodeID - storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + storage:(MTRTestPerControllerStorage *)storage caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags error:(NSError * __autoreleasing *)error certificateIssuer: @@ -376,7 +309,7 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo operationalKeys:(MTRTestKeys *)operationalKeys fabricID:(NSNumber *)fabricID nodeID:(NSNumber *)nodeID - storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + storage:(MTRTestPerControllerStorage *)storage error:(NSError * __autoreleasing *)error certificateIssuer: (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer @@ -395,7 +328,7 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo operationalKeys:(MTRTestKeys *)operationalKeys fabricID:(NSNumber *)fabricID nodeID:(NSNumber *)nodeID - storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + storage:(MTRTestPerControllerStorage *)storage caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags error:(NSError * __autoreleasing *)error { @@ -413,7 +346,7 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo operationalKeys:(MTRTestKeys *)operationalKeys fabricID:(NSNumber *)fabricID nodeID:(NSNumber *)nodeID - storage:(MTRPerControllerStorageTestsStorageDelegate *)storage + storage:(MTRTestPerControllerStorage *)storage error:(NSError * __autoreleasing *)error { return [self startControllerWithRootKeys:rootKeys @@ -436,7 +369,7 @@ - (void)test001_BasicControllerStartup __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -481,7 +414,7 @@ - (void)test002_TryStartingTwoControllersWithSameNodeID __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -526,7 +459,7 @@ - (void)test003_TestTwoControllersSameUUID XCTAssertNotNil(operationalKeys); XCTAssertEqual(operationalKeys.signatureCount, 0); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * fabricID = @(456); @@ -578,7 +511,7 @@ - (void)test004_TestBasicSessionResumption XCTAssertNotNil(operationalKeys); XCTAssertEqual(operationalKeys.signatureCount, 0); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -675,7 +608,7 @@ - (void)test005_TestSessionResumptionDataClearingNodeIDChanged XCTAssertNotNil(operationalKeys); XCTAssertEqual(operationalKeys.signatureCount, 0); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID1 = @(123); NSNumber * nodeID2 = @(246); @@ -778,7 +711,7 @@ - (void)test006_TestSessionResumptionDataClearingCATsChanged XCTAssertNotNil(operationalKeys); XCTAssertEqual(operationalKeys.signatureCount, 0); - __auto_type * storageDelegate = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -887,7 +820,7 @@ - (void)test007_TestMultipleControllers NSNumber * fabricID1 = @(1); NSNumber * fabricID2 = @(2); - __auto_type * storageDelegate1 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate1 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; // Start several controllers that have distinct identities but share some // node/fabric IDs. @@ -904,7 +837,7 @@ - (void)test007_TestMultipleControllers XCTAssertNotNil(controller1); XCTAssertTrue([controller1 isRunning]); - __auto_type * storageDelegate2 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate2 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; MTRDeviceController * controller2 = [self startControllerWithRootKeys:rootKeys operationalKeys:operationalKeys fabricID:fabricID1 @@ -915,7 +848,7 @@ - (void)test007_TestMultipleControllers XCTAssertNotNil(controller2); XCTAssertTrue([controller2 isRunning]); - __auto_type * storageDelegate3 = [[MTRPerControllerStorageTestsStorageDelegate alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate3 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; MTRDeviceController * controller3 = [self startControllerWithRootKeys:rootKeys operationalKeys:operationalKeys fabricID:fabricID2 diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h new file mode 100644 index 00000000000000..b3052a9929a1af --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h @@ -0,0 +1,43 @@ +/** + * 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 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 + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRTestPerControllerStorage : NSObject + +- (instancetype)initWithControllerID:(NSUUID *)controllerID; + +@property (nonatomic, readonly) NSUUID * controllerID; + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m new file mode 100644 index 00000000000000..1898bd14832cf9 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m @@ -0,0 +1,85 @@ +/** + * 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 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 "MTRTestPerControllerStorage.h" + +@interface MTRTestPerControllerStorage () +@property (nonatomic, readonly) NSMutableDictionary * storage; +@end + +@implementation MTRTestPerControllerStorage + +- (instancetype)initWithControllerID:(NSUUID *)controllerID +{ + if (!(self = [super init])) { + return nil; + } + + _storage = [[NSMutableDictionary alloc] init]; + _controllerID = controllerID; + return self; +} + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + __auto_type * data = self.storage[key]; + if (data == nil) { + return data; + } + + NSError * error; + id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + return value; +} + +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + NSError * error; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + self.storage[key] = data; + return YES; +} + +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + self.storage[key] = nil; + return YES; +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 1520c2a9d12082..edc68cd47eb1c4 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -172,6 +172,7 @@ 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */ = {isa = PBXBuildFile; fileRef = 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */; settings = {ATTRIBUTES = (Public, ); }; }; 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */; }; 517BF3F3282B62CB00A8B7DB /* MTRCertificateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */; }; + 518D3F832AA132DC008E0007 /* MTRTestPerControllerStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */; }; 519498322A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */; }; 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */; }; 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -486,6 +487,8 @@ 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCertificates.h; sourceTree = ""; }; 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCertificates.mm; sourceTree = ""; }; 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRCertificateTests.m; sourceTree = ""; }; + 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestPerControllerStorage.m; sourceTree = ""; }; + 518D3F822AA132DC008E0007 /* MTRTestPerControllerStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestPerControllerStorage.h; sourceTree = ""; }; 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRSetupPayloadSerializerTests.m; sourceTree = ""; }; 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRDataValueParserTests.m; sourceTree = ""; }; 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRStructsObjc.h; sourceTree = ""; }; @@ -968,6 +971,8 @@ 51742B4829CB5F45009974FE /* MTRTestResetCommissioneeHelper.h */, 51742B4929CB5FC0009974FE /* MTRTestResetCommissioneeHelper.m */, 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */, + 518D3F822AA132DC008E0007 /* MTRTestPerControllerStorage.h */, + 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */, 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */, ); path = TestHelpers; @@ -1581,6 +1586,7 @@ 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* MTRXPCProtocolTests.m in Sources */, 1EE0805E2A44875E008A03C2 /* MTRCommissionableBrowserTests.m in Sources */, + 518D3F832AA132DC008E0007 /* MTRTestPerControllerStorage.m in Sources */, 51339B1F2A0DA64D00C798C1 /* MTRCertificateValidityTests.m in Sources */, 5173A47929C0E82300F67F48 /* MTRFabricInfoTests.m in Sources */, 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */, From 105b771e3727fb9b6522220a2466a402e5659953 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Thu, 31 Aug 2023 23:02:05 -0400 Subject: [PATCH 05/29] [ICD] Add Check-In payload generation (#27615) * Add Check-In payload generation * Applied PR comments * Fix last comment * address comments * address comments * fix comments * fix payload representation type * Fix OpenIotSDK failure * fix last test issue --- src/crypto/CHIPCryptoPAL.h | 2 + src/protocols/secure_channel/BUILD.gn | 3 + .../secure_channel/CheckinMessage.cpp | 102 +++++++ src/protocols/secure_channel/CheckinMessage.h | 90 ++++++ src/protocols/secure_channel/tests/BUILD.gn | 2 + .../secure_channel/tests/TestCheckinMsg.cpp | 272 ++++++++++++++++++ 6 files changed, 471 insertions(+) create mode 100644 src/protocols/secure_channel/CheckinMessage.cpp create mode 100644 src/protocols/secure_channel/CheckinMessage.h create mode 100644 src/protocols/secure_channel/tests/TestCheckinMsg.cpp diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index be19881c342c43..9e276b9eea4359 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -93,6 +93,8 @@ constexpr size_t kAES_CCM128_Block_Length = kAES_CCM128_Key_Length; constexpr size_t kAES_CCM128_Nonce_Length = 13; constexpr size_t kAES_CCM128_Tag_Length = 16; +constexpr size_t CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES = kAES_CCM128_Nonce_Length; + /* These sizes are hardcoded here to remove header dependency on underlying crypto library * in a public interface file. The validity of these sizes is verified by static_assert in * the implementation files. diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 93997d0642b37f..5a24a984719a5e 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -29,6 +29,8 @@ static_library("secure_channel") { "CASEServer.h", "CASESession.cpp", "CASESession.h", + "CheckinMessage.cpp", + "CheckinMessage.h", "DefaultSessionResumptionStorage.cpp", "DefaultSessionResumptionStorage.h", "PASESession.cpp", @@ -50,6 +52,7 @@ static_library("secure_channel") { public_deps = [ ":type_definitions", + "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", diff --git a/src/protocols/secure_channel/CheckinMessage.cpp b/src/protocols/secure_channel/CheckinMessage.cpp new file mode 100644 index 00000000000000..358133a42b81b1 --- /dev/null +++ b/src/protocols/secure_channel/CheckinMessage.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the Matter Checkin protocol. + */ + +#include "CheckinMessage.h" +#include + +#include +#include + +namespace chip { +namespace Protocols { +namespace SecureChannel { + +CHIP_ERROR CheckinMessage::GenerateCheckinMessagePayload(Crypto::Aes128KeyHandle & key, CounterType counter, + const ByteSpan & appData, MutableByteSpan & output) +{ + VerifyOrReturnError(appData.size() <= sMaxAppDataSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(output.size() >= (appData.size() + sMinPayloadSize), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t * appDataStartPtr = output.data() + CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES; + Encoding::LittleEndian::Put32(appDataStartPtr, counter); + + chip::Crypto::HMAC_sha shaHandler; + uint8_t nonceWorkBuffer[CHIP_CRYPTO_HASH_LEN_BYTES] = { 0 }; + + ReturnErrorOnFailure(shaHandler.HMAC_SHA256(key.As(), sizeof(Aes128KeyByteArray), appDataStartPtr, + sizeof(CounterType), nonceWorkBuffer, CHIP_CRYPTO_HASH_LEN_BYTES)); + + static_assert(sizeof(nonceWorkBuffer) >= CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, "We're reading off the end of our buffer."); + memcpy(output.data(), nonceWorkBuffer, CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES); + + // In place encryption to save some RAM + memcpy(appDataStartPtr + sizeof(CounterType), appData.data(), appData.size()); + + uint8_t * micPtr = appDataStartPtr + sizeof(CounterType) + appData.size(); + ReturnErrorOnFailure(Crypto::AES_CCM_encrypt(appDataStartPtr, sizeof(CounterType) + appData.size(), nullptr, 0, key, + output.data(), CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, appDataStartPtr, micPtr, + CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES)); + + output.reduce_size(appData.size() + sMinPayloadSize); + + return err; +} + +CHIP_ERROR CheckinMessage::ParseCheckinMessagePayload(Crypto::Aes128KeyHandle & key, ByteSpan & payload, CounterType & counter, + MutableByteSpan & appData) +{ + VerifyOrReturnError(payload.size() >= sMinPayloadSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(payload.size() <= (sMinPayloadSize + sMaxAppDataSize), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err = CHIP_NO_ERROR; + size_t appDataSize = GetAppDataSize(payload); + + // To prevent workbuffer usage, appData size needs to be large enough to hold both the appData and the counter + VerifyOrReturnError(appData.size() >= sizeof(CounterType) + appDataSize, CHIP_ERROR_INVALID_ARGUMENT); + + ByteSpan nonce = payload.SubSpan(0, CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES); + ByteSpan encryptedData = payload.SubSpan(CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, sizeof(CounterType) + appDataSize); + ByteSpan mic = + payload.SubSpan(CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES + sizeof(CounterType) + appDataSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES); + + err = Crypto::AES_CCM_decrypt(encryptedData.data(), encryptedData.size(), nullptr, 0, mic.data(), mic.size(), key, nonce.data(), + nonce.size(), appData.data()); + + ReturnErrorOnFailure(err); + + counter = Encoding::LittleEndian::Get32(appData.data()); + // Shift to remove the counter from the appData + memmove(appData.data(), sizeof(CounterType) + appData.data(), appDataSize); + + appData.reduce_size(appDataSize); + return err; +} + +size_t CheckinMessage::GetAppDataSize(ByteSpan & payload) +{ + return (payload.size() <= sMinPayloadSize) ? 0 : payload.size() - sMinPayloadSize; +} + +} // namespace SecureChannel +} // namespace Protocols +} // namespace chip diff --git a/src/protocols/secure_channel/CheckinMessage.h b/src/protocols/secure_channel/CheckinMessage.h new file mode 100644 index 00000000000000..aa494c3689b5c8 --- /dev/null +++ b/src/protocols/secure_channel/CheckinMessage.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the Matter Checkin protocol. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace Protocols { +namespace SecureChannel { +using namespace Crypto; + +using CounterType = uint32_t; + +/** + * @brief Implement section 4.18.2 of the spec regarding + * Check-in message payload + * + */ +class DLL_EXPORT CheckinMessage +{ +public: + ~CheckinMessage(); + /** + * @brief Generate Check-in Message payload + * + * @param key Key with which to encrypt the check-in payload + * @param counter Check-in counter + * @param appData Application Data to incorporate within the Check-in message. Allowed to be empty. + * @param output Buffer in Which to store the generated payload. SUFFICIENT SPACE MUST BE ALLOCATED by the caller + * Required Buffer Size is : GetCheckinPayloadSize(appData.size()) + * @return CHIP_ERROR + */ + static CHIP_ERROR GenerateCheckinMessagePayload(Crypto::Aes128KeyHandle & key, CounterType counter, const ByteSpan & appData, + MutableByteSpan & output); + + /** + * @brief Parse Check-in Message payload + * + * @param key Key with which to decrypt the check-in payload + * @param payload The received payload to decrypt and parse + * @param counter The counter value retrieved from the payload + * @param appData The optional application data decrypted. The size of appData must be at least the size of + * GetAppDataSize(payload) + sizeof(CounterType) + * @return CHIP_ERROR + */ + static CHIP_ERROR ParseCheckinMessagePayload(Crypto::Aes128KeyHandle & key, ByteSpan & payload, CounterType & counter, + MutableByteSpan & appData); + + static inline size_t GetCheckinPayloadSize(size_t appDataSize) { return appDataSize + sMinPayloadSize; } + + /** + * @brief Get the App Data Size + * + * @param payload The undecrypted payload + * @return size_t size in byte of the application data from the payload + */ + static size_t GetAppDataSize(ByteSpan & payload); + + static constexpr uint16_t sMinPayloadSize = + CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES + sizeof(CounterType) + CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES; + + // Issue #28603 + static constexpr uint16_t sMaxAppDataSize = 1024; +}; + +} // namespace SecureChannel +} // namespace Protocols +} // namespace chip diff --git a/src/protocols/secure_channel/tests/BUILD.gn b/src/protocols/secure_channel/tests/BUILD.gn index 6f7963a2396883..5c3ec4a30696c3 100644 --- a/src/protocols/secure_channel/tests/BUILD.gn +++ b/src/protocols/secure_channel/tests/BUILD.gn @@ -13,6 +13,7 @@ chip_test_suite("tests") { # TODO - Fix Message Counter Sync to use group key # "TestMessageCounterManager.cpp", + "TestCheckinMsg.cpp", "TestDefaultSessionResumptionStorage.cpp", "TestPASESession.cpp", "TestPairingSession.cpp", @@ -22,6 +23,7 @@ chip_test_suite("tests") { public_deps = [ "${chip_root}/src/credentials/tests:cert_test_vectors", + "${chip_root}/src/crypto/tests:tests_lib", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/lib/support:testing", diff --git a/src/protocols/secure_channel/tests/TestCheckinMsg.cpp b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp new file mode 100644 index 00000000000000..37f7c765729dd3 --- /dev/null +++ b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp @@ -0,0 +1,272 @@ +/* + * + * Copyright (c) 2021 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 +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::Protocols; +using namespace chip::Protocols::SecureChannel; +using TestSessionKeystoreImpl = Crypto::DefaultSessionKeystore; + +void TestCheckin_Generate(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan oldOutputBuffer{ b }; + uint32_t counter = 0; + ByteSpan userData; + CHIP_ERROR err = CHIP_NO_ERROR; + TestSessionKeystoreImpl keystore; + + // Verify that keys imported to the keystore behave as expected. + for (const ccm_128_test_vector * testPtr : ccm_128_test_vectors) + { + const ccm_128_test_vector & test = *testPtr; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + // Validate that counter change, indeed changes the output buffer content + counter = 0; + for (uint8_t j = 0; j < 5; j++) + { + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + // Verifiy that the output buffer changed + NL_TEST_ASSERT(inSuite, !outputBuffer.data_equal(oldOutputBuffer)); + CopySpanToMutableSpan(outputBuffer, oldOutputBuffer); + + // Increment by a random count. On the slim changes the increment is 0 add 1 to change output buffer + counter += chip::Crypto::GetRandU32() + 1; + outputBuffer = MutableByteSpan(a); + } + keystore.DestroyKey(keyHandle); + } + + // Parameter check + { + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + const ccm_128_test_vector & test = *ccm_128_test_vectors[0]; + uint8_t gargantuaBuffer[2 * CheckinMessage::sMaxAppDataSize] = { 0 }; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + // As of now passing an empty key handle while using PSA crypto will result in a failure. + // However when using OpenSSL this same test result in a success. + // Issue #28986 + + // Aes128KeyHandle emptyKeyHandle; + // err = CheckinMessage::GenerateCheckinMessagePayload(emptyKeyHandle, counter, userData, outputBuffer); + // ChipLogError(Inet, "%s", err.AsString()); + // NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + ByteSpan emptyData; + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, emptyData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + MutableByteSpan empty; + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, emptyData, empty); + NL_TEST_ASSERT(inSuite, (CHIP_ERROR_INVALID_ARGUMENT == err)); + + userData = chip::ByteSpan(gargantuaBuffer, sizeof(gargantuaBuffer)); + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_ERROR_INVALID_ARGUMENT == err)); + + // Cleanup + keystore.DestroyKey(keyHandle); + } +} + +void TestCheckin_Parse(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan buffer{ b }; + uint32_t counter = 0, decryptedCounter; + ByteSpan userData; + + CHIP_ERROR err = CHIP_NO_ERROR; + + TestSessionKeystoreImpl keystore; + + // Verify User Data Encryption Decryption + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + const ccm_128_test_vector & test = *ccm_128_test_vectors[0]; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + //=================Encrypt======================= + + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + ByteSpan payload = chip::ByteSpan(outputBuffer.data(), outputBuffer.size()); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + //=================Decrypt======================= + + MutableByteSpan empty; + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, payload, decryptedCounter, empty); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR != err)); + + ByteSpan emptyPayload; + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, emptyPayload, decryptedCounter, buffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR != err)); +} + +void TestCheckin_GenerateParse(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan buffer{ b }; + uint32_t counter = 0xDEADBEEF; + ByteSpan userData; + + CHIP_ERROR err = CHIP_NO_ERROR; + + TestSessionKeystoreImpl keystore; + + // Verify User Data Encryption Decryption + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + for (const ccm_128_test_vector * testPtr : ccm_128_test_vectors) + { + const ccm_128_test_vector & test = *testPtr; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + //=================Encrypt======================= + + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + //=================Decrypt======================= + uint32_t decryptedCounter = 0; + ByteSpan payload = chip::ByteSpan(outputBuffer.data(), outputBuffer.size()); + + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, payload, decryptedCounter, buffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + NL_TEST_ASSERT(inSuite, (memcmp(data, buffer.data(), sizeof(data)) == 0)); + NL_TEST_ASSERT(inSuite, (counter == decryptedCounter)); + + // reset buffers + memset(a, 0, sizeof(a)); + memset(b, 0, sizeof(b)); + outputBuffer = MutableByteSpan(a); + buffer = MutableByteSpan(b); + + counter += chip::Crypto::GetRandU32() + 1; + keystore.DestroyKey(keyHandle); + } +} + +// Test Suite + +/** + * Test Suite that lists all the test functions. + */ +// clang-format off +static const nlTest sTests[] = +{ + NL_TEST_DEF("TestCheckin_Generate", TestCheckin_Generate), + NL_TEST_DEF("TestCheckin_Parse", TestCheckin_Parse), + NL_TEST_DEF("TestCheckin_GenerateParse", TestCheckin_GenerateParse), + + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +static int TestSetup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +static int TestTeardown(void * inContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +static nlTestSuite sSuite = +{ + "Test-CHIP-Checkin-Message", + &sTests[0], + TestSetup, + TestTeardown, +}; +// clang-format on + +/** + * Main + */ +int TestCheckinMessage() +{ + // Run test suit against one context + nlTestRunner(&sSuite, nullptr); + + return (nlTestRunnerStats(&sSuite)); +} + +CHIP_REGISTER_TEST_SUITE(TestCheckinMessage) From ea3970a7f11cd227ac55917edaa835a2a9bc4fc8 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 1 Sep 2023 04:01:32 -0400 Subject: [PATCH 06/29] TC-IDM-10.1: add checks for no unexpected global/standard range attributes (#28902) * Add checks for no unexpected global/standard range attributes * add todo * Apply suggestions from code review Co-authored-by: Tennessee Carmel-Veilleux * name the event list id * use the attribute list rather than the list of returned attributes * Split standard attr check by standard / reserved range * Remove second define. * Add manufacturer range attribute checks --------- Co-authored-by: Tennessee Carmel-Veilleux --- .../TC_DeviceBasicComposition.py | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index dd9446ddda98ee..63a03fa9c3a8d7 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -28,6 +28,7 @@ from typing import Any, Callable, Optional import chip.clusters as Clusters +import chip.clusters.ClusterObjects import chip.tlv from chip.clusters.Attribute import ValueDecodeFailure from matter_testing_support import AttributePathLocation, MatterBaseTest, async_test_body, default_matter_test_main @@ -496,6 +497,71 @@ class RequiredMandatoryAttribute: success = False continue + # Validate there are attributes in the global range that are not in the required list + allowed_globals = [a.id for a in ATTRIBUTES_TO_CHECK] + # also allow event list because it's not disallowed + event_list_id = 0xFFFA + allowed_globals.append(event_list_id) + global_range_min = 0x0000_F000 + standard_range_max = 0x000_4FFF + mei_range_min = 0x0001_0000 + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + globals = [a for a in cluster[ATTRIBUTE_LIST_ID] if a >= global_range_min and a < mei_range_min] + unexpected_globals = sorted(list(set(globals) - set(allowed_globals))) + for unexpected in unexpected_globals: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=unexpected) + self.record_error(self.get_test_name(), location=location, + problem=f"Unexpected global attribute {unexpected} in cluster {cluster_id}", spec_location="Global elements") + success = False + + # validate that all the returned attributes in the standard clusters contain only known attribute ids + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + if cluster_id not in chip.clusters.ClusterObjects.ALL_ATTRIBUTES: + # Skip clusters that are not part of the standard generated corpus (e.g. MS clusters) + continue + standard_attributes = [a for a in cluster[ATTRIBUTE_LIST_ID] if a <= standard_range_max] + allowed_standard_attributes = chip.clusters.ClusterObjects.ALL_ATTRIBUTES[cluster_id] + unexpected_standard_attributes = sorted(list(set(standard_attributes) - set(allowed_standard_attributes))) + for unexpected in unexpected_standard_attributes: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=unexpected) + self.record_error(self.get_test_name(), location=location, + problem=f"Unexpected standard attribute {unexpected} in cluster {cluster_id}", spec_location=f"Cluster {cluster_id}") + success = False + + # validate there are no attributes in the range between standard and global + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + bad_range_values = [a for a in cluster[ATTRIBUTE_LIST_ID] if a > standard_range_max and a < global_range_min] + for bad in bad_range_values: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=bad) + self.record_error(self.get_test_name(), location=location, + problem=f"Attribute in undefined range {bad} in cluster {cluster_id}", spec_location=f"Cluster {cluster_id}") + success = False + + # Validate that any attribute in the manufacturer prefix range is in the standard suffix range. + suffix_mask = 0x000_FFFF + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + manufacturer_range_values = [a for a in cluster[ATTRIBUTE_LIST_ID] if a > mei_range_min] + for manufacturer_value in manufacturer_range_values: + suffix = manufacturer_value & suffix_mask + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=manufacturer_value) + if suffix > standard_range_max and suffix < global_range_min: + self.record_error(self.get_test_name(), location=location, + problem=f"Manufacturer attribute in undefined range {manufacturer_value} in cluster {cluster_id}", + spec_location=f"Cluster {cluster_id}") + success = False + elif suffix >= global_range_min: + self.record_error(self.get_test_name(), location=location, + problem=f"Manufacturer attribute in global range {manufacturer_value} in cluster {cluster_id}", + spec_location=f"Cluster {cluster_id}") + success = False + + # TODO: maybe while we're at it, we should check that the command list doesn't contain unexpected commands. + # Validate presence of claimed attributes if success: # TODO: Also check the reverse: that each attribute appears in the AttributeList. From ddb9c770419f9eeaaa2860de116d08ea05d4ac96 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 1 Sep 2023 09:50:17 -0400 Subject: [PATCH 07/29] Fix standard naming for ember status codes (#29013) * s/STATE/STATUS * Undo submodule change --- src/app/util/af-enums.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 27a9c76855bfee..bb694ac31b333b 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -67,6 +67,6 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_PATHS_EXHAUSTED = 0xC8, EMBER_ZCL_STATUS_TIMED_REQUEST_MISMATCH = 0xC9, EMBER_ZCL_STATUS_FAILSAFE_REQUIRED = 0xCA, - EMBER_ZCL_STATE_INVALID_IN_STATE = 0xCB, + EMBER_ZCL_STATUS_INVALID_IN_STATE = 0xCB, EMBER_ZCL_STATUS_WRITE_IGNORED = 0xF0, // NOT SPEC COMPLIANT FOR TEST ONLY }; From 24a694238872f980d972aed8452fdea6b4f7e37b Mon Sep 17 00:00:00 2001 From: William Date: Fri, 1 Sep 2023 15:26:39 +0100 Subject: [PATCH 08/29] AirQuality: fixed typo where the air-quality-server was added to the wrong cluster. (#29006) --- src/app/zap_cluster_list.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 44109ba4634ab1..9cec759b259d71 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -115,14 +115,14 @@ "ServerDirectories": { "ACCESS_CONTROL_CLUSTER": ["access-control-server"], "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"], - "ACTIONS_CLUSTER": ["air-quality-server"], + "ACTIONS_CLUSTER": [], "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [ "resource-monitoring-server" ], "ADMINISTRATOR_COMMISSIONING_CLUSTER": [ "administrator-commissioning-server" ], - "AIR_QUALITY_CLUSTER": [], + "AIR_QUALITY_CLUSTER": ["air-quality-server"], "ALARM_CLUSTER": [], "APPLICATION_BASIC_CLUSTER": ["application-basic-server"], "APPLICATION_LAUNCHER_CLUSTER": ["application-launcher-server"], From 985794a2fd2cda29dee32a6288a2b1ea80fdf4cf Mon Sep 17 00:00:00 2001 From: William Date: Fri, 1 Sep 2023 15:27:34 +0100 Subject: [PATCH 09/29] Fix/post pr 28707 comments (#28993) * AitQuality: Changed the feature attribute type to a BitMask of the Feature type. Fixed bug in the UpdateAirQuality method where checks where made against an incorrect enum. * Added an out-of-band API to set the AirQuality attribute in the linux all-clusters-app. * Added a check to ensure that the value given to UpdateAirQuality is not beyond the list of acceptable enums. * Restyled by clang-format * AirQuality: Renamed the out-of-band message's key Co-authored-by: Boris Zbarsky * AirQuality: Moved the check for the valid enum value in the switch statement. * Restyled by clang-format --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- .../include/air-quality-instance.h | 2 ++ .../src/air-quality-instance.cpp | 7 ++++- .../linux/AllClustersCommandDelegate.cpp | 26 +++++++++++++++++++ .../linux/AllClustersCommandDelegate.h | 5 ++++ .../air-quality-server/air-quality-server.cpp | 23 +++++++++------- .../air-quality-server/air-quality-server.h | 6 ++--- 6 files changed, 56 insertions(+), 13 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h b/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h index eb2b7c89288da4..8480fd61509ab8 100644 --- a/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h +++ b/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h @@ -7,6 +7,8 @@ namespace app { namespace Clusters { namespace AirQuality { +Instance * GetInstance(); + void Shutdown(); } // namespace AirQuality diff --git a/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp index eb5f4dc5607dc3..c78f34e9a8f31f 100644 --- a/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp @@ -5,6 +5,11 @@ using namespace chip::app::Clusters::AirQuality; Instance * gAirQualityCluster = nullptr; +Instance * AirQuality::GetInstance() +{ + return gAirQualityCluster; +} + void AirQuality::Shutdown() { if (gAirQualityCluster != nullptr) @@ -20,6 +25,6 @@ void emberAfAirQualityClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gAirQualityCluster == nullptr); chip::BitMask airQualityFeatures(Feature::kModerate, Feature::kFair, Feature::kVeryPoor, Feature::kExtremelyPoor); - gAirQualityCluster = new Instance(1, airQualityFeatures.Raw()); + gAirQualityCluster = new Instance(1, airQualityFeatures); gAirQualityCluster->Init(); } diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 19c8635a6b665e..39e3516ada4c96 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -164,6 +165,19 @@ void AllClustersAppCommandHandler::HandleCommand(intptr_t context) } self->OnModeChangeHandler(device, type, mode); } + else if (name == "SetAirQuality") + { + Json::Value jsonAirQualityEnum = self->mJsonValue["NewValue"]; + + if (jsonAirQualityEnum.isNull()) + { + ChipLogError(NotSpecified, "The SetAirQuality command requires the NewValue key."); + } + else + { + self->OnAirQualityChange(static_cast(jsonAirQualityEnum.asUInt())); + } + } else { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); @@ -414,6 +428,18 @@ void AllClustersAppCommandHandler::OnModeChangeHandler(std::string device, std:: } } +void AllClustersAppCommandHandler::OnAirQualityChange(uint32_t aNewValue) +{ + AirQuality::Instance * airQualityInstance = AirQuality::GetInstance(); + Protocols::InteractionModel::Status status = + airQualityInstance->UpdateAirQuality(static_cast(aNewValue)); + + if (status != Protocols::InteractionModel::Status::Success) + { + ChipLogDetail(NotSpecified, "Invalid value: %u", aNewValue); + } +} + void AllClustersCommandDelegate::OnEventCommandReceived(const char * json) { auto handler = AllClustersAppCommandHandler::FromJSON(json); diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index 20b2ab731b75d3..7998cd15581a74 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -93,6 +93,11 @@ class AllClustersAppCommandHandler * Should be called when it is necessary to change the mode to manual operation. */ void OnModeChangeHandler(std::string device, std::string type, chip::app::DataModel::Nullable mode); + + /** + * Should be called when it is necessary to change the air quality attribute. + */ + void OnAirQualityChange(uint32_t aEnum); }; class AllClustersCommandDelegate : public NamedPipeCommandDelegate diff --git a/src/app/clusters/air-quality-server/air-quality-server.cpp b/src/app/clusters/air-quality-server/air-quality-server.cpp index 938c158e49ca56..875bd4c4dfa9bb 100644 --- a/src/app/clusters/air-quality-server/air-quality-server.cpp +++ b/src/app/clusters/air-quality-server/air-quality-server.cpp @@ -32,7 +32,7 @@ namespace app { namespace Clusters { namespace AirQuality { -Instance::Instance(EndpointId aEndpointId, uint32_t aFeature) : +Instance::Instance(EndpointId aEndpointId, BitMask aFeature) : AttributeAccessInterface(Optional(aEndpointId), Id), mEndpointId(aEndpointId), mFeature(aFeature) {} @@ -51,9 +51,9 @@ CHIP_ERROR Instance::Init() return CHIP_NO_ERROR; } -bool Instance::HasFeature(AirQualityEnum aFeature) const +bool Instance::HasFeature(Feature aFeature) const { - return mFeature & to_underlying(aFeature); + return mFeature.Has(aFeature); } Protocols::InteractionModel::Status Instance::UpdateAirQuality(AirQualityEnum aNewAirQuality) @@ -62,35 +62,40 @@ Protocols::InteractionModel::Status Instance::UpdateAirQuality(AirQualityEnum aN switch (aNewAirQuality) { case AirQualityEnum::kFair: { - if (!HasFeature(AirQualityEnum::kFair)) + if (!HasFeature(Feature::kFair)) { return Protocols::InteractionModel::Status::ConstraintError; } } break; case AirQualityEnum::kModerate: { - if (!HasFeature(AirQualityEnum::kModerate)) + if (!HasFeature(Feature::kModerate)) { return Protocols::InteractionModel::Status::ConstraintError; } } break; - case AirQualityEnum::kPoor: { - if (!HasFeature(AirQualityEnum::kPoor)) + case AirQualityEnum::kVeryPoor: { + if (!HasFeature(Feature::kVeryPoor)) { return Protocols::InteractionModel::Status::ConstraintError; } } break; case AirQualityEnum::kExtremelyPoor: { - if (!HasFeature(AirQualityEnum::kExtremelyPoor)) + if (!HasFeature(Feature::kExtremelyPoor)) { return Protocols::InteractionModel::Status::ConstraintError; } } break; - default: + case AirQualityEnum::kUnknown: + case AirQualityEnum::kGood: + case AirQualityEnum::kPoor: break; + default: { + return Protocols::InteractionModel::Status::InvalidValue; + } } mAirQuality = aNewAirQuality; diff --git a/src/app/clusters/air-quality-server/air-quality-server.h b/src/app/clusters/air-quality-server/air-quality-server.h index 90abf3b17e290a..d14d4e52a351a0 100644 --- a/src/app/clusters/air-quality-server/air-quality-server.h +++ b/src/app/clusters/air-quality-server/air-quality-server.h @@ -34,7 +34,7 @@ class Instance : public AttributeAccessInterface * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. * @param aFeature The bitmask value that identifies which features are supported by this instance. */ - Instance(EndpointId aEndpointId, uint32_t eFeature); + Instance(EndpointId aEndpointId, BitMask aFeature); ~Instance() override; @@ -49,7 +49,7 @@ class Instance : public AttributeAccessInterface * Returns true if the feature is supported. * @param feature the feature to check. */ - bool HasFeature(AirQualityEnum) const; + bool HasFeature(Feature aFeature) const; /** * Sets the AirQuality attribute. @@ -66,7 +66,7 @@ class Instance : public AttributeAccessInterface private: EndpointId mEndpointId; AirQualityEnum mAirQuality = AirQualityEnum::kUnknown; - uint32_t mFeature; + BitMask mFeature; // AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; From f2ce180b785377457c9831da73e46e1dfdf06021 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 1 Sep 2023 07:29:09 -0700 Subject: [PATCH 10/29] Fix failing to find Optional class issue (#28991) --- src/lib/support/JniReferences.cpp | 35 +++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/lib/support/JniReferences.cpp b/src/lib/support/JniReferences.cpp index de61a98d74641d..870ec3fc2d1d56 100644 --- a/src/lib/support/JniReferences.cpp +++ b/src/lib/support/JniReferences.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include #include @@ -79,8 +80,17 @@ CHIP_ERROR JniReferences::GetClassRef(JNIEnv * env, const char * clsType, jclass CHIP_ERROR err = CHIP_NO_ERROR; jclass cls = nullptr; - cls = env->FindClass(clsType); - env->ExceptionClear(); + // Try `j$/util/Optional` when enabling Java8. + if (strcmp(clsType, "java/util/Optional") == 0) + { + cls = env->FindClass("j$/util/Optional"); + } + + if (cls == nullptr) + { + env->ExceptionClear(); + cls = env->FindClass(clsType); + } if (cls == nullptr) { @@ -121,6 +131,20 @@ CHIP_ERROR JniReferences::FindMethod(JNIEnv * env, jobject object, const char * VerifyOrReturnError(javaClass != nullptr, CHIP_JNI_ERROR_TYPE_NOT_FOUND); *methodId = env->GetMethodID(javaClass, methodName, methodSignature); + + // Try `j$` when enabling Java8. + std::string methodSignature_java8_str(methodSignature); + if (*methodId == nullptr && methodSignature_java8_str.find("java/util/Optional") != std::string::npos) + { + // Replace all "java/util/Optional" with "j$/util/Optional". + while (methodSignature_java8_str.find("java/util/Optional") != std::string::npos) + { + size_t pos = methodSignature_java8_str.find("java/util/Optional"); + methodSignature_java8_str.replace(pos, strlen("java/util/Optional"), "j$/util/Optional"); + } + *methodId = env->GetMethodID(javaClass, methodName, methodSignature_java8_str.c_str()); + } + VerifyOrReturnError(*methodId != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); return err; @@ -193,6 +217,13 @@ CHIP_ERROR JniReferences::CreateOptional(jobject objectToWrap, jobject & outOpti chip::JniClass jniClass(optionalCls); jmethodID ofMethod = env->GetStaticMethodID(optionalCls, "ofNullable", "(Ljava/lang/Object;)Ljava/util/Optional;"); + + // Try `Lj$/util/Optional;` when enabling Java8. + if (ofMethod == nullptr) + { + ofMethod = env->GetStaticMethodID(optionalCls, "ofNullable", "(Ljava/lang/Object;)Lj$/util/Optional;"); + } + VerifyOrReturnError(ofMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); outOptional = env->CallStaticObjectMethod(optionalCls, ofMethod, objectToWrap); From 32bd91387a33867e049b4c3b7be24b73c500cc68 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 10:30:35 -0400 Subject: [PATCH 11/29] Update ZAP to v2023.08.30-nightly. (#28988) This fixes non-determinism in .zap files, so they will stop changing every time they are opened/closed. Fixes https://github.com/project-chip/connectedhomeip/issues/28967 --- .../air-quality-sensor-app.zap | 237 ++++++++-------- .../all-clusters-common/all-clusters-app.zap | 31 +- .../all-clusters-minimal-app.zap | 39 +-- .../bridge-app/bridge-common/bridge-app.zap | 20 +- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 19 +- ...r_humiditysensor_thermostat_56de3d5f45.zap | 267 ++++++++---------- .../rootnode_basicvideoplayer_0ff86e943b.zap | 15 +- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 19 +- .../rootnode_contactsensor_lFAGG1bfRO.zap | 15 +- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 15 +- .../rootnode_dishwasher_cc105034fe.zap | 21 +- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 15 +- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 15 +- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 15 +- .../rootnode_flowsensor_1zVxHedlaV.zap | 15 +- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 15 +- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 15 +- .../rootnode_laundrywasher_fb10d238c8.zap | 19 +- .../rootnode_lightsensor_lZQycTFcJK.zap | 15 +- .../rootnode_occupancysensor_iHyVgifZuo.zap | 15 +- .../rootnode_onofflight_bbs1b7IaOV.zap | 15 +- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 15 +- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 19 +- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 15 +- .../chef/devices/rootnode_pump_a811bb33a0.zap | 19 +- ...emperaturecontrolledcabinet_ffdb696680.zap | 33 +-- ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 15 +- ...rootnode_roomairconditioner_9cf3607804.zap | 15 +- .../rootnode_smokecoalarm_686fe0dcb8.zap | 31 +- .../devices/rootnode_speaker_RpzeXdimqA.zap | 19 +- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 15 +- .../rootnode_thermostat_bm3fb8dhYi.zap | 31 +- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 15 +- examples/chef/devices/template.zap | 15 +- .../contact-sensor-app.zap | 15 +- .../dishwasher-common/dishwasher-app.zap | 19 +- .../light-switch-common/light-switch-app.zap | 24 +- .../data_model/lighting-app-thread.zap | 15 +- .../data_model/lighting-app-wifi.zap | 19 +- .../lighting-common/lighting-app.zap | 19 +- .../lighting-app/nxp/zap/lighting-on-off.zap | 19 +- examples/lighting-app/qpg/zap/light.zap | 15 +- .../silabs/data_model/lighting-thread-app.zap | 17 +- .../silabs/data_model/lighting-wifi-app.zap | 17 +- examples/lock-app/lock-common/lock-app.zap | 19 +- examples/lock-app/nxp/zap/lock-app.zap | 19 +- examples/lock-app/qpg/zap/lock.zap | 15 +- .../log-source-common/log-source-app.zap | 10 +- .../ota-provider-common/ota-provider-app.zap | 10 +- .../ota-requestor-app.zap | 20 +- .../placeholder/linux/apps/app1/config.zap | 17 +- .../placeholder/linux/apps/app2/config.zap | 21 +- examples/pump-app/pump-common/pump-app.zap | 15 +- .../silabs/data_model/pump-thread-app.zap | 15 +- .../silabs/data_model/pump-wifi-app.zap | 19 +- .../pump-controller-app.zap | 15 +- .../resource-monitoring-app.zap | 15 +- .../smoke-co-alarm-app.zap | 17 +- .../temperature-measurement.zap | 15 +- .../thermostat-common/thermostat.zap | 31 +- examples/tv-app/tv-common/tv-app.zap | 33 +-- .../tv-casting-common/tv-casting-app.zap | 15 +- .../virtual-device-app.zap | 19 +- examples/window-app/common/window-app.zap | 26 +- scripts/setup/zap.json | 4 +- scripts/setup/zap.version | 2 +- .../zap/tests/inputs/all-clusters-app.zap | 39 +-- .../tools/zap/tests/inputs/lighting-app.zap | 19 +- scripts/tools/zap/zap_execution.py | 2 +- .../data_model/controller-clusters.zap | 232 ++++++++------- 70 files changed, 552 insertions(+), 1400 deletions(-) diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index e38e25ea76d399..2943227d356225 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5538,7 +5533,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", @@ -5546,16 +5540,12 @@ }, "deviceTypes": [ { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", "name": "MA-air-quality-sensor" } ], - "deviceTypeRefs": [ - 46 - ], "deviceVersions": [ 1 ], @@ -5813,7 +5803,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6401,7 +6391,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6417,7 +6407,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6433,7 +6423,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6449,7 +6439,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6465,7 +6455,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6481,7 +6471,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6497,7 +6487,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6513,7 +6503,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6529,7 +6519,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6545,7 +6535,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6561,7 +6551,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6725,7 +6715,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6741,7 +6731,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6757,7 +6747,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6773,7 +6763,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6789,7 +6779,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6805,7 +6795,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6821,7 +6811,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6837,7 +6827,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6853,7 +6843,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6869,7 +6859,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6885,7 +6875,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7049,7 +7039,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7065,7 +7055,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7081,7 +7071,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7097,7 +7087,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7113,7 +7103,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7129,7 +7119,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7145,7 +7135,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7161,7 +7151,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7177,7 +7167,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7193,7 +7183,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7209,7 +7199,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7373,7 +7363,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7389,7 +7379,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7405,7 +7395,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7421,7 +7411,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7437,7 +7427,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7453,7 +7443,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7469,7 +7459,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7485,7 +7475,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7501,7 +7491,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7517,7 +7507,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7533,7 +7523,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7697,7 +7687,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7713,7 +7703,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7729,7 +7719,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7745,7 +7735,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7761,7 +7751,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7777,7 +7767,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7793,7 +7783,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7809,7 +7799,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7825,7 +7815,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7841,7 +7831,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7857,7 +7847,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8021,7 +8011,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8037,7 +8027,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8053,7 +8043,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8069,7 +8059,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8085,7 +8075,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8101,7 +8091,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8117,7 +8107,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8133,7 +8123,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8149,7 +8139,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8165,7 +8155,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8181,7 +8171,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8345,7 +8335,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8361,7 +8351,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8377,7 +8367,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8393,7 +8383,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8409,7 +8399,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8425,7 +8415,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8441,7 +8431,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8457,7 +8447,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8473,7 +8463,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8489,7 +8479,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8505,7 +8495,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8669,7 +8659,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8685,7 +8675,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8701,7 +8691,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8717,7 +8707,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8733,7 +8723,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8749,7 +8739,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8765,7 +8755,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8781,7 +8771,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8797,7 +8787,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8813,7 +8803,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8829,7 +8819,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8993,7 +8983,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9009,7 +8999,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9025,7 +9015,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9041,7 +9031,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9057,7 +9047,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9073,7 +9063,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9089,7 +9079,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9105,7 +9095,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9121,7 +9111,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9137,7 +9127,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9153,7 +9143,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9317,7 +9307,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9333,7 +9323,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9349,7 +9339,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9365,7 +9355,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9381,7 +9371,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9397,7 +9387,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9413,7 +9403,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9429,7 +9419,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9445,7 +9435,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9461,7 +9451,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9477,7 +9467,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9602,6 +9592,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 071729a8462b69..570a4984aa0c45 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -10505,7 +10498,6 @@ "id": 4, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -10513,24 +10505,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -30606,7 +30592,6 @@ "id": 3, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -30614,24 +30599,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -34890,7 +34869,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -34898,16 +34876,12 @@ }, "deviceTypes": [ { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", "name": "MA-secondary-network-commissioning" } ], - "deviceTypeRefs": [ - 53 - ], "deviceVersions": [ 1 ], @@ -35418,6 +35392,5 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] + ] } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 604607cd491c93..f2658e0fb018c8 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -9554,10 +9547,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -9565,24 +9557,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -22799,10 +22785,9 @@ ] }, { - "id": 4, + "id": 3, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -22810,24 +22795,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -27083,10 +27062,9 @@ ] }, { - "id": 3, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -27094,16 +27072,12 @@ }, "deviceTypes": [ { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", "name": "MA-secondary-network-commissioning" } ], - "deviceTypeRefs": [ - 53 - ], "deviceVersions": [ 1 ], @@ -27614,6 +27588,5 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 23e72383183ab3..496d4002d95555 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-bridge", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5047,7 +5042,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 6, "code": 14, "profileId": 259, "label": "MA-aggregator", @@ -5055,16 +5049,12 @@ }, "deviceTypes": [ { - "id": 6, "code": 14, "profileId": 259, "label": "MA-aggregator", "name": "MA-aggregator" } ], - "deviceTypeRefs": [ - 6 - ], "deviceVersions": [ 1 ], @@ -5806,7 +5796,6 @@ "id": 3, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5814,16 +5803,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -7697,6 +7682,5 @@ "endpointId": 2, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 3d3e8fca35cf16..0b878ebd10de52 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5443,10 +5438,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5454,16 +5448,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -7562,6 +7552,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 95485d649df1d5..27843c4d757b5a 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 6, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 45, "code": 45, "profileId": 259, "label": "MA-air-purifier", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 45, "code": 45, "profileId": 259, "label": "MA-air-purifier", "name": "MA-air-purifier" } ], - "deviceTypeRefs": [ - 45 - ], "deviceVersions": [ 1 ], @@ -10936,10 +10926,9 @@ ] }, { - "id": 2, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", @@ -10947,16 +10936,12 @@ }, "deviceTypes": [ { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", "name": "MA-air-quality-sensor" } ], - "deviceTypeRefs": [ - 46 - ], "deviceVersions": [ 1 ], @@ -11442,7 +11427,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12030,7 +12015,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12046,7 +12031,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12062,7 +12047,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12078,7 +12063,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12094,7 +12079,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12110,7 +12095,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12126,7 +12111,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12142,7 +12127,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12158,7 +12143,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12174,7 +12159,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12190,7 +12175,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12354,7 +12339,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12370,7 +12355,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12386,7 +12371,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12402,7 +12387,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12418,7 +12403,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12434,7 +12419,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12450,7 +12435,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12466,7 +12451,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12482,7 +12467,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12498,7 +12483,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12514,7 +12499,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12678,7 +12663,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12694,7 +12679,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12710,7 +12695,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12726,7 +12711,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12742,7 +12727,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12758,7 +12743,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12774,7 +12759,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12790,7 +12775,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12806,7 +12791,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12822,7 +12807,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12838,7 +12823,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13002,7 +12987,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13018,7 +13003,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13034,7 +13019,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13050,7 +13035,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13066,7 +13051,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13082,7 +13067,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13098,7 +13083,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13114,7 +13099,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13130,7 +13115,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13146,7 +13131,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13162,7 +13147,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13326,7 +13311,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13342,7 +13327,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13358,7 +13343,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13374,7 +13359,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13390,7 +13375,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13406,7 +13391,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13422,7 +13407,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13438,7 +13423,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13454,7 +13439,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13470,7 +13455,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13486,7 +13471,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13650,7 +13635,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13666,7 +13651,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13682,7 +13667,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13698,7 +13683,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13714,7 +13699,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13730,7 +13715,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13746,7 +13731,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13762,7 +13747,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13778,7 +13763,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13794,7 +13779,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13810,7 +13795,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13974,7 +13959,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13990,7 +13975,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14006,7 +13991,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14022,7 +14007,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14038,7 +14023,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14054,7 +14039,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14070,7 +14055,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14086,7 +14071,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14102,7 +14087,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14118,7 +14103,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14134,7 +14119,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14298,7 +14283,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14314,7 +14299,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14330,7 +14315,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14346,7 +14331,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14362,7 +14347,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14378,7 +14363,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14394,7 +14379,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14410,7 +14395,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14426,7 +14411,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14442,7 +14427,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14458,7 +14443,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14622,7 +14607,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14638,7 +14623,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14654,7 +14639,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14670,7 +14655,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14686,7 +14671,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14702,7 +14687,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14718,7 +14703,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14734,7 +14719,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14750,7 +14735,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14766,7 +14751,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14782,7 +14767,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14946,7 +14931,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14962,7 +14947,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14978,7 +14963,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14994,7 +14979,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15010,7 +14995,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -15026,7 +15011,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15042,7 +15027,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -15058,7 +15043,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15074,7 +15059,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15090,7 +15075,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15106,7 +15091,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15216,10 +15201,9 @@ ] }, { - "id": 5, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", @@ -15227,16 +15211,12 @@ }, "deviceTypes": [ { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", "name": "MA-tempsensor" } ], - "deviceTypeRefs": [ - 24 - ], "deviceVersions": [ 1 ], @@ -15888,10 +15868,9 @@ ] }, { - "id": 3, + "id": 5, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", @@ -15899,16 +15878,12 @@ }, "deviceTypes": [ { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", "name": "MA-humiditysensor" } ], - "deviceTypeRefs": [ - 27 - ], "deviceVersions": [ 1 ], @@ -16560,10 +16535,9 @@ ] }, { - "id": 4, + "id": 6, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 34, "code": 769, "profileId": 259, "label": "MA-thermostat", @@ -16571,16 +16545,12 @@ }, "deviceTypes": [ { - "id": 34, "code": 769, "profileId": 259, "label": "MA-thermostat", "name": "MA-thermostat" } ], - "deviceTypeRefs": [ - 34 - ], "deviceVersions": [ 1 ], @@ -18121,6 +18091,5 @@ "endpointId": 5, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index e6e64d2c301452..6045c6ad877191 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 37, "code": 40, "profileId": 259, "label": "MA-basic-videoplayer", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 37, "code": 40, "profileId": 259, "label": "MA-basic-videoplayer", "name": "MA-basic-videoplayer" } ], - "deviceTypeRefs": [ - 37 - ], "deviceVersions": [ 1 ], @@ -7549,6 +7539,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 019dc0f1a093be..4f2688c3b159be 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 10, "code": 268, "profileId": 259, "label": "MA-colortemperaturelight", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 10, "code": 268, "profileId": 259, "label": "MA-colortemperaturelight", "name": "MA-colortemperaturelight" } ], - "deviceTypeRefs": [ - 10 - ], "deviceVersions": [ 1 ], @@ -8361,6 +8351,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 3dcf59c84cbd54..6e47cdf3658dd9 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 21, "code": 21, "profileId": 259, "label": "MA-contactsensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 21, "code": 21, "profileId": 259, "label": "MA-contactsensor", "name": "MA-contactsensor" } ], - "deviceTypeRefs": [ - 21 - ], "deviceVersions": [ 1 ], @@ -6367,6 +6357,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index fb42122deb047e..df5f636f2ef587 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5471,7 +5466,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5479,16 +5473,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -7587,6 +7577,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap index 765e9fdd9a3550..6f88ca3d61b5f0 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 13, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6252,10 +6247,9 @@ ] }, { - "id": 14, + "id": 2, "name": "MA-dishwasher", "deviceTypeRef": { - "id": 47, "code": 117, "profileId": 259, "label": "MA-dishwasher", @@ -6263,16 +6257,12 @@ }, "deviceTypes": [ { - "id": 47, "code": 117, "profileId": 259, "label": "MA-dishwasher", "name": "MA-dishwasher" } ], - "deviceTypeRefs": [ - 47 - ], "deviceVersions": [ 1 ], @@ -10843,6 +10833,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] -} + ] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 87dfc871a3f41d..bd3428ab431c05 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", "name": "MA-doorlock" } ], - "deviceTypeRefs": [ - 29 - ], "deviceVersions": [ 1 ], @@ -9360,6 +9350,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 0242e62528f3ef..369c83511afb78 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", "name": "MA-extendedcolorlight" } ], - "deviceTypeRefs": [ - 11 - ], "deviceVersions": [ 1 ], @@ -8657,6 +8647,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 762dfc66f57466..aef5ca08518b80 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5471,7 +5466,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 35, "code": 43, "profileId": 259, "label": "MA-fan", @@ -5479,16 +5473,12 @@ }, "deviceTypes": [ { - "id": 35, "code": 43, "profileId": 259, "label": "MA-fan", "name": "MA-fan" } ], - "deviceTypeRefs": [ - 35 - ], "deviceVersions": [ 1 ], @@ -6435,6 +6425,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 1597985398042a..3afd3a506d9ab1 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 26, "code": 774, "profileId": 259, "label": "MA-flowsensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 26, "code": 774, "profileId": 259, "label": "MA-flowsensor", "name": "MA-flowsensor" } ], - "deviceTypeRefs": [ - 26 - ], "deviceVersions": [ 1 ], @@ -6415,6 +6405,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index e80e5499b9da48..6971f422bb4ab8 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 33, "code": 768, "profileId": 259, "label": "MA-heatcool", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 33, "code": 768, "profileId": 259, "label": "MA-heatcool", "name": "MA-heatcool" } ], - "deviceTypeRefs": [ - 33 - ], "deviceVersions": [ 1 ], @@ -8235,6 +8225,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 361b2e2521fabf..b878d6770ff778 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", "name": "MA-humiditysensor" } ], - "deviceTypeRefs": [ - 27 - ], "deviceVersions": [ 1 ], @@ -6415,6 +6405,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index 8bae0a9da88e68..4f2b6a4014c1a2 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 8, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6252,10 +6247,9 @@ ] }, { - "id": 7, + "id": 2, "name": "MA-laundry-washer", "deviceTypeRef": { - "id": 49, "code": 115, "profileId": 259, "label": "MA-laundry-washer", @@ -6263,16 +6257,12 @@ }, "deviceTypes": [ { - "id": 49, "code": 115, "profileId": 259, "label": "MA-laundry-washer", "name": "MA-laundry-washer" } ], - "deviceTypeRefs": [ - 49 - ], "deviceVersions": [ 1 ], @@ -11091,6 +11081,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 891c8c063506c4..ec99ca3fb42fb7 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 22, "code": 262, "profileId": 259, "label": "MA-lightsensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 22, "code": 262, "profileId": 259, "label": "MA-lightsensor", "name": "MA-lightsensor" } ], - "deviceTypeRefs": [ - 22 - ], "deviceVersions": [ 1 ], @@ -6431,6 +6421,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index b335ca316d508a..e542652c31f056 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 23, "code": 263, "profileId": 259, "label": "MA-occupancysensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 23, "code": 263, "profileId": 259, "label": "MA-occupancysensor", "name": "MA-occupancysensor" } ], - "deviceTypeRefs": [ - 23 - ], "deviceVersions": [ 1 ], @@ -6543,6 +6533,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index d10bd7429a360f..8f2c4aa64fd79a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" } ], - "deviceTypeRefs": [ - 8 - ], "deviceVersions": [ 1 ], @@ -7539,6 +7529,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 0f87ab83f0f976..993b6fba9bc591 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", "name": "MA-onofflightswitch" } ], - "deviceTypeRefs": [ - 15 - ], "deviceVersions": [ 1 ], @@ -7539,6 +7529,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index d19660dd111a65..669e146e5966d9 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 12, "code": 266, "profileId": 259, "label": "MA-onoffpluginunit", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 12, "code": 266, "profileId": 259, "label": "MA-onoffpluginunit", "name": "MA-onoffpluginunit" } ], - "deviceTypeRefs": [ - 12 - ], "deviceVersions": [ 1 ], @@ -7215,6 +7205,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 838e3561b1c506..3d1e2b9935f3b5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 25, "code": 773, "profileId": 259, "label": "MA-pressuresensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 25, "code": 773, "profileId": 259, "label": "MA-pressuresensor", "name": "MA-pressuresensor" } ], - "deviceTypeRefs": [ - 25 - ], "deviceVersions": [ 1 ], @@ -6495,6 +6485,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index f03f07603a394a..025f35026f65f8 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6241,10 +6236,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", @@ -6252,16 +6246,12 @@ }, "deviceTypes": [ { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", "name": "MA-pump" } ], - "deviceTypeRefs": [ - 14 - ], "deviceVersions": [ 1 ], @@ -7586,6 +7576,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index 75587fe72f54a8..b7af38a37391f0 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 8, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6252,10 +6247,9 @@ ] }, { - "id": 7, + "id": 2, "name": "MA-refrigerator", "deviceTypeRef": { - "id": 48, "code": 112, "profileId": 259, "label": "MA-refrigerator", @@ -6263,16 +6257,12 @@ }, "deviceTypes": [ { - "id": 48, "code": 112, "profileId": 259, "label": "MA-refrigerator", "name": "MA-refrigerator" } ], - "deviceTypeRefs": [ - 48 - ], "deviceVersions": [ 1 ], @@ -11686,10 +11676,9 @@ ] }, { - "id": 5, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 51, "code": 113, "profileId": 259, "label": "MA-temperature-controlled-cabinet", @@ -11697,16 +11686,12 @@ }, "deviceTypes": [ { - "id": 51, "code": 113, "profileId": 259, "label": "MA-temperature-controlled-cabinet", "name": "MA-temperature-controlled-cabinet" } ], - "deviceTypeRefs": [ - 51 - ], "deviceVersions": [ 1 ], @@ -12202,10 +12187,9 @@ ] }, { - "id": 6, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 51, "code": 113, "profileId": 259, "label": "MA-temperature-controlled-cabinet", @@ -12213,16 +12197,12 @@ }, "deviceTypes": [ { - "id": 51, "code": 113, "profileId": 259, "label": "MA-temperature-controlled-cabinet", "name": "MA-temperature-controlled-cabinet" } ], - "deviceTypeRefs": [ - 51 - ], "deviceVersions": [ 1 ], @@ -12747,6 +12727,5 @@ "endpointId": 3, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index ee7762e4f302ef..9c8af2af0a8813 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 50, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 50, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", "name": "MA-robotic-vacuum-cleaner" } ], - "deviceTypeRefs": [ - 50 - ], "deviceVersions": [ 1 ], @@ -10891,6 +10881,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index a912923932502d..2d8721152ec487 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 43, "code": 114, "profileId": 259, "label": "MA-room-airconditioner", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 43, "code": 114, "profileId": 259, "label": "MA-room-airconditioner", "name": "MA-room-airconditioner" } ], - "deviceTypeRefs": [ - 43 - ], "deviceVersions": [ 1 ], @@ -11617,6 +11607,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap index bb5372c901a309..9903f33942ae14 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 10, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 9, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -5431,24 +5425,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 44, "code": 118, "profileId": 259, "label": "MA-smokecoalarm", "name": "MA-smokecoalarm" } ], - "deviceTypeRefs": [ - 3, - 44 - ], "deviceVersions": [ 1, 1 @@ -5540,7 +5528,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5556,7 +5544,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7060,7 +7048,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7076,7 +7064,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7092,7 +7080,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11263,6 +11251,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 227be12d36f0eb..7a3660d0ef8f51 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 40, "code": 34, "profileId": 259, "label": "MA-speaker", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 40, "code": 34, "profileId": 259, "label": "MA-speaker", "name": "MA-speaker" } ], - "deviceTypeRefs": [ - 40 - ], "deviceVersions": [ 1 ], @@ -6647,6 +6637,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 5e2dec02d304b1..7fb22c808eecf7 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", "name": "MA-tempsensor" } ], - "deviceTypeRefs": [ - 24 - ], "deviceVersions": [ 1 ], @@ -6415,6 +6405,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 22f3247af489bf..470a4644e18ade 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,14 +23,19 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ { - "id": 7, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 55 - ], "deviceVersions": [ 1 ], @@ -5468,10 +5463,9 @@ ] }, { - "id": 8, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 87, "code": 769, "profileId": 259, "label": "MA-thermostat", @@ -5479,16 +5473,12 @@ }, "deviceTypes": [ { - "id": 87, "code": 769, "profileId": 259, "label": "MA-thermostat", "name": "MA-thermostat" } ], - "deviceTypeRefs": [ - 87 - ], "deviceVersions": [ 1 ], @@ -7895,6 +7885,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index b20b648b19452a..c829626a281d76 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", "name": "MA-windowcovering" } ], - "deviceTypeRefs": [ - 31 - ], "deviceVersions": [ 1 ], @@ -7097,6 +7087,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index daa049bec63d18..d81d430809fa5d 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", "name": "MA-all-clusters-app" } ], - "deviceTypeRefs": [ - 52 - ], "deviceVersions": [ 1 ], @@ -10123,6 +10113,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index e4ef5141fd1938..750d403a8d5764 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5414,7 +5409,6 @@ "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 21, "code": 21, "profileId": 259, "label": "MA-contactsensor", @@ -5422,16 +5416,12 @@ }, "deviceTypes": [ { - "id": 21, "code": 21, "profileId": 259, "label": "MA-contactsensor", "name": "MA-contactsensor" } ], - "deviceTypeRefs": [ - 21 - ], "deviceVersions": [ 1 ], @@ -8833,6 +8823,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index de954c4bb4bb69..c07689aff2ef84 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6252,10 +6247,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-dishwasher", "deviceTypeRef": { - "id": 47, "code": 117, "profileId": 259, "label": "MA-dishwasher", @@ -6263,16 +6257,12 @@ }, "deviceTypes": [ { - "id": 47, "code": 117, "profileId": 259, "label": "MA-dishwasher", "name": "MA-dishwasher" } ], - "deviceTypeRefs": [ - 47 - ], "deviceVersions": [ 1 ], @@ -10843,6 +10833,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 5e83229e81a428..4662666352c860 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6092,10 +6087,9 @@ ] }, { - "id": 3, + "id": 2, "name": "MA-onofflightswitch", "deviceTypeRef": { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", @@ -6103,16 +6097,12 @@ }, "deviceTypes": [ { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", "name": "MA-onofflightswitch" } ], - "deviceTypeRefs": [ - 15 - ], "deviceVersions": [ 1 ], @@ -8766,10 +8756,9 @@ ] }, { - "id": 2, + "id": 3, "name": "MA-genericswitch", "deviceTypeRef": { - "id": 20, "code": 15, "profileId": 259, "label": "MA-genericswitch", @@ -8777,16 +8766,12 @@ }, "deviceTypes": [ { - "id": 20, "code": 15, "profileId": 259, "label": "MA-genericswitch", "name": "MA-genericswitch" } ], - "deviceTypeRefs": [ - 20 - ], "deviceVersions": [ 1 ], @@ -10105,6 +10090,5 @@ "endpointId": 2, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 779988b5bd3c0d..26f2b8f3f04044 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5467,7 +5462,6 @@ "id": 2, "name": "MA-extendedcolorlight", "deviceTypeRef": { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", @@ -5475,16 +5469,12 @@ }, "deviceTypes": [ { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", "name": "MA-extendedcolorlight" } ], - "deviceTypeRefs": [ - 11 - ], "deviceVersions": [ 1 ], @@ -8389,6 +8379,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index e5524a5ae20819..9e99cbc70f93b6 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5464,10 +5459,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-extendedcolorlight", "deviceTypeRef": { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", @@ -5475,16 +5469,12 @@ }, "deviceTypes": [ { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", "name": "MA-extendedcolorlight" } ], - "deviceTypeRefs": [ - 11 - ], "deviceVersions": [ 1 ], @@ -8389,6 +8379,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index cbac430e8a2932..bb3acbf79e8a5d 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -4753,10 +4748,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -4764,16 +4758,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -7806,6 +7796,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 520039f45c8ab0..6ff41025de535f 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5512,10 +5507,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -5523,16 +5517,12 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" } ], - "deviceTypeRefs": [ - 8 - ], "deviceVersions": [ 1 ], @@ -9161,6 +9151,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 57926603d7d604..da4aa1826cabf4 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6419,7 +6414,6 @@ "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", @@ -6427,16 +6421,12 @@ }, "deviceTypes": [ { - "id": 11, "code": 269, "profileId": 259, "label": "MA-extendedcolorlight", "name": "MA-extendedcolorlight" } ], - "deviceTypeRefs": [ - 11 - ], "deviceVersions": [ 1 ], @@ -10329,6 +10319,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 474821f1f1902a..9517d51134c345 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5793,7 +5788,6 @@ "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5801,24 +5795,18 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 9, - 3 - ], "deviceVersions": [ 1, 1 @@ -9558,6 +9546,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 1c71379552a8b6..08d5d554c3eaeb 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5539,7 +5534,6 @@ "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5547,24 +5541,18 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 9, - 3 - ], "deviceVersions": [ 1, 1 @@ -9643,6 +9631,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 5bf8b66ba66051..026f356fdba7a5 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -7308,7 +7301,6 @@ "id": 2, "name": "MA-doorlock", "deviceTypeRef": { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", @@ -7316,24 +7308,18 @@ }, "deviceTypes": [ { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", "name": "MA-doorlock" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 29, - 3 - ], "deviceVersions": [ 1, 1 @@ -10553,6 +10539,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 89b565629b61a8..af67d0da943663 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5512,10 +5507,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", @@ -5523,16 +5517,12 @@ }, "deviceTypes": [ { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", "name": "MA-doorlock" } ], - "deviceTypeRefs": [ - 29 - ], "deviceVersions": [ 1 ], @@ -6768,6 +6758,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index d0ce7a043e25d0..60987b13d94882 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -6374,7 +6369,6 @@ "id": 2, "name": "MA-doorlock", "deviceTypeRef": { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", @@ -6382,16 +6376,12 @@ }, "deviceTypes": [ { - "id": 29, "code": 10, "profileId": 259, "label": "MA-doorlock", "name": "MA-doorlock" } ], - "deviceTypeRefs": [ - 29 - ], "deviceVersions": [ 1 ], @@ -9447,6 +9437,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 78e05e37b1da6b..722baad868631b 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", "name": "MA-all-clusters-app" } ], - "deviceTypeRefs": [ - 52 - ], "deviceVersions": [ 1 ], @@ -3551,6 +3546,5 @@ "endpointId": 0, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 55f04a968f71ea..0de1ba9ca9452f 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5015,6 +5010,5 @@ "endpointId": 0, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 339541aa07151b..e3ce15fdd068e1 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5087,7 +5082,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", @@ -5095,16 +5089,12 @@ }, "deviceTypes": [ { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", "name": "MA-onofflightswitch" } ], - "deviceTypeRefs": [ - 15 - ], "deviceVersions": [ 1 ], @@ -6955,7 +6945,6 @@ "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -6963,16 +6952,12 @@ }, "deviceTypes": [ { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", "name": "MA-secondary-network-commissioning" } ], - "deviceTypeRefs": [ - 53 - ], "deviceVersions": [ 1 ], @@ -7540,6 +7525,5 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 8fc11afcb89c2f..a6d4b3a1c028c9 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -12102,7 +12095,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -12110,16 +12102,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -15950,6 +15938,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 931ee37410a193..abdf3ac2e318f4 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -12183,10 +12176,9 @@ ] }, { - "id": 1, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -12194,16 +12186,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -15776,6 +15764,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index af278263bea1d2..26a52650f37a3d 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-pump", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5699,7 +5694,6 @@ "id": 2, "name": "MA-pump", "deviceTypeRef": { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", @@ -5707,16 +5701,12 @@ }, "deviceTypes": [ { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", "name": "MA-pump" } ], - "deviceTypeRefs": [ - 14 - ], "deviceVersions": [ 1 ], @@ -8033,6 +8023,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 8b8fc821323b64..4f943ac9a1ee32 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-pump", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5699,7 +5694,6 @@ "id": 2, "name": "MA-pump", "deviceTypeRef": { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", @@ -5707,16 +5701,12 @@ }, "deviceTypes": [ { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", "name": "MA-pump" } ], - "deviceTypeRefs": [ - 14 - ], "deviceVersions": [ 1 ], @@ -8033,6 +8023,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index ad985a894a1f4d..4f943ac9a1ee32 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-pump", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5696,10 +5691,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-pump", "deviceTypeRef": { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", @@ -5707,16 +5701,12 @@ }, "deviceTypes": [ { - "id": 14, "code": 771, "profileId": 2457, "label": "MA-pump", "name": "MA-pump" } ], - "deviceTypeRefs": [ - 14 - ], "deviceVersions": [ 1 ], @@ -8033,6 +8023,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 4ddbc45f851702..4af5b26b68f89d 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5647,7 +5642,6 @@ "id": 2, "name": "MA-pumpcontroller", "deviceTypeRef": { - "id": 19, "code": 772, "profileId": 2457, "label": "MA-pumpcontroller", @@ -5655,16 +5649,12 @@ }, "deviceTypes": [ { - "id": 19, "code": 772, "profileId": 2457, "label": "MA-pumpcontroller", "name": "MA-pumpcontroller" } ], - "deviceTypeRefs": [ - 19 - ], "deviceVersions": [ 1 ], @@ -6861,6 +6851,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index 4f612e4090eeef..012f9b9557d681 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5467,7 +5462,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 35, "code": 43, "profileId": 259, "label": "MA-fan", @@ -5475,16 +5469,12 @@ }, "deviceTypes": [ { - "id": 35, "code": 43, "profileId": 259, "label": "MA-fan", "name": "MA-fan" } ], - "deviceTypeRefs": [ - 35 - ], "deviceVersions": [ 1 ], @@ -7003,6 +6993,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index f3c9f6c5f59854..aff63eb8d64de3 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5574,7 +5569,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -5582,24 +5576,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 44, "code": 118, "profileId": 259, "label": "MA-smokecoalarm", "name": "MA-smokecoalarm" } ], - "deviceTypeRefs": [ - 3, - 44 - ], "deviceVersions": [ 1, 1 @@ -7418,6 +7406,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index 1f50f0757d2ef6..28e8cd3fcf020a 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -3343,7 +3338,6 @@ "id": 2, "name": "MA-tempsensor", "deviceTypeRef": { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", @@ -3351,16 +3345,12 @@ }, "deviceTypes": [ { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", "name": "MA-tempsensor" } ], - "deviceTypeRefs": [ - 24 - ], "deviceVersions": [ 1 ], @@ -4255,6 +4245,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 0a6a637d51fb2a..c72838cef8db59 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,14 +23,19 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ { - "id": 5, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 55 - ], "deviceVersions": [ 1 ], @@ -7655,10 +7650,9 @@ ] }, { - "id": 6, + "id": 2, "name": "MA-thermostat", "deviceTypeRef": { - "id": 87, "code": 769, "profileId": 259, "label": "MA-thermostat", @@ -7666,16 +7660,12 @@ }, "deviceTypes": [ { - "id": 87, "code": 769, "profileId": 259, "label": "MA-thermostat", "name": "MA-thermostat" } ], - "deviceTypeRefs": [ - 87 - ], "deviceVersions": [ 1 ], @@ -14830,6 +14820,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index d2488a3c098a12..4bda8a62fbf725 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 3, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -7437,10 +7432,9 @@ ] }, { - "id": 4, + "id": 2, "name": "MA-videoplayer", "deviceTypeRef": { - "id": 36, "code": 35, "profileId": 259, "label": "MA-casting-videoplayer", @@ -7448,16 +7442,12 @@ }, "deviceTypes": [ { - "id": 36, "code": 35, "profileId": 259, "label": "MA-casting-videoplayer", "name": "MA-casting-videoplayer" } ], - "deviceTypeRefs": [ - 36 - ], "deviceVersions": [ 1 ], @@ -9793,10 +9783,9 @@ ] }, { - "id": 1, + "id": 3, "name": "MA-speaker", "deviceTypeRef": { - "id": 40, "code": 34, "profileId": 259, "label": "MA-speaker", @@ -9804,16 +9793,12 @@ }, "deviceTypes": [ { - "id": 40, "code": 34, "profileId": 259, "label": "MA-speaker", "name": "MA-speaker" } ], - "deviceTypeRefs": [ - 40 - ], "deviceVersions": [ 1 ], @@ -10593,10 +10578,9 @@ ] }, { - "id": 2, + "id": 4, "name": "MA-contentapplication", "deviceTypeRef": { - "id": 41, "code": 36, "profileId": 259, "label": "MA-contentapp", @@ -10604,16 +10588,12 @@ }, "deviceTypes": [ { - "id": 41, "code": 36, "profileId": 259, "label": "MA-contentapp", "name": "MA-contentapp" } ], - "deviceTypeRefs": [ - 41 - ], "deviceVersions": [ 1 ], @@ -12556,6 +12536,5 @@ "endpointId": 3, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 6255dcf327c397..42bd7e60647a13 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -7089,7 +7084,6 @@ "id": 2, "name": "MA-videoplayer", "deviceTypeRef": { - "id": 38, "code": 41, "profileId": 259, "label": "MA-casting-videoclient", @@ -7097,16 +7091,12 @@ }, "deviceTypes": [ { - "id": 38, "code": 41, "profileId": 259, "label": "MA-casting-videoclient", "name": "MA-casting-videoclient" } ], - "deviceTypeRefs": [ - 38 - ], "deviceVersions": [ 1 ], @@ -15477,6 +15467,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 7bd3d94c04c4bc..5b04932c6989b1 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 7, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 55 - ], "deviceVersions": [ 1 ], @@ -7029,10 +7024,9 @@ ] }, { - "id": 8, + "id": 2, "name": "MA-videoplayer", "deviceTypeRef": { - "id": 61, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -7040,16 +7034,12 @@ }, "deviceTypes": [ { - "id": 61, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" } ], - "deviceTypeRefs": [ - 61 - ], "deviceVersions": [ 1 ], @@ -15802,6 +15792,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 628aaed4485b21..04a9d85b79feef 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-windowcovering", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -6989,10 +6982,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-windowcovering", "deviceTypeRef": { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", @@ -7000,16 +6992,12 @@ }, "deviceTypes": [ { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", "name": "MA-windowcovering" } ], - "deviceTypeRefs": [ - 31 - ], "deviceVersions": [ 2 ], @@ -8554,7 +8542,6 @@ "id": 3, "name": "MA-windowcovering", "deviceTypeRef": { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", @@ -8562,16 +8549,12 @@ }, "deviceTypes": [ { - "id": 31, "code": 514, "profileId": 259, "label": "MA-windowcovering", "name": "MA-windowcovering" } ], - "deviceTypeRefs": [ - 31 - ], "deviceVersions": [ 2 ], @@ -10135,6 +10118,5 @@ "endpointId": 2, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 4f837c2f012b7f..c27f4df51ab556 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.08.04-nightly.1"] + "tags": ["version:2@v2023.08.30-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.08.04-nightly.1"] + "tags": ["version:2@v2023.08.30-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index e30f5e8a88c715..1cedd0fcbd5c11 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.08.04-nightly +v2023.08.30-nightly diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index e88f5012b4af64..9e73cd21902857 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,24 +43,18 @@ }, "deviceTypes": [ { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 3, - 2 - ], "deviceVersions": [ 1, 1 @@ -9777,10 +9770,9 @@ ] }, { - "id": 3, + "id": 2, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -9788,24 +9780,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -22502,10 +22488,9 @@ ] }, { - "id": 1, + "id": 3, "name": "MA-onofflight", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -22513,24 +22498,18 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 8, - 3 - ], "deviceVersions": [ 1, 1 @@ -26789,7 +26768,6 @@ "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -26797,16 +26775,12 @@ }, "deviceTypes": [ { - "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", "name": "MA-secondary-network-commissioning" } ], - "deviceTypeRefs": [ - 53 - ], "deviceVersions": [ 1 ], @@ -27317,6 +27291,5 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] -} + ] +} \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index d3cbd586228952..d89edd6f164c73 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 2, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5432,10 +5427,9 @@ ] }, { - "id": 1, + "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5443,16 +5437,12 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ 1 ], @@ -8357,6 +8347,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 2bae1f00004f30..4e69557eb99486 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.8.4' +MIN_ZAP_VERSION = '2023.8.30' class ZapTool: diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 77c4ee67eca5a6..5a1c9afa03a6d6 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -12610,7 +12605,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -20910,7 +20905,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20926,7 +20921,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20942,7 +20937,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20958,7 +20953,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20974,7 +20969,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -20990,7 +20985,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21006,7 +21001,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21022,7 +21017,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21038,7 +21033,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21054,7 +21049,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21070,7 +21065,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21234,7 +21229,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21250,7 +21245,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21266,7 +21261,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21282,7 +21277,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21298,7 +21293,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21314,7 +21309,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21330,7 +21325,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21346,7 +21341,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21362,7 +21357,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21378,7 +21373,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21394,7 +21389,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21558,7 +21553,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21574,7 +21569,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21590,7 +21585,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21606,7 +21601,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21622,7 +21617,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21638,7 +21633,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21654,7 +21649,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21670,7 +21665,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21686,7 +21681,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21702,7 +21697,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21718,7 +21713,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21882,7 +21877,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21898,7 +21893,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21914,7 +21909,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21930,7 +21925,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21946,7 +21941,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21962,7 +21957,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21978,7 +21973,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21994,7 +21989,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22010,7 +22005,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22026,7 +22021,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22042,7 +22037,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22206,7 +22201,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22222,7 +22217,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22238,7 +22233,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22254,7 +22249,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22270,7 +22265,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22286,7 +22281,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22302,7 +22297,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22318,7 +22313,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22334,7 +22329,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22350,7 +22345,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22366,7 +22361,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22530,7 +22525,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22546,7 +22541,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22562,7 +22557,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22578,7 +22573,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22594,7 +22589,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22610,7 +22605,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22626,7 +22621,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22642,7 +22637,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22658,7 +22653,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22674,7 +22669,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22690,7 +22685,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22854,7 +22849,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22870,7 +22865,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22886,7 +22881,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22902,7 +22897,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22918,7 +22913,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22934,7 +22929,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22950,7 +22945,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22966,7 +22961,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22982,7 +22977,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22998,7 +22993,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23014,7 +23009,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23178,7 +23173,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23194,7 +23189,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23210,7 +23205,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23226,7 +23221,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23242,7 +23237,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23258,7 +23253,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23274,7 +23269,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23290,7 +23285,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23306,7 +23301,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23322,7 +23317,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23338,7 +23333,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23502,7 +23497,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23518,7 +23513,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23534,7 +23529,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23550,7 +23545,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23566,7 +23561,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23582,7 +23577,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23598,7 +23593,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23614,7 +23609,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23630,7 +23625,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23646,7 +23641,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23662,7 +23657,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23826,7 +23821,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23842,7 +23837,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23858,7 +23853,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23874,7 +23869,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23890,7 +23885,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23906,7 +23901,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23922,7 +23917,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23938,7 +23933,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23954,7 +23949,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23970,7 +23965,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23986,7 +23981,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -28788,6 +28783,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file From f8668c74cf9370ca39b29a44254d59106b94a0a2 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 1 Sep 2023 07:31:43 -0700 Subject: [PATCH 12/29] Fix UnsatisfiedLinkError on QrCode read (#29001) --- .../onboardingpayload/OnboardingPayloadParser.kt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt b/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt index 0dff2ff5cdd411..e1d8357908e236 100644 --- a/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt +++ b/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt @@ -17,9 +17,6 @@ package chip.onboardingpayload -import java.util.logging.Level -import java.util.logging.Logger - /** Parser for scanned QR code or Manual Pairing Code. */ class OnboardingPayloadParser { /** @@ -115,17 +112,4 @@ class OnboardingPayloadParser { return payload } - - companion object { - private val LOGGER: Logger = - Logger.getLogger(OnboardingPayloadParser::class.java.getSimpleName()) - - init { - try { - System.loadLibrary("OnboardingPayload") - } catch (e: UnsatisfiedLinkError) { - LOGGER.log(Level.SEVERE, "Cannot load library.", e) - } - } - } } From 5deb59b6caec86fb40726f2574d4bc2d5423106f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 11:31:46 -0400 Subject: [PATCH 13/29] Fix incorrect loop condition in HasValidEventPathForEndpointAndCluster. (#28989) The test was backwards, so when CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE was defined for the "wildcard event" case we always ended up treating the list of events for the cluster as empty. Fixes https://github.com/project-chip/connectedhomeip/issues/28981 --- src/app/InteractionModelEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index a86dd4b98aed9e..b0a993fb614a1f 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -452,7 +452,7 @@ static bool HasValidEventPathForEndpointAndCluster(EndpointId aEndpoint, const E if (aEventPath.HasWildcardEventId()) { #if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE - for (decltype(aCluster->eventCount) idx = 0; idx > aCluster->eventCount; ++idx) + for (decltype(aCluster->eventCount) idx = 0; idx < aCluster->eventCount; ++idx) { ConcreteEventPath path(aEndpoint, aCluster->clusterId, aCluster->eventList[idx]); // If we get here, the path exists. We just have to do an ACL check for it. From 064cec09001f4ce84a7f6facaf25e277bd5ca987 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 1 Sep 2023 11:58:54 -0400 Subject: [PATCH 14/29] Script for test plan and VS for commissioner DUT (#28794) Script generates the test plan tables and verification step spreadsheet values for TC-DA-1.4 and TC-DA-1.8 from the commissioner_dut test vectors. --- .../gen_commissioner_dut_test_plan_table.py | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100755 credentials/development/gen_commissioner_dut_test_plan_table.py diff --git a/credentials/development/gen_commissioner_dut_test_plan_table.py b/credentials/development/gen_commissioner_dut_test_plan_table.py new file mode 100755 index 00000000000000..d8887a2f86f331 --- /dev/null +++ b/credentials/development/gen_commissioner_dut_test_plan_table.py @@ -0,0 +1,104 @@ +#!/usr/bin/env -S python3 -B +# +# 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. +# + +import argparse +import json +import os +from dataclasses import dataclass + + +@dataclass +class TestInfo: + desc: str + dir: str + pid: int + + +CHIP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) +RUNNER_SCRIPT_DIR = os.path.join(CHIP_ROOT, 'scripts/tests') + + +def write_test_plan_output(filename: str, cases: TestInfo, test_num: str): + with open(filename, "w") as output: + output.write(f'[[ref:da-{test_num}-certs]]\n') + output.write(f'Certificates for TC-DA-{test_num}\n') + output.write('|===\n') + output.write('|#| Cert Description| Example certs\n') + for i, f in enumerate(cases): + output.write(f'|{i+1}|{f.desc} | {f.dir} (pid={f.pid})\n') + output.write('|===\n') + + +def write_validation_steps(filename: str, cases: TestInfo): + with open(filename, "w") as output: + for f in cases: + cmd = f'./chip-all-clusters-app --trace_decode 1 --dac_provider $CHIP_ROOT/credentials/development/commissioner_dut/{f.dir}/test_case_vector.json --product-id {f.pid}' + output.write(f'{f.desc.replace(",","")}, {f.dir}, {f.pid}, {cmd}\n') + + +def main(): + + argparser = argparse.ArgumentParser() + + argparser.add_argument("--failure_table", default="failure_table") + argparser.add_argument("--success_table", default="success_table") + argparser.add_argument("--success_vs", default="success_vs.csv") + argparser.add_argument("--failure_vs", default="failure_vs.csv") + args = argparser.parse_args() + + cred_path = 'credentials/development/commissioner_dut' + cert_path = os.path.abspath(os.path.join(CHIP_ROOT, cred_path)) + + # The following test vectors are success conditions for an SDK commissioner for the following reasons: + # struct_cd_device_type_id_mismatch - requires DCL access, which the SDK does not have and is not required + # struct_cd_security_info_wrong - while devices are required to set this to 0, commissioners are required to ignore it + # (see 6.3.1) + # hence this is marked as a failure for devices, but should be a success case for + # commissioners + # struct_cd_security_level_wrong - as with security info, commissioners are required to ignore this value (see 6.3.1) + # struct_cd_version_number_wrong - this value is not meant to be interpreted by commissioners, so errors here should be + # ignored (6.3.1) + # struct_cd_cert_id_mismatch - requires DCL access, which the SDK does not have and is not required. + skip_cases = ['struct_cd_device_type_id_mismatch', 'struct_cd_security_info_wrong', + 'struct_cd_security_level_wrong', 'struct_cd_version_number_wrong', 'struct_cd_cert_id_mismatch'] + + success_cases = [] + failure_cases = [] + for p in os.listdir(cert_path): + if p in skip_cases: + continue + path = str(os.path.join(cert_path, p, 'test_case_vector.json')) + with open(path, 'r') as f: + j = json.loads(f.read()) + success_expected = j['is_success_case'].lower() == 'true' + pid = 177 if 'fallback_encoding' in p else 32768 + desc = TestInfo(desc=j['description'], dir=p, pid=pid) + if success_expected: + success_cases.append(desc) + else: + failure_cases.append(desc) + + write_test_plan_output(args.failure_table, failure_cases, '1.4') + write_test_plan_output(args.success_table, success_cases, '1.8') + + write_validation_steps(args.failure_vs, failure_cases) + write_validation_steps(args.success_vs, success_cases) + + +if __name__ == '__main__': + main() From 3e6fec662e4bb0305a8847c423ecf90b9a548231 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 12:09:41 -0400 Subject: [PATCH 15/29] Allow advertising multiple operational identities on the same fabric on Darwin. (#29000) We need to check the instance name before coalescing registrations, not just the type, because all operational advertisements for a given fabric have the same type. --- src/platform/Darwin/DnssdContexts.cpp | 4 ++-- src/platform/Darwin/DnssdImpl.cpp | 2 +- src/platform/Darwin/DnssdImpl.h | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 96ae760c3475a8..86df18e5432fee 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -268,14 +268,14 @@ CHIP_ERROR MdnsContexts::Has(GenericContext * context) return CHIP_ERROR_KEY_NOT_FOUND; } -CHIP_ERROR MdnsContexts::GetRegisterContextOfType(const char * type, RegisterContext ** context) +CHIP_ERROR MdnsContexts::GetRegisterContextOfTypeAndName(const char * type, const char * name, RegisterContext ** context) { bool found = false; std::vector::iterator iter; for (iter = mContexts.begin(); iter != mContexts.end(); iter++) { - if ((*iter)->type == ContextType::Register && (static_cast(*iter))->matches(type)) + if ((*iter)->type == ContextType::Register && (static_cast(*iter))->matches(type, name)) { *context = static_cast(*iter); found = true; diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index e08fbb178bb094..eb2ebb205e1b31 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -152,7 +152,7 @@ CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t inte StringOrNullMarker(name), StringOrNullMarker(hostname), port, StringOrNullMarker(type), interfaceId); RegisterContext * sdCtx = nullptr; - if (CHIP_NO_ERROR == MdnsContexts::GetInstance().GetRegisterContextOfType(type, &sdCtx)) + if (CHIP_NO_ERROR == MdnsContexts::GetInstance().GetRegisterContextOfTypeAndName(type, name, &sdCtx)) { auto err = DNSServiceUpdateRecord(sdCtx->serviceRef, nullptr, kRegisterFlags, record.size(), record.data(), 0 /* ttl */); VerifyOrReturnError(kDNSServiceErr_NoError == err, sdCtx->Finalize(err)); diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index 1dd6319222599e..0f724747da2fd2 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -82,12 +82,13 @@ class MdnsContexts * Example: * _matterc._udp,_V65521,_S15,_L3840,_CM * _matter._tcp,_I4CEEAD044CC35B63 + * @param[in] name The instance name for the service. * @param[out] context A reference to the context previously registered * * @return On success, the context parameter will point to the previously * registered context. */ - CHIP_ERROR GetRegisterContextOfType(const char * type, RegisterContext ** context); + CHIP_ERROR GetRegisterContextOfTypeAndName(const char * type, const char * name, RegisterContext ** context); /** * Return a pointer to an existing ResolveContext for the given @@ -146,7 +147,7 @@ struct RegisterContext : public GenericContext void DispatchFailure(const char * errorStr, CHIP_ERROR err) override; void DispatchSuccess() override; - bool matches(const char * sType) { return mType.compare(sType) == 0; } + bool matches(const char * type, const char * name) { return mType == type && mInstanceName == name; } }; struct BrowseHandler : public GenericContext From eb23e9b5a5e78ad8ad703966d856dd7be2a93f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:05:47 +0200 Subject: [PATCH 16/29] [TC-IDM-10.1] Verify invalid/not allowed attribute and command id ranges (#28926) * Initial test script to verify invalid ranges for 1.1 test cases * Reworked test script based on suggestion * Fix restyle * Fix restyle take 2 * Fix restyle take 3 * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Reworked scripts based on review feedback * Changed command list print to hex * Renamed script file to IDM-10.1 * Renamed test case name to match file name * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Update src/python_testing/TC_IDM_10_1.py * Fix restyle * Adjusted STANDARD_RANGE to STANDARD_PREFIX --------- Co-authored-by: Boris Zbarsky --- src/python_testing/TC_IDM_10_1.py | 122 ++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/python_testing/TC_IDM_10_1.py diff --git a/src/python_testing/TC_IDM_10_1.py b/src/python_testing/TC_IDM_10_1.py new file mode 100644 index 00000000000000..44ac9f3f64712c --- /dev/null +++ b/src/python_testing/TC_IDM_10_1.py @@ -0,0 +1,122 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +STANDARD_PREFIX = 0x0000 +MANUFACTURER_CODE_RANGE = range(0x0001, 0xFFF0 + 1) +TEST_VENDOR_RANGE = range(0xFFF1, 0xFFF4 + 1) +INVALID_VENDOR_RANGE = range(0xFFF5, 0xFFFF + 1) + +ATTRIBUTE_ID_RANGE = range(0x0000, 0x4FFF + 1) +GLOBAL_ATTRIBUTE_ID_RANGE = range(0xF000, 0xFFFE + 1) +COMMAND_ID_RANGE = range(0x00, 0xFF + 1) + +ATTRIBUTE_LIST_ID = 0xFFFB +ACCEPTED_COMMAND_LIST_ID = 0xFFF9 +GENERATED_COMMAND_LIST_ID = 0xFFF8 + + +def split_element_into_prefix_suffix(element): + return (element >> 16), (element & 0xFFFF) + + +def validate_attribute_id_range(attribute_id): + prefix, suffix = split_element_into_prefix_suffix(attribute_id) + + if prefix == STANDARD_PREFIX: + if suffix not in ATTRIBUTE_ID_RANGE and suffix not in GLOBAL_ATTRIBUTE_ID_RANGE: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in standard range") + + elif prefix in MANUFACTURER_CODE_RANGE: + if suffix not in ATTRIBUTE_ID_RANGE: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in MC range") + + elif prefix in TEST_VENDOR_RANGE: + if suffix in ATTRIBUTE_ID_RANGE: + logging.info(f"Warning: Attribute id (0x{attribute_id:08X}) found in test vendor range") + else: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in Test Vendor MC range") + + else: # prefix in INVALID_VENDOR_RANGE + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in invalid range") + + +def validate_command_id_range(command_id): + prefix, suffix = split_element_into_prefix_suffix(command_id) + + if prefix == STANDARD_PREFIX: + if suffix not in COMMAND_ID_RANGE: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in standard range") + + elif prefix in MANUFACTURER_CODE_RANGE: + if suffix not in COMMAND_ID_RANGE: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in MC range") + + elif prefix in TEST_VENDOR_RANGE: + if suffix in COMMAND_ID_RANGE: + logging.info(f"Warning: Command id (0x{command_id:08X}) found in test vendor range") + else: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in Test Vendor MC range") + + else: # prefix in INVALID_VENDOR_RANGE + asserts.fail(f"Invalid command id (0x{command_id:08X}) in invalid range") + + +class TC_IDM_10_1(MatterBaseTest): + @async_test_body + async def test_xx_1_1(self): + + dev_ctrl = self.default_controller + + self.print_step(1, "Perform a wildcard read of attributes on all endpoints") + wildcard_read = (await dev_ctrl.Read(self.dut_node_id, [()])) + endpoints_tlv = wildcard_read.tlvAttributes + + self.print_step(2, "Check invalid elements on all clusters, across all endpoints") + for endpoint_id, endpoint in endpoints_tlv.items(): + logging.info(f"Verifying Endpoint: {endpoint_id}") + + for cluster_id, cluster in endpoint.items(): + logging.info(f"Verifying ClusterID: 0x{cluster_id:04X}") + + attribute_list = cluster[ATTRIBUTE_LIST_ID] + accepted_command_list = cluster[ACCEPTED_COMMAND_LIST_ID] + generated_command_list = cluster[GENERATED_COMMAND_LIST_ID] + + # -- Attributes + logging.info(f"AttributeList: {[f'0x{attribute_id:04X}' for attribute_id in attribute_list]}") + + for attribute_id in attribute_list: + validate_attribute_id_range(attribute_id) + + # -- Commands + logging.info(f"AcceptedCommandList: {[f'0x{command_id:02X}' for command_id in accepted_command_list]}") + + for command_id in accepted_command_list: + validate_command_id_range(command_id) + + logging.info(f"GeneratedCommandList: {[f'0x{command_id:02X}' for command_id in generated_command_list]}") + for command_id in generated_command_list: + validate_command_id_range(command_id) + + +if __name__ == "__main__": + default_matter_test_main() From 4064446632e86f7ae04261687858ed2e923b6a5b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 13:30:41 -0400 Subject: [PATCH 17/29] Add dishwasher alarm Reset feature to XML. (#28994) Fixes https://github.com/project-chip/connectedhomeip/issues/28177 --- .../all-clusters-common/all-clusters-app.matter | 4 ++++ .../dishwasher-alarm-server/dishwasher-alarm-server.cpp | 2 +- .../zcl/data-model/chip/dishwasher-alarm-cluster.xml | 5 +++++ src/controller/data_model/controller-clusters.matter | 4 ++++ src/controller/python/chip/clusters/Objects.py | 3 +++ src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h | 4 ++++ .../app-common/app-common/zap-generated/cluster-enums.h | 6 ++++++ 7 files changed, 27 insertions(+), 1 deletion(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 8ed04348a47f3c..f4b5dfbb3e58c0 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2983,6 +2983,10 @@ server cluster DishwasherAlarm = 93 { kWaterLevelError = 0x20; } + bitmap Feature : BITMAP32 { + kReset = 0x1; + } + info event Notify = 0 { AlarmMap active = 0; AlarmMap inactive = 1; diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp index c0d167f2993ec6..a89bf17ae4ef9c 100644 --- a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp @@ -296,7 +296,7 @@ bool DishwasherAlarmServer::HasResetFeature(EndpointId endpoint) return false; } - if (featureMap & 1) + if (featureMap & to_underlying(Feature::kReset)) { return true; } diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml index b734980d1d78ba..13fed1ecfdd9db 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml @@ -60,4 +60,9 @@ limitations under the License. + + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cea8a51bb4d640..ebd2a1cf32c196 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3306,6 +3306,10 @@ client cluster DishwasherAlarm = 93 { kWaterLevelError = 0x20; } + bitmap Feature : BITMAP32 { + kReset = 0x1; + } + info event Notify = 0 { AlarmMap active = 0; AlarmMap inactive = 1; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 1ee10b3c5bdb19..96662454953e0e 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -18092,6 +18092,9 @@ class AlarmMap(IntFlag): kTempTooHigh = 0x10 kWaterLevelError = 0x20 + class Feature(IntFlag): + kReset = 0x1 + class Commands: @dataclass class Reset(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f8b8aebc1350fd..8f95cdc8da0b9c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -26616,6 +26616,10 @@ typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmMap) { MTRDishwasherAlarmAlarmMapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { + MTRDishwasherAlarmFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { MTROperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, MTROperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 590330cb5f5bb2..40cef5085e5861 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1814,6 +1814,12 @@ enum class AlarmMap : uint32_t kTempTooHigh = 0x10, kWaterLevelError = 0x20, }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kReset = 0x1, +}; } // namespace DishwasherAlarm namespace OperationalState { From f3245d411db1f3112ce9f49611e8dd95b555bacb Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Sat, 2 Sep 2023 00:18:36 +0530 Subject: [PATCH 18/29] Modified tests Aug 31 (#28985) * Modified tests: TC_ACL_2_10 TC_ACL_2_7 TC_ACT_2_1 TC_ALOGIN_12_1 TC_BIND_2_3 TC_BRBINFO_1_1 TC_BR_4 TC_CADMIN_1_13 TC_CADMIN_1_15 TC_CADMIN_1_17 TC_CADMIN_1_18 TC_DESC_2_1 TC_DGGEN_2_2 TC_DRLK_3_2 TC_G_2_2 TC_G_2_3 TC_G_3_2 TC_ICDM_2_2 TC_ICDM_2_3 TC_IDM_4_4 TC_IDM_6_2 TC_IDM_6_4 TC_IDM_7_1 TC_I_2_2 TC_MC_11_1 TC_OPCREDS_3_2 TC_OPCREDS_3_3 TC_OPSTATE_2_2 TC_OPSTATE_2_3 TC_RVCCLEANM_3_1 TC_RVCOPSTATE_2_2 TC_RVCRUNM_3_1 TC_SC_3_1 TC_SC_3_2 TC_SC_3_3 TC_SC_4_10 TC_SC_4_2 TC_SC_4_3 TC_SC_4_4 TC_SC_4_5 TC_SC_4_6 TC_SC_4_7 TC_SC_4_9 TC_SC_6_1 TC_SU_2_8 TC_SU_3_3 TC_SU_4_1 TC_S_2_5 TC_S_2_6 TC_TCTL_2_2 TC_TSTAT_3_2 TC_WASHERCTRL_1_1 TC_WASHERCTRL_2_1 TC_WASHERCTRL_2_2 * Restyled by whitespace * Fixes script issue 629 * Disabled TC-RVCRUNM-3.1 test in init.py Removed step 2a subscribe operationalstatus from test: TC-WNCV-3.1 TC-WNCV-3.2 * Restyled by whitespace * Modified tests: TC-WNCV-3.1 TC-WNCV-3.2 * Fix script issue: 953 Updated DRLK writable PICS in drl_2_x_common.py * Disabled RVCCLEANM-3.1 test in init.py * Added high level PICS for tests: TC-CADMIN-1.25 TC-CADMIN-1.26 TC-DA-1.8 * Fix script issue 632. * Restyled by whitespace * Fix issue 28997 * Removed WASHERCTRL-2.2 from Darwin JSON file. Modified manual script : TC-GRPKEY-5.4 TC-SC-6.1 TC-OPCREDS-3.6 TC-G-3.2 * Restyled by whitespace * Modified test: TC-SC-6.1 * Restyled by whitespace * Modified test: TC-SC-6.1 * Restyled by whitespace * Added WASHERCTRL-2.2 test in Darwin --------- Co-authored-by: Restyled.io --- scripts/tests/chiptest/__init__.py | 2 + src/app/tests/suites/certification/PICS.yaml | 84 +- .../certification/Test_TC_ACL_2_10.yaml | 5 +- .../suites/certification/Test_TC_ACL_2_7.yaml | 2 +- .../suites/certification/Test_TC_ACT_2_1.yaml | 2 +- .../certification/Test_TC_ALOGIN_12_1.yaml | 10 +- .../certification/Test_TC_BIND_2_3.yaml | 6 +- .../certification/Test_TC_BRBINFO_1_1.yaml | 25 +- .../suites/certification/Test_TC_BR_4.yaml | 4 +- .../certification/Test_TC_CADMIN_1_13.yaml | 4 +- .../certification/Test_TC_CADMIN_1_15.yaml | 4 +- .../certification/Test_TC_CADMIN_1_17.yaml | 4 +- .../certification/Test_TC_CADMIN_1_18.yaml | 4 +- .../certification/Test_TC_CADMIN_1_25.yaml | 3 + .../certification/Test_TC_CADMIN_1_26.yaml | 4 + .../suites/certification/Test_TC_DA_1_8.yaml | 3 + .../certification/Test_TC_DESC_2_1.yaml | 268 +- .../certification/Test_TC_DGGEN_2_2.yaml | 10 +- .../certification/Test_TC_DRLK_2_1.yaml | 203 +- .../certification/Test_TC_DRLK_2_4.yaml | 8 +- .../certification/Test_TC_DRLK_3_2.yaml | 2626 +++++------------ .../certification/Test_TC_GRPKEY_5_4.yaml | 4 +- .../suites/certification/Test_TC_G_2_2.yaml | 10 +- .../suites/certification/Test_TC_G_2_3.yaml | 6 +- .../suites/certification/Test_TC_G_3_2.yaml | 6 +- .../certification/Test_TC_ICDM_2_2.yaml | 8 + .../certification/Test_TC_ICDM_2_3.yaml | 12 +- .../suites/certification/Test_TC_IDM_4_2.yaml | 177 +- .../suites/certification/Test_TC_IDM_4_4.yaml | 13 + .../suites/certification/Test_TC_IDM_6_2.yaml | 10 +- .../suites/certification/Test_TC_IDM_6_4.yaml | 12 +- .../suites/certification/Test_TC_IDM_7_1.yaml | 72 +- .../suites/certification/Test_TC_I_2_2.yaml | 2 +- .../suites/certification/Test_TC_MC_11_1.yaml | 14 + .../certification/Test_TC_OPCREDS_3_2.yaml | 38 +- .../certification/Test_TC_OPCREDS_3_3.yaml | 7 +- .../certification/Test_TC_OPCREDS_3_6.yaml | 17 +- .../certification/Test_TC_OPSTATE_2_1.yaml | 374 --- .../certification/Test_TC_OPSTATE_2_2.yaml | 8 +- .../certification/Test_TC_OPSTATE_2_3.yaml | 174 -- .../certification/Test_TC_RVCCLEANM_1_2.yaml | 115 - .../certification/Test_TC_RVCCLEANM_2_1.yaml | 241 -- .../certification/Test_TC_RVCCLEANM_3_1.yaml | 18 + .../certification/Test_TC_RVCCLEANM_3_2.yaml | 203 -- .../certification/Test_TC_RVCOPSTATE_2_2.yaml | 280 +- .../certification/Test_TC_RVCRUNM_1_2.yaml | 113 - .../certification/Test_TC_RVCRUNM_2_1.yaml | 215 -- .../certification/Test_TC_RVCRUNM_3_1.yaml | 206 +- .../certification/Test_TC_RVCRUNM_3_2.yaml | 223 -- .../suites/certification/Test_TC_SC_3_1.yaml | 7 +- .../suites/certification/Test_TC_SC_3_2.yaml | 427 ++- .../suites/certification/Test_TC_SC_3_3.yaml | 53 +- .../suites/certification/Test_TC_SC_4_10.yaml | 20 +- .../suites/certification/Test_TC_SC_4_2.yaml | 7 +- .../suites/certification/Test_TC_SC_4_3.yaml | 19 +- .../suites/certification/Test_TC_SC_4_4.yaml | 7 +- .../suites/certification/Test_TC_SC_4_5.yaml | 14 +- .../suites/certification/Test_TC_SC_4_6.yaml | 11 +- .../suites/certification/Test_TC_SC_4_7.yaml | 8 +- .../suites/certification/Test_TC_SC_4_9.yaml | 11 + .../suites/certification/Test_TC_SC_6_1.yaml | 131 +- .../suites/certification/Test_TC_SU_2_8.yaml | 43 +- .../suites/certification/Test_TC_SU_3_3.yaml | 44 +- .../suites/certification/Test_TC_SU_4_1.yaml | 9 + .../suites/certification/Test_TC_S_2_5.yaml | 91 +- .../suites/certification/Test_TC_S_2_6.yaml | 79 +- .../certification/Test_TC_TCCM_1_1.yaml | 3 + .../certification/Test_TC_TCCM_3_1.yaml | 4 + .../certification/Test_TC_TCCM_3_2.yaml | 2 +- .../certification/Test_TC_TCCM_3_3.yaml | 4 +- .../certification/Test_TC_TCTL_2_2.yaml | 28 +- .../certification/Test_TC_TSTAT_3_2.yaml | 17 +- .../certification/Test_TC_WASHERCTRL_1_1.yaml | 156 +- .../certification/Test_TC_WASHERCTRL_2_1.yaml | 96 +- .../certification/Test_TC_WASHERCTRL_2_2.yaml | 94 +- .../certification/Test_TC_WNCV_3_1.yaml | 23 +- .../certification/Test_TC_WNCV_3_2.yaml | 23 +- .../tests/suites/certification/ci-pics-values | 55 +- src/app/tests/suites/ciTests.json | 7 +- src/app/tests/suites/manualTests.json | 22 +- src/python_testing/drlk_2_x_common.py | 14 +- .../zap-generated/test/Commands.h | 2514 ++++++++++------ 82 files changed, 4171 insertions(+), 5731 deletions(-) mode change 100755 => 100644 src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index fd06d7f93632a6..1350e8c0c5a82a 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -174,6 +174,8 @@ def _GetChipReplUnsupportedTests() -> Set[str]: "Test_TC_DGGEN_2_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster "Test_TC_LWM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster "Test_TC_G_2_4.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_RVCRUNM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_RVCCLEANM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 76db6c83d37f08..b3d8e330b10113 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -2664,67 +2664,60 @@ PICS: # # Server write attributes # + - label: "Does the device implement simulation of a Not Fully Locked State?" + id: DRLK.S.M.SimulateNotFullyLocked - - label: "Does the DUT(server) support the DoorOpen Events attribute?" - id: DRLK.S.A0004.Write - - - label: "Does the DUT(server) support the DoorClosedEvents attribute?" - id: DRLK.S.A0005.Write - - - label: "Does the DUT(server) support the OpenPeriod attribute?" - id: DRLK.S.A0006.Write - - - label: "Does the DUT(server) support the Language attribute?" - id: DRLK.S.A0021.Write - - - label: "Does the DUT(server) support the LEDSettings attribute?" - id: DRLK.S.A0022.Write - - - label: "Does the DUT(server) support the AutoRelockTime attribute?" - id: DRLK.S.A0023.Write - - - label: "Does the DUT(server) support the SoundVolume attribute?" - id: DRLK.S.A0024.Write + - label: "Does the device implement detection of a LockJammed State?" + id: DRLK.S.M.DetectLockJammed - - label: "Does the DUT(server) support the OperatingMode attribute?" - id: DRLK.S.A0025.Write + - label: "Does the device implement Language attribute with write access?" + id: DRLK.S.M.LanguageAttributeWritable - label: - "Does the DUT(server) support the EnableLocalProgramming attribute?" - id: DRLK.S.A0028.Write + "Does the device implement LEDSettings attribute with write access?" + id: DRLK.S.M.LEDSettingsAttributeWritable - - label: "Does the DUT(server) support the EnableOneTouchLocking attribute?" - id: DRLK.S.A0029.Write + - label: + "Does the device implement AutoRelockTime attribute with write access?" + id: DRLK.S.M.AutoRelockTimeAttributeWritable - - label: "Does the DUT(server) support the EnableInsideStatusLED attribute?" - id: DRLK.S.A002a.Write + - label: + "Does the device implement SoundVolume attribute with write access?" + id: DRLK.S.M.SoundVolumeAttributeWritable - label: - "Does the DUT(server) support the EnablePrivacyModeButton attribute?" - id: DRLK.S.A002b.Write + "Does the device implement OperatingMode attribute with write access?" + id: DRLK.S.M.OperatingModeAttributeWritable - label: - "Does the DUT(server) support the LocalProgrammingFeatures attribute?" - id: DRLK.S.A002c.Write + "Does the device implement EnableLocalProgramming attribute with write + access?" + id: DRLK.S.M.EnableLocalProgrammingAttributeWritable - - label: "Does the DUT(server) support the WrongCodeEntryLimit attribute?" - id: DRLK.S.A0030.Write + - label: + "Does the device implement LocalProgrammingFeatures attribute with + write access?" + id: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable - label: - "Does the DUT(server) support the UserCodedTemporaryDisableTime - attribute?" - id: DRLK.S.A0031.Write + "Does the device implement WrongCodeEntryLimit attribute with write + access?" + id: DRLK.S.M.WrongCodeEntryLimitAttributeWritable - - label: "Does the DUT(server) support the SendPINOverTheAir attribute?" - id: DRLK.S.A0032.Write + - label: + "Does the device implement UserCodedTemporaryDisableTime attribute + with write access?" + id: DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable - label: - "Does the DUT(server) support the RequirePINForRemoteOperation - attribute?" - id: DRLK.S.A0033.Write + "Does the device implement RequirePINForRemoteOperation attribute with + write access?" + id: DRLK.S.M.RequirePINForRemoteOperationAttributeWritable - - label: "Does the DUT(server) support the ExpiringUserTimeOut attribute?" - id: DRLK.S.A0035.Write + - label: + "Does the device implement ExpiringUserTimeOut attribute with write + access?" + id: DRLK.S.M.ExpiringUserTimeOutAttributeWritable # # server / commandsReceived @@ -9237,6 +9230,9 @@ PICS: "Can the Rinse attribute changed by physical control at the device?" id: WASHERCTRL.S.M.ManuallyControlledRinse + - label: "Can the device be controlled manually?" + id: WASHERCTRL.S.M.ManuallyControlled + # #RVC Run Mode # diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml index cd77adbe3b1bff..46cee17ddfd5a2 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml @@ -557,13 +557,14 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH2(Chiptool) , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 + Via the TH2(chip-tool), Verify the AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1657289746.737641][19293:19298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 [1657289746.737713][19293:19298] CHIP:TOO: Extension: 1 entries [1657289746.737778][19293:19298] CHIP:TOO: [1]: { [1657289746.737803][19293:19298] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1657289746.737844][19293:19298] CHIP:TOO: Fab + [1657289746.737844][19293:19298] CHIP:TOO: FabricIndex: 2 + [1657289746.737862][19293:19298] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP && ACL.S.A0001 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index 61a98cd52ddb95..195e2fbf5c5d51 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -392,7 +392,7 @@ tests: #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - label: "TH2 writes Extension attribute value as empty list" verification: | - ./chip-tool accesscontrol write extension '[{}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 + ./chip-tool accesscontrol write extension '[]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP && ACL.S.A0001 diff --git a/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml old mode 100755 new mode 100644 index ea44aa586a99d9..af2e4d8fae2228 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml @@ -451,7 +451,7 @@ tests: disabled: true - label: - "Step 6d: Verify SetupURL appended by '?/a='' and the decimal numeric + "Step 6d: Verify SetupURL appended by '?/a=' and the decimal numeric value of one of the exposed ActionIDs (see step 5a) points to a site providing information about the action" PICS: ACT.S.A0002 && ACT.S.M.SetupURLWithSuffix diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index eeb659dc6283d9..db1826a4949557 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -11,7 +11,6 @@ # 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: 3.14.1. [TC-ALOGIN-12.1] Account Login Verification @@ -60,10 +59,11 @@ tests: - name: "Status" value: 0 + #Issue: https://github.com/project-chip/connectedhomeip/issues/28992 - label: "Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C00.Rsp + PICS: ALOGIN.S.C00.Rsp && PICS_SKIP_SAMPLE_APP command: "GetSetupPIN" timedInteractionTimeoutMs: 10000 arguments: @@ -74,11 +74,13 @@ tests: values: - name: "SetupPIN" saveAs: setupPIN + constraints: + minLength: 11 - label: "Step 2: TH sends a Login command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C02.Rsp + PICS: ALOGIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP command: "Login" timedInteractionTimeoutMs: 10000 arguments: @@ -91,6 +93,6 @@ tests: - label: "Step 3: TH sends a Logout command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C03.Rsp + PICS: ALOGIN.S.C03.Rsp && PICS_SKIP_SAMPLE_APP command: "Logout" timedInteractionTimeoutMs: 10000 diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index f1fcc17f0985cd..68fd298978f2f6 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -127,11 +127,7 @@ tests: Run this command for lighting app in chip-tool: - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, - "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 On TH1, Verify the success response for KeySetWrite diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 87405f6168ad3e..2112bad42bf989 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -34,26 +34,13 @@ tests: - name: "nodeId" value: nodeId - #Issue https://github.com/project-chip/connectedhomeip/issues/26602 - label: "Step 2: TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool bridgeddevicebasicinformation read cluster-revision 1 3 - - Via the TH (chip-tool), verify: - -that the ClusterRevision attribute contains value as 2. - -that value is in the type of uint16. - - [1657695910.794487][15411:15416] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFD DataVersion: 2577979325 - [1657695910.794568][15411:15416] CHIP:TOO: ClusterRevision: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BR_4.yaml b/src/app/tests/suites/certification/Test_TC_BR_4.yaml index 15d01deed0434d..b3be40bb03f05c 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_4.yaml @@ -6042,7 +6042,7 @@ tests: contains the state of the battery of the (supported) devices from the above list" verification: | - ./chip-tool powersource read bat-charge-level 1 9 + ./chip-tool powersource read bat-charge-level 1 6 Verify BatChargeLevel attribute response on TH(bridge-app) Log: @@ -6063,7 +6063,7 @@ tests: [1663925822.845919][1588:1588] CHIP:DMG: Attribute = 0x0000_000E, [1663925822.845946][1588:1588] CHIP:DMG: } [1663925822.845978][1588:1588] CHIP:DMG: - [1663925822.846007][1588:1588] CHIP:DMG: Data = 58, + [1663925822.846007][1588:1588] CHIP:DMG: Data = 3, [1663925822.846035][1588:1588] CHIP:DMG: }, [1663925822.846063][1588:1588] CHIP:DMG: [1663925822.846086][1588:1588] CHIP:DMG: }, diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 4af0406adfdb17..a64e94c08d1f4b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -159,7 +159,7 @@ tests: verification: | On TH_CR3 send the below command - ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma + ./chip-tool pairing code 3 34970112332 --commissioner-name gamma Verify you got below message on TH_CR3(chip-tool) log Device commissioning completed with success @@ -210,7 +210,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta + ./chip-tool pairing code 2 34970112332 --commissioner-name beta Verify you got below message on TH_CR2(chip-tool) log Device commissioning completed with success diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 3ca0f9b9905bf0..72f93fe51ae3d4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -221,8 +221,8 @@ tests: disabled: true - label: - "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify DUT_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." PICS: CADMIN.S.C00.Rsp verification: | Execute the below command in any linux platform or in TH_CR1 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index 65bcd3f07c5878..c0d1a6e6e40b51 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -358,8 +358,8 @@ tests: disabled: true - label: - "Verify TH_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify TH_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." verification: | On any Linux platform execute this command or in TH_CR2 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index 977eed436268c5..00ee383deaf5ee 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -339,8 +339,8 @@ tests: disabled: true - label: - "Verify TH_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify TH_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." verification: | Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml index fed38e16e2916d..0bafc91390b043 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml @@ -17,6 +17,9 @@ name: 36.1.25. [TC-CADMIN-1.25] Subscription to the attributes - verify subscription response [ECM] [DUT - Commissionee] +PICS: + - CADMIN.S + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml index a923be83b413ba..d6af78ccfd2b92 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml @@ -17,6 +17,10 @@ name: 36.1.26. [TC-CADMIN-1.26] Subscription to the attributes - verify subscription response [BCM] [DUT - Commissionee] +PICS: + - CADMIN.S + - CADMIN.S.F00 + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml index 72263840727302..188e23dcccf156 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml @@ -17,6 +17,9 @@ name: 29.1.8. [TC-DA-1.8] Device Attestation Request Validation-Success Scenario [DUT-Commissioner] +PICS: + - MCORE.ROLE.COMMISSIONER + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index b95c22cf3e2c4d..5fb15e49a1530e 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -55,17 +55,20 @@ tests: ./chip-tool descriptor read device-type-list 1 0 - on TH (Chip-tool) log, Verify "DeviceTypeList" count is at least one entry and - - The entry should contain one Root Node Device Type, here 22(In hex 0x0016) is a Root Node Device Type + on TH (Chip-tool) log, Verify that the DeviceTypeList contains one Root Node Device Type and may only contain other Node Device Types (device types with scope=node, it can be any of the following Power Source, OTA Requestor, OTA Provider) next to the Root Node Device Type. (here DeviceType: 17 is power source ) - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1674552598.748946][21129:21131] CHIP:DMG: } - [1674552598.749017][21129:21131] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2963153058 - [1674552598.749027][21129:21131] CHIP:TOO: DeviceTypeList: 1 entries - [1674552598.749036][21129:21131] CHIP:TOO: [1]: { - [1674552598.749042][21129:21131] CHIP:TOO: DeviceType: 22 - [1674552598.749045][21129:21131] CHIP:TOO: Revision: 1 - [1674552598.749048][21129:21131] CHIP:TOO: } + [[1692617243.785786][31325:31327] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1437984882 + [1692617243.785840][31325:31327] CHIP:TOO: DeviceTypeList: 2 entries + [1692617243.785862][31325:31327] CHIP:TOO: [1]: { + [1692617243.785881][31325:31327] CHIP:TOO: DeviceType: 17 + [1692617243.785892][31325:31327] CHIP:TOO: Revision: 1 + [1692617243.785901][31325:31327] CHIP:TOO: } + [1692617243.785917][31325:31327] CHIP:TOO: [2]: { + [1692617243.785926][31325:31327] CHIP:TOO: DeviceType: 22 + [1692617243.785936][31325:31327] CHIP:TOO: Revision: 1 + [1692617243.785944][31325:31327] CHIP:TOO: } disabled: true - label: @@ -88,16 +91,41 @@ tests: On TH (Chip-tool) log, Verify that - If PartsLists count is 0 then, DeviceTypeList count is at least one. - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. - - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1674552599.264189][21135:21137] CHIP:DMG: } - [1674552599.264258][21135:21137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2605122001 - [1674552599.264268][21135:21137] CHIP:TOO: DeviceTypeList: 1 entries - [1674552599.264277][21135:21137] CHIP:TOO: [1]: { - [1674552599.264284][21135:21137] CHIP:TOO: DeviceType: 256 - [1674552599.264287][21135:21137] CHIP:TOO: Revision: 1 - [1674552599.264290][21135:21137] CHIP:TOO: } + [1692617790.900384][31584:31586] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2832593371 + [1692617790.900398][31584:31586] CHIP:TOO: DeviceTypeList: 2 entries + [1692617790.900410][31584:31586] CHIP:TOO: [1]: { + [1692617790.900413][31584:31586] CHIP:TOO: DeviceType: 256 + [1692617790.900416][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900419][31584:31586] CHIP:TOO: } + [1692617790.900423][31584:31586] CHIP:TOO: [2]: { + [1692617790.900425][31584:31586] CHIP:TOO: DeviceType: 17 + [1692617790.900428][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900430][31584:31586] CHIP:TOO: } + + ./chip-tool descriptor read device-type-list 1 1 + + On TH (Chip-tool) log, Verify that + - If PartsLists count is 0 then, DeviceTypeList count is at least one. + - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + + [1674552599.264189][21135:21137] CHIP:DMG: } + [1692617790.900384][31584:31586] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2832593371 + [1692617790.900398][31584:31586] CHIP:TOO: DeviceTypeList: 2 entries + [1692617790.900410][31584:31586] CHIP:TOO: [1]: { + [1692617790.900413][31584:31586] CHIP:TOO: DeviceType: 256 + [1692617790.900416][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900419][31584:31586] CHIP:TOO: } + [1692617790.900423][31584:31586] CHIP:TOO: [2]: { + [1692617790.900425][31584:31586] CHIP:TOO: DeviceType: 17 + [1692617790.900428][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900430][31584:31586] CHIP:TOO: } + ./chip-tool descriptor read parts-list 1 2 @@ -106,21 +134,24 @@ tests: [1660127879.565330][46472:46477] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1237610137 [1660127879.565473][46472:46477] CHIP:TOO: parts list: 0 entries - ./chip-tool descriptor read device-type-list 1 2 On TH (Chip-tool) log, Verify that - If PartsLists count is 0 then, DeviceTypeList count is at least one. - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. - - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform - [1674552599.786124][21141:21143] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4029338401 - [1674552599.786141][21141:21143] CHIP:TOO: DeviceTypeList: 1 entries - [1674552599.786155][21141:21143] CHIP:TOO: [1]: { - [1674552599.786164][21141:21143] CHIP:TOO: DeviceType: 256 - [1674552599.786168][21141:21143] CHIP:TOO: Revision: 1 - [1674552599.786171][21141:21143] CHIP:TOO: } + [1692618454.794870][31669:31671] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1103199808 + [1692618454.794946][31669:31671] CHIP:TOO: DeviceTypeList: 2 entries + [1692618454.794990][31669:31671] CHIP:TOO: [1]: { + [1692618454.795027][31669:31671] CHIP:TOO: DeviceType: 256 + [1692618454.795038][31669:31671] CHIP:TOO: Revision: 1 + [1692618454.795048][31669:31671] CHIP:TOO: } + [1692618454.795063][31669:31671] CHIP:TOO: [2]: { + [1692618454.795072][31669:31671] CHIP:TOO: DeviceType: 17 + [1692618454.795080][31669:31671] CHIP:TOO: Revision: 1 + [1692618454.795089][31669:31671] CHIP:TOO: } disabled: true - label: "Step 2: TH reads 'ServerList' attribute." @@ -130,79 +161,80 @@ tests: ./chip-tool descriptor read server-list 1 1 - Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 69. - - [1692618512.334390][31683:31685] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2832593371 - [1692618512.334424][31683:31685] CHIP:TOO: ServerList: 69 entries - [1692618512.334429][31683:31685] CHIP:TOO: [1]: 3 - [1692618512.334432][31683:31685] CHIP:TOO: [2]: 4 - [1692618512.334435][31683:31685] CHIP:TOO: [3]: 5 - [1692618512.334438][31683:31685] CHIP:TOO: [4]: 6 - [1692618512.334441][31683:31685] CHIP:TOO: [5]: 7 - [1692618512.334443][31683:31685] CHIP:TOO: [6]: 8 - [1692618512.334446][31683:31685] CHIP:TOO: [7]: 15 - [1692618512.334449][31683:31685] CHIP:TOO: [8]: 29 - [1692618512.334452][31683:31685] CHIP:TOO: [9]: 30 - [1692618512.334455][31683:31685] CHIP:TOO: [10]: 37 - [1692618512.334458][31683:31685] CHIP:TOO: [11]: 47 - [1692618512.334461][31683:31685] CHIP:TOO: [12]: 59 - [1692618512.334464][31683:31685] CHIP:TOO: [13]: 64 - [1692618512.334467][31683:31685] CHIP:TOO: [14]: 65 - [1692618512.334469][31683:31685] CHIP:TOO: [15]: 69 - [1692618512.334472][31683:31685] CHIP:TOO: [16]: 80 - [1692618512.334475][31683:31685] CHIP:TOO: [17]: 81 - [1692618512.334478][31683:31685] CHIP:TOO: [18]: 82 - [1692618512.334481][31683:31685] CHIP:TOO: [19]: 84 - [1692618512.334483][31683:31685] CHIP:TOO: [20]: 85 - [1692618512.334486][31683:31685] CHIP:TOO: [21]: 86 - [1692618512.334489][31683:31685] CHIP:TOO: [22]: 87 - [1692618512.334492][31683:31685] CHIP:TOO: [23]: 89 - [1692618512.334495][31683:31685] CHIP:TOO: [24]: 91 - [1692618512.334498][31683:31685] CHIP:TOO: [25]: 92 - [1692618512.334501][31683:31685] CHIP:TOO: [26]: 93 - [1692618512.334504][31683:31685] CHIP:TOO: [27]: 96 - [1692618512.334506][31683:31685] CHIP:TOO: [28]: 97 - [1692618512.334509][31683:31685] CHIP:TOO: [29]: 113 - [1692618512.334512][31683:31685] CHIP:TOO: [30]: 114 - [1692618512.334515][31683:31685] CHIP:TOO: [31]: 257 - [1692618512.334517][31683:31685] CHIP:TOO: [32]: 258 - [1692618512.334520][31683:31685] CHIP:TOO: [33]: 259 - [1692618512.334523][31683:31685] CHIP:TOO: [34]: 512 - [1692618512.334526][31683:31685] CHIP:TOO: [35]: 513 - [1692618512.334529][31683:31685] CHIP:TOO: [36]: 514 - [1692618512.334532][31683:31685] CHIP:TOO: [37]: 516 - [1692618512.334535][31683:31685] CHIP:TOO: [38]: 768 - [1692618512.334538][31683:31685] CHIP:TOO: [39]: 769 - [1692618512.334541][31683:31685] CHIP:TOO: [40]: 1024 - [1692618512.334543][31683:31685] CHIP:TOO: [41]: 1026 - [1692618512.334546][31683:31685] CHIP:TOO: [42]: 1027 - [1692618512.334549][31683:31685] CHIP:TOO: [43]: 1028 - [1692618512.334552][31683:31685] CHIP:TOO: [44]: 1029 - [1692618512.334555][31683:31685] CHIP:TOO: [45]: 1030 - [1692618512.334558][31683:31685] CHIP:TOO: [46]: 1036 - [1692618512.334560][31683:31685] CHIP:TOO: [47]: 1037 - [1692618512.334563][31683:31685] CHIP:TOO: [48]: 1043 - [1692618512.334566][31683:31685] CHIP:TOO: [49]: 1045 - [1692618512.334569][31683:31685] CHIP:TOO: [50]: 1066 - [1692618512.334572][31683:31685] CHIP:TOO: [51]: 1067 - [1692618512.334575][31683:31685] CHIP:TOO: [52]: 1068 - [1692618512.334578][31683:31685] CHIP:TOO: [53]: 1069 - [1692618512.334580][31683:31685] CHIP:TOO: [54]: 1070 - [1692618512.334583][31683:31685] CHIP:TOO: [55]: 1071 - [1692618512.334586][31683:31685] CHIP:TOO: [56]: 1283 - [1692618512.334589][31683:31685] CHIP:TOO: [57]: 1284 - [1692618512.334592][31683:31685] CHIP:TOO: [58]: 1285 - [1692618512.334595][31683:31685] CHIP:TOO: [59]: 1286 - [1692618512.334597][31683:31685] CHIP:TOO: [60]: 1287 - [1692618512.334600][31683:31685] CHIP:TOO: [61]: 1288 - [1692618512.334603][31683:31685] CHIP:TOO: [62]: 1289 - [1692618512.334606][31683:31685] CHIP:TOO: [63]: 1290 - [1692618512.334609][31683:31685] CHIP:TOO: [64]: 1291 - [1692618512.334612][31683:31685] CHIP:TOO: [65]: 1292 - [1692618512.334614][31683:31685] CHIP:TOO: [66]: 1293 - [1692618512.334617][31683:31685] CHIP:TOO: [67]: 1294 - [1692618512.334620][31683:31685] CHIP:TOO: [68]: 2820 - [1692618512.334623][31683:31685] CHIP:TOO: [69]: 4294048773 + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 70. + + [1693218196.392903][13451:13453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3853201227 + [1693218196.393030][13451:13453] CHIP:TOO: ServerList: 70 entries + [1693218196.393047][13451:13453] CHIP:TOO: [1]: 3 + [1693218196.393059][13451:13453] CHIP:TOO: [2]: 4 + [1693218196.393071][13451:13453] CHIP:TOO: [3]: 5 + [1693218196.393081][13451:13453] CHIP:TOO: [4]: 6 + [1693218196.393092][13451:13453] CHIP:TOO: [5]: 7 + [1693218196.393103][13451:13453] CHIP:TOO: [6]: 8 + [1693218196.393114][13451:13453] CHIP:TOO: [7]: 15 + [1693218196.393125][13451:13453] CHIP:TOO: [8]: 29 + [1693218196.393136][13451:13453] CHIP:TOO: [9]: 30 + [1693218196.393147][13451:13453] CHIP:TOO: [10]: 37 + [1693218196.393159][13451:13453] CHIP:TOO: [11]: 47 + [1693218196.393169][13451:13453] CHIP:TOO: [12]: 59 + [1693218196.393180][13451:13453] CHIP:TOO: [13]: 64 + [1693218196.393191][13451:13453] CHIP:TOO: [14]: 65 + [1693218196.393201][13451:13453] CHIP:TOO: [15]: 69 + [1693218196.393212][13451:13453] CHIP:TOO: [16]: 80 + [1693218196.393222][13451:13453] CHIP:TOO: [17]: 81 + [1693218196.393233][13451:13453] CHIP:TOO: [18]: 82 + [1693218196.393244][13451:13453] CHIP:TOO: [19]: 83 + [1693218196.393254][13451:13453] CHIP:TOO: [20]: 84 + [1693218196.393265][13451:13453] CHIP:TOO: [21]: 85 + [1693218196.393276][13451:13453] CHIP:TOO: [22]: 86 + [1693218196.393286][13451:13453] CHIP:TOO: [23]: 87 + [1693218196.393297][13451:13453] CHIP:TOO: [24]: 89 + [1693218196.393308][13451:13453] CHIP:TOO: [25]: 91 + [1693218196.393318][13451:13453] CHIP:TOO: [26]: 92 + [1693218196.393329][13451:13453] CHIP:TOO: [27]: 93 + [1693218196.393340][13451:13453] CHIP:TOO: [28]: 96 + [1693218196.393350][13451:13453] CHIP:TOO: [29]: 97 + [1693218196.393362][13451:13453] CHIP:TOO: [30]: 113 + [1693218196.393373][13451:13453] CHIP:TOO: [31]: 114 + [1693218196.393384][13451:13453] CHIP:TOO: [32]: 257 + [1693218196.393394][13451:13453] CHIP:TOO: [33]: 258 + [1693218196.393405][13451:13453] CHIP:TOO: [34]: 259 + [1693218196.393416][13451:13453] CHIP:TOO: [35]: 512 + [1693218196.393427][13451:13453] CHIP:TOO: [36]: 513 + [1693218196.393437][13451:13453] CHIP:TOO: [37]: 514 + [1693218196.393448][13451:13453] CHIP:TOO: [38]: 516 + [1693218196.393459][13451:13453] CHIP:TOO: [39]: 768 + [1693218196.393470][13451:13453] CHIP:TOO: [40]: 769 + [1693218196.393481][13451:13453] CHIP:TOO: [41]: 1024 + [1693218196.393492][13451:13453] CHIP:TOO: [42]: 1026 + [1693218196.393503][13451:13453] CHIP:TOO: [43]: 1027 + [1693218196.393514][13451:13453] CHIP:TOO: [44]: 1028 + [1693218196.393525][13451:13453] CHIP:TOO: [45]: 1029 + [1693218196.393536][13451:13453] CHIP:TOO: [46]: 1030 + [1693218196.393546][13451:13453] CHIP:TOO: [47]: 1036 + [1693218196.393557][13451:13453] CHIP:TOO: [48]: 1037 + [1693218196.393568][13451:13453] CHIP:TOO: [49]: 1043 + [1693218196.393579][13451:13453] CHIP:TOO: [50]: 1045 + [1693218196.393590][13451:13453] CHIP:TOO: [51]: 1066 + [1693218196.393601][13451:13453] CHIP:TOO: [52]: 1067 + [1693218196.393611][13451:13453] CHIP:TOO: [53]: 1068 + [1693218196.393622][13451:13453] CHIP:TOO: [54]: 1069 + [1693218196.393633][13451:13453] CHIP:TOO: [55]: 1070 + [1693218196.393643][13451:13453] CHIP:TOO: [56]: 1071 + [1693218196.393654][13451:13453] CHIP:TOO: [57]: 1283 + [1693218196.393664][13451:13453] CHIP:TOO: [58]: 1284 + [1693218196.393675][13451:13453] CHIP:TOO: [59]: 1285 + [1693218196.393686][13451:13453] CHIP:TOO: [60]: 1286 + [1693218196.393697][13451:13453] CHIP:TOO: [61]: 1287 + [1693218196.393708][13451:13453] CHIP:TOO: [62]: 1288 + [1693218196.393718][13451:13453] CHIP:TOO: [63]: 1289 + [1693218196.393729][13451:13453] CHIP:TOO: [64]: 1290 + [1693218196.393740][13451:13453] CHIP:TOO: [65]: 1291 + [1693218196.393750][13451:13453] CHIP:TOO: [66]: 1292 + [1693218196.393761][13451:13453] CHIP:TOO: [67]: 1293 + [1693218196.393772][13451:13453] CHIP:TOO: [68]: 1294 + [1693218196.393783][13451:13453] CHIP:TOO: [69]: 2820 + [1693218196.393794][13451:13453] CHIP:TOO: [70]: 4294048773 disabled: true - label: "Step 3: TH reads 'ClientList' attribute" @@ -241,23 +273,37 @@ tests: [1672919326.178777][33468:33470] CHIP:TOO: [2]: 2 disabled: true - - label: "Step 6: TH reads from the DUT the 'TagList' attribute." + - label: "Step 5: TH reads from the DUT the 'TagList' attribute." PICS: DESC.S.A0004 verification: | ./chip-tool descriptor read tag-list 1 0 - Verify that the DUT response contains a TagList and SHALL contain at least one element: - - [1692930031.171338][161314:161316] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0004 DataVersion: 3040764429 - [1692930031.171357][161314:161316] CHIP:TOO: TagList: 2 entries - [1692930031.171384][161314:161316] CHIP:TOO: [1]: { - [1692930031.171389][161314:161316] CHIP:TOO: MfgCode: null - [1692930031.171392][161314:161316] CHIP:TOO: NamespaceID: 7 - [1692930031.171394][161314:161316] CHIP:TOO: Tag: 0 - [1692930031.171396][161314:161316] CHIP:TOO: } - [1692930031.171399][161314:161316] CHIP:TOO: [2]: { - [1692930031.171410][161314:161316] CHIP:TOO: MfgCode: null - [1692930031.171413][161314:161316] CHIP:TOO: NamespaceID: 8 - [1692930031.171425][161314:161316] CHIP:TOO: Tag: 3 - [1692930031.171427][161314:161316] CHIP:TOO: } + - Verify that the DUT response contains a TagList and SHALL contain at least one element. + - Read each TagStruct from the list and check for the following: + - Number of entries in TagList is in the range of 1 to 6 and each entry contains at least a NamespaceID and a Tag property. Confirm that each entry is unique (i.e. no duplicate tags). + - If the MfgCode field is not null, confirm that it is the Vendor ID of the manufacturer who has defined a certain namespace and that the NamespaceID field indicates which namespace from the manufacturer is associated with the Tag field. + - Confirm that each non-manufacturer specific tag is from a namespace defined in the spec (either from an common namespace or from a namespace for the particular device type). + - If a manufacturer specific Tag field is indicated, at least one standardized tag which is not from any manufacturer’s namespace shall be included in the TagList. + - Tag field is the ID of a semantic tag within the namespace indicated by the NamespaceID property. + + [1692959866.253223][12664:12666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0004 DataVersion: 2088189574 + [1692959866.253237][12664:12666] CHIP:TOO: TagList: 2 entries + [1692959866.253248][12664:12666] CHIP:TOO: [1]: { + [1692959866.253251][12664:12666] CHIP:TOO: MfgCode: null + [1692959866.253255][12664:12666] CHIP:TOO: NamespaceID: 7 + [1692959866.253257][12664:12666] CHIP:TOO: Tag: 0 + [1692959866.253260][12664:12666] CHIP:TOO: } + [1692959866.253265][12664:12666] CHIP:TOO: [2]: { + [1692959866.253267][12664:12666] CHIP:TOO: MfgCode: null + [1692959866.253270][12664:12666] CHIP:TOO: NamespaceID: 8 + [1692959866.253272][12664:12666] CHIP:TOO: Tag: 3 + [1692959866.253274][12664:12666] CHIP:TOO: } + disabled: true + + - label: + "Step 5: The cluster tests applicable to each Device Type should be + executed to make sure all mandatory (and applicable optional) + attributes/commands are implemented." + verification: | + This step is redundant as during certification the appropriate tests are being run disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml index 184b36a5531ea3..adb1fcf7931014 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml @@ -39,7 +39,15 @@ tests: - label: "Step 1: Commission DUT to TH" verification: | - Commission DUT to TH + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app + + Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 + Verify the commissioning completed with success on TH(chip-tool) from DUT + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success + + This step can be skipped if done in a preceding test disabled: true - label: 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 d1f05401eeb4ea..cc67a0908626ac 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 @@ -222,7 +222,8 @@ tests: - label: "Step 1f: Simulate a not fully locked scenario on the DUT." PICS: - DRLK.S.A0000 && DRLK.S.Simulate.NotFullyLocked && PICS_SKIP_SAMPLE_APP + DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && + PICS_SKIP_SAMPLE_APP 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. @@ -328,7 +329,7 @@ tests: maxValue: 4294967294 - label: "Step 5b: TH writes DoorOpenEvents attribute as 0" - PICS: DRLK.S.A0004.Write + PICS: DRLK.S.A0004 command: "writeAttribute" attribute: "DoorOpenEvents" arguments: @@ -343,7 +344,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.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0004 && PICS_SKIP_SAMPLE_APP verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -382,7 +383,7 @@ tests: maxValue: 4294967294 - label: "Step 6b: TH writes DoorClosedEvents attribute as 0" - PICS: DRLK.S.A0005.Write + PICS: DRLK.S.A0005 command: "writeAttribute" attribute: "DoorClosedEvents" arguments: @@ -397,7 +398,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.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0005 && PICS_SKIP_SAMPLE_APP verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -781,14 +782,14 @@ tests: maxLength: 3 - label: "Step 19b: TH writes Language attribute as fr" - PICS: DRLK.S.A0021 && DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && DRLK.S.M.LanguageAttributeWritable command: "writeAttribute" attribute: "Language" arguments: value: "fr" - label: "Step 19b: TH writes Language attribute as fr" - PICS: DRLK.S.A0021 && !DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && !DRLK.S.M.LanguageAttributeWritable command: "writeAttribute" attribute: "Language" arguments: @@ -797,14 +798,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 19c: TH reads Language attribute from DUT" - PICS: DRLK.S.A0021 && DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && DRLK.S.M.LanguageAttributeWritable command: "readAttribute" attribute: "Language" response: value: "fr" - label: "Step 19c: TH reads Language attribute from DUT" - PICS: DRLK.S.A0021 && !DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && !DRLK.S.M.LanguageAttributeWritable command: "readAttribute" attribute: "Language" response: @@ -824,14 +825,14 @@ tests: maxValue: 2 - label: "Step 20b: TH writes LEDSettings attribute as 2" - PICS: DRLK.S.A0022.Write + PICS: DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 command: "writeAttribute" attribute: "LEDSettings" arguments: value: 2 - label: "Step 20b: TH writes LEDSettings attribute as 2" - PICS: " !DRLK.S.A0022.Write && DRLK.S.A0022 " + PICS: " !DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 " command: "writeAttribute" attribute: "LEDSettings" arguments: @@ -840,14 +841,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 20c: TH reads LEDSettings attribute from DUT" - PICS: DRLK.S.A0022.Write + PICS: DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 command: "readAttribute" attribute: "LEDSettings" response: value: 2 - label: "Step 20c: TH reads LEDSettings attribute from DUT" - PICS: " !DRLK.S.A0022.Write && DRLK.S.A0022 " + PICS: " !DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 " command: "readAttribute" attribute: "LEDSettings" response: @@ -867,14 +868,14 @@ tests: maxValue: 4294967294 - label: "Step 21b: TH writes AutoRelockTime attribute as 180 seconds" - PICS: DRLK.S.A0023.Write + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 command: "writeAttribute" attribute: "AutoRelockTime" arguments: value: 180 - label: "Step 21b: TH writes AutoRelockTime attribute as 180 seconds" - PICS: " !DRLK.S.A0023.Write && DRLK.S.A0023 " + PICS: " !DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 " command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -883,14 +884,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 21c: TH reads AutoRelockTime attribute from DUT" - PICS: DRLK.S.A0023.Write + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 command: "readAttribute" attribute: "AutoRelockTime" response: value: 180 - label: "Step 21c: TH reads AutoRelockTime attribute from DUT" - PICS: " !DRLK.S.A0023.Write && DRLK.S.A0023 " + PICS: " !DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 " command: "readAttribute" attribute: "AutoRelockTime" response: @@ -910,14 +911,14 @@ tests: maxValue: 3 - label: "Step 22b: TH writes SoundVolume attribute as 3" - PICS: DRLK.S.A0024.Write + PICS: DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 command: "writeAttribute" attribute: "SoundVolume" arguments: value: 3 - label: "Step 22b: TH writes SoundVolume attribute as 3" - PICS: " !DRLK.S.A0024.Write && DRLK.S.A0024 " + PICS: " !DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 " command: "writeAttribute" attribute: "SoundVolume" arguments: @@ -926,14 +927,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 22c: TH reads SoundVolume attribute from DUT" - PICS: DRLK.S.A0024.Write + PICS: DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 command: "readAttribute" attribute: "SoundVolume" response: value: 3 - label: "Step 22c: TH reads SoundVolume attribute from DUT" - PICS: " !DRLK.S.A0024.Write && DRLK.S.A0024 " + PICS: " !DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 " command: "readAttribute" attribute: "SoundVolume" response: @@ -952,28 +953,13 @@ tests: - label: "Step 23b: TH writes Supported OperatingModes attribute as bit 0 is set to 0" - PICS: PICS_SKIP_SAMPLE_APP && DRLK.S.A0026 - verification: | - ./chip-tool doorlock write-by-id 38 0 1 1 - - Via the TH (chip-tool), verify the UNSUPPORTED_WRITE response for Supported OperatingModes attribute write functionality. - - [1653637108.039160][3522:3527] CHIP:DMG: StatusIB = - [1653637108.039205][3522:3527] CHIP:DMG: { - [1653637108.039250][3522:3527] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1653637108.039297][3522:3527] CHIP:DMG: }, - [1653637108.039343][3522:3527] CHIP:DMG: - [1653637108.039380][3522:3527] CHIP:DMG: }, - [1653637108.039424][3522:3527] CHIP:DMG: - [1653637108.039460][3522:3527] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A0026 + command: "writeAttribute" + attribute: "SupportedOperatingModes" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 0 + response: + error: UNSUPPORTED_WRITE - label: "Step 23c: TH reads Supported OperatingModes attribute from DUT" PICS: DRLK.S.A0026 @@ -998,7 +984,7 @@ tests: - label: "Step 24b: TH writes OperatingMode attribute to a value as Normal and the new value is present in SupportedOperatingModes" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -1007,7 +993,7 @@ tests: - label: "Step 24b: TH writes OperatingMode attribute to a value as Normal and the new value is present in SupportedOperatingModes" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -1019,7 +1005,7 @@ tests: "Step 24c: TH writes OperatingMode attribute to a value as NoRemoteLockUnlock and the new value is present in Supported OperatingModes" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -1029,7 +1015,7 @@ tests: "Step 24c: TH writes OperatingMode attribute to a value as NoRemoteLockUnlock and the new value is present in Supported OperatingModes" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -1038,7 +1024,7 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 24d: TH reads OperatingMode attribute from DUT" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "readAttribute" attribute: "OperatingMode" response: @@ -1046,7 +1032,7 @@ tests: anyOf: [0, 3] - label: "Step 24d: TH reads OperatingMode attribute from DUT" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "readAttribute" attribute: "OperatingMode" response: @@ -1067,30 +1053,13 @@ tests: - label: "Step 25b: TH writes Default ConfigurationRegister attribute as bit 0 is set to 1" - PICS: DRLK.S.A0027 && PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write-by-id 39 1 1 1 - - Via the TH (chip-tool), verify the UNSUPPORTED_WRITE response for Default ConfigurationRegister attribute write functionality. - - [1653637348.333879][3570:3575] CHIP:DMG: StatusIB = - [1653637348.333920][3570:3575] CHIP:DMG: { - [1653637348.333961][3570:3575] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1653637348.334007][3570:3575] CHIP:DMG: }, - [1653637348.334048][3570:3575] CHIP:DMG: - [1653637348.334084][3570:3575] CHIP:DMG: }, - [1653637348.334124][3570:3575] CHIP:DMG: - [1653637348.334156][3570:3575] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A0027 + command: "writeAttribute" + attribute: "DefaultConfigurationRegister" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 1 + response: + error: UNSUPPORTED_WRITE - label: "Step 25c: TH reads Default ConfigurationRegister attribute from DUT" @@ -1112,14 +1081,15 @@ tests: type: boolean - label: "Step 26b: TH writes EnableLocalProgramming attribute as false" - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: value: 0 - label: "Step 26b: TH writes EnableLocalProgramming attribute as false" - PICS: " !DRLK.S.A0028.Write && DRLK.S.A0028 " + PICS: + " !DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 " command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: @@ -1128,14 +1098,15 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 26c: TH reads EnableLocalProgramming attribute from DUT" - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 command: "readAttribute" attribute: "EnableLocalProgramming" response: value: 0 - label: "Step 26c: TH reads EnableLocalProgramming attribute from DUT" - PICS: " !DRLK.S.A0028.Write && DRLK.S.A0028 " + PICS: + " !DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 " command: "readAttribute" attribute: "EnableLocalProgramming" response: @@ -1245,7 +1216,7 @@ tests: - label: "Step 30c: TH writes to LocalProgrammingFeatures to disable all the features (Change all bits to 0)" - PICS: DRLK.S.A002c.Write && DRLK.S.A0028 + PICS: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable && DRLK.S.A0028 command: "writeAttribute" attribute: "LocalProgrammingFeatures" arguments: @@ -1254,7 +1225,7 @@ tests: - label: "Step 30c: TH reads LocalProgrammingFeatures attribute from DUT. DRLK.S.A0028(EnableLocalProgramming) is False." - PICS: DRLK.S.A002c.Write && DRLK.S.A0028 + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1263,7 +1234,7 @@ tests: hasMasksClear: [0x1, 0x2, 0x4, 0x8] - label: "Step 30d: TH sets the EnableLocalProgramming attribute to False" - PICS: DRLK.S.A002c + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: @@ -1272,7 +1243,7 @@ tests: - label: "Step 30d: Verify that all the 4 bits in the LocalProgrammingFeatures is set to 0." - PICS: DRLK.S.A002c + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1281,7 +1252,7 @@ tests: hasMasksClear: [0x1, 0x2, 0x4, 0x8] - label: "Step 30e: TH sets the EnableLocalProgramming attribute to True" - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: @@ -1290,7 +1261,7 @@ tests: - label: "Step 30e: Verify that all the 4 bits in the LocalProgrammingFeatures is set to 1." - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1301,7 +1272,7 @@ tests: - label: "Step 30f: TH sends a write message to change any one of the bits of the LocalProgrammingFeatures." - PICS: DRLK.S.A002c && DRLK.S.A002c.Write + PICS: DRLK.S.A002c && DRLK.S.M.LocalProgrammingFeaturesAttributeWritable command: "writeAttribute" attribute: "LocalProgrammingFeatures" arguments: @@ -1310,7 +1281,7 @@ tests: - label: "Step 30f: Verify that the correct bit has been changed by doing a Read on LocalProgrammingFeatures attribute.." - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1321,7 +1292,7 @@ tests: - label: "Step 30g: TH sends a write message to change any one of the bits of the LocalProgrammingFeatures." - PICS: DRLK.S.A002c && DRLK.S.A002c.ReadOnly + PICS: DRLK.S.A002c command: "writeAttribute" attribute: "LocalProgrammingFeatures" arguments: @@ -1343,14 +1314,18 @@ tests: maxValue: 255 - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.WrongCodeEntryLimitAttributeWritable command: "writeAttribute" attribute: "WrongCodeEntryLimit" arguments: value: 8 - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.WrongCodeEntryLimitAttributeWritable " command: "writeAttribute" attribute: "WrongCodeEntryLimit" arguments: @@ -1359,14 +1334,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 31c: TH reads WrongCode EntryLimit attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.WrongCodeEntryLimitAttributeWritable command: "readAttribute" attribute: "WrongCodeEntryLimit" response: value: 8 - label: "Step 31c: TH reads WrongCode EntryLimit attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.WrongCodeEntryLimitAttributeWritable " command: "readAttribute" attribute: "WrongCodeEntryLimit" response: @@ -1386,14 +1365,18 @@ tests: maxValue: 255 - label: "Step 32b: TH writes UserCodeTemporaryDisableTime attribute as 120" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: value: 120 - label: "Step 32b: TH writes UserCodeTemporaryDisableTime attribute as 120" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable " command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: @@ -1402,14 +1385,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 32c: TH reads UserCodeTemporary DisableTime attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable command: "readAttribute" attribute: "UserCodeTemporaryDisableTime" response: value: 120 - label: "Step 32c: TH reads UserCodeTemporary DisableTime attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable " command: "readAttribute" attribute: "UserCodeTemporaryDisableTime" response: @@ -1427,7 +1414,9 @@ tests: - label: "Step 33b: TH writes RequirePINfor RemoteOperation attribute as true" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write + PICS: + DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + DRLK.S.M.RequirePINForRemoteOperationAttributeWritable command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -1435,7 +1424,9 @@ tests: - label: "Step 33b: TH writes RequirePINfor RemoteOperation attribute as true" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write + PICS: + " DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + !DRLK.S.M.RequirePINForRemoteOperationAttributeWritable " command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -1444,14 +1435,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 33c: TH reads RequirePINfor RemoteOperation attribute" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write + PICS: + DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + DRLK.S.M.RequirePINForRemoteOperationAttributeWritable command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: value: 1 - label: "Step 33c: TH reads RequirePINfor RemoteOperation attribute" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write + PICS: + " DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + !DRLK.S.M.RequirePINForRemoteOperationAttributeWritable " command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: @@ -1471,14 +1466,18 @@ tests: maxValue: 2880 - label: "Step 34b: TH writes ExpiringUserTimeout attribute as 10 minutes" - PICS: DRLK.S.F08 && DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && DRLK.S.A0035 && + DRLK.S.M.ExpiringUserTimeOutAttributeWritable command: "writeAttribute" attribute: "ExpiringUserTimeout" arguments: value: 10 - label: "Step 34b: TH writes ExpiringUserTimeout attribute as 10 minutes" - PICS: DRLK.S.F08 && !DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && !DRLK.S.M.ExpiringUserTimeOutAttributeWritable && + DRLK.S.A0035 command: "writeAttribute" attribute: "ExpiringUserTimeout" arguments: @@ -1487,14 +1486,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 34c: TH reads ExpiringUserTimeout attribute" - PICS: DRLK.S.F08 && DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && DRLK.S.A0035 && + DRLK.S.M.ExpiringUserTimeOutAttributeWritable command: "readAttribute" attribute: "ExpiringUserTimeout" response: value: 10 - label: "Step 34c: TH reads ExpiringUserTimeout attribute" - PICS: DRLK.S.F08 && !DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + " DRLK.S.F08 && DRLK.S.A0035 && + !DRLK.S.M.ExpiringUserTimeOutAttributeWritable " command: "readAttribute" attribute: "ExpiringUserTimeout" response: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml index 7ae95330c7b37e..bd593dadbf973c 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml @@ -130,7 +130,7 @@ tests: - label: "Step 1a: TH writes AutoRelockTime attribute value as 10 seconds on the DUT" - PICS: DRLK.S.A0023.Write && PICS_SDK_CI_ONLY + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SDK_CI_ONLY command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -139,7 +139,7 @@ tests: - label: "Step 1b: TH writes AutoRelockTime attribute value as 60 seconds on the DUT" - PICS: DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SKIP_SAMPLE_APP command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -148,7 +148,7 @@ tests: - label: "Step 1c: TH writes AutoRelockTime attribute value as 10 seconds on the DUT" - PICS: PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write + PICS: PICS_SDK_CI_ONLY && !DRLK.S.M.AutoRelockTimeAttributeWritable command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -159,7 +159,7 @@ tests: - label: "Step 1d: TH writes AutoRelockTime attribute value as 60 seconds on the DUT" - PICS: PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write + PICS: PICS_SKIP_SAMPLE_APP && !DRLK.S.M.AutoRelockTimeAttributeWritable command: "writeAttribute" attribute: "AutoRelockTime" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml index 234c3b16b68679..3c38efe9802c5d 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -37,1992 +37,782 @@ tests: lock disabled: true - - label: "DUT sends Lock Door command to TH." + - label: "Step 1: DUT sends Lock Door command to TH." PICS: DRLK.C.C00.Tx verification: | - ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Lock Door command response" on TH(lock-app): - - [1667211168.741765][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae992d0 exchange 12975r - [1667211168.741897][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211168.741963][14571:14571] CHIP:DMG: { - [1667211168.742021][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211168.742112][14571:14571] CHIP:DMG: timedRequest = true, - [1667211168.742176][14571:14571] CHIP:DMG: InvokeRequests = - [1667211168.742252][14571:14571] CHIP:DMG: [ - [1667211168.742336][14571:14571] CHIP:DMG: CommandDataIB = - [1667211168.742420][14571:14571] CHIP:DMG: { - [1667211168.742552][14571:14571] CHIP:DMG: CommandPathIB = - [1667211168.742650][14571:14571] CHIP:DMG: { - [1667211168.742767][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211168.742871][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211168.742981][14571:14571] CHIP:DMG: CommandId = 0x0, - [1667211168.743073][14571:14571] CHIP:DMG: }, - [1667211168.743195][14571:14571] CHIP:DMG: - [1667211168.743271][14571:14571] CHIP:DMG: CommandFields = - [1667211168.743387][14571:14571] CHIP:DMG: { - [1667211168.743479][14571:14571] CHIP:DMG: }, - [1667211168.743575][14571:14571] CHIP:DMG: }, - [1667211168.743659][14571:14571] CHIP:DMG: - [1667211168.743728][14571:14571] CHIP:DMG: ], - [1667211168.743826][14571:14571] CHIP:DMG: - [1667211168.743889][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211168.743977][14571:14571] CHIP:DMG: }, - [1667211168.744148][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211168.744232][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211168.744330][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 - [1667211168.744405][14571:14571] CHIP:ZCL: Received command: LockDoor - [1667211168.744503][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211168.744561][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Locked" [endpointId=1] - [1667211168.745043][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-PL8ciy) - [1667211168.747033][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211168.747214][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec51 - [1667211168.747284][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211168.747376][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211168.747452][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211168.747519][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211168.747672][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000004 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x00000000012017A5 - [1667211168.747840][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211168.748497][14571:14571] CHIP:EM: <<< [E:12975r M:85727605 (Ack:252354155)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211168.748712][14571:14571] CHIP:IN: (S) Sending msg 85727605 on secure session with LSID: 42466 - [1667211168.749498][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45017 | 85727605 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 140 / Exchange = 12975] - [1667211168.749605][14571:14571] CHIP:DMG: Header Flags = - [1667211168.749664][14571:14571] CHIP:DMG: { - [1667211168.749753][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211168.749811][14571:14571] CHIP:DMG: { - [1667211168.749874][14571:14571] CHIP:DMG: AckMsg = 252354155 - [1667211168.749930][14571:14571] CHIP:DMG: NeedsAck = true - [1667211168.749985][14571:14571] CHIP:DMG: } - [1667211168.750087][14571:14571] CHIP:DMG: } - [1667211168.750143][14571:14571] CHIP:DMG: - [1667211168.750217][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211168.750296][14571:14571] CHIP:DMG: { - [1667211168.750351][14571:14571] CHIP:DMG: data = 008c000075191c052fd5a859bb32eeaa412a0f49ad60407a9dcbb11e2783182dce02395d25d4a9d77216b57c1358b700b03d9ba9ed2529116cdcea0d4fde035e6f16b4e0 - [1667211168.750411][14571:14571] CHIP:DMG: buffer_ptr = 187651867773680 - [1667211168.750541][14571:14571] CHIP:DMG: } - [1667211168.750598][14571:14571] CHIP:DMG: - [1667211168.750683][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211168.750763][14571:14571] CHIP:DMG: { - [1667211168.750818][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402001835012400001818181824ff0118 - [1667211168.750875][14571:14571] CHIP:DMG: } - [1667211168.750949][14571:14571] CHIP:DMG: - [1667211168.751118][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211168.751185][14571:14571] CHIP:DMG: { - [1667211168.751245][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211168.751308][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211168.751409][14571:14571] CHIP:DMG: [ - [1667211168.751476][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211168.751570][14571:14571] CHIP:DMG: { - [1667211168.751668][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211168.751761][14571:14571] CHIP:DMG: { - [1667211168.751871][14571:14571] CHIP:DMG: CommandPathIB = - [1667211168.751968][14571:14571] CHIP:DMG: { - [1667211168.752090][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211168.752216][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211168.752320][14571:14571] CHIP:DMG: CommandId = 0x0, - [1667211168.752439][14571:14571] CHIP:DMG: }, - [1667211168.752570][14571:14571] CHIP:DMG: - [1667211168.752661][14571:14571] CHIP:DMG: StatusIB = - [1667211168.752784][14571:14571] CHIP:DMG: { - [1667211168.752883][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211168.753002][14571:14571] CHIP:DMG: }, - [1667211168.753099][14571:14571] CHIP:DMG: - [1667211168.753208][14571:14571] CHIP:DMG: }, - [1667211168.753317][14571:14571] CHIP:DMG: + ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Lock Door command with SUCCESS response on TH(lock-app) log: + + [1685673050.566811][2584:2586] CHIP:DMG: InvokeResponseMessage = + [1685673050.566867][2584:2586] CHIP:DMG: { + [1685673050.566921][2584:2586] CHIP:DMG: suppressResponse = false, + [1685673050.566977][2584:2586] CHIP:DMG: InvokeResponseIBs = + [1685673050.567050][2584:2586] CHIP:DMG: [ + [1685673050.567107][2584:2586] CHIP:DMG: InvokeResponseIB = + [1685673050.567186][2584:2586] CHIP:DMG: { + [1685673050.567248][2584:2586] CHIP:DMG: CommandStatusIB = + [1685673050.567320][2584:2586] CHIP:DMG: { + [1685673050.567387][2584:2586] CHIP:DMG: CommandPathIB = + [1685673050.567464][2584:2586] CHIP:DMG: { + [1685673050.567540][2584:2586] CHIP:DMG: EndpointId = 0x1, + [1685673050.567625][2584:2586] CHIP:DMG: ClusterId = 0x101, + [1685673050.567706][2584:2586] CHIP:DMG: CommandId = 0x0, + [1685673050.567784][2584:2586] CHIP:DMG: }, + [1685673050.567870][2584:2586] CHIP:DMG: + [1685673050.567938][2584:2586] CHIP:DMG: StatusIB = + [1685673050.568015][2584:2586] CHIP:DMG: { + [1685673050.568092][2584:2586] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673050.568171][2584:2586] CHIP:DMG: }, + [1685673050.568246][2584:2586] CHIP:DMG: + [1685673050.568313][2584:2586] CHIP:DMG: }, + [1685673050.568389][2584:2586] CHIP:DMG: + [1685673050.568451][2584:2586] CHIP:DMG: }, + [1685673050.568524][2584:2586] CHIP:DMG: + [1685673050.568578][2584:2586] CHIP:DMG: ], + [1685673050.568650][2584:2586] CHIP:DMG: + [1685673050.568707][2584:2586] CHIP:DMG: InteractionModelRevision = 1 + [1685673050.568761][2584:2586] CHIP:DMG: }, disabled: true - - label: "DUT sends Unlock Door command to TH." + - label: "Step 2: DUT sends Unlock Door command to TH." PICS: DRLK.C.C01.Tx verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Unlock Door command response" on TH(lock-app): - - [1667211210.888806][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeae8d0 exchange 13369r - [1667211210.888932][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211210.888996][14571:14571] CHIP:DMG: { - [1667211210.889054][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211210.889148][14571:14571] CHIP:DMG: timedRequest = true, - [1667211210.889211][14571:14571] CHIP:DMG: InvokeRequests = - [1667211210.889288][14571:14571] CHIP:DMG: [ - [1667211210.889372][14571:14571] CHIP:DMG: CommandDataIB = - [1667211210.889450][14571:14571] CHIP:DMG: { - [1667211210.889538][14571:14571] CHIP:DMG: CommandPathIB = - [1667211210.889627][14571:14571] CHIP:DMG: { - [1667211210.889731][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211210.889818][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211210.889934][14571:14571] CHIP:DMG: CommandId = 0x1, - [1667211210.890015][14571:14571] CHIP:DMG: }, - [1667211210.890126][14571:14571] CHIP:DMG: - [1667211210.890199][14571:14571] CHIP:DMG: CommandFields = - [1667211210.890299][14571:14571] CHIP:DMG: { - [1667211210.890380][14571:14571] CHIP:DMG: }, - [1667211210.890511][14571:14571] CHIP:DMG: }, - [1667211210.890595][14571:14571] CHIP:DMG: - [1667211210.890851][14571:14571] CHIP:DMG: ], - [1667211210.890930][14571:14571] CHIP:DMG: - [1667211210.890992][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211210.891057][14571:14571] CHIP:DMG: }, - [1667211210.891222][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211210.891303][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211210.891397][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 - [1667211210.891471][14571:14571] CHIP:ZCL: Received command: UnlockDoor - [1667211210.891589][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211210.891647][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Unlocked" [endpointId=1] - [1667211210.892108][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-0agKuS) - [1667211210.893899][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211210.894042][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec52 - [1667211210.894109][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211210.894195][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211210.894270][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211210.894369][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211210.894554][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000005 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x000000000120BC47 - [1667211210.894731][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211210.895390][14571:14571] CHIP:EM: <<< [E:13369r M:260723914 (Ack:152448902)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211210.895497][14571:14571] CHIP:IN: (S) Sending msg 260723914 on secure session with LSID: 42467 - [1667211210.896195][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58898 | 260723914 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 18140 / Exchange = 13369] - [1667211210.896294][14571:14571] CHIP:DMG: Header Flags = - [1667211210.896353][14571:14571] CHIP:DMG: { - [1667211210.896440][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211210.896497][14571:14571] CHIP:DMG: { - [1667211210.896558][14571:14571] CHIP:DMG: AckMsg = 152448902 - [1667211210.896638][14571:14571] CHIP:DMG: NeedsAck = true - [1667211210.896694][14571:14571] CHIP:DMG: } - [1667211210.896767][14571:14571] CHIP:DMG: } - [1667211210.896846][14571:14571] CHIP:DMG: - [1667211210.896915][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211210.896972][14571:14571] CHIP:DMG: { - [1667211210.897051][14571:14571] CHIP:DMG: data = 00dc4600ca548a0f60b7468a74de96ab927f1330336ba152aef8f28cc48a8f33f68a755ea9502cdbb67530880e104c90ebcbd525bc5b1c7f46d03f109624324a41148ed9 - [1667211210.897109][14571:14571] CHIP:DMG: buffer_ptr = 187651867773984 - [1667211210.897163][14571:14571] CHIP:DMG: } - [1667211210.897238][14571:14571] CHIP:DMG: - [1667211210.897314][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211210.897371][14571:14571] CHIP:DMG: { - [1667211210.897448][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402011835012400001818181824ff0118 - [1667211210.897503][14571:14571] CHIP:DMG: } - [1667211210.897556][14571:14571] CHIP:DMG: - [1667211210.897691][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211210.897754][14571:14571] CHIP:DMG: { - [1667211210.897813][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211210.897875][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211210.897952][14571:14571] CHIP:DMG: [ - [1667211210.898015][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211210.898261][14571:14571] CHIP:DMG: { - [1667211210.898334][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211210.898414][14571:14571] CHIP:DMG: { - [1667211210.898548][14571:14571] CHIP:DMG: CommandPathIB = - [1667211210.898638][14571:14571] CHIP:DMG: { - [1667211210.898733][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211210.898830][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211210.898929][14571:14571] CHIP:DMG: CommandId = 0x1, - [1667211210.899021][14571:14571] CHIP:DMG: }, - [1667211210.899124][14571:14571] CHIP:DMG: - [1667211210.899201][14571:14571] CHIP:DMG: StatusIB = - [1667211210.899286][14571:14571] CHIP:DMG: { - [1667211210.899372][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211210.899466][14571:14571] CHIP:DMG: }, - [1667211210.899551][14571:14571] CHIP:DMG: + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Unlock Door command with SUCCESS response on TH(lock-app) log: + + [1685673083.557613][2593:2595] CHIP:DMG: InvokeResponseMessage = + [1685673083.557668][2593:2595] CHIP:DMG: { + [1685673083.557724][2593:2595] CHIP:DMG: suppressResponse = false, + [1685673083.557834][2593:2595] CHIP:DMG: InvokeResponseIBs = + [1685673083.557915][2593:2595] CHIP:DMG: [ + [1685673083.557973][2593:2595] CHIP:DMG: InvokeResponseIB = + [1685673083.558070][2593:2595] CHIP:DMG: { + [1685673083.558133][2593:2595] CHIP:DMG: CommandStatusIB = + [1685673083.558222][2593:2595] CHIP:DMG: { + [1685673083.558306][2593:2595] CHIP:DMG: CommandPathIB = + [1685673083.558399][2593:2595] CHIP:DMG: { + [1685673083.558493][2593:2595] CHIP:DMG: EndpointId = 0x1, + [1685673083.558589][2593:2595] CHIP:DMG: ClusterId = 0x101, + [1685673083.558685][2593:2595] CHIP:DMG: CommandId = 0x1, + [1685673083.558775][2593:2595] CHIP:DMG: }, + [1685673083.558878][2593:2595] CHIP:DMG: + [1685673083.558962][2593:2595] CHIP:DMG: StatusIB = + [1685673083.559058][2593:2595] CHIP:DMG: { + [1685673083.559150][2593:2595] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673083.559243][2593:2595] CHIP:DMG: }, + [1685673083.559335][2593:2595] CHIP:DMG: + [1685673083.559418][2593:2595] CHIP:DMG: }, + [1685673083.559513][2593:2595] CHIP:DMG: + [1685673083.559582][2593:2595] CHIP:DMG: }, + [1685673083.559663][2593:2595] CHIP:DMG: + [1685673083.559720][2593:2595] CHIP:DMG: ], + [1685673083.559792][2593:2595] CHIP:DMG: + [1685673083.559848][2593:2595] CHIP:DMG: InteractionModelRevision = 1 + [1685673083.559903][2593:2595] CHIP:DMG: }, disabled: true - - label: "DUT sends Unlock with Timeout command to TH." + - label: "Step 3: DUT sends Unlock with Timeout command to TH." PICS: DRLK.C.C03.Tx verification: | - ./chip-tool doorlock unlock-with-timeout 60 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Unlock with Timeout command response" on TH(lock-app): - - - [1667211279.826689][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeae8d0 exchange 43708r - [1667211279.826800][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211279.826864][14571:14571] CHIP:DMG: { - [1667211279.826923][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211279.827006][14571:14571] CHIP:DMG: timedRequest = true, - [1667211279.827079][14571:14571] CHIP:DMG: InvokeRequests = - [1667211279.827160][14571:14571] CHIP:DMG: [ - [1667211279.827223][14571:14571] CHIP:DMG: CommandDataIB = - [1667211279.827303][14571:14571] CHIP:DMG: { - [1667211279.827377][14571:14571] CHIP:DMG: CommandPathIB = - [1667211279.827461][14571:14571] CHIP:DMG: { - [1667211279.827544][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211279.827633][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211279.827720][14571:14571] CHIP:DMG: CommandId = 0x3, - [1667211279.827800][14571:14571] CHIP:DMG: }, - [1667211279.827886][14571:14571] CHIP:DMG: - [1667211279.827962][14571:14571] CHIP:DMG: CommandFields = - [1667211279.828044][14571:14571] CHIP:DMG: { - [1667211279.828130][14571:14571] CHIP:DMG: 0x0 = 60, - [1667211279.828215][14571:14571] CHIP:DMG: }, - [1667211279.828294][14571:14571] CHIP:DMG: }, - [1667211279.828378][14571:14571] CHIP:DMG: - [1667211279.828447][14571:14571] CHIP:DMG: ], - [1667211279.828524][14571:14571] CHIP:DMG: - [1667211279.828585][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211279.828653][14571:14571] CHIP:DMG: }, - [1667211279.828802][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211279.828886][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211279.828956][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0003 - [1667211279.829035][14571:14571] CHIP:ZCL: Received command: UnlockWithTimeout - [1667211279.829134][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211279.829194][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Unlocked" [endpointId=1] - [1667211279.829602][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-5rj3XN) - [1667211279.831590][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211279.831771][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec54 - [1667211279.831842][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211279.831933][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211279.832225][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211279.832314][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211279.832471][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000007 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x000000000121C991 - [1667211279.832617][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211279.833224][14571:14571] CHIP:EM: <<< [E:43708r M:210923984 (Ack:79558162)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211279.833341][14571:14571] CHIP:IN: (S) Sending msg 210923984 on secure session with LSID: 42468 - [1667211279.834070][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41489 | 210923984 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 34959 / Exchange = 43708] - [1667211279.834176][14571:14571] CHIP:DMG: Header Flags = - [1667211279.834234][14571:14571] CHIP:DMG: { - [1667211279.834323][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211279.834379][14571:14571] CHIP:DMG: { - [1667211279.834440][14571:14571] CHIP:DMG: AckMsg = 79558162 - [1667211279.834555][14571:14571] CHIP:DMG: NeedsAck = true - [1667211279.834612][14571:14571] CHIP:DMG: } - [1667211279.834687][14571:14571] CHIP:DMG: } - [1667211279.834742][14571:14571] CHIP:DMG: - [1667211279.834815][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211279.834871][14571:14571] CHIP:DMG: { - [1667211279.834926][14571:14571] CHIP:DMG: data = 008f8800d071920c8a5f99c962223f65c7ec32c0cdd27af5eca72ea2be963afe9c38803d90edf2bba9f03e364f3f482a9e4e9497dedaf876c9ae2f42c6264afa0f2a5137 - [1667211279.834986][14571:14571] CHIP:DMG: buffer_ptr = 187651867773696 - [1667211279.835040][14571:14571] CHIP:DMG: } - [1667211279.835092][14571:14571] CHIP:DMG: - [1667211279.835168][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211279.835224][14571:14571] CHIP:DMG: { - [1667211279.835279][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402031835012400001818181824ff0118 - [1667211279.835334][14571:14571] CHIP:DMG: } - [1667211279.835386][14571:14571] CHIP:DMG: - [1667211279.835529][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211279.835593][14571:14571] CHIP:DMG: { - [1667211279.835653][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211279.835716][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211279.835793][14571:14571] CHIP:DMG: [ - [1667211279.835856][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211279.835950][14571:14571] CHIP:DMG: { - [1667211279.836017][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211279.836100][14571:14571] CHIP:DMG: { - [1667211279.836178][14571:14571] CHIP:DMG: CommandPathIB = - [1667211279.836266][14571:14571] CHIP:DMG: { - [1667211279.836354][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211279.836446][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211279.836536][14571:14571] CHIP:DMG: CommandId = 0x3, - [1667211279.836622][14571:14571] CHIP:DMG: }, - [1667211279.836718][14571:14571] CHIP:DMG: - [1667211279.836799][14571:14571] CHIP:DMG: StatusIB = - [1667211279.836886][14571:14571] CHIP:DMG: { - [1667211279.836973][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211279.837058][14571:14571] CHIP:DMG: }, - [1667211279.837144][14571:14571] CHIP:DMG: - [1667211279.837221][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock unlock-with-timeout 60 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Unlock with Timeout command with SUCCESS response on TH(lock-app) log: + + [1685673101.154705][2596:2598] CHIP:DMG: InvokeResponseMessage = + [1685673101.154760][2596:2598] CHIP:DMG: { + [1685673101.154813][2596:2598] CHIP:DMG: suppressResponse = false, + [1685673101.154869][2596:2598] CHIP:DMG: InvokeResponseIBs = + [1685673101.154941][2596:2598] CHIP:DMG: [ + [1685673101.154998][2596:2598] CHIP:DMG: InvokeResponseIB = + [1685673101.155074][2596:2598] CHIP:DMG: { + [1685673101.155135][2596:2598] CHIP:DMG: CommandStatusIB = + [1685673101.155206][2596:2598] CHIP:DMG: { + [1685673101.155273][2596:2598] CHIP:DMG: CommandPathIB = + [1685673101.155349][2596:2598] CHIP:DMG: { + [1685673101.155426][2596:2598] CHIP:DMG: EndpointId = 0x1, + [1685673101.155501][2596:2598] CHIP:DMG: ClusterId = 0x101, + [1685673101.155586][2596:2598] CHIP:DMG: CommandId = 0x3, + [1685673101.155660][2596:2598] CHIP:DMG: }, + [1685673101.155743][2596:2598] CHIP:DMG: + [1685673101.155812][2596:2598] CHIP:DMG: StatusIB = + [1685673101.155886][2596:2598] CHIP:DMG: { + [1685673101.155965][2596:2598] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673101.156041][2596:2598] CHIP:DMG: }, + [1685673101.156115][2596:2598] CHIP:DMG: + [1685673101.156183][2596:2598] CHIP:DMG: }, + [1685673101.156259][2596:2598] CHIP:DMG: + [1685673101.156321][2596:2598] CHIP:DMG: }, + [1685673101.156392][2596:2598] CHIP:DMG: + [1685673101.156447][2596:2598] CHIP:DMG: ], + [1685673101.156517][2596:2598] CHIP:DMG: + [1685673101.156573][2596:2598] CHIP:DMG: InteractionModelRevision = 1 + [1685673101.156629][2596:2598] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Week Day Schedule command to TH." + - label: "Step 4: DUT sends Set Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0b.Tx verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set user command response" on TH(lock-app): - - [1667211313.632817][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb6ce0 exchange 3349r - [1667211313.632935][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211313.632999][14571:14571] CHIP:DMG: { - [1667211313.633050][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211313.633118][14571:14571] CHIP:DMG: timedRequest = true, - [1667211313.633181][14571:14571] CHIP:DMG: InvokeRequests = - [1667211313.633266][14571:14571] CHIP:DMG: [ - [1667211313.633330][14571:14571] CHIP:DMG: CommandDataIB = - [1667211313.633416][14571:14571] CHIP:DMG: { - [1667211313.633493][14571:14571] CHIP:DMG: CommandPathIB = - [1667211313.633569][14571:14571] CHIP:DMG: { - [1667211313.633652][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211313.633742][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211313.633827][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211313.633911][14571:14571] CHIP:DMG: }, - [1667211313.633996][14571:14571] CHIP:DMG: - [1667211313.634072][14571:14571] CHIP:DMG: CommandFields = - [1667211313.634146][14571:14571] CHIP:DMG: { - [1667211313.634223][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211313.634310][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211313.634395][14571:14571] CHIP:DMG: 0x2 = "xxx" (3 chars), - [1667211313.634642][14571:14571] CHIP:DMG: 0x3 = 6452, - [1667211313.634737][14571:14571] CHIP:DMG: 0x4 = 1, - [1667211313.634825][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211313.634912][14571:14571] CHIP:DMG: 0x6 = 0, - [1667211313.634999][14571:14571] CHIP:DMG: }, - [1667211313.635076][14571:14571] CHIP:DMG: }, - [1667211313.635154][14571:14571] CHIP:DMG: - [1667211313.635214][14571:14571] CHIP:DMG: ], - [1667211313.635308][14571:14571] CHIP:DMG: - [1667211313.635370][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211313.635438][14571:14571] CHIP:DMG: }, - [1667211313.635604][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211313.635687][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211313.635757][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A - [1667211313.635871][14571:14571] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=1] - [1667211313.635973][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211313.636129][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=0] - [1667211313.636192][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211313.636259][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] - [1667211313.636314][14571:14571] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=1,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] - [1667211313.636472][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000008 priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001224D9D - [1667211313.636546][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=8,dataType=2,operation=0,nodeId=112233,fabricIndex=1] - [1667211313.636635][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211313.636707][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211313.636773][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211313.636882][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211313.637440][14571:14571] CHIP:EM: <<< [E:3349r M:159426207 (Ack:21932646)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211313.637557][14571:14571] CHIP:IN: (S) Sending msg 159426207 on secure session with LSID: 42469 - [1667211313.638273][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57086 | 159426207 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 59690 / Exchange = 3349] - [1667211313.638380][14571:14571] CHIP:DMG: Header Flags = - [1667211313.638438][14571:14571] CHIP:DMG: { - [1667211313.638582][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211313.638641][14571:14571] CHIP:DMG: { - [1667211313.638702][14571:14571] CHIP:DMG: AckMsg = 21932646 - [1667211313.638758][14571:14571] CHIP:DMG: NeedsAck = true - [1667211313.638813][14571:14571] CHIP:DMG: } - [1667211313.638886][14571:14571] CHIP:DMG: } - [1667211313.638941][14571:14571] CHIP:DMG: - [1667211313.639012][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211313.639068][14571:14571] CHIP:DMG: { - [1667211313.639122][14571:14571] CHIP:DMG: data = 002ae9009fa6800987cb170dddacb6284a68a6ee3dc78cfd2c746543af8c3d6fd34e7d4c464410f485ad79bee8a51210d97206d7a7df976224d60b27dff86c68c61c54fa - [1667211313.639182][14571:14571] CHIP:DMG: buffer_ptr = 187651867779072 - [1667211313.639237][14571:14571] CHIP:DMG: } - [1667211313.639289][14571:14571] CHIP:DMG: - [1667211313.639364][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211313.639423][14571:14571] CHIP:DMG: { - [1667211313.639477][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021a1835012400001818181824ff0118 - [1667211313.639533][14571:14571] CHIP:DMG: } - [1667211313.639586][14571:14571] CHIP:DMG: - [1667211313.639729][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211313.639793][14571:14571] CHIP:DMG: { - [1667211313.639852][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211313.639916][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211313.639993][14571:14571] CHIP:DMG: [ - [1667211313.640056][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211313.640152][14571:14571] CHIP:DMG: { - [1667211313.640229][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211313.640297][14571:14571] CHIP:DMG: { - [1667211313.640373][14571:14571] CHIP:DMG: CommandPathIB = - [1667211313.640461][14571:14571] CHIP:DMG: { - [1667211313.640550][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211313.640642][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211313.640731][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211313.640817][14571:14571] CHIP:DMG: }, - [1667211313.640912][14571:14571] CHIP:DMG: - [1667211313.640992][14571:14571] CHIP:DMG: StatusIB = - [1667211313.641079][14571:14571] CHIP:DMG: { - [1667211313.641166][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211313.641242][14571:14571] CHIP:DMG: }, - [1667211313.641325][14571:14571] CHIP:DMG: - [1667211313.641403][14571:14571] CHIP:DMG: }, - [1667211313.641490][14571:14571] CHIP:DMG: - - - ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 - - Verify the " Set Week Day Schedule command response" on TH(lock-app): - - [1667211357.823542][14571:14571] CHIP:EM: Handling via exchange: 24164r, Delegate: 0xaaaae921d988 - [1667211357.823695][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211357.823762][14571:14571] CHIP:DMG: { - [1667211357.823820][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211357.823905][14571:14571] CHIP:DMG: timedRequest = false, - [1667211357.823974][14571:14571] CHIP:DMG: InvokeRequests = - [1667211357.824069][14571:14571] CHIP:DMG: [ - [1667211357.824132][14571:14571] CHIP:DMG: CommandDataIB = - [1667211357.824212][14571:14571] CHIP:DMG: { - [1667211357.824287][14571:14571] CHIP:DMG: CommandPathIB = - [1667211357.824371][14571:14571] CHIP:DMG: { - [1667211357.824456][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211357.824543][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211357.824630][14571:14571] CHIP:DMG: CommandId = 0xb, - [1667211357.824711][14571:14571] CHIP:DMG: }, - [1667211357.824797][14571:14571] CHIP:DMG: - [1667211357.824873][14571:14571] CHIP:DMG: CommandFields = - [1667211357.824954][14571:14571] CHIP:DMG: { - [1667211357.825039][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211357.825128][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211357.825215][14571:14571] CHIP:DMG: 0x2 = 2, - [1667211357.825304][14571:14571] CHIP:DMG: 0x3 = 15, - [1667211357.825391][14571:14571] CHIP:DMG: 0x4 = 45, - [1667211357.825478][14571:14571] CHIP:DMG: 0x5 = 16, - [1667211357.825565][14571:14571] CHIP:DMG: 0x6 = 55, - [1667211357.825650][14571:14571] CHIP:DMG: }, - [1667211357.825727][14571:14571] CHIP:DMG: }, - [1667211357.825817][14571:14571] CHIP:DMG: - [1667211357.825879][14571:14571] CHIP:DMG: ], - [1667211357.825961][14571:14571] CHIP:DMG: - [1667211357.826022][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211357.826091][14571:14571] CHIP:DMG: }, - [1667211357.826251][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211357.826335][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211357.826406][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000B - [1667211357.826651][14571:14571] CHIP:ZCL: [SetWeekDaySchedule] Incoming command [endpointId=1] - [1667211357.826730][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211357.826783][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211357.826841][14571:14571] CHIP:ZCL: [SetWeekDaySchedule] Successfully created new schedule [endpointId=1,weekDayIndex=1,userIndex=1,daysMask=2,startTime="15:45",endTime="16:55"] - [1667211357.827112][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211357.827233][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000A priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x000000000122FA3C - [1667211357.827306][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=10,dataType=3,operation=0,nodeId=112233,fabricIndex=1] - [1667211357.827397][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211357.827469][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211357.827535][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211357.827646][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211357.828220][14571:14571] CHIP:EM: <<< [E:24164r M:225928839 (Ack:138362832)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211357.828335][14571:14571] CHIP:IN: (S) Sending msg 225928839 on secure session with LSID: 42470 - [1667211357.829055][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:60770 | 225928839 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 48632 / Exchange = 24164] - [1667211357.829162][14571:14571] CHIP:DMG: Header Flags = - [1667211357.829220][14571:14571] CHIP:DMG: { - [1667211357.829308][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211357.829365][14571:14571] CHIP:DMG: { - [1667211357.829426][14571:14571] CHIP:DMG: AckMsg = 138362832 - [1667211357.829481][14571:14571] CHIP:DMG: NeedsAck = true - [1667211357.829537][14571:14571] CHIP:DMG: } - [1667211357.829610][14571:14571] CHIP:DMG: } - [1667211357.829665][14571:14571] CHIP:DMG: - [1667211357.829735][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211357.829790][14571:14571] CHIP:DMG: { - [1667211357.829844][14571:14571] CHIP:DMG: data = 00f8bd008766770d5ff5b138aa7529b4c8c5d340bbf8e11c66b2c88685a99aafcda0992d87f56bac0dfd6e92f298871076d20895dec2f6a067cc6ed010f33bec9e8b99c7 - [1667211357.829903][14571:14571] CHIP:DMG: buffer_ptr = 187651867779584 - [1667211357.829957][14571:14571] CHIP:DMG: } - [1667211357.830009][14571:14571] CHIP:DMG: - [1667211357.830083][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211357.830139][14571:14571] CHIP:DMG: { - [1667211357.830193][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020b1835012400001818181824ff0118 - [1667211357.830249][14571:14571] CHIP:DMG: } - [1667211357.830303][14571:14571] CHIP:DMG: - [1667211357.830442][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211357.830578][14571:14571] CHIP:DMG: { - [1667211357.830639][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211357.830701][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211357.830779][14571:14571] CHIP:DMG: [ - [1667211357.830843][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211357.830936][14571:14571] CHIP:DMG: { - [1667211357.831011][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211357.831095][14571:14571] CHIP:DMG: { - [1667211357.831173][14571:14571] CHIP:DMG: CommandPathIB = - [1667211357.831262][14571:14571] CHIP:DMG: { - [1667211357.831351][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211357.831442][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211357.831531][14571:14571] CHIP:DMG: CommandId = 0xb, - [1667211357.831617][14571:14571] CHIP:DMG: }, - [1667211357.831713][14571:14571] CHIP:DMG: - [1667211357.831792][14571:14571] CHIP:DMG: StatusIB = - [1667211357.831879][14571:14571] CHIP:DMG: { - [1667211357.831966][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211357.832052][14571:14571] CHIP:DMG: }, - [1667211357.832139][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set user command with SUCCESS response on TH(lock-app) log: + + [1685673117.936503][2600:2602] CHIP:DMG: InvokeResponseMessage = + [1685673117.936560][2600:2602] CHIP:DMG: { + [1685673117.936615][2600:2602] CHIP:DMG: suppressResponse = false, + [1685673117.936672][2600:2602] CHIP:DMG: InvokeResponseIBs = + [1685673117.936747][2600:2602] CHIP:DMG: [ + [1685673117.936803][2600:2602] CHIP:DMG: InvokeResponseIB = + [1685673117.936880][2600:2602] CHIP:DMG: { + [1685673117.936941][2600:2602] CHIP:DMG: CommandStatusIB = + [1685673117.937029][2600:2602] CHIP:DMG: { + [1685673117.937106][2600:2602] CHIP:DMG: CommandPathIB = + [1685673117.937199][2600:2602] CHIP:DMG: { + [1685673117.937292][2600:2602] CHIP:DMG: EndpointId = 0x1, + [1685673117.937389][2600:2602] CHIP:DMG: ClusterId = 0x101, + [1685673117.937486][2600:2602] CHIP:DMG: CommandId = 0x1a, + [1685673117.937577][2600:2602] CHIP:DMG: }, + [1685673117.937680][2600:2602] CHIP:DMG: + [1685673117.937755][2600:2602] CHIP:DMG: StatusIB = + [1685673117.938008][2600:2602] CHIP:DMG: { + [1685673117.938101][2600:2602] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673117.938194][2600:2602] CHIP:DMG: }, + [1685673117.938286][2600:2602] CHIP:DMG: + [1685673117.938368][2600:2602] CHIP:DMG: }, + [1685673117.938462][2600:2602] CHIP:DMG: + [1685673117.938530][2600:2602] CHIP:DMG: }, + [1685673117.938610][2600:2602] CHIP:DMG: + [1685673117.938667][2600:2602] CHIP:DMG: ], + [1685673117.938737][2600:2602] CHIP:DMG: + [1685673117.938795][2600:2602] CHIP:DMG: InteractionModelRevision = 1 + [1685673117.938850][2600:2602] CHIP:DMG: }, + + + ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 --trace_decode 1 + + Verify TH receives Set Week Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673143.421323][2604:2606] CHIP:DMG: InvokeResponseMessage = + [1685673143.421380][2604:2606] CHIP:DMG: { + [1685673143.421437][2604:2606] CHIP:DMG: suppressResponse = false, + [1685673143.421495][2604:2606] CHIP:DMG: InvokeResponseIBs = + [1685673143.421569][2604:2606] CHIP:DMG: [ + [1685673143.421628][2604:2606] CHIP:DMG: InvokeResponseIB = + [1685673143.421705][2604:2606] CHIP:DMG: { + [1685673143.421893][2604:2606] CHIP:DMG: CommandStatusIB = + [1685673143.421975][2604:2606] CHIP:DMG: { + [1685673143.422043][2604:2606] CHIP:DMG: CommandPathIB = + [1685673143.422121][2604:2606] CHIP:DMG: { + [1685673143.422197][2604:2606] CHIP:DMG: EndpointId = 0x1, + [1685673143.422277][2604:2606] CHIP:DMG: ClusterId = 0x101, + [1685673143.422357][2604:2606] CHIP:DMG: CommandId = 0xb, + [1685673143.422432][2604:2606] CHIP:DMG: }, + [1685673143.422517][2604:2606] CHIP:DMG: + [1685673143.422586][2604:2606] CHIP:DMG: StatusIB = + [1685673143.422660][2604:2606] CHIP:DMG: { + [1685673143.422737][2604:2606] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673143.422812][2604:2606] CHIP:DMG: }, + [1685673143.422887][2604:2606] CHIP:DMG: + [1685673143.422954][2604:2606] CHIP:DMG: }, + [1685673143.423030][2604:2606] CHIP:DMG: + [1685673143.423092][2604:2606] CHIP:DMG: }, + [1685673143.423162][2604:2606] CHIP:DMG: + [1685673143.423218][2604:2606] CHIP:DMG: ], + [1685673143.423289][2604:2606] CHIP:DMG: + [1685673143.423345][2604:2606] CHIP:DMG: InteractionModelRevision = 1 + [1685673143.423400][2604:2606] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Week Day Schedule command to TH." + - label: "Step 5: DUT sends Get Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0c.Tx verification: | - ./chip-tool doorlock get-week-day-schedule 1 1 1 1 - Verify the " Get Week Day Schedule command response" on TH(lock-app): - - [1667211404.121594][14571:14571] CHIP:EM: Handling via exchange: 10434r, Delegate: 0xaaaae921d988 - [1667211404.121734][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211404.121802][14571:14571] CHIP:DMG: { - [1667211404.121860][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211404.121927][14571:14571] CHIP:DMG: timedRequest = false, - [1667211404.121989][14571:14571] CHIP:DMG: InvokeRequests = - [1667211404.122068][14571:14571] CHIP:DMG: [ - [1667211404.122130][14571:14571] CHIP:DMG: CommandDataIB = - [1667211404.122216][14571:14571] CHIP:DMG: { - [1667211404.122282][14571:14571] CHIP:DMG: CommandPathIB = - [1667211404.122364][14571:14571] CHIP:DMG: { - [1667211404.122454][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211404.122581][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211404.122664][14571:14571] CHIP:DMG: CommandId = 0xc, - [1667211404.122744][14571:14571] CHIP:DMG: }, - [1667211404.122829][14571:14571] CHIP:DMG: - [1667211404.122902][14571:14571] CHIP:DMG: CommandFields = - [1667211404.122988][14571:14571] CHIP:DMG: { - [1667211404.123081][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211404.123166][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211404.123258][14571:14571] CHIP:DMG: }, - [1667211404.123334][14571:14571] CHIP:DMG: }, - [1667211404.123571][14571:14571] CHIP:DMG: - [1667211404.123636][14571:14571] CHIP:DMG: ], - [1667211404.123713][14571:14571] CHIP:DMG: - [1667211404.123775][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211404.123835][14571:14571] CHIP:DMG: }, - [1667211404.123983][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211404.124063][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211404.124133][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000C - [1667211404.124228][14571:14571] CHIP:ZCL: [GetWeekDaySchedule] Incoming command [endpointId=1] - [1667211404.124301][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211404.124358][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211404.124458][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211404.124531][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211404.124606][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211404.124702][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211404.125221][14571:14571] CHIP:EM: <<< [E:10434r M:192211089 (Ack:49437871)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211404.125323][14571:14571] CHIP:IN: (S) Sending msg 192211089 on secure session with LSID: 42471 - [1667211404.125996][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:36739 | 192211089 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 33523 / Exchange = 10434] - [1667211404.126092][14571:14571] CHIP:DMG: Header Flags = - [1667211404.126150][14571:14571] CHIP:DMG: { - [1667211404.126236][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211404.126292][14571:14571] CHIP:DMG: { - [1667211404.126351][14571:14571] CHIP:DMG: AckMsg = 49437871 - [1667211404.126408][14571:14571] CHIP:DMG: NeedsAck = true - [1667211404.126502][14571:14571] CHIP:DMG: } - [1667211404.126579][14571:14571] CHIP:DMG: } - [1667211404.126634][14571:14571] CHIP:DMG: - [1667211404.126706][14571:14571] CHIP:DMG: Encrypted Payload (89 bytes) = - [1667211404.126763][14571:14571] CHIP:DMG: { - [1667211404.126817][14571:14571] CHIP:DMG: data = 00f3820091e8740b94f592d6a017afb3c95ba9c18b80cd20617f682c6fe32dc72a5322ffb153f012f26b3a9f3242b86b8ab628cb132daabfb95dccb48f51e3f41cd486658d56750a8e9fc74d74b63e1b824e31046265e0e2ec - [1667211404.126875][14571:14571] CHIP:DMG: buffer_ptr = 187651867783776 - [1667211404.126928][14571:14571] CHIP:DMG: } - [1667211404.126980][14571:14571] CHIP:DMG: - [1667211404.127053][14571:14571] CHIP:DMG: Decrypted Payload (55 bytes) = - [1667211404.127109][14571:14571] CHIP:DMG: { - [1667211404.127163][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124020c18350124000124010124020024030224040f24052d2406102407371818181824ff0118 - [1667211404.127218][14571:14571] CHIP:DMG: } - [1667211404.127269][14571:14571] CHIP:DMG: - [1667211404.127427][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211404.127491][14571:14571] CHIP:DMG: { - [1667211404.127550][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211404.127617][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211404.127700][14571:14571] CHIP:DMG: [ - [1667211404.127762][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211404.127856][14571:14571] CHIP:DMG: { - [1667211404.127935][14571:14571] CHIP:DMG: CommandDataIB = - [1667211404.128016][14571:14571] CHIP:DMG: { - [1667211404.128100][14571:14571] CHIP:DMG: CommandPathIB = - [1667211404.128187][14571:14571] CHIP:DMG: { - [1667211404.128282][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211404.128373][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211404.128469][14571:14571] CHIP:DMG: CommandId = 0xc, - [1667211404.128573][14571:14571] CHIP:DMG: }, - [1667211404.128670][14571:14571] CHIP:DMG: - [1667211404.128748][14571:14571] CHIP:DMG: CommandFields = - [1667211404.128831][14571:14571] CHIP:DMG: { - [1667211404.128919][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211404.129011][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211404.129110][14571:14571] CHIP:DMG: 0x2 = 0, - [1667211404.129203][14571:14571] CHIP:DMG: 0x3 = 2, - [1667211404.129294][14571:14571] CHIP:DMG: 0x4 = 15, - [1667211404.129385][14571:14571] CHIP:DMG: 0x5 = 45, - [1667211404.129468][14571:14571] CHIP:DMG: 0x6 = 16, - [1667211404.129557][14571:14571] CHIP:DMG: 0x7 = 55, - [1667211404.129645][14571:14571] CHIP:DMG: }, - [1667211404.129723][14571:14571] CHIP:DMG: }, - [1667211404.129816][14571:14571] CHIP:DMG: + ./chip-tool doorlock get-week-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Get Week Day Schedule command response on TH(lock-app) log: + + [1685673169.698639][2609:2611] CHIP:DMG: InvokeResponseMessage = + [1685673169.698694][2609:2611] CHIP:DMG: { + [1685673169.698748][2609:2611] CHIP:DMG: suppressResponse = false, + [1685673169.698804][2609:2611] CHIP:DMG: InvokeResponseIBs = + [1685673169.698882][2609:2611] CHIP:DMG: [ + [1685673169.698940][2609:2611] CHIP:DMG: InvokeResponseIB = + [1685673169.699023][2609:2611] CHIP:DMG: { + [1685673169.699083][2609:2611] CHIP:DMG: CommandDataIB = + [1685673169.699151][2609:2611] CHIP:DMG: { + [1685673169.699211][2609:2611] CHIP:DMG: CommandPathIB = + [1685673169.699288][2609:2611] CHIP:DMG: { + [1685673169.699363][2609:2611] CHIP:DMG: EndpointId = 0x1, + [1685673169.699443][2609:2611] CHIP:DMG: ClusterId = 0x101, + [1685673169.699521][2609:2611] CHIP:DMG: CommandId = 0xc, + [1685673169.699596][2609:2611] CHIP:DMG: }, + [1685673169.699787][2609:2611] CHIP:DMG: + [1685673169.699917][2609:2611] CHIP:DMG: CommandFields = + [1685673169.700000][2609:2611] CHIP:DMG: { + [1685673169.700080][2609:2611] CHIP:DMG: 0x0 = 1, + [1685673169.700162][2609:2611] CHIP:DMG: 0x1 = 1, + [1685673169.700243][2609:2611] CHIP:DMG: 0x2 = 0, + [1685673169.700324][2609:2611] CHIP:DMG: 0x3 = 2, + [1685673169.700451][2609:2611] CHIP:DMG: 0x4 = 15, + [1685673169.700535][2609:2611] CHIP:DMG: 0x5 = 45, + [1685673169.700616][2609:2611] CHIP:DMG: 0x6 = 16, + [1685673169.700697][2609:2611] CHIP:DMG: 0x7 = 55, + [1685673169.700835][2609:2611] CHIP:DMG: }, + [1685673169.700908][2609:2611] CHIP:DMG: }, + [1685673169.700991][2609:2611] CHIP:DMG: + [1685673169.701053][2609:2611] CHIP:DMG: }, + [1685673169.701130][2609:2611] CHIP:DMG: + [1685673169.701186][2609:2611] CHIP:DMG: ], + [1685673169.701265][2609:2611] CHIP:DMG: + [1685673169.701320][2609:2611] CHIP:DMG: InteractionModelRevision = 1 + [1685673169.701375][2609:2611] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Week Day Schedule command to TH." + - label: "Step 6: DUT sends Clear Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0d.Tx verification: | - ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 - - Verify the " Clear Week Day Schedule command response" on TH(lock-app): - - [1667211448.935869][14571:14571] CHIP:EM: Handling via exchange: 2355r, Delegate: 0xaaaae921d988 - [1667211448.936017][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211448.936083][14571:14571] CHIP:DMG: { - [1667211448.936142][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211448.936210][14571:14571] CHIP:DMG: timedRequest = false, - [1667211448.936272][14571:14571] CHIP:DMG: InvokeRequests = - [1667211448.936350][14571:14571] CHIP:DMG: [ - [1667211448.936413][14571:14571] CHIP:DMG: CommandDataIB = - [1667211448.936498][14571:14571] CHIP:DMG: { - [1667211448.936564][14571:14571] CHIP:DMG: CommandPathIB = - [1667211448.936750][14571:14571] CHIP:DMG: { - [1667211448.936837][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211448.936923][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211448.937009][14571:14571] CHIP:DMG: CommandId = 0xd, - [1667211448.937088][14571:14571] CHIP:DMG: }, - [1667211448.937180][14571:14571] CHIP:DMG: - [1667211448.937252][14571:14571] CHIP:DMG: CommandFields = - [1667211448.937331][14571:14571] CHIP:DMG: { - [1667211448.937414][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211448.937501][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211448.937594][14571:14571] CHIP:DMG: }, - [1667211448.937677][14571:14571] CHIP:DMG: }, - [1667211448.937841][14571:14571] CHIP:DMG: - [1667211448.937903][14571:14571] CHIP:DMG: ], - [1667211448.937980][14571:14571] CHIP:DMG: - [1667211448.938041][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211448.938167][14571:14571] CHIP:DMG: }, - [1667211448.938320][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211448.938402][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211448.938515][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000D - [1667211448.938615][14571:14571] CHIP:ZCL: [ClearWeekDaySchedule] Incoming command [endpointId=1] - [1667211448.938691][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211448.938751][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211448.938813][14571:14571] CHIP:ZCL: [ClearWeekDaySchedule] Clearing a single schedule [endpointId=1,weekDayIndex=1,userIndex=1] - [1667211448.939061][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211448.939291][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211448.939399][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000B priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001245E24 - [1667211448.939470][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=11,dataType=3,operation=1,nodeId=112233,fabricIndex=1] - [1667211448.939555][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211448.939624][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211448.939698][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211448.939809][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211448.940482][14571:14571] CHIP:EM: <<< [E:2355r M:241885754 (Ack:31150769)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211448.940588][14571:14571] CHIP:IN: (S) Sending msg 241885754 on secure session with LSID: 42472 - [1667211448.941253][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58359 | 241885754 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 11240 / Exchange = 2355] - [1667211448.941350][14571:14571] CHIP:DMG: Header Flags = - [1667211448.941407][14571:14571] CHIP:DMG: { - [1667211448.941493][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211448.941549][14571:14571] CHIP:DMG: { - [1667211448.941609][14571:14571] CHIP:DMG: AckMsg = 31150769 - [1667211448.941664][14571:14571] CHIP:DMG: NeedsAck = true - [1667211448.941723][14571:14571] CHIP:DMG: } - [1667211448.941795][14571:14571] CHIP:DMG: } - [1667211448.941850][14571:14571] CHIP:DMG: - [1667211448.941920][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211448.941976][14571:14571] CHIP:DMG: { - [1667211448.942030][14571:14571] CHIP:DMG: data = 00e82b003ae26a0e4e41b6938b7c3007a2f5809001a017eef891b1ca7c81e5972d8921a83124f8251ba290a524e27d796f33a69b7f792361c98e9cabfb6cab5ff5f3b243 - [1667211448.942089][14571:14571] CHIP:DMG: buffer_ptr = 187651867784272 - [1667211448.942142][14571:14571] CHIP:DMG: } - [1667211448.942194][14571:14571] CHIP:DMG: - [1667211448.942268][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211448.942326][14571:14571] CHIP:DMG: { - [1667211448.942372][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020d1835012400001818181824ff0118 - [1667211448.942431][14571:14571] CHIP:DMG: } - [1667211448.942528][14571:14571] CHIP:DMG: - [1667211448.942669][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211448.942733][14571:14571] CHIP:DMG: { - [1667211448.942792][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211448.942854][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211448.942932][14571:14571] CHIP:DMG: [ - [1667211448.942994][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211448.943085][14571:14571] CHIP:DMG: { - [1667211448.943157][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211448.943245][14571:14571] CHIP:DMG: { - [1667211448.943328][14571:14571] CHIP:DMG: CommandPathIB = - [1667211448.943414][14571:14571] CHIP:DMG: { - [1667211448.943501][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211448.943600][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211448.943696][14571:14571] CHIP:DMG: CommandId = 0xd, - [1667211448.943781][14571:14571] CHIP:DMG: }, - [1667211448.944016][14571:14571] CHIP:DMG: - [1667211448.944112][14571:14571] CHIP:DMG: StatusIB = - [1667211448.944198][14571:14571] CHIP:DMG: { - [1667211448.944281][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211448.944373][14571:14571] CHIP:DMG: }, - [1667211448.944618][14571:14571] CHIP:DMG: - [1667211448.944700][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Clear Week Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673196.080189][2614:2616] CHIP:DMG: InvokeResponseMessage = + [1685673196.080247][2614:2616] CHIP:DMG: { + [1685673196.080303][2614:2616] CHIP:DMG: suppressResponse = false, + [1685673196.080383][2614:2616] CHIP:DMG: InvokeResponseIBs = + [1685673196.080455][2614:2616] CHIP:DMG: [ + [1685673196.080533][2614:2616] CHIP:DMG: InvokeResponseIB = + [1685673196.080616][2614:2616] CHIP:DMG: { + [1685673196.080696][2614:2616] CHIP:DMG: CommandStatusIB = + [1685673196.080768][2614:2616] CHIP:DMG: { + [1685673196.080836][2614:2616] CHIP:DMG: CommandPathIB = + [1685673196.080933][2614:2616] CHIP:DMG: { + [1685673196.081030][2614:2616] CHIP:DMG: EndpointId = 0x1, + [1685673196.081112][2614:2616] CHIP:DMG: ClusterId = 0x101, + [1685673196.081213][2614:2616] CHIP:DMG: CommandId = 0xd, + [1685673196.081284][2614:2616] CHIP:DMG: }, + [1685673196.081362][2614:2616] CHIP:DMG: + [1685673196.081448][2614:2616] CHIP:DMG: StatusIB = + [1685673196.081519][2614:2616] CHIP:DMG: { + [1685673196.081616][2614:2616] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673196.081692][2614:2616] CHIP:DMG: }, + [1685673196.081822][2614:2616] CHIP:DMG: + [1685673196.081891][2614:2616] CHIP:DMG: }, + [1685673196.081991][2614:2616] CHIP:DMG: + [1685673196.082053][2614:2616] CHIP:DMG: }, + [1685673196.082125][2614:2616] CHIP:DMG: + [1685673196.082202][2614:2616] CHIP:DMG: ], + [1685673196.082276][2614:2616] CHIP:DMG: + [1685673196.082331][2614:2616] CHIP:DMG: InteractionModelRevision = 1 + [1685673196.082409][2614:2616] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Year Day Schedule command to TH." + - label: "Step 7: DUT sends Set Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0e.Tx verification: | - ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 - - Verify the " Set Year Day Schedule command response" on TH(lock-app): - - [1667211494.487800][14571:14571] CHIP:EM: Handling via exchange: 37849r, Delegate: 0xaaaae921d988 - [1667211494.487943][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211494.488009][14571:14571] CHIP:DMG: { - [1667211494.488068][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211494.488136][14571:14571] CHIP:DMG: timedRequest = false, - [1667211494.488189][14571:14571] CHIP:DMG: InvokeRequests = - [1667211494.488261][14571:14571] CHIP:DMG: [ - [1667211494.488322][14571:14571] CHIP:DMG: CommandDataIB = - [1667211494.488392][14571:14571] CHIP:DMG: { - [1667211494.488449][14571:14571] CHIP:DMG: CommandPathIB = - [1667211494.488530][14571:14571] CHIP:DMG: { - [1667211494.488610][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211494.488697][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211494.488789][14571:14571] CHIP:DMG: CommandId = 0xe, - [1667211494.488866][14571:14571] CHIP:DMG: }, - [1667211494.488935][14571:14571] CHIP:DMG: - [1667211494.488997][14571:14571] CHIP:DMG: CommandFields = - [1667211494.489073][14571:14571] CHIP:DMG: { - [1667211494.489164][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211494.489258][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211494.489346][14571:14571] CHIP:DMG: 0x2 = 1080, - [1667211494.489432][14571:14571] CHIP:DMG: 0x3 = 2100, - [1667211494.489515][14571:14571] CHIP:DMG: }, - [1667211494.489598][14571:14571] CHIP:DMG: }, - [1667211494.489677][14571:14571] CHIP:DMG: - [1667211494.489738][14571:14571] CHIP:DMG: ], - [1667211494.489817][14571:14571] CHIP:DMG: - [1667211494.489878][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211494.489938][14571:14571] CHIP:DMG: }, - [1667211494.490087][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211494.490168][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211494.490238][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000E - [1667211494.490337][14571:14571] CHIP:ZCL: [SetYearDaySchedule] incoming command [endpointId=1] - [1667211494.490416][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211494.490513][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211494.490582][14571:14571] CHIP:ZCL: [SetYearDaySchedule] Successfully created new schedule [endpointId=1,yearDayIndex=1,userIndex=1,localStartTime=1080,endTime=2100] - [1667211494.490876][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211494.491000][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000C priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001251014 - [1667211494.491071][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=12,dataType=4,operation=0,nodeId=112233,fabricIndex=1] - [1667211494.491154][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211494.491225][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211494.491290][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211494.491391][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211494.491904][14571:14571] CHIP:EM: <<< [E:37849r M:205769530 (Ack:228092562)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211494.492002][14571:14571] CHIP:IN: (S) Sending msg 205769530 on secure session with LSID: 42473 - [1667211494.492676][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57633 | 205769530 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 15669 / Exchange = 37849] - [1667211494.492774][14571:14571] CHIP:DMG: Header Flags = - [1667211494.492832][14571:14571] CHIP:DMG: { - [1667211494.492916][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211494.492973][14571:14571] CHIP:DMG: { - [1667211494.493034][14571:14571] CHIP:DMG: AckMsg = 228092562 - [1667211494.493089][14571:14571] CHIP:DMG: NeedsAck = true - [1667211494.493143][14571:14571] CHIP:DMG: } - [1667211494.493214][14571:14571] CHIP:DMG: } - [1667211494.493269][14571:14571] CHIP:DMG: - [1667211494.493338][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211494.493393][14571:14571] CHIP:DMG: { - [1667211494.493448][14571:14571] CHIP:DMG: data = 00353d003acb430cb14a36e0ff7070b026ff6e1c3237f6e9cec16bfa84f63d663fb6d14836cb4286655ff33661c8f2e1ccc8854598d894d8af2ac8bcd5d17a636f898b0a - [1667211494.493507][14571:14571] CHIP:DMG: buffer_ptr = 187651867778912 - [1667211494.493561][14571:14571] CHIP:DMG: } - [1667211494.493613][14571:14571] CHIP:DMG: - [1667211494.493687][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211494.493743][14571:14571] CHIP:DMG: { - [1667211494.493797][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020e1835012400001818181824ff0118 - [1667211494.493853][14571:14571] CHIP:DMG: } - [1667211494.493905][14571:14571] CHIP:DMG: - [1667211494.494038][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211494.494100][14571:14571] CHIP:DMG: { - [1667211494.494159][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211494.494228][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211494.494305][14571:14571] CHIP:DMG: [ - [1667211494.494368][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211494.494495][14571:14571] CHIP:DMG: { - [1667211494.494576][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211494.494652][14571:14571] CHIP:DMG: { - [1667211494.494739][14571:14571] CHIP:DMG: CommandPathIB = - [1667211494.494825][14571:14571] CHIP:DMG: { - [1667211494.494904][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211494.494993][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211494.495090][14571:14571] CHIP:DMG: CommandId = 0xe, - [1667211494.495183][14571:14571] CHIP:DMG: }, - [1667211494.495285][14571:14571] CHIP:DMG: - [1667211494.495363][14571:14571] CHIP:DMG: StatusIB = - [1667211494.495456][14571:14571] CHIP:DMG: { - [1667211494.495538][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211494.495620][14571:14571] CHIP:DMG: }, - [1667211494.495712][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 --trace_decode 1 + + Verify TH receives Set Year Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673212.614964][2617:2619] CHIP:DMG: InvokeResponseMessage = + [1685673212.615020][2617:2619] CHIP:DMG: { + [1685673212.615096][2617:2619] CHIP:DMG: suppressResponse = false, + [1685673212.615154][2617:2619] CHIP:DMG: InvokeResponseIBs = + [1685673212.615227][2617:2619] CHIP:DMG: [ + [1685673212.615306][2617:2619] CHIP:DMG: InvokeResponseIB = + [1685673212.615385][2617:2619] CHIP:DMG: { + [1685673212.615466][2617:2619] CHIP:DMG: CommandStatusIB = + [1685673212.615544][2617:2619] CHIP:DMG: { + [1685673212.615611][2617:2619] CHIP:DMG: CommandPathIB = + [1685673212.615707][2617:2619] CHIP:DMG: { + [1685673212.615784][2617:2619] CHIP:DMG: EndpointId = 0x1, + [1685673212.615884][2617:2619] CHIP:DMG: ClusterId = 0x101, + [1685673212.615962][2617:2619] CHIP:DMG: CommandId = 0xe, + [1685673212.616061][2617:2619] CHIP:DMG: }, + [1685673212.616147][2617:2619] CHIP:DMG: + [1685673212.616237][2617:2619] CHIP:DMG: StatusIB = + [1685673212.616314][2617:2619] CHIP:DMG: { + [1685673212.616411][2617:2619] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673212.616487][2617:2619] CHIP:DMG: }, + [1685673212.616583][2617:2619] CHIP:DMG: + [1685673212.616651][2617:2619] CHIP:DMG: }, + [1685673212.616747][2617:2619] CHIP:DMG: + [1685673212.616809][2617:2619] CHIP:DMG: }, + [1685673212.616902][2617:2619] CHIP:DMG: + [1685673212.616959][2617:2619] CHIP:DMG: ], + [1685673212.617030][2617:2619] CHIP:DMG: + [1685673212.617109][2617:2619] CHIP:DMG: InteractionModelRevision = 1 + [1685673212.617164][2617:2619] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Year Day Schedule command to TH." + - label: "Step 8: DUT sends Get Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0f.Tx verification: | - ./chip-tool doorlock get-year-day-schedule 1 1 1 1 - Verify the " Get Year Day Schedule command response" on TH(lock-app): - - [1667211532.778850][14571:14571] CHIP:EM: Handling via exchange: 12120r, Delegate: 0xaaaae921d988 - [1667211532.778992][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211532.779059][14571:14571] CHIP:DMG: { - [1667211532.779118][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211532.779186][14571:14571] CHIP:DMG: timedRequest = false, - [1667211532.779248][14571:14571] CHIP:DMG: InvokeRequests = - [1667211532.779327][14571:14571] CHIP:DMG: [ - [1667211532.779389][14571:14571] CHIP:DMG: CommandDataIB = - [1667211532.779525][14571:14571] CHIP:DMG: { - [1667211532.779598][14571:14571] CHIP:DMG: CommandPathIB = - [1667211532.779686][14571:14571] CHIP:DMG: { - [1667211532.779777][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211532.779863][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211532.779948][14571:14571] CHIP:DMG: CommandId = 0xf, - [1667211532.780034][14571:14571] CHIP:DMG: }, - [1667211532.780125][14571:14571] CHIP:DMG: - [1667211532.780198][14571:14571] CHIP:DMG: CommandFields = - [1667211532.780283][14571:14571] CHIP:DMG: { - [1667211532.780376][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211532.780461][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211532.780544][14571:14571] CHIP:DMG: }, - [1667211532.780620][14571:14571] CHIP:DMG: }, - [1667211532.780703][14571:14571] CHIP:DMG: - [1667211532.780765][14571:14571] CHIP:DMG: ], - [1667211532.780842][14571:14571] CHIP:DMG: - [1667211532.780903][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211532.780962][14571:14571] CHIP:DMG: }, - [1667211532.781108][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211532.781189][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211532.781265][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000F - [1667211532.781359][14571:14571] CHIP:ZCL: [GetYearDaySchedule] incoming command [endpointId=1] - [1667211532.781431][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211532.781489][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211532.781586][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211532.781661][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211532.781733][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211532.781829][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211532.782341][14571:14571] CHIP:EM: <<< [E:12120r M:78099733 (Ack:62886083)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211532.782443][14571:14571] CHIP:IN: (S) Sending msg 78099733 on secure session with LSID: 42474 - [1667211532.783159][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41963 | 78099733 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 7919 / Exchange = 12120] - [1667211532.783254][14571:14571] CHIP:DMG: Header Flags = - [1667211532.783313][14571:14571] CHIP:DMG: { - [1667211532.783398][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211532.783454][14571:14571] CHIP:DMG: { - [1667211532.783515][14571:14571] CHIP:DMG: AckMsg = 62886083 - [1667211532.783572][14571:14571] CHIP:DMG: NeedsAck = true - [1667211532.783627][14571:14571] CHIP:DMG: } - [1667211532.783699][14571:14571] CHIP:DMG: } - [1667211532.783754][14571:14571] CHIP:DMG: - [1667211532.783823][14571:14571] CHIP:DMG: Encrypted Payload (82 bytes) = - [1667211532.783880][14571:14571] CHIP:DMG: { - [1667211532.783935][14571:14571] CHIP:DMG: data = 00ef1e0015b5a704a740caf3d715e054ad0c711f8ae6048edfd44f4d07ca6ea35087aaf2af1719aaea0486393fd0e60d92f71bfac1c65bb64be4354999c51270bb8c2892b2c0155d9035c6be369c4553fb51 - [1667211532.783993][14571:14571] CHIP:DMG: buffer_ptr = 187651867784928 - [1667211532.784047][14571:14571] CHIP:DMG: } - [1667211532.784099][14571:14571] CHIP:DMG: - [1667211532.784174][14571:14571] CHIP:DMG: Decrypted Payload (48 bytes) = - [1667211532.784232][14571:14571] CHIP:DMG: { - [1667211532.784286][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124020f18350124000124010124020025033804250434081818181824ff0118 - [1667211532.784341][14571:14571] CHIP:DMG: } - [1667211532.784393][14571:14571] CHIP:DMG: - [1667211532.784545][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211532.784609][14571:14571] CHIP:DMG: { - [1667211532.784668][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211532.784731][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211532.784812][14571:14571] CHIP:DMG: [ - [1667211532.784874][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211532.784972][14571:14571] CHIP:DMG: { - [1667211532.785044][14571:14571] CHIP:DMG: CommandDataIB = - [1667211532.785125][14571:14571] CHIP:DMG: { - [1667211532.785209][14571:14571] CHIP:DMG: CommandPathIB = - [1667211532.785293][14571:14571] CHIP:DMG: { - [1667211532.785389][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211532.785479][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211532.785567][14571:14571] CHIP:DMG: CommandId = 0xf, - [1667211532.785652][14571:14571] CHIP:DMG: }, - [1667211532.785748][14571:14571] CHIP:DMG: - [1667211532.785826][14571:14571] CHIP:DMG: CommandFields = - [1667211532.785909][14571:14571] CHIP:DMG: { - [1667211532.785998][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211532.786091][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211532.786192][14571:14571] CHIP:DMG: 0x2 = 0, - [1667211532.786286][14571:14571] CHIP:DMG: 0x3 = 1080, - [1667211532.786377][14571:14571] CHIP:DMG: 0x4 = 2100, - [1667211532.786510][14571:14571] CHIP:DMG: }, - [1667211532.786604][14571:14571] CHIP:DMG: }, - [1667211532.786694][14571:14571] CHIP:DMG: - [1667211532.786763][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-year-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Get Year Day Schedule command response on TH(lock-app) log: + + [1685673233.319349][2622:2624] CHIP:DMG: InvokeResponseMessage = + [1685673233.319404][2622:2624] CHIP:DMG: { + [1685673233.319458][2622:2624] CHIP:DMG: suppressResponse = false, + [1685673233.319515][2622:2624] CHIP:DMG: InvokeResponseIBs = + [1685673233.319592][2622:2624] CHIP:DMG: [ + [1685673233.319648][2622:2624] CHIP:DMG: InvokeResponseIB = + [1685673233.319732][2622:2624] CHIP:DMG: { + [1685673233.319792][2622:2624] CHIP:DMG: CommandDataIB = + [1685673233.319863][2622:2624] CHIP:DMG: { + [1685673233.319987][2622:2624] CHIP:DMG: CommandPathIB = + [1685673233.320066][2622:2624] CHIP:DMG: { + [1685673233.320144][2622:2624] CHIP:DMG: EndpointId = 0x1, + [1685673233.320223][2622:2624] CHIP:DMG: ClusterId = 0x101, + [1685673233.320303][2622:2624] CHIP:DMG: CommandId = 0xf, + [1685673233.320379][2622:2624] CHIP:DMG: }, + [1685673233.320458][2622:2624] CHIP:DMG: + [1685673233.320524][2622:2624] CHIP:DMG: CommandFields = + [1685673233.320598][2622:2624] CHIP:DMG: { + [1685673233.320678][2622:2624] CHIP:DMG: 0x0 = 1, + [1685673233.320758][2622:2624] CHIP:DMG: 0x1 = 1, + [1685673233.320840][2622:2624] CHIP:DMG: 0x2 = 0, + [1685673233.320992][2622:2624] CHIP:DMG: 0x3 = 1080, + [1685673233.321075][2622:2624] CHIP:DMG: 0x4 = 2100, + [1685673233.321155][2622:2624] CHIP:DMG: }, + [1685673233.321226][2622:2624] CHIP:DMG: }, + [1685673233.321310][2622:2624] CHIP:DMG: + [1685673233.321372][2622:2624] CHIP:DMG: }, + [1685673233.321450][2622:2624] CHIP:DMG: + [1685673233.321506][2622:2624] CHIP:DMG: ], + [1685673233.321581][2622:2624] CHIP:DMG: + [1685673233.321637][2622:2624] CHIP:DMG: InteractionModelRevision = 1 + [1685673233.321691][2622:2624] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Year Day Schedule command to TH." + - label: "Step 9: DUT sends Clear Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C10.Tx verification: | - ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 - - Verify the " Clear Year Day Schedule command response" on TH(lock-app): - - [1667211637.529809][14571:14571] CHIP:EM: Handling via exchange: 14980r, Delegate: 0xaaaae921d988 - [1667211637.529968][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211637.530038][14571:14571] CHIP:DMG: { - [1667211637.530096][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211637.530165][14571:14571] CHIP:DMG: timedRequest = false, - [1667211637.530227][14571:14571] CHIP:DMG: InvokeRequests = - [1667211637.530398][14571:14571] CHIP:DMG: [ - [1667211637.530528][14571:14571] CHIP:DMG: CommandDataIB = - [1667211637.530621][14571:14571] CHIP:DMG: { - [1667211637.530696][14571:14571] CHIP:DMG: CommandPathIB = - [1667211637.530792][14571:14571] CHIP:DMG: { - [1667211637.530951][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211637.531047][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211637.531134][14571:14571] CHIP:DMG: CommandId = 0x10, - [1667211637.531215][14571:14571] CHIP:DMG: }, - [1667211637.531301][14571:14571] CHIP:DMG: - [1667211637.531376][14571:14571] CHIP:DMG: CommandFields = - [1667211637.531528][14571:14571] CHIP:DMG: { - [1667211637.531619][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211637.531707][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211637.531792][14571:14571] CHIP:DMG: }, - [1667211637.531869][14571:14571] CHIP:DMG: }, - [1667211637.531949][14571:14571] CHIP:DMG: - [1667211637.532076][14571:14571] CHIP:DMG: ], - [1667211637.532159][14571:14571] CHIP:DMG: - [1667211637.532221][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211637.532281][14571:14571] CHIP:DMG: }, - [1667211637.532432][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211637.532562][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211637.532641][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0010 - [1667211637.532740][14571:14571] CHIP:ZCL: [ClearYearDaySchedule] incoming command [endpointId=1] - [1667211637.532817][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211637.532876][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211637.532938][14571:14571] CHIP:ZCL: [ClearYearDaySchedule] Clearing a single schedule [endpointId=1,yearDayIndex=1,userIndex=1] - [1667211637.533279][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211637.533510][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000D priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001273ED6 - [1667211637.533661][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=13,dataType=4,operation=1,nodeId=112233,fabricIndex=1] - [1667211637.533753][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211637.533825][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211637.533892][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211637.533992][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211637.534698][14571:14571] CHIP:EM: <<< [E:14980r M:243667336 (Ack:259604243)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211637.534818][14571:14571] CHIP:IN: (S) Sending msg 243667336 on secure session with LSID: 42475 - [1667211637.535724][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45874 | 243667336 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 15557 / Exchange = 14980] - [1667211637.535838][14571:14571] CHIP:DMG: Header Flags = - [1667211637.535897][14571:14571] CHIP:DMG: { - [1667211637.535983][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211637.536039][14571:14571] CHIP:DMG: { - [1667211637.536099][14571:14571] CHIP:DMG: AckMsg = 259604243 - [1667211637.536214][14571:14571] CHIP:DMG: NeedsAck = true - [1667211637.536273][14571:14571] CHIP:DMG: } - [1667211637.536348][14571:14571] CHIP:DMG: } - [1667211637.536406][14571:14571] CHIP:DMG: - [1667211637.536478][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211637.536535][14571:14571] CHIP:DMG: { - [1667211637.536589][14571:14571] CHIP:DMG: data = 00c53c008811860eeaa7346eeaa0aa0f7aa2a8413b649ff90e7ceac0f5d73885c8ab946add1219da5c9b741175be6378f64be5dc820dc6717077dcea2505686ba36ec858 - [1667211637.536649][14571:14571] CHIP:DMG: buffer_ptr = 187651867781552 - [1667211637.536704][14571:14571] CHIP:DMG: } - [1667211637.536756][14571:14571] CHIP:DMG: - [1667211637.536832][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211637.536889][14571:14571] CHIP:DMG: { - [1667211637.536944][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402101835012400001818181824ff0118 - [1667211637.537000][14571:14571] CHIP:DMG: } - [1667211637.537053][14571:14571] CHIP:DMG: - [1667211637.537195][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211637.537261][14571:14571] CHIP:DMG: { - [1667211637.537321][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211637.537387][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211637.537476][14571:14571] CHIP:DMG: [ - [1667211637.537548][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211637.537640][14571:14571] CHIP:DMG: { - [1667211637.537717][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211637.537800][14571:14571] CHIP:DMG: { - [1667211637.537879][14571:14571] CHIP:DMG: CommandPathIB = - [1667211637.537966][14571:14571] CHIP:DMG: { - [1667211637.538116][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211637.538255][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211637.538353][14571:14571] CHIP:DMG: CommandId = 0x10, - [1667211637.538439][14571:14571] CHIP:DMG: }, - [1667211637.538573][14571:14571] CHIP:DMG: - [1667211637.538655][14571:14571] CHIP:DMG: StatusIB = - [1667211637.538745][14571:14571] CHIP:DMG: { - [1667211637.538833][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211637.539003][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Clear Year Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673250.141106][2626:2628] CHIP:DMG: InvokeResponseMessage = + [1685673250.141162][2626:2628] CHIP:DMG: { + [1685673250.141215][2626:2628] CHIP:DMG: suppressResponse = false, + [1685673250.141271][2626:2628] CHIP:DMG: InvokeResponseIBs = + [1685673250.141342][2626:2628] CHIP:DMG: [ + [1685673250.141399][2626:2628] CHIP:DMG: InvokeResponseIB = + [1685673250.141479][2626:2628] CHIP:DMG: { + [1685673250.141539][2626:2628] CHIP:DMG: CommandStatusIB = + [1685673250.141608][2626:2628] CHIP:DMG: { + [1685673250.141672][2626:2628] CHIP:DMG: CommandPathIB = + [1685673250.141746][2626:2628] CHIP:DMG: { + [1685673250.141871][2626:2628] CHIP:DMG: EndpointId = 0x1, + [1685673250.141952][2626:2628] CHIP:DMG: ClusterId = 0x101, + [1685673250.142031][2626:2628] CHIP:DMG: CommandId = 0x10, + [1685673250.142104][2626:2628] CHIP:DMG: }, + [1685673250.142189][2626:2628] CHIP:DMG: + [1685673250.142254][2626:2628] CHIP:DMG: StatusIB = + [1685673250.142325][2626:2628] CHIP:DMG: { + [1685673250.142402][2626:2628] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673250.142567][2626:2628] CHIP:DMG: }, + [1685673250.142648][2626:2628] CHIP:DMG: + [1685673250.142716][2626:2628] CHIP:DMG: }, + [1685673250.142794][2626:2628] CHIP:DMG: + [1685673250.142853][2626:2628] CHIP:DMG: }, + [1685673250.142924][2626:2628] CHIP:DMG: + [1685673250.143047][2626:2628] CHIP:DMG: ], + [1685673250.143123][2626:2628] CHIP:DMG: + [1685673250.143179][2626:2628] CHIP:DMG: InteractionModelRevision = 1 + [1685673250.143233][2626:2628] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Holiday Day Schedule command to TH." + - label: "Step 10: DUT sends Set Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C11.Tx verification: | - ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 - - Verify the " Set Holiday Day Schedule command response" on TH(lock-app): - - [1667211707.423203][14571:14571] CHIP:EM: Handling via exchange: 6587r, Delegate: 0xaaaae921d988 - [1667211707.423354][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211707.423425][14571:14571] CHIP:DMG: { - [1667211707.423483][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211707.423552][14571:14571] CHIP:DMG: timedRequest = false, - [1667211707.423614][14571:14571] CHIP:DMG: InvokeRequests = - [1667211707.423697][14571:14571] CHIP:DMG: [ - [1667211707.423760][14571:14571] CHIP:DMG: CommandDataIB = - [1667211707.423830][14571:14571] CHIP:DMG: { - [1667211707.423906][14571:14571] CHIP:DMG: CommandPathIB = - [1667211707.424000][14571:14571] CHIP:DMG: { - [1667211707.424084][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211707.424181][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211707.424276][14571:14571] CHIP:DMG: CommandId = 0x11, - [1667211707.424366][14571:14571] CHIP:DMG: }, - [1667211707.424451][14571:14571] CHIP:DMG: - [1667211707.424526][14571:14571] CHIP:DMG: CommandFields = - [1667211707.424599][14571:14571] CHIP:DMG: { - [1667211707.424683][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211707.424779][14571:14571] CHIP:DMG: 0x1 = 20, - [1667211707.424875][14571:14571] CHIP:DMG: 0x2 = 30, - [1667211707.424972][14571:14571] CHIP:DMG: 0x3 = 0, - [1667211707.425066][14571:14571] CHIP:DMG: }, - [1667211707.425141][14571:14571] CHIP:DMG: }, - [1667211707.425223][14571:14571] CHIP:DMG: - [1667211707.425284][14571:14571] CHIP:DMG: ], - [1667211707.425363][14571:14571] CHIP:DMG: - [1667211707.425426][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211707.425486][14571:14571] CHIP:DMG: }, - [1667211707.425638][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211707.425724][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211707.425795][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0011 - [1667211707.425896][14571:14571] CHIP:ZCL: [SetHolidaySchedule] incoming command [endpointId=1] - [1667211707.425968][14571:14571] CHIP:ZCL: [SetHolidaySchedule] Successfully created new schedule [endpointId=1,scheduleIndex=1,localStartTime=20,endTime=30,operatingMode=0] - [1667211707.426063][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211707.426140][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211707.426206][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211707.426312][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211707.427029][14571:14571] CHIP:EM: <<< [E:6587r M:141871130 (Ack:46197054)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211707.427151][14571:14571] CHIP:IN: (S) Sending msg 141871130 on secure session with LSID: 42476 - [1667211707.427859][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:56745 | 141871130 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 52494 / Exchange = 6587] - [1667211707.427970][14571:14571] CHIP:DMG: Header Flags = - [1667211707.428028][14571:14571] CHIP:DMG: { - [1667211707.428117][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211707.428175][14571:14571] CHIP:DMG: { - [1667211707.428236][14571:14571] CHIP:DMG: AckMsg = 46197054 - [1667211707.428293][14571:14571] CHIP:DMG: NeedsAck = true - [1667211707.428349][14571:14571] CHIP:DMG: } - [1667211707.428422][14571:14571] CHIP:DMG: } - [1667211707.428477][14571:14571] CHIP:DMG: - [1667211707.428549][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211707.428604][14571:14571] CHIP:DMG: { - [1667211707.428659][14571:14571] CHIP:DMG: data = 000ecd001ac8740883876a39fafcb7515825dc9e257cdbf2fd9ef315a8fd79948656d91add494ec43467039794fce340459a130d6b898f4739f604877bca68a1fa18ba5b - [1667211707.428719][14571:14571] CHIP:DMG: buffer_ptr = 187651867783392 - [1667211707.428773][14571:14571] CHIP:DMG: } - [1667211707.428825][14571:14571] CHIP:DMG: - [1667211707.428902][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211707.428959][14571:14571] CHIP:DMG: { - [1667211707.429013][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402111835012400001818181824ff0118 - [1667211707.429069][14571:14571] CHIP:DMG: } - [1667211707.429121][14571:14571] CHIP:DMG: - [1667211707.429270][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211707.429336][14571:14571] CHIP:DMG: { - [1667211707.429396][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211707.429466][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211707.429545][14571:14571] CHIP:DMG: [ - [1667211707.429616][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211707.429708][14571:14571] CHIP:DMG: { - [1667211707.429784][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211707.429867][14571:14571] CHIP:DMG: { - [1667211707.429946][14571:14571] CHIP:DMG: CommandPathIB = - [1667211707.430032][14571:14571] CHIP:DMG: { - [1667211707.430112][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211707.430203][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211707.430294][14571:14571] CHIP:DMG: CommandId = 0x11, - [1667211707.430380][14571:14571] CHIP:DMG: }, - [1667211707.430525][14571:14571] CHIP:DMG: - [1667211707.430593][14571:14571] CHIP:DMG: StatusIB = - [1667211707.430682][14571:14571] CHIP:DMG: { - [1667211707.430761][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211707.430845][14571:14571] CHIP:DMG: }, - [1667211707.430932][14571:14571] CHIP:DMG: - [1667211707.431010][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 --trace_decode 1 + + Verify TH receives Set Holiday Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673266.868536][2630:2632] CHIP:DMG: InvokeResponseMessage = + [1685673266.868592][2630:2632] CHIP:DMG: { + [1685673266.868645][2630:2632] CHIP:DMG: suppressResponse = false, + [1685673266.868772][2630:2632] CHIP:DMG: InvokeResponseIBs = + [1685673266.868851][2630:2632] CHIP:DMG: [ + [1685673266.868908][2630:2632] CHIP:DMG: InvokeResponseIB = + [1685673266.868985][2630:2632] CHIP:DMG: { + [1685673266.869181][2630:2632] CHIP:DMG: CommandStatusIB = + [1685673266.869255][2630:2632] CHIP:DMG: { + [1685673266.869323][2630:2632] CHIP:DMG: CommandPathIB = + [1685673266.869399][2630:2632] CHIP:DMG: { + [1685673266.869475][2630:2632] CHIP:DMG: EndpointId = 0x1, + [1685673266.869554][2630:2632] CHIP:DMG: ClusterId = 0x101, + [1685673266.869632][2630:2632] CHIP:DMG: CommandId = 0x11, + [1685673266.869708][2630:2632] CHIP:DMG: }, + [1685673266.869819][2630:2632] CHIP:DMG: + [1685673266.869887][2630:2632] CHIP:DMG: StatusIB = + [1685673266.869965][2630:2632] CHIP:DMG: { + [1685673266.870041][2630:2632] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673266.870115][2630:2632] CHIP:DMG: }, + [1685673266.870190][2630:2632] CHIP:DMG: + [1685673266.870256][2630:2632] CHIP:DMG: }, + [1685673266.870332][2630:2632] CHIP:DMG: + [1685673266.870392][2630:2632] CHIP:DMG: }, + [1685673266.870463][2630:2632] CHIP:DMG: + [1685673266.870518][2630:2632] CHIP:DMG: ], + [1685673266.870589][2630:2632] CHIP:DMG: + [1685673266.870644][2630:2632] CHIP:DMG: InteractionModelRevision = 1 + [1685673266.870698][2630:2632] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Holiday Day Schedule command to TH." + - label: "Step 11: DUT sends Get Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C12.Tx verification: | - ./chip-tool doorlock get-holiday-schedule 1 1 1 - Verify the " Get Holiday Day Schedule command response" on TH(lock-app): - - [1667211742.709524][14571:14571] CHIP:EM: Handling via exchange: 38714r, Delegate: 0xaaaae921d988 - [1667211742.709668][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211742.709734][14571:14571] CHIP:DMG: { - [1667211742.709793][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211742.709860][14571:14571] CHIP:DMG: timedRequest = false, - [1667211742.709922][14571:14571] CHIP:DMG: InvokeRequests = - [1667211742.710001][14571:14571] CHIP:DMG: [ - [1667211742.710064][14571:14571] CHIP:DMG: CommandDataIB = - [1667211742.710152][14571:14571] CHIP:DMG: { - [1667211742.710219][14571:14571] CHIP:DMG: CommandPathIB = - [1667211742.710299][14571:14571] CHIP:DMG: { - [1667211742.710393][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211742.710535][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211742.710626][14571:14571] CHIP:DMG: CommandId = 0x12, - [1667211742.710708][14571:14571] CHIP:DMG: }, - [1667211742.710795][14571:14571] CHIP:DMG: - [1667211742.710870][14571:14571] CHIP:DMG: CommandFields = - [1667211742.710954][14571:14571] CHIP:DMG: { - [1667211742.711038][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211742.711123][14571:14571] CHIP:DMG: }, - [1667211742.711199][14571:14571] CHIP:DMG: }, - [1667211742.711282][14571:14571] CHIP:DMG: - [1667211742.711344][14571:14571] CHIP:DMG: ], - [1667211742.711420][14571:14571] CHIP:DMG: - [1667211742.711482][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211742.711550][14571:14571] CHIP:DMG: }, - [1667211742.711700][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211742.711786][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211742.711857][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0012 - [1667211742.711949][14571:14571] CHIP:ZCL: [GetHolidaySchedule] incoming command [endpointId=1,scheduleIndex=1] - [1667211742.712058][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211742.712136][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211742.712212][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211742.712313][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211742.712884][14571:14571] CHIP:EM: <<< [E:38714r M:217769022 (Ack:72006590)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211742.713000][14571:14571] CHIP:IN: (S) Sending msg 217769022 on secure session with LSID: 42477 - [1667211742.713730][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42495 | 217769022 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 43164 / Exchange = 38714] - [1667211742.713839][14571:14571] CHIP:DMG: Header Flags = - [1667211742.713897][14571:14571] CHIP:DMG: { - [1667211742.713984][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211742.714041][14571:14571] CHIP:DMG: { - [1667211742.714100][14571:14571] CHIP:DMG: AckMsg = 72006590 - [1667211742.714156][14571:14571] CHIP:DMG: NeedsAck = true - [1667211742.714211][14571:14571] CHIP:DMG: } - [1667211742.714282][14571:14571] CHIP:DMG: } - [1667211742.714338][14571:14571] CHIP:DMG: - [1667211742.714408][14571:14571] CHIP:DMG: Encrypted Payload (80 bytes) = - [1667211742.714499][14571:14571] CHIP:DMG: { - [1667211742.714549][14571:14571] CHIP:DMG: data = 009ca8003ee4fa0c05b5050915a00e700c42ff1b08f8a62ab1db574b6ebbc1852a7ae3507f40755a233da2901f3ed7a2532594a9afc58d9fbab37ec8da7f61abdcc269bd3768f58e41ce129c784aa36b - [1667211742.714607][14571:14571] CHIP:DMG: buffer_ptr = 187651867787856 - [1667211742.714661][14571:14571] CHIP:DMG: } - [1667211742.714714][14571:14571] CHIP:DMG: - [1667211742.714794][14571:14571] CHIP:DMG: Decrypted Payload (46 bytes) = - [1667211742.714852][14571:14571] CHIP:DMG: { - [1667211742.714907][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124021218350124000124010024021424031e2404001818181824ff0118 - [1667211742.714963][14571:14571] CHIP:DMG: } - [1667211742.715014][14571:14571] CHIP:DMG: - [1667211742.715173][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211742.715240][14571:14571] CHIP:DMG: { - [1667211742.715300][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211742.715362][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211742.715443][14571:14571] CHIP:DMG: [ - [1667211742.715505][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211742.715603][14571:14571] CHIP:DMG: { - [1667211742.715671][14571:14571] CHIP:DMG: CommandDataIB = - [1667211742.715753][14571:14571] CHIP:DMG: { - [1667211742.715830][14571:14571] CHIP:DMG: CommandPathIB = - [1667211742.715917][14571:14571] CHIP:DMG: { - [1667211742.716005][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211742.716097][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211742.716187][14571:14571] CHIP:DMG: CommandId = 0x12, - [1667211742.716272][14571:14571] CHIP:DMG: }, - [1667211742.716361][14571:14571] CHIP:DMG: - [1667211742.716441][14571:14571] CHIP:DMG: CommandFields = - [1667211742.716526][14571:14571] CHIP:DMG: { - [1667211742.716615][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211742.716708][14571:14571] CHIP:DMG: 0x1 = 0, - [1667211742.716800][14571:14571] CHIP:DMG: 0x2 = 20, - [1667211742.716892][14571:14571] CHIP:DMG: 0x3 = 30, - [1667211742.716982][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211742.717071][14571:14571] CHIP:DMG: }, - [1667211742.717152][14571:14571] CHIP:DMG: }, - [1667211742.717244][14571:14571] CHIP:DMG: - [1667211742.717318][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-holiday-schedule 1 1 1 --trace_decode 1 + + Verify TH receives Get Holiday Day Schedule command response on TH(lock-app) log: + + [1685673297.404334][2637:2639] CHIP:DMG: InvokeResponseMessage = + [1685673297.404389][2637:2639] CHIP:DMG: { + [1685673297.404442][2637:2639] CHIP:DMG: suppressResponse = false, + [1685673297.404499][2637:2639] CHIP:DMG: InvokeResponseIBs = + [1685673297.404575][2637:2639] CHIP:DMG: [ + [1685673297.404632][2637:2639] CHIP:DMG: InvokeResponseIB = + [1685673297.404716][2637:2639] CHIP:DMG: { + [1685673297.404776][2637:2639] CHIP:DMG: CommandDataIB = + [1685673297.404848][2637:2639] CHIP:DMG: { + [1685673297.404915][2637:2639] CHIP:DMG: CommandPathIB = + [1685673297.404997][2637:2639] CHIP:DMG: { + [1685673297.405075][2637:2639] CHIP:DMG: EndpointId = 0x1, + [1685673297.405155][2637:2639] CHIP:DMG: ClusterId = 0x101, + [1685673297.405233][2637:2639] CHIP:DMG: CommandId = 0x12, + [1685673297.405307][2637:2639] CHIP:DMG: }, + [1685673297.405385][2637:2639] CHIP:DMG: + [1685673297.405451][2637:2639] CHIP:DMG: CommandFields = + [1685673297.405524][2637:2639] CHIP:DMG: { + [1685673297.405602][2637:2639] CHIP:DMG: 0x0 = 1, + [1685673297.405683][2637:2639] CHIP:DMG: 0x1 = 0, + [1685673297.405803][2637:2639] CHIP:DMG: 0x2 = 20, + [1685673297.405889][2637:2639] CHIP:DMG: 0x3 = 30, + [1685673297.405970][2637:2639] CHIP:DMG: 0x4 = 0, + [1685673297.406051][2637:2639] CHIP:DMG: }, + [1685673297.406122][2637:2639] CHIP:DMG: }, + [1685673297.406202][2637:2639] CHIP:DMG: + [1685673297.406262][2637:2639] CHIP:DMG: }, + [1685673297.406336][2637:2639] CHIP:DMG: + [1685673297.406391][2637:2639] CHIP:DMG: ], + [1685673297.406467][2637:2639] CHIP:DMG: + [1685673297.406524][2637:2639] CHIP:DMG: InteractionModelRevision = 1 + [1685673297.406578][2637:2639] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Holiday Day Schedule command to TH." + - label: "Step 12: DUT sends Clear Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C13.Tx verification: | - ./chip-tool doorlock clear-holiday-schedule 1 1 1 - - Verify the " Clear Holiday Day Schedule command response" on TH(lock-app): - - [1667211787.307489][14571:14571] CHIP:EM: Handling via exchange: 25611r, Delegate: 0xaaaae921d988 - [1667211787.307637][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211787.307705][14571:14571] CHIP:DMG: { - [1667211787.307764][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211787.307832][14571:14571] CHIP:DMG: timedRequest = false, - [1667211787.307894][14571:14571] CHIP:DMG: InvokeRequests = - [1667211787.307972][14571:14571] CHIP:DMG: [ - [1667211787.308035][14571:14571] CHIP:DMG: CommandDataIB = - [1667211787.308122][14571:14571] CHIP:DMG: { - [1667211787.308191][14571:14571] CHIP:DMG: CommandPathIB = - [1667211787.308268][14571:14571] CHIP:DMG: { - [1667211787.308344][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211787.308427][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211787.308506][14571:14571] CHIP:DMG: CommandId = 0x13, - [1667211787.308581][14571:14571] CHIP:DMG: }, - [1667211787.308659][14571:14571] CHIP:DMG: - [1667211787.308728][14571:14571] CHIP:DMG: CommandFields = - [1667211787.308802][14571:14571] CHIP:DMG: { - [1667211787.308880][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211787.308960][14571:14571] CHIP:DMG: }, - [1667211787.309029][14571:14571] CHIP:DMG: }, - [1667211787.309106][14571:14571] CHIP:DMG: - [1667211787.309168][14571:14571] CHIP:DMG: ], - [1667211787.309246][14571:14571] CHIP:DMG: - [1667211787.309307][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211787.309368][14571:14571] CHIP:DMG: }, - [1667211787.309516][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211787.309599][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211787.309669][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0013 - [1667211787.309763][14571:14571] CHIP:ZCL: [ClearHolidaySchedule] incoming command [endpointId=1,scheduleIndex=1] - [1667211787.309829][14571:14571] CHIP:ZCL: [ClearHolidaySchedule] Clearing a single schedule [endpointId=1,scheduleIndex=1] - [1667211787.309922][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211787.310000][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211787.310066][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211787.310163][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211787.310776][14571:14571] CHIP:EM: <<< [E:25611r M:114718972 (Ack:218140067)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211787.310903][14571:14571] CHIP:IN: (S) Sending msg 114718972 on secure session with LSID: 42478 - [1667211787.311632][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:35083 | 114718972 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 27711 / Exchange = 25611] - [1667211787.311742][14571:14571] CHIP:DMG: Header Flags = - [1667211787.311800][14571:14571] CHIP:DMG: { - [1667211787.311889][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211787.311946][14571:14571] CHIP:DMG: { - [1667211787.312006][14571:14571] CHIP:DMG: AckMsg = 218140067 - [1667211787.312062][14571:14571] CHIP:DMG: NeedsAck = true - [1667211787.312116][14571:14571] CHIP:DMG: } - [1667211787.312189][14571:14571] CHIP:DMG: } - [1667211787.312244][14571:14571] CHIP:DMG: - [1667211787.312316][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211787.312373][14571:14571] CHIP:DMG: { - [1667211787.312428][14571:14571] CHIP:DMG: data = 003f6c00fc78d606e3b655ee6709d33b35127a3996e9e1a569719a760c862827ac396295caa9b2fd9155c97ad96a37737f8fc1cb655df09ece1d56a290d3c7a1733985bf - [1667211787.312486][14571:14571] CHIP:DMG: buffer_ptr = 187651867785648 - [1667211787.312539][14571:14571] CHIP:DMG: } - [1667211787.312592][14571:14571] CHIP:DMG: - [1667211787.312667][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211787.312724][14571:14571] CHIP:DMG: { - [1667211787.312779][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402131835012400001818181824ff0118 - [1667211787.312834][14571:14571] CHIP:DMG: } - [1667211787.312886][14571:14571] CHIP:DMG: - [1667211787.313028][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211787.313094][14571:14571] CHIP:DMG: { - [1667211787.313153][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211787.313216][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211787.313295][14571:14571] CHIP:DMG: [ - [1667211787.313455][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211787.313555][14571:14571] CHIP:DMG: { - [1667211787.313631][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211787.313714][14571:14571] CHIP:DMG: { - [1667211787.313792][14571:14571] CHIP:DMG: CommandPathIB = - [1667211787.313879][14571:14571] CHIP:DMG: { - [1667211787.313968][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211787.314062][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211787.314147][14571:14571] CHIP:DMG: CommandId = 0x13, - [1667211787.314231][14571:14571] CHIP:DMG: }, - [1667211787.314327][14571:14571] CHIP:DMG: - [1667211787.314401][14571:14571] CHIP:DMG: StatusIB = - [1667211787.314525][14571:14571] CHIP:DMG: { - [1667211787.314617][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211787.314702][14571:14571] CHIP:DMG: }, - [1667211787.314790][14571:14571] CHIP:DMG: - [1667211787.314868][14571:14571] CHIP:DMG: }, - [1667211787.314958][14571:14571] CHIP:DMG: + ./chip-tool doorlock clear-holiday-schedule 1 1 1 --trace_decode 1 + + Verify TH receives Clear Holiday Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673314.255117][2642:2644] CHIP:DMG: InvokeResponseMessage = + [1685673314.255174][2642:2644] CHIP:DMG: { + [1685673314.255230][2642:2644] CHIP:DMG: suppressResponse = false, + [1685673314.255286][2642:2644] CHIP:DMG: InvokeResponseIBs = + [1685673314.255360][2642:2644] CHIP:DMG: [ + [1685673314.255417][2642:2644] CHIP:DMG: InvokeResponseIB = + [1685673314.255494][2642:2644] CHIP:DMG: { + [1685673314.255553][2642:2644] CHIP:DMG: CommandStatusIB = + [1685673314.255625][2642:2644] CHIP:DMG: { + [1685673314.255690][2642:2644] CHIP:DMG: CommandPathIB = + [1685673314.255765][2642:2644] CHIP:DMG: { + [1685673314.255840][2642:2644] CHIP:DMG: EndpointId = 0x1, + [1685673314.255919][2642:2644] CHIP:DMG: ClusterId = 0x101, + [1685673314.255996][2642:2644] CHIP:DMG: CommandId = 0x13, + [1685673314.256071][2642:2644] CHIP:DMG: }, + [1685673314.256154][2642:2644] CHIP:DMG: + [1685673314.256219][2642:2644] CHIP:DMG: StatusIB = + [1685673314.256293][2642:2644] CHIP:DMG: { + [1685673314.256371][2642:2644] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673314.256446][2642:2644] CHIP:DMG: }, + [1685673314.256521][2642:2644] CHIP:DMG: + [1685673314.256589][2642:2644] CHIP:DMG: }, + [1685673314.256665][2642:2644] CHIP:DMG: + [1685673314.256724][2642:2644] CHIP:DMG: }, + [1685673314.256796][2642:2644] CHIP:DMG: + [1685673314.256851][2642:2644] CHIP:DMG: ], + [1685673314.256921][2642:2644] CHIP:DMG: + [1685673314.256976][2642:2644] CHIP:DMG: InteractionModelRevision = 1 + [1685673314.257030][2642:2644] CHIP:DMG: }, disabled: true - - label: "DUT sends Set USer command to TH." + - label: "Step 13: DUT sends Set USer command to TH." PICS: DRLK.C.F08 && DRLK.C.C1a.Tx verification: | - ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set User Day Schedule command response" on TH(lock-app): - - - [1667211828.350127][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb8800 exchange 25908r - [1667211828.350237][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211828.350300][14571:14571] CHIP:DMG: { - [1667211828.350359][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211828.350441][14571:14571] CHIP:DMG: timedRequest = true, - [1667211828.350539][14571:14571] CHIP:DMG: InvokeRequests = - [1667211828.350625][14571:14571] CHIP:DMG: [ - [1667211828.350688][14571:14571] CHIP:DMG: CommandDataIB = - [1667211828.350762][14571:14571] CHIP:DMG: { - [1667211828.350833][14571:14571] CHIP:DMG: CommandPathIB = - [1667211828.350923][14571:14571] CHIP:DMG: { - [1667211828.351013][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211828.351101][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211828.351184][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211828.351263][14571:14571] CHIP:DMG: }, - [1667211828.351348][14571:14571] CHIP:DMG: - [1667211828.351420][14571:14571] CHIP:DMG: CommandFields = - [1667211828.351507][14571:14571] CHIP:DMG: { - [1667211828.351591][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211828.351678][14571:14571] CHIP:DMG: 0x1 = 2, - [1667211828.351768][14571:14571] CHIP:DMG: 0x2 = "xxx" (3 chars), - [1667211828.351854][14571:14571] CHIP:DMG: 0x3 = 6452, - [1667211828.351937][14571:14571] CHIP:DMG: 0x4 = 1, - [1667211828.352030][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211828.352110][14571:14571] CHIP:DMG: 0x6 = 0, - [1667211828.352200][14571:14571] CHIP:DMG: }, - [1667211828.352276][14571:14571] CHIP:DMG: }, - [1667211828.352365][14571:14571] CHIP:DMG: - [1667211828.352431][14571:14571] CHIP:DMG: ], - [1667211828.352513][14571:14571] CHIP:DMG: - [1667211828.352574][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211828.352639][14571:14571] CHIP:DMG: }, - [1667211828.352798][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211828.352880][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211828.352951][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A - [1667211828.353062][14571:14571] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=2] - [1667211828.353158][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211828.353217][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=1] - [1667211828.353274][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211828.353339][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] - [1667211828.353394][14571:14571] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=2,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] - [1667211828.353658][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211828.353774][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000E priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012A283B - [1667211828.353846][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=14,dataType=2,operation=0,nodeId=112233,fabricIndex=1] - [1667211828.353927][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211828.353998][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211828.354064][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211828.354171][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211828.354752][14571:14571] CHIP:EM: <<< [E:25908r M:105981261 (Ack:215468925)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211828.354873][14571:14571] CHIP:IN: (S) Sending msg 105981261 on secure session with LSID: 42479 - [1667211828.355593][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be36%eth0]:52743 | 105981261 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 33094 / Exchange = 25908] - [1667211828.355693][14571:14571] CHIP:DMG: Header Flags = - [1667211828.355751][14571:14571] CHIP:DMG: { - [1667211828.355836][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211828.355892][14571:14571] CHIP:DMG: { - [1667211828.355952][14571:14571] CHIP:DMG: AckMsg = 215468925 - [1667211828.356008][14571:14571] CHIP:DMG: NeedsAck = true - [1667211828.356063][14571:14571] CHIP:DMG: } - [1667211828.356135][14571:14571] CHIP:DMG: } - [1667211828.356190][14571:14571] CHIP:DMG: - [1667211828.356259][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211828.356314][14571:14571] CHIP:DMG: { - [1667211828.356368][14571:14571] CHIP:DMG: data = 004681004d25510615e510adc14313c57546ef359826b0af979dc7b60feb4478daae99e22008da3fee31ac2373454c2f6faa68a567e122cad9469bb7dd72cfbad9470482 - [1667211828.356426][14571:14571] CHIP:DMG: buffer_ptr = 187651867783264 - [1667211828.356480][14571:14571] CHIP:DMG: } - [1667211828.356532][14571:14571] CHIP:DMG: - [1667211828.356606][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211828.356663][14571:14571] CHIP:DMG: { - [1667211828.356717][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021a1835012400001818181824ff0118 - [1667211828.356773][14571:14571] CHIP:DMG: } - [1667211828.356824][14571:14571] CHIP:DMG: - [1667211828.356962][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211828.357025][14571:14571] CHIP:DMG: { - [1667211828.357084][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211828.357153][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211828.357231][14571:14571] CHIP:DMG: [ - [1667211828.357294][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211828.357381][14571:14571] CHIP:DMG: { - [1667211828.357453][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211828.357539][14571:14571] CHIP:DMG: { - [1667211828.357623][14571:14571] CHIP:DMG: CommandPathIB = - [1667211828.357709][14571:14571] CHIP:DMG: { - [1667211828.357803][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211828.357894][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211828.357990][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211828.358085][14571:14571] CHIP:DMG: }, - [1667211828.358189][14571:14571] CHIP:DMG: - [1667211828.358268][14571:14571] CHIP:DMG: StatusIB = - [1667211828.358352][14571:14571] CHIP:DMG: { - [1667211828.358439][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211828.358631][14571:14571] CHIP:DMG: }, - [1667211828.358727][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set User command with SUCCESS response on TH(lock-app) log: + + [1685673332.573601][2645:2647] CHIP:DMG: InvokeResponseMessage = + [1685673332.573656][2645:2647] CHIP:DMG: { + [1685673332.573709][2645:2647] CHIP:DMG: suppressResponse = false, + [1685673332.573902][2645:2647] CHIP:DMG: InvokeResponseIBs = + [1685673332.573982][2645:2647] CHIP:DMG: [ + [1685673332.574040][2645:2647] CHIP:DMG: InvokeResponseIB = + [1685673332.574116][2645:2647] CHIP:DMG: { + [1685673332.574175][2645:2647] CHIP:DMG: CommandStatusIB = + [1685673332.574245][2645:2647] CHIP:DMG: { + [1685673332.574312][2645:2647] CHIP:DMG: CommandPathIB = + [1685673332.574390][2645:2647] CHIP:DMG: { + [1685673332.574466][2645:2647] CHIP:DMG: EndpointId = 0x1, + [1685673332.574545][2645:2647] CHIP:DMG: ClusterId = 0x101, + [1685673332.574623][2645:2647] CHIP:DMG: CommandId = 0x1a, + [1685673332.574697][2645:2647] CHIP:DMG: }, + [1685673332.574780][2645:2647] CHIP:DMG: + [1685673332.574848][2645:2647] CHIP:DMG: StatusIB = + [1685673332.574922][2645:2647] CHIP:DMG: { + [1685673332.575013][2645:2647] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673332.575108][2645:2647] CHIP:DMG: }, + [1685673332.575202][2645:2647] CHIP:DMG: + [1685673332.575276][2645:2647] CHIP:DMG: }, + [1685673332.575357][2645:2647] CHIP:DMG: + [1685673332.575417][2645:2647] CHIP:DMG: }, + [1685673332.575488][2645:2647] CHIP:DMG: + [1685673332.575543][2645:2647] CHIP:DMG: ], + [1685673332.575612][2645:2647] CHIP:DMG: + [1685673332.575667][2645:2647] CHIP:DMG: InteractionModelRevision = 1 + [1685673332.575721][2645:2647] CHIP:DMG: }, disabled: true - - label: "DUT sends Get User to TH." + - label: "Step 14: DUT sends Get User to TH." PICS: DRLK.C.F08 && DRLK.C.C1b.Tx verification: | - ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Get User Day Schedule command response" on TH(lock-app): - - [1667211856.554861][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae9bb50 exchange 30869r - [1667211856.554971][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211856.555035][14571:14571] CHIP:DMG: { - [1667211856.555093][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211856.555171][14571:14571] CHIP:DMG: timedRequest = true, - [1667211856.555234][14571:14571] CHIP:DMG: InvokeRequests = - [1667211856.555314][14571:14571] CHIP:DMG: [ - [1667211856.555377][14571:14571] CHIP:DMG: CommandDataIB = - [1667211856.555456][14571:14571] CHIP:DMG: { - [1667211856.555531][14571:14571] CHIP:DMG: CommandPathIB = - [1667211856.555606][14571:14571] CHIP:DMG: { - [1667211856.555695][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211856.555784][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211856.555871][14571:14571] CHIP:DMG: CommandId = 0x1b, - [1667211856.555951][14571:14571] CHIP:DMG: }, - [1667211856.556037][14571:14571] CHIP:DMG: - [1667211856.556106][14571:14571] CHIP:DMG: CommandFields = - [1667211856.556187][14571:14571] CHIP:DMG: { - [1667211856.556272][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211856.556358][14571:14571] CHIP:DMG: }, - [1667211856.556437][14571:14571] CHIP:DMG: }, - [1667211856.556522][14571:14571] CHIP:DMG: - [1667211856.556584][14571:14571] CHIP:DMG: ], - [1667211856.556661][14571:14571] CHIP:DMG: - [1667211856.556723][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211856.556783][14571:14571] CHIP:DMG: }, - [1667211856.556929][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211856.557011][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211856.557083][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001B - [1667211856.557161][14571:14571] CHIP:ZCL: [GetUser] Incoming command [endpointId=1,userIndex=2] - [1667211856.557249][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211856.557308][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=1,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211856.557400][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211856.557476][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211856.557534][14571:14571] CHIP:ZCL: Found user in storage: [userIndex=2,userName="xxx",userStatus=1,userType=0,credentialRule=0,createdBy=1,modifiedBy=1] - [1667211856.557608][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=3] - [1667211856.557665][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=2] - [1667211856.557721][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=4] - [1667211856.557774][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=3] - [1667211856.557828][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=5] - [1667211856.557881][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=4] - [1667211856.557934][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=6] - [1667211856.557985][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=5] - [1667211856.558037][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=7] - [1667211856.558089][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=6] - [1667211856.558143][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=8] - [1667211856.558195][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=7] - [1667211856.558248][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=9] - [1667211856.558301][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=8] - [1667211856.558354][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=10] - [1667211856.558406][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=9] - [1667211856.558546][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211856.558658][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211856.559227][14571:14571] CHIP:EM: <<< [E:30869r M:57070172 (Ack:158079364)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211856.559342][14571:14571] CHIP:IN: (S) Sending msg 57070172 on secure session with LSID: 42480 - [1667211856.560055][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:46701 | 57070172 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 3016 / Exchange = 30869] - [1667211856.560164][14571:14571] CHIP:DMG: Header Flags = - [1667211856.560222][14571:14571] CHIP:DMG: { - [1667211856.560310][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211856.560369][14571:14571] CHIP:DMG: { - [1667211856.560431][14571:14571] CHIP:DMG: AckMsg = 158079364 - [1667211856.560487][14571:14571] CHIP:DMG: NeedsAck = true - [1667211856.560544][14571:14571] CHIP:DMG: } - [1667211856.560619][14571:14571] CHIP:DMG: } - [1667211856.560674][14571:14571] CHIP:DMG: - [1667211856.560758][14571:14571] CHIP:DMG: Encrypted Payload (93 bytes) = - [1667211856.560815][14571:14571] CHIP:DMG: { - [1667211856.560869][14571:14571] CHIP:DMG: data = 00c80b005cd26603c97b80d9b20084d5c66a9563e7edbc8088506239e2d054d0d42ecf6068d4cf3ab8896e0ec67eed7a687e0ee9da1d048d2ec35e93052c81ff3303208dc05ea883c624523bb20f6ddf13dfb8d5343b0ff54848d666a2 - [1667211856.560929][14571:14571] CHIP:DMG: buffer_ptr = 187651867785440 - [1667211856.560982][14571:14571] CHIP:DMG: } - [1667211856.561034][14571:14571] CHIP:DMG: - [1667211856.561110][14571:14571] CHIP:DMG: Decrypted Payload (59 bytes) = - [1667211856.561167][14571:14571] CHIP:DMG: { - [1667211856.561221][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124021c1835012400022c0103787878250234192403012404002405002407012408011818181824ff0118 - [1667211856.561277][14571:14571] CHIP:DMG: } - [1667211856.561330][14571:14571] CHIP:DMG: - [1667211856.561503][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211856.561567][14571:14571] CHIP:DMG: { - [1667211856.561626][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211856.561688][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211856.561774][14571:14571] CHIP:DMG: [ - [1667211856.561836][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211856.561931][14571:14571] CHIP:DMG: { - [1667211856.562009][14571:14571] CHIP:DMG: CommandDataIB = - [1667211856.562087][14571:14571] CHIP:DMG: { - [1667211856.562166][14571:14571] CHIP:DMG: CommandPathIB = - [1667211856.562252][14571:14571] CHIP:DMG: { - [1667211856.562338][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211856.562436][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211856.562590][14571:14571] CHIP:DMG: CommandId = 0x1c, - [1667211856.562684][14571:14571] CHIP:DMG: }, - [1667211856.562779][14571:14571] CHIP:DMG: - [1667211856.562865][14571:14571] CHIP:DMG: CommandFields = - [1667211856.562950][14571:14571] CHIP:DMG: { - [1667211856.563040][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211856.563142][14571:14571] CHIP:DMG: 0x1 = "xxx" (3 chars), - [1667211856.563242][14571:14571] CHIP:DMG: 0x2 = 6452, - [1667211856.563333][14571:14571] CHIP:DMG: 0x3 = 1, - [1667211856.563430][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211856.563520][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211856.563609][14571:14571] CHIP:DMG: 0x7 = 1, - [1667211856.563701][14571:14571] CHIP:DMG: 0x8 = 1, - [1667211856.563790][14571:14571] CHIP:DMG: }, - [1667211856.563870][14571:14571] CHIP:DMG: }, - [1667211856.563963][14571:14571] CHIP:DMG: + ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Get User command response on TH(lock-app) log: + + [1685673354.071762][2648:2650] CHIP:DMG: InvokeResponseMessage = + [1685673354.071817][2648:2650] CHIP:DMG: { + [1685673354.071870][2648:2650] CHIP:DMG: suppressResponse = false, + [1685673354.071926][2648:2650] CHIP:DMG: InvokeResponseIBs = + [1685673354.072011][2648:2650] CHIP:DMG: [ + [1685673354.072068][2648:2650] CHIP:DMG: InvokeResponseIB = + [1685673354.072156][2648:2650] CHIP:DMG: { + [1685673354.072216][2648:2650] CHIP:DMG: CommandDataIB = + [1685673354.072285][2648:2650] CHIP:DMG: { + [1685673354.072352][2648:2650] CHIP:DMG: CommandPathIB = + [1685673354.072428][2648:2650] CHIP:DMG: { + [1685673354.072502][2648:2650] CHIP:DMG: EndpointId = 0x1, + [1685673354.072582][2648:2650] CHIP:DMG: ClusterId = 0x101, + [1685673354.072658][2648:2650] CHIP:DMG: CommandId = 0x1c, + [1685673354.072733][2648:2650] CHIP:DMG: }, + [1685673354.072807][2648:2650] CHIP:DMG: + [1685673354.072875][2648:2650] CHIP:DMG: CommandFields = + [1685673354.072948][2648:2650] CHIP:DMG: { + [1685673354.073024][2648:2650] CHIP:DMG: 0x0 = 2, + [1685673354.073111][2648:2650] CHIP:DMG: 0x1 = "xxx" (3 chars), + [1685673354.073299][2648:2650] CHIP:DMG: 0x2 = 6452, + [1685673354.073384][2648:2650] CHIP:DMG: 0x3 = 1, + [1685673354.073465][2648:2650] CHIP:DMG: 0x4 = 0, + [1685673354.073546][2648:2650] CHIP:DMG: 0x5 = 0, + [1685673354.073667][2648:2650] CHIP:DMG: 0x6 = [ + [1685673354.073749][2648:2650] CHIP:DMG: + [1685673354.073959][2648:2650] CHIP:DMG: ], + [1685673354.074042][2648:2650] CHIP:DMG: 0x7 = 1, + [1685673354.074121][2648:2650] CHIP:DMG: 0x8 = 1, + [1685673354.074201][2648:2650] CHIP:DMG: 0x9 = NULL + [1685673354.074281][2648:2650] CHIP:DMG: }, + [1685673354.074350][2648:2650] CHIP:DMG: }, + [1685673354.074439][2648:2650] CHIP:DMG: + [1685673354.074501][2648:2650] CHIP:DMG: }, + [1685673354.074583][2648:2650] CHIP:DMG: + [1685673354.074638][2648:2650] CHIP:DMG: ], + [1685673354.074725][2648:2650] CHIP:DMG: + [1685673354.074781][2648:2650] CHIP:DMG: InteractionModelRevision = 1 + [1685673354.074836][2648:2650] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear User command to TH.a" + - label: "Step 15: DUT sends Clear User command to TH.a" PICS: DRLK.C.F08 && DRLK.C.C1d.Tx verification: | - ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Clear User Day Schedule command response" on TH(lock-app): - - [1667211914.022424][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae937d0 exchange 2541r - [1667211914.022574][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211914.022640][14571:14571] CHIP:DMG: { - [1667211914.022701][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211914.022769][14571:14571] CHIP:DMG: timedRequest = true, - [1667211914.022830][14571:14571] CHIP:DMG: InvokeRequests = - [1667211914.022909][14571:14571] CHIP:DMG: [ - [1667211914.022972][14571:14571] CHIP:DMG: CommandDataIB = - [1667211914.023051][14571:14571] CHIP:DMG: { - [1667211914.023123][14571:14571] CHIP:DMG: CommandPathIB = - [1667211914.023212][14571:14571] CHIP:DMG: { - [1667211914.023301][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211914.023387][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211914.023471][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667211914.023552][14571:14571] CHIP:DMG: }, - [1667211914.023643][14571:14571] CHIP:DMG: - [1667211914.023725][14571:14571] CHIP:DMG: CommandFields = - [1667211914.023798][14571:14571] CHIP:DMG: { - [1667211914.023887][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211914.023969][14571:14571] CHIP:DMG: }, - [1667211914.024045][14571:14571] CHIP:DMG: }, - [1667211914.024133][14571:14571] CHIP:DMG: - [1667211914.024197][14571:14571] CHIP:DMG: ], - [1667211914.024273][14571:14571] CHIP:DMG: - [1667211914.024336][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211914.024396][14571:14571] CHIP:DMG: }, - [1667211914.024543][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211914.024623][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211914.024692][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D - [1667211914.024767][14571:14571] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=2] - [1667211914.024859][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211914.024919][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=1,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211914.025008][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=0,modifier=0,userName="",uniqueId=0,userStatus=0,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211914.025077][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] - [1667211914.025333][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211914.025452][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000F priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012B76E2 - [1667211914.025523][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=15,dataType=2,operation=1,nodeId=112233,fabricIndex=1] - [1667211914.025602][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211914.025672][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211914.025738][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211914.025833][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211914.026342][14571:14571] CHIP:EM: <<< [E:2541r M:132123146 (Ack:195110449)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211914.026442][14571:14571] CHIP:IN: (S) Sending msg 132123146 on secure session with LSID: 42481 - [1667211914.027154][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:37935 | 132123146 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 3932 / Exchange = 2541] - [1667211914.027252][14571:14571] CHIP:DMG: Header Flags = - [1667211914.027310][14571:14571] CHIP:DMG: { - [1667211914.027396][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211914.027453][14571:14571] CHIP:DMG: { - [1667211914.027514][14571:14571] CHIP:DMG: AckMsg = 195110449 - [1667211914.027571][14571:14571] CHIP:DMG: NeedsAck = true - [1667211914.027630][14571:14571] CHIP:DMG: } - [1667211914.027703][14571:14571] CHIP:DMG: } - [1667211914.027758][14571:14571] CHIP:DMG: - [1667211914.027827][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211914.027882][14571:14571] CHIP:DMG: { - [1667211914.027937][14571:14571] CHIP:DMG: data = 005c0f000a0ae0072979c079e7318fb3cacb9c7f6174ee6a8639887ed9268b986bbe34190fce886d617b329ac4eb469763fc0d702abbeecfed871d05398158f947605856 - [1667211914.027995][14571:14571] CHIP:DMG: buffer_ptr = 187651867787584 - [1667211914.028049][14571:14571] CHIP:DMG: } - [1667211914.028102][14571:14571] CHIP:DMG: - [1667211914.028177][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211914.028234][14571:14571] CHIP:DMG: { - [1667211914.028287][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021d1835012400001818181824ff0118 - [1667211914.028343][14571:14571] CHIP:DMG: } - [1667211914.028396][14571:14571] CHIP:DMG: - [1667211914.028530][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211914.028593][14571:14571] CHIP:DMG: { - [1667211914.028652][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211914.028714][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211914.028792][14571:14571] CHIP:DMG: [ - [1667211914.028855][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211914.028943][14571:14571] CHIP:DMG: { - [1667211914.029012][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211914.029093][14571:14571] CHIP:DMG: { - [1667211914.029170][14571:14571] CHIP:DMG: CommandPathIB = - [1667211914.029261][14571:14571] CHIP:DMG: { - [1667211914.029349][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211914.029438][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211914.029535][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667211914.029626][14571:14571] CHIP:DMG: }, - [1667211914.029728][14571:14571] CHIP:DMG: - [1667211914.029807][14571:14571] CHIP:DMG: StatusIB = - [1667211914.029900][14571:14571] CHIP:DMG: { - [1667211914.029994][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211914.030086][14571:14571] CHIP:DMG: }, - [1667211914.030180][14571:14571] CHIP:DMG: - [1667211914.030256][14571:14571] CHIP:DMG: }, - [1667211914.030344][14571:14571] CHIP:DMG: - [1667211914.030414][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear User command with SUCCESS response on TH(lock-app) log: + + [1685673377.373571][2656:2658] CHIP:DMG: InvokeResponseMessage = + [1685673377.373626][2656:2658] CHIP:DMG: { + [1685673377.373680][2656:2658] CHIP:DMG: suppressResponse = false, + [1685673377.373736][2656:2658] CHIP:DMG: InvokeResponseIBs = + [1685673377.373862][2656:2658] CHIP:DMG: [ + [1685673377.373923][2656:2658] CHIP:DMG: InvokeResponseIB = + [1685673377.374005][2656:2658] CHIP:DMG: { + [1685673377.374066][2656:2658] CHIP:DMG: CommandStatusIB = + [1685673377.374135][2656:2658] CHIP:DMG: { + [1685673377.374204][2656:2658] CHIP:DMG: CommandPathIB = + [1685673377.374279][2656:2658] CHIP:DMG: { + [1685673377.374357][2656:2658] CHIP:DMG: EndpointId = 0x1, + [1685673377.374435][2656:2658] CHIP:DMG: ClusterId = 0x101, + [1685673377.374514][2656:2658] CHIP:DMG: CommandId = 0x1d, + [1685673377.374587][2656:2658] CHIP:DMG: }, + [1685673377.374669][2656:2658] CHIP:DMG: + [1685673377.374738][2656:2658] CHIP:DMG: StatusIB = + [1685673377.374813][2656:2658] CHIP:DMG: { + [1685673377.374889][2656:2658] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673377.374964][2656:2658] CHIP:DMG: }, + [1685673377.375039][2656:2658] CHIP:DMG: + [1685673377.375107][2656:2658] CHIP:DMG: }, + [1685673377.375182][2656:2658] CHIP:DMG: + [1685673377.375241][2656:2658] CHIP:DMG: }, + [1685673377.375313][2656:2658] CHIP:DMG: + [1685673377.375369][2656:2658] CHIP:DMG: ], + [1685673377.375437][2656:2658] CHIP:DMG: + [1685673377.375489][2656:2658] CHIP:DMG: InteractionModelRevision = 1 + [1685673377.375543][2656:2658] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Credential command to TH.a" + - label: "Step 16: DUT sends Set Credential command to TH.a" PICS: DRLK.C.F08 && DRLK.C.C22.Tx verification: | - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set Credential command response" on TH(lock-app): - - [1667211985.379772][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae9bea0 exchange 61782r - [1667211985.379886][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211985.379949][14571:14571] CHIP:DMG: { - [1667211985.380006][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211985.380080][14571:14571] CHIP:DMG: timedRequest = true, - [1667211985.380143][14571:14571] CHIP:DMG: InvokeRequests = - [1667211985.380227][14571:14571] CHIP:DMG: [ - [1667211985.380289][14571:14571] CHIP:DMG: CommandDataIB = - [1667211985.380358][14571:14571] CHIP:DMG: { - [1667211985.380429][14571:14571] CHIP:DMG: CommandPathIB = - [1667211985.380516][14571:14571] CHIP:DMG: { - [1667211985.380605][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211985.380693][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211985.380783][14571:14571] CHIP:DMG: CommandId = 0x22, - [1667211985.380863][14571:14571] CHIP:DMG: }, - [1667211985.380944][14571:14571] CHIP:DMG: - [1667211985.381016][14571:14571] CHIP:DMG: CommandFields = - [1667211985.381082][14571:14571] CHIP:DMG: { - [1667211985.381171][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211985.381252][14571:14571] CHIP:DMG: 0x1 = - [1667211985.381335][14571:14571] CHIP:DMG: { - [1667211985.381421][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211985.381510][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211985.381596][14571:14571] CHIP:DMG: }, - [1667211985.381682][14571:14571] CHIP:DMG: 0x2 = [ - [1667211985.381768][14571:14571] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - [1667211985.381860][14571:14571] CHIP:DMG: ] (6 bytes) - [1667211985.381946][14571:14571] CHIP:DMG: 0x3 = 1, - [1667211985.382040][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211985.382125][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211985.382216][14571:14571] CHIP:DMG: }, - [1667211985.382298][14571:14571] CHIP:DMG: }, - [1667211985.382388][14571:14571] CHIP:DMG: - [1667211985.382450][14571:14571] CHIP:DMG: ], - [1667211985.382593][14571:14571] CHIP:DMG: - [1667211985.382657][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211985.382727][14571:14571] CHIP:DMG: }, - [1667211985.382889][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211985.382970][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211985.383039][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 - [1667211985.383151][14571:14571] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] - [1667211985.383240][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667211985.383300][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667211985.383365][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667211985.383421][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667211985.383473][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667211985.383526][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667211985.383579][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1667211985.383631][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1667211985.383683][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1667211985.383736][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1667211985.383789][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1667211985.383842][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1667211985.383893][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1667211985.383947][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1667211985.383999][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1667211985.384052][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1667211985.384103][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1667211985.384156][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1667211985.384207][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1667211985.384260][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1667211985.384311][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1667211985.384364][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1667211985.384416][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667211985.384469][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667211985.384521][14571:14571] CHIP:ZCL: [SetCredential] Unable to set the credential: user status is out of range [endpointId=1,credentialIndex=1,userStatus=0] - [1667211985.384606][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211985.384679][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211985.384748][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211985.384861][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211985.385364][14571:14571] CHIP:EM: <<< [E:61782r M:160486692 (Ack:32724823)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211985.385467][14571:14571] CHIP:IN: (S) Sending msg 160486692 on secure session with LSID: 42482 - [1667211985.386171][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:34405 | 160486692 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 26384 / Exchange = 61782] - [1667211985.386278][14571:14571] CHIP:DMG: Header Flags = - [1667211985.386335][14571:14571] CHIP:DMG: { - [1667211985.386419][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211985.386508][14571:14571] CHIP:DMG: { - [1667211985.386570][14571:14571] CHIP:DMG: AckMsg = 32724823 - [1667211985.386626][14571:14571] CHIP:DMG: NeedsAck = true - [1667211985.386681][14571:14571] CHIP:DMG: } - [1667211985.386753][14571:14571] CHIP:DMG: } - [1667211985.386808][14571:14571] CHIP:DMG: - [1667211985.386877][14571:14571] CHIP:DMG: Encrypted Payload (73 bytes) = - [1667211985.386933][14571:14571] CHIP:DMG: { - [1667211985.386988][14571:14571] CHIP:DMG: data = 0010670024d59009e4a18ce5a334af34af2dfef43c4f3ede83b442faa5672b0eeaa5d15d4e3ea38155c269ecff4c629a536a239a8332c8eb0d7c4b9e8311d718036bb038c757046603 - [1667211985.387046][14571:14571] CHIP:DMG: buffer_ptr = 187651867791424 - [1667211985.387100][14571:14571] CHIP:DMG: } - [1667211985.387152][14571:14571] CHIP:DMG: - [1667211985.387225][14571:14571] CHIP:DMG: Decrypted Payload (39 bytes) = - [1667211985.387283][14571:14571] CHIP:DMG: { - [1667211985.387337][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124022318350124008534012402021818181824ff0118 - [1667211985.387392][14571:14571] CHIP:DMG: } - [1667211985.387445][14571:14571] CHIP:DMG: - [1667211985.387597][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211985.387660][14571:14571] CHIP:DMG: { - [1667211985.387720][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211985.387782][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211985.387861][14571:14571] CHIP:DMG: [ - [1667211985.387924][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211985.388019][14571:14571] CHIP:DMG: { - [1667211985.388092][14571:14571] CHIP:DMG: CommandDataIB = - [1667211985.388179][14571:14571] CHIP:DMG: { - [1667211985.388262][14571:14571] CHIP:DMG: CommandPathIB = - [1667211985.388339][14571:14571] CHIP:DMG: { - [1667211985.388431][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211985.388521][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211985.388610][14571:14571] CHIP:DMG: CommandId = 0x23, - [1667211985.388702][14571:14571] CHIP:DMG: }, - [1667211985.388797][14571:14571] CHIP:DMG: - [1667211985.388882][14571:14571] CHIP:DMG: CommandFields = - [1667211985.388965][14571:14571] CHIP:DMG: { - [1667211985.389054][14571:14571] CHIP:DMG: 0x0 = 133, - [1667211985.389152][14571:14571] CHIP:DMG: 0x1 = NULL - [1667211985.389249][14571:14571] CHIP:DMG: 0x2 = 2, - [1667211985.389330][14571:14571] CHIP:DMG: }, - [1667211985.389394][14571:14571] CHIP:DMG: }, - [1667211985.389480][14571:14571] CHIP:DMG: - [1667211985.389550][14571:14571] CHIP:DMG: }, - [1667211985.389633][14571:14571] CHIP:DMG: - [1667211985.389693][14571:14571] CHIP:DMG: ], - [1667211985.389772][14571:14571] CHIP:DMG: - [1667211985.389831][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211985.389890][14571:14571] CHIP:DMG: }, - [1667211985.389946][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set Credential command response on TH(lock-app) log: + + [1685673397.369211][2660:2662] CHIP:DMG: InvokeResponseMessage = + [1685673397.369266][2660:2662] CHIP:DMG: { + [1685673397.369320][2660:2662] CHIP:DMG: suppressResponse = false, + [1685673397.369375][2660:2662] CHIP:DMG: InvokeResponseIBs = + [1685673397.369448][2660:2662] CHIP:DMG: [ + [1685673397.369504][2660:2662] CHIP:DMG: InvokeResponseIB = + [1685673397.369584][2660:2662] CHIP:DMG: { + [1685673397.369644][2660:2662] CHIP:DMG: CommandDataIB = + [1685673397.369712][2660:2662] CHIP:DMG: { + [1685673397.369829][2660:2662] CHIP:DMG: CommandPathIB = + [1685673397.369908][2660:2662] CHIP:DMG: { + [1685673397.369981][2660:2662] CHIP:DMG: EndpointId = 0x1, + [1685673397.370061][2660:2662] CHIP:DMG: ClusterId = 0x101, + [1685673397.370138][2660:2662] CHIP:DMG: CommandId = 0x23, + [1685673397.370212][2660:2662] CHIP:DMG: }, + [1685673397.370289][2660:2662] CHIP:DMG: + [1685673397.370356][2660:2662] CHIP:DMG: CommandFields = + [1685673397.370428][2660:2662] CHIP:DMG: { + [1685673397.370506][2660:2662] CHIP:DMG: 0x0 = 133, + [1685673397.370586][2660:2662] CHIP:DMG: 0x1 = NULL + [1685673397.370665][2660:2662] CHIP:DMG: 0x2 = 2, + [1685673397.370743][2660:2662] CHIP:DMG: }, + [1685673397.370812][2660:2662] CHIP:DMG: }, + [1685673397.370892][2660:2662] CHIP:DMG: + [1685673397.370951][2660:2662] CHIP:DMG: }, + [1685673397.371023][2660:2662] CHIP:DMG: + [1685673397.371078][2660:2662] CHIP:DMG: ], + [1685673397.371150][2660:2662] CHIP:DMG: + [1685673397.371208][2660:2662] CHIP:DMG: InteractionModelRevision = 1 + [1685673397.371263][2660:2662] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Credential to TH." + - label: "Step 17: DUT sends Get Credential to TH." PICS: DRLK.C.F08 && DRLK.C.C24.Tx verification: | - ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Get Credential command response" on TH(lock-app): - - [1667212093.273797][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae93420 exchange 30438r - [1667212093.273905][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212093.273968][14571:14571] CHIP:DMG: { - [1667212093.274026][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212093.274093][14571:14571] CHIP:DMG: timedRequest = true, - [1667212093.274154][14571:14571] CHIP:DMG: InvokeRequests = - [1667212093.274230][14571:14571] CHIP:DMG: [ - [1667212093.274292][14571:14571] CHIP:DMG: CommandDataIB = - [1667212093.274361][14571:14571] CHIP:DMG: { - [1667212093.274433][14571:14571] CHIP:DMG: CommandPathIB = - [1667212093.274569][14571:14571] CHIP:DMG: { - [1667212093.274652][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212093.274726][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212093.274820][14571:14571] CHIP:DMG: CommandId = 0x24, - [1667212093.274899][14571:14571] CHIP:DMG: }, - [1667212093.274990][14571:14571] CHIP:DMG: - [1667212093.275062][14571:14571] CHIP:DMG: CommandFields = - [1667212093.275148][14571:14571] CHIP:DMG: { - [1667212093.275234][14571:14571] CHIP:DMG: 0x0 = - [1667212093.275317][14571:14571] CHIP:DMG: { - [1667212093.275406][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212093.275502][14571:14571] CHIP:DMG: 0x1 = 1, - [1667212093.275596][14571:14571] CHIP:DMG: }, - [1667212093.275688][14571:14571] CHIP:DMG: }, - [1667212093.275762][14571:14571] CHIP:DMG: }, - [1667212093.275845][14571:14571] CHIP:DMG: - [1667212093.275911][14571:14571] CHIP:DMG: ], - [1667212093.275990][14571:14571] CHIP:DMG: - [1667212093.276051][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212093.276110][14571:14571] CHIP:DMG: }, - [1667212093.276259][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212093.276339][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212093.276408][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0024 - [1667212093.276495][14571:14571] CHIP:ZCL: [GetCredentialStatus] Incoming command [endpointId=1] - [1667212093.276576][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667212093.276634][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667212093.276696][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667212093.276751][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667212093.276804][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1667212093.276858][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1667212093.276914][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1667212093.276967][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1667212093.277020][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1667212093.277073][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1667212093.277134][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1667212093.277188][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1667212093.277240][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1667212093.277293][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1667212093.277354][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1667212093.277407][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1667212093.277459][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1667212093.277513][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1667212093.277568][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1667212093.277622][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1667212093.277702][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212093.277776][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212093.277846][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212093.277902][14571:14571] CHIP:ZCL: [GetCredentialStatus] Prepared credential status [endpointId=1,credentialType=1,credentialIndex=1,userIndex=0,nextCredentialIndex=0] - [1667212093.278006][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212093.278542][14571:14571] CHIP:EM: <<< [E:30438r M:4480764 (Ack:186848136)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212093.278641][14571:14571] CHIP:IN: (S) Sending msg 4480764 on secure session with LSID: 42483 - [1667212093.279298][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57039 | 4480764 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 43119 / Exchange = 30438] - [1667212093.279396][14571:14571] CHIP:DMG: Header Flags = - [1667212093.279453][14571:14571] CHIP:DMG: { - [1667212093.279539][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212093.279597][14571:14571] CHIP:DMG: { - [1667212093.279656][14571:14571] CHIP:DMG: AckMsg = 186848136 - [1667212093.279712][14571:14571] CHIP:DMG: NeedsAck = true - [1667212093.279767][14571:14571] CHIP:DMG: } - [1667212093.279838][14571:14571] CHIP:DMG: } - [1667212093.279893][14571:14571] CHIP:DMG: - [1667212093.279961][14571:14571] CHIP:DMG: Encrypted Payload (75 bytes) = - [1667212093.280016][14571:14571] CHIP:DMG: { - [1667212093.280070][14571:14571] CHIP:DMG: data = 006fa800fc5e4400c7276ff1d39cf739fa9accc0d3bc9011e5054e3518b94d01735f0b15877dcd655b1cd5c0454c146798aea65ab4ca874add0cd3f7bfae3d8a7a05775dafc0596dd29643 - [1667212093.280128][14571:14571] CHIP:DMG: buffer_ptr = 187651867792640 - [1667212093.280181][14571:14571] CHIP:DMG: } - [1667212093.280233][14571:14571] CHIP:DMG: - [1667212093.280306][14571:14571] CHIP:DMG: Decrypted Payload (41 bytes) = - [1667212093.280362][14571:14571] CHIP:DMG: { - [1667212093.280415][14571:14571] CHIP:DMG: data = 1528003601153500370024000125010101240225183501280034013402340334041818181824ff0118 - [1667212093.280471][14571:14571] CHIP:DMG: } - [1667212093.280524][14571:14571] CHIP:DMG: - [1667212093.280678][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212093.280741][14571:14571] CHIP:DMG: { - [1667212093.280800][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212093.280862][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212093.280942][14571:14571] CHIP:DMG: [ - [1667212093.281005][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212093.281097][14571:14571] CHIP:DMG: { - [1667212093.281168][14571:14571] CHIP:DMG: CommandDataIB = - [1667212093.281255][14571:14571] CHIP:DMG: { - [1667212093.281338][14571:14571] CHIP:DMG: CommandPathIB = - [1667212093.281429][14571:14571] CHIP:DMG: { - [1667212093.281516][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212093.281614][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212093.281710][14571:14571] CHIP:DMG: CommandId = 0x25, - [1667212093.281793][14571:14571] CHIP:DMG: }, - [1667212093.281890][14571:14571] CHIP:DMG: - [1667212093.281976][14571:14571] CHIP:DMG: CommandFields = - [1667212093.282052][14571:14571] CHIP:DMG: { - [1667212093.282145][14571:14571] CHIP:DMG: 0x0 = false, - [1667212093.282228][14571:14571] CHIP:DMG: 0x1 = NULL - [1667212093.282313][14571:14571] CHIP:DMG: 0x2 = NULL - [1667212093.282404][14571:14571] CHIP:DMG: 0x3 = NULL - [1667212093.282570][14571:14571] CHIP:DMG: 0x4 = NULL - [1667212093.282671][14571:14571] CHIP:DMG: }, - [1667212093.282744][14571:14571] CHIP:DMG: }, - [1667212093.282836][14571:14571] CHIP:DMG: - [1667212093.282906][14571:14571] CHIP:DMG: }, - [1667212093.283000][14571:14571] CHIP:DMG: - [1667212093.283057][14571:14571] CHIP:DMG: ], - [1667212093.283138][14571:14571] CHIP:DMG: - [1667212093.283199][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212093.283264][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Get Credential command response on TH(lock-app) log: + + [1685673421.665556][2664:2666] CHIP:DMG: InvokeResponseMessage = + [1685673421.665610][2664:2666] CHIP:DMG: { + [1685673421.665662][2664:2666] CHIP:DMG: suppressResponse = false, + [1685673421.665720][2664:2666] CHIP:DMG: InvokeResponseIBs = + [1685673421.665921][2664:2666] CHIP:DMG: [ + [1685673421.665982][2664:2666] CHIP:DMG: InvokeResponseIB = + [1685673421.666061][2664:2666] CHIP:DMG: { + [1685673421.666121][2664:2666] CHIP:DMG: CommandDataIB = + [1685673421.666195][2664:2666] CHIP:DMG: { + [1685673421.666261][2664:2666] CHIP:DMG: CommandPathIB = + [1685673421.666335][2664:2666] CHIP:DMG: { + [1685673421.666411][2664:2666] CHIP:DMG: EndpointId = 0x1, + [1685673421.666490][2664:2666] CHIP:DMG: ClusterId = 0x101, + [1685673421.666652][2664:2666] CHIP:DMG: CommandId = 0x25, + [1685673421.666732][2664:2666] CHIP:DMG: }, + [1685673421.666812][2664:2666] CHIP:DMG: + [1685673421.666881][2664:2666] CHIP:DMG: CommandFields = + [1685673421.666961][2664:2666] CHIP:DMG: { + [1685673421.667041][2664:2666] CHIP:DMG: 0x0 = false, + [1685673421.667122][2664:2666] CHIP:DMG: 0x1 = NULL + [1685673421.667203][2664:2666] CHIP:DMG: 0x2 = NULL + [1685673421.667282][2664:2666] CHIP:DMG: 0x3 = NULL + [1685673421.667362][2664:2666] CHIP:DMG: 0x4 = NULL + [1685673421.667439][2664:2666] CHIP:DMG: }, + [1685673421.667509][2664:2666] CHIP:DMG: }, + [1685673421.667590][2664:2666] CHIP:DMG: + [1685673421.667722][2664:2666] CHIP:DMG: }, + [1685673421.667808][2664:2666] CHIP:DMG: + [1685673421.667865][2664:2666] CHIP:DMG: ], + [1685673421.667939][2664:2666] CHIP:DMG: + [1685673421.667995][2664:2666] CHIP:DMG: InteractionModelRevision = 1 + [1685673421.668049][2664:2666] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Credential command to TH." + - label: "Step 18: DUT sends Clear Credential command to TH." PICS: DRLK.C.F08 && DRLK.C.C26.Tx verification: | - ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Clear Credential command response" on TH(lock-app): - - [1667212128.152900][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeba540 exchange 10631r - [1667212128.153426][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212128.153496][14571:14571] CHIP:DMG: { - [1667212128.153555][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212128.153623][14571:14571] CHIP:DMG: timedRequest = true, - [1667212128.153685][14571:14571] CHIP:DMG: InvokeRequests = - [1667212128.153766][14571:14571] CHIP:DMG: [ - [1667212128.153831][14571:14571] CHIP:DMG: CommandDataIB = - [1667212128.153917][14571:14571] CHIP:DMG: { - [1667212128.153985][14571:14571] CHIP:DMG: CommandPathIB = - [1667212128.154069][14571:14571] CHIP:DMG: { - [1667212128.154154][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212128.154242][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212128.154327][14571:14571] CHIP:DMG: CommandId = 0x26, - [1667212128.154409][14571:14571] CHIP:DMG: }, - [1667212128.154576][14571:14571] CHIP:DMG: - [1667212128.154656][14571:14571] CHIP:DMG: CommandFields = - [1667212128.154738][14571:14571] CHIP:DMG: { - [1667212128.154818][14571:14571] CHIP:DMG: 0x0 = - [1667212128.154905][14571:14571] CHIP:DMG: { - [1667212128.154996][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212128.155088][14571:14571] CHIP:DMG: 0x1 = 1, - [1667212128.155177][14571:14571] CHIP:DMG: }, - [1667212128.155261][14571:14571] CHIP:DMG: }, - [1667212128.155338][14571:14571] CHIP:DMG: }, - [1667212128.155492][14571:14571] CHIP:DMG: - [1667212128.155564][14571:14571] CHIP:DMG: ], - [1667212128.155646][14571:14571] CHIP:DMG: - [1667212128.155707][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212128.155774][14571:14571] CHIP:DMG: }, - [1667212128.155932][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212128.156015][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212128.156085][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0026 - [1667212128.156175][14571:14571] CHIP:ZCL: [ClearCredential] Incoming command [endpointId=1] - [1667212128.156257][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667212128.156317][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667212128.156371][14571:14571] CHIP:ZCL: [clearCredential] Ignored attempt to clear unoccupied credential slot [endpointId=1,credentialType=1,credentialIndex=1,modifier=1] - [1667212128.156461][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212128.156535][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212128.156602][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212128.156701][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212128.157316][14571:14571] CHIP:EM: <<< [E:10631r M:11930538 (Ack:156691987)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212128.157439][14571:14571] CHIP:IN: (S) Sending msg 11930538 on secure session with LSID: 42484 - [1667212128.158170][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:51286 | 11930538 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 58469 / Exchange = 10631] - [1667212128.158376][14571:14571] CHIP:DMG: Header Flags = - [1667212128.158437][14571:14571] CHIP:DMG: { - [1667212128.158576][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212128.158638][14571:14571] CHIP:DMG: { - [1667212128.158701][14571:14571] CHIP:DMG: AckMsg = 156691987 - [1667212128.158757][14571:14571] CHIP:DMG: NeedsAck = true - [1667212128.158812][14571:14571] CHIP:DMG: } - [1667212128.158884][14571:14571] CHIP:DMG: } - [1667212128.158940][14571:14571] CHIP:DMG: - [1667212128.159012][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667212128.159071][14571:14571] CHIP:DMG: { - [1667212128.159126][14571:14571] CHIP:DMG: data = 0065e400aa0bb600767167666da8a4704228550333f05c7a6a317f168837b8fc5c23819459344b754fdb12d3ada5c7097bff508204cf3aed1e536c476de369050ec614be - [1667212128.159185][14571:14571] CHIP:DMG: buffer_ptr = 187651867793280 - [1667212128.159239][14571:14571] CHIP:DMG: } - [1667212128.159291][14571:14571] CHIP:DMG: - [1667212128.159368][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667212128.159426][14571:14571] CHIP:DMG: { - [1667212128.159481][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402261835012400001818181824ff0118 - [1667212128.159537][14571:14571] CHIP:DMG: } - [1667212128.159589][14571:14571] CHIP:DMG: - [1667212128.159731][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212128.159796][14571:14571] CHIP:DMG: { - [1667212128.159855][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212128.159919][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212128.159997][14571:14571] CHIP:DMG: [ - [1667212128.160061][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212128.160157][14571:14571] CHIP:DMG: { - [1667212128.160224][14571:14571] CHIP:DMG: CommandStatusIB = - [1667212128.160307][14571:14571] CHIP:DMG: { - [1667212128.160384][14571:14571] CHIP:DMG: CommandPathIB = - [1667212128.160473][14571:14571] CHIP:DMG: { - [1667212128.160561][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212128.160652][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212128.160742][14571:14571] CHIP:DMG: CommandId = 0x26, - [1667212128.160827][14571:14571] CHIP:DMG: }, - [1667212128.160923][14571:14571] CHIP:DMG: - [1667212128.161002][14571:14571] CHIP:DMG: StatusIB = - [1667212128.161088][14571:14571] CHIP:DMG: { - [1667212128.161177][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667212128.161261][14571:14571] CHIP:DMG: }, - [1667212128.161347][14571:14571] CHIP:DMG: - [1667212128.161425][14571:14571] CHIP:DMG: }, - [1667212128.161512][14571:14571] CHIP:DMG: - [1667212128.161585][14571:14571] CHIP:DMG: }, - [1667212128.161672][14571:14571] CHIP:DMG: - disabled: true - - - label: "Cleanup the created user" - verification: | - ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " clear-user command response" on TH(lock-app): - - [1667212166.155071][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb8b90 exchange 25089r - [1667212166.155183][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212166.155247][14571:14571] CHIP:DMG: { - [1667212166.155305][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212166.155373][14571:14571] CHIP:DMG: timedRequest = true, - [1667212166.155512][14571:14571] CHIP:DMG: InvokeRequests = - [1667212166.155597][14571:14571] CHIP:DMG: [ - [1667212166.155661][14571:14571] CHIP:DMG: CommandDataIB = - [1667212166.155746][14571:14571] CHIP:DMG: { - [1667212166.155813][14571:14571] CHIP:DMG: CommandPathIB = - [1667212166.155897][14571:14571] CHIP:DMG: { - [1667212166.155980][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212166.156069][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212166.156157][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667212166.156239][14571:14571] CHIP:DMG: }, - [1667212166.156325][14571:14571] CHIP:DMG: - [1667212166.156448][14571:14571] CHIP:DMG: CommandFields = - [1667212166.156540][14571:14571] CHIP:DMG: { - [1667212166.156625][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212166.156711][14571:14571] CHIP:DMG: }, - [1667212166.156788][14571:14571] CHIP:DMG: }, - [1667212166.156866][14571:14571] CHIP:DMG: - [1667212166.156995][14571:14571] CHIP:DMG: ], - [1667212166.157080][14571:14571] CHIP:DMG: - [1667212166.157143][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212166.157249][14571:14571] CHIP:DMG: }, - [1667212166.157405][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212166.157487][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212166.157557][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D - [1667212166.157635][14571:14571] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=1] - [1667212166.157726][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667212166.157786][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667212166.157877][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=0,modifier=0,userName="",uniqueId=0,userStatus=0,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667212166.157944][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] - [1667212166.158208][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667212166.158421][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000010 priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012F4FC7 - [1667212166.158618][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=16,dataType=2,operation=1,nodeId=112233,fabricIndex=1] - [1667212166.158712][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212166.158784][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212166.158850][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212166.159031][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212166.159655][14571:14571] CHIP:EM: <<< [E:25089r M:67040752 (Ack:148378984)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212166.159768][14571:14571] CHIP:IN: (S) Sending msg 67040752 on secure session with LSID: 42485 - [1667212166.160473][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:39640 | 67040752 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 23540 / Exchange = 25089] - [1667212166.160580][14571:14571] CHIP:DMG: Header Flags = - [1667212166.160638][14571:14571] CHIP:DMG: { - [1667212166.160724][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212166.160782][14571:14571] CHIP:DMG: { - [1667212166.160843][14571:14571] CHIP:DMG: AckMsg = 148378984 - [1667212166.160900][14571:14571] CHIP:DMG: NeedsAck = true - [1667212166.160954][14571:14571] CHIP:DMG: } - [1667212166.161026][14571:14571] CHIP:DMG: } - [1667212166.161081][14571:14571] CHIP:DMG: - [1667212166.161152][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667212166.161208][14571:14571] CHIP:DMG: { - [1667212166.161263][14571:14571] CHIP:DMG: data = 00f45b00f0f5fe03cc9397f24c1d44b4ea110e128f8da000ebf4424aacf7a81440f5ba6e03e782be642b469ae0e7c01b2f40419057a024ff2a28f74cddb9d23d0977b0d1 - [1667212166.161322][14571:14571] CHIP:DMG: buffer_ptr = 187651867794208 - [1667212166.161376][14571:14571] CHIP:DMG: } - [1667212166.161428][14571:14571] CHIP:DMG: - [1667212166.161504][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667212166.161560][14571:14571] CHIP:DMG: { - [1667212166.161614][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021d1835012400001818181824ff0118 - [1667212166.161670][14571:14571] CHIP:DMG: } - [1667212166.161723][14571:14571] CHIP:DMG: - [1667212166.161860][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212166.161924][14571:14571] CHIP:DMG: { - [1667212166.161983][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212166.162059][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212166.162138][14571:14571] CHIP:DMG: [ - [1667212166.162210][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212166.162303][14571:14571] CHIP:DMG: { - [1667212166.162379][14571:14571] CHIP:DMG: CommandStatusIB = - [1667212166.162506][14571:14571] CHIP:DMG: { - [1667212166.162587][14571:14571] CHIP:DMG: CommandPathIB = - [1667212166.162675][14571:14571] CHIP:DMG: { - [1667212166.162765][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212166.162856][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212166.162947][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667212166.163032][14571:14571] CHIP:DMG: }, - [1667212166.163130][14571:14571] CHIP:DMG: - [1667212166.163208][14571:14571] CHIP:DMG: StatusIB = - [1667212166.163296][14571:14571] CHIP:DMG: { - [1667212166.163383][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667212166.163471][14571:14571] CHIP:DMG: }, - [1667212166.163558][14571:14571] CHIP:DMG: - [1667212166.163721][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear Credential command with SUCCESS response on TH(lock-app) log: + + [1685673444.692000][2668:2670] CHIP:DMG: InvokeResponseMessage = + [1685673444.692055][2668:2670] CHIP:DMG: { + [1685673444.692109][2668:2670] CHIP:DMG: suppressResponse = false, + [1685673444.692164][2668:2670] CHIP:DMG: InvokeResponseIBs = + [1685673444.692235][2668:2670] CHIP:DMG: [ + [1685673444.692292][2668:2670] CHIP:DMG: InvokeResponseIB = + [1685673444.692368][2668:2670] CHIP:DMG: { + [1685673444.692429][2668:2670] CHIP:DMG: CommandStatusIB = + [1685673444.692518][2668:2670] CHIP:DMG: { + [1685673444.692597][2668:2670] CHIP:DMG: CommandPathIB = + [1685673444.692691][2668:2670] CHIP:DMG: { + [1685673444.692783][2668:2670] CHIP:DMG: EndpointId = 0x1, + [1685673444.692879][2668:2670] CHIP:DMG: ClusterId = 0x101, + [1685673444.692974][2668:2670] CHIP:DMG: CommandId = 0x26, + [1685673444.693065][2668:2670] CHIP:DMG: }, + [1685673444.693164][2668:2670] CHIP:DMG: + [1685673444.693239][2668:2670] CHIP:DMG: StatusIB = + [1685673444.693330][2668:2670] CHIP:DMG: { + [1685673444.693517][2668:2670] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673444.693608][2668:2670] CHIP:DMG: }, + [1685673444.693700][2668:2670] CHIP:DMG: + [1685673444.693934][2668:2670] CHIP:DMG: }, + [1685673444.694029][2668:2670] CHIP:DMG: + [1685673444.694099][2668:2670] CHIP:DMG: }, + [1685673444.694183][2668:2670] CHIP:DMG: + [1685673444.694241][2668:2670] CHIP:DMG: ], + [1685673444.694410][2668:2670] CHIP:DMG: + [1685673444.694467][2668:2670] CHIP:DMG: InteractionModelRevision = 1 + [1685673444.694522][2668:2670] CHIP:DMG: }, + + + ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear User command with SUCCESS response on TH(lock-app) log: + + [1685673467.295855][2674:2676] CHIP:DMG: InvokeResponseMessage = + [1685673467.295906][2674:2676] CHIP:DMG: { + [1685673467.295986][2674:2676] CHIP:DMG: suppressResponse = false, + [1685673467.296044][2674:2676] CHIP:DMG: InvokeResponseIBs = + [1685673467.296116][2674:2676] CHIP:DMG: [ + [1685673467.296194][2674:2676] CHIP:DMG: InvokeResponseIB = + [1685673467.296271][2674:2676] CHIP:DMG: { + [1685673467.296361][2674:2676] CHIP:DMG: CommandStatusIB = + [1685673467.296432][2674:2676] CHIP:DMG: { + [1685673467.296519][2674:2676] CHIP:DMG: CommandPathIB = + [1685673467.296595][2674:2676] CHIP:DMG: { + [1685673467.296692][2674:2676] CHIP:DMG: EndpointId = 0x1, + [1685673467.296772][2674:2676] CHIP:DMG: ClusterId = 0x101, + [1685673467.296872][2674:2676] CHIP:DMG: CommandId = 0x1d, + [1685673467.296947][2674:2676] CHIP:DMG: }, + [1685673467.297053][2674:2676] CHIP:DMG: + [1685673467.297121][2674:2676] CHIP:DMG: StatusIB = + [1685673467.297217][2674:2676] CHIP:DMG: { + [1685673467.297295][2674:2676] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673467.297392][2674:2676] CHIP:DMG: }, + [1685673467.297468][2674:2676] CHIP:DMG: + [1685673467.297554][2674:2676] CHIP:DMG: }, + [1685673467.297632][2674:2676] CHIP:DMG: + [1685673467.297692][2674:2676] CHIP:DMG: }, + [1685673467.297836][2674:2676] CHIP:DMG: + [1685673467.297895][2674:2676] CHIP:DMG: ], + [1685673467.297997][2674:2676] CHIP:DMG: + [1685673467.298055][2674:2676] CHIP:DMG: InteractionModelRevision = 1 + [1685673467.298109][2674:2676] CHIP:DMG: }, disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml index 2dc8dbd544b233..fff517643af102 100644 --- a/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml @@ -33,12 +33,12 @@ tests: fields to the corresponding values. Values given below are for reference purpose. groupKeySetID: 0x01a3 groupKeySecurityPolicy: CacheAndSync (1) epochKey0: d0d1d2d3d4d5d6d7d8d9dadbdcdddedf - epochStartTime0: 0 epochKey1: d1d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime0: 1 epochKey1: d1d1d2d3d4d5d6d7d8d9dadbdcdddedf epochStartTime1: 2220001 epochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf epochStartTime2: 2220002" PICS: "!GRPKEY.S.F00 && GRPKEY.S.C00.Rsp " verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 1, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 0, "epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3", "groupKeySecurityPolicy": 1, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1, "epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 Verify DUT sends INVALID_COMMAND response on TH(chip-tool) Logs: diff --git a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml index f2f708f273f8d0..a3c8a70e81316a 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml @@ -36,9 +36,9 @@ tests: Verify for the "MaxGroupsPerFabric" value on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - [1683802556.948465][41067:41069] CHIP:DMG: } - [1683802556.948507][41067:41069] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0002 DataVersion: 1698601848 - [1683802556.948520][41067:41069] CHIP:TOO: MaxGroupsPerFabric: 12 + [1683797307.084182][38841:38843] CHIP:DMG: } + [1683797307.084220][38841:38843] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0002 DataVersion: 366443848 + [1683797307.084237][38841:38843] CHIP:TOO: MaxGroupsPerFabric: 12 Note: MaxGroupsPerFabric has a value 12 on TH log. It can be any value between [min=4, max=65535]. disabled: true @@ -52,8 +52,8 @@ tests: 0d1d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: 0d2d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index c4a35cad32dad2..d0810179e9bcf5 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -52,10 +52,8 @@ tests: d1d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml index 7c0428940d7992..7f718a160bb9a0 100644 --- a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml @@ -41,7 +41,7 @@ tests: Group Key Management cluster with the following fields set in the GroupKeySet struct:GroupKeySetId is 1,EpochKey0 is epoch_key_set0_epoch0,GroupKeySecurityPolicy = TrustFirst - (1),GroupKeyMulticastPolicy = PerGroupID (0),EpochStartTime0 = 0,TH + (0),GroupKeyMulticastPolicy = PerGroupID (0),EpochStartTime0 = 1,TH binds GroupId with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster with the values provided in the above steps" verification: | @@ -49,7 +49,7 @@ tests: ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": + "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 @@ -79,7 +79,7 @@ tests: [1686908179.975512][16775:16775] CHIP:DMG: 0x2 = [ [1686908179.975535][16775:16775] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, [1686908179.975553][16775:16775] CHIP:DMG: ] (16 bytes) - [1686908179.975572][16775:16775] CHIP:DMG: 0x3 = 2220000, + [1686908179.975572][16775:16775] CHIP:DMG: 0x3 = 1, [1686908179.975586][16775:16775] CHIP:DMG: 0x4 = [ [1686908179.975613][16775:16775] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, [1686908179.975635][16775:16775] CHIP:DMG: ] (16 bytes) diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml index 5b78ee21ece4ea..c23b7fae1ea6c1 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml @@ -26,6 +26,14 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + Commission DUT to TH (can be skipped if done in a preceding test). + TH reads from the DUT the RegisteredClients attribute. + If list of registered clients is not empty, unregister existing clients + TH reads from the DUT the RegisteredClients attribute. Verify that the DUT response contains empty list of registered clients. + disabled: true + - label: "Step 1: TH sends RegisterClient command. - CheckInNodeID: registering clients node ID - MonitoredSubject: monitored subject ID - Key: shared diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml index da710759d2c7ee..eed0da861284fa 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml @@ -22,7 +22,7 @@ PICS: - ICDM.S.C03.Rsp config: - nodeId: "0x12344321" + nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 @@ -30,7 +30,13 @@ tests: - label: "Step 1: TH reads from the DUT the ActiveModeThreshold attribute." PICS: ICDM.S.A0002 verification: | - Verify that the DUT response contains an uint16; value is 300 or higher + ./chip-tool icdmanagement read active-mode-threshold 1 0 + + On TH(chip-tool) log, Verify ActiveModeThreshold attribute should contains an uint16; value is 300 or higher below is the sample log provided for the raspi platform: + + + [1685127625953] [48160:461013] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0002 DataVersion: 326159709 + [1685127625953] [48160:461013] [TOO] ActiveModeThreshold: 300 disabled: true - label: "Step 2: TH sends StayActiveRequest command." @@ -44,5 +50,5 @@ tests: ActiveModeThreshold" PICS: ICDM.S.C03.Rsp verification: | - Verify DUT increases the remaining time in active mode by one ActiveModeThreshold + Design details pending. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 2a32e97e4872e0..e551005ca6ff93 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml @@ -38,7 +38,7 @@ tests: Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - - label: "Step 0a: " + - label: "Step 0a: SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT = 60 mins" PICS: " !ICDM.S " verification: | When the ICDM feature is not supported or enabled, the SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT is set to 60 minutes. @@ -71,45 +71,44 @@ tests: verification: | Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly(set the value greater than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) - onoff subscribe on-off 100 600 1 1 --keepSubscriptions true + onoff subscribe on-off 100 600 1 1 --keepSubscriptions true - On the CR1( chip-tool), verify a report data message is received and verify it contains the following data : + On the CR1( chip-tool), verify a report data message is received and verify it contains the following data : 1. Verify Report Data Message Received: - Check if a report data message is received on the CR1. + Check if a report data message is received on the CR1. 2. Verify Report Data Contents: - Confirm that the received report data message contains the data of the attribute/event that was previously requested. + Confirm that the received report data message contains the data of the attribute/event that was previously requested. 3. Verify Subscribe Response Fields: - Examine the Subscribe Response to ensure it includes the following fields: - SubscriptionId: Verify that it is of type uint32. - Verify MaxInterval Field: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + Verify MaxInterval Field: 4. Check for an additional field in the Subscribe Response: - MaxInterval: Verify that it is of type uint32. + MaxInterval: Verify that it is of type uint32. 5. Verify MaxInterval against MaxIntervalCeiling: - Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. - - [1690475115.797447][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475115.797452][5694:5696] CHIP:DMG: } - [1690475115.797536][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 - [1690475115.797556][5694:5696] CHIP:TOO: OnOff: FALSE - [1690475115.797577][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [AwaitingSu] - [1690475115.797625][5694:5696] CHIP:EM: <<< [E:36539i S:55497 M:232793668 (Ack:16536682)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) - [1690475115.797638][5694:5696] CHIP:IN: (S) Sending msg 232793668 on secure session with LSID: 55497 - [1690475115.798143][5694:5696] CHIP:EM: >>> [E:36539i S:55497 M:16536683 (Ack:232793668)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) - [1690475115.798165][5694:5696] CHIP:EM: Found matching exchange: 36539i, Delegate: 0x7fd84800fb30 - [1690475115.798179][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793668 from Retrans Table on exchange 36539i - [1690475115.798192][5694:5696] CHIP:DMG: SubscribeResponse is received - [1690475115.798206][5694:5696] CHIP:DMG: SubscribeResponseMessage = - [1690475115.798213][5694:5696] CHIP:DMG: { - [1690475115.798220][5694:5696] CHIP:DMG: SubscriptionId = 0x9b87e9c7, - [1690475115.798226][5694:5696] CHIP:DMG: MaxInterval = 0x258, - [1690475115.798232][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475115.798238][5694:5696] CHIP:DMG: } - [1690475115.798247][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x9b87e9c7 MinInterval = 100s MaxInterval = 600s Peer = 01:0000000000000001 - [1690475115.798256][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [Subscripti] + Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. + + [1693221742.765461][22261:22263] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 523169586 + [1693221742.765473][22261:22263] CHIP:TOO: OnOff: FALSE + [1693221742.765495][22261:22263] CHIP:DMG: MoveToState ReadClient[0x7f6070027e40]: Moving to [AwaitingSu] + [1693221742.765530][22261:22263] CHIP:EM: <<< [E:26388i S:13043 M:192043500 (Ack:11734613)] (S) Msg TX to 1:0000000000000001 [3DC0] --- Type 0001:01 (IM:StatusResponse) + [1693221742.765542][22261:22263] CHIP:IN: (S) Sending msg 192043500 on secure session with LSID: 13043 + [1693221742.765587][22261:22263] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1693221742.765594][22261:22263] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1693221742.765981][22261:22263] CHIP:EM: >>> [E:26388i S:13043 M:11734614 (Ack:192043500)] (S) Msg RX from 1:0000000000000001 [3DC0] --- Type 0001:04 (IM:SubscribeResponse) + [1693221742.765991][22261:22263] CHIP:EM: Found matching exchange: 26388i, Delegate: 0x7f6070027e50 + [1693221742.766002][22261:22263] CHIP:EM: Rxd Ack; Removing MessageCounter:192043500 from Retrans Table on exchange 26388i + [1693221742.766012][22261:22263] CHIP:DMG: SubscribeResponse is received + [1693221742.766025][22261:22263] CHIP:DMG: SubscribeResponseMessage = + [1693221742.766031][22261:22263] CHIP:DMG: { + [1693221742.766038][22261:22263] CHIP:DMG: SubscriptionId = 0x15e2f82f, + [1693221742.766045][22261:22263] CHIP:DMG: MaxInterval = 0x64, + [1693221742.766051][22261:22263] CHIP:DMG: InteractionModelRevision = 10 + [1693221742.766057][22261:22263] CHIP:DMG: } + [1693221742.766068][22261:22263] CHIP:DMG: Subscription established with SubscriptionID = 0x15e2f82f MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: @@ -120,47 +119,92 @@ tests: sends a Subscribe Response Message to the CR1 to activate the subscription." verification: | - Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly( set the value less than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + To ensure that CR1 and CR2 are on the same fabric and that CR1 grants access to CR2, Please send the below mentioned command, it will configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + + accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":null, "deviceType":null}]}]' 1 0 + [1689933254.566655][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:156974239 from Retrans Table on exchange 6316i + [1689933254.566660][48781:48783] CHIP:DMG: WriteClient moving to [ResponseRe] + [1689933254.566671][48781:48783] CHIP:DMG: WriteResponseMessage = + [1689933254.566675][48781:48783] CHIP:DMG: { + [1689933254.566677][48781:48783] CHIP:DMG: AttributeStatusIBs = + [1689933254.566682][48781:48783] CHIP:DMG: [ + [1689933254.566684][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566688][48781:48783] CHIP:DMG: { + [1689933254.566691][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566695][48781:48783] CHIP:DMG: { + [1689933254.566698][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566702][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566705][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566708][48781:48783] CHIP:DMG: } + [1689933254.566713][48781:48783] CHIP:DMG: + [1689933254.566716][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566720][48781:48783] CHIP:DMG: { + [1689933254.566723][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566726][48781:48783] CHIP:DMG: }, + [1689933254.566730][48781:48783] CHIP:DMG: + [1689933254.566732][48781:48783] CHIP:DMG: }, + [1689933254.566739][48781:48783] CHIP:DMG: + [1689933254.566741][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566744][48781:48783] CHIP:DMG: { + [1689933254.566747][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566750][48781:48783] CHIP:DMG: { + [1689933254.566752][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566756][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566760][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566763][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566766][48781:48783] CHIP:DMG: } + [1689933254.566770][48781:48783] CHIP:DMG: + [1689933254.566773][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566776][48781:48783] CHIP:DMG: { + [1689933254.566779][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566782][48781:48783] CHIP:DMG: }, + [1689933254.566786][48781:48783] CHIP:DMG: + [1689933254.566789][48781:48783] CHIP:DMG: }, + [1689933254.566794][48781:48783] CHIP:DMG: + [1689933254.566797][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566800][48781:48783] CHIP:DMG: { + [1689933254.566802][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566805][48781:48783] CHIP:DMG: { + [1689933254.566808][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566811][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566815][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566818][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566821][48781:48783] CHIP:DMG: } + [1689933254.566825][48781:48783] CHIP:DMG: + [1689933254.566828][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566831][48781:48783] CHIP:DMG: { + [1689933254.566834][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566837][48781:48783] CHIP:DMG: }, + [1689933254.566840][48781:48783] CHIP:DMG: + [1689933254.566843][48781:48783] CHIP:DMG: }, + [1689933254.566847][48781:48783] CHIP:DMG: + [1689933254.566849][48781:48783] CHIP:DMG: ], + [1689933254.566857][48781:48783] CHIP:DMG: + [1689933254.566859][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933254.566862][48781:48783] CHIP:DMG: } + [1689933254.566897][48781:48783] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1689933254.566916][48781:48783] CHIP:EM: <<< [E:6316i S:13964 M:156974240 (Ack:46397313)] (S) Msg TX to 1:0000000000000001 [B15F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689933254.566922][48781:48783] CHIP:IN: (S) Sending msg 156974240 on secure session with LSID: 13964 - basicinformation subscribe location 10 400 1 0 --keepSubscriptions true + If CR2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and CR2 will not be able to access the attribute due to the restricted access. - On the CR1(chip-tool), verify a report data message is received and verify it contains the following data : - 1. Verify Report Data Message Received: - Check if a report data message is received on the CR1 (target hardware). + below provided the example command used to subscribe location attribute from basicinformation cluster from node id(4) that have access to the “levelcontrol” cluster - 2. Verify Report Data Contents: - Confirm that the received report data message contains the data of the attribute/event that was previously requested. + basicinformation subscribe location 10 2400 1 0 --commissioner-nodeid 4 + [1689933387.304826][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:42350588 from Retrans Table on exchange 6319i + [1689933387.304834][48781:48783] CHIP:DMG: StatusResponseMessage = + [1689933387.304838][48781:48783] CHIP:DMG: { + [1689933387.304841][48781:48783] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1689933387.304845][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933387.304846][48781:48783] CHIP:DMG: } + [1689933387.304850][48781:48783] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1689933387.304864][48781:48783] CHIP:EM: <<< [E:6319i S:13965 M:42350589 (Ack:227168589)] (S) Msg TX to 2:0000000000000001 [B15F] --- Type 0001:01 (IM:StatusResponse) + [1689933387.304869][48781:48783] CHIP:IN: (S) Sending msg 42350589 on secure session with LSID: 13965 + [1689933387.304882][48781:48783] CHIP:DMG: MoveToState ReadClient[0x7fd404019110]: Moving to [ Idle] - 3. Verify Subscribe Response Fields: - Examine the Subscribe Response to ensure it includes the following fields: - SubscriptionId: Verify that it is of type uint32. - MaxInterval: Verify that it is of type uint32. - - 4. Verify MaxInterval against SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT: - Compare the MaxInterval value received in the Subscribe Response to the value of SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. - Verify that the MaxInterval value is less than or equal to SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. - - [1690475286.624596][5694:5696] CHIP:DMG: - [1690475286.624598][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475286.624600][5694:5696] CHIP:DMG: } - [1690475286.624620][5694:5696] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 2118637528 - [1690475286.624625][5694:5696] CHIP:TOO: Location: XX - [1690475286.624631][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [AwaitingSu] - [1690475286.624645][5694:5696] CHIP:EM: <<< [E:36540i S:55497 M:232793671 (Ack:16536684)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) - [1690475286.624649][5694:5696] CHIP:IN: (S) Sending msg 232793671 on secure session with LSID: 55497 - [1690475286.624771][5694:5696] CHIP:EM: >>> [E:36540i S:55497 M:16536685 (Ack:232793671)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) - [1690475286.624775][5694:5696] CHIP:EM: Found matching exchange: 36540i, Delegate: 0x7fd848010a60 - [1690475286.624778][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793671 from Retrans Table on exchange 36540i - [1690475286.624782][5694:5696] CHIP:DMG: SubscribeResponse is received - [1690475286.624787][5694:5696] CHIP:DMG: SubscribeResponseMessage = - [1690475286.624789][5694:5696] CHIP:DMG: { - [1690475286.624791][5694:5696] CHIP:DMG: SubscriptionId = 0xc96fec0e, - [1690475286.624793][5694:5696] CHIP:DMG: MaxInterval = 0x190, - [1690475286.624796][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475286.624798][5694:5696] CHIP:DMG: } - [1690475286.624801][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0xc96fec0e MinInterval = 10s MaxInterval = 400s Peer = 01:0000000000000001 - [1690475286.624805][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [Subscripti] + With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true - label: @@ -348,6 +392,7 @@ tests: [1687418591.903262][167960:167962] CHIP:DMG: MoveToState ReadClient[0x7fc81c00bbc0]: Moving to With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml index 5983a71fcef102..610125bcaf6bf9 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml @@ -17,6 +17,7 @@ name: 3.4.3.[TC-IDM-4.4] Persistent Subscription Test Cases. [DUT as Server] PICS: - MCORE.IDM.S + - MCORE.IDM.S.PersistentSubscription config: nodeId: 0x12344321 @@ -24,6 +25,18 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + - label: "Step 1: TH sends a subscription request action for an attribute to the DUT. Activate the subscription between DUT and the TH." diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index f96eca2c6bfe3a..f8c43fa159f8fb 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -28,8 +28,14 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml index c7050278c936ea..04a3882a05a2e0 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml @@ -28,8 +28,8 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. disabled: true - label: "Note" @@ -37,6 +37,12 @@ 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: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + - label: "Step 1: DUT sends Subscribe Request Message to the TH for a supported event." @@ -114,7 +120,7 @@ tests: - label: "Step 5: With an active Event subscription from DUT to TH, TH sends - Report Data message to DUT with an inactive SubscriptionId." + Report Data message to DUT with an invalid SubscriptionId." verification: | Mark this as not testable /NA. Out of Scope for V1.0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index a65bf0daf41c1f..036a44caa7ff6e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml @@ -26,8 +26,8 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. disabled: true - label: "Precondition" @@ -59,6 +59,10 @@ tests: *Provision the device using chip tool on 5th controller(RD5) ./chip-tool pairing code 5 35358158796(mannualcode) --commissioner-name 5 + + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: @@ -440,8 +444,6 @@ tests: [1692947914.492003][3667:3669] CHIP:DMG: MoveToState ReadClient[0xaaaafcb72000]: Moving to [Subscripti] - - #4. on the 4th reference device(RD4) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 4 '0,0,0' --commissioner-name 4 --keepSubscriptions true [1692947922.587132][3670:3672] CHIP:DMG: } @@ -470,8 +472,6 @@ tests: [1692947922.589442][3670:3672] CHIP:DMG: MoveToState ReadClient[0xaaaaf8a11000]: Moving to [Subscripti] - - #5. on the 5th reference device(RD5) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 5 '0,0,0' --commissioner-name 5 --keepSubscriptions true [1692947931.880011][3673:3675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 @@ -534,7 +534,7 @@ tests: disabled: true - label: - "Step 3b: RD2, RD3, RD4, RD5 send 3 Subscribe request messages each + "Step 3: RD2, RD3, RD4, RD5 send 3 Subscribe request messages each with each of them having 3 different paths. Verify that the subscription request messages from all reference devices succeed. Once all the Subscription Requests are activated, RD1 sends 6 subscription @@ -545,11 +545,11 @@ tests: #1. on the 2nd reference device(RD2) send a Subscribe Request Messages to DUT.(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 2 '0,0,0' --commissioner-name beta --keepSubscriptions true [1684322787.342206][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322787.342219][136396:136398] CHIP:TOO: LocalConfigDisabled: FALSE + [1684322787.342219][136396:136398] CHIP:TOO: LocalConfigDisabled: TRUE [1684322787.342246][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322787.342255][136396:136398] CHIP:TOO: Location: XX + [1684322787.342255][136396:136398] CHIP:TOO: Location: in [1684322787.342282][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322787.342289][136396:136398] CHIP:TOO: NodeLabel: + [1684322787.342289][136396:136398] CHIP:TOO: NodeLabel: "newnode" [1684322787.342308][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0001a460]: Moving to [AwaitingSu] [1684322787.342351][136396:136398] CHIP:EM: <<< [E:35584i S:50848 M:252532050 (Ack:201846722)] (S) Msg TX to 2:0000000000000002 [8559] --- Type 0001:01 (IM:StatusResponse) [1684322787.342363][136396:136398] CHIP:IN: (S) Sending msg 252532050 on secure session with LSID: 50848 @@ -572,11 +572,11 @@ tests: #2. on the 3rd reference device(RD3) send a Subscribe Request Messages to DUT..(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 3 '0,0,0' --commissioner-name gamma --keepSubscriptions true [1684322803.467486][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322803.467490][136409:136411] CHIP:TOO: LocalConfigDisabled: FALSE + [1684322803.467490][136409:136411] CHIP:TOO: LocalConfigDisabled: TRUE [1684322803.467499][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322803.467502][136409:136411] CHIP:TOO: Location: XX + [1684322803.467502][136409:136411] CHIP:TOO: Location: in [1684322803.467511][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322803.467513][136409:136411] CHIP:TOO: NodeLabel: + [1684322803.467513][136409:136411] CHIP:TOO: NodeLabel: "newnode" [1684322803.467520][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc01bb90]: Moving to [AwaitingSu] [1684322803.467531][136409:136411] CHIP:EM: <<< [E:42346i S:52489 M:199100316 (Ack:174085431)] (S) Msg TX to 3:0000000000000003 [5371] --- Type 0001:01 (IM:StatusResponse) [1684322803.467535][136409:136411] CHIP:IN: (S) Sending msg 199100316 on secure session with LSID: 52489 @@ -598,11 +598,11 @@ tests: #3. on the 4th reference device(RD4) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 4 '0,0,0' --commissioner-name 4 --keepSubscriptions true [1684322837.225922][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322837.225930][136403:136405] CHIP:TOO: LocalConfigDisabled: FALSE + [1684322837.225930][136403:136405] CHIP:TOO: LocalConfigDisabled: TRUE [1684322837.225940][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322837.225943][136403:136405] CHIP:TOO: Location: XX + [1684322837.225943][136403:136405] CHIP:TOO: Location: in [1684322837.225952][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322837.225955][136403:136405] CHIP:TOO: NodeLabel: + [1684322837.225955][136403:136405] CHIP:TOO: NodeLabel: "newnode" [1684322837.225961][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc019c70]: Moving to [AwaitingSu] [1684322837.225980][136403:136405] CHIP:EM: <<< [E:28544i S:21311 M:202084358 (Ack:249111943)] (S) Msg TX to 4:0000000000000004 [8451] --- Type 0001:01 (IM:StatusResponse) [1684322837.225984][136403:136405] CHIP:IN: (S) Sending msg 202084358 on secure session with LSID: 21311 @@ -624,11 +624,11 @@ tests: #4. on the 5th reference device(RD5) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 5 '0,0,0' --commissioner-name 5 --keepSubscriptions true [1684322852.957519][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322852.957525][136414:136416] CHIP:TOO: LocalConfigDisabled: FALSE + [1684322852.957525][136414:136416] CHIP:TOO: LocalConfigDisabled: TRUE [1684322852.957537][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322852.957541][136414:136416] CHIP:TOO: Location: XX + [1684322852.957541][136414:136416] CHIP:TOO: Location: in [1684322852.957552][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322852.957556][136414:136416] CHIP:TOO: NodeLabel: + [1684322852.957556][136414:136416] CHIP:TOO: NodeLabel: "newnode" [1684322852.957564][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a400e880]: Moving to [AwaitingSu] [1684322852.957585][136414:136416] CHIP:EM: <<< [E:5171i S:40695 M:166661007 (Ack:81061555)] (S) Msg TX to 5:0000000000000005 [D311] --- Type 0001:01 (IM:StatusResponse) [1684322852.957590][136414:136416] CHIP:IN: (S) Sending msg 166661007 on secure session with LSID: 40695 @@ -698,17 +698,17 @@ tests: request messages having 3 different paths from RD1A to the DUT." verification: | RD1, RD2, RD3, RD4, RD5 send 3 Subscribe request messages each with each of them having 3 different paths. - Verify that the subscription request messages from RD1, RD2, RD3, RD4 and RD5 succeed. - Once all the Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT + Verify that the subscription request messages from RD1, RD2, RD3, RD4 and RD5 succeed. + Once all the Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT #1. on the first reference device(RD1) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 1 '0,0,0' --keepSubscriptions true [1684323009.937251][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323009.937257][136393:136395] CHIP:TOO: LocalConfigDisabled: FALSE + [1684323009.937257][136393:136395] CHIP:TOO: LocalConfigDisabled: TRUE [1684323009.937274][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323009.937279][136393:136395] CHIP:TOO: Location: XX + [1684323009.937279][136393:136395] CHIP:TOO: Location: in [1684323009.937293][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323009.937298][136393:136395] CHIP:TOO: NodeLabel: + [1684323009.937298][136393:136395] CHIP:TOO: NodeLabel: "newnode" [1684323009.937308][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb510002110]: Moving to [AwaitingSu] [1684323009.937334][136393:136395] CHIP:EM: <<< [E:41663i S:42488 M:180349725 (Ack:108042016)] (S) Msg TX to 1:0000000000000001 [E777] --- Type 0001:01 (IM:StatusResponse) [1684323009.937339][136393:136395] CHIP:IN: (S) Sending msg 180349725 on secure session with LSID: 42488 @@ -729,11 +729,11 @@ tests: #2. on the 2nd reference device(RD2) send a Subscribe Request Messages to DUT.(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 2 '0,0,0' --commissioner-name beta --keepSubscriptions true [1684323023.679481][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323023.679488][136396:136398] CHIP:TOO: LocalConfigDisabled: FALSE + [1684323023.679488][136396:136398] CHIP:TOO: LocalConfigDisabled: TRUE [1684323023.679503][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323023.679508][136396:136398] CHIP:TOO: Location: xx + [1684323023.679508][136396:136398] CHIP:TOO: Location: in [1684323023.679521][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323023.679525][136396:136398] CHIP:TOO: NodeLabel: + [1684323023.679525][136396:136398] CHIP:TOO: NodeLabel: "newnode" [1684323023.679535][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0000a890]: Moving to [AwaitingSu] [1684323023.679556][136396:136398] CHIP:EM: <<< [E:35585i S:50848 M:252532054 (Ack:201846726)] (S) Msg TX to 2:0000000000000002 [8559] --- Type 0001:01 (IM:StatusResponse) [1684323023.679563][136396:136398] CHIP:IN: (S) Sending msg 252532054 on secure session with LSID: 50848 @@ -755,11 +755,11 @@ tests: #3. on the 3rd reference device(RD3) send a Subscribe Request Messages to DUT..(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 3 '0,0,0' --commissioner-name gamma --keepSubscriptions true [1684323039.115907][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323039.115916][136409:136411] CHIP:TOO: LocalConfigDisabled: FALSE + [1684323039.115916][136409:136411] CHIP:TOO: LocalConfigDisabled: TRUE [1684323039.115943][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323039.115949][136409:136411] CHIP:TOO: Location: XX + [1684323039.115949][136409:136411] CHIP:TOO: Location: in [1684323039.115977][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323039.115981][136409:136411] CHIP:TOO: NodeLabel: + [1684323039.115981][136409:136411] CHIP:TOO: NodeLabel: "newnode" [1684323039.116000][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc016c20]: Moving to [AwaitingSu] [1684323039.116030][136409:136411] CHIP:EM: <<< [E:42347i S:52489 M:199100320 (Ack:174085435)] (S) Msg TX to 3:0000000000000003 [5371] --- Type 0001:01 (IM:StatusResponse) [1684323039.116039][136409:136411] CHIP:IN: (S) Sending msg 199100320 on secure session with LSID: 52489 @@ -781,11 +781,11 @@ tests: #4. on the 4th reference device(RD4) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 4 '0,0,0' --commissioner-name 4 --keepSubscriptions true [1684323055.304162][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323055.304177][136403:136405] CHIP:TOO: LocalConfigDisabled: FALSE + [1684323055.304177][136403:136405] CHIP:TOO: LocalConfigDisabled: TRUE [1684323055.304206][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323055.304216][136403:136405] CHIP:TOO: Location: XX + [1684323055.304216][136403:136405] CHIP:TOO: Location: in [1684323055.304243][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323055.304250][136403:136405] CHIP:TOO: NodeLabel: + [1684323055.304250][136403:136405] CHIP:TOO: NodeLabel: "newnode" [1684323055.304274][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc010a60]: Moving to [AwaitingSu] [1684323055.304312][136403:136405] CHIP:EM: <<< [E:28545i S:21311 M:202084362 (Ack:249111947)] (S) Msg TX to 4:0000000000000004 [8451] --- Type 0001:01 (IM:StatusResponse) [1684323055.304324][136403:136405] CHIP:IN: (S) Sending msg 202084362 on secure session with LSID: 21311 @@ -806,11 +806,11 @@ tests: any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 5 '0,0,0' --commissioner-name 5 --keepSubscriptions true [1684323072.765216][136414:136416] CHIP:DMG: } [1684323072.765277][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323072.765290][136414:136416] CHIP:TOO: LocalConfigDisabled: FALSE + [1684323072.765290][136414:136416] CHIP:TOO: LocalConfigDisabled: TRUE [1684323072.765318][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323072.765327][136414:136416] CHIP:TOO: Location: XX + [1684323072.765327][136414:136416] CHIP:TOO: Location: in [1684323072.765352][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323072.765359][136414:136416] CHIP:TOO: NodeLabel: + [1684323072.765359][136414:136416] CHIP:TOO: NodeLabel: "newnode" [1684323072.765379][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a4014ee0]: Moving to [AwaitingSu] [1684323072.765426][136414:136416] CHIP:EM: <<< [E:5172i S:40695 M:166661011 (Ack:81061559)] (S) Msg TX to 5:0000000000000005 [D311] --- Type 0001:01 (IM:StatusResponse) [1684323072.765439][136414:136416] CHIP:IN: (S) Sending msg 166661011 on secure session with LSID: 40695 diff --git a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml index 77cd19748e8e0b..d5061b3a8302f8 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml @@ -178,7 +178,7 @@ tests: IdentifyType from Step 1b, in order to indicate to an observer which of several nodes and/or endpoints it is." verification: | - Verify that the device enters its identification state using the IdentifyType from step1b, + Verify that the identification state is terminated in the DUT. Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT cluster: "LogCommands" diff --git a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml index c944969c939f11..78ade89999317c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml @@ -26,6 +26,20 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Refer to device or application documentation for supported DUT configuration. + For step 3 (prompt user), manufacturer may utilize a custom method for obtaining user consent other than an on-screen prompt. + Refer to manufacturer provided instructions for special argument values to each command, and/or additional steps required to put DUT into correct state to exhibit test behavior. + disabled: true + + - label: "Pre-Conditions" + verification: | + 1. DUT and Harness support Commissioner Discovery feature + 2. DUT is already in the network + 3. DUT supports AccountLogin cluster for certain Content Apps + disabled: true + - label: "Step 1: TH start scanning for available commissioners using Commissioner Discovery" 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 index 7b0beddcff57d2..daf603b235af8d 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml @@ -128,7 +128,7 @@ tests: After commissioning DUT to TH2's fabric read nocs - Verify the FabricIndex value during commissioning in TH2 Log + Save the the FabricIndex and NOC value during commissioning in TH2 Log [1673249259.166158][1742:1744] CHIP:DIS: Keeping DNSSD lookup active @@ -188,7 +188,7 @@ tests: CHIP:EM: Sending Standalone Ack for MessageCounter:7141893 on exchange 26909i disabled: true - - label: "Verify that CurrentFabricIndex = FabricIndex_TH1" + - label: "Step 7: Verify that CurrentFabricIndex = FabricIndex_TH1" verification: | Verify that CurrentFabricIndex = FabricIndex_TH1 disabled: true @@ -211,8 +211,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH1" + "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 @@ -243,8 +243,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH1" + "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 @@ -273,9 +273,9 @@ tests: disabled: true - label: - "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 + "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 @@ -309,8 +309,8 @@ tests: disabled: true - label: - "Verify that TH1 is able to read the FabricDescriptorStruct values - Verify that Fabrics list does not have any entry as FabricID = + "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 @@ -338,7 +338,7 @@ tests: CHIP:EM: Sending Standalone Ack for MessageCounter:8900122 on exchange 26519i disabled: true - - label: "Verify that CurrentFabricIndex = FabricIndex_TH2" + - label: "Step 17: Verify that CurrentFabricIndex = FabricIndex_TH2" verification: | Verify that CurrentFabricIndex = FabricIndex_TH2 disabled: true @@ -362,8 +362,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH2" + "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 @@ -393,8 +393,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH2" + "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 @@ -423,9 +423,9 @@ tests: disabled: true - label: - "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 + "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 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 82ae75fb18f437..469f42d27ae55f 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 @@ -45,10 +45,13 @@ tests: - label: "Step 2: Start the commissioning process of TH with DUT" verification: | - ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 + On dut(chip-tool) side: + ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 [1641381202.376419][5628:5633] CHIP:CTL: Received success response 0x3df8 - sudo ./all-clusters-app --wifi + + On TH(all-clusters-app) + ./all-clusters-app --wifi [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml index d835f8305e630d..e1d0eb9cb4e18b 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml @@ -91,20 +91,17 @@ tests: disabled: true - label: - "Step 3: DUT shouldnt be discoverable via both commissionable and - operational advertisements" - PICS: "!MCORE.DD.EXTENDED_DISCOVERY" + "Step 3: Verify that the DUT is not advertising as an operational node + on DNS-SD with service type _matter._tcp" verification: | - Verify DUT is not discoverable over DNS-SD in both TCP and UDP - - avahi-browse -rt _matterc._tcp - avahi-browse -rt _matterc._udp + Verify that the DUT is not advertising as an operational node on DNS-SD with service type _matter._tcp + avahi-browse -rt _matter._tcp disabled: true - label: - "Step 4: DUT should be discoverable via commissionable service - advertisements but shall not be in the commissioning mode" - PICS: MCORE.DD.EXTENDED_DISCOVERY + "Step 4: If the DUT is advertising as a commissionable node with CM=2 + over DNS-SD or advertising the Matter service over BLE, TH commissions + the device" verification: | Verify that the DUT is discoverable over DNS-SD with service type _matterc._udp with no subtype _CM and text key for CM with value 0 diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml deleted file mode 100644 index 6720a5b1f8cba1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml +++ /dev/null @@ -1,374 +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 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: 202.2.1. [TC-OPSTATE-2.1] Attributes with DUT as Server - -PICS: - - OPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the PhaseList attribute" - PICS: OPSTATE.S.A0000 - verification: | - ./chip-tool operationalstate read phase-list 1 1 - Via the TH (chip-tool), verify: - - that PhaseList attribute value contains either null or a list of strings. - - that the list has no more than 32 entries. on TH(chip-tool) - - [1689673042.242432][16559:16561] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0000 DataVersion: 2102885775 - [1689673042.242467][16559:16561] CHIP:TOO: PhaseList: null - [1689673042.242534][16559:16561] CHIP:EM: <<< [E:48068i S:38311 M:143641441 (Ack:153463022)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673042.242550][16559:16561] CHIP:IN: (S) Sending msg 143641441 on secure session with LSID: 38311 - [1689673042.242576][16559:16561] CHIP:EM: Flushed pending ack for MessageCounter:153463022 on exchange 48068i - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentPhase attribute" - PICS: OPSTATE.S.A0001 - verification: | - ./chip-tool operationalstate read current-phase 1 1 - - - Via the TH (chip-tool), verify: - - if the value from Step 1 was null, verify that this is also null. - - otherwise, verify that the CurrentPhase attribute value contains contains an integer between 0 and the size of the list from step 1 minus 1. - - [1689673092.833781][16569:16571] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0001 DataVersion: 2102885775 - [1689673092.833792][16569:16571] CHIP:TOO: CurrentPhase: null - [1689673092.833817][16569:16571] CHIP:EM: <<< [E:13231i S:9793 M:23831753 (Ack:197019464)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673092.833821][16569:16571] CHIP:IN: (S) Sending msg 23831753 on secure session with LSID: 9793 - [1689673092.833830][16569:16571] CHIP:EM: Flushed pending ack for MessageCounter:197019464 on exchange 13231i - disabled: true - - - label: "Step 4: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read countdown-time 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 0 to 259200 - - [1689673127.371922][16577:16579] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0002 DataVersion: 2102885775 - [1689673127.371959][16577:16579] CHIP:TOO: CountdownTime: null - [1689673127.372043][16577:16579] CHIP:EM: <<< [E:30495i S:28535 M:52017774 (Ack:9447363)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673127.372059][16577:16579] CHIP:IN: (S) Sending msg 52017774 on secure session with LSID: 28535 - [1689673127.372096][16577:16579] CHIP:EM: Flushed pending ack for MessageCounter:9447363 on exchange 30495i - [1689673127.372209][16577:16577] CHIP:CTL: Shutting down the commissioner - [1689673127.372229][16577:16577] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: "Step 5: TH reads from the DUT the OperationalStateList attribute" - PICS: OPSTATE.S.A0003 - verification: | - ./chip-tool operationalstate read operational-state-list 1 1 - - Via the TH (chip-tool), verify: - - the provided list contains the Error state (an entry with an ID of 0x03). - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - [1689673161.214277][16581:16583] CHIP:DMG: } - [1689673161.214405][16581:16583] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0003 DataVersion: 2102885775 - [1689673161.214450][16581:16583] CHIP:TOO: OperationalStateList: 4 entries - [1689673161.214465][16581:16583] CHIP:TOO: [1]: { - [1689673161.214479][16581:16583] CHIP:TOO: OperationalStateID: 0 - [1689673161.214486][16581:16583] CHIP:TOO: } - [1689673161.214495][16581:16583] CHIP:TOO: [2]: { - [1689673161.214500][16581:16583] CHIP:TOO: OperationalStateID: 1 - [1689673161.214506][16581:16583] CHIP:TOO: } - [1689673161.214513][16581:16583] CHIP:TOO: [3]: { - [1689673161.214519][16581:16583] CHIP:TOO: OperationalStateID: 2 - [1689673161.214524][16581:16583] CHIP:TOO: } - [1689673161.214532][16581:16583] CHIP:TOO: [4]: { - [1689673161.214537][16581:16583] CHIP:TOO: OperationalStateID: 3 - [1689673161.214543][16581:16583] CHIP:TOO: } - [1689673161.214602][16581:16583] CHIP:EM: <<< [E:25860i S:31003 M:109977752 (Ack:203100043)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673161.214616][16581:16583] CHIP:IN: (S) Sending msg 109977752 on secure session with LSID: 31003 - [1689673161.214642][16581:16583] CHIP:EM: Flushed pending ack for MessageCounter:203100043 on exchange 25860i - disabled: true - - - label: "Step 6: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operational-state 1 1 - - Via the TH (chip-tool), verify: - - the response includes an ID (enum8) amd a label (string) - - the provided ID is found in the set provided in step 4 - - the provided ID is in the allowed range - - [1689673213.434610][16591:16593] CHIP:DMG: } - [1689673213.434686][16591:16593] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 2102885775 - [1689673213.434721][16591:16593] CHIP:TOO: OperationalState: { - [1689673213.434728][16591:16593] CHIP:TOO: OperationalStateID: 0 - [1689673213.434735][16591:16593] CHIP:TOO: } - [1689673213.434799][16591:16593] CHIP:EM: <<< [E:57905i S:36558 M:162792358 (Ack:245583777)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673213.434812][16591:16593] CHIP:IN: (S) Sending msg 162792358 on secure session with LSID: 36558 - [1689673213.434839][16591:16593] CHIP:EM: Flushed pending ack for MessageCounter:245583777 on exchange 57905i - [1689673213.434993][16591:16591] CHIP:CTL: Shutting down the commissioner - disabled: true - - - label: - "Step 6a: manually put the device in the Stopped(0x00) operational - state" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_STOPPED - verification: | - manually put the device in the Stopped(0x00) operational state - disabled: true - - - label: "Step 6b: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_STOPPED - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Stopped(0x00) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 0 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 6c: manually put the device in the Running(0x01) operational - state" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_RUNNING - verification: | - manually put the device in the Running(0x01) operational state - disabled: true - - - label: "Step 6d: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_RUNNING - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Running(0x01) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 1 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 6e: manually put the device in the Paused(0x02) operational - state" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_PAUSED - verification: | - manually put the device in the Paused(0x02) operational state - disabled: true - - - label: "Step 6f: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_PAUSED - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Paused(0x02) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 2 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 6g: manually put the device in the Error(0x03) operational state" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_ERROR - verification: | - manually put the device in the Error(0x03) operational state - disabled: true - - - label: "Step 6h: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 && OPSTATE.S.M.ST_ERROR - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Error(0x03) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 3 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: "Step 7: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an instance of ErrorStateStruct and Verify the ErrorStateID is a defined error (NoError(0x00), UnableToStartOrResume(0x01), UnableToCompleteOperation(0x02), CommandInvalidInState(0x03)) or in the range 0x80 to 0xBF. - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 3 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: "Step 7a: manually put the device in the NoError(0x00) error state" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_NO_ERROR - verification: | - manually put the device in the NoError(0x00) error state - disabled: true - - - label: "Step 7b: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_NO_ERROR - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to SeekingCharger(0x40) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 64 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 7c: manually put the device in the UnableToStartOrResume(0x01) - error state" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME - verification: | - manually put the device in the UnableToStartOrResume(0x01) error state - disabled: true - - - label: "Step 7d: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME - verification: | - ./chip-tool operationalstate read operational-state 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Charging(0x41) - - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 65 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 7e: manually put the device in the - UnableToCompleteOperation(0x02) error state" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION - verification: | - manually put the device in the Docked(0x42) operational state - disabled: true - - - label: "Step 7f: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION - verification: | - ./chip-tool operationalstate read operational-error 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an OperationalStateEnum value. Verify this is set to Docked(0x42) - [1690201842.479098][15020:15022] CHIP:DMG: SuppressResponse = true, - [1690201842.479158][15020:15022] CHIP:DMG: InteractionModelRevision = 1 - [1690201842.479211][15020:15022] CHIP:DMG: } - [1690201842.479528][15020:15022] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 3675566847 - [1690201842.479656][15020:15022] CHIP:TOO: OperationalState: 66 - [1690201842.479966][15020:15022] CHIP:EM: <<< [E:7640i S:22973 M:102288525 (Ack:157133280)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201842.480062][15020:15022] CHIP:IN: (S) Sending msg 102288525 on secure session with LSID: 22973 - [1690201842.480329][15020:15022] CHIP:EM: Flushed pending ack for MessageCounter:157133280 on exchange 7640i - [1690201842.480735][15020:15020] CHIP:CTL: Shutting down the commissioner - [1690201842.480807][15020:15020] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: - "Step 7g: manually put the device in the CommandInvalidInState(0x03) - error state" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE - verification: | - ./chip-tool operationalstate read operational-error 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an instance of ErrorStateStruct and Verify the ErrorStateID is a defined error (NoError(0x00), UnableToStartOrResume(0x01), UnableToCompleteOperation(0x02), CommandInvalidInState(0x03), FailedToFindChargingDock(0x40), Stuck(0x41), DustBinMissing(0x42), DustBinFull(0x43), WaterTankEmpty(0x44), WaterTankMissing(0x45), WaterTankLidOpen(0x46), MopCleaningPadMissing(0x47)) or in the range 0x80 to 0xBF. - - - [1690201879.312424][15025:15027] CHIP:DMG: } - [1690201879.312754][15025:15027] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0005 DataVersion: 3675566847 - [1690201879.312892][15025:15027] CHIP:TOO: OperationalError: { - [1690201879.312953][15025:15027] CHIP:TOO: ErrorStateID: 0 - [1690201879.313009][15025:15027] CHIP:TOO: } - [1690201879.313334][15025:15027] CHIP:EM: <<< [E:36372i S:53703 M:124059394 (Ack:197234404)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201879.313431][15025:15027] CHIP:IN: (S) Sending msg 124059394 on secure session with LSID: 53703 - [1690201879.313647][15025:15027] CHIP:EM: Flushed pending ack for MessageCounter:197234404 on exchange 36372i - [1690201879.314067][15025:15025] CHIP:CTL: Shutting down the commissioner - [1690201879.314141][15025:15025] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1690201879.314334][15025:15025] CHIP:CTL: Shutting down the controller - disabled: true - - - label: "Step 7h: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 && OPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE - verification: | - ./chip-tool operationalstate read operational-error 1 1 - Via the TH (chip-tool), Verify that the DUT response contains an instance of ErrorStateStruct. This shall contain an ErrorStateId with a value of UnableToStartOrResume(0x01) - - [1690201879.312424][15025:15027] CHIP:DMG: } - [1690201879.312754][15025:15027] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0005 DataVersion: 3675566847 - [1690201879.312892][15025:15027] CHIP:TOO: OperationalError: { - [1690201879.312953][15025:15027] CHIP:TOO: ErrorStateID: 1 - [1690201879.313009][15025:15027] CHIP:TOO: } - [1690201879.313334][15025:15027] CHIP:EM: <<< [E:36372i S:53703 M:124059394 (Ack:197234404)] (S) Msg TX to 1:0000000000000001 [9278] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690201879.313431][15025:15027] CHIP:IN: (S) Sending msg 124059394 on secure session with LSID: 53703 - [1690201879.313647][15025:15027] CHIP:EM: Flushed pending ack for MessageCounter:197234404 on exchange 36372i - [1690201879.314067][15025:15025] CHIP:CTL: Shutting down the commissioner - [1690201879.314141][15025:15025] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1690201879.314334][15025:15025] CHIP:CTL: Shutting down the controller - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml index fb0fc296d816cc..5e12a2d56b80a8 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml @@ -40,7 +40,7 @@ tests: "Step 2: Manually put the DUT into a state wherein it can receive a Start Command" verification: | - + Manually put the DUT into a state wherein it can receive a Start Command disabled: true - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" @@ -191,7 +191,7 @@ tests: of time less than the expected duration of the operation that has been started" verification: | - + TH waits for a vendor defined wait time, this being a period of time less than the expected duration of the operation that has been started disabled: true - label: "Step 11: TH reads from the DUT the CountdownTime attribute" @@ -305,7 +305,7 @@ tests: "Step 16: Manually put the DUT into a state wherein it cannot receive a Start Command" verification: | - + Manually put the DUT into a state wherein it cannot receive a Start Command disabled: true - label: "Step 17: TH sends Start command to the DUT" @@ -322,7 +322,7 @@ tests: [1689674700.385233][17340:17342] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Command 0x0000_0004 [1689674700.385266][17340:17342] CHIP:TOO: OperationalCommandResponse: { [1689674700.385274][17340:17342] CHIP:TOO: commandResponseState: { - [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 0 + [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 1 [1689674700.385289][17340:17342] CHIP:TOO: } [1689674700.385295][17340:17342] CHIP:TOO: } [1689674700.385311][17340:17342] CHIP:DMG: ICR moving to [AwaitingDe] diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml deleted file mode 100644 index d0e4cf49ff83b8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml +++ /dev/null @@ -1,174 +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 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: 202.2.3. [TC-OPSTATE-2.3] Pause and Resume commands with DUT as Server - -PICS: - - OPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verifications: | - This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - OPSTATE.S.C00 && OPSTATE.S.C03 - disabled: true - - - label: - "Step 2: Manually put the DUT into a state wherein it can receive a - Pause Command" - verification: | - - disabled: true - - - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" - PICS: OPSTATE.S.A0003 - verification: | - ./chip-tool operationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - the list includes IDs for Error (0x03), Running (0x01), and Paused (0x02) - disabled: true - - - label: "Step 4: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 5: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an OperationalStateID field that is set to 0x02 (Paused) - disabled: true - - - label: "Step 6: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - store the value in 'initialcountdown-time' - disabled: true - - - label: "Step 7: TH waits for 5 seconds" - verification: | - - disabled: true - - - label: "Step 8: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read operationalerror 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - that the value is the same as 'initialcountdown-time' - disabled: true - - - label: "Step 9: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 10: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 11: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an OperationalStateID field that is set to 0x01 (Running) - disabled: true - - - label: "Step 12: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: - "Step 13: Manually put the DUT into a state wherein it cannot receive - a Pause command (e.g. Stopped state)" - verification: | - - disabled: true - - - label: "Step 14: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true - - - label: - "Step 15: Manually put the DUT into a state wherein it cannot receive - a Resume command (e.g. Stopped state)" - verification: | - - disabled: true - - - label: "Step 16: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml deleted file mode 100644 index bde5980061e3e5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml +++ /dev/null @@ -1,115 +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 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: 92.2.1. [TC-RVCCLEANM-1.2] Cluster attributes with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Preconditions" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that the list has at least 2 and at most 255 entries - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined derived cluster tag value (DeepClean(0x4000), Vacuum(0x4001), Mop(0x4002)) or in the MfgTags (0x8000 to 0xBFFF) range. - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes either the Vacuum(0x4001) mode tag or the Mop(0x4002)mode tag in the ModeTags field - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 - [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries - [1690182376.583301][14996:14998] CHIP:TOO: [1]: { - [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum - [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 - [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583316][14996:14998] CHIP:TOO: [1]: { - [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 - [1690182376.583322][14996:14998] CHIP:TOO: } - [1690182376.583325][14996:14998] CHIP:TOO: } - [1690182376.583331][14996:14998] CHIP:TOO: [2]: { - [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash - [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 - [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583344][14996:14998] CHIP:TOO: [1]: { - [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 - [1690182376.583349][14996:14998] CHIP:TOO: } - [1690182376.583352][14996:14998] CHIP:TOO: } - [1690182376.583357][14996:14998] CHIP:TOO: [3]: { - [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean - [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 - [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries - [1690182376.583369][14996:14998] CHIP:TOO: [1]: { - [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 - [1690182376.583375][14996:14998] CHIP:TOO: } - [1690182376.583378][14996:14998] CHIP:TOO: [2]: { - [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 - [1690182376.583383][14996:14998] CHIP:TOO: } - [1690182376.583385][14996:14998] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 - verification: | - ./chip-tool rvccleanmode read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer from supported_modes_dut or Null, below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1690182436.721527][15012:15014] CHIP:DMG: } - [1690182436.721673][15012:15014] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953005 - [1690182436.721723][15012:15014] CHIP:TOO: OnMode: null - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - - [1690182475.587786][15022:15024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3145953005 - [1690182475.587797][15022:15024] CHIP:TOO: StartUpMode: null - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml deleted file mode 100644 index 5f16be922706ba..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml +++ /dev/null @@ -1,241 +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 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: 92.3.1. [TC-RVCCLEANM-2.1] Change to Mode functionality with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 - [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries - [1690182376.583301][14996:14998] CHIP:TOO: [1]: { - [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum - [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 - [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583316][14996:14998] CHIP:TOO: [1]: { - [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 - [1690182376.583322][14996:14998] CHIP:TOO: } - [1690182376.583325][14996:14998] CHIP:TOO: } - [1690182376.583331][14996:14998] CHIP:TOO: [2]: { - [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash - [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 - [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583344][14996:14998] CHIP:TOO: [1]: { - [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 - [1690182376.583349][14996:14998] CHIP:TOO: } - [1690182376.583352][14996:14998] CHIP:TOO: } - [1690182376.583357][14996:14998] CHIP:TOO: [3]: { - [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean - [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 - [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries - [1690182376.583369][14996:14998] CHIP:TOO: [1]: { - [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 - [1690182376.583375][14996:14998] CHIP:TOO: } - [1690182376.583378][14996:14998] CHIP:TOO: [2]: { - [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 - [1690182376.583383][14996:14998] CHIP:TOO: } - [1690182376.583385][14996:14998] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690182553.733326][15036:15038] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690182553.733341][15036:15038] CHIP:TOO: ChangeToModeResponse: { - [1690182553.733348][15036:15038] CHIP:TOO: status: 0 - [1690182553.733351][15036:15038] CHIP:TOO: } - disabled: true - - - label: - "Step 5: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE - verification: | - Manual operation required - disabled: true - - - label: "Step 6: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE && RVCCLEANM.S.C00.Rsp - verification: | - First change the mode to cleaning after that try to change the mode to any other modes (Deep clean, Wash ) - - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262143.410054][28190:28192] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690262143.410070][28190:28192] CHIP:TOO: ChangeToModeResponse: { - [1690262143.410076][28190:28192] CHIP:TOO: status: 0 - [1690262143.410079][28190:28192] CHIP:TOO: } - - ./chip-tool rvccleanmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a CleaningInProgress(0X40) status response and StatusText field has a length between 1 to 64, below is the sample log provided for the raspi platform: - - [1690262155.519185][28202:28204] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262155.519202][28202:28204] CHIP:TOO: ChangeToModeResponse: { - [1690262155.519206][28202:28204] CHIP:TOO: status: 64 - [1690262155.519210][28202:28204] CHIP:TOO: statusText: Cannot change the cleaning mode during a clean - [1690262155.519213][28202:28204] CHIP:TOO: } - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 9: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" - verification: | - Manual operation required - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_OK" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - Change to mode is not allowed from cleaning to any other mode(Vaccum, Deep clean, Wash ), Please switch the mode to idle and then try to change to other modes - - ./chip-tool rvcrunmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262367.604437][28315:28317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690262367.604496][28315:28317] CHIP:TOO: ChangeToModeResponse: { - [1690262367.604517][28315:28317] CHIP:TOO: status: 0 - [1690262367.604529][28315:28317] CHIP:TOO: } - - - ./chip-tool rvccleanmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262376.067598][28323:28325] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262376.067612][28323:28325] CHIP:TOO: ChangeToModeResponse: { - [1690262376.067618][28323:28325] CHIP:TOO: status: 0 - [1690262376.067621][28323:28325] CHIP:TOO: } - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 - [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 - disabled: true - - - label: - "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set - to invalid_mode_th" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 4 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - - [1690262496.596029][28351:28353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262496.596080][28351:28353] CHIP:TOO: ChangeToModeResponse: { - [1690262496.596117][28351:28353] CHIP:TOO: status: 1 - [1690262496.596120][28351:28353] CHIP:TOO: } - disabled: true - - - label: "Step 14: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 - [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml index 3ffc3454e12766..83634fa0c29635 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml @@ -65,7 +65,24 @@ tests: minValue: 0 maxValue: 254 + - label: + "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. + Else proceed to step 6." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue + - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + runIf: IsExpectedValue PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.F00 command: "readAttribute" attribute: "SupportedModes" @@ -77,6 +94,7 @@ tests: - label: "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" + runIf: IsExpectedValue PICS: RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00 command: "ChangeToMode" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml deleted file mode 100644 index a878da5691c923..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml +++ /dev/null @@ -1,203 +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 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: 92.4.2. [TC-RVCCLEANM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Preconditions" - verification: | - !RVCCLEANM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer value or null - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 - [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries - [1690183637.107597][15230:15232] CHIP:TOO: [1]: { - [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum - [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 - [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107651][15230:15232] CHIP:TOO: [1]: { - [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 - [1690183637.107670][15230:15232] CHIP:TOO: } - [1690183637.107679][15230:15232] CHIP:TOO: } - [1690183637.107700][15230:15232] CHIP:TOO: [2]: { - [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash - [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 - [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107744][15230:15232] CHIP:TOO: [1]: { - [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 - [1690183637.107765][15230:15232] CHIP:TOO: } - [1690183637.107774][15230:15232] CHIP:TOO: } - [1690183637.107793][15230:15232] CHIP:TOO: [3]: { - [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean - [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 - [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries - [1690183637.107837][15230:15232] CHIP:TOO: [1]: { - [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 - [1690183637.107856][15230:15232] CHIP:TOO: } - [1690183637.107885][15230:15232] CHIP:TOO: [2]: { - [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 - [1690183637.107890][15230:15232] CHIP:TOO: } - [1690183637.107894][15230:15232] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690183561.346360][15209:15211] CHIP:DMG: StatusIB = - [1690183561.346364][15209:15211] CHIP:DMG: { - [1690183561.346367][15209:15211] CHIP:DMG: status = 0x00 (SUCCESS), - [1690183561.346369][15209:15211] CHIP:DMG: }, - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690183605.342520][15217:15219] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3992778259 - [1690183605.342539][15217:15219] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th., below is the sample log provided for the raspi platform: - - [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries - [1690183637.107597][15230:15232] CHIP:TOO: [1]: { - [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum - [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 - [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107651][15230:15232] CHIP:TOO: [1]: { - [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 - [1690183637.107670][15230:15232] CHIP:TOO: } - [1690183637.107679][15230:15232] CHIP:TOO: } - [1690183637.107700][15230:15232] CHIP:TOO: [2]: { - [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash - [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 - [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107744][15230:15232] CHIP:TOO: [1]: { - [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 - [1690183637.107765][15230:15232] CHIP:TOO: } - [1690183637.107774][15230:15232] CHIP:TOO: } - [1690183637.107793][15230:15232] CHIP:TOO: [3]: { - [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean - [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 - [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries - [1690183637.107837][15230:15232] CHIP:TOO: [1]: { - [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 - [1690183637.107856][15230:15232] CHIP:TOO: } - [1690183637.107885][15230:15232] CHIP:TOO: [2]: { - [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 - [1690183637.107890][15230:15232] CHIP:TOO: } - [1690183637.107894][15230:15232] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690183675.346665][15234:15236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690183675.346731][15234:15236] CHIP:TOO: ChangeToModeResponse: { - [1690183675.346753][15234:15236] CHIP:TOO: status: 0 - [1690183675.346768][15234:15236] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 - - [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 - [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690347752.080278][43423:43425] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 1382495026 - [1690347752.080330][43423:43425] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml index bd3287652a5fdf..d3e2f0226362b0 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml @@ -24,90 +24,168 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Note: The test case includes preconditions with the PICS codes for start and stop. If the PICS are not supported, the test should be skipped. + + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" verification: | - + RVCOPSTATE.S.C02.Rsp(Start) and RVCOPSTATE.S.C01.Rsp(Stop) disabled: true - label: "Step 2: Manually put the DUT into a state wherein it can receive a Start Command" verification: | - + Manually put the DUT into a state wherein it can receive a Start Command disabled: true - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" PICS: RVCOPSTATE.S.A0003 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - the list includes IDs for Error (0x03), Running (0x01), and Stopped (0x00) + ./chip-tool rvcoperationalstate read operational-state-list 1 1 + + Via the TH (chip-tool), verify: + - all entries include an ID (enum8) and a label (string) + - all provided IDs are in the allowed range + - the list includes IDs for Error (0x03), Running (0x01), and Stopped (0x00) + + [1689674049.504261][17222:17224] CHIP:DMG: } + [1689674049.504390][17222:17224] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0003 DataVersion: 2102885775 + [1689674049.504440][17222:17224] CHIP:TOO: OperationalStateList: 4 entries + [1689674049.504462][17222:17224] CHIP:TOO: [1]: { + [1689674049.504469][17222:17224] CHIP:TOO: OperationalStateID: 0 + [1689674049.504476][17222:17224] CHIP:TOO: } + [1689674049.504484][17222:17224] CHIP:TOO: [2]: { + [1689674049.504490][17222:17224] CHIP:TOO: OperationalStateID: 1 + [1689674049.504495][17222:17224] CHIP:TOO: } + [1689674049.504503][17222:17224] CHIP:TOO: [3]: { + [1689674049.504508][17222:17224] CHIP:TOO: OperationalStateID: 2 + [1689674049.504514][17222:17224] CHIP:TOO: } + [1689674049.504521][17222:17224] CHIP:TOO: [4]: { + [1689674049.504527][17222:17224] CHIP:TOO: OperationalStateID: 3 + [1689674049.504533][17222:17224] CHIP:TOO: } + [1689674049.504605][17222:17224] CHIP:EM: <<< [E:22830i S:37151 M:4250114 (Ack:140781365)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674049.504620][17222:17224] CHIP:IN: (S) Sending msg 4250114 on secure session with LSID: 37151 disabled: true - label: "Step 4: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674139.018639][17233:17235] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674139.018658][17233:17235] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674139.018704][17233:17235] CHIP:TOO: OperationalCommandResponse: { + [1689674139.018712][17233:17235] CHIP:TOO: commandResponseState: { + [1689674139.018719][17233:17235] CHIP:TOO: ErrorStateID: 0 + [1689674139.018726][17233:17235] CHIP:TOO: } + [1689674139.018732][17233:17235] CHIP:TOO: } + [1689674139.018755][17233:17235] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674139.018818][17233:17235] CHIP:EM: <<< [E:26021i S:33879 M:235550100 (Ack:58905970)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674139.018837][17233:17235] CHIP:IN: (S) Sending msg 235550100 on secure session with LSID: 33879 + [1689674139.018885][17233:17235] CHIP:EM: Flushed pending ack for MessageCounter:58905970 on exchange 26021i disabled: true - label: "Step 5: TH reads from the DUT the OperationalState attribute" PICS: RVCOPSTATE.S.A0004 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 + ./chip-tool rvcoperationalstate read operational-state 1 1 Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x01 (Running) + - the response has an OperationalStateID field that is set to 0x01 (Running) + + [1689674196.878722][17249:17251] CHIP:DMG: InteractionModelRevision = 1 + [1689674196.878727][17249:17251] CHIP:DMG: } + [1689674196.878800][17249:17251] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0004 DataVersion: 2102885775 + [1689674196.878834][17249:17251] CHIP:TOO: OperationalState: { + [1689674196.878841][17249:17251] CHIP:TOO: OperationalStateID: 1 + [1689674196.878847][17249:17251] CHIP:TOO: } + [1689674196.878914][17249:17251] CHIP:EM: <<< [E:56939i S:28614 M:63040141 (Ack:57012545)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674196.878928][17249:17251] CHIP:IN: (S) Sending msg 63040141 on secure session with LSID: 28614 disabled: true - label: "Step 6: TH reads from the DUT the OperationalError attribute" PICS: RVCOPSTATE.S.A0005 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of a uint32 + ./chip-tool rvcoperationalstate read operational-error 1 1 + + Via the TH (chip-tool), verify: + - the response contains the ErrorStateId set to NoError(0x00) + + [1689674342.832448][17274:17276] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0005 DataVersion: 2102885775 + [1689674342.832482][17274:17276] CHIP:TOO: OperationalError: { + [1689674342.832500][17274:17276] CHIP:TOO: ErrorStateID: 0 + [1689674342.832509][17274:17276] CHIP:TOO: } + [1689674342.832570][17274:17276] CHIP:EM: <<< [E:37158i S:10451 M:72875113 (Ack:195983315)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674342.832585][17274:17276] CHIP:IN: (S) Sending msg 72875113 on secure session with LSID: 10451 + [1689674342.832614][17274:17276] CHIP:EM: Flushed pending ack for MessageCounter:195983315 on exchange 37158i disabled: true - label: "Step 7: TH reads from the DUT the CountdownTime attribute" PICS: RVCOPSTATE.S.A0002 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - store the value in 'initialcountdown-time' + ./chip-tool rvcoperationalstate read countdown-time 1 1 + + Via the TH (chip-tool), verify: + - that CountdownTime attribute contains either null our a uint32 value + - if non-null, verify that the value is in the range 1 to 259200 + - store the value in 'initialcountdown-time' + + [1689674384.271623][17278:17280] CHIP:DMG: InteractionModelRevision = 1 + [1689674384.271625][17278:17280] CHIP:DMG: } + [1689674384.271649][17278:17280] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0002 DataVersion: 2102885775 + [1689674384.271662][17278:17280] CHIP:TOO: CountdownTime: null + [1689674384.271683][17278:17280] CHIP:EM: <<< [E:24665i S:47371 M:757241 (Ack:152992659)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674384.271687][17278:17280] CHIP:IN: (S) Sending msg 757241 on secure session with LSID: 47371 + [1689674384.271696][17278:17280] CHIP:EM: Flushed pending ack for MessageCounter:152992659 on exchange 24665i disabled: true - label: "Step 8: TH reads from the DUT the PhaseList attribute" PICS: RVCOPSTATE.S.A0000 verification: | - ./chip-tool roboticvacuumoperationalstate read phaselist 1 1 + ./chip-tool rvcoperationalstate read phase-list 1 1 - Via the TH (chip-tool), verify: - - that PhaseList attribute value contains either null or a list of strings. + Via the TH (chip-tool), verify: + - that PhaseList attribute value contains either null or a list of strings. - If not null, receord the number of entries in the list as 'phase-list-size'; execute step 7. - If null, go to step 8. + If not null, receord the number of entries in the list as 'phase-list-size'; execute step 7. + If null, go to step 8. + + [1689674447.761859][17290:17292] CHIP:DMG: InteractionModelRevision = 1 + [1689674447.761865][17290:17292] CHIP:DMG: } + [1689674447.761938][17290:17292] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0000 DataVersion: 2102885775 + [1689674447.761972][17290:17292] CHIP:TOO: PhaseList: null + [1689674447.762041][17290:17292] CHIP:EM: <<< [E:58737i S:13847 M:251354926 (Ack:137738036)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674447.762055][17290:17292] CHIP:IN: (S) Sending msg 251354926 on secure session with LSID: 13847 + [1689674447.762109][17290:17292] CHIP:EM: Flushed pending ack for MessageCounter:137738036 on exchange 58737i disabled: true - label: "Step 9: TH reads from the DUT the CurrentPhase attribute" PICS: RVCOPSTATE.S.A0001 verification: | - ./chip-tool roboticvacuumoperationalstate read currentphase 1 1 - - Via the TH (chip-tool), verify: - - that the CurrentPhase attribute value contains contains a uint8 value - - that the value is between 0 and 'phase-list-size - 1'. + ./chip-tool rvcoperationalstate read current-phase 1 1 + + Via the TH (chip-tool), verify: + - that the CurrentPhase attribute value contains contains a uint8 value + - that the value is between 0 and 'phase-list-size - 1'. + + [1689674497.950563][17299:17301] CHIP:DMG: } + [1689674497.950635][17299:17301] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0001 DataVersion: 2102885775 + [1689674497.950664][17299:17301] CHIP:TOO: CurrentPhase: null + [1689674497.950737][17299:17301] CHIP:EM: <<< [E:64019i S:52010 M:245677798 (Ack:138696372)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674497.950752][17299:17301] CHIP:IN: (S) Sending msg 245677798 on secure session with LSID: 52010 + [1689674497.950798][17299:17301] CHIP:EM: Flushed pending ack for MessageCounter:138696372 on exchange 64019i + [1689674497.950899][17299:17299] CHIP:CTL: Shutting down the commissioner disabled: true - label: @@ -115,72 +193,142 @@ tests: of time less than the expected duration of the operation that has been started" verification: | - + TH waits for a vendor defined wait time, this being a period of time less than the expected duration of the operation that has been started disabled: true - label: "Step 11: TH reads from the DUT the CountdownTime attribute" PICS: RVCOPSTATE.S.A0002 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 + ./chip-tool rvcoperationalstate read countdown-time 1 1 - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - that the value is approximately 'initialcountdown-time minus the vendor defined wait time' + + Via the TH (chip-tool), verify: + - that CountdownTime attribute contains either null our a uint32 value + - if non-null, verify that the value is in the range 1 to 259200 + - that the value is approximately 'initialcountdown-time minus the vendor defined wait time' + + + [1689674623.673661][17320:17322] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0002 DataVersion: 2102885775 + [1689674623.673697][17320:17322] CHIP:TOO: CountdownTime: null + [1689674623.673755][17320:17322] CHIP:EM: <<< [E:42152i S:37580 M:19654175 (Ack:176515710)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674623.673768][17320:17322] CHIP:IN: (S) Sending msg 19654175 on secure session with LSID: 37580 + [1689674623.673795][17320:17322] CHIP:EM: Flushed pending ack for MessageCounter:176515710 on exchange 42152i disabled: true - label: "Step 12: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674637.555734][17326:17328] CHIP:DMG: + [1689674637.555742][17326:17328] CHIP:DMG: InteractionModelRevision = 1 + [1689674637.555751][17326:17328] CHIP:DMG: }, + [1689674637.555784][17326:17328] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674637.555805][17326:17328] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674637.555853][17326:17328] CHIP:TOO: OperationalCommandResponse: { + [1689674637.555862][17326:17328] CHIP:TOO: commandResponseState: { + [1689674637.555872][17326:17328] CHIP:TOO: ErrorStateID: 0 + [1689674637.555883][17326:17328] CHIP:TOO: } + [1689674637.555891][17326:17328] CHIP:TOO: } + [1689674637.555913][17326:17328] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674637.555956][17326:17328] CHIP:EM: <<< [E:28742i S:49023 M:139320570 (Ack:91983883)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674637.555971][17326:17328] CHIP:IN: (S) Sending msg 139320570 on secure session with LSID: 49023 + [1689674637.556001][17326:17328] CHIP:EM: Flushed pending ack for MessageCounter:91983883 on exchange 28742i disabled: true - label: "Step 13: TH sends Stop command to the DUT" PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate stop 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate stop 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674653.322963][17330:17332] CHIP:DMG: }, + [1689674653.322994][17330:17332] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674653.323014][17330:17332] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674653.323058][17330:17332] CHIP:TOO: OperationalCommandResponse: { + [1689674653.323066][17330:17332] CHIP:TOO: commandResponseState: { + [1689674653.323076][17330:17332] CHIP:TOO: ErrorStateID: 0 + [1689674653.323085][17330:17332] CHIP:TOO: } + [1689674653.323094][17330:17332] CHIP:TOO: } + [1689674653.323113][17330:17332] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674653.323154][17330:17332] CHIP:EM: <<< [E:62878i S:64455 M:173921517 (Ack:216732582)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674653.323168][17330:17332] CHIP:IN: (S) Sending msg 173921517 on secure session with LSID: 64455 + [1689674653.323195][17330:17332] CHIP:EM: Flushed pending ack for MessageCounter:216732582 on exchange 62878i + [1689674653.323284][17330:17330] CHIP:CTL: Shutting down the commissioner disabled: true - label: "Step 14: TH reads from the DUT the OperationalState attribute" PICS: RVCOPSTATE.S.A0004 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x00 (Stopped) + ./chip-tool rvcoperationalstate read operational-state 1 1 + + Via the TH (chip-tool), verify: + - the response has an OperationalStateID field that is set to 0x00 (Stopped) + + [1689674675.459656][17333:17335] CHIP:DMG: } + [1689674675.459738][17333:17335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0004 DataVersion: 2102885775 + [1689674675.459772][17333:17335] CHIP:TOO: OperationalState: { + [1689674675.459790][17333:17335] CHIP:TOO: OperationalStateID: 0 + [1689674675.459799][17333:17335] CHIP:TOO: } + [1689674675.459869][17333:17335] CHIP:EM: <<< [E:17771i S:16165 M:1572532 (Ack:102448631)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674675.459886][17333:17335] CHIP:IN: (S) Sending msg 1572532 on secure session with LSID: 16165 + [1689674675.459930][17333:17335] CHIP:EM: Flushed pending ack for MessageCounter:102448631 on exchange 17771i disabled: true - label: "Step 15: TH sends Stop command to the DUT" PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate stop 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate stop 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674689.588712][17337:17339] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674689.588722][17337:17339] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674689.588745][17337:17339] CHIP:TOO: OperationalCommandResponse: { + [1689674689.588749][17337:17339] CHIP:TOO: commandResponseState: { + [1689674689.588757][17337:17339] CHIP:TOO: ErrorStateID: 0 + [1689674689.588762][17337:17339] CHIP:TOO: } + [1689674689.588765][17337:17339] CHIP:TOO: } + [1689674689.588775][17337:17339] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674689.588802][17337:17339] CHIP:EM: <<< [E:63921i S:35027 M:16881995 (Ack:220265764)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674689.588810][17337:17339] CHIP:IN: (S) Sending msg 16881995 on secure session with LSID: 35027 disabled: true - label: "Step 16: Manually put the DUT into a state wherein it cannot receive a Start Command" verification: | - + Manually put the DUT into a state wherein it cannot receive a Start Command disabled: true - label: "Step 17: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x01 (UnableToStartOrResume) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x01 (UnableToStartOrResume) + + [1689674700.385183][17340:17342] CHIP:DMG: }, + [1689674700.385214][17340:17342] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674700.385233][17340:17342] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674700.385266][17340:17342] CHIP:TOO: OperationalCommandResponse: { + [1689674700.385274][17340:17342] CHIP:TOO: commandResponseState: { + [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 1 + [1689674700.385289][17340:17342] CHIP:TOO: } + [1689674700.385295][17340:17342] CHIP:TOO: } + [1689674700.385311][17340:17342] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674700.385361][17340:17342] CHIP:EM: <<< [E:55029i S:46795 M:80501191 (Ack:176711722)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674700.385375][17340:17342] CHIP:IN: (S) Sending msg 80501191 on secure session with LSID: 46795 + [1689674700.385419][17340:17342] CHIP:EM: Flushed pending ack for MessageCounter:176711722 on exchange 55029i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml deleted file mode 100644 index 5e699c00a4ce9b..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml +++ /dev/null @@ -1,113 +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 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: 87.2.1. [TC-RVCRUNM-1.2] Cluster attributes with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Preconditions" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that the list has at least 2 and at most 255 entries - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) a defined cluster derived tag value (Idle(0x4000), Cleaning(0x4001)) or in the MfgTags (0x8000 to 0xBFFF) range - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes the Idle(0x4000) mode tag in the ModeTags field - - Verify that at least one ModeOptionsStruct entry includes the Cleaning(0x4001) mode tag in the ModeTags field - - Verify that none of the ModeOptionsStruct entries include both the Idle(0x4000) mode tag and the Cleaning(0x4001) mode tag in the ModeTags field - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690177496.793840][6284:6286] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 - [1690177496.794090][6284:6286] CHIP:TOO: SupportedModes: 3 entries - [1690177496.794285][6284:6286] CHIP:TOO: [1]: { - [1690177496.794343][6284:6286] CHIP:TOO: Label: Idle - [1690177496.794396][6284:6286] CHIP:TOO: Mode: 0 - [1690177496.794457][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.794573][6284:6286] CHIP:TOO: [1]: { - [1690177496.794631][6284:6286] CHIP:TOO: Value: 16384 - [1690177496.794682][6284:6286] CHIP:TOO: } - [1690177496.794737][6284:6286] CHIP:TOO: } - [1690177496.794809][6284:6286] CHIP:TOO: [2]: { - [1690177496.794861][6284:6286] CHIP:TOO: Label: Cleaning - [1690177496.794910][6284:6286] CHIP:TOO: Mode: 1 - [1690177496.794967][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.795031][6284:6286] CHIP:TOO: [1]: { - [1690177496.795085][6284:6286] CHIP:TOO: Value: 16385 - [1690177496.795135][6284:6286] CHIP:TOO: } - [1690177496.795186][6284:6286] CHIP:TOO: } - [1690177496.795257][6284:6286] CHIP:TOO: [3]: { - [1690177496.795309][6284:6286] CHIP:TOO: Label: Mapping - [1690177496.795358][6284:6286] CHIP:TOO: Mode: 2 - [1690177496.795415][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.795478][6284:6286] CHIP:TOO: [1]: { - [1690177496.795531][6284:6286] CHIP:TOO: Value: 16384 - [1690177496.795581][6284:6286] CHIP:TOO: } - [1690177496.795632][6284:6286] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690177606.359517][6295:6297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 - [1690177606.359639][6295:6297] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: RVCRUNM.S.A0003 - verification: | - ./chip-tool rvcrunmode read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1690177656.364979][6304:6306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 551764487 - [1690177656.365109][6304:6306] CHIP:TOO: OnMode: null - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - - [1690177698.954736][6311:6313] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 551764487 - [1690177698.954865][6311:6313] CHIP:TOO: StartUpMode: null - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml deleted file mode 100644 index 3e96b215b81fa6..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml +++ /dev/null @@ -1,215 +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 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: 87.3.1. [TC-RVCRUNM-2.1] Change to Mode functionality with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: "0x12344321" - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690177742.429087][6315:6317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 - [1690177742.429341][6315:6317] CHIP:TOO: SupportedModes: 3 entries - [1690177742.429483][6315:6317] CHIP:TOO: [1]: { - [1690177742.429540][6315:6317] CHIP:TOO: Label: Idle - [1690177742.429595][6315:6317] CHIP:TOO: Mode: 0 - [1690177742.429658][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.429732][6315:6317] CHIP:TOO: [1]: { - [1690177742.429791][6315:6317] CHIP:TOO: Value: 16384 - [1690177742.429842][6315:6317] CHIP:TOO: } - [1690177742.429892][6315:6317] CHIP:TOO: } - [1690177742.429967][6315:6317] CHIP:TOO: [2]: { - [1690177742.430020][6315:6317] CHIP:TOO: Label: Cleaning - [1690177742.430070][6315:6317] CHIP:TOO: Mode: 1 - [1690177742.430188][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.430263][6315:6317] CHIP:TOO: [1]: { - [1690177742.430320][6315:6317] CHIP:TOO: Value: 16385 - [1690177742.430374][6315:6317] CHIP:TOO: } - [1690177742.430427][6315:6317] CHIP:TOO: } - [1690177742.430501][6315:6317] CHIP:TOO: [3]: { - [1690177742.430555][6315:6317] CHIP:TOO: Label: Mapping - [1690177742.430605][6315:6317] CHIP:TOO: Mode: 2 - [1690177742.430664][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.430729][6315:6317] CHIP:TOO: [1]: { - [1690177742.430784][6315:6317] CHIP:TOO: Value: 16384 - [1690177742.430901][6315:6317] CHIP:TOO: } - [1690177742.430966][6315:6317] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690177776.069002][6321:6323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 - [1690177776.069137][6321:6323] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690177967.451381][6333:6335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690177967.451491][6333:6335] CHIP:TOO: ChangeToModeResponse: { - [1690177967.451542][6333:6335] CHIP:TOO: status: 0 - [1690177967.451590][6333:6335] CHIP:TOO: } - disabled: true - - - label: - "Step 5: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" - PICS: RVCRUNM.S.M.CAN_TEST_MODE_FAILURE - verification: | - Manual operation required - disabled: true - - - label: "Step 6: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690202974.725219][18214:18216] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2507484088 - [1690202974.725506][18214:18216] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" - PICS: RVCRUNM.S.M.CAN_TEST_MODE_FAILURE && RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 to 64, below is the sample log provided for the raspi platform: - - [1690178461.944185][6368:6370] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178461.944369][6368:6370] CHIP:TOO: ChangeToModeResponse: { - [1690178461.944457][6368:6370] CHIP:TOO: status: 2 - [1690178461.944517][6368:6370] CHIP:TOO: statusText: Change to the mapping mode is only allowed from idle - [1690178461.944578][6368:6370] CHIP:TOO: } - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690203073.106487][18256:18258] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 - [1690203073.106525][18256:18258] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 9: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCRUNM.MODE_CHANGE_OK" - verification: | - Manual operation required - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690203090.571985][18263:18265] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 - [1690203090.571996][18263:18265] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCRUNM.MODE_CHANGE_OK" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690178355.021382][6358:6360] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178355.021533][6358:6360] CHIP:TOO: ChangeToModeResponse: { - [1690178355.021692][6358:6360] CHIP:TOO: status: 0 - [1690178355.021750][6358:6360] CHIP:TOO: } - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690203144.862081][18275:18277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 - [1690203144.862121][18275:18277] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set - to invalid_mode_th" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 5 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - - [1690178736.566529][6381:6383] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178736.566677][6381:6383] CHIP:TOO: ChangeToModeResponse: { - [1690178736.566761][6381:6383] CHIP:TOO: status: 1 - [1690178736.566816][6381:6383] CHIP:TOO: } - disabled: true - - - label: "Step 14: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690203158.762178][18282:18284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 - [1690203158.762194][18282:18284] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml index bfd9e262eeabf2..5bb88f11b6943d 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml @@ -11,159 +11,119 @@ # 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: 87.4.1. [TC-RVCRUNM-3.1] On Mode functionality with DUT as Server PICS: - - RVCRUNM.S + - RVCRUNM.S.A0003 + - RVCRUNM.S.F00 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "RVC Run Mode" + endpoint: 1 -tests: - - label: "Precondition" - verification: | - 1. RVC Run Mode and OnOff clusters are available on the same endpoint - - 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - disabled: true - - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool rvcrunmode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690178870.051558][6396:6398] CHIP:DMG: StatusIB = - [1690178870.051652][6396:6398] CHIP:DMG: { - [1690178870.051727][6396:6398] CHIP:DMG: status = 0x00 (SUCCESS), - [1690178870.051799][6396:6398] CHIP:DMG: }, - disabled: true + ConfigureOnMode: + type: int8u + defaultValue: 0 + new_mode_th: + type: int8u + defaultValue: 1 +tests: - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Precondition: TH writes from the DUT the OnMode attribute." + PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 + command: "writeAttribute" + attribute: "OnMode" + arguments: + value: ConfigureOnMode - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690265382.010747][30073:30075] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 172461204 - [1690265382.010769][30073:30075] CHIP:TOO: OnMode: 0 - disabled: true + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - [1690179152.516820][6454:6456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852718 - [1690179152.516952][6454:6456] CHIP:TOO: CurrentMode: 0 - disabled: true + - label: + "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. + Else proceed to step 6." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + runIf: IsExpectedValue PICS: RVCRUNM.S.A0000 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th. below is the sample log provided for the raspi platform: - - [1690179211.761627][6462:6464] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 2795852718 - [1690179211.761873][6462:6464] CHIP:TOO: SupportedModes: 3 entries - [1690179211.762019][6462:6464] CHIP:TOO: [1]: { - [1690179211.762079][6462:6464] CHIP:TOO: Label: Idle - [1690179211.762131][6462:6464] CHIP:TOO: Mode: 0 - [1690179211.762193][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.762265][6462:6464] CHIP:TOO: [1]: { - [1690179211.762324][6462:6464] CHIP:TOO: Value: 16384 - [1690179211.762376][6462:6464] CHIP:TOO: } - [1690179211.762429][6462:6464] CHIP:TOO: } - [1690179211.762502][6462:6464] CHIP:TOO: [2]: { - [1690179211.762555][6462:6464] CHIP:TOO: Label: Cleaning - [1690179211.762605][6462:6464] CHIP:TOO: Mode: 1 - [1690179211.762664][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.762729][6462:6464] CHIP:TOO: [1]: { - [1690179211.762785][6462:6464] CHIP:TOO: Value: 16385 - [1690179211.762843][6462:6464] CHIP:TOO: } - [1690179211.762892][6462:6464] CHIP:TOO: } - [1690179211.762966][6462:6464] CHIP:TOO: [3]: { - [1690179211.763019][6462:6464] CHIP:TOO: Label: Mapping - [1690179211.763069][6462:6464] CHIP:TOO: Mode: 2 - [1690179211.763127][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.763193][6462:6464] CHIP:TOO: [1]: { - [1690179211.763248][6462:6464] CHIP:TOO: Value: 16384 - [1690179211.763299][6462:6464] CHIP:TOO: } - [1690179211.763351][6462:6464] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list + minLength: 2 - label: "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" + runIf: IsExpectedValue PICS: RVCRUNM.S.C00.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179263.329118][6471:6473] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690179263.329338][6471:6473] CHIP:TOO: ChangeToModeResponse: { - [1690179263.329435][6471:6473] CHIP:TOO: status: 0 - [1690179263.329489][6471:6473] CHIP:TOO: } - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: new_mode_th + response: + values: + - name: "Status" + value: 0x00 + + - label: "Step 6:TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool onoff off 1 1 + cluster: "On/Off" + command: "Off" - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" + - label: "Step 7:TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "On" - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690179336.313000][6489:6491] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852720 - [1690179336.313132][6489:6491] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml deleted file mode 100644 index 7ad4b2d59f0880..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml +++ /dev/null @@ -1,223 +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 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: 87.4.2. [TC-RVCRUNM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - !RVCRUNM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL - disabled: true - - - label: "Note" - verification: | - To Execute the TC-RVCRUNM-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as startup_mode_dut - - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - and below is the sample log provided for the raspi platform: - - Here StartUpMode value is null proced to step3 - - [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 - [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690179857.830697][14130:14132] CHIP:DMG: } - [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 - [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries - [1690179857.831069][14130:14132] CHIP:TOO: [1]: { - [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle - [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 - [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831090][14130:14132] CHIP:TOO: [1]: { - [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831096][14130:14132] CHIP:TOO: } - [1690179857.831099][14130:14132] CHIP:TOO: } - [1690179857.831104][14130:14132] CHIP:TOO: [2]: { - [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning - [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 - [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831115][14130:14132] CHIP:TOO: [1]: { - [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 - [1690179857.831121][14130:14132] CHIP:TOO: } - [1690179857.831124][14130:14132] CHIP:TOO: } - [1690179857.831128][14130:14132] CHIP:TOO: [3]: { - [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping - [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 - [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831138][14130:14132] CHIP:TOO: [1]: { - [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831143][14130:14132] CHIP:TOO: } - [1690179857.831146][14130:14132] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = - [1690179737.189576][14110:14112] CHIP:DMG: { - [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), - [1690179737.189607][14110:14112] CHIP:DMG: }, - - ./chip-tool rvcrunmode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform - - [1692181154.909850][3899:3901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 1431406601 - [1692181154.909907][3899:3901] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 - [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690179857.830697][14130:14132] CHIP:DMG: } - [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 - [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries - [1690179857.831069][14130:14132] CHIP:TOO: [1]: { - [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle - [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 - [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831090][14130:14132] CHIP:TOO: [1]: { - [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831096][14130:14132] CHIP:TOO: } - [1690179857.831099][14130:14132] CHIP:TOO: } - [1690179857.831104][14130:14132] CHIP:TOO: [2]: { - [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning - [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 - [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831115][14130:14132] CHIP:TOO: [1]: { - [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 - [1690179857.831121][14130:14132] CHIP:TOO: } - [1690179857.831124][14130:14132] CHIP:TOO: } - [1690179857.831128][14130:14132] CHIP:TOO: [3]: { - [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping - [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 - [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831138][14130:14132] CHIP:TOO: [1]: { - [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831143][14130:14132] CHIP:TOO: } - [1690179857.831146][14130:14132] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179905.782387][14141:14143] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690179905.782401][14141:14143] CHIP:TOO: ChangeToModeResponse: { - [1690179905.782405][14141:14143] CHIP:TOO: status: 0 - [1690179905.782408][14141:14143] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform: - - Here StartUpMode value is 0 - - [1690544350.025546][2955:2957] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3877802510 - [1690544350.025630][2955:2957] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 - [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml index 3bd0f23cbcbe8d..f9b351f67019e2 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml @@ -26,6 +26,7 @@ config: tests: - label: "Precondition" verification: | + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT ./chip-all-clusters-app --trace_decode 1 @@ -117,7 +118,7 @@ tests: "Step 2: Responder validates the destination identifier contained in the message." verification: | - If the destination identifier matches a candidate destination id (as generated by the process in spec section 4.13.2.4), the responder proceeds to generate a Sigma 2 message. + disabled: true - label: @@ -198,14 +199,14 @@ tests: decrypts and verifies the message data, node operational certificate (NOC), and signature data." verification: | - If the verification succeeds, the initiator moves to the next step to send a Sigma3 message. + disabled: true - label: "Step 5: Initiator constructs and sends a TLV-encoded Sigma3 message containing encrypted integrity data." verification: | - Verify that the message is properly formatted: 1. I Flag is set to 1 2. S flag and DIZ fields of message flags are set to 0 3. Encryption Type of security flags is set to 0 4. The message payload follows the sigma-3-struct TLV encoding format 5. The Session Key Type field is set to 0 6. The Protocol ID field is set to 0 and Protocol Opcode field is set to 50 (0x32) Verify that the responder receives the message. + disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml index 92f9d547f20280..dcff7e274ca3de 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml @@ -13,7 +13,7 @@ # 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: 3.3.2. [TC-SC-3.2] CASE Session Resumption [DUT_Responder] - REMOVEDPICS +name: 3.3.2. [TC-SC-3.2] CASE Session Resumption [DUT_Responder] - REMOVED PICS: - MCORE.ROLE.COMMISSIONEE @@ -24,47 +24,201 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) + 2. CASE was previously successfully completed between the initiator and responder and the previous session context is known by both nodes. + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app --trace_decode 1 + + Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + Verify the commissioning completed with success on TH(chip-tool) from DUT + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success + + # 1 Please use Interactive mode to Verify this test cases + Here the command to enter interactive mode:-- + ./chip-tool interactive start --trace_decode 1 + + #2. Close the session(all-clusters-app), by sending mentioned command + sessionmanagement send-close-session 1 --evict-local-session true + + After the session closed, wait until session resumtion for the previous subscribe request + once the session resumed succesfully then Verify the below test steps. + disabled: true + + - label: + "Step 1a: Send Read Request from Initiator (TH) to Responder (DUT) + Save the value as 'read response' Note: Example for Read Request could + be reading OnOff attribute value from OnOff Cluster" + verification: | + onoff read on-off 1 1 --trace_decode 1 + + + [1690205836.161742][5604:5607] CHIP:DMG: ReportDataMessage = + [1690205836.161751][5604:5607] CHIP:DMG: { + [1690205836.161758][5604:5607] CHIP:DMG: AttributeReportIBs = + [1690205836.161773][5604:5607] CHIP:DMG: [ + [1690205836.161781][5604:5607] CHIP:DMG: AttributeReportIB = + [1690205836.161796][5604:5607] CHIP:DMG: { + [1690205836.161804][5604:5607] CHIP:DMG: AttributeDataIB = + [1690205836.161816][5604:5607] CHIP:DMG: { + [1690205836.161828][5604:5607] CHIP:DMG: DataVersion = 0xf30c44a7, + [1690205836.161839][5604:5607] CHIP:DMG: AttributePathIB = + [1690205836.161850][5604:5607] CHIP:DMG: { + [1690205836.161862][5604:5607] CHIP:DMG: Endpoint = 0x1, + [1690205836.161873][5604:5607] CHIP:DMG: Cluster = 0x6, + [1690205836.161885][5604:5607] CHIP:DMG: Attribute = 0x0000_0000, + [1690205836.161896][5604:5607] CHIP:DMG: } + [1690205836.161911][5604:5607] CHIP:DMG: + [1690205836.161923][5604:5607] CHIP:DMG: Data = false, + [1690205836.161933][5604:5607] CHIP:DMG: }, + [1690205836.161949][5604:5607] CHIP:DMG: + [1690205836.161957][5604:5607] CHIP:DMG: }, + [1690205836.161973][5604:5607] CHIP:DMG: + [1690205836.161980][5604:5607] CHIP:DMG: ], + [1690205836.161995][5604:5607] CHIP:DMG: + [1690205836.162003][5604:5607] CHIP:DMG: SuppressResponse = true, + [1690205836.162038][5604:5607] CHIP:DMG: InteractionModelRevision = 1 + [1690205836.162048][5604:5607] CHIP:DMG: } + [1690205836.162552][5604:5607] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4077667495 + [1690205836.162619][5604:5607] CHIP:TOO: OnOff: FALSE + disabled: true + + - label: + "Step 1b: Initiator (TH) sends a Close Session message to the + Responder (DUT)" + verification: | + sessionmanagement send-close-session 1 --evict-local-session true + + 281718.852349][27911:27911] CHIP:TOO: Command: sessionmanagement send-close-session 1 --evict-local-session true + [1690281718.852946][27911:27914] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1690281718.852990][27911:27914] CHIP:CTL: Setting attestation nonce to random value + disabled: true + + - label: + "Step 1c: Initiator triggers a CASE session resumption. This can be + accomplished in the TH using a read attribute command, which will + automatically trigger a session resumption before reading since it has + no active session." + verification: | + onoff read on-off 1 1 --trace-to json:log + disabled: true + - label: - "Step 1: Initiator constructs and sends a TLV-encoded Sigma1 message + "Step 2: Initiator constructs and sends a TLV-encoded Sigma1 message to Responder with resumption containing initiatorRandom initiatorSessionId destinationId resumptionID initiatorResumeMIC initiatorEphPubKey initiatorSessionParams" verification: | - On Initiator(chip-tool) verify that, Initiator(chip-tool) constructs and sends a TLV-encoded Sigma1 message to Responder with resumption containing - initiatorRandom - initiatorSessionId - destinationId - resumptionID - initiatorResumeMIC - initiatorEphPubKey - initiatorSessionParams - here is the log to verify on chip-tool - - 1683884120.041635][5134:5136] CHIP:DMG: Decrypted Payload (182 bytes) = - [1683884120.041641][5134:5136] CHIP:DMG: { - [1683884120.041647][5134:5136] CHIP:DMG: data = 153001202445b334fd30bc8c53955932724b371c085cbe9322cc9cd5a1f2e1094034a1462502faae300320adde97e1cb85749bebb3ed17b9ff3132eca00f7b374e482575322683ab460adc300441046c30cdef1fcbf383e11df64a3d6820ade9a6850b4eb401a99c4be5242ae5a0a0f5473b2ff098976de6bb2ae4e126138ebcc97cf44d8651ae0048ceed2681c8b9300610164874f435aa47c7505ca5ad59ba8974300710df3d4e94f1014d0e037c74eabce4accc18 - [1683884120.041655][5134:5136] CHIP:DMG: } - [1683884120.041660][5134:5136] CHIP:DMG: - [1683884120.041689][5134:5136] CHIP:DMG: Parameters = - [1683884120.041695][5134:5136] CHIP:DMG: { - [1683884120.041704][5134:5136] CHIP:DMG: InitiatorRandom (32) = 2445B334FD30BC8C53955932724B371C085CBE9322CC9CD5A1F2E1094034A146 - [1683884120.041711][5134:5136] CHIP:DMG: InitiatorSessionId = 44794 - [1683884120.041720][5134:5136] CHIP:DMG: DestinationId (32) = ADDE97E1CB85749BEBB3ED17B9FF3132ECA00F7B374E482575322683AB460ADC - [1683884120.041730][5134:5136] CHIP:DMG: InitiatorEphPubKey (65) = 046C30CDEF1FCBF383E11DF64A3D6820ADE9A6850B4EB401A99C4BE5242AE5A0A0F5473B2FF098976DE6BB2AE4E126138EBCC97CF44D8651AE0048CEED2681C8B9 - [1683884120.041766][5134:5136] CHIP:DMG: ResumptionID (16) = 164874F435AA47C7505CA5AD59BA8974 - [1683884120.041775][5134:5136] CHIP:DMG: InitiatorResumeMIC (16) = DF3D4E94F1014D0E037C74EABCE4ACCC - [1683884120.041782][5134:5136] CHIP:DMG: } - [1683884120.041787][5134:5136] CHIP:DMG: - [1683884120.041794][5134:5136] CHIP:DMG: - [1683884120.041883][5134:5136] CHIP:SC: Sent Sigma1 msg - - - On Responder(all-clusters-app), Verify that responder received the Sigma1 message from Initiator(chip-tool) - - [1683884120.042774][5117:5117] CHIP:IN: CASE Server received Sigma1 message . Starting handshake. EC 0x558aa452e2e0 - [1683884120.042783][5117:5117] CHIP:IN: CASE Server disabling CASE session setups - [1683884120.042798][5117:5117] CHIP:SC: Received Sigma1 msg - [1683884120.042819][5117:5117] CHIP:SC: Peer assigned session key ID 44794 + Sigma1 Message from Initiator: + "packetHeader" : + { + "flags" : 4, + "msgCounter" : 209808419, + "securityFlags" : 0, + "sessionId" : 0, + "sourceNodeId" : 13804960529544229277 + }, + "payload" : + { + "decoded" : + { + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + "sessionId" : 0 + }, + "payload" : + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + { + "decoded" : + { + "case_sigma2_resume" : + { + "responder_sessoion_id" : "45029", + "resumption_id" : "hex:D507CF90EEF665047D643F91FBBA3FC1", + "sigma2_resume_mic" : "hex:FB6A8A4000CF61E00E48BBD91A0D77C3" + } + }, + "hex" : "15300110D507CF90EEF665047D643F91FBBA3FC1300210FB6A8A4000CF61E00E48BBD91A0D77C32503E5AF18", + "size" : 44 + }, + "payloadHeader" : + { + "ackMessageCounter" : 209808419, + "exchangeFlags" : 6, + "exchangeId" : 37964, + "initiator" : false, + "messageType" : 51, + "needsAck" : true, + "protocolId" : 0 + } + } disabled: true - label: @@ -72,89 +226,126 @@ tests: following values resumptionID responderSessionID sigma2ResumeMIC responderMRPParams" verification: | - On initiator(chip-tool) verify that the Sigma2_Resume message and extracts the following values - resumptionID - responderSessionID - sigma2ResumeMIC - And - Verify that the message is properly formatted: - - I Flag is set to 1 - S flag and DIZ fields of message flags are set to 0 - Encryption Type of security flags is set to 0 - The Session Key Type field is set to 0 - The Protocol ID field is set to 0x0000 and - The Protocol Opcode field is set to 0x33 - resumptionID is of Octet String maximum of length 16 bytes - responderSessionID is of uint16 - sigma2ResumeMIC is of Octet String maximum of length 16 bytes - responderSessionParams is from any one of the following: - SESSION_IDLE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_THRESHOLD - Verify that it is of uint16 - - here is the log to verify on chip-tool - - [1683884120.044173][5134:5136] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 | 8440488 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '2' Resume (0x33) / Session = 0 / Exchange = 29430] - [1683884120.044205][5134:5136] CHIP:DMG: Header Flags = - [1683884120.044210][5134:5136] CHIP:DMG: { - [1683884120.044219][5134:5136] CHIP:DMG: Message (0x01) = - [1683884120.044224][5134:5136] CHIP:DMG: { - [1683884120.044229][5134:5136] CHIP:DMG: DestinationNodeId = A8F9BB8984959B9C - [1683884120.044234][5134:5136] CHIP:DMG: } - [1683884120.044244][5134:5136] CHIP:DMG: Exchange (0x06) = - [1683884120.044248][5134:5136] CHIP:DMG: { - [1683884120.044253][5134:5136] CHIP:DMG: AckMsg = 265414754 - [1683884120.044258][5134:5136] CHIP:DMG: NeedsAck = true - [1683884120.044262][5134:5136] CHIP:DMG: } - [1683884120.044271][5134:5136] CHIP:DMG: } - [1683884120.044276][5134:5136] CHIP:DMG: - [1683884120.044287][5134:5136] CHIP:DMG: Encrypted Payload (70 bytes) = - [1683884120.044292][5134:5136] CHIP:DMG: { - [1683884120.044300][5134:5136] CHIP:DMG: data = 01000000a8ca80009c9b958489bbf9a80633f672000062e8d10f1530011098f83a1529d6cfa34f386cdbbbd842613002106223c9bf3f0d1fa0e4122f921711543a2503e59318 - [1683884120.044308][5134:5136] CHIP:DMG: buffer_ptr = 139986540250736 - [1683884120.044313][5134:5136] CHIP:DMG: } - [1683884120.044318][5134:5136] CHIP:DMG: - [1683884120.044327][5134:5136] CHIP:DMG: Decrypted Payload (44 bytes) = - [1683884120.044333][5134:5136] CHIP:DMG: { - [1683884120.044337][5134:5136] CHIP:DMG: data = 1530011098f83a1529d6cfa34f386cdbbbd842613002106223c9bf3f0d1fa0e4122f921711543a2503e59318 - [1683884120.044345][5134:5136] CHIP:DMG: } - [1683884120.044351][5134:5136] CHIP:DMG: - [1683884120.044371][5134:5136] CHIP:DMG: Parameters = - [1683884120.044377][5134:5136] CHIP:DMG: { - [1683884120.044385][5134:5136] CHIP:DMG: ResumptionID (16) = 98F83A1529D6CFA34F386CDBBBD84261 - [1683884120.044392][5134:5136] CHIP:DMG: Sigma2ResumeMIC (16) = 6223C9BF3F0D1FA0E4122F921711543A - [1683884120.044399][5134:5136] CHIP:DMG: ResponderSessionId = 37861 - [1683884120.044406][5134:5136] CHIP:DMG: } - [1683884120.044411][5134:5136] CHIP:DMG: - [1683884120.044419][5134:5136] CHIP:DMG: - [1683884120.044432][5134:5136] CHIP:DMG: Additional Fields = - [1683884120.044441][5134:5136] CHIP:DMG: { - [1683884120.044449][5134:5136] CHIP:DMG: peer_address = UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 - [1683884120.044455][5134:5136] CHIP:DMG: } - [1683884120.044461][5134:5136] CHIP:DMG: + Sigma1 Message from Initiator: + "packetHeader" : + { + "flags" : 4, + "msgCounter" : 209808419, + "securityFlags" : 0, + "sessionId" : 0, + "sourceNodeId" : 13804960529544229277 + }, + "payload" : + { + "decoded" : + { + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + "sessionId" : 0 + }, + "payload" : + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + { + "decoded" : + { + "case_sigma2_resume" : + { + "responder_sessoion_id" : "45029", + "resumption_id" : "hex:D507CF90EEF665047D643F91FBBA3FC1", + "sigma2_resume_mic" : "hex:FB6A8A4000CF61E00E48BBD91A0D77C3" + } + }, + "hex" : "15300110D507CF90EEF665047D643F91FBBA3FC1300210FB6A8A4000CF61E00E48BBD91A0D77C32503E5AF18", + "size" : 44 + }, + "payloadHeader" : + { + "ackMessageCounter" : 209808419, + "exchangeFlags" : 6, + "exchangeId" : 37964, + "initiator" : false, + "messageType" : 51, + "needsAck" : true, + "protocolId" : 0 + } + } + disabled: true - label: "Step 4a: Initiator sends SigmaFinished message to Responder" verification: | - On Responder(all-clusters-app), verify that responder(all-clusters-app) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, - ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator - - [1683884120.046690][5117:5117] CHIP:DMG: Parameters = - [1683884120.046692][5117:5117] CHIP:DMG: { - [1683884120.046694][5117:5117] CHIP:DMG: GeneralStatusCode = 0 - [1683884120.046696][5117:5117] CHIP:DMG: ProtocolId = 0 - [1683884120.046698][5117:5117] CHIP:DMG: ProtocolCode = 0 - [1683884120.046701][5117:5117] CHIP:DMG: } - [1683884120.046703][5117:5117] CHIP:DMG: - [1683884120.046706][5117:5117] CHIP:DMG: - [1683884120.046711][5117:5117] CHIP:DMG: Additional Fields = - [1683884120.046713][5117:5117] CHIP:DMG: { - [1683884120.046715][5117:5117] CHIP:DMG: peer_address = UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:38377 - [1683884120.046718][5117:5117] CHIP:DMG: } - [1683884120.046720][5117:5117] CHIP:DMG: - [1683884120.046725][5117:5117] CHIP:EM: >>> [E:29430r S:0 M:265414755 (Ack:8440488)] (U) Msg RX from 0:A8F9BB8984959B9C [0000] --- Type 0000:40 (SecureChannel:StatusReport) - [1683884120.046729][5117:5117] CHIP:EM: Found matching exchange: 29430r, Delegate: 0x558aa3e3ef18 - [1683884120.046735][5117:5117] CHIP:EM: Rxd Ack; Removing MessageCounter:8440488 from Retrans Table on exchange 29430r - [1683884120.046743][5117:5117] CHIP:SC: Success status report received. Session was established + + disabled: true + + - label: + "Step 4b: Verify that the responder sends response to Read Request + with the value that is same as 'read response'" + verification: | + [1690283831.857744][28587:28591] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2791059975 + [1690283831.857751][28587:28591] CHIP:TOO: OnOff: FALSE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml index 36bc5c59272c42..f6b17380499be0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml @@ -26,10 +26,10 @@ config: tests: - label: "Precondition" verification: | - execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT - ./chip-all-clusters-app --trace_decode 1 - - Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) + 2. CASE was previously successfully completed between the initiator and responder and the previous session context is known by both nodes. + 3. resumptionID of the previous session is saved for future user. + "execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT./chip-all-clusters-app --trace_decode 1Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 Verify the commissioning completed with success on TH(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success @@ -48,7 +48,32 @@ tests: disabled: true - label: - "Step 2b: Responder receives the Sigma1 message and extracts the + "Step 1a: Verify that the Initiator sends the Sigma1 message to + Responder" + verification: | + Verify that the Initiator(all-clusters-app) sends the Sigma1 message to Responder(chip-tool) + + [1683973647.719965][21642:21644] CHIP:DMG: + [1683973647.720054][21642:21644] CHIP:SC: Sent Sigma1 msg + [1683973647.720063][21642:21644] CHIP:DIS: OperationalSessionSetup[1:0000000000000001]: State change 3 --> 4 + [1683973647.723548][21642:21644] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 | 113416098 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '2' (0x31) / Session = 0 / Exchange = 39248] + disabled: true + + - label: "Step 1b: Verify that the Responder receives the Sigma1 message" + verification: | + Verify that the Responder(chip-tool) receives the Sigma1 message + + [1683973647.720880][21637:21637] CHIP:EM: >>> [E:39248r S:0 M:63601755] (U) Msg RX from 0:A5F871EB0B6E3FF9 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) + [1683973647.720900][21637:21637] CHIP:EM: Handling via exchange: 39248r, Delegate: 0x56251895eee0 + [1683973647.720920][21637:21637] CHIP:IN: CASE Server received Sigma1 message . Starting handshake. EC 0x562518c5ed60 + [1683973647.720926][21637:21637] CHIP:IN: CASE Server disabling CASE session setups + [1683973647.720936][21637:21637] CHIP:SC: Received Sigma1 msg + [1683973647.720954][21637:21637] CHIP:SC: Peer assigned session key ID 49338 + [1683973647.721189][21637:21637] CHIP:SC: CASE matched destination ID: fabricIndex 1, NodeID 0x0000000000000001 + disabled: true + + - label: + "Step 1c: Responder receives the Sigma1 message and extracts the following initiatorRandom initiatorSessionId destinationId resumptionID initiatorResumeMIC initiatorEphPubKey initiatorSEDParams" verification: | @@ -73,10 +98,10 @@ tests: resumptionID is of Octet String maximum of length 16 bytes responderSessionID is of uint16 sigma2ResumeMIC is of Octet String maximum of length 16 bytes - responderSessionParams is from any one of the following: - SESSION_IDLE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_THRESHOLD - Verify that it is of uint16 + responderSEDParams is from any one of the following: + SLEEPY_IDLE_INTERVAL - Verify that it is of uint32 + SLEEPY_ACTIVE_INTERVAL - Verify that it is of uint32 + [1683973658.044236][21637:21637] CHIP:EM: Rxd Ack; Removing MessageCounter:113416101 from Retrans Table on exchange 32995r [1683973662.299442][21637:21637] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:41363 | 167307433 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '1' (0x30) / Session = 0 / Exchange = 32997] @@ -124,7 +149,7 @@ tests: disabled: true - label: - "Step 2c: Responder sends a TLV-encoded Sigma2_Resume message to + "Step 2: Responder sends a TLV-encoded Sigma2_Resume message to Initiator containing resumptionID responderSessionID sigma2ResumeMIC responderMRPParams" verification: | @@ -182,8 +207,8 @@ tests: disabled: true - label: - "Step 3a: Responder receives the SigmaFinished message and extracts - the following 1.ProtocolId 2.ProtocolCode" + "Step 3a: Verify that the Initiator sends a SigmaFinished message to + Responder" verification: | On Responder(chip-tool), verify that responder(chip-tool) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator @@ -215,8 +240,8 @@ tests: disabled: true - label: - "Step 3b: Verify that the Initiator sends a SigmaFinished message to - Responder" + "Step 3b: Responder receives the SigmaFinished message and extracts + the following ProtocolId ProtocolCode" verification: | On Responder(chip-tool), verify that responder(chip-tool) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml index 6e261e2bcc6226..298b831b262f41 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml @@ -19,7 +19,7 @@ name: PICS: - MCORE.ROLE.COMMISSIONEE - - MCORE.SC.SIT_ICD + - MCORE.SC.SED config: nodeId: 0x12344321 @@ -27,15 +27,24 @@ config: endpoint: 0 tests: - - label: "DUT is instructed to advertise its service" + - label: "Precondition" + verification: | + 1. Nodes are joined in the same Fabric + 2. DUT is a sleepy device (MCORE.SC.SED) + disabled: true + + - label: "Step 1: DUT is instructed to advertise its service" verification: | 1. Provision the DUT by TH (Chip-tool) disabled: true - - label: "TH scans for DNS-SD advertising" + - label: "Step 2: TH scans for DNS-SD advertising" verification: | avahi-browse -rt _matter._tcp - Verify on the TH(Chip-tool) Log: + On the TH(Chip-tool) Log: Verify the DUT is advertising for: + -SII key is higher than the SLEEPY_IDLE_INTERVAL default value (> 300 milliseconds) + - SII key and SAI key is less than 3600000 (1hour in milliseconds) + + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local = eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local @@ -48,7 +57,4 @@ tests: address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] txt = ["T=0" "SAI=300" "SII=5000"] - - - SII key is higher than the SESSION_IDLE_INTERVAL default value (> 300 milliseconds) - - SII key and SAI key is less than 3600000 (1hour in milliseconds) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index 58623d4fd9e8d6..c375d547ca8aa0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -26,7 +26,12 @@ config: tests: - label: "Note" verification: | - Chip-tool command used below are an example to verify the DUT as commissioner test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command + Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. TH is not commissioned disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml index 97d7c8f2dde9a6..b56ec65e95334e 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml @@ -13,7 +13,7 @@ # 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.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] +name: 3.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -24,22 +24,27 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + - label: - "DUT is commissioned to TH and DUT is instructed to advertise its - operational service (_matter._tcp)." + "Step 1: DUT is commissioned to TH and DUT is instructed to advertise + its operational service (_matter._tcp)." verification: | 1. Provision the DUT by TH (Chip-tool) disabled: true - - label: "Scan for DNS-SD advertising" + - label: "Step 2: Scan for DNS-SD advertising" PICS: - MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && + MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && MCORE.ICD && MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && - MCORE.SC.T_KEY + MCORE.SC.SAT_OP_DISCOVERY_KEY && MCORE.SC.T_KEY verification: | avahi-browse -rt _matter._tcp - Verify the advertisement on the TH Log: + Verify the device is advertising _matterc._udp service like below output in TH terminal Log: (Verify for the DUT's actual values (like vendor ID, PID ..etc) as mentioned in the expected outcome of the test plan, The below log contains the data from the reference raspi accessory) + veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local = veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml index 3d8149bf59eea5..5ee31fb6d3eec8 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml @@ -13,7 +13,7 @@ # 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.4.4. [TC-SC-4.4] Discovery [DUT as Controller] +name: 3.4.4.[TC-SC-4.4] Discovery [DUT as Controller] PICS: - MCORE.ROLE.CONTROLLER @@ -27,6 +27,11 @@ tests: - label: "Note" verification: | Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. Nodes are joined in the same Fabric disabled: true - label: "Step 1: TH starts commissioning process with DUT" diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml index 5225245d42f368..a3ba4b4f41ab1d 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml @@ -25,8 +25,8 @@ config: tests: - label: - "TH is instructed to start advertising two or more services using - DNS-SD" + "Step 1: TH is instructed to start advertising two or more services + using DNS-SD" verification: | 1. On the raspi controller, publish matter service, using below command @@ -34,8 +34,8 @@ tests: disabled: true - label: - "By any means, DUT is instructed to perform an unicast UDP query to - the DNS-SD Discovery Proxy on TH for services" + "Step 2: By any means, DUT is instructed to perform an unicast UDP + query to the DNS-SD Discovery Proxy on TH for services" PICS: MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.T_KEY @@ -58,14 +58,16 @@ tests: txt = ["T=0" "SAI=300" "SII=5000"] disabled: true - - label: "TH performs a change in one of the services configured at step 1" + - label: + "Step 3: TH performs a change in one of the services configured at + step 1" verification: | 1. On the raspi controller, publish matter service chanding the T value 1, using below command $avahi-publish-service 87E1B004E235A130-8FC7772401CD0696 _matter._tcp 22222 SII=3000 SAI=4000 T=1 disabled: true - - label: "DUT must receive a notification with new data" + - label: "Step 4: DUT must receive a notification with new data" PICS: MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.T_KEY diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml index f415e7319103ef..a165c5be37518f 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml @@ -13,12 +13,11 @@ # 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: - 3.4.6. [TC-SC-4.6] Commissioner Discovery - Commissioner [DUT - - Commissioner] +name: 3.4.6. [TC-SC-4.6]Commissioner Discovery [DUT as Commissioner] PICS: - MCORE.ROLE.COMMISSIONER + - MCORE.DD.COMM_DISCOVERY config: nodeId: 0x12344321 @@ -29,6 +28,12 @@ tests: - label: "Note" verification: | Chip-tool command used below are an example to verify the DUT as commissioner test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. DUT is connected to the IP network or supports SoftAP + 2. DUT and TH support Commissioner Discovery disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml index 7f0835e770fc28..7a856b2ee2ced1 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml @@ -13,7 +13,7 @@ # 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.4.7. [TC-SC-4.7] Commissioner Discovery [DUT as Commissionee] +name: 3.4.7.[TC-SC-4.7] Commissioner Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -25,6 +25,12 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT is connected to the IP network + 2. DUT and TH support Commissioner Discovery + disabled: true + - label: "Step 1: TH is instructed to start advertising its presence as a commissioner in the network" diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml index eebb5cc840b5bb..b5a00a75d6715a 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml @@ -27,6 +27,17 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. TH_CR1 is a Commissioner, working over Ethernet or Wi-Fi transport, able to commission DUT into a given Fabric and implementing RFC-4191 + 2. TH_CR2 is a Commissioner/Controller Thread 1.3 device (only on Thread, not on Wi-Fi or Ethernet), joined to the PAN of the BR and already commissioned on the same Fabric + 3. DUT_CE is a Commissionee Ethernet or Wi-Fi device and implementing RFC-4191 + 4. DUT_CE will adopt an address on the GUA prefix e.g. 2001:12ab::/64 and use it as default route (::/0) + 5. DUT_CE sees the RA w/ RIO and adds the off-mesh prefix preferred route, so that any messages for that off-mesh prefix routes there INSTEAD of the default gateway + 6. BR is a Thread 1.3 border router, with link to DUT over Wi-Fi or Ethernet, in the same VLAN + 7. RT is a Wi-Fi or Ethernet router advertising a default route (i,e, against ::/0 prefix) with a GUA prefix advertised. That prefix MUST also route to the public internet to avoid the different entities bailing out of having this prefix because it’s an invalid environment detected to be artificial. + disabled: true + - label: "Step 1: Using TH_CR1, commission the DUT_CE onto the Matter network" verification: | diff --git a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml index 2e36ed9d956c2e..98cf2a39efbaf0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 18.2.1. [TC-SC-6.1] Adding member to a group - DUT as Admin and TH as Group + 26.4.1. [TC-SC-6.1] Adding member to a group - DUT as Admin and TH as Group Member [DUT-Client] PICS: @@ -38,7 +38,9 @@ tests: DUT supports Groups Cluster disabled: true - - label: "TH should have the ACL entry with the AuthMode as Group by DUT" + - label: + "Step 1a: TH should have the ACL entry with the AuthMode as Group by + DUT" verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]' 1 0 @@ -114,21 +116,27 @@ tests: disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 - and GroupKeySetID. Admin sets GroupKeySecurityPolicy = TrustFirst (0) - EpochStartTime0 = 0" + "Step 1b: DUT generates fabric-unique GroupID, GroupName, random key, + EpochKey0 and GroupKeySetID. Admin sets GroupKeySecurityPolicy = + TrustFirst (0) EpochStartTime0 = 1" verification: | - + Sample epoch key values that will be used in the forthcomming steps: + "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": + "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 + Sample Group Name: Grp1 + GroupKeySetID: 42 + GroupID = 1 disabled: true - label: - "DUT sends KeySetWrite command to GroupKeyManagement cluster to TH on - EP0" + "Step 2: DUT sends KeySetWrite command to GroupKeyManagement cluster + to TH on EP0" PICS: GRPKEY.C.C00.Tx verification: | ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": + "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 @@ -136,59 +144,57 @@ tests: [1651471040.120912][4012:4012] CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and MessageCounter:2398599 on exchange 35559r [1651471040.120980][4012:4012] CHIP:EM: Handling via exchange: 35559r, Delegate: 0xaaaaca97a088 - [1651471040.121098][4012:4012] CHIP:DMG: InvokeRequestMessage = - [1651471040.121146][4012:4012] CHIP:DMG: { - [1651471040.121188][4012:4012] CHIP:DMG: suppressResponse = false, - [1651471040.121238][4012:4012] CHIP:DMG: timedRequest = false, - [1651471040.121282][4012:4012] CHIP:DMG: InvokeRequests = - [1651471040.121346][4012:4012] CHIP:DMG: [ - [1651471040.121390][4012:4012] CHIP:DMG: CommandDataIB = - [1651471040.121453][4012:4012] CHIP:DMG: { - [1651471040.121501][4012:4012] CHIP:DMG: CommandPathIB = - [1651471040.121587][4012:4012] CHIP:DMG: { - [1651471040.121648][4012:4012] CHIP:DMG: EndpointId = 0x0, - [1651471040.121710][4012:4012] CHIP:DMG: ClusterId = 0x3f, - [1651471040.121775][4012:4012] CHIP:DMG: CommandId = 0x0, - [1651471040.121831][4012:4012] CHIP:DMG: }, - [1651471040.121891][4012:4012] CHIP:DMG: - [1651471040.121941][4012:4012] CHIP:DMG: CommandData = - [1651471040.122003][4012:4012] CHIP:DMG: { - [1651471040.122058][4012:4012] CHIP:DMG: 0x0 = - [1651471040.122116][4012:4012] CHIP:DMG: { - [1651471040.122171][4012:4012] CHIP:DMG: 0x0 = 42, - [1651471040.122222][4012:4012] CHIP:DMG: 0x1 = 0, - [1651471040.122276][4012:4012] CHIP:DMG: 0x2 = [ - [1651471040.122339][4012:4012] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122390][4012:4012] CHIP:DMG: ] - [1651471040.122439][4012:4012] CHIP:DMG: 0x3 = 2220000, - [1651471040.122488][4012:4012] CHIP:DMG: 0x4 = [ - [1651471040.122543][4012:4012] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122591][4012:4012] CHIP:DMG: ] - [1651471040.122639][4012:4012] CHIP:DMG: 0x5 = 2220001, - [1651471040.122684][4012:4012] CHIP:DMG: 0x6 = [ - [1651471040.122739][4012:4012] CHIP:DMG: 0xd2, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122791][4012:4012] CHIP:DMG: ] - [1651471040.122840][4012:4012] CHIP:DMG: 0x7 = 2220002, - [1651471040.122890][4012:4012] CHIP:DMG: }, - [1651471040.122937][4012:4012] CHIP:DMG: }, - [1651471040.122979][4012:4012] CHIP:DMG: }, - [1651471040.123032][4012:4012] CHIP:DMG: - [1651471040.123066][4012:4012] CHIP:DMG: ], - [1651471040.123115][4012:4012] CHIP:DMG: - [1651471040.123151][4012:4012] CHIP:DMG: InteractionModelRevision = 1 - [1651471040.123185][4012:4012] CHIP:DMG: }, - [1651471040.123286][4012:4012] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_003F e=0 p=a - [1651471040.123337][4012:4012] CHIP:DMG: AccessControl: allowed + [1693548451.902266][9666:9666] CHIP:DMG: InvokeRequestMessage = + [1693548451.902273][9666:9666] CHIP:DMG: { + [1693548451.902278][9666:9666] CHIP:DMG: suppressResponse = false, + [1693548451.902286][9666:9666] CHIP:DMG: timedRequest = false, + [1693548451.902293][9666:9666] CHIP:DMG: InvokeRequests = + [1693548451.902308][9666:9666] CHIP:DMG: [ + [1693548451.902314][9666:9666] CHIP:DMG: CommandDataIB = + [1693548451.902327][9666:9666] CHIP:DMG: { + [1693548451.902334][9666:9666] CHIP:DMG: CommandPathIB = + [1693548451.902342][9666:9666] CHIP:DMG: { + [1693548451.902349][9666:9666] CHIP:DMG: EndpointId = 0x0, + [1693548451.902357][9666:9666] CHIP:DMG: ClusterId = 0x3f, + [1693548451.902365][9666:9666] CHIP:DMG: CommandId = 0x0, + [1693548451.902371][9666:9666] CHIP:DMG: }, + [1693548451.902380][9666:9666] CHIP:DMG: + [1693548451.902389][9666:9666] CHIP:DMG: CommandFields = + [1693548451.902397][9666:9666] CHIP:DMG: { + [1693548451.902405][9666:9666] CHIP:DMG: 0x0 = + [1693548451.902413][9666:9666] CHIP:DMG: { + [1693548451.902422][9666:9666] CHIP:DMG: 0x0 = 42, + [1693548451.902431][9666:9666] CHIP:DMG: 0x1 = 0, + [1693548451.902439][9666:9666] CHIP:DMG: 0x2 = [ + [1693548451.902450][9666:9666] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902460][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902471][9666:9666] CHIP:DMG: 0x3 = 1, + [1693548451.902479][9666:9666] CHIP:DMG: 0x4 = [ + [1693548451.902491][9666:9666] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902500][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902509][9666:9666] CHIP:DMG: 0x5 = 2220001, + [1693548451.902517][9666:9666] CHIP:DMG: 0x6 = [ + [1693548451.902527][9666:9666] CHIP:DMG: 0xd2, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902536][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902544][9666:9666] CHIP:DMG: 0x7 = 2220002, + [1693548451.902553][9666:9666] CHIP:DMG: }, + [1693548451.902560][9666:9666] CHIP:DMG: }, + [1693548451.902567][9666:9666] CHIP:DMG: }, + [1693548451.902581][9666:9666] CHIP:DMG: + [1693548451.902587][9666:9666] CHIP:DMG: ], + [1693548451.902599][9666:9666] CHIP:DMG: + [1693548451.902606][9666:9666] CHIP:DMG: InteractionModelRevision = 10 + [1693548451.902613][9666:9666] CHIP:DMG: }, disabled: true - label: - "DUT binds GroupID with GroupKeySetID in the GroupKeyMap attribute - list on GroupKeyManagement cluster" + "Step 3: DUT binds GroupID with GroupKeySetID in the GroupKeyMap + attribute list on GroupKeyManagement cluster" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 - Verify TH recieves GroupKeyMap attribute on TH(Reference app)log: + Verify TH recieves the binding of GroupKeySetID with the GroupID on TH(Reference app)log: [1659350562.020669][5824:5824] CHIP:EM: Received message of type 0x6 with protocolId (0, 1) and MessageCounter:167021683 on exchange 31153r [1659350562.020897][5824:5824] CHIP:EM: Handling via exchange: 31153r, Delegate: 0xaaaacb304f08 @@ -240,7 +246,7 @@ tests: [1659350562.022661][5824:5824] CHIP:DMG: AccessControl: allowed disabled: true - - label: "DUT sends AddGroup Command to TH on EP0" + - label: "Step 4: DUT sends AddGroup Command to TH on EP0" PICS: G.C.C00.Tx verification: | ./chip-tool groups add-group 0x0001 grp1 1 0 @@ -280,8 +286,8 @@ tests: disabled: true - label: - "DUT sends ViewGroup command with the GroupID and GroupName to the - Group cluster on the TH on EP0" + "Step 5: DUT sends ViewGroup command with the GroupID and GroupName to + the Group cluster on the TH on EP0" PICS: G.C.C01.Tx verification: | ./chip-tool groups view-group 0x0001 1 0 @@ -319,7 +325,7 @@ tests: [1651471144.502628][4012:4012] CHIP:DMG: AccessControl: allowed disabled: true - - label: "DUT sends KeySetRead Command to TH" + - label: "Step 6: DUT sends KeySetRead Command to TH" PICS: GRPKEY.C.C01.Tx verification: | ./chip-tool groupkeymanagement key-set-read 42 1 0 @@ -358,8 +364,8 @@ tests: disabled: true - label: - "DUT reads GroupKeyMap Attribute from the GroupKeyManagement cluster - from TH" + "Step 7: DUT reads GroupKeyMap Attribute from the GroupKeyManagement + cluster from TH" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement read group-key-map 1 0 @@ -394,7 +400,8 @@ tests: disabled: true - label: - "DUT reads GroupTable attribute from GroupKeyManagement cluster on TH" + "Step 8: DUT reads GroupTable attribute from GroupKeyManagement + cluster on TH" PICS: GRPKEY.C.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml index bfc2d01eb5e6d5..a7a4ed9582f5fd 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml @@ -24,13 +24,20 @@ config: endpoint: 0 tests: - - label: "DUT sends a QueryImage command to TH1/OTA-P." + - label: "Step 1: DUT sends a QueryImage command to TH1/OTA-P." verification: | - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 3735928559, "endpoint": 0}]' 0x0000001234567890 0 + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + where 321 is OTA Requestor node ID and 123 is OTA Provider node ID - Verify on the OTA Provider logs receives QueryImage: + Verify on the OTA Provider logs receives QueryImage with following fields: + - VendorId - Should match the value reported by the Basic Information Cluster VendorID attribute of the DUT. + - ProductId - Should match the value reported by the Basic Information Cluster ProductID attribute of the DUT. + - HardwareVersion - If present, verify that it matches the value reported by the Basic Information Cluster HardwareVersion attribute of the DUT. + - SoftwareVersion - Should match the value reported by the Basic Information Cluster SoftwareVersion attribute of the DUT. + - Verify the field ProtocolsSupported lists the BDX Synchronous protocol. + - Verify the default value of RequestorCanConsent is set to False unless DUT sets it to True. + - If the Location field is present, verify that the value is same as Basic Information Cluster Location Attribute of the DUT. [1645743053317] [97806:20280749] CHIP: [ZCL] OTA Provider received QueryImage [1645743053317] [97806:20280749] CHIP: [ZCL] VendorID: 0xfff1 @@ -45,13 +52,28 @@ tests: disabled: true - label: - "DUT sends a QueryImage command to TH1/OTA-P. TH1/OTA-P does not - respond with QueryImageResponse." + "Step 2: DUT sends a QueryImage command to TH1/OTA-P. TH1/OTA-P does + not respond with QueryImageResponse." PICS: MCORE.OTA.Retry verification: | - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 3735928559, "endpoint": 0}]' 0x0000001234567890 0 + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 1, "endpoint": 0}]' 0x858 0 --commissioner-name beta + Verify SUCCESS status response On TH(chip-tool) log: + + [1686302244.664128][30278:30280] CHIP:DMG: StatusIB = + [1686302244.664157][30278:30280] CHIP:DMG: { + [1686302244.664198][30278:30280] CHIP:DMG: status = 0x00 (SUCCESS), + [1686302244.664228][30278:30280] CHIP:DMG: }, + + + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 222, "endpoint": 0}]' 321 0 --commissioner-name beta + + Verify SUCCESS status response On TH(chip-tool) log: + + [1686302244.664128][30278:30280] CHIP:DMG: StatusIB = + [1686302244.664157][30278:30280] CHIP:DMG: { + [1686302244.664198][30278:30280] CHIP:DMG: status = 0x00 (SUCCESS), + [1686302244.664228][30278:30280] CHIP:DMG: }, Kill Default OTA Provider for fabric index 1 before DUT sends a query @@ -59,8 +81,9 @@ tests: disabled: true - label: - "DUT sends a QueryImage command to TH2/OTA-P. TH2/OTA-P sends a - QueryImageResponse back to the DUT. Status is set to UpdateAvailable." + "Step 3: DUT sends a QueryImage command to TH2/OTA-P. TH2/OTA-P sends + a QueryImageResponse back to the DUT. Status is set to + UpdateAvailable." verification: | ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 1, "endpoint": 0}]' 0x858 0 --commissioner-name beta diff --git a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml index 82ca0138375e5a..fe03bc98caeb3d 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml @@ -26,13 +26,13 @@ config: tests: - label: - "OTA-R/TH sends a QueryImage Command to the DUT. Protocol supported - should only list 'BDX'. DUT responds with the QueryImageResponse to - the OTA-R/TH." + "Step 1: OTA-R/TH sends a QueryImage Command to the DUT. Protocol + supported should only list 'BDX'. DUT responds with the + QueryImageResponse to the OTA-R/TH." verification: | - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Verify on the OTA Requestor logs receives QueryImageResponse @@ -53,8 +53,8 @@ tests: disabled: true - label: - "TH sends a QueryImage command to the DUT. RequestorCanConsent is set - to True by TH. DUT responds with a QueryImageResponse with + "Step 2: TH sends a QueryImage command to the DUT. RequestorCanConsent + is set to True by TH. DUT responds with a QueryImageResponse with UserConsentNeeded field set to True." PICS: OTAP.S.M.UserConsentNeeded verification: | @@ -63,12 +63,16 @@ tests: out/chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -c + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID + Verify that the DUT does not try to obtain User Consent from the user prior to transfer of software update image. disabled: true - label: - "TH sends a QueryImage command to the DUT. RequestorCanConsent is set - to True by TH. DUT responds with a QueryImageResponse with + "Step 3: TH sends a QueryImage command to the DUT. RequestorCanConsent + is set to True by TH. DUT responds with a QueryImageResponse with UserConsentNeeded field set to False." PICS: OTAP.S.M.UserConsentNeeded verification: | @@ -78,17 +82,21 @@ tests: out/chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID + Verify that the DUT tries to obtain User Consent from the user prior to transfer of software update image. disabled: true - label: - "During the transfer of the image from the DUT, force fail the + "Step 4: During the transfer of the image from the DUT, force fail the transfer before it completely transfers the image. Wait for the Idle timeout. Initiate another QueryImage Command from OTA-R/TH to the DUT." verification: | - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Kill the OTA Requestor App during the transfer of the image to the DUT before it completely transfers the image. @@ -97,22 +105,26 @@ tests: Relaunch the OTA Requestor App and initiate another query - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Verify that a new transfer of software image is started from DUT when sending another QueryImage request disabled: true - label: - "During the transfer of the image from the DUT, force fail the + "Step 5: During the transfer of the image from the DUT, force fail the transfer before it completely transfers the image. Initiate another QueryImage Command from OTA-R/TH to the DUT. Set the RC[STARTOFS] bit and associated STARTOFS field in the ReceiveInit Message sent from the TH to indicate the resumption of a transfer previously aborted." verification: | - Out of scope for V1.0 + Out of scope disabled: true - - label: "Perform the OTA Update from DUT using vendor specific mechanism." + - label: + "Step 6: Perform the OTA Update from DUT using vendor specific + mechanism." PICS: MCORE.OTA.VendorSpecific verification: | Use vendor specific steps to initiate OTA Update and verify that the software image is transferred from the DUT diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml index 0b8c8c91838c1d..b1caaededa1224 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml @@ -24,6 +24,15 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 DUT - DUT as OTA-R device type. + 2 TH - Test harness1 as Administrator to perform read/write operations. + 3 TH2 - Test harness2 as OTA-P on first fabric. + 4 TH3 - Test harness3 as OTA-P on second fabric. + 5 TH4 - Test harness4 as second OTA-P on first fabric. + disabled: true + - label: "Step 1: TH sends a write request for the DefaultOTAProviders Attribute on the first fabric to the DUT. TH2 is set as the default diff --git a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml index 552d5343fdb669..633e362149c9d1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml @@ -15,12 +15,23 @@ name: 132.2.5. [TC-S-2.5] RemainingCapacity functionality with DUT as Server +PICS: + - S.S + - S.S.F03 + config: nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 tests: + - label: "Precondition" + verification: | + - Commission DUT to TH + - A given fabric SHALL NOT consume more than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is SceneTableSize/2. + disabled: true + - label: "Step 0a: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT using a key that is pre-installed on the TH. @@ -76,7 +87,7 @@ tests: - label: "Step 2: TH sends a AddGroup command to DUT with the GroupID field set - to 0x0001." + to G1." PICS: G.S.C00.Rsp verification: | ./chip-tool groups add-group 0x0001 grp1 1 1 @@ -90,7 +101,7 @@ tests: - label: "Step 3: TH sends a RemoveAllScenes command to DUT with the GroupID - field set to 0x0001." + field set to G1." PICS: S.S.C03.Rsp verification: | ./chip-tool scenes remove-all-scenes 0x0001 1 1 @@ -113,55 +124,11 @@ tests: disabled: true - label: - "Step 4b: TH sends a subscription request action for RemainingCapacity + "Step 4b: TH sends a subscription request action for FabricSceneInfo to the DUT." PICS: S.S.A0007 verification: | - ./chip-tool interactive start - - >> scenes subscribe remaining-capacity 10 100 1 1 - - [1688019515.541743][1731:1733] CHIP:DMG: ReportDataMessage = - [1688019515.541783][1731:1733] CHIP:DMG: { - [1688019515.541816][1731:1733] CHIP:DMG: SubscriptionId = 0x86424e60, - [1688019515.541848][1731:1733] CHIP:DMG: AttributeReportIBs = - [1688019515.541889][1731:1733] CHIP:DMG: [ - [1688019515.541920][1731:1733] CHIP:DMG: AttributeReportIB = - [1688019515.541961][1731:1733] CHIP:DMG: { - [1688019515.541995][1731:1733] CHIP:DMG: AttributeDataIB = - [1688019515.542032][1731:1733] CHIP:DMG: { - [1688019515.542071][1731:1733] CHIP:DMG: DataVersion = 0x5c66a0ed, - [1688019515.542109][1731:1733] CHIP:DMG: AttributePathIB = - [1688019515.542149][1731:1733] CHIP:DMG: { - [1688019515.542189][1731:1733] CHIP:DMG: Endpoint = 0x1, - [1688019515.542230][1731:1733] CHIP:DMG: Cluster = 0x5, - [1688019515.542273][1731:1733] CHIP:DMG: Attribute = 0x0000_0007, - [1688019515.542313][1731:1733] CHIP:DMG: } - [1688019515.542355][1731:1733] CHIP:DMG: - [1688019515.542396][1731:1733] CHIP:DMG: Data = 0, - [1688019515.542433][1731:1733] CHIP:DMG: }, - [1688019515.542474][1731:1733] CHIP:DMG: - [1688019515.542507][1731:1733] CHIP:DMG: }, - [1688019515.542546][1731:1733] CHIP:DMG: - [1688019515.542575][1731:1733] CHIP:DMG: ], - [1688019515.542614][1731:1733] CHIP:DMG: - [1688019515.542644][1731:1733] CHIP:DMG: InteractionModelRevision = 1 - [1688019515.542673][1731:1733] CHIP:DMG: } - [1688019515.542841][1731:1733] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 1550229741 - [1688019515.542905][1731:1733] CHIP:TOO: RemainingCapacity: 0 - [1688019515.542968][1731:1733] CHIP:DMG: MoveToState ReadClient[0xffffac012a80]: Moving to [AwaitingSu] - [1688019515.543104][1731:1733] CHIP:EM: <<< [E:47710i S:27355 M:73821372 (Ack:265285849)] (S) Msg TX to 1:0000000000000001 [2867] --- Type 0001:01 (IM:StatusResponse) - [1688019515.543154][1731:1733] CHIP:IN: (S) Sending msg 73821372 on secure session with LSID: 27355 - [1688019515.544315][1731:1733] CHIP:EM: >>> [E:47710i S:27355 M:265285850 (Ack:73821372)] (S) Msg RX from 1:0000000000000001 [2867] --- Type 0001:04 (IM:SubscribeResponse) - [1688019515.544359][1731:1733] CHIP:EM: Found matching exchange: 47710i, Delegate: 0xffffac012a90 - [1688019515.544401][1731:1733] CHIP:EM: Rxd Ack; Removing MessageCounter:73821372 from Retrans Table on exchange 47710i - [1688019515.544478][1731:1733] CHIP:DMG: SubscribeResponse is received - [1688019515.544530][1731:1733] CHIP:DMG: SubscribeResponseMessage = - [1688019515.544562][1731:1733] CHIP:DMG: { - [1688019515.544592][1731:1733] CHIP:DMG: SubscriptionId = 0x86424e60, - [1688019515.544625][1731:1733] CHIP:DMG: MaxInterval = 0x64, - [1688019515.544657][1731:1733] CHIP:DMG: InteractionModelRevision = 1 - [1688019515.544687][1731:1733] CHIP:DMG: } + disabled: true - label: @@ -173,8 +140,8 @@ tests: - label: "Step 5a: TH sends a AddScene command to DUT with the GroupID field - set to 0x0001, the SceneID field set to 0x01, the TransitionTime field - set to 0x0014 (20s) and no extension field sets." + set to G1, the SceneID field set to 0x01, the TransitionTime field set + to 0x0014 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | ./chip-tool scenes add-scene 0x0001 0x1 0x0014 scene1 [] 1 1 @@ -194,8 +161,7 @@ tests: (MaxRemainingCapacity-1)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 7 + disabled: true - label: @@ -222,15 +188,14 @@ tests: (MaxRemainingCapacity-2)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 6 + disabled: true - label: "Step 7a: If RemainingCapacity is greater than 0, TH sends a AddScene - command to DUT with the GroupID field set to 0x0001, the SceneID field - set to 0x03, the TransitionTime field set to 0x0014 (20s) and no - extension field sets. If RemainingCapacity is 0, continue to Step 8a." + command to DUT with the GroupID field set to G1, the SceneID field set + to 0x03, the TransitionTime field set to 0x0014 (20s) and no extension + field sets. If RemainingCapacity is 0, continue to Step 8a." PICS: S.S.C00.Rsp verification: | ./chip-tool scenes add-scene 0x0001 0x3 0x0014 scene3 [] 1 1 @@ -243,12 +208,12 @@ tests: (MaxRemainingCapacity-3)." PICS: S.S.A0007 verification: | - ./chip-tool scenes add-scene 0x0001 0x3 0x0014 scene3 [] 1 1 + disabled: true - label: "Step 8a: TH sends a RemoveScene command to DUT with the GroupID field - set to 0x0001 and the SceneID field set to 0x01." + set to G1 and the SceneID field set to 0x01." PICS: S.S.C02.Rsp verification: | ./chip-tool scenes remove-scene 0x0001 0x1 1 1 @@ -268,13 +233,12 @@ tests: (MaxRemainingCapacity-2)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 6 + disabled: true - label: "Step 9a: TH sends a RemoveAllScenes command to DUT with the GroupID - field set to 0x0001." + field set to G1." PICS: S.S.C03.Rsp verification: | ./chip-tool scenes remove-all-scenes 0x0001 1 1 @@ -293,8 +257,7 @@ tests: (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 8 + disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml index 54407196bc8f9d..14731c4692a6cf 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml @@ -14,15 +14,26 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 132.2.6. [TC-S-2.6] RemainingCapacity functionality with DUT as Server - + 135.2.6. [TC-S-2.6] RemainingCapacity functionality with DUT as Server - Multi-Fabric +PICS: + - S.S + - S.S.F03 + config: nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 tests: + - label: "Precondition" + verification: | + - TH1, TH2, and TH3 should be on separate, distinct fabrics. + - A given fabric SHALL NOT consume more than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is SceneTableSize/2. + disabled: true + - label: "Step 1a: TH1 sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0000." @@ -54,29 +65,11 @@ tests: disabled: true - label: - "Step 2b: TH1 sends a subscription request action for - RemainingCapacity to the DUT." + "Step 2b: TH1 sends a subscription request action for FabricSceneInfo + to the DUT." PICS: S.S.A0007 verification: | - ./chip-tool interactive start - >> scenes subscribe remaining-capacity 10 100 1 1 --keepSubscriptions 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 8 - CHIP:DMG: MoveToState ReadClient[0xffff94002990]: Moving to [AwaitingSu] - CHIP:EM: <<< [E:32066i S:31983 M:88286544 (Ack:232770518)] (S) Msg TX to 1:0000000000000001 [573B] --- Type 0001:01 (IM:StatusResponse) - CHIP:IN: (S) Sending msg 88286544 on secure session with LSID: 31983 - CHIP:EM: >>> [E:32066i S:31983 M:232770519 (Ack:88286544)] (S) Msg RX from 1:0000000000000001 [573B] --- Type 0001:04 (IM:SubscribeResponse) - CHIP:EM: Found matching exchange: 32066i, Delegate: 0xffff940029a0 - CHIP:EM: Rxd Ack; Removing MessageCounter:88286544 from Retrans Table on exchange 32066i - CHIP:DMG: SubscribeResponse is received - CHIP:DMG: SubscribeResponseMessage = - CHIP:DMG: { - CHIP:DMG: SubscriptionId = 0xf2e8c40c, - CHIP:DMG: MaxInterval = 0x64, - CHIP:DMG: InteractionModelRevision = 1 - CHIP:DMG: } disabled: true - label: @@ -112,16 +105,26 @@ tests: CHIP:TOO: } disabled: true + - label: + "Step 3b: Verify that the DUT sends a report data to TH1 for + FabricSceneInfo after the MinIntervalFloor time; store the + RemainingCapacity field from this fabric’s entry reported in + FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity + equals (MaxRemainingCapacity-1)." + PICS: S.S.A0007 + verification: | + + disabled: true + - label: "Step 4a: TH1 sends AddScene command to DUT with same GroupID and SceneID value starting at 2 and incrementing for each iteration for - RemainingCapacity1 more times until reported value to TH1 (after - MinIntervalFloor) for RemainingCapacity becomes 0." + Remaining1stCapacity more times until reported value to TH1 (after + MinIntervalFloor) for RemainingCapacity field from FabricSceneInfo + becomes 0." PICS: S.S.C00.Rsp && S.S.A0007 verification: | - ./chip-tool scenes add-scene 0x0000 0x2 0x0014 scene2 [] 1 1 - Repeat till RemainingCapacity is 0 disabled: true - label: @@ -151,21 +154,6 @@ tests: CHIP:TOO: groupID: 0 CHIP:TOO: sceneID: 1 CHIP:TOO: } - - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 7 - TH3: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 7 - - Repeat on TH2 till RemainingCapacity reaches 0 - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 0 - TH3: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 0 disabled: true - label: "Step 5b: Repeat Step 4b with TH2" @@ -213,9 +201,10 @@ tests: - label: "Step 7b: Verify that the DUT sends a report data to TH1 for - RemainingCapacity after the MinIntervalFloor time; store this value - into RemainingCapacity1; verify RemainingCapacity1 equals - (MaxRemainingCapacity)." + FabricSceneInfo after the MinIntervalFloor time; store the + RemainingCapacity field from this fabrics entry the reported in + FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity + equals (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | CHIP:DMG: ReportDataMessage = @@ -246,7 +235,5 @@ tests: (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 8 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index 14e4014e3e2157..41c94bc0ad274a 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml @@ -14,6 +14,9 @@ name: 219.1.1. [TC-TCCM-1.1] Global attributes with DUT as Server +PICS: + - TCCM.S + config: nodeId: 0x12344321 cluster: "Refrigerator And Temperature Controlled Cabinet Mode" diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml index 1f428f9c407901..b4d441dd131f98 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml @@ -15,6 +15,10 @@ name: 219.3.1. [TC-TCCM-3.1] On Mode functionality with DUT as Server +PICS: + - TCCM.S.A0003 + - TCCM.S.F00 + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml index a27a8f2400623a..29786eb28374e6 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml @@ -16,7 +16,7 @@ name: 219.3.2. [TC-TCCM-3.2] Startup Mode functionality with DUT as Server PICS: - - TCCM.S + - TCCM.S.A0002 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml index a7b94787d6ed7d..5be0c6eba7b28d 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml @@ -18,7 +18,9 @@ name: Server PICS: - - TCCM.S + - TCCM.S.A0002 + - TCCM.S.A0003 + - TCCM.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml index 286f41e28396b0..bcdb79209c7a36 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml @@ -29,7 +29,7 @@ config: tests: - label: "Note" verification: | - This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + Note: This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. disabled: true - label: "Step 1: Commission DUT to TH" @@ -40,42 +40,44 @@ tests: - label: "Step 2: TH reads from the DUT the MinTemperature attribute" PICS: TCTL.S.A0001 verification: | - ./chip-tool temperaturecontrol read temperature-setpoint 1 1 - On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. + ./chip-tool temperaturecontrol read min-temperature 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 [1689770673.417851][9280:9282] CHIP:DMG: } - [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 - [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MinTemperature: 0 [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 3: TH reads from the DUT the MaxTemperature attribute" PICS: TCTL.S.A0002 verification: | - ./chip-tool temperaturecontrol read min-temperature 1 1 - On TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + ./chip-tool temperaturecontrol read max-temperature 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 [1689770673.417851][9280:9282] CHIP:DMG: } - [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 - [1689770673.417946][9280:9282] CHIP:TOO: MinTemperature: 0 + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the TemperatureSetpoint attribute" PICS: TCTL.S.A0000 verification: | - ./chip-tool temperaturecontrol read max-temperature 1 1 + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 - On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). + On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 [1689770673.417851][9280:9282] CHIP:DMG: } - [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 - [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml index 24dcc68557037d..3de0ce5190f3ac 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml @@ -13,7 +13,7 @@ # 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: 41.3.2. [TC-TSTAT-3.2] Functionality with client as DUT +name: 42.3.1. [TC-TSTAT-3.2] Functionality with client as DUT PICS: - TSTAT.C @@ -30,9 +30,9 @@ tests: disabled: true - label: - "DUT increases the temperature by sending a SetpointRaiseLower command - to the Test Harness, with a valid Mode argument (0, 1 or 2) and a - reasonable positive value that is supported by the DUT." + "Step 1: DUT increases the temperature by sending a SetpointRaiseLower + command to the Test Harness, with a valid Mode argument (0, 1 or 2) + and a reasonable positive value that is supported by the DUT." PICS: TSTAT.C.C00.Tx verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -122,9 +122,9 @@ tests: disabled: true - label: - "DUT lowers the temperature by sending a SetpointRaiseLower command to - the Test Harness, with a valid Mode argument (0, 1 or 2) and a - reasonable negative value that is supported by the DUT." + "Step 2: DUT lowers the temperature by sending a SetpointRaiseLower + command to the Test Harness, with a valid Mode argument (0, 1 or 2) + and a reasonable negative value that is supported by the DUT." PICS: TSTAT.C.C00.Tx verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -212,7 +212,8 @@ tests: [1666952478.428206][5547:5547] CHIP:DMG: }, disabled: true - - label: "DUT sends a GetRelayStatusLog command to the Test Harness." + - label: + "Step 3: DUT sends a GetRelayStatusLog command to the Test Harness." PICS: TSTAT.C.C04.Tx verification: | The GetRelayStatusLogResponse command may not supported in Matter 1.0. diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml index 3d77641d7fd962..2ef928d704b76f 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml @@ -11,66 +11,130 @@ # 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: 256.1.1. [TC-WASHERCTRL-1.1] Global attributes with server as DUT +name: 186.1.1. [TC-WASHERCTRL-1.1] Global attributes with server as DUT PICS: - WASHERCTRL.S config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - verification: | - ./chip-tool laundrywashercontrols read cluster-revision 1 1 - - On TH(Chip-tool) Verify the cluster-revision value is 1 - disabled: true - - - label: "Step 3: TH reads from the DUT the FeatureMap attribute" - verification: | - ./chip-tool laundrywashercontrols read feature-map 1 1 - - On TH(chip-tool), verify that DUT sends FeatureMap attribute - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute" - verification: | - ./chip-tool laundrywashercontrols read attribute-list 1 1 - - Verify we are getting supported attribute list sent in the above command on TH(chip-tool) log - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - - label: "Step 5: TH reads from the DUT the (0xFFFA) EventList attribute" - verification: | - ./chip-tool laundrywashercontrols read event-list 1 1 - - ON TH(Chip-tool) verify the Event-list value is 0 entries - disabled: true + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute. If + WASHERCTRL.S.F00(SPIN) & WASHERCTRL.S.F01(RINSE) are false" + PICS: "!WASHERCTRL.S.F00 && !WASHERCTRL.S.F01" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute" - verification: | - ./chip-tool laundrywashercontrols read accepted-command-list 1 1 + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to + 1 if the DUT is capable of controlling the washer using the spin + attributes (WASHERCTRL.S.F00(SPIN) is true)" + PICS: WASHERCTRL.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] - ON TH(Chip-tool) verify the Accepted-command-list value is 0 entries - disabled: true + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to + 1 if the DUT supports rinse attributes (WASHERCTRL.S.F01(RINSE) is + true)" + PICS: WASHERCTRL.S.F01 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x2] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - label: - "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList - attribute" - verification: | - ./chip-tool laundrywashercontrols read generated-command-list 1 1 + "Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in + AttributeList from DUT." + PICS: WASHERCTRL.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1] - ON TH(Chip-tool) verify the Generated-command-list value is 0 entries - disabled: true + - label: + "Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in + AttributeList from DUT." + PICS: WASHERCTRL.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2, 3] + + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml index ddbf6913e957b0..cc33e0685fea1f 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml @@ -11,32 +11,102 @@ # 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: 185.2.1. [TC-WASHERCTRL-2.1] Optional Spin attributes with DUT as Server +name: 186.2.1. [TC-WASHERCTRL-2.1] Optional Spin attributes with DUT as Server PICS: - WASHERCTRL.S.F00 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 -tests: - - label: "Step 1: Commission DUT to TH" - verification: | + SpinSpeedCurrentValue: + type: int8u + defaultValue: 3 - disabled: true + unsupportedSpinSpeedCurrentValue: + type: int8u + defaultValue: 17 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the the SpinSpeeds attribute" PICS: WASHERCTRL.S.A0000 - verification: | - Verify that the DUT response contains a list of strings with a maximum number of 16. - disabled: true + command: "readAttribute" + attribute: "SpinSpeeds" + response: + constraints: + type: list + maxLength: 16 - label: "Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute" PICS: WASHERCTRL.S.A0001 + command: "readAttribute" + attribute: "SpinSpeedCurrent" + response: + constraints: + type: int8u + minValue: 0 + + - label: + "Verify that the DUT response contains a uint8 with value between 0 + and numSpinSpeeds-1 inclusive." verification: | - Verify that the DUT response contains a uint8 with value between 0 and 15 inclusive. - disabled: true + On TH(Chip-tool), Verify the SpinSpeedCurrent attribute contains value is in the range of 0 and numSpinSpeeds-1. + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.A0001 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 4: TH writes a supported SpinSpeedCurrent attribute that is a + valid index into the list of spin speeds (0 to numSpinSpeeds-1)" + PICS: WASHERCTRL.S.A0001 + command: "writeAttribute" + attribute: "SpinSpeedCurrent" + arguments: + value: SpinSpeedCurrentValue + + - label: "Wait 2 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 + + - label: + "Step 5: after a few seconds, TH reads from the DUT the + SpinSpeedCurrent attribute" + PICS: WASHERCTRL.S.A0001 + command: "readAttribute" + attribute: "SpinSpeedCurrent" + response: + value: SpinSpeedCurrentValue + constraints: + type: int8u + + - label: + "Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is + other than 0 to DUT" + PICS: WASHERCTRL.S.A0001 + command: "writeAttribute" + attribute: "SpinSpeedCurrent" + arguments: + value: unsupportedSpinSpeedCurrentValue + response: + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml index 891067997f6525..06b1b2445130df 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml @@ -11,32 +11,98 @@ # 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: 185.2.2. [TC-WASHERCTRL-2.2] Optional rinse attributes with DUT as Server +name: 186.2.2. [TC-WASHERCTRL-2.2] Optional rinse attributes with DUT as Server PICS: - - WASHERCTRL.S.F00 + - WASHERCTRL.S.F01 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 -tests: - - label: "Step 1: Commission DUT to TH" - verification: | + NumberOfRinsesValue: + type: enum8 + defaultValue: 1 + unsupportedNumberOfRinsesValue: + type: enum8 + defaultValue: 5 - disabled: true +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the the NumberOfRinses attribute" PICS: WASHERCTRL.S.A0002 - verification: | - Verify that the DUT response contains if not null, an enum with up to 4 values. - disabled: true + command: "readAttribute" + attribute: "NumberOfRinses" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 - label: "Step 3: TH reads from the DUT the the SupportedRinses attribute" PICS: WASHERCTRL.S.A0003 + command: "readAttribute" + attribute: "SupportedRinses" + response: + constraints: + type: list + maxLength: 4 + + - label: + "Step 4: TH writes a supported NumberOfRinses attribute to DUT within + the range of the SupportedRinses list" + PICS: WASHERCTRL.S.A0002 + command: "writeAttribute" + attribute: "NumberOfRinses" + arguments: + value: NumberOfRinsesValue + + - label: "Wait 2 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 + + - label: + "Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses + attribute" + PICS: WASHERCTRL.S.A0002 + command: "readAttribute" + attribute: "NumberOfRinses" + response: + value: NumberOfRinsesValue + + - label: "Step 6: Operate device to set the condition to read only" verification: | - Verify that the DUT response contains a list of enums each containing up to 4 values. - disabled: true + Manual operation required + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.M.ManuallyControlled + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 7: TH writes an unsupported NumberOfRinses attribute to DUT + while DUT is not in a valid state." + PICS: WASHERCTRL.S.M.ManuallyControlled && WASHERCTRL.S.A0002 + command: "writeAttribute" + attribute: "NumberOfRinses" + arguments: + value: unsupportedNumberOfRinsesValue + response: + error: INVALID_IN_STATE diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml index 3359307064a0fb..bddc895d325ed8 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml @@ -108,15 +108,6 @@ tests: ######## UpOrOpen Command ####### ### Step 2x -> Check UpOrOpen Fast effects - - label: "Step 2: Subscribe to DUT reports on OperationalStatus attribute" - command: "subscribeAttribute" - attribute: "OperationalStatus" - minInterval: 4 - maxInterval: 5 - response: - constraints: - type: bitmap8 - ### MANDATORY Command - label: "Step 2a: TH sends UpOrOpen command to DUT" command: "UpOrOpen" @@ -164,7 +155,7 @@ tests: ### Depends on the FeatureMap # The value of bit 0..1 must be 01b & if (LF) value of bit 2..3 must be 01b else 00b & if (TL) value of bit 4..5 must be 01b else 00b # Only 3 possibilities are possible here : 05h = 5, 11h = 17 or 15h = 21 then check a range for simplicity [5 - 21] - - label: "Step 3a: TH reads OperationalStatus attribute's bit 0..1" + - label: "Step 3a1: TH reads OperationalStatus attribute's bit 0..1" PICS: WNCV.S.A000a command: "readAttribute" attribute: "OperationalStatus" @@ -176,7 +167,7 @@ tests: hasMasksClear: [0x2] - label: - "Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do + "Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in upcoming OperationalStatus read steps." PICS: WNCV.S.A000a cluster: "Unit Testing" @@ -186,7 +177,7 @@ tests: value: OperationalStatusValue - label: - "Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + "Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" PICS: WNCV.S.A000a && WNCV.S.F00 cluster: "Unit Testing" command: "readAttribute" @@ -199,7 +190,7 @@ tests: hasMasksClear: [0x8] - label: - "Step 3a: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + "Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" PICS: WNCV.S.A000a && !WNCV.S.F00 cluster: "Unit Testing" command: "readAttribute" @@ -211,7 +202,7 @@ tests: hasMasksClear: [0x4, 0x8] - label: - "Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + "Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" PICS: WNCV.S.A000a && WNCV.S.F01 cluster: "Unit Testing" command: "readAttribute" @@ -224,7 +215,7 @@ tests: hasMasksClear: [0x20] - label: - "Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + "Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" PICS: WNCV.S.A000a && !WNCV.S.F01 cluster: "Unit Testing" command: "readAttribute" @@ -236,7 +227,7 @@ tests: hasMasksClear: [0x10, 0x20] ### Depending on the DUT specs we might prefer a arguments here - - label: "Step 3a2: DUT updates its attributes" + - label: "Step 3a7: DUT updates its attributes" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml index 7c710cf5be394f..ed3873b6ae10bc 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml @@ -108,15 +108,6 @@ tests: ######## DownOrClose Command ####### ### Step 2x -> Check DownOrClose Fast effects - - label: "Step 2: Subscribe to DUT reports on OperationalStatus attribute" - command: "subscribeAttribute" - attribute: "OperationalStatus" - minInterval: 4 - maxInterval: 5 - response: - constraints: - type: bitmap8 - ### MANDATORY Command - label: "Step 2a: TH sends DownOrClose command to DUT" command: "DownOrClose" @@ -164,7 +155,7 @@ tests: ### Depends on the FeatureMap # The value of bit 0..1 must be 10b & if (LF) value of bit 2..3 must be 10b else 00b & if (TL) value of bit 4..5 must be 10b else 00b # Only 3 possibilities are possible here : 0Ah = 10, 22h = 34 or 2Ah = 42 then check a range for simplicity [10 - 42] - - label: "Step 3a: TH reads OperationalStatus attribute's bit 0..1" + - label: "Step 3a1: TH reads OperationalStatus attribute's bit 0..1" PICS: WNCV.S.A000a command: "readAttribute" attribute: "OperationalStatus" @@ -176,7 +167,7 @@ tests: hasMasksClear: [0x1] - label: - "Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do + "Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in upcoming OperationalStatus read steps." PICS: WNCV.S.A000a cluster: "Unit Testing" @@ -186,7 +177,7 @@ tests: value: OperationalStatusValue - label: - "Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + "Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" PICS: WNCV.S.A000a && WNCV.S.F00 cluster: "Unit Testing" command: "readAttribute" @@ -199,7 +190,7 @@ tests: hasMasksClear: [0x4] - label: - "Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + "Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" PICS: WNCV.S.A000a && !WNCV.S.F00 cluster: "Unit Testing" command: "readAttribute" @@ -211,7 +202,7 @@ tests: hasMasksClear: [0x4, 0x8] - label: - "Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + "Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" PICS: WNCV.S.A000a && WNCV.S.F01 cluster: "Unit Testing" command: "readAttribute" @@ -224,7 +215,7 @@ tests: hasMasksClear: [0x10] - label: - "Step 3a: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + "Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" PICS: WNCV.S.A000a && !WNCV.S.F01 cluster: "Unit Testing" command: "readAttribute" @@ -236,7 +227,7 @@ tests: hasMasksClear: [0x10, 0x20] ### Depending on the DUT specs we might prefer a arguments here - - label: "Step 3a2: DUT updates its attributes" + - label: "Step 3a7: DUT updates its attributes" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index e280baad7d579f..66b40dbe81572d 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1516,48 +1516,20 @@ DRLK.S.A0028.ReadOnly=1 DRLK.S.A002c.ReadOnly=1 #write attributes -DRLK.S.A0004.Write=0 -DRLK.S.A0005.Write=0 -DRLK.S.A0006.Write=0 -DRLK.S.A0021.Write=1 -DRLK.S.A0022.Write=0 -DRLK.S.A0023.Write=1 -DRLK.S.A0024.Write=1 -DRLK.S.A0025.Write=1 -DRLK.S.A0028.Write=0 -DRLK.S.A0029.Write=1 -DRLK.S.A002a.Write=1 -DRLK.S.A002b.Write=1 -DRLK.S.A002c.Write=1 -DRLK.S.A0030.Write=1 -DRLK.S.A0031.Write=1 -DRLK.S.A0032.Write=1 -DRLK.S.A0033.Write=1 -DRLK.S.A0035.Write=0 - -#ReadOnly attributes -DRLK.S.A0028.ReadOnly=1 -DRLK.S.A002c.ReadOnly=1 +DRLK.S.M.SimulateNotFullyLocked=1 +DRLK.S.M.DetectLockJammed=1 +DRLK.S.M.LanguageAttributeWritable=1 +DRLK.S.M.LEDSettingsAttributeWritable=1 +DRLK.S.M.AutoRelockTimeAttributeWritable=1 +DRLK.S.M.SoundVolumeAttributeWritable=1 +DRLK.S.M.OperatingModeAttributeWritable=1 +DRLK.S.M.EnableLocalProgrammingAttributeWritable=0 +DRLK.S.M.LocalProgrammingFeaturesAttributeWritable=0 +DRLK.S.M.WrongCodeEntryLimitAttributeWritable=1 +DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable=1 +DRLK.S.M.RequirePINForRemoteOperationAttributeWritable=1 +DRLK.S.M.ExpiringUserTimeOutAttributeWritable=0 -#write attributes -DRLK.S.A0004.Write=0 -DRLK.S.A0005.Write=0 -DRLK.S.A0006.Write=0 -DRLK.S.A0021.Write=1 -DRLK.S.A0022.Write=0 -DRLK.S.A0023.Write=1 -DRLK.S.A0024.Write=1 -DRLK.S.A0025.Write=1 -DRLK.S.A0028.Write=0 -DRLK.S.A0029.Write=1 -DRLK.S.A002a.Write=1 -DRLK.S.A002b.Write=1 -DRLK.S.A002c.Write=1 -DRLK.S.A0030.Write=1 -DRLK.S.A0031.Write=1 -DRLK.S.A0032.Write=1 -DRLK.S.A0033.Write=1 -DRLK.S.A0035.Write=0 DRLK.C=1 DRLK.C.F0a=0 @@ -2708,6 +2680,7 @@ WASHERCTRL.S.A0002=1 WASHERCTRL.S.A0003=1 WASHERCTRL.S.M.ManuallyControlledSpin=1 WASHERCTRL.S.M.ManuallyControlledRinse=1 +WASHERCTRL.S.M.ManuallyControlled=0 #RVC Run Mode RVCRUNM.S=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 90615d2a82ef29..91a6b7cf77efd5 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -108,6 +108,11 @@ "Test_TC_ULABEL_2_4" ], "LaundryWasherMode": ["Test_TC_LWM_1_1", "Test_TC_LWM_2_1"], + "LaundryWasherControl": [ + "Test_TC_WASHERCTRL_1_1", + "Test_TC_WASHERCTRL_2_1", + "Test_TC_WASHERCTRL_2_2" + ], "MediaControl": [ "Test_TC_LOWPOWER_1_1", "Test_TC_KEYPADINPUT_1_2", @@ -177,7 +182,6 @@ "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], "RoboticVacuumCleaner": [ "Test_TC_RVCCLEANM_1_1", - "Test_TC_RVCCLEANM_3_1", "Test_TC_RVCRUNM_1_1", "Test_TC_RVCOPSTATE_1_1" ], @@ -365,6 +369,7 @@ "UnitLocalization", "TimeFormatLocalization", "LaundryWasherMode", + "LaundryWasherControl", "MediaControl", "ModeSelect", "MultipleFabrics", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index a2f917ac68c226..e797e989ad3f53 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -261,11 +261,7 @@ "LevelControl": [], "LaundryWasherMode": ["Test_TC_LWM_1_2", "Test_TC_LWM_3_2"], "OnOff": ["Test_TC_OO_2_3"], - "OperationalState": [ - "Test_TC_OPSTATE_2_1", - "Test_TC_OPSTATE_2_2", - "Test_TC_OPSTATE_2_3" - ], + "OperationalState": ["Test_TC_OPSTATE_2_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2"], "SmokeCOAlarm": [], "RefrigeratorAlarm": [ @@ -275,11 +271,7 @@ ], "RVCCleanMode": ["Test_TC_RVCCLEANM_3_3"], "RVCOperationalState": ["Test_TC_RVCOPSTATE_2_2"], - "RVCRunMode": [ - "Test_TC_RVCRUNM_1_1", - "Test_TC_RVCRUNM_3_1", - "Test_TC_RVCRUNM_3_3" - ], + "RVCRunMode": ["Test_TC_RVCRUNM_3_3"], "TemperatureControlledCabinetMode": [ "Test_TC_TCCM_1_2", "Test_TC_TCCM_2_1", @@ -317,13 +309,7 @@ "Test_TC_BRBINFO_2_2", "Test_TC_BRBINFO_3_1" ], - "WasherControls": [ - "Test_TC_WASHERCTRL_1_1", - "Test_TC_WASHERCTRL_2_1", - "Test_TC_WASHERCTRL_2_2", - "Test_TC_WASHERCTRL_3_1", - "Test_TC_WASHERCTRL_3_2" - ], + "LaundryWasherControl": [], "AccessControlEnforcement": [], "collection": [ "DeviceDiscovery", @@ -390,6 +376,6 @@ "UserLabel", "BridgedDeviceBasicInformation", "AccessControlEnforcement", - "WasherControls" + "LaundryWasherControl" ] } diff --git a/src/python_testing/drlk_2_x_common.py b/src/python_testing/drlk_2_x_common.py index bdc52cce1afd62..7ba07577b6b8b9 100644 --- a/src/python_testing/drlk_2_x_common.py +++ b/src/python_testing/drlk_2_x_common.py @@ -148,7 +148,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo requirePinForRemoteOperation_dut = False self.print_step("1", "TH writes the RequirePINforRemoteOperation attribute value as false on the DUT") attribute = attributes.RequirePINforRemoteOperation(False) - if self.check_pics("DRLK.S.A0033.Write"): + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): await self.write_drlk_attribute_expect_success(attribute=attribute) else: await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) @@ -158,7 +158,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo requirePinForRemoteOperation_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.RequirePINforRemoteOperation) logging.info("Current RequirePINforRemoteOperation value is %s" % (requirePinForRemoteOperation_dut)) - if self.check_pics("DRLK.S.A0033.Write"): + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): self.print_step("2a", "TH verifies that RequirePINforRemoteOperation is FALSE") asserts.assert_false(requirePinForRemoteOperation_dut, "RequirePINforRemoteOperation is expected to be FALSE") else: @@ -182,7 +182,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): self.print_step("5", "TH writes the RequirePINforRemoteOperation attribute value as true on the DUT") attribute = attributes.RequirePINforRemoteOperation(True) - if self.check_pics("DRLK.S.A0033.Write"): + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): await self.write_drlk_attribute_expect_success(attribute=attribute) else: await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) @@ -192,7 +192,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo requirePinForRemoteOperation_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.RequirePINforRemoteOperation) logging.info("Current RequirePINforRemoteOperation value is %s" % (requirePinForRemoteOperation_dut)) - if self.check_pics("DRLK.S.A0033.Write"): + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): self.print_step("6a", "TH verifies that RequirePINforRemoteOperation is TRUE") asserts.assert_true(requirePinForRemoteOperation_dut, "RequirePINforRemoteOperation is expected to be TRUE") @@ -216,7 +216,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics("DRLK.S.F00") or self.check_pics("DRLK.S.F01"): self.print_step("10a", "TH writes the WrongCodeEntryLimit to any value between 1 and 255") attribute = attributes.WrongCodeEntryLimit(wrongCodeEntryLimit) - if self.check_pics("DRLK.S.A0030.Write"): + if self.check_pics("DRLK.S.M.WrongCodeEntryLimitAttributeWritable"): await self.write_drlk_attribute_expect_success(attribute=attribute) else: await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) @@ -228,7 +228,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo self.print_step("11a", "TH writes the UserCodeTemporaryDisableTime to any value between 1 and 255") attribute = attributes.UserCodeTemporaryDisableTime(userCodeTemporaryDisableTime) - if self.check_pics("DRLK.S.A0031.Write"): + if self.check_pics("DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable"): await self.write_drlk_attribute_expect_success(attribute=attribute) else: await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) @@ -262,7 +262,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics("DRLK.S.A0023"): self.print_step("15", "TH writes the AutoRelockTime attribute value on the DUT") attribute = attributes.AutoRelockTime(autoRelockTime) - if self.check_pics("DRLK.S.A0023.Write"): + if self.check_pics("DRLK.S.M.AutoRelockTimeAttributeWritable"): await self.write_drlk_attribute_expect_success(attribute=attribute) else: await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index da1a877800b832..5ed37c33b7a44e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -134,6 +134,9 @@ class TestList : public Command { printf("Test_TC_LTIME_3_1\n"); printf("Test_TC_LWM_1_1\n"); printf("Test_TC_LWM_2_1\n"); + printf("Test_TC_WASHERCTRL_1_1\n"); + printf("Test_TC_WASHERCTRL_2_1\n"); + printf("Test_TC_WASHERCTRL_2_2\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -196,7 +199,6 @@ class TestList : public Command { printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_RVCCLEANM_1_1\n"); - printf("Test_TC_RVCCLEANM_3_1\n"); printf("Test_TC_RVCRUNM_1_1\n"); printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_SMOKECO_1_1\n"); @@ -7299,10 +7301,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: @@ -7590,11 +7588,27 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(3) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() @@ -67685,11 +67699,11 @@ class Test_TC_LWM_2_1 : public TestCommandBridge { } }; -class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { +class Test_TC_WASHERCTRL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LOWPOWER_1_1() - : TestCommandBridge("Test_TC_LOWPOWER_1_1") + Test_TC_WASHERCTRL_1_1() + : TestCommandBridge("Test_TC_WASHERCTRL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -67699,7 +67713,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LOWPOWER_1_1() {} + ~Test_TC_WASHERCTRL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -67707,11 +67721,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -67728,45 +67742,91 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Read the global attribute: ClusterRevision\n"); - err = TestStep1ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: Read the global attribute: FeatureMap\n"); - err = TestStep2ReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute. If WASHERCTRL.S.F00(SPIN) & " + "WASHERCTRL.S.F01(RINSE) are false\n"); + if (ShouldSkip("!WASHERCTRL.S.F00 && !WASHERCTRL.S.F01")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeIfWasherctrlsf00spinWasherctrlsf01rinseAreFalse_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to 1 if the DUT is capable " + "of controlling the washer using the spin attributes (WASHERCTRL.S.F00(SPIN) is true)\n"); + if (ShouldSkip("WASHERCTRL.S.F00")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeAttributeList_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0SetTo1IfTheDutIsCapableOfControllingTheWasherUsingTheSpinAttributesWasherctrlsf00spinIsTrue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to 1 if the DUT supports " + "rinse attributes (WASHERCTRL.S.F01(RINSE) is true)\n"); + if (ShouldSkip("WASHERCTRL.S.F01")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeAttributeList_4(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit1SetTo1IfTheDutSupportsRinseAttributesWasherctrlsf01rinseIsTrue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in AttributeList from " + "DUT.\n"); + if (ShouldSkip("WASHERCTRL.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheFeatureDependentWASHERCTRLSF00AttributesInAttributeListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in AttributeList from " + "DUT.\n"); + if (ShouldSkip("WASHERCTRL.S.F01")) { + NextTest(); + return; + } + err = TestStep4cReadTheFeatureDependentWASHERCTRLSF01AttributesInAttributeListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_11(); + break; } if (CHIP_NO_ERROR != err) { @@ -67802,6 +67862,18 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67815,7 +67887,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -67830,15 +67902,17 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep1ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1: Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67854,15 +67928,19 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2ReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttributeIfWasherctrlsf00spinWasherctrlsf01rinseAreFalse_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. If WASHERCTRL.S.F00(SPIN) & WASHERCTRL.S.F01(RINSE) " + @"are false Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67878,81 +67956,174 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR + TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0SetTo1IfTheDutIsCapableOfControllingTheWasherUsingTheSpinAttributesWasherctrlsf00spinIsTrue_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to 1 if the DUT is capable of controlling " + @"the washer using the spin attributes (WASHERCTRL.S.F00(SPIN) is true) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit1SetTo1IfTheDutSupportsRinseAttributesWasherctrlsf01rinseIsTrue_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to 1 if the DUT supports rinse attributes " + @"(WASHERCTRL.S.F01(RINSE) is true) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65530UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestStep4bReadTheFeatureDependentWASHERCTRLSF00AttributesInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in AttributeList from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheFeatureDependentWASHERCTRLSF01AttributesInAttributeListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in AttributeList from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); @@ -67962,15 +68133,17 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67987,21 +68160,23 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } }; -class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { +class Test_TC_WASHERCTRL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_KEYPADINPUT_1_2() - : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") + Test_TC_WASHERCTRL_2_1() + : TestCommandBridge("Test_TC_WASHERCTRL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SpinSpeedCurrentValue", 0, UINT8_MAX, &mSpinSpeedCurrentValue); + AddArgument("unsupportedSpinSpeedCurrentValue", 0, UINT8_MAX, &mUnsupportedSpinSpeedCurrentValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_KEYPADINPUT_1_2() {} + ~Test_TC_WASHERCTRL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -68009,11 +68184,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -68026,80 +68201,1017 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Read the global attribute: ClusterRevision\n"); - err = TestStep1ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the the SpinSpeeds attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0000")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheTheSpinSpeedsAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2a: Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !KEYPADINPUT.S.F00 && KEYPADINPUT.S.F01 && !KEYPADINPUT.S.F02 ")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep2aReadTheGlobalAttributeFeatureMap_2(); + err = TestStep3ThReadsFromTheDutTheTheSpinSpeedCurrentAttribute_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Step 2b: Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Verify that the DUT response contains a uint8 with value between 0 and numSpinSpeeds-1 " + "inclusive.\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep2bGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3(); + err = TestVerifyThatTheDutResponseContainsAUint8WithValueBetween0AndNumSpinSpeeds1Inclusive_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 2c: Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 4: TH writes a supported SpinSpeedCurrent attribute that is a valid index into the list " + "of spin speeds (0 to numSpinSpeeds-1)\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep2cGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4(); + err = TestStep4ThWritesASupportedSpinSpeedCurrentAttributeThatIsAValidIndexIntoTheListOfSpinSpeeds0ToNumSpinSpeeds1_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 2d: Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not\n"); - if (ShouldSkip("KEYPADINPUT.S.F02")) { - NextTest(); - return; - } - err = TestStep2dGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 2 seconds\n"); + err = TestWait2Seconds_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 5: after a few seconds, TH reads from the DUT the SpinSpeedCurrent attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep3aReadTheGlobalAttributeAttributeList_6(); + err = TestStep5AfterAFewSecondsThReadsFromTheDutTheSpinSpeedCurrentAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is other than 0 to DUT\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep3aReadTheGlobalAttributeAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + err = TestStep6ThWritesAnUnsupportedSpinSpeedCurrentAttributeThatIsOtherThan0ToDut_7(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - NextTest(); - return; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mSpinSpeedCurrentValue; + chip::Optional mUnsupportedSpinSpeedCurrentValue; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsFromTheDutTheTheSpinSpeedsAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the the SpinSpeeds attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("spinSpeeds", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("spinSpeeds", value, 16)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSpinSpeedCurrentAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("spinSpeedCurrent", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("spinSpeedCurrent", [value unsignedCharValue], 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheDutResponseContainsAUint8WithValueBetween0AndNumSpinSpeeds1Inclusive_3() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep4ThWritesASupportedSpinSpeedCurrentAttributeThatIsAValidIndexIntoTheListOfSpinSpeeds0ToNumSpinSpeeds1_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id spinSpeedCurrentArgument; + spinSpeedCurrentArgument = mSpinSpeedCurrentValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mSpinSpeedCurrentValue.Value()] + : [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeSpinSpeedCurrentWithValue:spinSpeedCurrentArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH writes a supported SpinSpeedCurrent attribute that is a valid " + @"index into the list of spin speeds (0 to numSpinSpeeds-1) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait2Seconds_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep5AfterAFewSecondsThReadsFromTheDutTheSpinSpeedCurrentAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: after a few seconds, TH reads from the DUT the SpinSpeedCurrent attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SpinSpeedCurrent", actualValue)); + VerifyOrReturn(CheckValue( + "SpinSpeedCurrent", actualValue, mSpinSpeedCurrentValue.HasValue() ? mSpinSpeedCurrentValue.Value() : 3U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("spinSpeedCurrent", "int8u", "int8u")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThWritesAnUnsupportedSpinSpeedCurrentAttributeThatIsOtherThan0ToDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id spinSpeedCurrentArgument; + spinSpeedCurrentArgument = mUnsupportedSpinSpeedCurrentValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mUnsupportedSpinSpeedCurrentValue.Value()] + : [NSNumber numberWithUnsignedChar:17U]; + [cluster writeAttributeSpinSpeedCurrentWithValue:spinSpeedCurrentArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is " + @"other than 0 to DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_WASHERCTRL_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WASHERCTRL_2_2() + : TestCommandBridge("Test_TC_WASHERCTRL_2_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("NumberOfRinsesValue", 0, UINT8_MAX, &mNumberOfRinsesValue); + AddArgument("unsupportedNumberOfRinsesValue", 0, UINT8_MAX, &mUnsupportedNumberOfRinsesValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_WASHERCTRL_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_2_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the the NumberOfRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheTheNumberOfRinsesAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the the SupportedRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0003")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheTheSupportedRinsesAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 4: TH writes a supported NumberOfRinses attribute to DUT within the range of the " + "SupportedRinses list\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep4ThWritesASupportedNumberOfRinsesAttributeToDutWithinTheRangeOfTheSupportedRinsesList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 2 seconds\n"); + err = TestWait2Seconds_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep5AfterAFewSecondsThReadsFromTheDutTheNumberOfRinsesAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Operate device to set the condition to read only\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.M.ManuallyControlled")) { + NextTest(); + return; + } + err = TestStep6OperateDeviceToSetTheConditionToReadOnly_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 7: TH writes an unsupported NumberOfRinses attribute to DUT while DUT is not in a valid " + "state.\n"); + if (ShouldSkip("WASHERCTRL.S.M.ManuallyControlled && WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep7ThWritesAnUnsupportedNumberOfRinsesAttributeToDutWhileDutIsNotInAValidState_7(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_IN_STATE)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mNumberOfRinsesValue; + chip::Optional mUnsupportedNumberOfRinsesValue; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsFromTheDutTheTheNumberOfRinsesAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the the NumberOfRinses attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("numberOfRinses", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfRinses", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfRinses", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSupportedRinsesAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the SupportedRinses attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("supportedRinses", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("supportedRinses", value, 4)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThWritesASupportedNumberOfRinsesAttributeToDutWithinTheRangeOfTheSupportedRinsesList_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id numberOfRinsesArgument; + numberOfRinsesArgument = mNumberOfRinsesValue.HasValue() ? [NSNumber numberWithUnsignedChar:mNumberOfRinsesValue.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeNumberOfRinsesWithValue:numberOfRinsesArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH writes a supported NumberOfRinses attribute to DUT within the " + @"range of the SupportedRinses list Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait2Seconds_4() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep5AfterAFewSecondsThReadsFromTheDutTheNumberOfRinsesAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("NumberOfRinses", actualValue, mNumberOfRinsesValue.HasValue() ? mNumberOfRinsesValue.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6OperateDeviceToSetTheConditionToReadOnly_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep7ThWritesAnUnsupportedNumberOfRinsesAttributeToDutWhileDutIsNotInAValidState_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id numberOfRinsesArgument; + numberOfRinsesArgument = mUnsupportedNumberOfRinsesValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mUnsupportedNumberOfRinsesValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeNumberOfRinsesWithValue:numberOfRinsesArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 7: TH writes an unsupported NumberOfRinses attribute to DUT while DUT " + @"is not in a valid state. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_IN_STATE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LOWPOWER_1_1() + : TestCommandBridge("Test_TC_LOWPOWER_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LOWPOWER_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Read the global attribute: ClusterRevision\n"); + err = TestStep1ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: Read the global attribute: FeatureMap\n"); + err = TestStep2ReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep1ReadTheGlobalAttributeClusterRevision_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2ReadTheGlobalAttributeFeatureMap_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65530UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_KEYPADINPUT_1_2() + : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_KEYPADINPUT_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Read the global attribute: ClusterRevision\n"); + err = TestStep1ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2a: Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !KEYPADINPUT.S.F00 && KEYPADINPUT.S.F01 && !KEYPADINPUT.S.F02 ")) { + NextTest(); + return; + } + err = TestStep2aReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 2b: Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F00")) { + NextTest(); + return; + } + err = TestStep2bGivenKeypadinputsf00nvFeatureMapBitMaskIsSetOrNot_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : Step 2c: Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F01")) { + NextTest(); + return; + } + err = TestStep2cGivenKeypadinputsf01lkFeatureMapBitMaskIsSetOrNot_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 2d: Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not\n"); + if (ShouldSkip("KEYPADINPUT.S.F02")) { + NextTest(); + return; + } + err = TestStep2dGivenKeypadinputsf02nkFeatureMapBitMaskIsSetOrNot_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3aReadTheGlobalAttributeAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3aReadTheGlobalAttributeAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -78344,7 +79456,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C00.Rsp")) { + if (ShouldSkip("ALOGIN.S.C00.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -78354,7 +79466,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 3 : Step 2: TH sends a Login command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C02.Rsp")) { + if (ShouldSkip("ALOGIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -78364,7 +79476,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: TH sends a Logout command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C03.Rsp")) { + if (ShouldSkip("ALOGIN.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -78489,6 +79601,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintMinLength("setupPIN", values.setupPIN, 11)); { setupPIN = values.setupPIN; } @@ -92570,433 +93683,15 @@ class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in " - @"AttributeList from the DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in " - @"AttributeList from the DUT Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse) " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_3_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RVCCLEANM_3_1() - : TestCommandBridge("Test_TC_RVCCLEANM_3_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("new_mode_th", 0, UINT8_MAX, &mNewModeTh); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_RVCCLEANM_3_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCCLEANM_3_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCCLEANM_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress( - chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH (can be skipped if done in a preceding test).\n"); - err = TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: TH writes from the DUT the OnMode attribute.\n"); - if (ShouldSkip("RVCCLEANM.S.A0003 && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestPreconditionThWritesFromTheDutTheOnModeAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: TH reads from the DUT the OnMode attribute.\n"); - if (ShouldSkip("RVCCLEANM.S.A0003 && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep2ThReadsFromTheDutTheOnModeAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the CurrentMode attribute.\n"); - if (ShouldSkip("RVCCLEANM.S.A0001 && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep3ThReadsFromTheDutTheCurrentModeAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the SupportedModes attribute.\n"); - if (ShouldSkip("RVCCLEANM.S.A0000 && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep4ThReadsFromTheDutTheSupportedModesAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); - if (ShouldSkip("RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep5ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6:TH sends a Off command to the DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep6thSendsAOffCommandToTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7:TH sends a On command to the DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep7thSendsAOnCommandToTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 8: TH reads from the DUT the CurrentMode attribute.\n"); - if (ShouldSkip("RVCCLEANM.S.A0001 && RVCCLEANM.S.F00")) { - NextTest(); - return; - } - err = TestStep8ThReadsFromTheDutTheCurrentModeAttribute_8(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -93010,15 +93705,14 @@ class Test_TC_RVCCLEANM_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mNewModeTh; chip::Optional mTimeout; - CHIP_ERROR TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -93026,75 +93720,94 @@ class Test_TC_RVCCLEANM_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionThWritesFromTheDutTheOnModeAttribute_1() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOnModeWithValue:onModeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Precondition: TH writes from the DUT the OnMode attribute. Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable on_mode_dut; - CHIP_ERROR TestStep2ThReadsFromTheDutTheOnModeAttribute_2() + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads from the DUT the OnMode attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onMode", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("onMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onMode", [value unsignedCharValue], 254U)); - } { - on_mode_dut = value; + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull old_current_mode_dut; - CHIP_ERROR TestStep3ThReadsFromTheDutTheCurrentModeAttribute_3() + CHIP_ERROR TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads from the DUT the CurrentMode attribute. Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); - { - old_current_mode_dut = value; - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -93102,108 +93815,147 @@ class Test_TC_RVCCLEANM_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsFromTheDutTheSupportedModesAttribute_4() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads from the DUT the SupportedModes attribute. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedModes", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("supportedModes", value, 2)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_5() + CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; - params.newMode - = mNewModeTh.HasValue() ? [NSNumber numberWithUnsignedChar:mNewModeTh.Value()] : [NSNumber numberWithUnsignedChar:1U]; - [cluster - changeToModeWithParams:params - completion:^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6thSendsAOffCommandToTheDut_6() + CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 6:TH sends a Off command to the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in " + @"AttributeList from the DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7thSendsAOnCommandToTheDut_7() + CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 7:TH sends a On command to the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in " + @"AttributeList from the DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ThReadsFromTheDutTheCurrentModeAttribute_8() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 8: TH reads from the DUT the CurrentMode attribute. Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse) " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, on_mode_dut)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -108805,185 +109557,176 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { err = TestStep1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH sends UpOrOpen command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2a: TH sends UpOrOpen command to DUT\n"); if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestStep2aThSendsUpOrOpenCommandToDut_9(); + err = TestStep2aThSendsUpOrOpenCommandToDut_7(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: DUT updates its attributes\n"); - err = TestStep2bDutUpdatesItsAttributes_10(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2b: DUT updates its attributes\n"); + err = TestStep2bDutUpdatesItsAttributes_8(); break; - case 11: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 9 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); + err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9(); break; - case 12: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 10 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); + err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 2e: TH leave the device moving for 2 seconds\n"); - err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_13(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH leave the device moving for 2 seconds\n"); + err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_11(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3a: TH reads OperationalStatus attribute's bit 0..1\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a1: TH reads OperationalStatus attribute's bit 0..1\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit01_14(); + err = TestStep3a1ThReadsOperationalStatusAttributesBit01_12(); break; - case 15: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " + " ***** Test Step 13 : Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " "upcoming OperationalStatus read steps.\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_15(); + err = TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13(); break; - case 16: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + chipTool, " ***** Test Step 14 : Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_16(); + err = TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14(); break; - case 17: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 3a: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + chipTool, " ***** Test Step 15 : Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThCheckOperationalStatusValueBit23Wncvsf00lf_17(); + err = TestStep3a4ThCheckOperationalStatusValueBit23Wncvsf00lf_15(); break; - case 18: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + chipTool, " ***** Test Step 16 : Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18(); + err = TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16(); break; - case 19: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 19 : Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + chipTool, " ***** Test Step 17 : Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_19(); + err = TestStep3a6ThChecksOperationalStatusValueBit45Wncvsf01tl_17(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); - err = TestStep3a2DutUpdatesItsAttributes_20(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 3a7: DUT updates its attributes\n"); + err = TestStep3a7DutUpdatesItsAttributes_18(); break; - case 21: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 19 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); + err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19(); break; - case 22: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + " ***** Test Step 20 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); + err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20(); break; - case 23: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 21 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21(); break; - case 24: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + " ***** Test Step 22 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4a: TH sends a StopMotion command to DUT\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4a: TH sends a StopMotion command to DUT\n"); if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestStep4aThSendsAStopMotionCommandToDut_25(); + err = TestStep4aThSendsAStopMotionCommandToDut_23(); break; - case 26: + case 24: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + chipTool, " ***** Test Step 24 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24(); break; - case 27: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + " ***** Test Step 25 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH waits for x seconds attributes update on the device\n"); - err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5a: TH waits for x seconds attributes update on the device\n"); + err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26(); break; - case 29: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 27 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27(); break; - case 30: + case 28: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 28 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); + err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28(); break; } @@ -109083,12 +109826,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -109102,7 +109839,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -109252,63 +109989,8 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - bool testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_1_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_1_OperationalStatus_Reported; - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestStep2aThSendsUpOrOpenCommandToDut_9() + CHIP_ERROR TestStep2aThSendsUpOrOpenCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109326,7 +110008,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bDutUpdatesItsAttributes_10() + CHIP_ERROR TestStep2bDutUpdatesItsAttributes_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -109334,7 +110016,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() + CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109358,7 +110040,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() + CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109382,7 +110064,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_13() + CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -109391,7 +110073,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { } NSNumber * _Nonnull OperationalStatusValue; - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() + CHIP_ERROR TestStep3a1ThReadsOperationalStatusAttributesBit01_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109399,7 +110081,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); + NSLog(@"Step 3a1: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109414,7 +110096,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_15() + CHIP_ERROR TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109425,7 +110107,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { bitmap8Argument = [OperationalStatusValue copy]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument completion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do the bits " + NSLog(@"Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits " @"checks in upcoming OperationalStatus read steps. Error: %@", err); @@ -109437,7 +110119,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_16() + CHIP_ERROR TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109445,7 +110127,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + NSLog(@"Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109461,7 +110143,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThCheckOperationalStatusValueBit23Wncvsf00lf_17() + CHIP_ERROR TestStep3a4ThCheckOperationalStatusValueBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109469,7 +110151,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + NSLog(@"Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109485,7 +110167,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18() + CHIP_ERROR TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109493,7 +110175,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + NSLog(@"Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109509,7 +110191,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_19() + CHIP_ERROR TestStep3a6ThChecksOperationalStatusValueBit45Wncvsf01tl_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109517,7 +110199,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + NSLog(@"Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109533,7 +110215,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3a2DutUpdatesItsAttributes_20() + CHIP_ERROR TestStep3a7DutUpdatesItsAttributes_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -109541,7 +110223,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() + CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109569,7 +110251,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() + CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109596,7 +110278,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() + CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109624,7 +110306,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() + CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109651,7 +110333,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_25() + CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109669,7 +110351,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -109677,7 +110359,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() + CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109700,7 +110382,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -109708,7 +110390,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() + CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109735,7 +110417,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() + CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -109855,185 +110537,176 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { err = TestStep1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH sends DownOrClose command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2a: TH sends DownOrClose command to DUT\n"); if (ShouldSkip("WNCV.S.C01.Rsp")) { NextTest(); return; } - err = TestStep2aThSendsDownOrCloseCommandToDut_9(); + err = TestStep2aThSendsDownOrCloseCommandToDut_7(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: DUT updates its attributes\n"); - err = TestStep2bDutUpdatesItsAttributes_10(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2b: DUT updates its attributes\n"); + err = TestStep2bDutUpdatesItsAttributes_8(); break; - case 11: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 9 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); + err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9(); break; - case 12: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 10 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); + err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 2e: TH leave the device moving for 2 seconds\n"); - err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_13(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH leave the device moving for 2 seconds\n"); + err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_11(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3a: TH reads OperationalStatus attribute's bit 0..1\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a1: TH reads OperationalStatus attribute's bit 0..1\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit01_14(); + err = TestStep3a1ThReadsOperationalStatusAttributesBit01_12(); break; - case 15: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " + " ***** Test Step 13 : Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " "upcoming OperationalStatus read steps.\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_15(); + err = TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13(); break; - case 16: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + chipTool, " ***** Test Step 14 : Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_16(); + err = TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14(); break; - case 17: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + chipTool, " ***** Test Step 15 : Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_17(); + err = TestStep3a4ThChecksOperationalStatusValueBit23Wncvsf00lf_15(); break; - case 18: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + chipTool, " ***** Test Step 16 : Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18(); + err = TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16(); break; - case 19: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 19 : Step 3a: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + chipTool, " ***** Test Step 17 : Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThChesksOperationalStatusValueBit45Wncvsf01tl_19(); + err = TestStep3a6ThChesksOperationalStatusValueBit45Wncvsf01tl_17(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); - err = TestStep3a2DutUpdatesItsAttributes_20(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 3a7: DUT updates its attributes\n"); + err = TestStep3a7DutUpdatesItsAttributes_18(); break; - case 21: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 19 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); + err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19(); break; - case 22: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + " ***** Test Step 20 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); + err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20(); break; - case 23: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 21 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21(); break; - case 24: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + " ***** Test Step 22 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4a: TH sends a StopMotion command to DUT\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4a: TH sends a StopMotion command to DUT\n"); if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestStep4aThSendsAStopMotionCommandToDut_25(); + err = TestStep4aThSendsAStopMotionCommandToDut_23(); break; - case 26: + case 24: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + chipTool, " ***** Test Step 24 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24(); break; - case 27: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + " ***** Test Step 25 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH waits for x seconds attributes update on the device\n"); - err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5a: TH waits for x seconds attributes update on the device\n"); + err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26(); break; - case 29: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 27 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27(); break; - case 30: + case 28: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 28 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); + err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28(); break; } @@ -110133,12 +110806,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -110152,7 +110819,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -110302,63 +110969,8 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - bool testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_2_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_2_OperationalStatus_Reported; - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestStep2aThSendsDownOrCloseCommandToDut_9() + CHIP_ERROR TestStep2aThSendsDownOrCloseCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110376,7 +110988,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bDutUpdatesItsAttributes_10() + CHIP_ERROR TestStep2bDutUpdatesItsAttributes_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -110384,7 +110996,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() + CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110408,7 +111020,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() + CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110432,7 +111044,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_13() + CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -110441,7 +111053,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { } NSNumber * _Nonnull OperationalStatusValue; - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() + CHIP_ERROR TestStep3a1ThReadsOperationalStatusAttributesBit01_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110449,7 +111061,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); + NSLog(@"Step 3a1: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110464,7 +111076,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_15() + CHIP_ERROR TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110475,7 +111087,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { bitmap8Argument = [OperationalStatusValue copy]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument completion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: Write attribute BITMAP8 with OperationalStatusValue to do the bits " + NSLog(@"Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits " @"checks in upcoming OperationalStatus read steps. Error: %@", err); @@ -110487,7 +111099,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_16() + CHIP_ERROR TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110495,7 +111107,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + NSLog(@"Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110511,7 +111123,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_17() + CHIP_ERROR TestStep3a4ThChecksOperationalStatusValueBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110519,7 +111131,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + NSLog(@"Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110535,7 +111147,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18() + CHIP_ERROR TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110543,7 +111155,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + NSLog(@"Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110559,7 +111171,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThChesksOperationalStatusValueBit45Wncvsf01tl_19() + CHIP_ERROR TestStep3a6ThChesksOperationalStatusValueBit45Wncvsf01tl_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110567,7 +111179,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + NSLog(@"Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110583,7 +111195,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3a2DutUpdatesItsAttributes_20() + CHIP_ERROR TestStep3a7DutUpdatesItsAttributes_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -110591,7 +111203,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() + CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110619,7 +111231,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() + CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110646,7 +111258,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() + CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110674,7 +111286,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() + CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110701,7 +111313,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_25() + CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110719,7 +111331,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -110727,7 +111339,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() + CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110750,7 +111362,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -110758,7 +111370,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() + CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -110785,7 +111397,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() + CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -170510,7 +171122,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Step 1a: TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY")) { + if (ShouldSkip("DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SDK_CI_ONLY")) { NextTest(); return; } @@ -170519,7 +171131,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Step 1b: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -170528,7 +171140,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Step 1c: TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write")) { + if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.M.AutoRelockTimeAttributeWritable")) { NextTest(); return; } @@ -170537,7 +171149,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 1d: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.M.AutoRelockTimeAttributeWritable")) { NextTest(); return; } @@ -178817,6 +179429,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -178879,7 +179494,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), From 7239ed189a5e129c2f7b6e6b642107a9a7bc8dd8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 14:58:30 -0400 Subject: [PATCH 19/29] Add per-controller control over operational advertising to Matter.framework. (#29018) --- .../CHIP/MTRDeviceControllerFactory.mm | 3 +- .../MTRDeviceControllerStartupParameters.h | 6 + .../CHIP/MTRDeviceControllerStartupParams.mm | 1 + .../CHIPTests/MTRCertificateValidityTests.m | 1 - .../CHIPTests/MTRControllerAdvertisingTests.m | 297 ++++++++++++++++++ .../Matter.xcodeproj/project.pbxproj | 4 + 6 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 97785a45a9db99..a11a7d30135e46 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -851,11 +851,12 @@ - (MTRDeviceController * _Nullable)createController:(MTRDeviceControllerStartupP return [self _startDeviceController:startupParameters fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + auto advertiseOperational = self.advertiseOperational && startupParameters.shouldAdvertiseOperational; auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewController:controller fabricTable:fabricTable keystore:self->_keystore - advertiseOperational:self.advertiseOperational + advertiseOperational:advertiseOperational params:startupParameters error:fabricError]; if (params != nil) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h index b592849f066974..7b365948b61080 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParameters.h @@ -46,6 +46,12 @@ MTR_NEWLY_AVAILABLE */ @property (nonatomic, copy, nullable) NSArray * certificationDeclarationCertificates; +/** + * Whether the controller should advertise its operational identity. Defaults + * to NO. + */ +@property (nonatomic, assign) BOOL shouldAdvertiseOperational; + /** * Set an MTROperationalCertificateIssuer to call (on the provided queue) when * operational certificates need to be provided during commissioning. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index c4ad49dda014cd..57c9270a682b08 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -264,6 +264,7 @@ - (instancetype)initWithStorageDelegate:(id) _productAttestationAuthorityCertificates = nil; _certificationDeclarationCertificates = nil; + _shouldAdvertiseOperational = NO; _ipk = ipk; _vendorID = vendorID; diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m index 34fd5d5814d254..7a66d299e19e71 100644 --- a/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m @@ -251,7 +251,6 @@ - (void)initStack:(MTRTestCertificateIssuer *)certificateIssuer __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - factoryParams.shouldStartServer = YES; BOOL ok = [factory startControllerFactory:factoryParams error:nil]; XCTAssertTrue(ok); diff --git a/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m new file mode 100644 index 00000000000000..1276e0ce845bca --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m @@ -0,0 +1,297 @@ +/* + * 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 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 + +// system dependencies +#import +#import + +#import "MTRFabricInfoChecker.h" +#import "MTRTestKeys.h" +#import "MTRTestPerControllerStorage.h" + +static const uint16_t kTestVendorId = 0xFFF1u; +static const uint16_t kTimeoutInSeconds = 3; + +static NSString * NodeIDAsString(NSNumber * nodeID) { return [NSString stringWithFormat:@"%016llX", nodeID.unsignedLongLongValue]; } + +@interface MTRControllerAdvertisingTestsOperationalBrowser : NSObject +@property NSSet * discoveredNodes; + +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation nodeIDToExpect:(NSNumber *)nodeIDToExpect; +- (void)discoveredNodeID:(NSString *)nodeID onCompressedFabricID:(NSString *)compressedFabricID; +@end + +static void OnBrowse(DNSServiceRef aServiceRef, DNSServiceFlags aFlags, uint32_t aInterfaceId, DNSServiceErrorType aError, + const char * aName, const char * aType, const char * aDomain, void * aContext) +{ + XCTAssertTrue(aError == kDNSServiceErr_NoError); + + if (!(aFlags & kDNSServiceFlagsAdd)) { + return; + } + + // 16 chars for compressed fabric id, 16 chars for node id, and the dash. + XCTAssertTrue(strlen(aName) == 33); + + NSString * compressedFabricID = [[NSString alloc] initWithBytes:aName length:16 encoding:NSUTF8StringEncoding]; + NSString * nodeID = [[NSString alloc] initWithBytes:aName + 17 length:16 encoding:NSUTF8StringEncoding]; + + __auto_type * self = (__bridge MTRControllerAdvertisingTestsOperationalBrowser *) aContext; + [self discoveredNodeID:nodeID onCompressedFabricID:compressedFabricID]; +} + +static const char kLocalDot[] = "local."; +static const char kOperationalType[] = "_matter._tcp"; +static const DNSServiceFlags kBrowseFlags = 0; + +@implementation MTRControllerAdvertisingTestsOperationalBrowser { + DNSServiceRef _browseRef; + // Key is compressed fabric id, value is the set of discovered node IDs. + NSMutableDictionary *> * _allDiscoveredNodes; + + XCTestExpectation * _expectation; + NSString * _nodeIDToExpect; +} + +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation nodeIDToExpect:(NSNumber *)nodeIDToExpect +{ + XCTAssertNotNil([super init]); + + _allDiscoveredNodes = [[NSMutableDictionary alloc] init]; + _expectation = expectation; + _nodeIDToExpect = NodeIDAsString(nodeIDToExpect); + + __auto_type err = DNSServiceBrowse( + &_browseRef, kBrowseFlags, kDNSServiceInterfaceIndexAny, kOperationalType, kLocalDot, OnBrowse, (__bridge void *) self); + XCTAssertTrue(err == kDNSServiceErr_NoError); + + err = DNSServiceSetDispatchQueue(_browseRef, dispatch_get_main_queue()); + XCTAssertTrue(err == kDNSServiceErr_NoError); + + return self; +} + +- (void)discoveredNodeID:(NSString *)nodeID onCompressedFabricID:(NSString *)compressedFabricID +{ + if (_allDiscoveredNodes[compressedFabricID] == nil) { + _allDiscoveredNodes[compressedFabricID] = [[NSMutableSet alloc] init]; + } + [_allDiscoveredNodes[compressedFabricID] addObject:nodeID]; + + // It would be nice to check the compressedFabricID, but computing the right + // expected value for it is a pain. + if ([nodeID isEqualToString:_nodeIDToExpect]) { + _discoveredNodes = [NSSet setWithSet:_allDiscoveredNodes[compressedFabricID]]; + // Stop our browse so we get no more notifications. + DNSServiceRefDeallocate(_browseRef); + _browseRef = NULL; + [_expectation fulfill]; + } +} + +- (void)dealloc +{ + if (_browseRef) { + DNSServiceRefDeallocate(_browseRef); + } +} + +@end + +@interface MTRControllerAdvertisingTests : XCTestCase +@end + +@implementation MTRControllerAdvertisingTests { + dispatch_queue_t _storageQueue; +} + ++ (void)tearDown +{ +} + +- (void)setUp +{ + // Per-test setup, runs before each test. + [super setUp]; + [self setContinueAfterFailure:NO]; + + _storageQueue = dispatch_queue_create("test.storage.queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + + [self startFactory]; +} + +- (void)tearDown +{ + // Per-test teardown, runs after each test. + [self stopFactory]; + _storageQueue = nil; + [super tearDown]; +} + +- (void)startFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] init]; + factoryParams.shouldStartServer = YES; + + NSError * error; + BOOL ok = [factory startControllerFactory:factoryParams error:&error]; + XCTAssertNil(error); + XCTAssertTrue(ok); + + XCTAssertTrue(factory.isRunning); +} + +- (void)stopFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + [factory stopControllerFactory]; + XCTAssertFalse(factory.isRunning); +} + +// Test helpers + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + advertiseOperational:(BOOL)advertiseOperational + error:(NSError * __autoreleasing *)error +{ + XCTAssertTrue(error != NULL); + + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + // Specify a fixed issuerID, so we get the same cert if we use the same keys. + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:@(1) fabricID:nil error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(root); + + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:fabricID + nodeID:nodeID + caseAuthenticatedTags:nil + error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(operational); + + __auto_type * params = + [[MTRDeviceControllerExternalCertificateStartupParameters alloc] initWithStorageDelegate:storage + storageDelegateQueue:_storageQueue + uniqueIdentifier:storage.controllerID + ipk:rootKeys.ipk + vendorID:@(kTestVendorId) + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; + XCTAssertNotNil(params); + + params.shouldAdvertiseOperational = advertiseOperational; + + return [factory createController:params error:error]; +} + +- (void)test001_CheckAdvertisingAsExpected +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + // Pick some ids that no other test will be using. + NSNumber * nodeID1 = @(0x1827364554637281); + NSNumber * nodeID2 = @(0x8172635445362718); + NSNumber * nodeID3 = @(0x8811772266335544); + NSNumber * fabricID = @(0x1122334455667788); + + __auto_type * browseExpectation = [self expectationWithDescription:@"Discovered our last controller"]; + // Assume that since we start the controller with nodeID3 last, by the + // time we see its advertisements we will have seen the ones for the one + // with nodeID1 too, if it had any. + __auto_type * operationalBrowser = + [[MTRControllerAdvertisingTestsOperationalBrowser alloc] initWithExpectation:browseExpectation nodeIDToExpect:nodeID3]; + XCTAssertNotNil(operationalBrowser); + + __auto_type * storageDelegate1 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSError * error; + MTRDeviceController * controller1 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate1 + advertiseOperational:NO + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller1); + XCTAssertTrue([controller1 isRunning]); + XCTAssertEqualObjects(controller1.controllerNodeID, nodeID1); + + __auto_type * storageDelegate2 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + MTRDeviceController * controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate2 + advertiseOperational:YES + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + XCTAssertEqualObjects(controller2.controllerNodeID, nodeID2); + + __auto_type * storageDelegate3 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + MTRDeviceController * controller3 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID3 + storage:storageDelegate3 + advertiseOperational:YES + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller3); + XCTAssertTrue([controller3 isRunning]); + XCTAssertEqualObjects(controller3.controllerNodeID, nodeID3); + + [self waitForExpectations:@[ browseExpectation ] timeout:kTimeoutInSeconds]; + + __auto_type * expectedDiscoveredNodes = [NSSet setWithArray:@[ NodeIDAsString(nodeID2), NodeIDAsString(nodeID3) ]]; + XCTAssertEqualObjects(operationalBrowser.discoveredNodes, expectedDiscoveredNodes); + + [controller1 shutdown]; + XCTAssertFalse([controller1 isRunning]); + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + [controller3 shutdown]; + XCTAssertFalse([controller3 isRunning]); +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index edc68cd47eb1c4..a95c790993dfd5 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */; }; 517BF3F3282B62CB00A8B7DB /* MTRCertificateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */; }; 518D3F832AA132DC008E0007 /* MTRTestPerControllerStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */; }; + 518D3F852AA14006008E0007 /* MTRControllerAdvertisingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */; }; 519498322A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */; }; 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */; }; 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -489,6 +490,7 @@ 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRCertificateTests.m; sourceTree = ""; }; 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestPerControllerStorage.m; sourceTree = ""; }; 518D3F822AA132DC008E0007 /* MTRTestPerControllerStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestPerControllerStorage.h; sourceTree = ""; }; + 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRControllerAdvertisingTests.m; sourceTree = ""; }; 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRSetupPayloadSerializerTests.m; sourceTree = ""; }; 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRDataValueParserTests.m; sourceTree = ""; }; 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRStructsObjc.h; sourceTree = ""; }; @@ -1164,6 +1166,7 @@ 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */, 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */, 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */, + 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */, B202529D2459E34F00F97062 /* Info.plist */, 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */, ); @@ -1580,6 +1583,7 @@ 51D10D2E2808E2CA00E8CA3D /* MTRTestStorage.m in Sources */, 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */, 997DED1A26955D0200975E97 /* MTRThreadOperationalDatasetTests.mm in Sources */, + 518D3F852AA14006008E0007 /* MTRControllerAdvertisingTests.m in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, From 8bd7e087b85a90edd92d502a4e42e10d3d7945d3 Mon Sep 17 00:00:00 2001 From: jrhees-cae <61466710+jrhees-cae@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:06:35 -0400 Subject: [PATCH 20/29] [DRLK] Return NOT_FOUND error for non-existent User on GetWeekdaySchedule/GetYeardaySchedule commands (#28974) * [DRLK] Return NOT_FOUND error for non-existent User on GetWeekdaySchedule/GetYeardaySchedule commands Fixes #21791 * Restyled by prettier-yaml * zap-regen * Include changes to DL_Schedules.yaml test * zap regen * Fix issue with DL_Schedules for correct Status codes --------- Co-authored-by: Restyled.io --- .../door-lock-server/door-lock-server.cpp | 4 +- src/app/tests/suites/DL_Schedules.yaml | 12 +- .../certification/Test_TC_DRLK_2_5.yaml | 39 +++- .../certification/Test_TC_DRLK_2_7.yaml | 28 ++- .../zap-generated/test/Commands.h | 206 ++++++++++++++---- 5 files changed, 241 insertions(+), 48 deletions(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index a9b3cdd4dc106d..01edd3f1b60253 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -1046,7 +1046,7 @@ void DoorLockServer::getWeekDayScheduleCommandHandler(chip::app::CommandHandler { ChipLogProgress(Zcl, "[GetWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, weekDayIndex, userIndex); - sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kFailure); + sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kNotFound); return; } @@ -1246,7 +1246,7 @@ void DoorLockServer::getYearDayScheduleCommandHandler(chip::app::CommandHandler { ChipLogProgress(Zcl, "[GetYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, yearDayIndex, userIndex); - sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kFailure); + sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kNotFound); return; } diff --git a/src/app/tests/suites/DL_Schedules.yaml b/src/app/tests/suites/DL_Schedules.yaml index e70a46863cf0eb..208600f4f65ec8 100644 --- a/src/app/tests/suites/DL_Schedules.yaml +++ b/src/app/tests/suites/DL_Schedules.yaml @@ -488,7 +488,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # # Excercise SetYearDay schedules with invalid parameters @@ -686,7 +686,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # # Excercise Set Holiday schedules with invalid parameters @@ -1799,7 +1799,7 @@ tests: - name: "UserIndex" value: 1 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing first user also cleared year day schedules" command: "GetYearDaySchedule" @@ -1816,7 +1816,7 @@ tests: - name: "UserIndex" value: 1 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing second user also cleared week day schedules" command: "GetWeekDaySchedule" @@ -1833,7 +1833,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing second user also cleared year day schedules" command: "GetYearDaySchedule" @@ -1850,7 +1850,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # Make sure that all the manipulations did not affect the holiday schedules - label: "Make sure that first holiday schedule was not deleted" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml index 41ec78be53f221..782824c8de5caf 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml @@ -212,7 +212,42 @@ tests: constraints: hasValue: false - - label: "Step 7: TH sends Clear Week Day Schedule Command to DUT" + - label: + "Step 7: TH sends Get Week Day Schedule Command to DUT for + non-existent User" + PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx + command: "GetWeekDaySchedule" + arguments: + values: + - name: "WeekDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + response: + values: + - name: "WeekDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + - name: "Status" + value: 0x8B + - name: "DaysMask" + constraints: + hasValue: false + - name: "StartHour" + constraints: + hasValue: false + - name: "StartMinute" + constraints: + hasValue: false + - name: "EndHour" + constraints: + hasValue: false + - name: "EndMinute" + constraints: + hasValue: false + + - label: "Step 8: TH sends Clear Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp command: "ClearWeekDaySchedule" arguments: @@ -222,7 +257,7 @@ tests: - name: "UserIndex" value: 1 - - label: "Step 8: TH sends Get Week Day Schedule Command to DUT" + - label: "Step 9: TH sends Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index 46c91e523ed360..0db99395e20ea8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -298,7 +298,33 @@ tests: constraints: minValue: 1081 - - label: "Step 12: TH sends Clear Year Day Schedule to DUT" + - label: + "Step 12: TH sends Get Year Day Schedule Command to DUT for + non-existent User" + PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx + command: "GetYearDaySchedule" + arguments: + values: + - name: "YearDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + response: + values: + - name: "YearDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + - name: "Status" + value: 0x8B + - name: "LocalStartTime" + constraints: + hasValue: false + - name: "LocalEndTime" + constraints: + hasValue: false + + - label: "Step 13: TH sends Clear Year Day Schedule to DUT" PICS: DRLK.S.F0a && DRLK.S.C10.Rsp command: "ClearYearDaySchedule" arguments: diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 5ed37c33b7a44e..35a6c29cc80972 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -165750,7 +165750,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -166142,7 +166142,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -168549,7 +168549,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -168587,7 +168587,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -168625,7 +168625,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -168663,7 +168663,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -171833,24 +171833,33 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { err = TestStep6ThSendGetWeekDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH sends Clear Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 7: TH sends Get Week Day Schedule Command to DUT for non-existent User\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestStep7ThSendsClearWeekDayScheduleCommandToDut_9(); + err = TestStep7ThSendsGetWeekDayScheduleCommandToDutForNonExistentUser_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 8: TH sends Get Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 8: TH sends Clear Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { NextTest(); return; } - err = TestStep8ThSendsGetWeekDayScheduleCommandToDut_10(); + err = TestStep8ThSendsClearWeekDayScheduleCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 9: TH sends Get Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + NextTest(); + return; + } + err = TestStep9ThSendsGetWeekDayScheduleCommandToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_12(); break; } @@ -171899,6 +171908,9 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -171912,7 +171924,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -172269,7 +172281,67 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThSendsClearWeekDayScheduleCommandToDut_9() + CHIP_ERROR TestStep7ThSendsGetWeekDayScheduleCommandToDutForNonExistentUser_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster + getWeekDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 7: TH sends Get Week Day Schedule Command to DUT for non-existent User Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep8ThSendsClearWeekDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -172281,7 +172353,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Step 7: TH sends Clear Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"Step 8: TH sends Clear Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -172291,7 +172363,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ThSendsGetWeekDayScheduleCommandToDut_10() + CHIP_ERROR TestStep9ThSendsGetWeekDayScheduleCommandToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -172304,7 +172376,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster getWeekDayScheduleWithParams:params completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Step 8: TH sends Get Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"Step 9: TH sends Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -172349,7 +172421,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_11() + CHIP_ERROR TestCleanupTheCreatedUser_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -172964,28 +173036,37 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { err = TestStep11ThSendsGetYearDayScheduleCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 12: TH sends Clear Year Day Schedule to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 15 : Step 12: TH sends Get Year Day Schedule Command to DUT for non-existent User\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestStep12ThSendsClearYearDayScheduleToDut_15(); + err = TestStep12ThSendsGetYearDayScheduleCommandToDutForNonExistentUser_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 13: TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_16(); + err = TestStep13ThSendsClearYearDayScheduleToDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user with UserIndex 1\n"); - err = TestCleanupTheCreatedUserWithUserIndex1_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Clear a year day schedule for the first user\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + NextTest(); + return; + } + err = TestClearAYearDayScheduleForTheFirstUser_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 5\n"); - err = TestCleanupTheCreatedUserWithUserIndex5_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 1\n"); + err = TestCleanupTheCreatedUserWithUserIndex1_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Cleanup the created user with UserIndex 5\n"); + err = TestCleanupTheCreatedUserWithUserIndex5_19(); break; } @@ -173044,10 +173125,10 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -173055,6 +173136,9 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -173068,7 +173152,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -173613,7 +173697,55 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep12ThSendsClearYearDayScheduleToDut_15() + CHIP_ERROR TestStep12ThSendsGetYearDayScheduleCommandToDutForNonExistentUser_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster + getYearDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 12: TH sends Get Year Day Schedule Command to DUT for non-existent User Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep13ThSendsClearYearDayScheduleToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -173626,7 +173758,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster clearYearDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Step 12: TH sends Clear Year Day Schedule to DUT Error: %@", err); + NSLog(@"Step 13: TH sends Clear Year Day Schedule to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code @@ -173639,7 +173771,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() + CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -173661,7 +173793,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_17() + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -173682,7 +173814,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_18() + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_19() { MTRBaseDevice * device = GetDevice("alpha"); From 1d8b86a70dbc3df08b6c17c6b4e34c2425cb6329 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Sat, 2 Sep 2023 04:33:27 +0800 Subject: [PATCH 21/29] ESP32: Set the InterfaceId to Wi-Fi Station netif by default for platform mDNS (#28769) --- src/platform/ESP32/WiFiDnssdImpl.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/platform/ESP32/WiFiDnssdImpl.cpp b/src/platform/ESP32/WiFiDnssdImpl.cpp index 79c839b27ecc2f..44f641f75e6bb6 100644 --- a/src/platform/ESP32/WiFiDnssdImpl.cpp +++ b/src/platform/ESP32/WiFiDnssdImpl.cpp @@ -19,6 +19,7 @@ #include "lib/dnssd/platform/Dnssd.h" #include +#include #include #include @@ -323,12 +324,22 @@ static CHIP_ERROR OnBrowseDone(BrowseContext * ctx) ctx->mService[servicesIndex].mAddressType = MapAddressType(currentResult->ip_protocol); ctx->mService[servicesIndex].mTransportType = ctx->mAddressType; ctx->mService[servicesIndex].mPort = currentResult->port; - ctx->mService[servicesIndex].mInterface = ctx->mInterfaceId; ctx->mService[servicesIndex].mTextEntries = GetTextEntry(currentResult->txt, currentResult->txt_value_len, currentResult->txt_count); ctx->mService[servicesIndex].mTextEntrySize = currentResult->txt_count; ctx->mService[servicesIndex].mSubTypes = NULL; ctx->mService[servicesIndex].mSubTypeSize = 0; + if (ctx->mInterfaceId == chip::Inet::InterfaceId::Null()) + { + // If the InterfaceId in the context is Null, we will use the Station netif by default. + struct netif * lwip_netif = + reinterpret_cast(esp_netif_get_netif_impl(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"))); + ctx->mService[servicesIndex].mInterface = chip::Inet::InterfaceId(lwip_netif); + } + else + { + ctx->mService[servicesIndex].mInterface = ctx->mInterfaceId; + } if (currentResult->addr) { Inet::IPAddress IPAddr; @@ -403,9 +414,20 @@ static CHIP_ERROR ParseSrvResult(ResolveContext * ctx) ctx->mService->mAddressType = MapAddressType(ctx->mSrvQueryResult->ip_protocol); ctx->mService->mTransportType = ctx->mService->mAddressType; ctx->mService->mPort = ctx->mSrvQueryResult->port; - ctx->mService->mInterface = ctx->mInterfaceId; ctx->mService->mSubTypes = nullptr; ctx->mService->mSubTypeSize = 0; + if (ctx->mInterfaceId == chip::Inet::InterfaceId::Null()) + { + // If the InterfaceId in the context is Null, we will use the Station netif by default. + struct netif * lwip_netif = + reinterpret_cast(esp_netif_get_netif_impl(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"))); + ctx->mService->mInterface = chip::Inet::InterfaceId(lwip_netif); + } + else + { + ctx->mService->mInterface = ctx->mInterfaceId; + } + return CHIP_NO_ERROR; } else From 6cb9720fa2589df2ea17a06a3752ee1f1a8591f3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 16:50:16 -0400 Subject: [PATCH 22/29] Allow specifying per-controller OTA delegates in Darwin.framework. (#29014) Review note: the delegate-validation code in initWithFactory just moved there from startControllerFactory, with no real changes to it other than changing what it returns on error. --- .../Framework/CHIP/MTRDeviceController.mm | 54 +++++++++ .../CHIP/MTRDeviceControllerFactory.mm | 103 ++++++++---------- .../MTRDeviceControllerStartupParameters.h | 7 ++ .../CHIP/MTRDeviceControllerStartupParams.mm | 7 ++ ...TRDeviceControllerStartupParams_Internal.h | 3 + .../CHIP/MTRDeviceController_Internal.h | 16 ++- .../CHIP/MTROTAProviderDelegateBridge.h | 5 +- .../CHIP/MTROTAProviderDelegateBridge.mm | 55 +++++----- 8 files changed, 155 insertions(+), 95 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 44d3b63712d426..98d757d6d291e7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -123,6 +123,8 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue storageDelegate:(id _Nullable)storageDelegate storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + otaProviderDelegate:(id _Nullable)otaProviderDelegate + otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue uniqueIdentifier:(NSUUID *)uniqueIdentifier { if (self = [super init]) { @@ -143,6 +145,58 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory } } + // Ensure the otaProviderDelegate, if any, is valid. + if (otaProviderDelegate == nil && otaProviderDelegateQueue != nil) { + MTR_LOG_ERROR("Must have otaProviderDelegate when we have otaProviderDelegateQueue"); + return nil; + } + + if (otaProviderDelegate != nil && otaProviderDelegateQueue == nil) { + MTR_LOG_ERROR("Must have otaProviderDelegateQueue when we have otaProviderDelegate"); + return nil; + } + + if (otaProviderDelegate != nil) { + if (![otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completion:)] + && ![otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID: + controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleQueryImageForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleApplyUpdateRequestForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID: + controller:params:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleNotifyUpdateAppliedForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completion:)] + && ![otaProviderDelegate respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID: + controller:fileDesignator:offset:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXTransferSessionBeginForNodeID"); + return nil; + } + if (![otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID: + controller:blockSize:blockIndex:bytesToSkip:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXQueryForNodeID"); + return nil; + } + } + + _otaProviderDelegate = otaProviderDelegate; + _otaProviderDelegateQueue = otaProviderDelegateQueue; + _chipWorkQueue = queue; _factory = factory; _deviceMapLock = OS_UNFAIR_LOCK_INIT; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index a11a7d30135e46..195fb61f5c7b6a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -61,7 +61,6 @@ static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; -static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; static NSString * const kErrorSessionKeystoreInit = @"Init failure while initializing session keystore"; static bool sExitHandlerRegistered = false; @@ -123,6 +122,9 @@ @interface MTRDeviceControllerFactory () // D. Locking around reads not from the Matter queue is OK but not required. @property (nonatomic, readonly) os_unfair_lock controllersLock; +@property (nonatomic, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; + - (BOOL)findMatchingFabric:(FabricTable &)fabricTable params:(MTRDeviceControllerStartupParams *)params fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; @@ -289,9 +291,15 @@ - (void)cleanupInitObjects - (void)cleanupStartupObjects { - if (_otaProviderDelegateBridge) { - delete _otaProviderDelegateBridge; - _otaProviderDelegateBridge = nullptr; + // Make sure the deinit order here is the reverse of the init order in + // startControllerFactory: + _certificationDeclarationCertificates = nil; + _productAttestationAuthorityCertificates = nil; + + if (_opCertStore) { + _opCertStore->Finish(); + delete _opCertStore; + _opCertStore = nullptr; } if (_keystore) { @@ -300,11 +308,12 @@ - (void)cleanupStartupObjects _keystore = nullptr; } - if (_opCertStore) { - _opCertStore->Finish(); - delete _opCertStore; - _opCertStore = nullptr; + if (_otaProviderDelegateBridge) { + delete _otaProviderDelegateBridge; + _otaProviderDelegateBridge = nullptr; } + _otaProviderDelegateQueue = nil; + _otaProviderDelegate = nil; if (_sessionResumptionStorage) { delete _sessionResumptionStorage; @@ -412,57 +421,12 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - if (startupParams.otaProviderDelegate) { - if (![startupParams.otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID: - controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleQueryImageForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleApplyUpdateRequestForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleNotifyUpdateAppliedForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXTransferSessionBeginForNodeID: - controller:fileDesignator:offset:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector - (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXTransferSessionBeginForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXQueryForNodeID: - controller:blockSize:blockIndex:bytesToSkip:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXQueryForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); - if (_otaProviderDelegateBridge == nil) { - MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } + _otaProviderDelegate = startupParams.otaProviderDelegate; + if (_otaProviderDelegate != nil) { + _otaProviderDelegateQueue = dispatch_queue_create( + "org.csa-iot.matter.framework.otaprovider.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); } + _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(); // TODO: Allow passing a different keystore implementation via startupParams. _keystore = new PersistentStorageOperationalKeystore(); @@ -594,19 +558,25 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(id)startupParams return nil; } - id storageDelegate; - dispatch_queue_t storageDelegateQueue; + id _Nullable storageDelegate; + dispatch_queue_t _Nullable storageDelegateQueue; NSUUID * uniqueIdentifier; + id _Nullable otaProviderDelegate; + dispatch_queue_t _Nullable otaProviderDelegateQueue; if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParameters class]]) { MTRDeviceControllerStartupParameters * params = startupParams; storageDelegate = params.storageDelegate; storageDelegateQueue = params.storageDelegateQueue; uniqueIdentifier = params.uniqueIdentifier; + otaProviderDelegate = params.otaProviderDelegate; + otaProviderDelegateQueue = params.otaProviderDelegateQueue; } else if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParams class]]) { MTRDeviceControllerStartupParams * params = startupParams; storageDelegate = nil; storageDelegateQueue = nil; uniqueIdentifier = params.uniqueIdentifier; + otaProviderDelegate = nil; + otaProviderDelegateQueue = nil; } else { MTR_LOG_ERROR("Unknown kind of startup params: %@", startupParams); return nil; @@ -628,10 +598,19 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(id)startupParams return nil; } + // Fall back to the factory-wide OTA provider delegate if one is not + // provided in the startup params. + if (otaProviderDelegate == nil) { + otaProviderDelegate = self.otaProviderDelegate; + otaProviderDelegateQueue = self.otaProviderDelegateQueue; + } + // Create the controller, so we start the event loop, since we plan to do // our fabric table operations there. auto * controller = [self _createController:storageDelegate storageDelegateQueue:storageDelegateQueue + otaProviderDelegate:otaProviderDelegate + otaProviderDelegateQueue:otaProviderDelegateQueue uniqueIdentifier:uniqueIdentifier]; if (controller == nil) { if (error != nil) { @@ -874,6 +853,8 @@ - (MTRDeviceController * _Nullable)createController:(MTRDeviceControllerStartupP - (MTRDeviceController * _Nullable)_createController:(id _Nullable)storageDelegate storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + otaProviderDelegate:(id _Nullable)otaProviderDelegate + otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue uniqueIdentifier:(NSUUID *)uniqueIdentifier { [self _assertCurrentQueueIsNotMatterQueue]; @@ -882,6 +863,8 @@ - (MTRDeviceController * _Nullable)_createController:(id #import +#import NS_ASSUME_NONNULL_BEGIN @@ -59,6 +60,12 @@ MTR_NEWLY_AVAILABLE - (void)setOperationalCertificateIssuer:(id)operationalCertificateIssuer queue:(dispatch_queue_t)queue; +/** + * Set an MTROTAProviderDelegate to call (on the provided queue). Only needs to + * be called if this controller should be able to handle OTA for devices. + */ +- (void)setOTAProviderDelegate:(id)otaProviderDelegate queue:(dispatch_queue_t)queue; + @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 57c9270a682b08..7bbcea96183035 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -288,6 +288,13 @@ - (void)setOperationalCertificateIssuer:(id)ope _operationalCertificateIssuer = operationalCertificateIssuer; _operationalCertificateIssuerQueue = queue; } + +- (void)setOTAProviderDelegate:(id)otaProviderDelegate queue:(dispatch_queue_t)queue +{ + _otaProviderDelegate = otaProviderDelegate; + _otaProviderDelegateQueue = queue; +} + @end @implementation MTRDeviceControllerExternalCertificateStartupParameters diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index cb7540c2e16e65..734197ef72d2d6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -77,6 +77,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong, readonly) dispatch_queue_t storageDelegateQueue; @property (nonatomic, strong, readonly) NSUUID * uniqueIdentifier; +@property (nonatomic, strong, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, strong, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; + @end MTR_HIDDEN diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 89db3a9f951d3e..6ff5843f622513 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -30,9 +30,10 @@ #import "MTRBaseDevice.h" #import "MTRDeviceController.h" #import "MTRDeviceControllerDataStore.h" -#import "MTRDeviceControllerStorageDelegate.h" #import +#import +#import @class MTRDeviceControllerStartupParamsInternal; @class MTRDeviceControllerFactory; @@ -75,12 +76,19 @@ NS_ASSUME_NONNULL_BEGIN * * This property MUST be gotten from the Matter work queue. */ -@property (readonly, nullable) NSNumber * compressedFabricID; +@property (nonatomic, readonly, nullable) NSNumber * compressedFabricID; /** * The per-controller data store this controller was initialized with, if any. */ -@property (nonatomic, nullable) MTRDeviceControllerDataStore * controllerDataStore; +@property (nonatomic, readonly, nullable) MTRDeviceControllerDataStore * controllerDataStore; + +/** + * OTA delegate and its queue, if this controller supports OTA. Either both + * will be non-nil or both will be nil. + */ +@property (nonatomic, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; /** * Init a newly created controller. @@ -91,6 +99,8 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue storageDelegate:(id _Nullable)storageDelegate storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + otaProviderDelegate:(id _Nullable)otaProviderDelegate + otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue uniqueIdentifier:(NSUUID *)uniqueIdentifier; /** diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h index f502dbff081d26..f74fb32a08bd19 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDelegate { public: - MTROTAProviderDelegateBridge(id delegate); + MTROTAProviderDelegateBridge(); ~MTROTAProviderDelegateBridge(); CHIP_ERROR Init(chip::System::Layer * systemLayer, chip::Messaging::ExchangeManager * exchangeManager); @@ -65,9 +65,6 @@ class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDele static void ConvertToNotifyUpdateAppliedParams( const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData, MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); - - _Nullable id mDelegate; - dispatch_queue_t mDelegateNotificationQueue; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 4ebef0535253ee..1b9f436751b2a5 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -69,7 +69,6 @@ CHIP_ERROR PrepareForTransfer(FabricIndex fabricIndex, NodeId nodeId) { assertChipStackLockedByCurrentThread(); - VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -121,18 +120,6 @@ void ControllerShuttingDown(MTRDeviceController * controller) } } - void SetDelegate(id delegate, dispatch_queue_t delegateNotificationQueue) - { - if (delegate) { - mDelegate = delegate; - mDelegateNotificationQueue = delegateNotificationQueue; - } else { - ResetState(); - mDelegate = nil; - mDelegateNotificationQueue = nil; - } - } - void ResetState() { assertChipStackLockedByCurrentThread(); @@ -161,6 +148,9 @@ void ResetState() mExchangeCtx = nullptr; } + mDelegate = nil; + mDelegateNotificationQueue = nil; + mInitialized = false; } @@ -463,6 +453,16 @@ CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) ResetState(); } + auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:fabricIndex]; + VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); + + mDelegate = controller.otaProviderDelegate; + mDelegateNotificationQueue = controller.otaProviderDelegateQueue; + + // We should have already checked that this controller supports OTA. + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDelegateNotificationQueue != nil, CHIP_ERROR_INCORRECT_STATE); + // Start a timer to track whether we receive a BDX init after a successful query image in a reasonable amount of time CHIP_ERROR err = mSystemLayer->StartTimer(kBdxInitReceivedTimeout, HandleBdxInitReceivedTimeoutExpired, this); LogErrorOnFailure(err); @@ -497,18 +497,11 @@ CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) NSInteger const kOtaProviderEndpoint = 0; } // anonymous namespace -MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(id delegate) - : mDelegate(delegate) - , mDelegateNotificationQueue( - dispatch_queue_create("org.csa-iot.matter.framework.otaprovider.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL)) -{ - gOtaSender.SetDelegate(delegate, mDelegateNotificationQueue); - Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); -} +MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge() { Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); } MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge() { - gOtaSender.SetDelegate(nil, nil); + gOtaSender.ResetState(); Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, nullptr); } @@ -547,6 +540,12 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath return false; } + if (!controller.otaProviderDelegate) { + // This controller does not support OTA. + commandHandler->AddStatus(commandPath, Status::UnsupportedCommand); + return false; + } + *outController = controller; *outNodeId = desc.subject; return true; @@ -722,8 +721,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath }]; }; - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completion:)]) { [strongDelegate handleQueryImageForNodeID:@(nodeId) controller:controller @@ -782,8 +781,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto * commandParams = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; ConvertToApplyUpdateRequestParams(commandData, commandParams); - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)]) { [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) controller:controller @@ -838,8 +837,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto * commandParams = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; ConvertToNotifyUpdateAppliedParams(commandData, commandParams); - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)]) { [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) controller:controller From 28006109a21a4ed8544822f6c2cb8cf43d77aa81 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:28:22 -0400 Subject: [PATCH 23/29] [Silabs]Re-enable some compilation flags (#29020) * remove some -wno flag that are not needed anymore. Root issue fixed in gsdk * fix array bounds error in rsi_if. some cleanup --- .../platform/silabs/efr32/rs911x/rsi_if.c | 61 +++++++++---------- .../silabs/SiWx917/wifi/wfx_host_events.h | 1 - .../silabs/efr32/wifi/wfx_host_events.h | 1 - third_party/silabs/efr32_sdk.gni | 11 +--- 4 files changed, 29 insertions(+), 45 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index c89f31142beb96..c43389761dcdfc 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -54,6 +54,11 @@ #include "wfx_host_events.h" #include "wfx_rsi.h" +// TODO convert this file to cpp and use CodeUtils.h +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Rsi driver Task will use as its stack */ StackType_t driverRsiTaskStack[WFX_RSI_WLAN_TASK_SZ] = { 0 }; @@ -691,50 +696,40 @@ void wfx_rsi_task(void * arg) { if (!(wfx_rsi.dev_state & WFX_RSI_ST_SCANSTARTED)) { - SILABS_LOG("%s: start SSID scan", __func__); - int x; - wfx_wifi_scan_result_t ap; - rsi_scan_info_t * scan; - int32_t status; - uint8_t bgscan_results[BG_SCAN_RES_SIZE] = { 0 }; - status = rsi_wlan_bgscan_profile(1, (rsi_rsp_scan_t *) bgscan_results, BG_SCAN_RES_SIZE); - - SILABS_LOG("%s: status: %02x size = %d", __func__, status, BG_SCAN_RES_SIZE); - rsi_rsp_scan_t * rsp = (rsi_rsp_scan_t *) bgscan_results; + rsi_rsp_scan_t scan_rsp = { 0 }; + int32_t status = rsi_wlan_bgscan_profile(1, &scan_rsp, sizeof(scan_rsp)); + if (status) { - /* - * Scan is done - failed - */ + SILABS_LOG("SSID scan failed: %02x ", status); } else - for (x = 0; x < rsp->scan_count[0]; x++) + { + rsi_scan_info_t * scan; + wfx_wifi_scan_result_t ap; + for (int x = 0; x < scan_rsp.scan_count[0]; x++) { - scan = &rsp->scan_info[x]; - strcpy(&ap.ssid[0], (char *) &scan->ssid[0]); - if (wfx_rsi.scan_ssid) + scan = &scan_rsp.scan_info[x]; + // is it a scan all or target scan + if (!wfx_rsi.scan_ssid || + (wfx_rsi.scan_ssid && strcmp(wfx_rsi.scan_ssid, (char *) scan->ssid) == CMP_SUCCESS)) { - SILABS_LOG("Inside scan_ssid"); - SILABS_LOG("SCAN SSID: %s , ap scan: %s", wfx_rsi.scan_ssid, ap.ssid); - if (strcmp(wfx_rsi.scan_ssid, ap.ssid) == CMP_SUCCESS) - { - SILABS_LOG("Inside ap details"); - ap.security = scan->security_mode; - ap.rssi = (-1) * scan->rssi_val; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); - (*wfx_rsi.scan_cb)(&ap); - } - } - else - { - SILABS_LOG("Inside else"); + strncpy(ap.ssid, (char *) scan->ssid, MIN(sizeof(ap.ssid), sizeof(scan->ssid))); ap.security = scan->security_mode; ap.rssi = (-1) * scan->rssi_val; - ap.chan = scan->rf_channel; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); + configASSERT(sizeof(ap.bssid) >= BSSID_MAX_STR_LEN); + configASSERT(sizeof(scan->bssid) >= BSSID_MAX_STR_LEN); + memcpy(ap.bssid, scan->bssid, BSSID_MAX_STR_LEN); (*wfx_rsi.scan_cb)(&ap); + + if (wfx_rsi.scan_ssid) + { + break; // we found the targeted ssid. + } } } + } + wfx_rsi.dev_state &= ~WFX_RSI_ST_SCANSTARTED; /* Terminate with end of scan which is no ap sent back */ (*wfx_rsi.scan_cb)((wfx_wifi_scan_result_t *) 0); diff --git a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h index 32518820d64045..c63f358774902f 100644 --- a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h +++ b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h @@ -127,7 +127,6 @@ #define SCAN_BITMAP_OPTN_1 (1) #define IP_CONF_RSP_BUFF_LENGTH_4 (4) #define STATION (0) -#define BG_SCAN_RES_SIZE (500) #define SPI_CONFIG_SUCCESS (0) diff --git a/src/platform/silabs/efr32/wifi/wfx_host_events.h b/src/platform/silabs/efr32/wifi/wfx_host_events.h index ab722f649532cc..4fe2d5a96f6cb7 100644 --- a/src/platform/silabs/efr32/wifi/wfx_host_events.h +++ b/src/platform/silabs/efr32/wifi/wfx_host_events.h @@ -214,7 +214,6 @@ typedef struct __attribute__((__packed__)) sl_wfx_mib_req_s #define SCAN_BITMAP_OPTN_1 1 #define IP_CONF_RSP_BUFF_LENGTH_4 4 #define STATION 0 -#define BG_SCAN_RES_SIZE 500 #define SPI_CONFIG_SUCESS 0 diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 2295bd5e14f9fd..8ecd5ff4db53cd 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -516,16 +516,7 @@ template("efr32_sdk") { cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ] } - cflags += [ - "-Wno-maybe-uninitialized", - "-Wno-shadow", - - # see https://github.com/project-chip/connectedhomeip/issues/26058 - "-Wno-error=array-parameter", - - # see https://github.com/project-chip/connectedhomeip/issues/26170 - "-Wno-error=array-bounds", - ] + cflags += [ "-Wno-shadow" ] if (silabs_family == "efr32mg24" || silabs_family == "mgm24") { cflags += [ "-mcmse" ] From a823c63057bf837df28768deb05a546bee6aa232 Mon Sep 17 00:00:00 2001 From: Liam Gonyea <80923273+liamgonyea@users.noreply.github.com> Date: Fri, 1 Sep 2023 14:52:57 -0700 Subject: [PATCH 24/29] New op creds yaml test (#28786) * Adding new ciTest Test_TC_OPCREDS_3_7.yaml * Edit to new ciTest Test_TC_OPCREDS_3_7.yaml * Fixed formatting issues in Test_TC_OPCREDS_3_7.yaml and added yaml to _GetChipReplUnsupportedTests * Fixed failing steps on Test_TC_OPCREDS_3_7.yaml * Added Test_TC_OPCREDS_3_7 to DFT CI Tests disabled list * Update examples/darwin-framework-tool/templates/tests/ciTests.json Co-authored-by: Boris Zbarsky * Update src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml Co-authored-by: Boris Zbarsky * Updated reasoning for disabled step for src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml * Addressing changes made to the test plan in CHIP-Specifications/chip-test-plans/pull/3398 for Step 6 and Step 12 * Provided justification for Step 9/10 being disabled * cleanup verification step comments based on Test Plan PR * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Added WaitForCommissionee to Step 10 to guarantee we do CASE * Applied restyled patch --------- Co-authored-by: Boris Zbarsky --- .../templates/tests/ciTests.json | 2 + scripts/tests/chiptest/__init__.py | 1 + .../certification/Test_TC_OPCREDS_3_7.yaml | 363 +++++++++++------- src/app/tests/suites/ciTests.json | 1 + 4 files changed, 224 insertions(+), 143 deletions(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index b717e8acf13005..ad899068350067 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -30,6 +30,8 @@ "Test_TC_ACL_2_8", "Test_TC_ACL_2_9", "Test_TC_ACL_2_10", + "Disabled due to GetCommissionerRootCertificate command not being supported", + "Test_TC_OPCREDS_3_7", "DL_LockUnlock", "Disabled due to Events verification not supported", "Test_TC_BINFO_2_2", diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 1350e8c0c5a82a..ce312d492beabd 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -152,6 +152,7 @@ def _GetChipReplUnsupportedTests() -> Set[str]: """Tests that fail in chip-repl for some reason""" return { "Test_AddNewFabricFromExistingFabric.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command + "Test_TC_OPCREDS_3_7.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command "TestEqualities.yaml", # chip-repl does not support pseudo-cluster commands that return a value "TestExampleCluster.yaml", # chip-repl does not load custom pseudo clusters "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml index d8e3bb279c7402..531fdf492ac3e2 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml @@ -11,7 +11,6 @@ # 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.6. [TC-OPCREDS-3.7] Add Second Fabric over CASE [DUT-Server] @@ -20,191 +19,269 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Operational Credentials" endpoint: 0 tests: - - label: "Pre-Conditions" + - label: "Precondition" verification: | TH1 and TH2 are 2 clients that trust each other disabled: true + - label: "Wait for the alpha device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "Step 1: Factory Reset DUT (to ensure NOC list is empty at the beginning of the following steps)" PICS: OPCREDS.S.A0000 - verification: | - 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_* + # verification: "" + # Disabling this step, because the test starts with a DUT device that has just been commissioned by the TH1 commissioner disabled: true - label: "Step 2: Start the commissioning process of DUT by TH1 on the first Fabric." - verification: | - On TH (chip-tool) side: - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - [1690193191.894851][13219:13221] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1690193191.894879][13219:13221] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - + # PICS: "" + # verification: "Verify that TH1 successfully completes commissioning, including establishing a CASE session on the operational network and issuing a CommissioningComplete command." + # Disabling this step, because the test starts with a DUT device that has just been commissioned by the TH1 commissioner - On DUT(all-clusters-app) side: - ./all-clusters-app - [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true - label: - "Step 3: TH1 does a non-fabric-filtered read of the Fabrics attribute - from the Node Operational Credentials cluster. Save the FabricIndex - for TH1 as TH1_Fabric_Index for future use." + "Step 3.1: Save the FabricIndex for TH1 as TH1_Fabric_Index for future + use." PICS: OPCREDS.S.A0001 - verification: | - ./chip-tool operationalcredentials read fabrics 1 0 - - Verify on the Th(chip-tool) that fabrics has only 1 entry and save the fabric index as TH1_Fabric_Index for using in the following steps - - - [1690193331.552693][13227:13229] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 632277469 - [1690193331.552824][13227:13229] CHIP:TOO: Fabrics: 1 entries - [1690193331.552910][13227:13229] CHIP:TOO: [1]: { - [1690193331.552945][13227:13229] CHIP:TOO: RootPublicKey: 04AD3DD61741C7F8BB56C922BCAADF1A44BD7AB7A00BB3D3D9CDB6C5889C841AA59C62C5A504CA2DE33BFE0626B6E570DC1716ECA769295C0D6BBB0FA5B3A5E69C - [1690193331.552972][13227:13229] CHIP:TOO: VendorID: 65521 - [1690193331.552997][13227:13229] CHIP:TOO: FabricID: 1 - [1690193331.553020][13227:13229] CHIP:TOO: NodeID: 1 - [1690193331.553044][13227:13229] CHIP:TOO: Label: - [1690193331.553066][13227:13229] CHIP:TOO: FabricIndex: 1 - [1690193331.553088][13227:13229] CHIP:TOO: } - [1690193331.553268][13227:13229] CHIP:EM: <<< [E:60956i S:18401 M:33374407 (Ack:23211476)] (S) Msg TX to 1:0000000000000001 [C23D] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true + identity: "alpha" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1_Fabric_Index + - label: + "Step 3.2: TH1 does a non-fabric-filtered read of the Fabrics + attribute from the Node Operational Credentials cluster." + PICS: OPCREDS.S.A0001 + identity: "alpha" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" + fabricFiltered: false + response: + value: [{ "FabricIndex": TH1_Fabric_Index, "Label": "" }] + constraints: + type: list + + # verification: "Verify that there is a single entry in the list and the FabricIndex for that entry matches TH1_Fabric_Index." - label: "Step 4: TH1 sends ArmFailSafe command to the DUT with the ExpiryLengthSeconds field set to 60 seconds" PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 - - Verify on the Th(chip-tool) that DUT sends ArmFailSafeResponse command to TH1 with field ErrorCode as OK(0) - - [1690226811353] [19885:5418547] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 - [1690226811354] [19885:5418547] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 - [1690226811354] [19885:5418547] [TOO] ArmFailSafeResponse: { - [1690226811354] [19885:5418547] [TOO] errorCode: 0 - [1690226811354] [19885:5418547] [TOO] debugText: - [1690226811354] [19885:5418547] [TOO] } - disabled: true - - - label: "Step 5: TH1 Sends CSRRequest command with a random 32-byte nonce" + identity: "alpha" + cluster: "General Commissioning" + command: "ArmFailSafe" + arguments: + values: + - name: "ExpiryLengthSeconds" + value: 60 + - name: "Breadcrumb" + value: 0 + response: + values: + - name: "ErrorCode" + value: 0 # OK + + # verification: "Verify that the DUT sends ArmFailSafeResponse command to TH1 with field ErrorCode as OK(0)" + - label: "Step 5: TH1 Sends CSRRequest command with a random 32-byte nonce." PICS: OPCREDS.S.C04.Rsp - verification: | - To get CSR Nonce give below command - echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) - - ./chip-tool operationalcredentials csrrequest 1 0 - - ./chip-tool operationalcredentials csrrequest hex:A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F359902982717603 1 0 - - Verify the CSRResponse in TH Log - - [1658223679.580697][6136:6141] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 - [1658223679.580761][6136:6141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 - [1658223679.580823][6136:6141] CHIP:TOO: CSRResponse: { - [1658223679.580875][6136:6141] CHIP:TOO: NOCSRElements: 153001CB3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200047DA16C714034D3B96716F64DC0E742D007233212025E305AF6CE56DFA057718E149E52B39584456C8F954A1596B64F8BBC02E501276B962D4AB2C0A607D983C9A000300A06082A8648CE3D040302034800304502206FB78A61A7B0F021C396FEC1CCD6802129AC3EE5EA2727ABCCB19DBAEA7DEE1A022100A5C81ADC5D8BFAA5DB84A1261D8BBCEA5C26B24D4405F0B978E19B17D8458C9E300220A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F35990298271760318 - [1658223679.580915][6136:6141] CHIP:TOO: attestationSignature: EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE - [1658223679.580943][6136:6141] CHIP:TOO: } - disabled: true - + identity: "alpha" + command: "CSRRequest" + cluster: "Operational Credentials" + arguments: + values: + - name: CSRNonce + value: "\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07" + response: + values: + - name: "NOCSRElements" + saveAs: NOCSRElements + - name: "AttestationSignature" + saveAs: attestationSignature + + # verification: "Step 5: Verify that the DUT responds with the CSRResponse command." - label: - "Step 6: TH1 validates the Device Attestation Signature - (attestation_signature) field from CSRResponse command in Step 5" - PICS: OPCREDS.S.C04.Rsp - verification: | - To get CSR Nonce give below command - echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) - - ./chip-tool operationalcredentials csrrequest 1 0 - - ./chip-tool operationalcredentials csrrequest hex:A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F359902982717603 1 0 - - Verify the CSRResponse in TH Log - - [1658223679.580697][6136:6141] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 - [1658223679.580761][6136:6141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 - [1658223679.580823][6136:6141] CHIP:TOO: CSRResponse: { - [1658223679.580875][6136:6141] CHIP:TOO: NOCSRElements: 153001CB3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200047DA16C714034D3B96716F64DC0E742D007233212025E305AF6CE56DFA057718E149E52B39584456C8F954A1596B64F8BBC02E501276B962D4AB2C0A607D983C9A000300A06082A8648CE3D040302034800304502206FB78A61A7B0F021C396FEC1CCD6802129AC3EE5EA2727ABCCB19DBAEA7DEE1A022100A5C81ADC5D8BFAA5DB84A1261D8BBCEA5C26B24D4405F0B978E19B17D8458C9E300220A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F35990298271760318 - [1658223679.580915][6136:6141] CHIP:TOO: attestationSignature: EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE - [1658223679.580943][6136:6141] CHIP:TOO: } - disabled: true - + "Step 6.1: Read the commissioner root certificate from TH2's fabric. + Save RCAC as Root_CA_Certificate_TH2" + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerRootCertificate" + response: + values: + - name: "RCAC" + saveAs: Root_CA_Certificate_TH2 + + # verification: "" - label: - "Step 7: TH2 generates the NOC, the Root CA Certificate and ICAC using - the CSR elements from Step 5 and selects an IPK, all for use by TH2. - The certificates shall have their subjects padded with additional data - such that they are each the maximum certificate size of 400 bytes when - encoded in the MatterCertificateEncoding. Save RCAC as - Root_CA_Certificate_TH2 Save ICAC as Intermediate_Certificate_TH2 Save - NOC as Node_Operational_Certificate_TH2 Save IPK as IPK_TH2 Extract - the RCAC public key and save as Root_Public_Key_TH2" - verification: | - - disabled: true - + "Step 6.2: TH2 generates the NOC, the Root CA Certificate and ICAC + using the CSR elements from Step 5 and selects an IPK, all for use by + TH2. Save ICAC as Intermediate_Certificate_TH2. Save NOC as + Node_Operational_Certificate_TH2. Save IPK as IPK_TH2. Extract the + RCAC public key and save as Root_Public_Key_TH2." + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "IssueNocChain" + arguments: + values: + - name: "Elements" + value: NOCSRElements + - name: "nodeId" + value: 0x43211234 + response: + values: + - name: "NOC" + saveAs: Node_Operational_Certificate_TH2 + - name: "ICAC" + saveAs: Intermediate_Certificate_TH2 + - name: "IPK" + saveAs: IPK_TH2 + + # verification: "" + - label: "Step 7.1: Read the commissioner node ID from TH2" + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: Commissioner_Node_Id_TH2 + + # verification: "" - label: - "Step 8: TH1 sends AddTrustedRootCertificate command to DUT with + "Step 7.2: TH1 sends AddTrustedRootCertificate command to DUT with RootCACertificate set to Root_CA_Certificate_TH2" PICS: OPCREDS.S.C0b.Rsp - verification: | - Verify that AddTrustedRootCertificate command succeeds by sending the status code as SUCCESS - disabled: true - + identity: "alpha" + command: "AddTrustedRootCertificate" + cluster: "Operational Credentials" + arguments: + values: + - name: "RootCACertificate" + value: Root_CA_Certificate_TH2 + + # verification: "Verify that AddTrustedRootCertificate command succeeds by sending the status code as SUCCESS" - label: - "Step 9: TH1 sends the AddNOC command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH2 ICACValue as - Intermediate_Certificate_TH2 IpkValue as IPK_TH2 CaseAdminSubject as - the NodeID of TH2 AdminVendorId as the Vendor ID of TH2" + "Step 8: TH1 sends the AddNOC command to DUT with the following + fields: NOCValue as Node_Operational_Certificate_TH2. ICACValue as + Intermediate_Certificate_TH2. IpkValue as IPK_TH2. CaseAdminSubject as + the NodeID of TH2. AdminVendorId as the Vendor ID of TH2." PICS: OPCREDS.S.C06.Rsp && OPCREDS.S.C08.Tx - verification: | - Verify that DUT responds with NOCResponse with status code OK - disabled: true - - - label: "Step 10: TH2 starts discovery of DUT using Operational Discovery" - verification: | - + identity: "alpha" + command: "AddNOC" + cluster: "Operational Credentials" + arguments: + values: + - name: "NOCValue" + value: Node_Operational_Certificate_TH2 + - name: "ICACValue" + value: Intermediate_Certificate_TH2 + - name: "IPKValue" + value: IPK_TH2 + - name: "CaseAdminSubject" + value: Commissioner_Node_Id_TH2 + - name: "AdminVendorId" + value: 0xFFF1 + response: + values: + - name: "StatusCode" + value: 0 + + # verification: "Verify that DUT responds with NOCResponse with status code OK" + - label: "Step 9: TH2 starts discovery of DUT using Operational Discovery" + # PICS: "" + # verification: "" + # Disabling this step as this occurs from the AddNOC command being run disabled: true - label: - "Step 11: TH2 opens a CASE session with DUT over operational network" - verification: | - DUT is able to open the CASE session with TH2 - disabled: true - - - label: "Step 12: TH2 sends CommissioningComplete command" + "Step 10: TH2 opens a CASE session with DUT over operational network." + # PICS: "" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: 0x43211234 + + # verification: "DUT is able to open the CASE session with TH2" + - label: "Step 11: TH2 sends CommissioningComplete command" PICS: CGEN.S.C05.Tx - verification: | - DUT respond with SUCCESS at CommissioningComplete command sent by TH2 - disabled: true - + nodeId: 0x43211234 + identity: "beta" + cluster: "General Commissioning" + command: "CommissioningComplete" + response: + values: + - name: "ErrorCode" + value: 0 # SUCCESS + + # verification: "DUT respond with SUCCESS at CommissioningComplete command sent by TH2" - label: - "Step 13: TH1 does a non-fabric-filtered read of the Fabrics attribute - from the Node Operational Credentials cluster. Save the FabricIndex - for TH2s entry as TH2_Fabric_Index for future use." + "Step 12: TH2 reads the Current Fabric Index attribute from the Node + Operational Credentials cluster. Save the FabricIndex for TH2 as + TH2_Fabric_Index." PICS: OPCREDS.S.A0001 - verification: | - Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index. - disabled: true - + identity: "beta" + nodeId: 0x43211234 + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2_Fabric_Index + + # verification: "" - label: - "Step 14: TH2 does a non-fabric-filtered read of the Fabrics attribute + "Step 13: TH2 does a non-fabric-filtered read of the Fabrics attribute from the Node Operational Credentials cluster" PICS: OPCREDS.S.A0001 - verification: | - Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index. - disabled: true - + identity: "beta" + nodeId: 0x43211234 + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { "FabricIndex": TH1_Fabric_Index, "Label": "" }, + { "FabricIndex": TH2_Fabric_Index, "Label": "" }, + ] + constraints: + type: list + + # verification: "Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index." - label: - "Step 15: TH1 sends RemoveFabric command to DUT with the FabricIndex + "Step 14: TH1 sends RemoveFabric command to DUT with the FabricIndex field set to TH2_Fabric_Index." PICS: OPCREDS.S.C0a.Rsp - verification: | - Verify that DUT sends NOCResponse command with status code OK - disabled: true + identity: "alpha" + command: "RemoveFabric" + cluster: "Operational Credentials" + arguments: + values: + - name: "FabricIndex" + value: TH2_Fabric_Index + response: + values: + - name: "StatusCode" + value: 0 + # verification: "Verify that DUT sends NOCResponse command with status code OK" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 91a6b7cf77efd5..12fc67440426e6 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -43,6 +43,7 @@ "DeviceManagement": [ "TestIcdManagementCluster", "Test_TC_OPCREDS_1_2", + "Test_TC_OPCREDS_3_7", "Test_TC_BINFO_1_1", "Test_TC_BINFO_2_1", "Test_TC_BINFO_2_2", From 35c8d924daf0f68f9d59ba492393367ef281e69d Mon Sep 17 00:00:00 2001 From: EricZijian_SiterWell Date: Sat, 2 Sep 2023 06:17:12 +0800 Subject: [PATCH 25/29] Change waitForReport to manual in TC-SMOKECO (#29009) * Change waitForReport to manual in TC-SMOKECO * Restyled by prettier-yaml --------- Co-authored-by: Hare Co-authored-by: Restyled.io --- .../certification/Test_TC_SMOKECO_2_2.yaml | 66 ++- .../certification/Test_TC_SMOKECO_2_3.yaml | 66 ++- .../certification/Test_TC_SMOKECO_2_4.yaml | 187 ++++--- .../certification/Test_TC_SMOKECO_2_5.yaml | 507 +++++++++++------- .../certification/Test_TC_SMOKECO_2_6.yaml | 222 +++++--- 5 files changed, 670 insertions(+), 378 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml index e14c009653513d..fbd307e0a0928a 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml @@ -101,14 +101,20 @@ tests: - label: "Step 6: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -181,14 +187,20 @@ tests: - label: "Step 15: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 16: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -226,14 +238,20 @@ tests: - label: "Step 19: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml index e4117df2fc67d1..9e6430731dce5d 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml @@ -100,14 +100,20 @@ tests: - label: "Step 6: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -180,14 +186,20 @@ tests: - label: "Step 15: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 16: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -225,14 +237,20 @@ tests: - label: "Step 19: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml index db40c617cbef1c..7333b55fd247b4 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml @@ -113,14 +113,20 @@ tests: - label: "Step 6: TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -158,14 +164,20 @@ tests: - label: "Step 10: TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 11: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -203,14 +215,20 @@ tests: - label: "Step 14: TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 15: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -259,14 +277,20 @@ tests: - label: "Step 19: TH waits for a report of HardwareFaultAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0006 - command: "waitForReport" - attribute: "HardwareFaultAlert" - timeout: 300 - response: - value: 1 - constraints: - type: boolean + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0006 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read hardware-fault-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0006 DataVersion: 1795725838 + [TOO] HardwareFaultAlert: TRUE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -305,14 +329,20 @@ tests: - label: "Step 23: TH waits for a report of HardwareFaultAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0006 - command: "waitForReport" - attribute: "HardwareFaultAlert" - timeout: 300 - response: - value: 0 - constraints: - type: boolean + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0006 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read hardware-fault-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0006 DataVersion: 1795725838 + [TOO] HardwareFaultAlert: FALSE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 24: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -361,14 +391,20 @@ tests: - label: "Step 28: TH waits for a report of EndOfServiceAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0007 - command: "waitForReport" - attribute: "EndOfServiceAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0007 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read end-of-service-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0007 DataVersion: 1795725838 + [TOO] EndOfServiceAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 29: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -407,14 +443,20 @@ tests: - label: "Step 32: TH waits for a report of EndOfServiceAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0007 - command: "waitForReport" - attribute: "EndOfServiceAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0007 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read end-of-service-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0007 DataVersion: 1795725838 + [TOO] EndOfServiceAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 33: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -531,14 +573,22 @@ tests: - label: "Step 45: TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds" - PICS: SMOKECO.S.A0005 - command: "waitForReport" - attribute: "TestInProgress" - timeout: 180 - response: - value: 1 - constraints: - type: boolean + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0005 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read test-in-progress 1 1 + + This step needs to be completed quickly + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0005 DataVersion: 1795725838 + [TOO] TestInProgress: TRUE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 46: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -549,8 +599,15 @@ tests: constraints: type: enum8 + - label: "Step 47a: TH subscribes to TestInProgress attribute from DUT" + PICS: SMOKECO.S.A0005 + command: "subscribeAttribute" + attribute: "TestInProgress" + minInterval: 1 + maxInterval: 900 + - label: - "Step 47: TH waits for a report of TestInProgress attribute from DUT + "Step 47b: TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds" PICS: SMOKECO.S.A0005 command: "waitForReport" diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml index 1556ab5b2f49b9..f44ce08ab77d82 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml @@ -148,16 +148,20 @@ tests: - label: "Step 6: TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - saveAs: interconnectSmokeAlarmSeverityLevel - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 7: TH reads InterconnectSmokeAlarm event from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.E08 @@ -165,7 +169,7 @@ tests: event: "InterconnectSmokeAlarm" eventNumber: "LastReceivedEventNumber + 1" response: - value: { AlarmSeverityLevel: interconnectSmokeAlarmSeverityLevel } + value: { AlarmSeverityLevel: 1 } - label: "Step 8: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.A0000 @@ -196,14 +200,20 @@ tests: - label: "Step 10: TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 11: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.A0000 @@ -261,16 +271,20 @@ tests: - label: "Step 16: TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - saveAs: interconnectCOAlarmSeverityLevel - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 17: TH reads InterconnectCOAlarm event from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.E09 @@ -278,7 +292,7 @@ tests: event: "InterconnectCOAlarm" eventNumber: "LastReceivedEventNumber + 1" response: - value: { AlarmSeverityLevel: interconnectCOAlarmSeverityLevel } + value: { AlarmSeverityLevel: 1 } - label: "Step 18: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.A0000 @@ -309,14 +323,20 @@ tests: - label: "Step 20: TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 21: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.A0000 @@ -366,15 +386,22 @@ tests: - label: "Step 25: TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 2 - maxValue: 3 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read contamination-state 1 1 + + Verify that the value of ContaminationState is 2 or 3 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 26: TH sends TestEventTrigger command to General Diagnostics @@ -396,14 +423,20 @@ tests: - label: "Step 27: TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 28: TH sends TestEventTrigger command to General Diagnostics @@ -425,14 +458,20 @@ tests: - label: "Step 29: TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 30: TH sends TestEventTrigger command to General Diagnostics @@ -454,14 +493,20 @@ tests: - label: "Step 31: TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 32: TH subscribes to SmokeSensitivityLevel attribute from DUT" @@ -495,14 +540,20 @@ tests: - label: "Step 34: TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 35: TH sends TestEventTrigger command to General Diagnostics @@ -524,14 +575,20 @@ tests: - label: "Step 36: TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 37: TH sends TestEventTrigger command to General Diagnostics @@ -553,14 +610,20 @@ tests: - label: "Step 38: TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 39: TH sends TestEventTrigger command to General Diagnostics @@ -582,14 +645,20 @@ tests: - label: "Step 40: TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 41: TH subscribes to DeviceMuted attribute from DUT" PICS: SMOKECO.S.A0004 @@ -641,14 +710,22 @@ tests: - label: "Step 45: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 46a: TH subscribes to DeviceMuted attribute from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 @@ -676,14 +753,20 @@ tests: - label: "Step 47: TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 48: TH reads AlarmMuted event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E06 @@ -713,14 +796,20 @@ tests: - label: "Step 50: TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 51: TH reads MuteEnded event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E07 @@ -756,14 +845,22 @@ tests: - label: "Step 53: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 54: TH sends TestEventTrigger command to General Diagnostics @@ -825,14 +922,22 @@ tests: - label: "Step 57: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 58: TH reads FeatureMap attribute(CO Alarm) from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 @@ -873,14 +978,22 @@ tests: - label: "Step 61: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 62a: TH subscribes to DeviceMuted attribute from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 @@ -908,14 +1021,20 @@ tests: - label: "Step 63: TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 64: TH reads AlarmMuted event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E06 @@ -945,14 +1064,20 @@ tests: - label: "Step 66: TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 67: TH reads MuteEnded event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E07 @@ -988,14 +1113,22 @@ tests: - label: "Step 69: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 70: TH sends TestEventTrigger command to General Diagnostics @@ -1057,11 +1190,19 @@ tests: - label: "Step 73: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml index 870c8f5c850acb..f5106b7f316591 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml @@ -184,14 +184,20 @@ tests: - label: "Step 10: TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 11a: TH subscribes to InterconnectSmokeAlarm attribute from DUT" @@ -221,15 +227,20 @@ tests: - label: "Step 12: TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 13a: TH subscribes to InterconnectCOAlarm attribute from DUT" PICS: SMOKECO.S.A0009 @@ -257,15 +268,20 @@ tests: - label: "Step 14: TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 15a: TH subscribes to COState attribute from DUT" PICS: SMOKECO.S.A0002 @@ -293,14 +309,20 @@ tests: - label: "Step 16: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 17a: TH subscribes to SmokeState attribute from DUT" PICS: SMOKECO.S.A0001 @@ -328,14 +350,20 @@ tests: - label: "Step 18: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 19: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -365,14 +393,20 @@ tests: - label: "Step 21: TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 22: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -409,14 +443,20 @@ tests: - label: "Step 24: TH waits for a report of COState attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 25: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -454,14 +494,20 @@ tests: - label: "Step 27: TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 28: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -500,14 +546,20 @@ tests: - label: "Step 30: TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 31: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 @@ -544,14 +596,20 @@ tests: - label: "Step 33: TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool.py smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 34: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 From 29fd8dcddfffb3710d439f9ea5a8c5bc9775bd52 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 1 Sep 2023 18:49:06 -0400 Subject: [PATCH 26/29] Remove SED related common code as it is deprecated and replaced by ICD (#29023) --- .../silabs/SiWx917/SiWx917/sl_wifi_if.c | 4 +- examples/pump-app/silabs/src/AppTask.cpp | 2 +- examples/window-app/silabs/src/AppTask.cpp | 2 +- src/app/FailSafeContext.cpp | 8 - src/app/server/CommissioningWindowManager.cpp | 16 -- src/app/server/CommissioningWindowManager.h | 4 - src/include/platform/ConnectivityManager.h | 39 ---- src/include/platform/ThreadStackManager.h | 37 ---- .../GenericConnectivityManagerImpl_Thread.h | 27 --- src/messaging/ExchangeContext.cpp | 48 ----- src/messaging/ReliableMessageMgr.cpp | 7 - .../ReliableMessageProtocolConfig.cpp | 10 - src/platform/Linux/ThreadStackManagerImpl.cpp | 26 --- src/platform/Linux/ThreadStackManagerImpl.h | 5 - ...GenericThreadStackManagerImpl_OpenThread.h | 18 -- ...nericThreadStackManagerImpl_OpenThread.hpp | 185 +----------------- .../wifi/ConnectivityManagerImplWiFi.cpp | 20 -- .../wifi/ConnectivityManagerImplWiFi.h | 6 - src/platform/qpg/ThreadStackManagerImpl.cpp | 10 - src/platform/qpg/ThreadStackManagerImpl.h | 4 - src/platform/webos/ThreadStackManagerImpl.cpp | 26 --- src/platform/webos/ThreadStackManagerImpl.h | 6 - 22 files changed, 7 insertions(+), 503 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c index f54175ae9733da..22032e33f4a928 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -191,7 +191,7 @@ sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t return SL_STATUS_OK; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED +#if SL_ICD_ENABLED /****************************************************************** * @fn wfx_rsi_power_save() * @brief @@ -221,7 +221,7 @@ int32_t wfx_rsi_power_save() SILABS_LOG("Powersave Config Success"); return status; } -#endif /* CHIP_DEVICE_CONFIG_ENABLE_SED */ +#endif /* SL_ICD_ENABLED */ /************************************************************************************* * @fn static int32_t wfx_wifi_rsi_init(void) diff --git a/examples/pump-app/silabs/src/AppTask.cpp b/examples/pump-app/silabs/src/AppTask.cpp index d870092d6527a4..b37d10852d0bd9 100644 --- a/examples/pump-app/silabs/src/AppTask.cpp +++ b/examples/pump-app/silabs/src/AppTask.cpp @@ -135,7 +135,7 @@ void AppTask::AppTaskMain(void * pvParameter) appError(err); } -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) sAppTask.StartStatusLEDTimer(); #endif diff --git a/examples/window-app/silabs/src/AppTask.cpp b/examples/window-app/silabs/src/AppTask.cpp index 9adf137a5ccc04..4765c48fa4d987 100644 --- a/examples/window-app/silabs/src/AppTask.cpp +++ b/examples/window-app/silabs/src/AppTask.cpp @@ -120,7 +120,7 @@ void AppTask::AppTaskMain(void * pvParameter) appError(err); } -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) sAppTask.StartStatusLEDTimer(); #endif diff --git a/src/app/FailSafeContext.cpp b/src/app/FailSafeContext.cpp index d79a36f14f045b..b11ad8775c84df 100644 --- a/src/app/FailSafeContext.cpp +++ b/src/app/FailSafeContext.cpp @@ -52,14 +52,6 @@ void FailSafeContext::HandleDisarmFailSafe(intptr_t arg) void FailSafeContext::SetFailSafeArmed(bool armed) { -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (IsFailSafeArmed() != armed) - { - // Per spec, we should be staying in active mode while a fail-safe is - // armed. - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(armed); - } -#endif // CHIP_DEVICE_CONFIG_ENABLE_SED #if CHIP_CONFIG_ENABLE_ICD_SERVER if (IsFailSafeArmed() != armed) { diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index cbc7c44e7fb6f8..270f4dad57cb39 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -98,14 +98,6 @@ void CommissioningWindowManager::ResetState() mECMIterations = 0; mECMSaltLength = 0; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (mSEDActiveModeEnabled) - { - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(false); - mSEDActiveModeEnabled = false; - } -#endif - UpdateWindowStatus(CommissioningWindowStatusEnum::kWindowNotOpen); UpdateOpenerFabricIndex(NullNullable); @@ -245,14 +237,6 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE() mPairingSession.Clear(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (!mSEDActiveModeEnabled) - { - mSEDActiveModeEnabled = true; - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(true); - } -#endif - ReturnErrorOnFailure(mServer->GetExchangeManager().RegisterUnsolicitedMessageHandlerForType( Protocols::SecureChannel::MsgType::PBKDFParamRequest, this)); mListeningForPASE = true; diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index fae3c075f5b518..df9b1dcd5e36c6 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -211,10 +211,6 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, uint32_t mECMSaltLength = 0; uint8_t mECMSalt[kSpake2p_Max_PBKDF_Salt_Length]; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - bool mSEDActiveModeEnabled = false; -#endif - // For tests only, so that we can test the commissioning window timeout // without having to wait 3 minutes. Optional mMinCommissioningTimeoutOverride; diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 79eaa37423542a..cdacf50b663979 100755 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -204,28 +204,6 @@ class ConnectivityManager void ResetThreadNetworkDiagnosticsCounts(); CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, app::AttributeValueEncoder & encoder); -// Sleepy end device methods -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR GetSEDIntervalsConfig(SEDIntervalsConfig & intervalsConfig); - - /** - * Sets Sleepy End Device intervals configuration and posts kSEDIntervalChange event to inform other software - * modules about the change. - * - * @param[in] intervalsConfig intervals configuration to be set - */ - CHIP_ERROR SetSEDIntervalsConfig(const SEDIntervalsConfig & intervalsConfig); - - /** - * Requests setting Sleepy End Device active interval on or off. - * Every method call with onOff parameter set to true or false results in incrementing or decrementing the active mode - * consumers counter. Active mode is set if the consumers counter is bigger than 0. - * - * @param[in] onOff true if active mode should be enabled and false otherwise. - */ - CHIP_ERROR RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif - CHIP_ERROR SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); // CHIPoBLE service methods @@ -470,23 +448,6 @@ inline CHIP_ERROR ConnectivityManager::SetThreadDeviceType(ThreadDeviceType devi return static_cast(this)->_SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -inline CHIP_ERROR ConnectivityManager::GetSEDIntervalsConfig(SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_GetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ConnectivityManager::SetSEDIntervalsConfig(const SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_SetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ConnectivityManager::RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return static_cast(this)->_RequestSEDActiveMode(onOff, delayIdle); -} -#endif - inline CHIP_ERROR ConnectivityManager::SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { #if CHIP_CONFIG_ENABLE_ICD_SERVER diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index 589d138ba77773..bfd8875551a84b 100755 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -163,26 +163,6 @@ class ThreadStackManager ConnectivityManager::ThreadDeviceType GetThreadDeviceType(); CHIP_ERROR SetThreadDeviceType(ConnectivityManager::ThreadDeviceType threadRole); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - - /** - * Sets Sleepy End Device intervals configuration and posts kICDPollingIntervalChange event to inform other software - * modules about the change. - * - * @param[in] intervalsConfig intervals configuration to be set - */ - CHIP_ERROR SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - - /** - * Requests setting Sleepy End Device active interval on or off. - * Every method call with onOff parameter set to true or false results in incrementing or decrementing the active mode - * consumers counter. Active mode is set if the consumers counter is bigger than 0. - * - * @param[in] onOff true if active mode should be enabled and false otherwise. - */ - CHIP_ERROR RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif @@ -393,23 +373,6 @@ inline CHIP_ERROR ThreadStackManager::SetThreadDeviceType(ConnectivityManager::T return static_cast(this)->_SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -inline CHIP_ERROR ThreadStackManager::GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_GetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ThreadStackManager::SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_SetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ThreadStackManager::RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return static_cast(this)->_RequestSEDActiveMode(onOff, delayIdle); -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER inline CHIP_ERROR ThreadStackManager::SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h index 0f8b568d0393dd..a1d24c2e1c80d4 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h @@ -63,11 +63,6 @@ class GenericConnectivityManagerImpl_Thread bool _IsThreadApplicationControlled(); ConnectivityManager::ThreadDeviceType _GetThreadDeviceType(); CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif /* CHIP_CONFIG_ENABLE_ICD_SERVER */ @@ -144,28 +139,6 @@ GenericConnectivityManagerImpl_Thread::_SetThreadDeviceType(Connectiv return ThreadStackMgrImpl().SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -template -inline CHIP_ERROR -GenericConnectivityManagerImpl_Thread::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return ThreadStackMgrImpl().GetSEDIntervalsConfig(intervalsConfig); -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_Thread::_SetSEDIntervalsConfig( - const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return ThreadStackMgrImpl().SetSEDIntervalsConfig(intervalsConfig); -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_Thread::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return ThreadStackMgrImpl().RequestSEDActiveMode(onOff, delayIdle); -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER template inline CHIP_ERROR diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index bb8fe2d993da32..9d1e7ca06fce23 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -91,45 +91,6 @@ void ExchangeContext::SetResponseTimeout(Timeout timeout) mResponseTimeout = timeout; } -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED -void ExchangeContext::UpdateSEDIntervalMode() -{ - if (!HasSessionHandle()) - { - // After the session has been deleted, no further communication can occur on the exchange, - // so withdraw a SED active mode request. - UpdateSEDIntervalMode(false); - return; - } - - Transport::PeerAddress address; - - switch (GetSessionHandle()->GetSessionType()) - { - case Transport::Session::SessionType::kSecure: - address = GetSessionHandle()->AsSecureSession()->GetPeerAddress(); - break; - case Transport::Session::SessionType::kUnauthenticated: - address = GetSessionHandle()->AsUnauthenticatedSession()->GetPeerAddress(); - break; - default: - return; - } - - VerifyOrReturn(address.GetTransportType() != Transport::Type::kBle); - UpdateSEDIntervalMode(IsResponseExpected() || IsSendExpected() || IsMessageNotAcked()); -} - -void ExchangeContext::UpdateSEDIntervalMode(bool activeMode) -{ - if (activeMode != IsRequestingActiveMode()) - { - SetRequestingActiveMode(activeMode); - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(activeMode, true); - } -} -#endif - CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgType, PacketBufferHandle && msgBuf, const SendFlags & sendFlags) { @@ -400,11 +361,6 @@ ExchangeContext::~ExchangeContext() // VerifyOrDie(mFlags.Has(Flags::kFlagClosed)); -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED - // Make sure that the exchange withdraws the request for Sleepy End Device active mode. - UpdateSEDIntervalMode(false); -#endif - // Ideally, in this scenario, the retransmit table should // be clear of any outstanding messages for this context and // the boolean parameter passed to DoClose() should not matter. @@ -681,10 +637,6 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload void ExchangeContext::MessageHandled() { -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED - UpdateSEDIntervalMode(); -#endif - if (mFlags.Has(Flags::kFlagClosed) || IsResponseExpected() || IsSendExpected()) { return; diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index b2aaacf633b9af..5dc397a39b9ad8 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -258,13 +258,6 @@ System::Clock::Timestamp ReliableMessageMgr::GetBackoff(System::Clock::Timestamp // "An ICD sender SHOULD increase t to also account for its own sleepy interval // required to receive the acknowledgment" mrpBackoffTime += app::ICDManager::GetFastPollingInterval(); -#elif CHIP_DEVICE_CONFIG_ENABLE_SED - DeviceLayer::ConnectivityManager::SEDIntervalsConfig sedIntervals; - - if (DeviceLayer::ConnectivityMgr().GetSEDIntervalsConfig(sedIntervals) == CHIP_NO_ERROR) - { - mrpBackoffTime += System::Clock::Timestamp(sedIntervals.ActiveIntervalMS); - } #endif mrpBackoffTime += CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; diff --git a/src/messaging/ReliableMessageProtocolConfig.cpp b/src/messaging/ReliableMessageProtocolConfig.cpp index 795e02c3ce3679..9dfd0719293774 100644 --- a/src/messaging/ReliableMessageProtocolConfig.cpp +++ b/src/messaging/ReliableMessageProtocolConfig.cpp @@ -76,16 +76,6 @@ Optional GetLocalMRPConfig() config.mIdleRetransTimeout += app::ICDManager::GetSlowPollingInterval(); config.mActiveRetransTimeout += app::ICDManager::GetFastPollingInterval(); config.mActiveThresholdTime = System::Clock::Milliseconds16(IcdManagementServer::GetInstance().GetActiveModeThreshold()); -#elif CHIP_DEVICE_CONFIG_ENABLE_SED - DeviceLayer::ConnectivityManager::SEDIntervalsConfig sedIntervalsConfig; - - if (DeviceLayer::ConnectivityMgr().GetSEDIntervalsConfig(sedIntervalsConfig) == CHIP_NO_ERROR) - { - // Increase local MRP retry intervals by SED intervals. That is, intervals for - // which the device can be at sleep and not be able to receive any messages). - config.mIdleRetransTimeout += sedIntervalsConfig.IdleIntervalMS; - config.mActiveRetransTimeout += sedIntervalsConfig.ActiveIntervalMS; - } #endif #if CONFIG_BUILD_FOR_HOST_UNIT_TEST diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp index f8cdcb2f453e44..a880490d85fb00 100644 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -518,32 +518,6 @@ CHIP_ERROR ThreadStackManagerImpl::_SetThreadDeviceType(ConnectivityManager::Thr return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - (void) intervalsConfig; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - (void) intervalsConfig; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - (void) onOff; - (void) delayIdle; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR ThreadStackManagerImpl::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { diff --git a/src/platform/Linux/ThreadStackManagerImpl.h b/src/platform/Linux/ThreadStackManagerImpl.h index b91d210f7c5028..5e077cba3bd1fe 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.h +++ b/src/platform/Linux/ThreadStackManagerImpl.h @@ -93,11 +93,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif /* CHIP_CONFIG_ENABLE_ICD_SERVER */ diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h index b28058b5946d72..d8bf1b2b76a4a0 100755 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h @@ -100,13 +100,6 @@ class GenericThreadStackManagerImpl_OpenThread void _OnNetworkScanFinished(otActiveScanResult * aResult); void _UpdateNetworkStatus(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle); - CHIP_ERROR SEDUpdateMode(); - static void RequestSEDModeUpdate(chip::System::Layer * apSystemLayer, void * apAppState); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -166,13 +159,6 @@ class GenericThreadStackManagerImpl_OpenThread NetworkCommissioning::Internal::WirelessDriver::ConnectCallback * mpConnectCallback; NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback * mpStatusChangeCallback = nullptr; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - ConnectivityManager::SEDIntervalsConfig mIntervalsConfig; - ConnectivityManager::SEDIntervalMode mIntervalsMode = ConnectivityManager::SEDIntervalMode::Idle; - uint32_t mActiveModeConsumers = 0; - bool mDelayIdleTimerRunning = false; -#endif - #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT struct SrpClient @@ -279,10 +265,6 @@ class GenericThreadStackManagerImpl_OpenThread static void OnJoinerComplete(otError aError, void * aContext); void OnJoinerComplete(otError aError); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR SetSEDIntervalMode(ConnectivityManager::SEDIntervalMode intervalType); -#endif - inline ImplClass * Impl() { return static_cast(this); } }; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 4d2f461e61dd7f..4e89e6938520b4 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -376,7 +376,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCommissioning::ThreadDriver::ScanCallback * callback) { CHIP_ERROR error = CHIP_NO_ERROR; -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER otLinkModeConfig linkMode; #endif // If there is another ongoing scan request, reject the new one. @@ -392,7 +392,7 @@ GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCom SuccessOrExit(error = MapOpenThreadError(otIp6SetEnabled(mOTInst, true))); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER // Thread network discovery makes Sleepy End Devices detach from a network, so temporarily disable the SED mode. linkMode = otThreadGetLinkMode(mOTInst); @@ -430,7 +430,7 @@ void GenericThreadStackManagerImpl_OpenThread::_OnNetworkScanFinished { if (aResult == nullptr) // scan completed { -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER if (mTemporaryRxOnWhenIdle) { otLinkModeConfig linkMode = otThreadGetLinkMode(mOTInst); @@ -1702,19 +1702,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::DoInit(otInstanc mOTInst = otInst; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - ConnectivityManager::SEDIntervalsConfig sedIntervalsConfig; - using namespace System::Clock::Literals; - sedIntervalsConfig.ActiveIntervalMS = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; - sedIntervalsConfig.IdleIntervalMS = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - err = _SetSEDIntervalsConfig(sedIntervalsConfig); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to set sleepy end device intervals: %s", ErrorStr(err)); - } - SuccessOrExit(err); -#endif - // Arrange for OpenThread to call the OnOpenThreadStateChange method whenever a // state change occurs. Note that we reference the OnOpenThreadStateChange method // on the concrete implementation class so that that class can override the default @@ -1767,172 +1754,6 @@ bool GenericThreadStackManagerImpl_OpenThread::IsThreadInterfaceUpNoL return otIp6IsEnabled(mOTInst); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_GetSEDIntervalsConfig( - ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - intervalsConfig = mIntervalsConfig; - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_SetSEDIntervalsConfig( - const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - using namespace System::Clock::Literals; - if ((intervalsConfig.IdleIntervalMS < intervalsConfig.ActiveIntervalMS) || (intervalsConfig.IdleIntervalMS == 0_ms32) || - (intervalsConfig.ActiveIntervalMS == 0_ms32)) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - mIntervalsConfig = intervalsConfig; - - CHIP_ERROR err = SetSEDIntervalMode(mIntervalsMode); - - if (err == CHIP_NO_ERROR) - { - ChipDeviceEvent event; - event.Type = DeviceEventType::kICDPollingIntervalChange; - err = chip::DeviceLayer::PlatformMgr().PostEvent(&event); - } - - return err; -} - -template -CHIP_ERROR -GenericThreadStackManagerImpl_OpenThread::SetSEDIntervalMode(ConnectivityManager::SEDIntervalMode intervalType) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - System::Clock::Milliseconds32 interval; - - if (intervalType == ConnectivityManager::SEDIntervalMode::Idle) - { - interval = mIntervalsConfig.IdleIntervalMS; - } - else if (intervalType == ConnectivityManager::SEDIntervalMode::Active) - { - interval = mIntervalsConfig.ActiveIntervalMS; - } - else - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - Impl()->LockThreadStack(); - - mIntervalsMode = intervalType; - -// For Thread devices, the intervals are defined as: -// * poll period for SED devices that poll the parent for data -// * CSL period for SSED devices that listen for messages in scheduled time slots. -#if CHIP_DEVICE_CONFIG_THREAD_SSED - // Get CSL period in units of 10 symbols, convert it to microseconds and divide by 1000 to get milliseconds. - uint32_t curIntervalMS = otLinkCslGetPeriod(mOTInst) * OT_US_PER_TEN_SYMBOLS / 1000; -#else - uint32_t curIntervalMS = otLinkGetPollPeriod(mOTInst); -#endif - otError otErr = OT_ERROR_NONE; - if (interval.count() != curIntervalMS) - { -#if CHIP_DEVICE_CONFIG_THREAD_SSED - // Set CSL period in units of 10 symbols, convert it to microseconds and divide by 1000 to get milliseconds. - otErr = otLinkCslSetPeriod(mOTInst, interval.count() * 1000 / OT_US_PER_TEN_SYMBOLS); - curIntervalMS = otLinkCslGetPeriod(mOTInst) * OT_US_PER_TEN_SYMBOLS / 1000; -#else - otErr = otLinkSetPollPeriod(mOTInst, interval.count()); - curIntervalMS = otLinkGetPollPeriod(mOTInst); -#endif - err = MapOpenThreadError(otErr); - } - - Impl()->UnlockThreadStack(); - - if (otErr != OT_ERROR_NONE) - { - ChipLogError(DeviceLayer, "Failed to set SED interval to %" PRId32 "ms. Defaulting to %" PRId32 "ms", interval.count(), - curIntervalMS); - } - else - { - ChipLogProgress(DeviceLayer, "OpenThread SED interval is %" PRId32 "ms", curIntervalMS); - } - - return err; -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - if (onOff) - { - mActiveModeConsumers++; - } - else - { - if (mActiveModeConsumers > 0) - mActiveModeConsumers--; - } - - if (!onOff && delayIdle && CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD.count() != 0) - { - // StartTimer will cancel a timer if the same callback & context is used. - // This will have the effect of canceling the previous one (if any) and starting - // a new timer of the same duration. This effectively prolongs the active threshold - // without consuming additional resources. - err = DeviceLayer::SystemLayer().StartTimer(CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD, RequestSEDModeUpdate, this); - if (CHIP_NO_ERROR == err) - { - if (!mDelayIdleTimerRunning) - { - mDelayIdleTimerRunning = true; - mActiveModeConsumers++; - } - return err; - } - - ChipLogError(DeviceLayer, "Failed to postpone Idle Mode with error %" CHIP_ERROR_FORMAT, err.Format()); - } - - return SEDUpdateMode(); -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::SEDUpdateMode() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - ConnectivityManager::SEDIntervalMode mode; - - mode = mActiveModeConsumers > 0 ? ConnectivityManager::SEDIntervalMode::Active : ConnectivityManager::SEDIntervalMode::Idle; - - if (mIntervalsMode != mode) - err = SetSEDIntervalMode(mode); - - return err; -} - -template -void GenericThreadStackManagerImpl_OpenThread::RequestSEDModeUpdate(chip::System::Layer * apSystemLayer, - void * apAppState) -{ - if (apAppState != nullptr) - { - GenericThreadStackManagerImpl_OpenThread * obj = static_cast(apAppState); - if (obj->mActiveModeConsumers > 0) - { - obj->mActiveModeConsumers--; - } - - obj->mDelayIdleTimerRunning = false; - - obj->SEDUpdateMode(); - } -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER template CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp index 93559822ef6d82..b3bdede0f2f852 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp @@ -123,26 +123,6 @@ CHIP_ERROR ConnectivityManagerImplWiFi::_GetAndLogWiFiStatsCounters(void) return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ConnectivityManagerImplWiFi::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & SEDIntervalsConfig) -{ - // For now Wi-Fi uses legacy power save mode that has fixed inactivity interval - SEDIntervalsConfig.ActiveIntervalMS = - chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); - SEDIntervalsConfig.IdleIntervalMS = - chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); - return CHIP_NO_ERROR; -} -CHIP_ERROR ConnectivityManagerImplWiFi::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} -CHIP_ERROR ConnectivityManagerImplWiFi::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} -#endif - ConnectivityManager::WiFiAPMode ConnectivityManagerImplWiFi::_GetWiFiAPMode(void) { /* AP mode is unsupported */ diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h index 407bb2044ed77c..dfa6a05f0b7ae4 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h @@ -55,12 +55,6 @@ class ConnectivityManagerImplWiFi void _OnWiFiScanDone(); void _OnWiFiStationProvisionChange(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif - // Wi-Fi access point - not supported ConnectivityManager::WiFiAPMode _GetWiFiAPMode(void); CHIP_ERROR _SetWiFiAPMode(ConnectivityManager::WiFiAPMode val); diff --git a/src/platform/qpg/ThreadStackManagerImpl.cpp b/src/platform/qpg/ThreadStackManagerImpl.cpp index cb6fd0e2ec1289..01abdc679f970c 100644 --- a/src/platform/qpg/ThreadStackManagerImpl.cpp +++ b/src/platform/qpg/ThreadStackManagerImpl.cpp @@ -113,13 +113,3 @@ extern "C" void otPlatFree(void * aPtr) { CHIPPlatformMemoryFree(aPtr); } - -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDFastPollingMode(bool onOff) -{ - (void) onOff; - - ChipLogError(DeviceLayer, "Polling config is not supported on this platform"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif diff --git a/src/platform/qpg/ThreadStackManagerImpl.h b/src/platform/qpg/ThreadStackManagerImpl.h index fe39291e77edb3..9896ea6e57128e 100644 --- a/src/platform/qpg/ThreadStackManagerImpl.h +++ b/src/platform/qpg/ThreadStackManagerImpl.h @@ -74,10 +74,6 @@ class ThreadStackManagerImpl final : public ThreadStackManager, using ThreadStackManager::InitThreadStack; CHIP_ERROR InitThreadStack(otInstance * otInst); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _RequestSEDFastPollingMode(bool onOff); -#endif - private: // ===== Methods that implement the ThreadStackManager abstract interface. diff --git a/src/platform/webos/ThreadStackManagerImpl.cpp b/src/platform/webos/ThreadStackManagerImpl.cpp index b6e4bd9e9a853e..6acb542d78a3c1 100644 --- a/src/platform/webos/ThreadStackManagerImpl.cpp +++ b/src/platform/webos/ThreadStackManagerImpl.cpp @@ -481,32 +481,6 @@ CHIP_ERROR ThreadStackManagerImpl::_SetThreadDeviceType(ConnectivityManager::Thr return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_GetSEDPollingConfig(ConnectivityManager::SEDPollingConfig & pollingConfig) -{ - (void) pollingConfig; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_SetSEDPollingConfig(const ConnectivityManager::SEDPollingConfig & pollingConfig) -{ - (void) pollingConfig; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDFastPollingMode(bool onOff) -{ - (void) onOff; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif - bool ThreadStackManagerImpl::_HaveMeshConnectivity() { // TODO: Remove Weave legacy APIs diff --git a/src/platform/webos/ThreadStackManagerImpl.h b/src/platform/webos/ThreadStackManagerImpl.h index b70910878c08d0..330e601f75a7fd 100644 --- a/src/platform/webos/ThreadStackManagerImpl.h +++ b/src/platform/webos/ThreadStackManagerImpl.h @@ -86,12 +86,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDPollingConfig(ConnectivityManager::SEDPollingConfig & pollingConfig); - CHIP_ERROR _SetSEDPollingConfig(const ConnectivityManager::SEDPollingConfig & pollingConfig); - CHIP_ERROR _RequestSEDFastPollingMode(bool onOff); -#endif - bool _HaveMeshConnectivity(); CHIP_ERROR _GetAndLogThreadStatsCounters(); From fae28ee2b8501b69d752f9defe3d49697cb2dd2e Mon Sep 17 00:00:00 2001 From: Petru Lauric <81822411+plauric@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:08:56 -0400 Subject: [PATCH 27/29] fix RVC Mode clusters' TC 3-2: add precondition check (#29016) * fix TC 3-2 * fix lint issues * use 'not' instead of 'is False' --- src/python_testing/TC_RVCCLEANM_3_2.py | 30 ++++++++++++++++++++++++++ src/python_testing/TC_RVCRUNM_3_2.py | 30 ++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/src/python_testing/TC_RVCCLEANM_3_2.py b/src/python_testing/TC_RVCCLEANM_3_2.py index 7f29c8807262b9..0ac29273c20b7d 100644 --- a/src/python_testing/TC_RVCCLEANM_3_2.py +++ b/src/python_testing/TC_RVCCLEANM_3_2.py @@ -45,6 +45,30 @@ async def write_start_up_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcCleanMode.Attributes.StartUpMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + async def check_preconditions(self, endpoint): + # check whether the StartUpMode will be overridden by the OnMode attribute + + if not self.check_pics("RVCCLEANM.S.F00"): + return True + + logging.info("RVCCLEANM.S.F00: 1") + + cluster = Clusters.Objects.OnOff + attr = Clusters.OnOff.Attributes.StartUpOnOff + startUpOnOff = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("StartUpOnOff: %s" % (startUpOnOff)) + if startUpOnOff == NullValue or startUpOnOff == 0: + return True + + cluster = Clusters.Objects.RvcCleanMode + attr = Clusters.RvcCleanMode.Attributes.OnMode + onMode = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("OnMode: %s" % (onMode)) + if onMode == NullValue: + return True + + return False + @async_test_body async def test_TC_RVCCLEANM_3_2(self): @@ -60,6 +84,12 @@ async def test_TC_RVCCLEANM_3_2(self): asserts.assert_true(self.check_pics("RVCCLEANM.S.C00.Rsp"), "RVCCLEANM.S.C00.Rsp must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.C01.Tx"), "RVCCLEANM.S.C01.Tx must be supported") + depOnOffKey = "RVCCLEANM.S.F00" + asserts.assert_true(depOnOffKey in self.matter_test_config.pics, "%s must be provided" % (depOnOffKey)) + + ret = await self.check_preconditions(self.endpoint) + asserts.assert_true(ret, "invalid preconditions - StartUpMode overridden by OnMode") + attributes = Clusters.RvcCleanMode.Attributes from enum import Enum diff --git a/src/python_testing/TC_RVCRUNM_3_2.py b/src/python_testing/TC_RVCRUNM_3_2.py index 683395ef1db72a..09d99f4864b15f 100644 --- a/src/python_testing/TC_RVCRUNM_3_2.py +++ b/src/python_testing/TC_RVCRUNM_3_2.py @@ -45,6 +45,30 @@ async def write_start_up_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcRunMode.Attributes.StartUpMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + async def check_preconditions(self, endpoint): + # check whether the StartUpMode will be overridden by the OnMode attribute + + if not self.check_pics("RVCRUNM.S.F00"): + return True + + logging.info("RVCRUNM.S.F00: 1") + + cluster = Clusters.Objects.OnOff + attr = Clusters.OnOff.Attributes.StartUpOnOff + startUpOnOff = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("StartUpOnOff: %s" % (startUpOnOff)) + if startUpOnOff == NullValue or startUpOnOff == 0: + return True + + cluster = Clusters.Objects.RvcRunMode + attr = Clusters.RvcRunMode.Attributes.OnMode + onMode = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("OnMode: %s" % (onMode)) + if onMode == NullValue: + return True + + return False + @async_test_body async def test_TC_RVCRUNM_3_2(self): @@ -60,6 +84,12 @@ async def test_TC_RVCRUNM_3_2(self): asserts.assert_true(self.check_pics("RVCRUNM.S.C00.Rsp"), "RVCRUNM.S.C00.Rsp must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.C01.Tx"), "RVCRUNM.S.C01.Tx must be supported") + depOnOffKey = "RVCRUNM.S.F00" + asserts.assert_true(depOnOffKey in self.matter_test_config.pics, "%s must be provided" % (depOnOffKey)) + + ret = await self.check_preconditions(self.endpoint) + asserts.assert_true(ret, "invalid preconditions - StartUpMode overridden by OnMode") + attributes = Clusters.RvcRunMode.Attributes from enum import Enum From 29d3302d972b62175a99c8c4f3217e0cce822218 Mon Sep 17 00:00:00 2001 From: William Date: Sat, 2 Sep 2023 00:10:07 +0100 Subject: [PATCH 28/29] Adds the AirQuality server logic to the embedded target applications (#29008) * Added the AirQuality server logic to the ameba, asr, cc13x2x7_26x2x7, cc13x4_26x4, infineon, mbed, nrfconnect, nxp, openiotsdk, telink and tizen target applications. * Restyled by gn --------- Co-authored-by: Restyled.io --- examples/all-clusters-app/ameba/chip_main.cmake | 3 ++- examples/all-clusters-app/asr/BUILD.gn | 1 + examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn | 1 + examples/all-clusters-app/cc13x4_26x4/BUILD.gn | 1 + examples/all-clusters-app/infineon/psoc6/BUILD.gn | 1 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + examples/all-clusters-app/nrfconnect/CMakeLists.txt | 1 + examples/all-clusters-app/nxp/mw320/BUILD.gn | 1 + examples/all-clusters-app/openiotsdk/CMakeLists.txt | 1 + examples/all-clusters-app/telink/CMakeLists.txt | 1 + examples/all-clusters-app/tizen/BUILD.gn | 1 + 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index d635c806c42375..3a3d2429f6e5bd 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -154,7 +154,8 @@ list( APPEND ${list_chip_main_sources} ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index e023a48cb3643e..89c9607b53448d 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -71,6 +71,7 @@ asr_executable("clusters_app") { output_name = "chip-asr-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index 5c166468dffea2..6c991abac181a1 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -75,6 +75,7 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index ff5f7815168486..97ca8d972051a4 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -75,6 +75,7 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index aa0acaf2bee415..d61814767374d2 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -107,6 +107,7 @@ psoc6_executable("clusters_app") { output_name = "chip-psoc6-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index b784bc0c32e163..486901342dbb08 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -60,6 +60,7 @@ target_sources(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 69521548530d47..03515f36ae24b6 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -63,6 +63,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 2a227860192d7c..f7f415961a7481 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -74,6 +74,7 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/nxp/mw320/include", ] sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index ea02c19c076ad0..6b2e7cc87b3157 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -54,6 +54,7 @@ target_sources(${APP_TARGET} main/main_ns.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 25b0d1ec279e5b..aacc82ddc06b25 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -76,6 +76,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index e755bcaef060ea..1f40d96500c012 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -23,6 +23,7 @@ assert(chip_build_tools) source_set("chip-all-clusters-common") { sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", From 1ed389725756a7a5e6ce4c2e79e6458c7d89d2f6 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 19:13:48 -0400 Subject: [PATCH 29/29] Fix signatures of string-attribute getters in Accessors.h/cpp. (#29024) The old signature did not propagate the update length of the span to the caller. Fixes https://github.com/project-chip/connectedhomeip/issues/28357 --- scripts/setup/zap.json | 4 +- scripts/setup/zap.version | 2 +- scripts/tools/zap/zap_execution.py | 2 +- .../zap-generated/attributes/Accessors.cpp | 68 +++++++++---------- .../zap-generated/attributes/Accessors.h | 68 +++++++++---------- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index c27f4df51ab556..d763e123ff712b 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.08.30-nightly.1"] + "tags": ["version:2@v2023.09.01-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.08.30-nightly.1"] + "tags": ["version:2@v2023.09.01-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index 1cedd0fcbd5c11..5af16d0daf37f9 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.08.30-nightly +v2023.09.01-nightly diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 4e69557eb99486..5dbff86656cd17 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.8.30' +MIN_ZAP_VERSION = '2023.9.1' class ZapTool: 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 3c6c262fcdec57..878ef63131deb0 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 @@ -1556,7 +1556,7 @@ namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1587,7 +1587,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1618,7 +1618,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -2175,7 +2175,7 @@ namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[512 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, zclString, sizeof(zclString)); @@ -2274,7 +2274,7 @@ namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, sizeof(zclString)); @@ -2686,7 +2686,7 @@ namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[35 + 1]; EmberAfStatus status = @@ -3145,7 +3145,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3742,7 +3742,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3804,7 +3804,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3835,7 +3835,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -5275,7 +5275,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5339,7 +5339,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5372,7 +5372,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5436,7 +5436,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5500,7 +5500,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5533,7 +5533,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = @@ -5566,7 +5566,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5599,7 +5599,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[256 + 2]; EmberAfStatus status = @@ -5632,7 +5632,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5665,7 +5665,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5729,7 +5729,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -6702,7 +6702,7 @@ namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); @@ -9512,7 +9512,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[3 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); @@ -15260,7 +15260,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[254 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, sizeof(zclString)); @@ -17288,7 +17288,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -17319,7 +17319,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -20315,7 +20315,7 @@ namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); @@ -21424,7 +21424,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -21486,7 +21486,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -21579,7 +21579,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -26557,7 +26557,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value) namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -26588,7 +26588,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -26619,7 +26619,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -26650,7 +26650,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); 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 244a3ad9023876..f23f87366c526f 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 @@ -303,17 +303,17 @@ namespace BinaryInputBasic { namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveText namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace InactiveText @@ -428,7 +428,7 @@ namespace Actions { namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SetupURL @@ -449,7 +449,7 @@ namespace BasicInformation { namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -530,7 +530,7 @@ namespace LocalizationConfiguration { namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveLocale @@ -626,7 +626,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Order namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -715,7 +715,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace BatPresent namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatReplacementDescription @@ -726,12 +726,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B } // namespace BatCommonDesignation namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatANSIDesignation namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatIECDesignation @@ -1012,7 +1012,7 @@ namespace BridgedDeviceBasicInformation { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -1022,12 +1022,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductName namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -1037,7 +1037,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace HardwareVersion namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace HardwareVersionString @@ -1047,32 +1047,32 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace SoftwareVersion namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SoftwareVersionString namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ManufacturingDate namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace PartNumber namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductURL namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductLabel namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SerialNumber @@ -1082,7 +1082,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Reachable namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace UniqueID @@ -1299,7 +1299,7 @@ namespace ModeSelect { namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -1829,7 +1829,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfCredentialsSupportedPerUser namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Language @@ -2743,7 +2743,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace DriftCompensation namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CompensationText @@ -3055,12 +3055,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace LampQuantity namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampType namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampManufacturer @@ -3598,7 +3598,7 @@ namespace WakeOnLan { namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace MACAddress @@ -3821,7 +3821,7 @@ namespace ApplicationBasic { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -3831,7 +3831,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationName @@ -3847,7 +3847,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas } // namespace Status namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationVersion @@ -4669,22 +4669,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value); } // namespace FloatDouble namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace OctetString namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // long_octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace LongOctetString namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CharString namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LongCharString