From eea0c534cf164f4140dbc6c3fd0ec39e80093006 Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Mon, 15 Aug 2022 16:18:39 -0700 Subject: [PATCH 001/115] Issue 20955 change darwin crypto to boringssl from mbedtls (#21865) --- src/darwin/Framework/Matter.xcodeproj/project.pbxproj | 4 ---- src/darwin/Framework/chip_xcode_build_connector.sh | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index b271e452d160b0..47da9c8ee28e48 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -24,7 +24,6 @@ 2C222AD0255C620600E446B9 /* MTRBaseDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C222ACE255C620600E446B9 /* MTRBaseDevice.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2C222AD1255C620600E446B9 /* MTRBaseDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C222ACF255C620600E446B9 /* MTRBaseDevice.mm */; }; 2C222ADF255C811800E446B9 /* MTRBaseDevice_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C222ADE255C811800E446B9 /* MTRBaseDevice_Internal.h */; }; - 2C4DF09E248B2C60009307CB /* libmbedtls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C4DF09D248B2C60009307CB /* libmbedtls.a */; settings = {ATTRIBUTES = (Required, ); }; }; 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */; }; 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */; }; 2C8C8FC0253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */; }; @@ -156,7 +155,6 @@ 2C222ACE255C620600E446B9 /* MTRBaseDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBaseDevice.h; sourceTree = ""; }; 2C222ACF255C620600E446B9 /* MTRBaseDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRBaseDevice.mm; sourceTree = ""; }; 2C222ADE255C811800E446B9 /* MTRBaseDevice_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBaseDevice_Internal.h; sourceTree = ""; }; - 2C4DF09D248B2C60009307CB /* libmbedtls.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedtls.a; path = lib/libmbedtls.a; sourceTree = BUILT_PRODUCTS_DIR; }; 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceConnectionBridge.h; sourceTree = ""; }; 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceConnectionBridge.mm; sourceTree = ""; }; 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRPersistentStorageDelegateBridge.h; sourceTree = ""; }; @@ -272,7 +270,6 @@ buildActionMask = 2147483647; files = ( BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */, - 2C4DF09E248B2C60009307CB /* libmbedtls.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -461,7 +458,6 @@ BA09EB3E2474762900605257 /* Frameworks */ = { isa = PBXGroup; children = ( - 2C4DF09D248B2C60009307CB /* libmbedtls.a */, BA09EB3F2474762900605257 /* libCHIP.a */, ); name = Frameworks; diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 2dde90b00acc94..9c2481008af69a 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -93,7 +93,7 @@ done declare -a args=( 'default_configs_cosmetic=[]' # suppress colorization - 'chip_crypto="mbedtls"' + 'chip_crypto="boringssl"' 'chip_build_tools=false' 'chip_build_tests=false' 'chip_log_message_max_size=4096' # might as well allow nice long log messages From 8a89db4d07b1ddd51d91b7e9d7c1ced7bff69080 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Mon, 15 Aug 2022 16:18:50 -0700 Subject: [PATCH 002/115] Improve Invalid Action return in CommandHandler (#21868) * Improve Invalid Action return in CommandHandler Improve the error reporting from ProcessGroupCommandDataIB and ProcessCommandDataIB: per spec some of their failures should also be InvalidAction. * address comments --- src/app/CommandHandler.cpp | 53 ++++++++++++++++++++------------------ src/app/CommandHandler.h | 4 +-- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 12c61a643debb1..7e742b54cf8aff 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -127,14 +127,18 @@ Status CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && payloa VerifyOrReturnError(TLV::AnonymousTag() == invokeRequestsReader.GetTag(), Status::InvalidAction); CommandDataIB::Parser commandData; VerifyOrReturnError(commandData.Init(invokeRequestsReader) == CHIP_NO_ERROR, Status::InvalidAction); - + Status status = Status::Success; if (mExchangeCtx->IsGroupExchangeContext()) { - VerifyOrReturnError(ProcessGroupCommandDataIB(commandData) == CHIP_NO_ERROR, Status::Failure); + status = ProcessGroupCommandDataIB(commandData); } else { - VerifyOrReturnError(ProcessCommandDataIB(commandData) == CHIP_NO_ERROR, Status::Failure); + status = ProcessCommandDataIB(commandData); + } + if (status != Status::Success) + { + return status; } } @@ -238,7 +242,7 @@ constexpr uint8_t sNoFields[] = { }; } // anonymous namespace -CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) +Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) { CHIP_ERROR err = CHIP_NO_ERROR; CommandPathIB::Parser commandPath; @@ -248,16 +252,16 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand // NOTE: errors may occur before the concrete command path is even fully decoded. err = aCommandElement.GetPath(&commandPath); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); err = commandPath.GetClusterId(&concretePath.mClusterId); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); err = commandPath.GetCommandId(&concretePath.mCommandId); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); err = commandPath.GetEndpointId(&concretePath.mEndpointId); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); { Status commandExists = mpCallback->CommandExists(concretePath); @@ -266,7 +270,7 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand ChipLogDetail(DataManagement, "No command " ChipLogFormatMEI " in Cluster " ChipLogFormatMEI " on Endpoint 0x%x", ChipLogValueMEI(concretePath.mCommandId), ChipLogValueMEI(concretePath.mClusterId), concretePath.mEndpointId); - return AddStatus(concretePath, commandExists); + return AddStatus(concretePath, commandExists) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -281,10 +285,10 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand { if (err != CHIP_ERROR_ACCESS_DENIED) { - return AddStatus(concretePath, Status::Failure); + return AddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } // TODO: when wildcard invokes are supported, handle them to discard rather than fail with status - return AddStatus(concretePath, Status::UnsupportedAccess); + return AddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -292,7 +296,7 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand { // TODO: when wildcard invokes are supported, discard a // wildcard-expanded path instead of returning a status. - return AddStatus(concretePath, Status::NeedsTimedInteraction); + return AddStatus(concretePath, Status::NeedsTimedInteraction) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } if (CommandIsFabricScoped(concretePath.mClusterId, concretePath.mCommandId)) @@ -303,7 +307,7 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand { // TODO: when wildcard invokes are supported, discard a // wildcard-expanded path instead of returning a status. - return AddStatus(concretePath, Protocols::InteractionModel::Status::UnsupportedAccess); + return AddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -328,15 +332,15 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand exit: if (err != CHIP_NO_ERROR) { - return AddStatus(concretePath, Status::InvalidCommand); + return AddStatus(concretePath, Status::InvalidCommand) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } // We have handled the error status above and put the error status in response, now return success status so we can process // other commands in the invoke request. - return CHIP_NO_ERROR; + return Status::Success; } -CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCommandElement) +Status CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCommandElement) { CHIP_ERROR err = CHIP_NO_ERROR; CommandPathIB::Parser commandPath; @@ -351,13 +355,13 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo Credentials::GroupDataProvider::EndpointIterator * iterator; err = aCommandElement.GetPath(&commandPath); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); err = commandPath.GetClusterId(&clusterId); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); err = commandPath.GetCommandId(&commandId); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); fabric = GetAccessingFabricIndex(); @@ -373,8 +377,9 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo ChipLogValueMEI(clusterId), ChipLogValueMEI(commandId)); commandDataReader.Init(sNoFields); err = commandDataReader.Next(); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); } - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, Status::Failure); // Per spec, we do the "is this a timed command?" check for every path, but // since all paths that fail it just get silently discarded we can do it @@ -384,7 +389,7 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo if (CommandNeedsTimedInvoke(clusterId, commandId)) { // Group commands are never timed. - ExitNow(); + return Status::Success; } // No check for `CommandIsFabricScoped` unlike in `ProcessCommandDataIB()` since group commands @@ -392,7 +397,7 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo // Find which endpoints can process the command, and dispatch to them. iterator = groupDataProvider->IterateEndpoints(fabric); - VerifyOrExit(iterator != nullptr, err = CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(iterator != nullptr, Status::Failure); while (iterator->Next(mapping)) { @@ -444,9 +449,7 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo } } iterator->Release(); - -exit: - return CHIP_NO_ERROR; + return Status::Success; } CHIP_ERROR CommandHandler::AddStatusInternal(const ConcreteCommandPath & aCommandPath, const StatusIB & aStatus) diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 18ffed48e9ec1a..bb96fe486f9f44 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -350,13 +350,13 @@ class CommandHandler : public Messaging::ExchangeDelegate * ProcessCommandDataIB is only called when a unicast invoke command request is received * It requires the endpointId in its command path to be able to dispatch the command */ - CHIP_ERROR ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement); + Protocols::InteractionModel::Status ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement); /** * ProcessGroupCommandDataIB is only called when a group invoke command request is received * It doesn't need the endpointId in it's command path since it uses the GroupId in message metadata to find it */ - CHIP_ERROR ProcessGroupCommandDataIB(CommandDataIB::Parser & aCommandElement); + Protocols::InteractionModel::Status ProcessGroupCommandDataIB(CommandDataIB::Parser & aCommandElement); CHIP_ERROR SendCommandResponse(); CHIP_ERROR AddStatusInternal(const ConcreteCommandPath & aCommandPath, const StatusIB & aStatus); From d71bb7112fabecc041cc7ffad071f984e73b118e Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Mon, 15 Aug 2022 16:19:44 -0700 Subject: [PATCH 003/115] Add status check in timed related test (#21871) TestCommandHandlerWithProcessReceivedEmptyDataMsg not quite checking the status returned from ProcessInvokeRequest, add the status check for ProcessInvokeRequest --- src/app/tests/TestCommandInteraction.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index c36221395375ad..265d982acbaae4 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -1064,8 +1064,16 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, messageIsTimed, kTestCommandIdNoData); - commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), transactionIsTimed); - + Protocols::InteractionModel::Status status = + commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), transactionIsTimed); + if (messageIsTimed != transactionIsTimed) + { + NL_TEST_ASSERT(apSuite, status == Protocols::InteractionModel::Status::UnsupportedAccess); + } + else + { + NL_TEST_ASSERT(apSuite, status == Protocols::InteractionModel::Status::Success); + } NL_TEST_ASSERT(apSuite, chip::isCommandDispatched == (messageIsTimed == transactionIsTimed)); } } From 24ece752a5261985ea3298e1ac655d9666c69f89 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Mon, 15 Aug 2022 19:23:13 -0400 Subject: [PATCH 004/115] [EFR32] Loader script: Flash length fixed. (#21884) --- examples/platform/efr32/ldscripts/efr32mg24.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform/efr32/ldscripts/efr32mg24.ld b/examples/platform/efr32/ldscripts/efr32mg24.ld index bf3f9fd6aa0cb3..b057a9af720a7a 100644 --- a/examples/platform/efr32/ldscripts/efr32mg24.ld +++ b/examples/platform/efr32/ldscripts/efr32mg24.ld @@ -50,7 +50,7 @@ MEMORY { - FLASH (rx) : ORIGIN = 0x08006000, LENGTH = 0x178000 + FLASH (rx) : ORIGIN = 0x08006000, LENGTH = 0x17A000 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000 } From 9dbfa911675fd13edd5580ccbfb2e632bd23e374 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 15 Aug 2022 19:23:32 -0400 Subject: [PATCH 005/115] Remove methods from DeviceController that are no longer valid (#21886) With the refactor for OperationalSessionSetup, there are methods in DeviceController that we can now permanently remove. --- src/app/CASESessionManager.cpp | 5 -- src/app/CASESessionManager.h | 6 +- src/app/OperationalSessionSetup.cpp | 63 ++++------------ src/app/OperationalSessionSetup.h | 60 +++++++--------- src/app/clusters/bindings/BindingManager.cpp | 2 - .../operational-credentials-server.cpp | 12 ---- .../ota-requestor/DefaultOTARequestor.cpp | 13 +++- .../ota-requestor/DefaultOTARequestor.h | 1 + src/controller/CHIPDeviceController.cpp | 72 ++----------------- src/controller/CHIPDeviceController.h | 39 ---------- .../java/CHIPDeviceController-JNI.cpp | 23 ------ .../ChipDeviceController.java | 6 -- .../ChipDeviceController-ScriptBinding.cpp | 28 +++----- .../Framework/CHIP/MTRDeviceController.mm | 7 +- src/transport/SessionManager.cpp | 8 +-- src/transport/SessionManager.h | 4 +- 16 files changed, 72 insertions(+), 277 deletions(-) diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 7e38ccd583e974..93787a9040bdf5 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -56,11 +56,6 @@ void CASESessionManager::FindOrEstablishSession(const ScopedNodeId & peerId, Cal session->Connect(onConnection, onFailure); } -void CASESessionManager::ReleaseSession(const ScopedNodeId & peerId) -{ - ReleaseSession(FindExistingSessionSetup(peerId)); -} - void CASESessionManager::ReleaseSessionsForFabric(FabricIndex fabricIndex) { mConfig.sessionSetupPool->ReleaseAllSessionSetupsForFabric(fabricIndex); diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index d5243a930d2bbe..c8c252ee815749 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -78,10 +78,6 @@ class CASESessionManager : public OperationalSessionReleaseDelegate, public Sess void FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure); - OperationalSessionSetup * FindExistingSessionSetup(const ScopedNodeId & peerId, bool forAddressUpdate = false) const; - - void ReleaseSession(const ScopedNodeId & peerId); - void ReleaseSessionsForFabric(FabricIndex fabricIndex); void ReleaseAllSessions(); @@ -103,6 +99,8 @@ class CASESessionManager : public OperationalSessionReleaseDelegate, public Sess void UpdatePeerAddress(ScopedNodeId peerId) override; private: + OperationalSessionSetup * FindExistingSessionSetup(const ScopedNodeId & peerId, bool forAddressUpdate = false) const; + Optional FindExistingSession(const ScopedNodeId & peerId) const; CASESessionManagerConfig mConfig; diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 8cafbe9697e59d..11ceb8bb6c0e26 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -261,20 +261,14 @@ void OperationalSessionSetup::DequeueConnectionCallbacks(CHIP_ERROR error) mConnectionFailure.DequeueAll(failureReady); mConnectionSuccess.DequeueAll(successReady); - // TODO Issue #20452: For now we need to make a copy of member fields inside `this` before calling any of the - // callbacks since the callbacks themselves can potentially release `this` OperationalSessionSetup. - auto * exchangeMgr = mInitParams.exchangeMgr; - auto sessionHandle = mSecureSession.Get(); - auto peerId = mPeerId; - VerifyOrDie(mReleaseDelegate != nullptr); - auto * releaseDelegate = mReleaseDelegate; - // // If we encountered no error, go ahead and call all success callbacks. Otherwise, // call the failure callbacks. // while (failureReady.mNext != &failureReady) { + // We expect that we only have callbacks if we are not performing just address update. + VerifyOrDie(!mPerformingAddressUpdate); Callback::Callback * cb = Callback::Callback::FromCancelable(failureReady.mNext); @@ -282,24 +276,28 @@ void OperationalSessionSetup::DequeueConnectionCallbacks(CHIP_ERROR error) if (error != CHIP_NO_ERROR) { - cb->mCall(cb->mContext, peerId, error); + cb->mCall(cb->mContext, mPeerId, error); } } while (successReady.mNext != &successReady) { + // We expect that we only have callbacks if we are not performing just address update. + VerifyOrDie(!mPerformingAddressUpdate); Callback::Callback * cb = Callback::Callback::FromCancelable(successReady.mNext); cb->Cancel(); if (error == CHIP_NO_ERROR) { - // We know that we for sure have the SessionHandle in the successful case. + auto * exchangeMgr = mInitParams.exchangeMgr; VerifyOrDie(exchangeMgr); - cb->mCall(cb->mContext, *exchangeMgr, sessionHandle.Value()); + // We know that we for sure have the SessionHandle in the successful case. + auto optionalSessionHandle = mSecureSession.Get(); + cb->mCall(cb->mContext, *exchangeMgr, optionalSessionHandle.Value()); } } - - releaseDelegate->ReleaseSession(this); + VerifyOrDie(mReleaseDelegate != nullptr); + mReleaseDelegate->ReleaseSession(this); } void OperationalSessionSetup::OnSessionEstablishmentError(CHIP_ERROR error) @@ -307,13 +305,6 @@ void OperationalSessionSetup::OnSessionEstablishmentError(CHIP_ERROR error) VerifyOrReturn(mState != State::Uninitialized && mState != State::NeedsAddress, ChipLogError(Controller, "HandleCASEConnectionFailure was called while the device was not initialized")); - // - // We don't need to reset the state all the way back to NeedsAddress since all that transpired - // was just CASE connection failure. So let's re-use the cached address to re-do CASE again - // if need-be. - // - MoveToState(State::HasAddress); - DequeueConnectionCallbacks(error); // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } @@ -332,26 +323,6 @@ void OperationalSessionSetup::OnSessionEstablished(const SessionHandle & session // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } -void OperationalSessionSetup::Disconnect() -{ - VerifyOrReturn(mState == State::SecureConnected); - - if (mSecureSession) - { - // - // Mark the session as defunct to signal that we no longer want to use this - // session anymore for further interactions to this peer. However, if we receive - // messages back from that peer on the defunct session, it will bring it back into an active - // state again. - // - mSecureSession.Get().Value()->AsSecureSession()->MarkAsDefunct(); - } - - mSecureSession.Release(); - - MoveToState(State::HasAddress); -} - void OperationalSessionSetup::CleanupCASEClient() { if (mCASEClient) @@ -366,11 +337,6 @@ void OperationalSessionSetup::OnSessionReleased() MoveToState(State::HasAddress); } -void OperationalSessionSetup::OnSessionHang() -{ - Disconnect(); -} - OperationalSessionSetup::~OperationalSessionSetup() { if (mAddressLookupHandle.IsActive()) @@ -456,12 +422,7 @@ void OperationalSessionSetup::OnNodeAddressResolutionFailed(const PeerId & peerI ChipLogError(Discovery, "OperationalSessionSetup[%u:" ChipLogFormatX64 "]: operational discovery failed: %" CHIP_ERROR_FORMAT, mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), reason.Format()); - if (IsResolvingAddress()) - { - MoveToState(State::NeedsAddress); - } - - // No need to set mPerformingAddressUpdate to false since call below releases `this`. + // No need to modify any variables in `this` since call below releases `this`. DequeueConnectionCallbacks(reason); // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index ccea4843457b0d..d0db84f6c69ce1 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -140,19 +140,29 @@ class OperationalDeviceProxy : public DeviceProxy * application code does incorrectly hold onto this information so do not follow those incorrect * implementations as an example. */ -// TODO: OnDeviceConnected should not return ExchangeManager. Application should have this already. This -// was provided initially to keep code churn down during a large refactor of OnDeviceConnected. typedef void (*OnDeviceConnected)(void * context, Messaging::ExchangeManager & exchangeMgr, SessionHandle & sessionHandle); typedef void (*OnDeviceConnectionFailure)(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); /** - * Represents a connection path to a device that is in an operational state. + * Object used to either establish a connection to peer or performing address lookup to a peer. * - * Handles the lifetime of communicating with such a device: - * - Discover the device using DNSSD (find out what IP address to use and what - * communication parameters are appropriate for it) - * - Establish a secure channel to it via CASE - * - Expose to consumers the secure session for talking to the device. + * OperationalSessionSetup is capable of either: + * 1. Establishing a CASE session connection to a peer. Upon success or failure, the OnDeviceConnected or + * OnDeviceConnectionFailure callback will be called to notify the caller the results of trying to + * estblish a CASE session. Some additional details about the steps to establish a connection are: + * - Discover the device using DNSSD (find out what IP address to use and what + * communication parameters are appropriate for it) + * - Establish a secure channel to it via CASE + * - Expose to consumers the secure session for talking to the device via OnDeviceConnected + * callback. + * 2. Performing an address lookup for given a scoped nodeid. On success, it will call into + * SessionManager to update the addresses for all matching sessions in the session table. + * + * OperationalSessionSetup has a very limited lifetime. Once it has completed its purpose outlined above, + * it will use `releaseDelegate` to release itself. + * + * It is possible to determine which of the two purposes the OperationalSessionSetup is for by calling + * IsForAddressUpdate(). */ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, public SessionEstablishmentDelegate, @@ -198,21 +208,10 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, */ void Connect(Callback::Callback * onConnection, Callback::Callback * onFailure); - bool IsConnected() const { return mState == State::SecureConnected; } - bool IsConnecting() const { return mState == State::Connecting; } bool IsForAddressUpdate() const { return mPerformingAddressUpdate; } - /** - * IsResolvingAddress returns true if we are doing an address resolution - * that needs to happen before we can establish CASE. We can be in the - * middle of doing address updates at other times too (e.g. when we are - * IsConnected()), but those will not cause a true return from - * IsResolvingAddress(). - */ - bool IsResolvingAddress() const { return mState == State::ResolvingAddress; } - //////////// SessionEstablishmentDelegate Implementation /////////////// void OnSessionEstablished(const SessionHandle & session) override; void OnSessionEstablishmentError(CHIP_ERROR error) override; @@ -221,19 +220,9 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, // Called when a connection is closing. The object releases all resources associated with the connection. void OnSessionReleased() override; - // Called when a connection is hanging. Try to re-establish another session, and shift to the new session when done, the - // original session won't be touched during the period. - void OnSessionHang() override; - - /** - * Mark any open session with the device as expired. - */ - void Disconnect(); ScopedNodeId GetPeerId() const { return mPeerId; } - Transport::PeerAddress GetPeerAddress() const { return mDeviceAddress; } - static Transport::PeerAddress ToPeerAddress(const Dnssd::ResolvedNodeData & nodeData) { Inet::InterfaceId interfaceId = Inet::InterfaceId::Null(); @@ -256,11 +245,6 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, */ FabricIndex GetFabricIndex() const { return mPeerId.GetFabricIndex(); } - /** - * Triggers a DNSSD lookup to find a usable peer address for this operational device. - */ - CHIP_ERROR LookupPeerAddress(); - void PerformAddressUpdate(); // AddressResolve::NodeListener - notifications when dnssd finds a node IP address @@ -331,9 +315,17 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, * If error == CHIP_NO_ERROR, only success callbacks are invoked. * Otherwise, only failure callbacks are invoked. * + * This uses mReleaseDelegate to release ourselves (aka `this`). As a + * result any caller should return right away without touching `this`. + * */ void DequeueConnectionCallbacks(CHIP_ERROR error); + /** + * Triggers a DNSSD lookup to find a usable peer address. + */ + CHIP_ERROR LookupPeerAddress(); + /** * This function will set new IP address, port and MRP retransmission intervals of the device. */ diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp index d373e8c15a3f13..db07abe3ed9f34 100644 --- a/src/app/clusters/bindings/BindingManager.cpp +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -111,7 +111,6 @@ CHIP_ERROR BindingManager::EstablishConnection(const ScopedNodeId & nodeId) if (mPendingNotificationMap.FindLRUConnectPeer(peerToRemove) == CHIP_NO_ERROR) { mPendingNotificationMap.RemoveAllEntriesForNode(peerToRemove); - mInitParams.mCASESessionManager->ReleaseSession(peerToRemove); // Now retry mLastSessionEstablishmentError = CHIP_NO_ERROR; @@ -160,7 +159,6 @@ void BindingManager::HandleDeviceConnectionFailure(const ScopedNodeId & peerId, { // Simply release the entry, the connection will be re-established as needed. ChipLogError(AppServer, "Failed to establish connection to node 0x" ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); - mInitParams.mCASESessionManager->ReleaseSession(peerId); mLastSessionEstablishmentError = error; } diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index ae60c18f70fe4f..baf6a97877df81 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -296,18 +296,6 @@ void FailSafeCleanup(const chip::DeviceLayer::ChipDeviceEvent * event) // Session Context at the Server. if (event->FailSafeTimerExpired.addNocCommandHasBeenInvoked || event->FailSafeTimerExpired.updateNocCommandHasBeenInvoked) { - // TODO(#19259): The following scope will no longer need to exist after #19259 is fixed - { - CASESessionManager * caseSessionManager = Server::GetInstance().GetCASESessionManager(); - if (caseSessionManager) - { - const FabricInfo * fabricInfo = Server::GetInstance().GetFabricTable().FindFabricWithIndex(fabricIndex); - VerifyOrReturn(fabricInfo != nullptr); - - caseSessionManager->ReleaseSessionsForFabric(fabricInfo->GetFabricIndex()); - } - } - SessionManager & sessionMgr = Server::GetInstance().GetSecureSessionManager(); CleanupSessionsForFabric(sessionMgr, fabricIndex); } diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index 98f11b3fee0811..f31bb2e0c5408a 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -386,8 +386,15 @@ void DefaultOTARequestor::DisconnectFromProvider() return; } - auto providerNodeId = GetProviderScopedId(); - mServer->GetSecureSessionManager().MarkSessionsAsDefunct(providerNodeId, MakeOptional(Transport::SecureSession::Type::kCASE)); + auto optionalSessionHandle = mSessionHolder.Get(); + if (optionalSessionHandle.HasValue()) + { + if (optionalSessionHandle.Value()->IsActiveSession()) + { + optionalSessionHandle.Value()->AsSecureSession()->MarkAsDefunct(); + } + } + mSessionHolder.Release(); } // Requestor is directed to cancel image update in progress. All the Requestor state is @@ -419,6 +426,7 @@ void DefaultOTARequestor::OnConnected(void * context, Messaging::ExchangeManager { DefaultOTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); + requestorCore->mSessionHolder.Grab(sessionHandle); switch (requestorCore->mOnConnectedAction) { @@ -476,6 +484,7 @@ void DefaultOTARequestor::OnConnectionFailure(void * context, const ScopedNodeId { DefaultOTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); + requestorCore->mSessionHolder.Release(); ChipLogError(SoftwareUpdate, "Failed to connect to node 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, ChipLogValueX64(peerId.GetNodeId()), error.Format()); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.h b/src/app/clusters/ota-requestor/DefaultOTARequestor.h index 0dc04efae08f8e..9f9902858c3141 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.h @@ -331,6 +331,7 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: // persistent storage (if available), used for sending the NotifyApplied message, and then cleared. This will ensure determinism // in the OTARequestorDriver on reboot. Optional mProviderLocation; + SessionHolder mSessionHolder; }; } // namespace chip diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index da29daeac289b9..d409d727f405dd 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -353,41 +353,6 @@ void DeviceController::Shutdown() mDeviceDiscoveryDelegate = nullptr; } -void DeviceController::ReleaseOperationalDevice(NodeId remoteNodeId) -{ - VerifyOrReturn(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, - ChipLogError(Controller, "ReleaseOperationalDevice was called in incorrect state")); - mSystemState->CASESessionMgr()->ReleaseSession(GetPeerScopedId(remoteNodeId)); -} - -CHIP_ERROR DeviceController::DisconnectDevice(NodeId nodeId) -{ - ChipLogProgress(Controller, "Force close session for node 0x%" PRIx64, nodeId); - - if (SessionMgr()->MarkSessionsAsDefunct(GetPeerScopedId(nodeId), MakeOptional(Transport::SecureSession::Type::kCASE))) - { - return CHIP_NO_ERROR; - } - - OperationalSessionSetup * proxy = mSystemState->CASESessionMgr()->FindExistingSessionSetup(GetPeerScopedId(nodeId)); - if (proxy == nullptr) - { - ChipLogProgress(Controller, "Attempted to close a session that does not exist."); - return CHIP_NO_ERROR; - } - - if (proxy->IsConnecting()) - { - ChipLogError(Controller, "Attempting to disconnect while connection in progress"); - return CHIP_ERROR_INCORRECT_STATE; - } - - // TODO: logic here is unclear. Possible states are "uninitialized, needs address, initialized" - // and disconnecting in those states is unclear (especially for needds-address). - ChipLogProgress(Controller, "Disconnect attempt while not in connected/connecting state"); - return CHIP_NO_ERROR; -} - CHIP_ERROR DeviceController::GetPeerAddressAndPort(NodeId peerId, Inet::IPAddress & addr, uint16_t & port) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); @@ -1664,7 +1629,6 @@ void DeviceCommissioner::OnDeviceConnectionFailureFn(void * context, const Scope { commissioner->CommissioningStageComplete(error); } - commissioner->mSystemState->CASESessionMgr()->ReleaseSession(peerId); } // ClusterStateCache::Callback impl @@ -2286,13 +2250,10 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio } break; case CommissioningStage::kFindOperational: { - CHIP_ERROR err = UpdateDevice(proxy->GetDeviceId()); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Unable to proceed to operational discovery\n"); - CommissioningStageComplete(err); - return; - } + // If there is an error, CommissioningStageComplete will be called from OnDeviceConnectionFailureFn. + auto scopedPeerId = GetPeerScopedId(proxy->GetDeviceId()); + mSystemState->CASESessionMgr()->FindOrEstablishSession(scopedPeerId, &mOnDeviceConnectedCallback, + &mOnDeviceConnectionFailureCallback); } break; case CommissioningStage::kSendComplete: { @@ -2312,31 +2273,6 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio } } -CHIP_ERROR DeviceController::UpdateDevice(NodeId peerNodeId) -{ - VerifyOrReturnError(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); - - OperationalSessionSetup * sessionSetup = GetDeviceSession(GetPeerScopedId(peerNodeId)); - VerifyOrReturnError(sessionSetup != nullptr, CHIP_ERROR_NOT_FOUND); - - return sessionSetup->LookupPeerAddress(); -} - -OperationalSessionSetup * DeviceController::GetDeviceSession(const ScopedNodeId & peerId) -{ - return mSystemState->CASESessionMgr()->FindExistingSessionSetup(peerId); -} - -OperationalSessionSetup * DeviceCommissioner::GetDeviceSession(const ScopedNodeId & peerId) -{ - mSystemState->CASESessionMgr()->FindOrEstablishSession(peerId, &mOnDeviceConnectedCallback, - &mOnDeviceConnectionFailureCallback); - - // If there is an OperationalSessionSetup for this peerId now the call to the - // superclass will return it. - return DeviceController::GetDeviceSession(peerId); -} - CHIP_ERROR DeviceController::GetCompressedFabricIdBytes(MutableByteSpan & outBytes) const { const auto * fabricInfo = GetFabricInfo(); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 2f9734816cae4e..9e3f77cc90bb46 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -214,14 +214,6 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController return CHIP_NO_ERROR; } - /** - * DEPRECATED - to be removed - * - * Forces a DNSSD lookup for the specified device. It finds the corresponding session - * for the given peerNodeId and initiates a DNSSD lookup to find/update the node address - */ - CHIP_ERROR UpdateDevice(NodeId peerNodeId); - /** * @brief * Compute a PASE verifier and passcode ID for the desired setup pincode. @@ -301,29 +293,8 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController return mSystemState->Fabrics(); } - // TODO(#20452): This should be removed/renamed once #20452 is fixed - void ReleaseOperationalDevice(NodeId remoteNodeId); - OperationalCredentialsDelegate * GetOperationalCredentialsDelegate() { return mOperationalCredentialsDelegate; } - /** - * TODO(#20452): This needs to be refactored to reflect what it actually does (which is not disconnecting anything) - * - * TEMPORARY - DO NOT USE or if you use please request review on why/how to - * officially support such an API. - * - * This was added to support the 'reuse session' logic in cirque integration - * tests however since that is the only client, the correct update is to - * use 'ConnectDevice' and wait for connect success/failure inside the CI - * logic. The current code does not do that because python was not set up - * to wait for timeouts on success/fail, hence this temporary method. - * - * TODO(andy31415): update cirque test and remove this method. - * - * Returns success if a session with the given peer does not exist yet. - */ - CHIP_ERROR DisconnectDevice(NodeId nodeId); - /** * @brief * Reconfigures a new set of operational credentials to be used with this @@ -369,14 +340,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController chip::VendorId mVendorId; - /// Fetches the session to use for the current device. Allows overriding - /// in case subclasses want to create the session if it does not yet exist - virtual OperationalSessionSetup * GetDeviceSession(const ScopedNodeId & peerId); - DiscoveredNodeList GetDiscoveredNodes() override { return DiscoveredNodeList(mCommissionableNodes); } - -private: - void ReleaseOperationalDevice(OperationalSessionSetup * device); }; #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY @@ -660,9 +624,6 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, // ClusterStateCache::Callback impl void OnDone(app::ReadClient *) override; - // Commissioner will establish new device connections after PASE. - OperationalSessionSetup * GetDeviceSession(const ScopedNodeId & peerId) override; - // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. // NOTE: This is only valid assuming that `mOperationalCredentialsDelegate` is what is desired diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 21f9adcc1a753f..724c22b41a1706 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -681,15 +681,6 @@ JNI_METHOD(void, releaseOperationalDevicePointer)(JNIEnv * env, jobject self, jl } } -JNI_METHOD(void, disconnectDevice)(JNIEnv * env, jobject self, jlong handle, jlong deviceId) -{ - chip::DeviceLayer::StackLock lock; - AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); - - ChipLogProgress(Controller, "disconnectDevice() called with deviceId"); - wrapper->Controller()->ReleaseOperationalDevice(deviceId); -} - JNI_METHOD(void, shutdownSubscriptions)(JNIEnv * env, jobject self, jlong handle, jlong devicePtr) { chip::DeviceLayer::StackLock lock; @@ -787,20 +778,6 @@ JNI_METHOD(jlong, getCompressedFabricId)(JNIEnv * env, jobject self, jlong handl return wrapper->Controller()->GetCompressedFabricId(); } -JNI_METHOD(void, updateDevice)(JNIEnv * env, jobject self, jlong handle, jlong fabricId, jlong deviceId) -{ - chip::DeviceLayer::StackLock lock; - - AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); - - CHIP_ERROR err = wrapper->Controller()->UpdateDevice(static_cast(deviceId)); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Failed to update device"); - JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); - } -} - JNI_METHOD(void, discoverCommissionableNodes)(JNIEnv * env, jobject self, jlong handle) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index a57e772ba7234c..dbc0c54d53ab18 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -262,10 +262,6 @@ public void releaseConnectedDevicePointer(long devicePtr) { releaseOperationalDevicePointer(devicePtr); } - public boolean disconnectDevice(long deviceId) { - return disconnectDevice(deviceControllerPtr, deviceId); - } - public void onConnectDeviceComplete() { completionListener.onConnectDeviceComplete(); } @@ -636,8 +632,6 @@ private native void getConnectedDevicePointer( private native void releaseOperationalDevicePointer(long devicePtr); - private native boolean disconnectDevice(long deviceControllerPtr, long deviceId); - private native void deleteDeviceController(long deviceControllerPtr); private native String getIpAddress(long deviceControllerPtr, long deviceId); diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 194004e0dc93fb..7a4189a52680d2 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -378,8 +378,6 @@ ChipError::StorageType pychip_DeviceController_ConnectIP(chip::Controller::Devic addr.SetTransportType(chip::Transport::Type::kUdp).SetIPAddress(peerAddr); params.SetPeerAddress(addr).SetDiscriminator(0); - devCtrl->ReleaseOperationalDevice(nodeid); - return devCtrl->PairDevice(nodeid, params, sCommissioningParameters).AsInteger(); } @@ -455,28 +453,19 @@ ChipError::StorageType pychip_DeviceController_SetWiFiCredentials(const char * s ChipError::StorageType pychip_DeviceController_CloseSession(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid) { -#if 0 // // Since we permit multiple controllers per fabric and each is associated with a unique fabric index, closing a session // requires us to do so across all controllers on the same logical fabric. // - // TODO: Enable this and remove the call below to DisconnectDevice once #19259 is completed. This is because - // OperationalDeviceProxy instances that are currently active will remain un-affected by this call and still - // provide a valid SessionHandle in the OnDeviceConnected call later when we call DeviceController::GetConnectedDevice. - // However, it provides a SessionHandle that is incapable of actually vending exchanges since it is in a defunct state. - // - // For now, calling DisconnectDevice will at least just correctly de-activate a currently active OperationalDeviceProxy - // instance and ensure that subsequent attempts to acquire one will correctly re-establish CASE on the fabric associated - // with the provided devCtrl. - // - auto err = devCtrl->SessionMgr()->ForEachCollidingSession(ScopedNodeId(nodeid, devCtrl->GetFabricIndex()), [](auto *session) { - session->MarkAsDefunct(); - }); + devCtrl->SessionMgr()->ForEachMatchingSessionOnLogicalFabric(ScopedNodeId(nodeid, devCtrl->GetFabricIndex()), + [](auto * session) { + if (session->IsActiveSession()) + { + session->MarkAsDefunct(); + } + }); - ReturnErrorOnFailure(err.AsInteger()); -#else - return devCtrl->DisconnectDevice(nodeid).AsInteger(); -#endif + return CHIP_NO_ERROR.AsInteger(); } ChipError::StorageType pychip_DeviceController_EstablishPASESessionIP(chip::Controller::DeviceCommissioner * devCtrl, @@ -724,7 +713,6 @@ ChipError::StorageType pychip_GetDeviceBeingCommissioned(chip::Controller::Devic ChipError::StorageType pychip_ExpireSessions(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId) { VerifyOrReturnError((devCtrl != nullptr) && (devCtrl->SessionMgr() != nullptr), CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - (void) devCtrl->ReleaseOperationalDevice(nodeId); // // Since we permit multiple controllers on the same fabric each associated with a different fabric index, expiring a session diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 112fd18fbf1407..425be4e5a1ac26 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -805,8 +805,11 @@ - (void)invalidateCASESessionForNode:(chip::NodeId)nodeID; return; } - // TODO: This is a hack and needs to go away or use some sane API. - self->_cppCommissioner->DisconnectDevice(nodeID); + auto sessionMgr = self->_cppCommissioner->SessionMgr(); + VerifyOrDie(sessionMgr != nullptr); + + sessionMgr->MarkSessionsAsDefunct( + self->_cppCommissioner->GetPeerScopedId(nodeID), chip::MakeOptional(chip::Transport::SecureSession::Type::kCASE)); }); } @end diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index e388f13ea23e9c..a0ad834b033027 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -445,20 +445,16 @@ void SessionManager::ExpireAllPASESessions() }); } -bool SessionManager::MarkSessionsAsDefunct(const ScopedNodeId & node, const Optional & type) +void SessionManager::MarkSessionsAsDefunct(const ScopedNodeId & node, const Optional & type) { - bool found = false; - mSecureSessions.ForEachSession([&node, &type, &found](auto session) { + mSecureSessions.ForEachSession([&node, &type](auto session) { if (session->IsActiveSession() && session->GetPeer() == node && (!type.HasValue() || type.Value() == session->GetSecureSessionType())) { session->MarkAsDefunct(); - found = true; } return Loop::Continue; }); - - return found; } void SessionManager::UpdateAllSessionsPeerAddress(const ScopedNodeId & node, const Transport::PeerAddress & addr) diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index c40a8af4dd47f5..4337c84ee49408 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -357,10 +357,8 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate, public FabricTabl * @param type Type of session we are looking to mark as defunct. If matching * against all types of sessions is desired, NullOptional should * be passed into type. - * @return True, if at least one session was marked as defunct, otherwise - * return is False. */ - bool MarkSessionsAsDefunct(const ScopedNodeId & node, const Optional & type); + void MarkSessionsAsDefunct(const ScopedNodeId & node, const Optional & type); /** * @brief From 8d8b636bb0739d046ec11a85e96d00c4dfdab659 Mon Sep 17 00:00:00 2001 From: abiradarti <104591549+abiradarti@users.noreply.github.com> Date: Mon, 15 Aug 2022 18:26:55 -0500 Subject: [PATCH 006/115] [TI]Use ip-acquired indication to trigger dns server (#21891) * use ip-acquired indication to trigger dns server * Restyled by clang-format Co-authored-by: Restyled.io --- examples/lock-app/cc32xx/main/AppTask.cpp | 5 -- src/platform/cc32xx/CC32XXConfig.cpp | 17 ++++--- .../cc32xx/ConnectivityManagerImpl.cpp | 48 ++++++++++++------- src/platform/cc32xx/ConnectivityManagerImpl.h | 10 ++-- src/platform/cc32xx/InetPlatformConfig.h | 2 +- third_party/ti_simplelink_sdk/repo_cc32xx | 2 +- 6 files changed, 51 insertions(+), 33 deletions(-) diff --git a/examples/lock-app/cc32xx/main/AppTask.cpp b/examples/lock-app/cc32xx/main/AppTask.cpp index 18196a25b751aa..40390e66fc2c94 100644 --- a/examples/lock-app/cc32xx/main/AppTask.cpp +++ b/examples/lock-app/cc32xx/main/AppTask.cpp @@ -48,8 +48,6 @@ extern int WiFi_init(); extern void DisplayBanner(); } -/* Application Version and Naming*/ - #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 4 #define APP_EVENT_QUEUE_SIZE 10 @@ -172,9 +170,6 @@ int AppTask::Init() PLAT_LOG("Print Onboarding Codes"); PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kOnNetwork)); - PLAT_LOG("Start DNS Server"); - chip::app::DnssdServer::Instance().StartServer(); - return 0; } diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index 173b2864e3c2c0..c5d2370997a054 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -342,7 +342,7 @@ CHIP_ERROR CC32XXConfig::ReadConfigValue(Key key, bool & val) CHIP_ERROR ret; size_t ignore; uint8_t localVal; - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] %s", __FUNCTION__, key.key); ret = ReadConfigValueBin(key, &localVal, sizeof(localVal), ignore); @@ -371,7 +371,7 @@ CHIP_ERROR CC32XXConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, CHIP_ERROR CC32XXConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) { - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] %s", __FUNCTION__, key.key); CC32XXKVSEntry * pEntry = pList->GetEntryByKey(key.key); @@ -411,6 +411,7 @@ CHIP_ERROR CC32XXConfig::WriteConfigValueStr(Key key, const char * str, size_t s CHIP_ERROR CC32XXConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) { cc32xxLog("[%s]", __FUNCTION__); + CHIP_ERROR err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; err = pList->AddEntryByKey(key.key, data, (uint16_t) dataLen); return err; @@ -418,7 +419,8 @@ CHIP_ERROR CC32XXConfig::WriteConfigValueBin(Key key, const uint8_t * data, size CHIP_ERROR CC32XXConfig::ClearConfigValue(Key key) { - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] %s", __FUNCTION__, key.key); + CHIP_ERROR err = CHIP_NO_ERROR; pList->DeleteEntryByKey(key.key); return err; @@ -426,7 +428,8 @@ CHIP_ERROR CC32XXConfig::ClearConfigValue(Key key) bool CC32XXConfig::ConfigValueExists(Key key) { - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] %s", __FUNCTION__, key.key); + bool ret = false; CC32XXKVSEntry * pEntry = pList->GetEntryByKey(key.key); if (pEntry) @@ -436,7 +439,8 @@ bool CC32XXConfig::ConfigValueExists(Key key) CHIP_ERROR CC32XXConfig::FactoryResetConfig() { - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] ", __FUNCTION__); + while (1) ; CHIP_ERROR err = CHIP_NO_ERROR; @@ -445,7 +449,8 @@ CHIP_ERROR CC32XXConfig::FactoryResetConfig() void CC32XXConfig::RunConfigUnitTest() { - cc32xxLog("[%s]", __FUNCTION__); + cc32xxLog("[%s] ", __FUNCTION__); + // Run common unit test. ::chip::DeviceLayer::Internal::RunConfigUnitTest(); } diff --git a/src/platform/cc32xx/ConnectivityManagerImpl.cpp b/src/platform/cc32xx/ConnectivityManagerImpl.cpp index 3571bca266f70c..f9e5dc12e2ffd1 100644 --- a/src/platform/cc32xx/ConnectivityManagerImpl.cpp +++ b/src/platform/cc32xx/ConnectivityManagerImpl.cpp @@ -37,6 +37,7 @@ #include +#include #include #include #include @@ -46,10 +47,8 @@ extern "C" { #include - #define SLNETCONN_TIMEOUT 0xffff // "infinite" Timeout -extern int LWIP_IF_start(); extern void SlNetConnEventHandler(uint32_t ifID, SlNetConnStatus_e netStatus, void * data); } @@ -67,6 +66,7 @@ using namespace ::chip::System; using namespace ::chip::TLV; extern "C" void cc32xxLog(const char * aFormat, ...); +static struct netif * m_pNetIf = NULL; namespace chip { namespace DeviceLayer { @@ -141,22 +141,26 @@ CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWifiStatsCounters(void) CHIP_ERROR ConnectivityManagerImpl::_Init() { - - cc32xxLog("ConnectivityManagerImpl::_Init()\n\r"); - int rc; - cc32xxLog("Start Wi-Fi\r\n"); - /* Try to connect to AP and go through provisioning (if needed) */ - rc = SlNetConn_start(SLNETCONN_SERVICE_LVL_MAC, SlNetConnEventHandler, SLNETCONN_TIMEOUT, 0); - assert(rc == 0); - - cc32xxLog("Start LWIP IF\n\r"); - rc = LWIP_IF_start(); - if (rc != 0) + cc32xxLog("Start LWIP"); + rc = LWIP_IF_init(_OnLwipEvent, false); + if (rc == 0) { - cc32xxLog("LWIP IF not started, error = ", rc); + m_pNetIf = LWIP_IF_addInterface(); } + if (m_pNetIf == NULL) + { + cc32xxLog("LWIP IF not started, error = %d", rc); + } + else + { + cc32xxLog("Start Wi-Fi"); + /* Try to connect to AP and go through provisioning (if needed) */ + rc = SlNetConn_start(SLNETCONN_SERVICE_LVL_MAC, SlNetConnEventHandler, SLNETCONN_TIMEOUT, 0); + assert(rc == 0); + LWIP_IF_setLinkUp(m_pNetIf); + } return CHIP_NO_ERROR; } @@ -189,10 +193,22 @@ void ConnectivityManagerImpl::_OnWiFiStationProvisionChange() } // ==================== ConnectivityManager Private Methods ==================== +void ConnectivityManagerImpl::_OnLwipEvent(struct netif * pNetIf, NetIfStatus_e status, void * pParams) +{ + switch (status) + { + case E_NETIF_STATUS_IP_ACQUIRED: + PlatformMgr().ScheduleWork(_OnIpAcquired); + break; + default: + break; + } +} -void ConnectivityManagerImpl::DriveStationState() +void ConnectivityManagerImpl::_OnIpAcquired(intptr_t arg) { - cc32xxLog("ConnectivityManagerImpl::DriveStationState()\n\r"); + cc32xxLog("ConnectivityManagerImpl::OnIpAcquired() : Start DNS Server"); + chip::app::DnssdServer::Instance().StartServer(); } void ConnectivityManagerImpl::OnStationConnected() diff --git a/src/platform/cc32xx/ConnectivityManagerImpl.h b/src/platform/cc32xx/ConnectivityManagerImpl.h index bad7e4893c01f9..36b64bb6e73bc1 100644 --- a/src/platform/cc32xx/ConnectivityManagerImpl.h +++ b/src/platform/cc32xx/ConnectivityManagerImpl.h @@ -39,6 +39,10 @@ #endif #include +extern "C" { +#include "lwip_if.h" +} + namespace chip { namespace Inet { @@ -122,16 +126,14 @@ class ConnectivityManagerImpl final : public ConnectivityManager, uint32_t mWiFiAPIdleTimeoutMS; uint16_t mFlags; - void DriveStationState(void); void OnStationConnected(void); void OnStationDisconnected(void); void ChangeWiFiStationState(WiFiStationState newState); - // static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError); - void DriveAPState(void); + static void _OnLwipEvent(struct netif * pNetIf, NetIfStatus_e status, void * pParams); + static void _OnIpAcquired(intptr_t arg); CHIP_ERROR ConfigureWiFiAP(void); void ChangeWiFiAPState(WiFiAPState newState); - // static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError); void UpdateInternetConnectivityState(void); void OnStationIPv4AddressAvailable(); diff --git a/src/platform/cc32xx/InetPlatformConfig.h b/src/platform/cc32xx/InetPlatformConfig.h index c40a4031de6033..7bb1cb784b266f 100644 --- a/src/platform/cc32xx/InetPlatformConfig.h +++ b/src/platform/cc32xx/InetPlatformConfig.h @@ -45,7 +45,7 @@ #endif // INET_CONFIG_NUM_TCP_ENDPOINTS #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_NUM_UDP_ENDPOINTS 4 +#define INET_CONFIG_NUM_UDP_ENDPOINTS 8 #endif // INET_CONFIG_NUM_UDP_ENDPOINTS #endif // INET_PLATFORM_CONFIG_H diff --git a/third_party/ti_simplelink_sdk/repo_cc32xx b/third_party/ti_simplelink_sdk/repo_cc32xx index e5fbefba9c3c3a..13532baa294744 160000 --- a/third_party/ti_simplelink_sdk/repo_cc32xx +++ b/third_party/ti_simplelink_sdk/repo_cc32xx @@ -1 +1 @@ -Subproject commit e5fbefba9c3c3afa9c2c967b713c77e282d560fe +Subproject commit 13532baa2947440ced2f2abefd6a57b478f5100d From 38f3ebc00d23aa272a3ea16020fd7a768973afc4 Mon Sep 17 00:00:00 2001 From: Daniel Nicoara Date: Mon, 15 Aug 2022 19:27:51 -0400 Subject: [PATCH 007/115] Fix build warning on Android in CHIPCryptoPALOpenSSL.cpp (#21893) * Fix build warning on Android in CHIPCryptoPALOpenSSL.cpp X509_VERIFY_PARAM_set_time takes in time_t as the unix epoch parameter. On Android this is defined as a 'long', so need to cast the value to suppress the warning. src/crypto/CHIPCryptoPALOpenSSL.cpp:1672:43: error: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'time_t' (aka 'long') [-Werror,-Wsign-conversion] X509_VERIFY_PARAM_set_time(param, unixEpoch); * Update src/crypto/CHIPCryptoPALOpenSSL.cpp Co-authored-by: Evgeny Margolis Co-authored-by: Evgeny Margolis --- src/crypto/CHIPCryptoPALOpenSSL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index e7a84c76ba90bd..761294d0cc84ee 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -1669,7 +1669,9 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root VerifyOrExit(asn1Time.ExportTo_UnixTime(unixEpoch), (result = CertificateChainValidationResult::kLeafFormatInvalid, err = CHIP_ERROR_INTERNAL)); - X509_VERIFY_PARAM_set_time(param, unixEpoch); + VerifyOrExit(CanCastTo(unixEpoch), + (result = CertificateChainValidationResult::kLeafFormatInvalid, err = CHIP_ERROR_INTERNAL)); + X509_VERIFY_PARAM_set_time(param, static_cast(unixEpoch)); } status = X509_verify_cert(verifyCtx); From 6322b8dff3290e20dfe8cc02ca272b135723fda3 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 15 Aug 2022 19:36:01 -0400 Subject: [PATCH 008/115] Fix a dependency cycle in DefaultStorageKeyAllocator.h (#21794) * Fix a dependency cycle in DefaultStorageKeyAllocator.h When using SDK with a build system that disallows build graph dependencies and enforces explicit dependencies being always included, the DefaultStorageKeyAllocator's dependency on IM-layer headers and absence from BUILD.gn mean that a cycle that could have been detected by GN is not detected in Matter SDK, but detected by the build. This PR: - Adds DefaultStorageKeyAllocator.h to the correct dependency graph - Removes a cycle from `app/ConcreteAttributePath.h` - Fixes-up DefaultStorageKeyAllocator to work after the cycle is broken Testing done: - Cert tests pass - Unit tests pass * Restyle --- src/app/DefaultAttributePersistenceProvider.cpp | 6 ++++-- src/lib/support/BUILD.gn | 1 + src/lib/support/DefaultStorageKeyAllocator.h | 10 ++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/DefaultAttributePersistenceProvider.cpp b/src/app/DefaultAttributePersistenceProvider.cpp index 9b7c3a4538912b..502b28e914d638 100644 --- a/src/app/DefaultAttributePersistenceProvider.cpp +++ b/src/app/DefaultAttributePersistenceProvider.cpp @@ -35,7 +35,8 @@ CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttribu { return CHIP_ERROR_BUFFER_TOO_SMALL; } - return mStorage->SyncSetKeyValue(key.AttributeValue(aPath), aValue.data(), static_cast(aValue.size())); + return mStorage->SyncSetKeyValue(key.AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), aValue.data(), + static_cast(aValue.size())); } CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, @@ -45,7 +46,8 @@ CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttribut DefaultStorageKeyAllocator key; uint16_t size = static_cast(min(aValue.size(), static_cast(UINT16_MAX))); - ReturnErrorOnFailure(mStorage->SyncGetKeyValue(key.AttributeValue(aPath), aValue.data(), size)); + ReturnErrorOnFailure(mStorage->SyncGetKeyValue(key.AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), + aValue.data(), size)); EmberAfAttributeType type = aMetadata->attributeType; if (emberAfIsStringAttributeType(type)) { diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index d5e18e69f702f0..38903219b75ab1 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -100,6 +100,7 @@ static_library("support") { "CHIPPlatformMemory.h", "CodeUtils.h", "DLLUtil.h", + "DefaultStorageKeyAllocator.h", "Defer.h", "ErrorStr.cpp", "ErrorStr.h", diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 94b315b7e37c58..920e834bfdcd36 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -16,12 +16,14 @@ */ #pragma once -#include -#include #include +#include #include #include #include +#include +#include +#include #include namespace chip { @@ -93,11 +95,11 @@ class DefaultStorageKeyAllocator } const char * FabricKeyset(chip::FabricIndex fabric, uint16_t keyset) { return Format("f/%x/k/%x", fabric, keyset); } - const char * AttributeValue(const app::ConcreteAttributePath & aPath) + const char * AttributeValue(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId) { // Needs at most 26 chars: 6 for "g/a///", 4 for the endpoint id, 8 each // for the cluster and attribute ids. - return Format("g/a/%x/%" PRIx32 "/%" PRIx32, aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); + return Format("g/a/%x/%" PRIx32 "/%" PRIx32, endpointId, clusterId, attributeId); } // TODO: Should store fabric-specific parts of the binding list under keys From 0b7433d0a4d313da08573d1275e7f63e3a312d06 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 15 Aug 2022 20:06:47 -0400 Subject: [PATCH 009/115] Move TC_DA_1_7.py that was merged in wrong location (#21813) - Due to switching between several environments, PR #21175 had TC_DA_1_7.py in the root of the project rather than `src/python_testing` like other tests. This PR moves the file to its correct location. All prior testing was done with the root location (I checked my command history), so it is the correct code/test, but committed in the wrong place. --- TC_DA_1_7.py => src/python_testing/TC_DA_1_7.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename TC_DA_1_7.py => src/python_testing/TC_DA_1_7.py (100%) diff --git a/TC_DA_1_7.py b/src/python_testing/TC_DA_1_7.py similarity index 100% rename from TC_DA_1_7.py rename to src/python_testing/TC_DA_1_7.py From 79f7809a8a64ef2de8d2619b3cba086e352b2bc3 Mon Sep 17 00:00:00 2001 From: Daniel Nicoara Date: Mon, 15 Aug 2022 21:24:17 -0400 Subject: [PATCH 010/115] Update headers to compile in isolation (#21861) * Include headers defining int types, * Forward declare OperationalSessionSetupPoolDelegate since there's a dependency loop with OperationalSessionSetup.h and OperationalSessionSetupPool.h --- src/app/CASESessionManager.h | 2 ++ src/app/ObjectList.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index c8c252ee815749..ddc971a1e7de86 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -32,6 +32,8 @@ namespace chip { +class OperationalSessionSetupPoolDelegate; + struct CASESessionManagerConfig { DeviceProxyInitParams sessionInitParams; diff --git a/src/app/ObjectList.h b/src/app/ObjectList.h index d35323b6d2caff..416db0bb70a6b5 100644 --- a/src/app/ObjectList.h +++ b/src/app/ObjectList.h @@ -18,6 +18,9 @@ #pragma once +#include +#include + namespace chip { namespace app { From 815902c8d5d3773d179b6b80d345db085f5d7dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Tue, 16 Aug 2022 03:43:51 +0200 Subject: [PATCH 011/115] [nrfconnect] Improve SoftwareUpdateCompleted boot reason detection (#21851) The existing code relies on a specific bootloader mode to detect that the last reboot was due to software update. This method will not work correctly if a user chooses a different bootloader mode, or clears the "tentative" flag in the current firmware image before the diagnostic data provider is initialized. Store the software reboot reason explicitly in one of the retention registers on nRF SOCs. Signed-off-by: Damian Krolik Signed-off-by: Damian Krolik --- .../Zephyr/DiagnosticDataProviderImpl.cpp | 11 ++- src/platform/nrfconnect/BUILD.gn | 2 + .../nrfconnect/OTAImageProcessorImpl.cpp | 5 +- src/platform/nrfconnect/Reboot.cpp | 85 +++++++++++++++++++ src/platform/nrfconnect/Reboot.h | 35 ++++++++ 5 files changed, 134 insertions(+), 4 deletions(-) create mode 100644 src/platform/nrfconnect/Reboot.cpp create mode 100644 src/platform/nrfconnect/Reboot.h diff --git a/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp b/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp index 6aebf3d2c8a583..6fac30482f6251 100644 --- a/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp @@ -31,7 +31,9 @@ #include #include -#ifdef CONFIG_MCUBOOT_IMG_MANAGER +#if CHIP_DEVICE_LAYER_TARGET_NRFCONNECT +#include +#elif defined(CONFIG_MCUBOOT_IMG_MANAGER) #include #endif @@ -88,7 +90,12 @@ BootReasonType DetermineBootReason() if (reason & RESET_SOFTWARE) { -#ifdef CONFIG_MCUBOOT_IMG_MANAGER +#if CHIP_DEVICE_LAYER_TARGET_NRFCONNECT + if (GetSoftwareRebootReason() == SoftwareRebootReason::kSoftwareUpdate) + { + return BootReasonType::kSoftwareUpdateCompleted; + } +#elif defined(CONFIG_MCUBOOT_IMG_MANAGER) if (mcuboot_swap_type() == BOOT_SWAP_TYPE_REVERT) { return BootReasonType::kSoftwareUpdateCompleted; diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 928c3c045b4725..3af24f2a72d0b5 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -46,6 +46,8 @@ static_library("nrfconnect") { "InetPlatformConfig.h", "KeyValueStoreManagerImpl.h", "PlatformManagerImpl.h", + "Reboot.cpp", + "Reboot.h", "SystemPlatformConfig.h", ] diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index b558906258e994..bb8f846d8d900c 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -17,6 +17,8 @@ #include "OTAImageProcessorImpl.h" +#include "Reboot.h" + #include #include #include @@ -35,7 +37,6 @@ #include #include #include -#include #if CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE // Cd globals are needed to be accessed from dfu image writer lambdas @@ -123,7 +124,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() [](System::Layer *, void * /* context */) { PlatformMgr().HandleServerShuttingDown(); k_msleep(CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS); - sys_reboot(SYS_REBOOT_WARM); + Reboot(SoftwareRebootReason::kSoftwareUpdate); }, nullptr /* context */); } diff --git a/src/platform/nrfconnect/Reboot.cpp b/src/platform/nrfconnect/Reboot.cpp new file mode 100644 index 00000000000000..5b1b6abdde68ad --- /dev/null +++ b/src/platform/nrfconnect/Reboot.cpp @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2022 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 "Reboot.h" + +#include + +#include + +#ifndef CONFIG_ARCH_POSIX +#include +#endif + +namespace chip { +namespace DeviceLayer { + +#ifdef CONFIG_ARCH_POSIX + +void Reboot(SoftwareRebootReason reason) +{ + sys_reboot(SYS_REBOOT_WARM); +} + +SoftwareRebootReason GetSoftwareRebootReason() +{ + return SoftwareRebootReason::kOther; +} + +#else + +using RetainedReason = decltype(nrf_power_gpregret_get(NRF_POWER)); + +constexpr RetainedReason EncodeReason(SoftwareRebootReason reason) +{ + // Set MSB to avoid collission with Zephyr's pre-defined reboot reasons. + constexpr RetainedReason kCustomReasonFlag = 0x80; + + return static_cast(reason) | kCustomReasonFlag; +} + +void Reboot(SoftwareRebootReason reason) +{ + const RetainedReason retainedReason = EncodeReason(reason); + + // The parameter passed to sys_reboot() is retained in GPREGRET (general-purpose + // retention register) on nRF52 SOC family, but nRF53 ignores the parameter, so + // set it manually. + +#ifdef CONFIG_SOC_SERIES_NRF53X + nrf_power_gpregret_set(NRF_POWER, retainedReason); +#endif + + sys_reboot(retainedReason); +} + +SoftwareRebootReason GetSoftwareRebootReason() +{ + switch (nrf_power_gpregret_get(NRF_POWER)) + { + case EncodeReason(SoftwareRebootReason::kSoftwareUpdate): + nrf_power_gpregret_set(NRF_POWER, 0); + return SoftwareRebootReason::kSoftwareUpdate; + default: + return SoftwareRebootReason::kOther; + } +} + +#endif + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nrfconnect/Reboot.h b/src/platform/nrfconnect/Reboot.h new file mode 100644 index 00000000000000..09f5493ebf17ad --- /dev/null +++ b/src/platform/nrfconnect/Reboot.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2022 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. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { + +enum class SoftwareRebootReason : uint8_t +{ + kSoftwareUpdate, + kOther +}; + +[[noreturn]] void Reboot(SoftwareRebootReason reason); +SoftwareRebootReason GetSoftwareRebootReason(); + +} // namespace DeviceLayer +} // namespace chip From b0b495042bb3bccdb38f82d34dd5075c12610d8d Mon Sep 17 00:00:00 2001 From: Stefan Bauer-Schwan <62264998+bauerschwan@users.noreply.github.com> Date: Tue, 16 Aug 2022 04:16:00 +0200 Subject: [PATCH 012/115] [TC-OO-2.3] increase timout to 400 seconds (#21889) fixes https://github.com/CHIP-Specifications/chip-test-scripts/issues/370 --- src/app/tests/suites/certification/Test_TC_OO_2_3.yaml | 2 +- zzz_generated/chip-tool/zap-generated/test/Commands.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml index 145674f0ebe439..e5366185f25621 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_3.yaml @@ -21,7 +21,7 @@ PICS: config: nodeId: 0x12344321 cluster: "On/Off" - timeout: 350 + timeout: 400 endpoint: 1 tests: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 89cc6b855400ae..e07ed62db04c83 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -93758,7 +93758,7 @@ class Test_TC_OO_2_3Suite : public TestCommand ~Test_TC_OO_2_3Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(350)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } private: chip::Optional mNodeId; From 1d585a17e7be8c1e5407b282941e762f74fb92b6 Mon Sep 17 00:00:00 2001 From: Praveen Chandran Date: Mon, 15 Aug 2022 19:27:06 -0700 Subject: [PATCH 013/115] [Infineon] Support Factory reset for all-clusters example apps (#21877) --- .../all-clusters-app/p6/include/AppConfig.h | 5 +- .../all-clusters-app/p6/include/AppTask.h | 14 +++ .../p6/include/ButtonHandler.h | 1 + examples/all-clusters-app/p6/src/AppTask.cpp | 113 +++++++++++++++++- .../all-clusters-app/p6/src/ButtonHandler.cpp | 52 ++++++-- .../p6/include/AppConfig.h | 5 +- .../p6/include/AppTask.h | 14 +++ .../p6/include/ButtonHandler.h | 1 + .../p6/src/AppTask.cpp | 113 +++++++++++++++++- .../p6/src/ButtonHandler.cpp | 52 ++++++-- examples/lighting-app/p6/include/AppConfig.h | 2 +- examples/lighting-app/p6/include/AppTask.h | 7 +- examples/lighting-app/p6/src/AppTask.cpp | 59 +++------ .../lighting-app/p6/src/ButtonHandler.cpp | 7 +- examples/lock-app/p6/include/AppConfig.h | 2 +- examples/lock-app/p6/include/AppTask.h | 7 +- examples/lock-app/p6/src/AppTask.cpp | 85 +++++++------ examples/lock-app/p6/src/ButtonHandler.cpp | 6 +- 18 files changed, 412 insertions(+), 133 deletions(-) diff --git a/examples/all-clusters-app/p6/include/AppConfig.h b/examples/all-clusters-app/p6/include/AppConfig.h index 8e9ebe286ef421..bffd31f0d8a23b 100644 --- a/examples/all-clusters-app/p6/include/AppConfig.h +++ b/examples/all-clusters-app/p6/include/AppConfig.h @@ -28,8 +28,11 @@ #define APP_TASK_NAME "APP" #define APP_LIGHT_BUTTON_IDX 0 +#define APP_FUNCTION_BUTTON_IDX 1 + #define APP_LIGHT_BUTTON CYBSP_USER_BTN1 -#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50 +#define APP_FUNCTION_BUTTON CYBSP_USER_BTN2 +#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200 #define APP_BUTTON_PRESSED 0 #define APP_BUTTON_RELEASED 1 diff --git a/examples/all-clusters-app/p6/include/AppTask.h b/examples/all-clusters-app/p6/include/AppTask.h index 499de504d53ee6..9fade8c82356bf 100644 --- a/examples/all-clusters-app/p6/include/AppTask.h +++ b/examples/all-clusters-app/p6/include/AppTask.h @@ -54,8 +54,22 @@ class AppTask CHIP_ERROR Init(); static AppTask sAppTask; + void CancelTimer(void); void DispatchEvent(AppEvent * event); + static void FunctionTimerEventHandler(AppEvent * event); + static void FunctionHandler(AppEvent * event); + static void TimerEventHandler(TimerHandle_t timer); static void OnOffUpdateClusterState(intptr_t context); + void StartTimer(uint32_t aTimeoutMs); + + enum class Function + { + kNoneSelected = 0, + kFactoryReset = 1, + kInvalid + }; + Function mFunction = Function::kNoneSelected; + bool mFunctionTimerActive = false; }; inline AppTask & GetAppTask(void) diff --git a/examples/all-clusters-app/p6/include/ButtonHandler.h b/examples/all-clusters-app/p6/include/ButtonHandler.h index a4128c68f86f0e..ac4d795d64280e 100644 --- a/examples/all-clusters-app/p6/include/ButtonHandler.h +++ b/examples/all-clusters-app/p6/include/ButtonHandler.h @@ -36,5 +36,6 @@ class ButtonHandler private: static void GpioInit(void); static void light_button_callback(void * handler_arg, cyhal_gpio_event_t event); + static void func_button_callback(void * handler_arg, cyhal_gpio_event_t event); static void TimerCallback(TimerHandle_t xTimer); }; diff --git a/examples/all-clusters-app/p6/src/AppTask.cpp b/examples/all-clusters-app/p6/src/AppTask.cpp index 584b4cbed491d7..615660976db3ef 100644 --- a/examples/all-clusters-app/p6/src/AppTask.cpp +++ b/examples/all-clusters-app/p6/src/AppTask.cpp @@ -72,12 +72,14 @@ using namespace ::chip::System; #define APP_EVENT_QUEUE_SIZE 10 #define APP_TASK_STACK_SIZE (4096) #define APP_WAIT_LOOP 1000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 5000 LEDWidget sStatusLED; LEDWidget sLightLED; LEDWidget sClusterLED; namespace { +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; @@ -184,6 +186,18 @@ CHIP_ERROR AppTask::Init() // Initialise WSTK buttons PB0 and PB1 (including debounce). ButtonHandler::Init(); + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + TimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + P6_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } NetWorkCommissioningInstInit(); P6_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); @@ -234,7 +248,7 @@ void AppTask::LightActionEventHandler(AppEvent * event) void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) { - if (btnIdx != APP_LIGHT_BUTTON_IDX) + if (btnIdx != APP_LIGHT_BUTTON_IDX && btnIdx != APP_FUNCTION_BUTTON_IDX) { return; } @@ -244,11 +258,106 @@ void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) button_event.ButtonEvent.ButtonIdx = btnIdx; button_event.ButtonEvent.Action = btnAction; - if ((btnIdx == APP_LIGHT_BUTTON_IDX) && (btnAction == APP_BUTTON_RELEASED)) + if (btnIdx == APP_LIGHT_BUTTON_IDX) { button_event.Handler = LightActionEventHandler; sAppTask.PostEvent(&button_event); } + else if (btnIdx == APP_FUNCTION_BUTTON_IDX) + { + button_event.Handler = FunctionHandler; + sAppTask.PostEvent(&button_event); + } +} + +void AppTask::TimerEventHandler(TimerHandle_t timer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) timer; + event.Handler = FunctionTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FunctionTimerEventHandler(AppEvent * event) +{ + if (event->Type != AppEvent::kEventType_Timer) + { + return; + } + + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = Function::kNoneSelected; + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::FunctionHandler(AppEvent * event) +{ + if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) + { + P6_LOG("Factory Reset Triggered. Press button again within %us to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = Function::kFactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sLightLED.Set(false); + + sStatusLED.Blink(500); + sLightLED.Blink(500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + + sAppTask.CancelTimer(); + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = Function::kNoneSelected; + + P6_LOG("Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + P6_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + P6_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + P6_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; } void AppTask::PostEvent(const AppEvent * event) diff --git a/examples/all-clusters-app/p6/src/ButtonHandler.cpp b/examples/all-clusters-app/p6/src/ButtonHandler.cpp index b9765cbeec03b3..56c088b46ad83d 100644 --- a/examples/all-clusters-app/p6/src/ButtonHandler.cpp +++ b/examples/all-clusters-app/p6/src/ButtonHandler.cpp @@ -23,22 +23,28 @@ #include "AppTask.h" namespace { +constexpr int kButtonCount = 2; -TimerHandle_t buttonTimer; // FreeRTOS timers used for debouncing buttons +TimerHandle_t buttonTimers[kButtonCount]; // FreeRTOS timers used for debouncing +// buttons. Array to hold handles to +// the created timers. } // namespace void ButtonHandler::Init(void) { GpioInit(); - - buttonTimer = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel - APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period - false, // no timer reload (==one-shot) - (void *) (int) APP_LIGHT_BUTTON_IDX, // init timer id = button index - TimerCallback // timer callback handler (all buttons use - // the same timer cn function) - ); + // Create FreeRTOS sw timers for debouncing buttons. + for (uint8_t i = 0; i < kButtonCount; i++) + { + buttonTimers[i] = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel + APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period + false, // no timer reload (==one-shot) + (void *) (int) i, // init timer id = button index + TimerCallback // timer callback handler (all buttons use + // the same timer cn function) + ); + } } void ButtonHandler::GpioInit(void) @@ -50,19 +56,34 @@ void ButtonHandler::GpioInit(void) { printf(" cyhal_gpio_init failed for APP_LIGHT_BUTTON\r\n"); } - + result = cyhal_gpio_init(APP_FUNCTION_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); + if (result != CY_RSLT_SUCCESS) + { + printf(" cyhal_gpio_init failed for APP_FUNCTION_BUTTON\r\n"); + } /* Configure GPIO interrupt. */ static cyhal_gpio_callback_data_t light_button_cbdata; + static cyhal_gpio_callback_data_t func_button_cbdata; light_button_cbdata.callback = light_button_callback; light_button_cbdata.callback_arg = NULL; cyhal_gpio_register_callback(APP_LIGHT_BUTTON, &light_button_cbdata); + func_button_cbdata.callback = func_button_callback; + func_button_cbdata.callback_arg = NULL; + cyhal_gpio_register_callback(APP_FUNCTION_BUTTON, &func_button_cbdata); cyhal_gpio_enable_event(APP_LIGHT_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); + cyhal_gpio_enable_event(APP_FUNCTION_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); } void ButtonHandler::light_button_callback(void * handler_arg, cyhal_gpio_event_t event) { portBASE_TYPE taskWoken = pdFALSE; - xTimerStartFromISR(buttonTimer, &taskWoken); + xTimerStartFromISR(buttonTimers[APP_LIGHT_BUTTON_IDX], &taskWoken); +} + +void ButtonHandler::func_button_callback(void * handler_arg, cyhal_gpio_event_t event) +{ + portBASE_TYPE taskWoken = pdFALSE; + xTimerStartFromISR(buttonTimers[APP_FUNCTION_BUTTON_IDX], &taskWoken); } void ButtonHandler::TimerCallback(TimerHandle_t xTimer) @@ -77,11 +98,16 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer) case APP_LIGHT_BUTTON_IDX: buttonevent = cyhal_gpio_read(APP_LIGHT_BUTTON); break; - + case APP_FUNCTION_BUTTON_IDX: + buttonevent = cyhal_gpio_read(APP_FUNCTION_BUTTON); + break; default: P6_LOG("Unhandled TimerID: %d", timerId); break; } - GetAppTask().ButtonEventHandler(timerId, (buttonevent) ? APP_BUTTON_PRESSED : APP_BUTTON_RELEASED); + if (buttonevent) + { + GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED); + } } diff --git a/examples/all-clusters-minimal-app/p6/include/AppConfig.h b/examples/all-clusters-minimal-app/p6/include/AppConfig.h index 8e9ebe286ef421..bffd31f0d8a23b 100644 --- a/examples/all-clusters-minimal-app/p6/include/AppConfig.h +++ b/examples/all-clusters-minimal-app/p6/include/AppConfig.h @@ -28,8 +28,11 @@ #define APP_TASK_NAME "APP" #define APP_LIGHT_BUTTON_IDX 0 +#define APP_FUNCTION_BUTTON_IDX 1 + #define APP_LIGHT_BUTTON CYBSP_USER_BTN1 -#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50 +#define APP_FUNCTION_BUTTON CYBSP_USER_BTN2 +#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200 #define APP_BUTTON_PRESSED 0 #define APP_BUTTON_RELEASED 1 diff --git a/examples/all-clusters-minimal-app/p6/include/AppTask.h b/examples/all-clusters-minimal-app/p6/include/AppTask.h index 5bb9a9163225bf..6dbd906b8104d6 100644 --- a/examples/all-clusters-minimal-app/p6/include/AppTask.h +++ b/examples/all-clusters-minimal-app/p6/include/AppTask.h @@ -54,8 +54,22 @@ class AppTask CHIP_ERROR Init(); static AppTask sAppTask; + void CancelTimer(void); void DispatchEvent(AppEvent * event); + static void FunctionTimerEventHandler(AppEvent * event); + static void FunctionHandler(AppEvent * event); + static void TimerEventHandler(TimerHandle_t timer); static void OnOffUpdateClusterState(intptr_t context); + void StartTimer(uint32_t aTimeoutMs); + + enum class Function + { + kNoneSelected = 0, + kFactoryReset = 1, + kInvalid + }; + Function mFunction = Function::kNoneSelected; + bool mFunctionTimerActive = false; }; inline AppTask & GetAppTask(void) diff --git a/examples/all-clusters-minimal-app/p6/include/ButtonHandler.h b/examples/all-clusters-minimal-app/p6/include/ButtonHandler.h index a4128c68f86f0e..ac4d795d64280e 100644 --- a/examples/all-clusters-minimal-app/p6/include/ButtonHandler.h +++ b/examples/all-clusters-minimal-app/p6/include/ButtonHandler.h @@ -36,5 +36,6 @@ class ButtonHandler private: static void GpioInit(void); static void light_button_callback(void * handler_arg, cyhal_gpio_event_t event); + static void func_button_callback(void * handler_arg, cyhal_gpio_event_t event); static void TimerCallback(TimerHandle_t xTimer); }; diff --git a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp b/examples/all-clusters-minimal-app/p6/src/AppTask.cpp index e9ce95ad12c304..45a3dfb8af90b7 100644 --- a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/p6/src/AppTask.cpp @@ -72,12 +72,14 @@ using namespace ::chip::System; #define APP_EVENT_QUEUE_SIZE 10 #define APP_TASK_STACK_SIZE (4096) #define APP_WAIT_LOOP 1000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 5000 LEDWidget sStatusLED; LEDWidget sLightLED; LEDWidget sClusterLED; namespace { +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; @@ -184,6 +186,18 @@ CHIP_ERROR AppTask::Init() // Initialise WSTK buttons PB0 and PB1 (including debounce). ButtonHandler::Init(); + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + TimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + P6_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } NetWorkCommissioningInstInit(); P6_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); @@ -234,7 +248,7 @@ void AppTask::LightActionEventHandler(AppEvent * aEvent) void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) { - if (btnIdx != APP_LIGHT_BUTTON_IDX) + if (btnIdx != APP_LIGHT_BUTTON_IDX && btnIdx != APP_FUNCTION_BUTTON_IDX) { return; } @@ -244,11 +258,106 @@ void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) button_event.ButtonEvent.ButtonIdx = btnIdx; button_event.ButtonEvent.Action = btnAction; - if ((btnIdx == APP_LIGHT_BUTTON_IDX) && (btnAction == APP_BUTTON_RELEASED)) + if (btnIdx == APP_LIGHT_BUTTON_IDX) { button_event.Handler = LightActionEventHandler; sAppTask.PostEvent(&button_event); } + else if (btnIdx == APP_FUNCTION_BUTTON_IDX) + { + button_event.Handler = FunctionHandler; + sAppTask.PostEvent(&button_event); + } +} + +void AppTask::TimerEventHandler(TimerHandle_t timer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) timer; + event.Handler = FunctionTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FunctionTimerEventHandler(AppEvent * event) +{ + if (event->Type != AppEvent::kEventType_Timer) + { + return; + } + + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = Function::kNoneSelected; + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::FunctionHandler(AppEvent * event) +{ + if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) + { + P6_LOG("Factory Reset Triggered. Press button again within %us to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = Function::kFactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sLightLED.Set(false); + + sStatusLED.Blink(500); + sLightLED.Blink(500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + + sAppTask.CancelTimer(); + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = Function::kNoneSelected; + + P6_LOG("Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + P6_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + P6_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + P6_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; } void AppTask::PostEvent(const AppEvent * aEvent) diff --git a/examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp b/examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp index b9765cbeec03b3..56c088b46ad83d 100644 --- a/examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp +++ b/examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp @@ -23,22 +23,28 @@ #include "AppTask.h" namespace { +constexpr int kButtonCount = 2; -TimerHandle_t buttonTimer; // FreeRTOS timers used for debouncing buttons +TimerHandle_t buttonTimers[kButtonCount]; // FreeRTOS timers used for debouncing +// buttons. Array to hold handles to +// the created timers. } // namespace void ButtonHandler::Init(void) { GpioInit(); - - buttonTimer = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel - APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period - false, // no timer reload (==one-shot) - (void *) (int) APP_LIGHT_BUTTON_IDX, // init timer id = button index - TimerCallback // timer callback handler (all buttons use - // the same timer cn function) - ); + // Create FreeRTOS sw timers for debouncing buttons. + for (uint8_t i = 0; i < kButtonCount; i++) + { + buttonTimers[i] = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel + APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period + false, // no timer reload (==one-shot) + (void *) (int) i, // init timer id = button index + TimerCallback // timer callback handler (all buttons use + // the same timer cn function) + ); + } } void ButtonHandler::GpioInit(void) @@ -50,19 +56,34 @@ void ButtonHandler::GpioInit(void) { printf(" cyhal_gpio_init failed for APP_LIGHT_BUTTON\r\n"); } - + result = cyhal_gpio_init(APP_FUNCTION_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); + if (result != CY_RSLT_SUCCESS) + { + printf(" cyhal_gpio_init failed for APP_FUNCTION_BUTTON\r\n"); + } /* Configure GPIO interrupt. */ static cyhal_gpio_callback_data_t light_button_cbdata; + static cyhal_gpio_callback_data_t func_button_cbdata; light_button_cbdata.callback = light_button_callback; light_button_cbdata.callback_arg = NULL; cyhal_gpio_register_callback(APP_LIGHT_BUTTON, &light_button_cbdata); + func_button_cbdata.callback = func_button_callback; + func_button_cbdata.callback_arg = NULL; + cyhal_gpio_register_callback(APP_FUNCTION_BUTTON, &func_button_cbdata); cyhal_gpio_enable_event(APP_LIGHT_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); + cyhal_gpio_enable_event(APP_FUNCTION_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); } void ButtonHandler::light_button_callback(void * handler_arg, cyhal_gpio_event_t event) { portBASE_TYPE taskWoken = pdFALSE; - xTimerStartFromISR(buttonTimer, &taskWoken); + xTimerStartFromISR(buttonTimers[APP_LIGHT_BUTTON_IDX], &taskWoken); +} + +void ButtonHandler::func_button_callback(void * handler_arg, cyhal_gpio_event_t event) +{ + portBASE_TYPE taskWoken = pdFALSE; + xTimerStartFromISR(buttonTimers[APP_FUNCTION_BUTTON_IDX], &taskWoken); } void ButtonHandler::TimerCallback(TimerHandle_t xTimer) @@ -77,11 +98,16 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer) case APP_LIGHT_BUTTON_IDX: buttonevent = cyhal_gpio_read(APP_LIGHT_BUTTON); break; - + case APP_FUNCTION_BUTTON_IDX: + buttonevent = cyhal_gpio_read(APP_FUNCTION_BUTTON); + break; default: P6_LOG("Unhandled TimerID: %d", timerId); break; } - GetAppTask().ButtonEventHandler(timerId, (buttonevent) ? APP_BUTTON_PRESSED : APP_BUTTON_RELEASED); + if (buttonevent) + { + GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED); + } } diff --git a/examples/lighting-app/p6/include/AppConfig.h b/examples/lighting-app/p6/include/AppConfig.h index 5ed6edd44bd594..b199aaf7a1b4d5 100644 --- a/examples/lighting-app/p6/include/AppConfig.h +++ b/examples/lighting-app/p6/include/AppConfig.h @@ -31,7 +31,7 @@ #define APP_LIGHT_BUTTON CYBSP_USER_BTN1 #define APP_FUNCTION_BUTTON CYBSP_USER_BTN2 -#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50 +#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200 #define APP_BUTTON_PRESSED 0 #define APP_BUTTON_RELEASED 1 diff --git a/examples/lighting-app/p6/include/AppTask.h b/examples/lighting-app/p6/include/AppTask.h index a3760122a17ce5..580744cb2fe2d2 100644 --- a/examples/lighting-app/p6/include/AppTask.h +++ b/examples/lighting-app/p6/include/AppTask.h @@ -74,11 +74,8 @@ class AppTask enum class Function { - kNoneSelected = 0, - kSoftwareUpdate = 0, - kStartBleAdv = 1, - kFactoryReset = 2, - + kNoneSelected = 0, + kFactoryReset = 1, kInvalid }; diff --git a/examples/lighting-app/p6/src/AppTask.cpp b/examples/lighting-app/p6/src/AppTask.cpp index c0b2833ad40086..08f9b76a1a3f8f 100644 --- a/examples/lighting-app/p6/src/AppTask.cpp +++ b/examples/lighting-app/p6/src/AppTask.cpp @@ -67,8 +67,7 @@ using namespace ::chip::DeviceLayer; using namespace ::chip::System; #endif -#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 -#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 5000 #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 @@ -367,27 +366,7 @@ void AppTask::FunctionTimerEventHandler(AppEvent * event) return; } - // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, - // initiate factory reset - if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) - { - P6_LOG("Factory Reset Triggered. Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); - - // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to - // cancel, if required. - sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); - - sAppTask.mFunction = Function::kFactoryReset; - - // Turn off all LEDs before starting blink to make sure blink is - // co-ordinated. - sStatusLED.Set(false); - sLightLED.Set(false); - - sStatusLED.Blink(500); - sLightLED.Blink(500); - } - else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) { // Actually trigger Factory Reset sAppTask.mFunction = Function::kNoneSelected; @@ -397,28 +376,24 @@ void AppTask::FunctionTimerEventHandler(AppEvent * event) void AppTask::FunctionHandler(AppEvent * event) { - // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< - // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the - // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + - // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after - // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. - // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs - // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (event->ButtonEvent.Action == APP_BUTTON_RELEASED) + if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { - sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); - sAppTask.mFunction = Function::kStartBleAdv; - } - } - else - { - // If the button was released before factory reset got initiated, start Thread Network - if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) - { - sAppTask.CancelTimer(); - sAppTask.mFunction = Function::kNoneSelected; + P6_LOG("Factory Reset Triggered. Press button again within %us to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = Function::kFactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sLightLED.Set(false); + + sStatusLED.Blink(500); + sLightLED.Blink(500); } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) { diff --git a/examples/lighting-app/p6/src/ButtonHandler.cpp b/examples/lighting-app/p6/src/ButtonHandler.cpp index 80384347fd24a6..e4a0d483d20c69 100644 --- a/examples/lighting-app/p6/src/ButtonHandler.cpp +++ b/examples/lighting-app/p6/src/ButtonHandler.cpp @@ -53,7 +53,7 @@ void ButtonHandler::GpioInit(void) result = cyhal_gpio_init(APP_LIGHT_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); if (result != CY_RSLT_SUCCESS) { - printf(" cyhal_gpio_init failed for APP_LOCK_BUTTON\r\n"); + printf(" cyhal_gpio_init failed for APP_LIGHT_BUTTON\r\n"); } result = cyhal_gpio_init(APP_FUNCTION_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); if (result != CY_RSLT_SUCCESS) @@ -98,5 +98,8 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer) { buttonevent = cyhal_gpio_read(APP_LIGHT_BUTTON); } - GetAppTask().ButtonEventHandler(timerId, (buttonevent) ? APP_BUTTON_PRESSED : APP_BUTTON_RELEASED); + if (buttonevent) + { + GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED); + } } diff --git a/examples/lock-app/p6/include/AppConfig.h b/examples/lock-app/p6/include/AppConfig.h index 1046f7821a6b9e..5e9c988a389a8f 100644 --- a/examples/lock-app/p6/include/AppConfig.h +++ b/examples/lock-app/p6/include/AppConfig.h @@ -31,7 +31,7 @@ #define APP_LOCK_BUTTON CYBSP_USER_BTN1 #define APP_FUNCTION_BUTTON CYBSP_USER_BTN2 -#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50 +#define APP_BUTTON_DEBOUNCE_PERIOD_MS 200 #define APP_BUTTON_PRESSED 0 #define APP_BUTTON_RELEASED 1 diff --git a/examples/lock-app/p6/include/AppTask.h b/examples/lock-app/p6/include/AppTask.h index 8974d83523baa9..f83ba6c1e42730 100644 --- a/examples/lock-app/p6/include/AppTask.h +++ b/examples/lock-app/p6/include/AppTask.h @@ -76,11 +76,8 @@ class AppTask enum class Function { - kNoneSelected = 0, - kSoftwareUpdate = 0, - kStartBleAdv = 1, - kFactoryReset = 2, - + kNoneSelected = 0, + kFactoryReset = 1, kInvalid }; diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/p6/src/AppTask.cpp index 866f43de610ae9..f93438d47cbbf5 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/p6/src/AppTask.cpp @@ -76,8 +76,7 @@ using namespace ::chip::System; #endif -#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 -#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 5000 #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 @@ -448,27 +447,7 @@ void AppTask::FunctionTimerEventHandler(AppEvent * event) return; } - // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, - // initiate factory reset - if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) - { - P6_LOG("Factory Reset Triggered. Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); - - // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to - // cancel, if required. - sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); - - sAppTask.mFunction = Function::kFactoryReset; - - // Turn off all LEDs before starting blink to make sure blink is - // co-ordinated. - sStatusLED.Set(false); - sLockLED.Set(false); - - sStatusLED.Blink(500); - sLockLED.Blink(500); - } - else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) { // Actually trigger Factory Reset sAppTask.mFunction = Function::kNoneSelected; @@ -482,28 +461,25 @@ void AppTask::FunctionHandler(AppEvent * event) { return; } - // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< - // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the - // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + - // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after - // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. - // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs - // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (event->ButtonEvent.Action == APP_BUTTON_RELEASED) + + if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { - sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); - sAppTask.mFunction = Function::kStartBleAdv; - } - } - else - { - // If the button was released before factory reset got initiated, start Thread Network - if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) - { - sAppTask.CancelTimer(); - sAppTask.mFunction = Function::kNoneSelected; + P6_LOG("Factory Reset Triggered. Press button again within %us to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = Function::kFactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sLockLED.Set(false); + + sStatusLED.Blink(500); + sLockLED.Blink(500); } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) { @@ -612,10 +588,31 @@ void AppTask::PostEvent(const AppEvent * event) { if (sAppEventQueue != NULL) { - if (!xQueueSend(sAppEventQueue, event, 1)) + BaseType_t status; + if (xPortIsInsideInterrupt()) { - P6_LOG("Failed to post event to app task event queue"); + BaseType_t higherPrioTaskWoken = pdFALSE; + status = xQueueSendFromISR(sAppEventQueue, event, &higherPrioTaskWoken); + +#ifdef portYIELD_FROM_ISR + portYIELD_FROM_ISR(higherPrioTaskWoken); +#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + portEND_SWITCHING_ISR(higherPrioTaskWoken); +#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR +#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" +#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR } + else + { + status = xQueueSend(sAppEventQueue, event, 1); + } + + if (!status) + P6_LOG("Failed to post event to app task event queue"); + } + else + { + P6_LOG("Event Queue is NULL should never happen"); } } diff --git a/examples/lock-app/p6/src/ButtonHandler.cpp b/examples/lock-app/p6/src/ButtonHandler.cpp index d0bd98a52686ed..20a7c6bce7d1c0 100644 --- a/examples/lock-app/p6/src/ButtonHandler.cpp +++ b/examples/lock-app/p6/src/ButtonHandler.cpp @@ -97,5 +97,9 @@ void ButtonHandler::TimerCallback(TimerHandle_t xTimer) { buttonevent = cyhal_gpio_read(APP_LOCK_BUTTON); } - GetAppTask().ButtonEventHandler(timerId, (buttonevent) ? APP_BUTTON_PRESSED : APP_BUTTON_RELEASED); + + if (buttonevent) + { + GetAppTask().ButtonEventHandler(timerId, APP_BUTTON_PRESSED); + } } From e61a8d077861ce8960125eea03d274100170c134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Tue, 16 Aug 2022 04:50:37 +0200 Subject: [PATCH 014/115] transitionTime only set to NonNull if value is available (#21883) --- src/app/clusters/level-control/level-control.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index c6c236b08c47d1..bcf52cd169a2ab 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -993,6 +993,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new { app::DataModel::Nullable resolvedLevel; app::DataModel::Nullable temporaryCurrentLevelCache; + app::DataModel::Nullable transitionTime; uint16_t currentOnOffTransitionTime; EmberAfStatus status; @@ -1059,18 +1060,16 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); return; } + transitionTime.SetNonNull(currentOnOffTransitionTime); } else { - currentOnOffTransitionTime = 0xFFFF; + transitionTime.SetNull(); } #else - currentOnOffTransitionTime = 0xFFFF; + transitionTime.SetNull(); #endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME - app::DataModel::Nullable transitionTime; - transitionTime.SetNonNull(currentOnOffTransitionTime); - if (newValue) { // If newValue is OnOff::Commands::On::Id... From cc26cb297e79ea0ba10503580e4dbd24047a8a45 Mon Sep 17 00:00:00 2001 From: stoneM2017 Date: Tue, 16 Aug 2022 10:51:40 +0800 Subject: [PATCH 015/115] [BL602]fix problems to generate the OTA StateTransition and VersionApplied event (#21875) * [BL602]fix problems to generate the OTA StateTransition and VersionApplied event * Restyled by clang-format Co-authored-by: Restyled.io --- .../BL602/OTAImageProcessorImpl.cpp | 44 ++++++++++++++++++- .../bouffalolab/BL602/OTAImageProcessorImpl.h | 4 +- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.cpp b/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.cpp index 5d014eea06216d..6a94570ac2abb5 100644 --- a/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.cpp +++ b/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "OTAImageProcessorImpl.h" extern "C" { @@ -24,8 +25,43 @@ extern "C" { #include } +using namespace chip::System; +using namespace ::chip::DeviceLayer::Internal; + namespace chip { +bool OTAImageProcessorImpl::IsFirstImageRun() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return false; + } + + return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying; +} + +CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return CHIP_ERROR_INTERNAL; + } + + uint32_t currentVersion; + uint32_t targetVersion = requestor->GetTargetVersion(); + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); + if (currentVersion != targetVersion) + { + ChipLogError(SoftwareUpdate, "Current software version = %" PRIu32 ", expected software version = %" PRIu32, currentVersion, + targetVersion); + return CHIP_ERROR_INCORRECT_STATE; + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { DeviceLayer::PlatformMgr().ScheduleWork(HandlePrepareDownload, reinterpret_cast(this)); @@ -121,7 +157,13 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) return; } - hal_reboot(); + DeviceLayer::SystemLayer().StartTimer( + System::Clock::Seconds32(2), + [](Layer *, void *) { + ChipLogProgress(SoftwareUpdate, "Rebooting..."); + hal_reboot(); + }, + nullptr); } void OTAImageProcessorImpl::HandleAbort(intptr_t context) diff --git a/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.h b/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.h index 6ecf3e43c778c4..c2cd9fa5607d9f 100644 --- a/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.h +++ b/src/platform/bouffalolab/BL602/OTAImageProcessorImpl.h @@ -34,8 +34,8 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR Apply() override; CHIP_ERROR Abort() override; CHIP_ERROR ProcessBlock(ByteSpan & block) override; - bool IsFirstImageRun() override { return false; } - CHIP_ERROR ConfirmCurrentImage() override { return CHIP_NO_ERROR; } + bool IsFirstImageRun() override; + CHIP_ERROR ConfirmCurrentImage() override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } From fc230cbbf5add14fc952a2d5e0b31b31bc2258e0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Aug 2022 22:52:03 -0400 Subject: [PATCH 016/115] Set the dispatch queue on system layer earlier in startup. (#21859) System layer init wants to use the queue. Fixes https://github.com/project-chip/connectedhomeip/issues/21857 --- src/platform/Darwin/PlatformManagerImpl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index e883f319305971..6102d1e599effc 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -55,7 +55,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() mRunLoopSem = dispatch_semaphore_create(0); // Ensure there is a dispatch queue available - GetWorkQueue(); + static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. @@ -70,8 +70,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() mStartTime = System::SystemClock().GetMonotonicTimestamp(); - static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); - exit: return err; } From 488262f6937494f87e400b03307643acc6b827dc Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Mon, 15 Aug 2022 19:53:18 -0700 Subject: [PATCH 017/115] Allow partial validation of DAC and CD (for external cloud or custom app based validation) (#21725) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Move cloud attestation to a separate class, re-structure default attestation verification logic to allow cloud verifier to leverage it * straggler * address feedback * address feedback * straggler * fix builds, integration tests --- src/controller/CHIPDeviceController.h | 5 + .../java/AndroidDeviceControllerWrapper.h | 5 + .../AndroidOperationalCredentialsIssuer.cpp | 14 +- .../java/CHIPDeviceController-JNI.cpp | 11 ++ src/credentials/BUILD.gn | 2 + .../DacOnlyPartialAttestationVerifier.cpp | 151 ++++++++++++++++++ .../DacOnlyPartialAttestationVerifier.h | 36 +++++ 7 files changed, 220 insertions(+), 4 deletions(-) create mode 100644 src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp create mode 100644 src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9e3f77cc90bb46..ad357842685c94 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -631,6 +631,11 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CHIP_ERROR IssueNOCChain(const ByteSpan & NOCSRElements, NodeId nodeId, chip::Callback::Callback * callback); + void SetDeviceAttestationVerifier(Credentials::DeviceAttestationVerifier * deviceAttestationVerifier) + { + mDeviceAttestationVerifier = deviceAttestationVerifier; + } + private: DevicePairingDelegate * mPairingDelegate; diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 77f9a6d735cc25..2890d5f6e976ba 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -94,6 +95,8 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel chip::Controller::AutoCommissioner * GetAutoCommissioner() { return &mAutoCommissioner; } + chip::Credentials::PartialDACVerifier * GetPartialDACVerifier() { return &mPartialDACVerifier; } + const chip::Controller::CommissioningParameters & GetCommissioningParameters() const { return mAutoCommissioner.GetCommissioningParameters(); @@ -175,6 +178,8 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel chip::Controller::AutoCommissioner mAutoCommissioner; + chip::Credentials::PartialDACVerifier mPartialDACVerifier; + AndroidDeviceControllerWrapper(ChipDeviceControllerPtr controller, AndroidOperationalCredentialsIssuerPtr opCredsIssuer) : mController(std::move(controller)), mOpCredsIssuer(std::move(opCredsIssuer)) {} diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index aa54ae1d4c1336..249921ae17c923 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -151,7 +151,7 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan } CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const ByteSpan & csrElements, const ByteSpan & csrNonce, - const ByteSpan & csrSignature, + const ByteSpan & csrElementsSignature, const ByteSpan & attestationChallenge, const ByteSpan & DAC, const ByteSpan & PAI, Callback::Callback * onCompletion) @@ -177,8 +177,9 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B jbyteArray javaCsrNonce; JniReferences::GetInstance().N2J_ByteArray(env, csrNonce.data(), csrNonce.size(), javaCsrNonce); - jbyteArray javaCsrSignature; - JniReferences::GetInstance().N2J_ByteArray(env, csrSignature.data(), csrSignature.size(), javaCsrSignature); + jbyteArray javaCsrElementsSignature; + JniReferences::GetInstance().N2J_ByteArray(env, csrElementsSignature.data(), csrElementsSignature.size(), + javaCsrElementsSignature); ChipLogProgress(Controller, "Parsing Certificate Signing Request"); TLVReader reader; @@ -202,8 +203,13 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B jbyteArray javaCsr; JniReferences::GetInstance().N2J_ByteArray(env, csr.data(), csr.size(), javaCsr); + P256PublicKey pubkey; + ReturnErrorOnFailure(VerifyCertificateSigningRequest(csr.data(), csr.size(), pubkey)); + // TODO: verify signed by DAC creds? + ChipLogProgress(chipTool, "VerifyCertificateSigningRequest"); + jobject csrInfo; - err = N2J_CSRInfo(env, javaCsrNonce, javaCsrElements, javaCsrSignature, javaCsr, csrInfo); + err = N2J_CSRInfo(env, javaCsrNonce, javaCsrElements, javaCsrElementsSignature, javaCsr, csrInfo); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failed to create CSRInfo"); diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 724c22b41a1706..1cd4972db04a37 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -541,6 +541,17 @@ JNI_METHOD(void, setUseJavaCallbackForNOCRequest) AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); wrapper->GetAndroidOperationalCredentialsIssuer()->SetUseJavaCallbackForNOCRequest(useCallback); + + if (useCallback) + { + // if we are assigning a callback, then make the device commissioner delegate verification to the cloud + wrapper->Controller()->SetDeviceAttestationVerifier(wrapper->GetPartialDACVerifier()); + } + else + { + // if we are setting callback to null, then make the device commissioner use the default verifier + wrapper->Controller()->SetDeviceAttestationVerifier(GetDeviceAttestationVerifier()); + } } JNI_METHOD(void, updateCommissioningNetworkCredentials) diff --git a/src/credentials/BUILD.gn b/src/credentials/BUILD.gn index ad809326b892d2..7e33874fe22402 100644 --- a/src/credentials/BUILD.gn +++ b/src/credentials/BUILD.gn @@ -94,6 +94,8 @@ static_library("default_attestation_verifier") { output_name = "libDefaultAttestationVerifier" sources = [ + "attestation_verifier/DacOnlyPartialAttestationVerifier.cpp", + "attestation_verifier/DacOnlyPartialAttestationVerifier.h", "attestation_verifier/DefaultDeviceAttestationVerifier.cpp", "attestation_verifier/DefaultDeviceAttestationVerifier.h", "attestation_verifier/DeviceAttestationDelegate.h", diff --git a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp new file mode 100644 index 00000000000000..e37155886d61ce --- /dev/null +++ b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp @@ -0,0 +1,151 @@ +/* + * + * Copyright (c) 2021-2022 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 "DacOnlyPartialAttestationVerifier.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace chip::Crypto; + +namespace chip { +namespace Credentials { + +// As per specifications section 11.22.5.1. Constant RESP_MAX +constexpr size_t kMaxResponseLength = 900; + +void PartialDACVerifier::VerifyAttestationInformation(const DeviceAttestationVerifier::AttestationInfo & info, + Callback::Callback * onCompletion) +{ + AttestationVerificationResult attestationError = AttestationVerificationResult::kSuccess; + + AttestationCertVidPid dacVidPid; + AttestationCertVidPid paiVidPid; + AttestationCertVidPid paaVidPid; + + DeviceInfoForAttestation deviceInfo{ + .vendorId = info.vendorId, + .productId = info.productId, + }; + + VerifyOrExit(!info.attestationElementsBuffer.empty() && !info.attestationChallengeBuffer.empty() && + !info.attestationSignatureBuffer.empty() && !info.paiDerBuffer.empty() && !info.dacDerBuffer.empty() && + !info.attestationNonceBuffer.empty() && onCompletion != nullptr, + attestationError = AttestationVerificationResult::kInvalidArgument); + + VerifyOrExit(info.attestationElementsBuffer.size() <= kMaxResponseLength, + attestationError = AttestationVerificationResult::kInvalidArgument); + + // match DAC and PAI VIDs + { + VerifyOrExit(ExtractVIDPIDFromX509Cert(info.dacDerBuffer, dacVidPid) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kDacFormatInvalid); + VerifyOrExit(ExtractVIDPIDFromX509Cert(info.paiDerBuffer, paiVidPid) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kPaiFormatInvalid); + VerifyOrExit(paiVidPid.mVendorId.HasValue() && paiVidPid.mVendorId == dacVidPid.mVendorId, + attestationError = AttestationVerificationResult::kDacVendorIdMismatch); + VerifyOrExit(dacVidPid.mProductId.HasValue(), attestationError = AttestationVerificationResult::kDacProductIdMismatch); + if (paiVidPid.mProductId.HasValue()) + { + VerifyOrExit(paiVidPid.mProductId == dacVidPid.mProductId, + attestationError = AttestationVerificationResult::kDacProductIdMismatch); + } + } + + { + P256PublicKey remoteManufacturerPubkey; + P256ECDSASignature deviceSignature; + + VerifyOrExit(ExtractPubkeyFromX509Cert(info.dacDerBuffer, remoteManufacturerPubkey) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kDacFormatInvalid); + + // Validate overall attestation signature on attestation information + // SetLength will fail if signature doesn't fit + VerifyOrExit(deviceSignature.SetLength(info.attestationSignatureBuffer.size()) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kAttestationSignatureInvalidFormat); + memcpy(deviceSignature.Bytes(), info.attestationSignatureBuffer.data(), info.attestationSignatureBuffer.size()); + VerifyOrExit(ValidateAttestationSignature(remoteManufacturerPubkey, info.attestationElementsBuffer, + info.attestationChallengeBuffer, deviceSignature) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kAttestationSignatureInvalid); + } + + { + MutableByteSpan akid(deviceInfo.paaSKID); + + VerifyOrExit(ExtractAKIDFromX509Cert(info.paiDerBuffer, akid) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kPaiFormatInvalid); + + ChipLogProgress(Support, "PartialDACVerifier::CheckPAA skipping vid-scoped PAA check - PAARootStore disabled"); + } + +#if !defined(CURRENT_TIME_NOT_IMPLEMENTED) + VerifyOrExit(IsCertificateValidAtCurrentTime(info.dacDerBuffer) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kDacExpired); +#endif + + ChipLogProgress(Support, "PartialDACVerifier::CheckCertChain skipping cert chain check - PAARootStore disabled"); + + { + ByteSpan certificationDeclarationSpan; + ByteSpan attestationNonceSpan; + uint32_t timestampDeconstructed; + ByteSpan firmwareInfoSpan; + DeviceAttestationVendorReservedDeconstructor vendorReserved; + ByteSpan certificationDeclarationPayload; + + deviceInfo.dacVendorId = dacVidPid.mVendorId.Value(); + deviceInfo.dacProductId = dacVidPid.mProductId.Value(); + deviceInfo.paiVendorId = paiVidPid.mVendorId.Value(); + deviceInfo.paiProductId = paiVidPid.mProductId.ValueOr(0); + deviceInfo.paaVendorId = paaVidPid.mVendorId.ValueOr(VendorId::NotSpecified); + + ChipLogProgress( + Support, + "PartialDACVerifier::VerifyAttestationInformation skipping PAA subject key id extraction - PAARootStore disabled"); + + VerifyOrExit(DeconstructAttestationElements(info.attestationElementsBuffer, certificationDeclarationSpan, + attestationNonceSpan, timestampDeconstructed, firmwareInfoSpan, + vendorReserved) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kAttestationElementsMalformed); + + // Verify that Nonce matches with what we sent + VerifyOrExit(attestationNonceSpan.data_equal(info.attestationNonceBuffer), + attestationError = AttestationVerificationResult::kAttestationNonceMismatch); + + ChipLogProgress(Support, + "PartialDACVerifier::VerifyAttestationInformation skipping CD signature check - LocalCSAStore disabled"); + VerifyOrExit(CMS_ExtractCDContent(certificationDeclarationSpan, certificationDeclarationPayload) == CHIP_NO_ERROR, + attestationError = AttestationVerificationResult::kPaaFormatInvalid); + + attestationError = ValidateCertificateDeclarationPayload(certificationDeclarationPayload, firmwareInfoSpan, deviceInfo); + VerifyOrExit(attestationError == AttestationVerificationResult::kSuccess, attestationError = attestationError); + } + +exit: + onCompletion->mCall(onCompletion->mContext, attestationError); // TODO: is this check getting done? +} + +} // namespace Credentials +} // namespace chip diff --git a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h new file mode 100644 index 00000000000000..acd28f66d71054 --- /dev/null +++ b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h @@ -0,0 +1,36 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include + +namespace chip { +namespace Credentials { + +class PartialDACVerifier : public DefaultDACVerifier +{ +public: + PartialDACVerifier() {} + + void VerifyAttestationInformation(const DeviceAttestationVerifier::AttestationInfo & info, + Callback::Callback * onCompletion) override; + +protected: +}; + +} // namespace Credentials +} // namespace chip From 16f40bd5af425c949c23692302126d37fef967de Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 15 Aug 2022 20:32:19 -0700 Subject: [PATCH 018/115] Update cherry-picks.yaml --- .github/workflows/cherry-picks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cherry-picks.yaml b/.github/workflows/cherry-picks.yaml index 97bff5bb6dcd33..6c6208eb2f6f30 100644 --- a/.github/workflows/cherry-picks.yaml +++ b/.github/workflows/cherry-picks.yaml @@ -14,6 +14,9 @@ jobs: (github.event.pull_request.merged == true) && ( (contains(github.event.pull_request.labels.*.name, 'sve')) + (contains(github.event.pull_request.labels.*.name, 'spec')) + (contains(github.event.pull_request.labels.*.name, 'request sve')) + (contains(github.event.pull_request.labels.*.name, 'cert blocker')) ) steps: - name: Checkout From ec6a75610840261192aaca3946cb2c359d99ed5c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Aug 2022 23:33:18 -0400 Subject: [PATCH 019/115] Set detect_leaks=1 in various places where we do ASAN builds in CI. (#20913) This is a relanding of https://github.com/project-chip/connectedhomeip/pull/20246 --- .github/workflows/build.yaml | 3 ++ .github/workflows/darwin-tests.yaml | 3 +- .github/workflows/tests.yaml | 2 ++ .../commands/common/CHIPToolKeypair.mm | 31 ++++++++++------ .../tests/chiptest/lsan-mac-suppressions.txt | 35 +++++++++++++++++++ 5 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 scripts/tests/chiptest/lsan-mac-suppressions.txt diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4d85f92b4521cd..ecef4f5a31da24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -377,6 +377,9 @@ jobs: scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests timeout-minutes: 120 + # We can't enable leak checking here in LSAN_OPTIONS, because on + # Darwin that's only supported with a new enough clang, and we're + # not building with the pigweed clang here. run: | for BUILD_TYPE in default python_lib; do case $BUILD_TYPE in diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index eb8106f6b26fa6..82315575292a49 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -32,9 +32,10 @@ jobs: strategy: matrix: - build_variant: [no-ble-asan] + build_variant: [no-ble-asan-clang] env: BUILD_VARIANT: ${{matrix.build_variant}} + LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' runs-on: macos-latest diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 835b5b27415cd5..f17293a19f381d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -38,6 +38,7 @@ jobs: BUILD_VARIANT: ${{matrix.build_variant}} CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + LSAN_OPTIONS: detect_leaks=1 if: github.actor != 'restyled-io[bot]' runs-on: ubuntu-latest @@ -132,6 +133,7 @@ jobs: BUILD_VARIANT: ${{matrix.build_variant}} CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} TSAN_OPTIONS: "halt_on_error=1" + LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' runs-on: macos-latest diff --git a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm index 425a45fba62f83..6c60345fc973a1 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm @@ -17,6 +17,7 @@ @interface CHIPToolKeypair () @property (nonatomic) chip::Crypto::P256Keypair mIssuer; @property (nonatomic) NSData * ipk; @property (atomic) uint32_t mNow; +@property (nonatomic, readonly) SecKeyRef mPublicKey; @end @implementation CHIPToolKeypair @@ -46,16 +47,19 @@ - (NSData *)signMessageECDSA_RAW:(NSData *)message - (SecKeyRef)publicKey { - chip::Crypto::P256PublicKey publicKey = _mKeyPair.Pubkey(); - NSData * publicKeyNSData = [NSData dataWithBytes:publicKey.Bytes() length:publicKey.Length()]; - NSDictionary * attributes = @{ - (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic, - (NSString *) kSecAttrKeyType : (NSString *) kSecAttrKeyTypeECSECPrimeRandom, - (NSString *) kSecAttrKeySizeInBits : @Public_KeySize, - (NSString *) kSecAttrLabel : kCHIPToolKeychainLabel, - (NSString *) kSecAttrApplicationTag : @CHIPPlugin_CAKeyTag, - }; - return SecKeyCreateWithData((__bridge CFDataRef) publicKeyNSData, (__bridge CFDictionaryRef) attributes, nullptr); + if (_mPublicKey == nil) { + chip::Crypto::P256PublicKey publicKey = _mKeyPair.Pubkey(); + NSData * publicKeyNSData = [NSData dataWithBytes:publicKey.Bytes() length:publicKey.Length()]; + NSDictionary * attributes = @{ + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic, + (NSString *) kSecAttrKeyType : (NSString *) kSecAttrKeyTypeECSECPrimeRandom, + (NSString *) kSecAttrKeySizeInBits : @Public_KeySize, + (NSString *) kSecAttrLabel : kCHIPToolKeychainLabel, + (NSString *) kSecAttrApplicationTag : @CHIPPlugin_CAKeyTag, + }; + _mPublicKey = SecKeyCreateWithData((__bridge CFDataRef) publicKeyNSData, (__bridge CFDictionaryRef) attributes, nullptr); + } + return _mPublicKey; } - (CHIP_ERROR)Deserialize:(chip::Crypto::P256SerializedKeypair &)input @@ -136,4 +140,11 @@ - (CHIP_ERROR)initSerializedKeyFromValue:(NSData *)value serializedKey:(chip::Cr return CHIP_NO_ERROR; } +- (void)dealloc +{ + if (_mPublicKey) { + CFRelease(_mPublicKey); + } +} + @end diff --git a/scripts/tests/chiptest/lsan-mac-suppressions.txt b/scripts/tests/chiptest/lsan-mac-suppressions.txt new file mode 100644 index 00000000000000..68ac691dec325d --- /dev/null +++ b/scripts/tests/chiptest/lsan-mac-suppressions.txt @@ -0,0 +1,35 @@ +# Looks like some Objective C class bits are leaked, which is probably OK since +# those are singletons. +leak:realizeClassWithoutSwift +leak:objc_initializeClassPair_internal + +# TODO: Under [NSManagedObjectContext executeFetchRequest] there are managed object bits that seem to be leaky. +leak:class_addMethod +leak:class_addIvar + +# TODO: Leaks of blocks from dispatch source handlers that need to be investigated. +leak:_Block_copy + +# TODO: OpenSSL random byte generation creates some sort of pools that we seem to never clean up. This seems to be happening a _lot_. +leak:drbg_ctr_init +leak:rand_pool_new +leak:RAND_priv_bytes +leak:drbg_bytes + +# TODO: OpenSSL ERR_get_state seems to leak. +leak:ERR_get_state + +# TODO: BLE initialization allocates some UUIDs and strings that seem to leak. +leak:[BleConnection initWithDiscriminator:] +leak:[CBXpcConnection initWithDelegate:queue:options:sessionType:] + +# TODO: ClusterBase::SubscribeAttribute creates a subscription that cannot +# actually be shut down in any way. +leak:ClusterBase::SubscribeAttribute + +# TODO: Figure out how we are managing to leak NSData while using ARC! +leak:[CHIPToolKeypair signMessageECDSA_RAW:] + +# TODO: Figure out how we are managing to leak NSData while using ARC, though +# this may just be a leak deep inside the CFPreferences stuff somewhere. +leak:[CHIPToolPersistentStorageDelegate storageDataForKey:] From a604ce2498d4232165607c9ee9c3dc5fd3da84c2 Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Mon, 15 Aug 2022 20:44:23 -0700 Subject: [PATCH 020/115] Issue 21314 - add proper step to commissioner for obtaining network credentials (#21876) * Draft: Address 21314 - add proper step to commissioner for obtaining network credentials * android stragglers --- src/controller/AutoCommissioner.cpp | 35 ++----------------- src/controller/AutoCommissioner.h | 22 ------------ src/controller/CHIPDeviceController.cpp | 26 +++++++++++--- src/controller/CHIPDeviceController.h | 14 ++++++++ src/controller/CommissioningDelegate.h | 1 + src/controller/DevicePairingDelegate.h | 14 +++++++- .../java/CHIPDeviceController-JNI.cpp | 20 ----------- .../ChipDeviceController.java | 12 ------- 8 files changed, 52 insertions(+), 92 deletions(-) diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 62cf5ff16912da..e9cc301f45b904 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -203,6 +203,8 @@ CommissioningStage AutoCommissioner::GetNextCommissioningStageInternal(Commissio // skip scan step return CommissioningStage::kConfigRegulatory; case CommissioningStage::kScanNetworks: + return CommissioningStage::kNeedsNetworkCreds; + case CommissioningStage::kNeedsNetworkCreds: return CommissioningStage::kConfigRegulatory; case CommissioningStage::kConfigRegulatory: return CommissioningStage::kSendPAICertificateRequest; @@ -536,17 +538,6 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio } mParams.SetCompletionStatus(completionStatus); - if (mCommissioningPaused) - { - mPausedStage = nextStage; - - if (GetDeviceProxyForStep(nextStage) == nullptr) - { - ChipLogError(Controller, "Invalid device for commissioning"); - return CHIP_ERROR_INCORRECT_STATE; - } - return CHIP_NO_ERROR; - } return PerformStep(nextStage); } @@ -574,28 +565,6 @@ CHIP_ERROR AutoCommissioner::PerformStep(CommissioningStage nextStage) return CHIP_NO_ERROR; } -void AutoCommissioner::PauseCommissioning() -{ - mCommissioningPaused = true; -} - -CHIP_ERROR AutoCommissioner::ResumeCommissioning() -{ - VerifyOrReturnError(mCommissioningPaused, CHIP_ERROR_INCORRECT_STATE); - mCommissioningPaused = false; - - // if no new step was attempted - if (mPausedStage == CommissioningStage::kError) - { - return CHIP_NO_ERROR; - } - - CommissioningStage nextStage = mPausedStage; - mPausedStage = CommissioningStage::kError; - - return PerformStep(nextStage); -} - void AutoCommissioner::ReleaseDAC() { if (mDAC != nullptr) diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 25932e213c69c8..4dbfa4332841bf 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -38,25 +38,6 @@ class AutoCommissioner : public CommissioningDelegate CHIP_ERROR CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; - /** - * @brief - * This function puts the AutoCommissioner in a paused state to prevent advancing to the next stage. - * It is expected that a DevicePairingDelegate may call this method when processing the - * OnCommissioningStatusUpdate, for example, in order to obtain network credentials from the user based - * upon the results of the NetworkScan. - * Use ResumeCommissioning to continue the commissioning process. - * - */ - void PauseCommissioning(); - - /** - * @brief - * An error return value means resume failed, for example: - * - AutoCommissioner was not in a paused state. - * - AutoCommissioner was unable to continue (no DeviceProxy) - */ - CHIP_ERROR ResumeCommissioning(); - protected: CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR & lastErr); DeviceCommissioner * GetCommissioner() { return mCommissioner; } @@ -96,9 +77,6 @@ class AutoCommissioner : public CommissioningDelegate bool mNeedsNetworkSetup = false; ReadCommissioningInfo mDeviceCommissioningInfo; - CommissioningStage mPausedStage = CommissioningStage::kError; - bool mCommissioningPaused = false; - // TODO: Why were the nonces statically allocated, but the certs dynamically allocated? uint8_t * mDAC = nullptr; uint16_t mDACLen = 0; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index d409d727f405dd..afdc4609fd8581 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1833,13 +1833,15 @@ void DeviceCommissioner::OnScanNetworksFailure(void * context, CHIP_ERROR error) ChipLogProgress(Controller, "Received ScanNetworks failure response %" CHIP_ERROR_FORMAT, error.Format()); DeviceCommissioner * commissioner = static_cast(context); + + // advance to the kNeedsNetworkCreds waiting step + // clear error so that we don't abort the commissioning when ScanNetworks fails + commissioner->CommissioningStageComplete(CHIP_NO_ERROR); + if (commissioner->GetPairingDelegate() != nullptr) { commissioner->GetPairingDelegate()->OnScanNetworksFailure(error); } - // need to advance to next step - // clear error so that we don't abort the commissioning when ScanNetworks fails - commissioner->CommissioningStageComplete(CHIP_NO_ERROR); } void DeviceCommissioner::OnScanNetworksResponse(void * context, @@ -1853,12 +1855,23 @@ void DeviceCommissioner::OnScanNetworksResponse(void * context, : "none provided")); DeviceCommissioner * commissioner = static_cast(context); + // advance to the kNeedsNetworkCreds waiting step + commissioner->CommissioningStageComplete(CHIP_NO_ERROR); + if (commissioner->GetPairingDelegate() != nullptr) { commissioner->GetPairingDelegate()->OnScanNetworksSuccess(data); } +} + +CHIP_ERROR DeviceCommissioner::NetworkCredentialsReady() +{ + ReturnErrorCodeIf(mCommissioningStage != CommissioningStage::kNeedsNetworkCreds, CHIP_ERROR_INCORRECT_STATE); + // need to advance to next step - commissioner->CommissioningStageComplete(CHIP_NO_ERROR); + CommissioningStageComplete(CHIP_NO_ERROR); + + return CHIP_NO_ERROR; } void DeviceCommissioner::OnNetworkConfigResponse(void * context, @@ -2000,6 +2013,11 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio SendCommand(proxy, request, OnScanNetworksResponse, OnScanNetworksFailure, endpoint, timeout); break; } + case CommissioningStage::kNeedsNetworkCreds: { + // nothing to do, the OnScanNetworksSuccess and OnScanNetworksFailure callbacks provide indication to the + // DevicePairingDelegate that network credentials are needed. + break; + } case CommissioningStage::kConfigRegulatory: { // To set during config phase: // UTC time diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index ad357842685c94..78581dca42c657 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -547,6 +547,20 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CommissioningStageComplete(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report = CommissioningDelegate::CommissioningReport()); + /** + * @brief + * This function is called by the DevicePairingDelegate to indicate that network credentials have been set + * on the CommissioningParameters of the CommissioningDelegate using CommissioningDelegate.SetCommissioningParameters(). + * As a result, commissioning can advance to the next stage. + * + * The DevicePairingDelegate may call this method from the OnScanNetworksSuccess and OnScanNetworksFailure callbacks, + * or it may call this method after obtaining network credentials using asyncronous methods (prompting user, cloud API call, + * etc). + * + * @return CHIP_ERROR The return status. Returns CHIP_ERROR_INCORRECT_STATE if not in the correct state (kNeedsNetworkCreds). + */ + CHIP_ERROR NetworkCredentialsReady(); + #if CONFIG_NETWORK_LAYER_BLE #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE /** diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 595978b3049646..cf1743c2d21bae 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -55,6 +55,7 @@ enum CommissioningStage : uint8_t // ScanNetworks can happen anytime after kArmFailsafe. // However, the circ tests fail if it is earlier in the list kScanNetworks, + kNeedsNetworkCreds, }; const char * StageToString(CommissioningStage stage); diff --git a/src/controller/DevicePairingDelegate.h b/src/controller/DevicePairingDelegate.h index 186e3dc94288d7..016fe344d8a412 100644 --- a/src/controller/DevicePairingDelegate.h +++ b/src/controller/DevicePairingDelegate.h @@ -86,7 +86,13 @@ class DLL_EXPORT DevicePairingDelegate /** * @brief - * Called with the NetworkScanResponse returned from the target + * Called with the NetworkScanResponse returned from the target. + * + * The DeviceCommissioner will be waiting in the kNeedsNetworkCreds step and not advancing the commissioning process. + * + * The implementation should set the network credentials on the CommissioningParameters of the CommissioningDelegate + * using CommissioningDelegate.SetCommissioningParameters(), and then call DeviceCommissioner.NetworkCredentialsReady() + * in order to resume the commissioning process. */ virtual void OnScanNetworksSuccess(const app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) @@ -95,6 +101,12 @@ class DLL_EXPORT DevicePairingDelegate /** * @brief * Called when the NetworkScan request fails. + * + * The DeviceCommissioner will be waiting in the kNeedsNetworkCreds step and not advancing the commissioning process. + * + * The implementation should set the network credentials on the CommissioningParameters of the CommissioningDelegate + * using CommissioningDelegate.SetCommissioningParameters(), and then call DeviceCommissioner.NetworkCredentialsReady() + * in order to resume the commissioning process. */ virtual void OnScanNetworksFailure(CHIP_ERROR error) {} }; diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 1cd4972db04a37..2020eb27e45d8a 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -513,26 +513,6 @@ JNI_METHOD(void, establishPaseConnectionByAddress) } } -JNI_METHOD(void, pauseCommissioning) -(JNIEnv * env, jobject self, jlong handle) -{ - ChipLogProgress(Controller, "pauseCommissioning() called"); - chip::DeviceLayer::StackLock lock; - AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); - - wrapper->GetAutoCommissioner()->PauseCommissioning(); -} - -JNI_METHOD(void, resumeCommissioning) -(JNIEnv * env, jobject self, jlong handle) -{ - ChipLogProgress(Controller, "resumeCommissioning() called"); - chip::DeviceLayer::StackLock lock; - AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); - - wrapper->GetAutoCommissioner()->ResumeCommissioning(); -} - JNI_METHOD(void, setUseJavaCallbackForNOCRequest) (JNIEnv * env, jobject self, jlong handle, jboolean useCallback) { diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index dbc0c54d53ab18..541f83e40aba99 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -188,14 +188,6 @@ public void commissionDevice( commissionDevice(deviceControllerPtr, deviceId, csrNonce, networkCredentials); } - public void pauseCommissioning() { - pauseCommissioning(deviceControllerPtr); - } - - public void resumeCommissioning() { - resumeCommissioning(deviceControllerPtr); - } - /** * When a NOCChainIssuer is set for this controller, then onNOCChainGenerationNeeded will be * called when the NOC CSR needs to be signed. This allows for custom credentials issuer @@ -670,10 +662,6 @@ private native boolean openPairingWindowWithPINCallback( private native byte[] getAttestationChallenge(long deviceControllerPtr, long devicePtr); - private native void pauseCommissioning(long deviceControllerPtr); - - private native void resumeCommissioning(long deviceControllerPtr); - private native void setUseJavaCallbackForNOCRequest( long deviceControllerPtr, boolean useCallback); From 8e34ea84eb9ee48e4de0097f2db349f95926f425 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Mon, 15 Aug 2022 20:44:44 -0700 Subject: [PATCH 021/115] Fix ShutdownSubscription (#21870) -- Use the triple set, fabric index, peer node id and subscription id to locate subscription and close it out -- When close subscription with no error, we also need to clear out active subscription state. --- .../commands/clusters/SubscriptionsCommands.h | 6 ++- src/app/InteractionModelEngine.cpp | 5 +- src/app/InteractionModelEngine.h | 2 +- src/app/ReadClient.cpp | 3 +- src/app/tests/TestReadInteraction.cpp | 52 +++++++++++++++++++ 5 files changed, 62 insertions(+), 6 deletions(-) diff --git a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h index 9626070b3fa953..2c4d96a71edd26 100644 --- a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h +++ b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h @@ -30,12 +30,15 @@ class ShutdownSubscription : public CHIPCommand CHIPCommand("shutdown-one", credsIssuerConfig, "Shut down a single subscription, identified by its subscription id.") { AddArgument("subscription-id", 0, UINT64_MAX, &mSubscriptionId); + AddArgument("node-id", 0, UINT64_MAX, &mNodeId, + "The node id, scoped to the commissioner name the command is running under."); } /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override { - CHIP_ERROR err = chip::app::InteractionModelEngine::GetInstance()->ShutdownSubscription(mSubscriptionId); + CHIP_ERROR err = chip::app::InteractionModelEngine::GetInstance()->ShutdownSubscription( + chip::ScopedNodeId(mNodeId, CurrentCommissioner().GetFabricIndex()), mSubscriptionId); SetCommandExitStatus(err); return CHIP_NO_ERROR; } @@ -43,6 +46,7 @@ class ShutdownSubscription : public CHIPCommand private: chip::SubscriptionId mSubscriptionId; + chip::NodeId mNodeId; }; class ShutdownSubscriptionsForNode : public CHIPCommand diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 5196e5f76586bb..58520b147292b9 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -236,11 +236,12 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const return numActive; } -CHIP_ERROR InteractionModelEngine::ShutdownSubscription(SubscriptionId aSubscriptionId) +CHIP_ERROR InteractionModelEngine::ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId) { for (auto * readClient = mpActiveReadClientList; readClient != nullptr; readClient = readClient->GetNextClient()) { - if (readClient->IsSubscriptionType() && readClient->IsMatchingSubscriptionId(aSubscriptionId)) + if (readClient->IsSubscriptionType() && readClient->IsMatchingSubscriptionId(aSubscriptionId) && + readClient->GetFabricIndex() == aPeerNodeId.GetFabricIndex() && readClient->GetPeerNodeId() == aPeerNodeId.GetNodeId()) { readClient->Close(CHIP_NO_ERROR); return CHIP_NO_ERROR; diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 0c2efa0dbf2b09..650e5c88246290 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -132,7 +132,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * @retval #CHIP_ERROR_KEY_NOT_FOUND If the subscription is not found. * @retval #CHIP_NO_ERROR On success. */ - CHIP_ERROR ShutdownSubscription(SubscriptionId aSubscriptionId); + CHIP_ERROR ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId); /** * Tears down active subscriptions for a given peer node ID. diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 340b0d441554dc..257a86f28790cd 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -152,10 +152,9 @@ void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription) } else { + ClearActiveSubscriptionState(); if (aError != CHIP_NO_ERROR) { - ClearActiveSubscriptionState(); - // // We infer that re-subscription was requested by virtue of having a non-zero list of event OR attribute paths present // in mReadPrepareParams. This would only be the case if an application called SendAutoResubscribeRequest which diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 54f19a7207c57b..481439f8ac3f27 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -336,6 +336,7 @@ class TestReadInteraction static void TestSubscribeSendInvalidStatusReport(nlTestSuite * apSuite, void * apContext); static void TestReadHandlerInvalidSubscribeRequest(nlTestSuite * apSuite, void * apContext); static void TestSubscribeInvalidateFabric(nlTestSuite * apSuite, void * apContext); + static void TestShutdownSubscription(nlTestSuite * apSuite, void * apContext); private: static void GenerateReportData(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload, @@ -3730,6 +3731,56 @@ void TestReadInteraction::TestSubscribeInvalidateFabric(nlTestSuite * apSuite, v NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +void TestReadInteraction::TestShutdownSubscription(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; + + Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + // Shouldn't have anything in the retransmit table when starting the test. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + GenerateEvents(apSuite, apContext); + + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpAttributePathParamsList = new chip::app::AttributePathParams[1]; + readPrepareParams.mAttributePathParamsListSize = 1; + + readPrepareParams.mpAttributePathParamsList[0].mEndpointId = Test::kMockEndpoint3; + readPrepareParams.mpAttributePathParamsList[0].mClusterId = Test::MockClusterId(2); + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = Test::MockAttributeId(4); + + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 0; + + { + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Subscribe); + + delegate.mGotReport = false; + + err = readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, delegate.mGotReport); + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); + + engine->ShutdownSubscription(chip::ScopedNodeId(readClient.GetPeerNodeId(), readClient.GetFabricIndex()), + readClient.GetSubscriptionId().Value()); + NL_TEST_ASSERT(apSuite, readClient.IsIdle()); + } + engine->Shutdown(); + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + } // namespace app } // namespace chip @@ -3775,6 +3826,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestSubscribeSendInvalidStatusReport", chip::app::TestReadInteraction::TestSubscribeSendInvalidStatusReport), NL_TEST_DEF("TestReadHandlerInvalidSubscribeRequest", chip::app::TestReadInteraction::TestReadHandlerInvalidSubscribeRequest), NL_TEST_DEF("TestSubscribeInvalidateFabric", chip::app::TestReadInteraction::TestSubscribeInvalidateFabric), + NL_TEST_DEF("TestShutdownSubscription", chip::app::TestReadInteraction::TestShutdownSubscription), NL_TEST_DEF("TestSubscribeUrgentWildcardEvent", chip::app::TestReadInteraction::TestSubscribeUrgentWildcardEvent), NL_TEST_DEF("TestSubscribeWildcard", chip::app::TestReadInteraction::TestSubscribeWildcard), NL_TEST_DEF("TestSubscribePartialOverlap", chip::app::TestReadInteraction::TestSubscribePartialOverlap), From d32baea1c6137a8e4b82b28f76b30f5937b6ad32 Mon Sep 17 00:00:00 2001 From: Timotej Ecimovic Date: Mon, 15 Aug 2022 23:46:32 -0400 Subject: [PATCH 022/115] Matter zap cleanup (#21713) * Add the sdk.json for zap regeneration. * Rework the helper infrastructure to support aliases and categories. 0. Use the common helper aliases in the template json files. 1. Update templates.json with correct reference. 2. Update another template. 3. Add resources to the templates files, so that helpers can access the yaml stuff. 4. Fix wrong paths in templates.json * Use ZAP_PATH to run zap from other location than third_party/zap. * Convert the tests to JSON files. * Remove all the duplicated and unneeded js code. * Keep tests in sync with the changes on master. * Update zap submodule. * Add the updates from the mainline. * Restyled by whitespace * Restyled by prettier-json * Remove a manual test. Co-authored-by: Restyled.io --- examples/chip-tool/templates/helper.js | 153 --- examples/chip-tool/templates/templates.json | 10 +- .../chip-tool/templates/tests/commands.zapt | 12 +- examples/chip-tool/templates/tests/helper.js | 109 -- .../chip-tool/templates/tests/templates.json | 20 +- examples/chip-tool/templates/tests/tests.js | 35 - .../darwin-framework-tool/templates/helper.js | 26 - .../templates/templates.json | 19 +- .../templates/tests/ciTests.json | 23 + .../templates/tests/commands.zapt | 12 +- .../templates/tests/manualTests.json | 3 + .../templates/tests/templates.json | 24 +- .../templates/tests/tests.js | 107 -- .../placeholder/linux/apps/app1/ciTests.json | 4 + examples/placeholder/linux/apps/app1/tests.js | 30 - examples/placeholder/templates/helper.js | 32 - examples/placeholder/templates/templates.json | 20 +- .../placeholder/templates/tests-commands.zapt | 12 +- scripts/tools/sdk.json | 290 +++++ scripts/tools/zap/generate.py | 2 +- src/app/common/templates/templates.json | 10 +- src/app/tests/suites/ciTests.json | 277 +++++ .../tests/suites/examples/TestGenExample.zapt | 2 +- src/app/tests/suites/examples/ciTests.json | 8 + .../tests/suites/examples/manualTests.json | 4 + .../suites/examples/templates/templates.json | 11 +- .../tests/suites/examples/templates/tests.js | 49 - src/app/tests/suites/manualTests.json | 406 ++++++ src/app/tests/suites/templates/templates.json | 13 +- src/app/tests/suites/tests.js | 945 -------------- .../zap-templates/common/ChipTypesHelper.js | 53 - .../common/ClusterTestGeneration.js | 1087 ----------------- .../zap-templates/common/ClustersHelper.js | 941 -------------- src/app/zap-templates/common/Deferred.js | 35 - src/app/zap-templates/common/ListHelper.js | 28 - src/app/zap-templates/common/StringHelper.js | 55 - .../common/attributes/Accessors.js | 107 -- .../simulated-clusters/SimulatedClusters.js | 96 -- .../clusters/CommissionerCommands.js | 48 - .../clusters/DelayCommands.js | 57 - .../clusters/DiscoveryCommands.js | 170 --- .../clusters/LogCommands.js | 45 - .../clusters/SystemCommands.js | 77 -- .../common/variables/Variables.js | 150 --- src/app/zap-templates/partials/helper.js | 43 - src/app/zap-templates/templates/app/helper.js | 876 ------------- .../templates/chip/ListHelper.js | 50 - .../zap-templates/templates/chip/helper.js | 675 ---------- src/controller/java/templates/helper.js | 339 ----- src/controller/java/templates/templates.json | 14 +- src/controller/python/templates/helper.js | 74 -- .../python/templates/templates.json | 10 +- src/darwin/Framework/CHIP/templates/helper.js | 244 ---- .../Framework/CHIP/templates/templates.json | 19 +- third_party/zap/repo | 2 +- 55 files changed, 1132 insertions(+), 6831 deletions(-) delete mode 100644 examples/chip-tool/templates/helper.js delete mode 100644 examples/chip-tool/templates/tests/helper.js delete mode 100644 examples/chip-tool/templates/tests/tests.js delete mode 100644 examples/darwin-framework-tool/templates/helper.js create mode 100644 examples/darwin-framework-tool/templates/tests/ciTests.json create mode 100644 examples/darwin-framework-tool/templates/tests/manualTests.json delete mode 100644 examples/darwin-framework-tool/templates/tests/tests.js create mode 100644 examples/placeholder/linux/apps/app1/ciTests.json delete mode 100644 examples/placeholder/linux/apps/app1/tests.js delete mode 100644 examples/placeholder/templates/helper.js create mode 100644 scripts/tools/sdk.json create mode 100644 src/app/tests/suites/ciTests.json create mode 100644 src/app/tests/suites/examples/ciTests.json create mode 100644 src/app/tests/suites/examples/manualTests.json delete mode 100644 src/app/tests/suites/examples/templates/tests.js create mode 100644 src/app/tests/suites/manualTests.json delete mode 100644 src/app/tests/suites/tests.js delete mode 100644 src/app/zap-templates/common/ChipTypesHelper.js delete mode 100644 src/app/zap-templates/common/ClusterTestGeneration.js delete mode 100644 src/app/zap-templates/common/ClustersHelper.js delete mode 100644 src/app/zap-templates/common/Deferred.js delete mode 100644 src/app/zap-templates/common/ListHelper.js delete mode 100644 src/app/zap-templates/common/StringHelper.js delete mode 100644 src/app/zap-templates/common/attributes/Accessors.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js delete mode 100644 src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js delete mode 100644 src/app/zap-templates/common/variables/Variables.js delete mode 100644 src/app/zap-templates/partials/helper.js delete mode 100644 src/app/zap-templates/templates/app/helper.js delete mode 100644 src/app/zap-templates/templates/chip/ListHelper.js delete mode 100644 src/app/zap-templates/templates/chip/helper.js delete mode 100644 src/controller/java/templates/helper.js delete mode 100644 src/controller/python/templates/helper.js delete mode 100644 src/darwin/Framework/CHIP/templates/helper.js diff --git a/examples/chip-tool/templates/helper.js b/examples/chip-tool/templates/helper.js deleted file mode 100644 index 6fdc65cc32090d..00000000000000 --- a/examples/chip-tool/templates/helper.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../third_party/zap/repo/dist/src-electron/'; -const templateUtil = require(zapPath + 'generator/template-util.js'); -const zclHelper = require(zapPath + 'generator/helper-zcl.js'); -const zclQuery = require(zapPath + 'db/query-zcl.js'); - -const ChipTypesHelper = require('../../../src/app/zap-templates/common/ChipTypesHelper.js'); - -function asDelimitedCommand(name) -{ - return name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); -} - -function asTypeMinValue(type) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - this.isArray = false; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - const basicType = ChipTypesHelper.asBasicType(zclType); - switch (basicType) { - case 'bool': - return '0'; - case 'int8_t': - case 'int16_t': - case 'int32_t': - case 'int64_t': - return 'INT' + parseInt(basicType.slice(3)) + '_MIN'; - case 'uint8_t': - case 'uint16_t': - case 'uint32_t': - case 'uint64_t': - return '0'; - case 'float': - case 'double': - return `-std::numeric_limits<${basicType}>::infinity()`; - default: - error = 'asTypeMinValue: Unhandled underlying type ' + zclType + ' for original type ' + type; - throw error; - } - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => { - console.log(err); - throw err; - }); - return templateUtil.templatePromise(this.global, promise); -} - -function asTypeMaxValue(type) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - const basicType = ChipTypesHelper.asBasicType(zclType); - switch (basicType) { - case 'bool': - return '1'; - case 'int8_t': - case 'int16_t': - case 'int32_t': - case 'int64_t': - return 'INT' + parseInt(basicType.slice(3)) + '_MAX'; - case 'uint8_t': - case 'uint16_t': - case 'uint32_t': - case 'uint64_t': - return 'UINT' + parseInt(basicType.slice(4)) + '_MAX'; - case 'float': - case 'double': - return `std::numeric_limits<${basicType}>::infinity()`; - default: - return 'err'; - error = 'asTypeMaxValue: Unhandled underlying type ' + zclType + ' for original type ' + type; - throw error; - } - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => { - console.log(err); - throw err; - }); - return templateUtil.templatePromise(this.global, promise); -} - -async function structs_with_cluster_name(options) -{ - const packageId = await templateUtil.ensureZclPackageId(this); - - const structs = await zclQuery.selectAllStructsWithItems(this.global.db, packageId); - - let blocks = []; - for (const s of structs) { - if (s.struct_cluster_count == 0) { - continue; - } - - if (s.struct_cluster_count == 1) { - const clusters = await zclQuery.selectStructClusters(this.global.db, s.id); - blocks.push( - { id : s.id, name : s.name, struct_fabric_idx_field : s.struct_fabric_idx_field, clusterName : clusters[0].name }); - } - - if (s.struct_cluster_count > 1) { - blocks.push({ id : s.id, name : s.name, struct_fabric_idx_field : s.struct_fabric_idx_field, clusterName : "detail" }); - } - } - - return templateUtil.collectBlocks(blocks, options, this); -} - -async function assertSameTestType(current, expected) -{ - if (current == expected) { - return ''; - } - - const filename = this.parent.parent.parent.filename; - const testName = this.parent.parent.parent.testName; - const error = `\nFile: ${filename}\nTest: ${testName}\nCluster ${this.parent.cluster} Attribute: ${this.name}: Constraint type "${ - expected}" does not match the current type "${current}".`; - throw error; -} - -// -// Module exports -// -exports.asDelimitedCommand = asDelimitedCommand; -exports.asTypeMinValue = asTypeMinValue; -exports.asTypeMaxValue = asTypeMaxValue; -exports.structs_with_cluster_name = structs_with_cluster_name; -exports.assertSameTestType = assertSameTestType; diff --git a/examples/chip-tool/templates/templates.json b/examples/chip-tool/templates/templates.json index e61ce2120942d7..1552ab8566bfa6 100644 --- a/examples/chip-tool/templates/templates.json +++ b/examples/chip-tool/templates/templates.json @@ -2,11 +2,11 @@ "name": "CHIP Tool templates", "version": "chip-v1", "helpers": [ - "../../../src/app/zap-templates/partials/helper.js", - "../../../src/app/zap-templates/common/StringHelper.js", - "../../../src/app/zap-templates/templates/app/helper.js", - "../../../src/app/zap-templates/templates/chip/helper.js", - "helper.js" + "partials/helper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "chip-tool/templates/helper.js" ], "override": "../../../src/app/zap-templates/common/override.js", "partials": [ diff --git a/examples/chip-tool/templates/tests/commands.zapt b/examples/chip-tool/templates/tests/commands.zapt index 4c73a5675ac12c..b960267359fa0d 100644 --- a/examples/chip-tool/templates/tests/commands.zapt +++ b/examples/chip-tool/templates/tests/commands.zapt @@ -17,7 +17,7 @@ public: TestList() : Command("list") {}; CHIP_ERROR Run() override { - {{#chip_tests (getTests)}}printf("{{filename}}\n");{{/chip_tests}} + {{#chip_tests "../../../../src/app/tests/suites/ciTests.json"}}printf("{{filename}}\n");{{/chip_tests}} return CHIP_NO_ERROR; } @@ -29,14 +29,14 @@ public: ManualTestList() : Command("list-manual") {}; CHIP_ERROR Run() override { - {{#chip_tests (getManualTests)}}printf("{{filename}}\n");{{/chip_tests}} + {{#chip_tests "../../../../src/app/tests/suites/manualTests.json"}}printf("{{filename}}\n");{{/chip_tests}} return CHIP_NO_ERROR; } }; -{{>test_cluster tests=(getTests) credsIssuerConfigArg=true needsWaitDuration=true}} -{{>test_cluster tests=(getManualTests) credsIssuerConfigArg=true needsWaitDuration=true}} +{{>test_cluster tests="../../../../src/app/tests/suites/ciTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} +{{>test_cluster tests="../../../../src/app/tests/suites/manualTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} #endif // CONFIG_ENABLE_YAML_TESTS @@ -48,10 +48,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds #if CONFIG_ENABLE_YAML_TESTS make_unique(), make_unique(), - {{#chip_tests (getTests)}} + {{#chip_tests "../../../../src/app/tests/suites/ciTests.json"}} make_unique<{{filename}}Suite>(credsIssuerConfig), {{/chip_tests}} - {{#chip_tests (getManualTests)}} + {{#chip_tests "../../../../src/app/tests/suites/manualTests.json"}} make_unique<{{filename}}Suite>(credsIssuerConfig), {{/chip_tests}} #endif // CONFIG_ENABLE_YAML_TESTS diff --git a/examples/chip-tool/templates/tests/helper.js b/examples/chip-tool/templates/tests/helper.js deleted file mode 100644 index d50912ca9f5703..00000000000000 --- a/examples/chip-tool/templates/tests/helper.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright (c) 2022 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. - */ - -const { zapTypeToDecodableClusterObjectType, zapTypeToEncodableClusterObjectType, asUpperCamelCase, asLowerCamelCase } -= require('../../../../src/app/zap-templates/templates/app/helper.js'); -const { isTestOnlyCluster } = require('../../../../src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js'); - -function utf8StringLength(str) -{ - return new TextEncoder().encode(str).length -} - -/* - * Returns the name to use for accessing a given property of - * a decodable type. - * - */ -function asPropertyValue(options) -{ - let rootObject = 'value'; - - let context = options.hash.context || this; - - // The decodable type for commands is a struct by default, even if the - // command just returns a single value. - if (context.parent.isCommand) { - rootObject += '.' + asLowerCamelCase(context.name); - } - - if (context.isOptional && !options.hash.dontUnwrapValue) { - rootObject += '.Value()'; - } - - return rootObject; -} - -async function asEncodableType() -{ - // Copy some properties needed by zapTypeToEncodableClusterObjectType - let target = { global : this.global, entryType : this.entryType }; - - let type; - if ('commandObject' in this) { - type = this.commandObject.name; - } else if ('attributeObject' in this) { - type = this.attributeObject.type; - target.isArray = this.attributeObject.isArray; - target.isOptional = this.attributeObject.isOptional; - target.isNullable = this.attributeObject.isNullable; - } else { - throw new Error("Unsupported encodable type"); - } - - if (isTestOnlyCluster(this.cluster) || 'commandObject' in this) { - return `chip::app::Clusters::${asUpperCamelCase(this.cluster)}::Commands::${asUpperCamelCase(type)}::Type`; - } - - const options = { 'hash' : { ns : this.cluster } }; - return await zapTypeToEncodableClusterObjectType.call(target, type, options); -} - -async function asDecodableType() -{ - // Copy some properties needed by zapTypeToDecodableClusterObjectType - let target = { global : this.global, entryType : this.entryType }; - - let type; - if ('commandObject' in this) { - type = this.commandObject.responseName; - } else if ('attributeObject' in this) { - type = this.attributeObject.type; - target.isArray = this.attributeObject.isArray; - target.isOptional = this.attributeObject.isOptional; - target.isNullable = this.attributeObject.isNullable; - } else if ('eventObject' in this) { - type = this.event; - } else { - throw new Error("Unsupported decodable type"); - } - - if (isTestOnlyCluster(this.cluster) || 'commandObject' in this) { - return `chip::app::Clusters::${asUpperCamelCase(this.cluster)}::Commands::${asUpperCamelCase(type)}::DecodableType`; - } - - const options = { 'hash' : { ns : this.cluster } }; - return await zapTypeToDecodableClusterObjectType.call(target, type, options); -} - -// -// Module exports -// -exports.utf8StringLength = utf8StringLength; -exports.asPropertyValue = asPropertyValue; -exports.asDecodableType = asDecodableType; -exports.asEncodableType = asEncodableType; diff --git a/examples/chip-tool/templates/tests/templates.json b/examples/chip-tool/templates/tests/templates.json index 45152c4b2a0fab..93505fe7a1fce4 100644 --- a/examples/chip-tool/templates/tests/templates.json +++ b/examples/chip-tool/templates/tests/templates.json @@ -2,15 +2,19 @@ "name": "CHIP Tool Tests templates", "version": "chip-v1", "helpers": [ - "../../../../src/app/zap-templates/partials/helper.js", - "../../../../src/app/zap-templates/common/StringHelper.js", - "../../../../src/app/zap-templates/templates/app/helper.js", - "../../../../src/app/zap-templates/templates/chip/helper.js", - "../../../../src/app/zap-templates/common/ClusterTestGeneration.js", - "../helper.js", - "helper.js", - "tests.js" + "partials/helper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "chip-tool/templates/helper.js", + "chip-tool/templates/tests/helper.js" ], + "resources": { + "pics-metafile": "../../../../src/app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../../src/app/tests/suites/certification", + "test-metadir": "../../../../src/app/tests/suites" + }, "override": "../../../../src/app/zap-templates/common/override.js", "partials": [ { diff --git a/examples/chip-tool/templates/tests/tests.js b/examples/chip-tool/templates/tests/tests.js deleted file mode 100644 index 2f4df96281d27b..00000000000000 --- a/examples/chip-tool/templates/tests/tests.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const testPath = '../../../../src/app/tests/suites/'; -const TestSuite = require(testPath + 'tests.js'); - -function getManualTests() -{ - return TestSuite.getManualTests(); -} - -function getTests() -{ - return TestSuite.getTests(); -} - -// -// Module exports -// -exports.getTests = getTests; -exports.getManualTests = getManualTests; diff --git a/examples/darwin-framework-tool/templates/helper.js b/examples/darwin-framework-tool/templates/helper.js deleted file mode 100644 index 16197e409ac13c..00000000000000 --- a/examples/darwin-framework-tool/templates/helper.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function hasArguments() -{ - return !!this.arguments.length -} - -// -// Module exports -// -exports.hasArguments = hasArguments; diff --git a/examples/darwin-framework-tool/templates/templates.json b/examples/darwin-framework-tool/templates/templates.json index 1535bf06327870..a571ccb860cf48 100644 --- a/examples/darwin-framework-tool/templates/templates.json +++ b/examples/darwin-framework-tool/templates/templates.json @@ -2,14 +2,19 @@ "name": "CHIP Tool Darwin templates", "version": "chip-v1", "helpers": [ - "../../../examples/chip-tool/templates/helper.js", - "../../../src/app/zap-templates/common/StringHelper.js", - "../../../src/app/zap-templates/partials/helper.js", - "../../../src/app/zap-templates/templates/app/helper.js", - "../../../src/app/zap-templates/templates/chip/helper.js", - "../../../src/app/zap-templates/common/ClusterTestGeneration.js", - "../../../src/darwin/Framework/CHIP/templates/helper.js" + "chip-tool/templates/helper.js", + "common/StringHelper.js", + "partials/helper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "darwin/Framework/CHIP/templates/helper.js" ], + "resources": { + "pics-metafile": "../../../src/app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../src/app/tests/suites/certification", + "test-metadir": "../../../src/app/tests/suites" + }, "override": "../../../src/app/zap-templates/common/override.js", "partials": [ { diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json new file mode 100644 index 00000000000000..5be170ac3d8bba --- /dev/null +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -0,0 +1,23 @@ +{ + "include": "../../../../src/app/tests/suites/ciTests.json", + "disable": [ + "Test_TC_SC_4_2", + "TestClusterComplexTypes", + "TestEvents", + "TestDiscovery", + "TestGroupMessaging", + "Test_TC_DGTHREAD_2_1", + "Test_TC_DGTHREAD_2_2", + "Test_TC_DGTHREAD_2_3", + "Test_TC_DGTHREAD_2_4", + "Test_TC_CC_7_2", + "Test_TC_CC_6_2", + "Test_TC_CC_6_3", + "Test_TC_CC_8_1", + "Test_TC_APPLAUNCHER_3_7", + "Test_TC_APPLAUNCHER_3_8", + "Test_TC_APPLAUNCHER_3_9", + "Test_TC_BINFO_2_1", + "Test_TC_SWTCH_2_1" + ] +} diff --git a/examples/darwin-framework-tool/templates/tests/commands.zapt b/examples/darwin-framework-tool/templates/tests/commands.zapt index 5a3f1c07707024..2d1f547489bc4c 100644 --- a/examples/darwin-framework-tool/templates/tests/commands.zapt +++ b/examples/darwin-framework-tool/templates/tests/commands.zapt @@ -16,7 +16,7 @@ public: TestList() : Command("list") {}; CHIP_ERROR Run() override { - {{#chip_tests (getTests)}}printf("{{filename}}\n");{{/chip_tests}} + {{#chip_tests "ciTests.json"}}printf("{{filename}}\n");{{/chip_tests}} return CHIP_NO_ERROR; } @@ -28,14 +28,14 @@ public: ManualTestList() : Command("list-manual") {}; CHIP_ERROR Run() override { - {{#chip_tests (getManualTests)}}printf("{{filename}}\n");{{/chip_tests}} + {{#chip_tests "manualTests.json"}}printf("{{filename}}\n");{{/chip_tests}} return CHIP_NO_ERROR; } }; -{{>test_cluster tests=(getTests) credsIssuerConfigArg=false}} -{{>test_cluster tests=(getManualTests) credsIssuerConfigArg=false}} +{{>test_cluster tests="ciTests.json" credsIssuerConfigArg=false}} +{{>test_cluster tests="manualTests.json" credsIssuerConfigArg=false}} #endif // CONFIG_ENABLE_YAML_TESTS @@ -47,10 +47,10 @@ void registerCommandsTests(Commands & commands) #if CONFIG_ENABLE_YAML_TESTS make_unique(), make_unique(), - {{#chip_tests (getTests)}} + {{#chip_tests "ciTests.json"}} make_unique<{{filename}}>(), {{/chip_tests}} - {{#chip_tests (getManualTests)}} + {{#chip_tests "manualTests.json"}} make_unique<{{filename}}>(), {{/chip_tests}} #endif // CONFIG_ENABLE_YAML_TESTS diff --git a/examples/darwin-framework-tool/templates/tests/manualTests.json b/examples/darwin-framework-tool/templates/tests/manualTests.json new file mode 100644 index 00000000000000..167f6d2a59e00c --- /dev/null +++ b/examples/darwin-framework-tool/templates/tests/manualTests.json @@ -0,0 +1,3 @@ +{ + "collection": [] +} diff --git a/examples/darwin-framework-tool/templates/tests/templates.json b/examples/darwin-framework-tool/templates/tests/templates.json index 6f46ea7e9aaf65..9ca4d2e533c183 100644 --- a/examples/darwin-framework-tool/templates/tests/templates.json +++ b/examples/darwin-framework-tool/templates/tests/templates.json @@ -2,17 +2,21 @@ "name": "CHIP Tool Tests templates", "version": "chip-v1", "helpers": [ - "../../../../examples/chip-tool/templates/helper.js", - "../../../../examples/chip-tool/templates/tests/helper.js", - "../../../../src/app/zap-templates/partials/helper.js", - "../../../../src/app/zap-templates/common/StringHelper.js", - "../../../../src/app/zap-templates/templates/app/helper.js", - "../../../../src/app/zap-templates/templates/chip/helper.js", - "../../../../src/app/zap-templates/common/ClusterTestGeneration.js", - "../../../../src/darwin/Framework/CHIP/templates/helper.js", - "../helper.js", - "tests.js" + "chip-tool/templates/helper.js", + "chip-tool/templates/tests/helper.js", + "partials/helper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "darwin/Framework/CHIP/templates/helper.js", + "darwin-framework-tool/templates/helper.js" ], + "resources": { + "pics-metafile": "../../../../src/app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../../src/app/tests/suites/certification", + "test-metadir": "../../../../src/app/tests/suites" + }, "override": "../../../../src/app/zap-templates/common/override.js", "partials": [ { diff --git a/examples/darwin-framework-tool/templates/tests/tests.js b/examples/darwin-framework-tool/templates/tests/tests.js deleted file mode 100644 index 13c3a062d1c9ab..00000000000000 --- a/examples/darwin-framework-tool/templates/tests/tests.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const testPath = '../../../../src/app/tests/suites/'; -const TestSuite = require(testPath + 'tests.js'); - -function getManualTests() -{ - return []; -} - -// clang-format off - -function getTests() { - - let tests = TestSuite.getTests(); - - // TODO: This test needs FindCommissionable - tests.disable('Test_TC_SC_4_2'); - - // TestClusterComplexTypes requires representing nullable optionals in ways - // that can differentiate missing and null, which Darwin can't right now. - tests.disable('TestClusterComplexTypes'); - - // TODO: TestEvents not supported in the codegen yet. - tests.disable('TestEvents'); - - // TODO: TestDiscovery needs FindCommissionable - tests.disable('TestDiscovery'); - - // TODO: TestGroupMessaging does not work on Darwin for now. - tests.disable('TestGroupMessaging'); - - // TODO: Test_TC_DIAG_TH_NW_2_1 does not work on Darwin for now. - tests.disable('Test_TC_DGTHREAD_2_1'); - - // TODO: Test_TC_DIAG_TH_NW_2_2 does not work on Darwin for now. - tests.disable('Test_TC_DGTHREAD_2_2'); - - // TODO: Test_TC_DIAG_TH_NW_2_3 does not work on Darwin for now. - tests.disable('Test_TC_DGTHREAD_2_3'); - - // TODO: Test_TC_DIAG_TH_NW_2_4 does not work on Darwin for now. - tests.disable('Test_TC_DGTHREAD_2_4'); - - // TODO: Test_TC_CC_7_2 seems to rely on pretty tight timing that seem to not - // work right in the darwin tests. - tests.disable('Test_TC_CC_7_2'); - - // TODO: Test_TC_CC_6_2 does not work on Darwin(no ble asan) for now. - tests.disable('Test_TC_CC_6_2'); - - // TODO: Test_TC_CC_6_3 does not work on Darwin(no ble asan) for now. - tests.disable('Test_TC_CC_6_3'); - - // TODO: Test_TC_CC_8_1 does not work on Darwin(no ble asan) for now. - tests.disable('Test_TC_CC_8_1'); - - // TODO: Test_TC_CC_9_1 does not work on Darwin for now. - // But is disabled in CI, so we can't disable it here. - //tests.disable('Test_TC_CC_9_1'); - - // TODO: Test_TC_CC_9_2 does not work on Darwin for now. - // But is disabled in CI, so we can't disable it here. - //tests.disable('Test_TC_CC_9_2'); - - // TODO: Test_TC_CC_9_3 does not work on Darwin for now. - // But is disabled in CI, so we can't disable it here. - //tests.disable('Test_TC_CC_9_3'); - - // TODO: Test_TC_MC_3_7 does not work on Darwin for now. - tests.disable('Test_TC_APPLAUNCHER_3_7'); - - // TODO: Test_TC_MC_3_8 does not work on Darwin for now. - tests.disable('Test_TC_APPLAUNCHER_3_8'); - - // TODO: Test_TC_MC_3_9 does not work on Darwin for now. - tests.disable('Test_TC_APPLAUNCHER_3_9'); - - // TODO: Test_TC_BINFO_2_1 does not work on Darwin for now. - tests.disable('Test_TC_BINFO_2_1'); - - // TODO: Test_TC_SWTCH_2_1 does not work on Darwin for now. - tests.disable('Test_TC_SWTCH_2_1'); - - return tests; -} - -// -// Module exports -// -exports.getTests = getTests; -exports.getManualTests = getManualTests; diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json new file mode 100644 index 00000000000000..7d3af1e9b509ba --- /dev/null +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -0,0 +1,4 @@ +{ + "Test": ["Test_TC_BINFO_2_3_Simulated"], + "collection": ["Test"] +} diff --git a/examples/placeholder/linux/apps/app1/tests.js b/examples/placeholder/linux/apps/app1/tests.js deleted file mode 100644 index 134085e4c85367..00000000000000 --- a/examples/placeholder/linux/apps/app1/tests.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function getTests() -{ - const tests = [ - "Test_TC_BINFO_2_3_Simulated", - ]; - - return tests.join(', '); -} - -// -// Module exports -// -exports.getTests = getTests; diff --git a/examples/placeholder/templates/helper.js b/examples/placeholder/templates/helper.js deleted file mode 100644 index 01fc3dad95fec5..00000000000000 --- a/examples/placeholder/templates/helper.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function getTests() -{ - try { - const appTest = require('../linux/apps/app1/tests.js'); - return appTest.getTests(); - } catch (e) { - console.info("No tests configuration has been found."); - return ''; - } -} - -// -// Module exports -// -exports.getTests = getTests; diff --git a/examples/placeholder/templates/templates.json b/examples/placeholder/templates/templates.json index 8efe91f4650a47..5b4ee12daebc49 100644 --- a/examples/placeholder/templates/templates.json +++ b/examples/placeholder/templates/templates.json @@ -2,15 +2,19 @@ "name": "Placeholder templates", "version": "chip-v1", "helpers": [ - "../../../src/app/zap-templates/partials/helper.js", - "../../../src/app/zap-templates/common/StringHelper.js", - "../../../src/app/zap-templates/templates/app/helper.js", - "../../../src/app/zap-templates/templates/chip/helper.js", - "../../../src/app/zap-templates/common/ClusterTestGeneration.js", - "../../../examples/chip-tool/templates/helper.js", - "../../../examples/chip-tool/templates/tests/helper.js", - "helper.js" + "partials/helper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "chip-tool/templates/helper.js", + "chip-tool/templates/tests/helper.js" ], + "resources": { + "pics-metafile": "../../../src/app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../src/app/tests/suites/certification", + "test-metadir": "../../../src/app/tests/suites" + }, "override": "../../../src/app/zap-templates/common/override.js", "partials": [ { diff --git a/examples/placeholder/templates/tests-commands.zapt b/examples/placeholder/templates/tests-commands.zapt index 3c4f7a11776f72..f7bcbe375e802a 100644 --- a/examples/placeholder/templates/tests-commands.zapt +++ b/examples/placeholder/templates/tests-commands.zapt @@ -6,28 +6,23 @@ #include -{{#if (getTests)}} -{{>test_cluster tests=(getTests) credsIssuerConfigArg=false needsWaitDuration=false}} -{{/if}} +{{>test_cluster tests="../linux/apps/app1/ciTests.json" credsIssuerConfigArg=false needsWaitDuration=false}} std::unique_ptrGetTestCommand(std::string testName) { - {{#if (getTests)}} - {{#chip_tests (getTests)}} + {{#chip_tests "../linux/apps/app1/ciTests.json"}} if (testName == "{{filename}}") { return std::unique_ptr<{{filename}}Suite>(new {{filename}}Suite()); } {{/chip_tests}} - {{/if}} return nullptr; } void PrintTestCommands() { - {{#if (getTests)}} - {{#chip_tests (getTests)}} + {{#chip_tests "../linux/apps/app1/ciTests.json"}} {{#first}} ChipLogError(chipTool, "Supported commands:"); {{/first}} @@ -35,5 +30,4 @@ void PrintTestCommands() {{else}} ChipLogError("\t No available commands."); {{/chip_tests}} - {{/if}} } diff --git a/scripts/tools/sdk.json b/scripts/tools/sdk.json new file mode 100644 index 00000000000000..a464c0bf8c495e --- /dev/null +++ b/scripts/tools/sdk.json @@ -0,0 +1,290 @@ +{ + "meta": { + "sdkRoot": "../..", + "description": "Matter SDK", + "requiredFeatureLevel": 77 + }, + "zcl": { + "main": "src/app/zap-templates/zcl/zcl.json", + "main_ext": "src/app/zap-templates/zcl/zcl-with-test-extensions.json" + }, + "templates": { + "app-zap": "src/app/zap-templates/app-templates.json", + "placeholder": "examples/placeholder/templates/templates.json", + "chip-tool-test": "examples/chip-tool/templates/tests/templates.json", + "darwin-test": "examples/darwin-framework-tool/templates/tests/templates.json", + "app-common": "src/app/common/templates/templates.json", + "app-test": "src/app/tests/suites/templates/templates.json", + "chip-tool": "examples/chip-tool/templates/templates.json", + "darwin": "examples/darwin-framework-tool/templates/templates.json", + "python": "src/controller/python/templates/templates.json", + "darwin-chip": "src/darwin/Framework/CHIP/templates/templates.json", + "java": "src/controller/java/templates/templates.json" + }, + "zapFiles": { + "thermostat": "examples/thermostat/thermostat-common/thermostat.zap", + "bridge-app": "examples/bridge-app/bridge-common/bridge-app.zap", + "log-source-app": "examples/log-source-app/log-source-common/log-source-app.zap", + "lock-app": "examples/lock-app/lock-common/lock-app.zap", + "lighting-app": "examples/lighting-app/lighting-common/lighting-app.zap", + "all-clusters-minimal-app": "examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap", + "temperature-measurement": "examples/temperature-measurement-app/esp32/main/temperature-measurement.zap", + "all-clusters-app": "examples/all-clusters-app/all-clusters-common/all-clusters-app.zap", + "pump-controller-app": "examples/pump-controller-app/pump-controller-common/pump-controller-app.zap", + "tv-app": "examples/tv-app/tv-common/tv-app.zap", + "light-switch-app": "examples/light-switch-app/light-switch-common/light-switch-app.zap", + "ota-provider-app": "examples/ota-provider-app/ota-provider-common/ota-provider-app.zap", + "pump-app": "examples/pump-app/pump-common/pump-app.zap", + "ota-requestor-app": "examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap", + "tv-casting-app": "examples/tv-casting-app/tv-casting-common/tv-casting-app.zap", + "window-app": "examples/window-app/common/window-app.zap", + "app2": "examples/placeholder/linux/apps/app2/config.zap", + "app1": "examples/placeholder/linux/apps/app1/config.zap", + "chef_dimmablelight": "examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap", + "chef_contactsensor": "examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap", + "chef_humiditysensor": "examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap", + "chef_speaker": "examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap", + "chef_temperaturesensor": "examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap", + "chef_flowsensor": "examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap", + "chef_thermostat": "examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap", + "chef_onofflightswitch": "examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap", + "chef_heatingcoolingunit": "examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap", + "chef_occupancysensor": "examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap", + "chef_onofflight": "examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap", + "chef_pressuresensor": "examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap", + "chef_windowcovering": "examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap", + "chef_onoffpluginunit": "examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap", + "chef_lightsensor": "examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap", + "controller": "src/controller/data_model/controller-clusters.zap" + }, + "generation": [ + { + "zapFile": "all-clusters-app", + "output": "zzz_generated/all-clusters-app/zap-generated", + "zcl": "main_ext", + "template": "app-zap" + }, + { + "zapFile": "all-clusters-minimal-app", + "output": "zzz_generated/all-clusters-minimal-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "app1", + "output": "zzz_generated/placeholder/app1/zap-generated", + "zcl": "main", + "template": ["app-zap", "placeholder"] + }, + { + "zapFile": "app2", + "output": "zzz_generated/placeholder/app2/zap-generated", + "zcl": "main", + "template": ["app-zap", "placeholder"] + }, + { + "zapFile": "bridge-app", + "output": "zzz_generated/bridge-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_contactsensor", + "output": "zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_dimmablelight", + "output": "zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_flowsensor", + "output": "zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_heatingcoolingunit", + "output": "zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_humiditysensor", + "output": "zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_lightsensor", + "output": "zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_occupancysensor", + "output": "zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_onofflight", + "output": "zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_onofflightswitch", + "output": "zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_onoffpluginunit", + "output": "zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_pressuresensor", + "output": "zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_speaker", + "output": "zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_temperaturesensor", + "output": "zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_thermostat", + "output": "zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "chef_windowcovering", + "output": "zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "controller", + "output": "", + "zcl": "main", + "template": ["python", "darwin-chip", "java"] + }, + { + "zapFile": "controller", + "output": "zzz_generated/app-common/app-common/zap-generated", + "zcl": "main", + "template": ["app-common", "app-test"] + }, + { + "zapFile": "controller", + "output": "zzz_generated/chip-tool/zap-generated", + "zcl": "main", + "template": ["chip-tool-test", "chip-tool"] + }, + { + "zapFile": "controller", + "output": "zzz_generated/controller-clusters/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "controller", + "output": "zzz_generated/darwin-framework-tool/zap-generated", + "zcl": "main", + "template": ["darwin-test", "darwin"] + }, + { + "zapFile": "light-switch-app", + "output": "zzz_generated/light-switch-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "lighting-app", + "output": "zzz_generated/lighting-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "lock-app", + "output": "zzz_generated/lock-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "log-source-app", + "output": "zzz_generated/log-source-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "ota-provider-app", + "output": "zzz_generated/ota-provider-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "ota-requestor-app", + "output": "zzz_generated/ota-requestor-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "pump-app", + "output": "zzz_generated/pump-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "pump-controller-app", + "output": "zzz_generated/pump-controller-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "temperature-measurement", + "output": "zzz_generated/temperature-measurement-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "thermostat", + "output": "zzz_generated/thermostat/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "tv-app", + "output": "zzz_generated/tv-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "tv-casting-app", + "output": "zzz_generated/tv-casting-app/zap-generated", + "zcl": "main", + "template": "app-zap" + }, + { + "zapFile": "window-app", + "output": "zzz_generated/window-app/zap-generated", + "zcl": "main", + "template": "app-zap" + } + ] +} diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index 72b63a1c7fbb6c..5034390e373cd7 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -136,7 +136,7 @@ def extractGeneratedIdl(output_dir, zap_config_path): def runGeneration(zap_file, zcl_file, templates_file, output_dir): - generator_dir = getDirPath('third_party/zap/repo') + generator_dir = os.getenv('ZAP_PATH', getDirPath('third_party/zap/repo')) os.chdir(generator_dir) subprocess.check_call(['node', './src-script/zap-generate.js', '-z', zcl_file, '-g', templates_file, '-i', zap_file, '-o', output_dir]) diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 2e1ba3043bc24b..23838583aea61b 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -2,11 +2,11 @@ "name": "CHIP Application Common templates", "version": "chip-v1", "helpers": [ - "../../zap-templates/partials/helper.js", - "../../zap-templates/common/StringHelper.js", - "../../zap-templates/common/attributes/Accessors.js", - "../../zap-templates/templates/app/helper.js", - "../../zap-templates/templates/chip/helper.js" + "partials/helper.js", + "common/StringHelper.js", + "common/attributes/Accessors.js", + "templates/app/helper.js", + "templates/chip/helper.js" ], "override": "../../zap-templates/common/override.js", "partials": [ diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json new file mode 100644 index 00000000000000..0e862676eb601b --- /dev/null +++ b/src/app/tests/suites/ciTests.json @@ -0,0 +1,277 @@ +{ + "AccessControl": [ + "TestAccessControlCluster", + "Test_TC_ACL_1_1", + "Test_TC_ACL_2_1", + "Test_TC_ACL_2_2" + ], + "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], + "Binding": ["Test_TC_BIND_1_1"], + "Actions": ["Test_TC_ACT_1_1"], + "ColorControl": [ + "Test_TC_CC_1_1", + "Test_TC_CC_2_1", + "Test_TC_CC_3_2", + "Test_TC_CC_3_3", + "Test_TC_CC_4_1", + "Test_TC_CC_4_2", + "Test_TC_CC_4_3", + "Test_TC_CC_4_4", + "Test_TC_CC_5_1", + "Test_TC_CC_5_2", + "Test_TC_CC_5_3", + "Test_TC_CC_6_1", + "Test_TC_CC_6_2", + "Test_TC_CC_6_3", + "Test_TC_CC_7_2", + "Test_TC_CC_7_3", + "Test_TC_CC_7_4", + "Test_TC_CC_8_1" + ], + "DeviceManagement": [ + "Test_TC_BINFO_1_1", + "Test_TC_BINFO_2_1", + "Test_TC_CNET_1_3" + ], + "Descriptor": ["Test_TC_DESC_1_1"], + "EthernetNetworkDiagnostics": [ + "Test_TC_DGETH_1_1", + "Test_TC_DGETH_2_1", + "Test_TC_DGETH_2_2" + ], + "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], + "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], + "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], + "Identify": [ + "Test_TC_I_1_1", + "Test_TC_I_2_1", + "Test_TC_I_2_2", + "Test_TC_I_2_3" + ], + "IlluminanceMeasurement": ["Test_TC_ILL_1_1", "Test_TC_ILL_2_1"], + "OccupancySensing": ["Test_TC_OCC_1_1", "Test_TC_OCC_2_1"], + "LevelControl": [ + "Test_TC_LVL_1_1", + "Test_TC_LVL_2_1", + "Test_TC_LVL_2_2", + "Test_TC_LVL_3_1", + "Test_TC_LVL_4_1", + "Test_TC_LVL_5_1", + "Test_TC_LVL_6_1" + ], + "UserLabel": [ + "Test_TC_ULABEL_1_1", + "Test_TC_ULABEL_2_2", + "Test_TC_ULABEL_2_3", + "Test_TC_ULABEL_2_4" + ], + "MediaControl": [ + "Test_TC_LOWPOWER_1_1", + "Test_TC_KEYPADINPUT_1_2", + "Test_TC_APPLAUNCHER_1_3", + "Test_TC_MEDIAINPUT_1_4", + "Test_TC_WAKEONLAN_1_5", + "Test_TC_CHANNEL_1_6", + "Test_TC_MEDIAPLAYBACK_1_7", + "Test_TC_AUDIOOUTPUT_1_8", + "Test_TC_TGTNAV_1_9", + "Test_TC_TGTNAV_8_2", + "Test_TC_APBSC_1_10", + "Test_TC_CONTENTLAUNCHER_1_11", + "Test_TC_ALOGIN_1_12", + "Test_TC_LOWPOWER_2_1", + "Test_TC_KEYPADINPUT_3_2", + "Test_TC_KEYPADINPUT_3_3", + "Test_TC_APPLAUNCHER_3_5", + "Test_TC_APPLAUNCHER_3_6", + "Test_TC_APPLAUNCHER_3_7", + "Test_TC_APPLAUNCHER_3_8", + "Test_TC_APPLAUNCHER_3_9", + "Test_TC_MEDIAINPUT_3_10", + "Test_TC_MEDIAINPUT_3_11", + "Test_TC_MEDIAINPUT_3_12", + "Test_TC_MEDIAINPUT_3_13", + "Test_TC_CHANNEL_5_1", + "Test_TC_CHANNEL_5_2", + "Test_TC_CHANNEL_5_3", + "Test_TC_MEDIAPLAYBACK_6_1", + "Test_TC_MEDIAPLAYBACK_6_2", + "Test_TC_MEDIAPLAYBACK_6_3", + "Test_TC_MEDIAPLAYBACK_6_4", + "Test_TC_AUDIOOUTPUT_7_1", + "Test_TC_AUDIOOUTPUT_7_2", + "Test_TC_TGTNAV_8_1", + "Test_TC_APBSC_9_1", + "Test_TC_CONTENTLAUNCHER_10_1" + ], + "ModeSelect": ["Test_TC_MOD_1_1"], + "MultipleFabrics": [], + "OTASoftwareUpdate": ["OTA_SuccessfulTransfer"], + "OnOff": [ + "Test_TC_OO_1_1", + "Test_TC_OO_2_1", + "Test_TC_OO_2_2", + "Test_TC_OO_2_4" + ], + "PowerSource": ["Test_TC_PS_1_1", "Test_TC_PS_2_1"], + "PressureMeasurement": ["Test_TC_PRS_1_1", "Test_TC_PRS_2_1"], + "PumpConfigurationControl": [ + "Test_TC_PCC_1_1", + "Test_TC_PCC_2_1", + "Test_TC_PCC_2_2", + "Test_TC_PCC_2_3", + "Test_TC_PCC_2_4" + ], + "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1"], + "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], + "SecureChannel": ["Test_TC_SC_4_2"], + "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], + "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], + "Thermostat": [ + "Test_TC_TSTAT_1_1", + "Test_TC_TSTAT_2_1", + "Test_TC_TSTAT_2_2" + ], + "ThermostatUserConfiguration": [ + "Test_TC_TSUIC_1_1", + "Test_TC_TSUIC_2_1", + "Test_TC_TSUIC_2_2" + ], + "ThreadNetworkDiagnostics": [ + "Test_TC_DGTHREAD_1_1", + "Test_TC_DGTHREAD_2_1", + "Test_TC_DGTHREAD_2_2", + "Test_TC_DGTHREAD_2_3", + "Test_TC_DGTHREAD_2_4" + ], + "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_1", "Test_TC_DGWIFI_2_3"], + "WindowCovering": [ + "Test_TC_WNCV_1_1", + "Test_TC_WNCV_2_1", + "Test_TC_WNCV_2_2", + "Test_TC_WNCV_2_3", + "Test_TC_WNCV_2_4", + "Test_TC_WNCV_2_5", + "Test_TC_WNCV_3_1", + "Test_TC_WNCV_3_2", + "Test_TC_WNCV_3_3", + "Test_TC_WNCV_3_4", + "Test_TC_WNCV_3_5", + "Test_TC_WNCV_4_1", + "Test_TC_WNCV_4_2", + "Test_TC_WNCV_4_3", + "Test_TC_WNCV_4_4", + "Test_TC_WNCV_4_5" + ], + "TV": [ + "TV_TargetNavigatorCluster", + "TV_AudioOutputCluster", + "TV_ApplicationLauncherCluster", + "TV_KeypadInputCluster", + "TV_AccountLoginCluster", + "TV_WakeOnLanCluster", + "TV_ApplicationBasicCluster", + "TV_MediaPlaybackCluster", + "TV_ChannelCluster", + "TV_LowPowerCluster", + "TV_ContentLauncherCluster", + "TV_MediaInputCluster" + ], + "Others": [ + "TestCASERecovery", + "TestCluster", + "TestClusterComplexTypes", + "TestConstraints", + "TestDelayCommands", + "TestEvents", + "TestDiscovery", + "TestLogCommands", + "TestSaveAs", + "TestConfigVariables", + "TestDescriptorCluster", + "TestBasicInformation", + "TestFabricRemovalWhileSubscribed", + "TestGeneralCommissioning", + "TestIdentifyCluster", + "TestOperationalCredentialsCluster", + "TestModeSelectCluster", + "TestSelfFabricRemoval", + "TestSystemCommands", + "TestBinding", + "TestUserLabelCluster", + "TestUserLabelClusterConstraints", + "TestArmFailSafe", + "TestFanControl", + "TestAccessControlConstraints", + "TestLevelControlWithOnOffDependency", + "TestCommissioningWindow" + ], + "MultiAdmin": ["TestMultiAdmin"], + "SoftwareDiagnostics": [ + "Test_TC_DGSW_1_1", + "Test_TC_DGSW_2_1", + "Test_TC_DGSW_2_2", + "Test_TC_DGSW_2_3" + ], + "Subscriptions": ["TestSubscribe_OnOff"], + "DoorLock": [ + "DL_UsersAndCredentials", + "DL_LockUnlock", + "DL_Schedules", + "Test_TC_DRLK_1_1", + "Test_TC_DRLK_2_2", + "Test_TC_DRLK_2_3", + "Test_TC_DRLK_2_4", + "Test_TC_DRLK_2_5", + "Test_TC_DRLK_2_7", + "Test_TC_DRLK_2_9" + ], + "Groups": [ + "TestGroupMessaging", + "TestGroupsCluster", + "TestGroupKeyManagementCluster" + ], + "collection": [ + "AccessControl", + "BooleanState", + "Actions", + "Binding", + "ColorControl", + "DeviceManagement", + "Descriptor", + "EthernetNetworkDiagnostics", + "FlowMeasurement", + "GeneralCommissioning", + "GeneralDiagnostics", + "Identify", + "IlluminanceMeasurement", + "LevelControl", + "MediaControl", + "ModeSelect", + "MultipleFabrics", + "OTASoftwareUpdate", + "OccupancySensing", + "OnOff", + "PowerSource", + "PressureMeasurement", + "PumpConfigurationControl", + "PowerSourceConfiguration", + "RelativeHumidityMeasurement", + "SecureChannel", + "Switch", + "TemperatureMeasurement", + "Thermostat", + "ThermostatUserConfiguration", + "ThreadNetworkDiagnostics", + "UserLabel", + "WiFiNetworkDiagnostics", + "WindowCovering", + "TV", + "Others", + "MultiAdmin", + "SoftwareDiagnostics", + "Subscriptions", + "DoorLock", + "Groups" + ] +} diff --git a/src/app/tests/suites/examples/TestGenExample.zapt b/src/app/tests/suites/examples/TestGenExample.zapt index c6db5d473bf558..89709513b96298 100644 --- a/src/app/tests/suites/examples/TestGenExample.zapt +++ b/src/app/tests/suites/examples/TestGenExample.zapt @@ -1,4 +1,4 @@ -{{#chip_tests (getTests)}} +{{#chip_tests "ciTests.json"}} {{#chip_tests_config}} "Argument Name {{name}}" "Argument Type {{type}}" diff --git a/src/app/tests/suites/examples/ciTests.json b/src/app/tests/suites/examples/ciTests.json new file mode 100644 index 00000000000000..6936377dd7885e --- /dev/null +++ b/src/app/tests/suites/examples/ciTests.json @@ -0,0 +1,8 @@ +{ + "TestExample": [ + "examples/Test_Example_1", + "examples/Test_Example_2", + "examples/Test_Example_3" + ], + "collection": ["TestExample"] +} diff --git a/src/app/tests/suites/examples/manualTests.json b/src/app/tests/suites/examples/manualTests.json new file mode 100644 index 00000000000000..c685c849dacb22 --- /dev/null +++ b/src/app/tests/suites/examples/manualTests.json @@ -0,0 +1,4 @@ +{ + "ExampleManualCataCategory": ["examples/Test_Example"], + "collection": ["ExampleManualCataCategory"] +} diff --git a/src/app/tests/suites/examples/templates/templates.json b/src/app/tests/suites/examples/templates/templates.json index 6c7f81544b1e89..2552115d92f13b 100644 --- a/src/app/tests/suites/examples/templates/templates.json +++ b/src/app/tests/suites/examples/templates/templates.json @@ -1,11 +1,12 @@ { "name": "CHIP README Templates", "version": "chip-v1", - "helpers": [ - "../../../../zap-templates/common/ClusterTestGeneration.js", - "tests.js" - ], - + "helpers": ["common/ClusterTestGeneration.js"], + "resources": { + "pics-metafile": "../../../../app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../../app/tests/suites/certification", + "test-metadir": "../../../../app/tests/suites" + }, "templates": [ { "path": "../TestGenExample.zapt", diff --git a/src/app/tests/suites/examples/templates/tests.js b/src/app/tests/suites/examples/templates/tests.js deleted file mode 100644 index 2328879f061283..00000000000000 --- a/src/app/tests/suites/examples/templates/tests.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * Copyright (c) 2022 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. - */ - -function getManualTests() -{ - const ExampleManualCataCategory = [ - 'examples/Test_Example', - ]; - - const tests = [ - ExampleManualCataCategory, // - - ]; - return tests.flat(1); -} - -function getTests() -{ - const TestExample = [ - 'examples/Test_Example_1', - 'examples/Test_Example_2', - 'examples/Test_Example_3', - ]; - - const tests = [ - TestExample, // - ]; - return tests.flat(1); -} - -// -// Module exports -// -exports.getTests = getTests; -exports.getManualTests = getManualTests; diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json new file mode 100644 index 00000000000000..19f48bc4586852 --- /dev/null +++ b/src/app/tests/suites/manualTests.json @@ -0,0 +1,406 @@ +{ + "DeviceDiscovery": [ + "Test_TC_DD_1_5", + "Test_TC_DD_1_6", + "Test_TC_DD_1_7", + "Test_TC_DD_1_8", + "Test_TC_DD_1_9", + "Test_TC_DD_1_10", + "Test_TC_DD_1_11", + "Test_TC_DD_1_12", + "Test_TC_DD_1_13", + "Test_TC_DD_1_14", + "Test_TC_DD_1_15", + "Test_TC_DD_2_1", + "Test_TC_DD_2_2", + "Test_TC_DD_3_1", + "Test_TC_DD_3_2", + "Test_TC_DD_3_3", + "Test_TC_DD_3_4", + "Test_TC_DD_3_5", + "Test_TC_DD_3_6", + "Test_TC_DD_3_7", + "Test_TC_DD_3_8", + "Test_TC_DD_3_9", + "Test_TC_DD_3_10", + "Test_TC_DD_3_11", + "Test_TC_DD_3_12", + "Test_TC_DD_3_13", + "Test_TC_DD_3_14", + "Test_TC_DD_3_15", + "Test_TC_DD_3_16", + "Test_TC_DD_3_17", + "Test_TC_DD_3_18", + "Test_TC_DD_3_19", + "Test_TC_DD_3_20", + "Test_TC_DD_3_21" + ], + "Groups": [ + "TestGroupDemoCommand", + "TestGroupDemoConfig", + "Test_TC_G_1_1", + "Test_TC_G_2_1", + "Test_TC_G_2_2", + "Test_TC_G_2_3", + "Test_TC_G_3_1", + "Test_TC_G_3_2" + ], + "BulkDataExchangeProtocol": [ + "Test_TC_BDX_1_1", + "Test_TC_BDX_1_2", + "Test_TC_BDX_1_3", + "Test_TC_BDX_1_4", + "Test_TC_BDX_1_5", + "Test_TC_BDX_1_6", + "Test_TC_BDX_2_1", + "Test_TC_BDX_2_2", + "Test_TC_BDX_2_3", + "Test_TC_BDX_2_4", + "Test_TC_BDX_2_5" + ], + "bridge": ["Test_TC_BR_1", "Test_TC_BR_2", "Test_TC_BR_3", "Test_TC_BR_4"], + "DeviceAttestation": [ + "Test_TC_DA_1_1", + "Test_TC_DA_1_2", + "Test_TC_DA_1_3", + "Test_TC_DA_1_4", + "Test_TC_DA_1_5", + "Test_TC_DA_1_6", + "Test_TC_DA_1_7" + ], + "DeviceManagement": [ + "Test_TC_OPCREDS_1_2", + "Test_TC_BINFO_2_2", + "Test_TC_BINFO_2_4", + "Test_TC_OPCREDS_3_1", + "Test_TC_OPCREDS_3_2", + "Test_TC_OPCREDS_3_3", + "Test_TC_OPCREDS_3_4", + "Test_TC_CNET_4_1", + "Test_TC_CNET_4_2", + "Test_TC_CNET_4_3", + "Test_TC_CNET_4_4", + "Test_TC_CNET_4_5", + "Test_TC_CNET_4_6", + "Test_TC_CNET_4_9", + "Test_TC_CNET_4_10", + "Test_TC_CNET_4_11", + "Test_TC_CNET_4_12", + "Test_TC_CNET_4_13", + "Test_TC_CNET_4_14", + "Test_TC_CNET_4_15", + "Test_TC_CNET_4_16", + "Test_TC_CNET_4_17", + "Test_TC_CNET_4_18", + "Test_TC_CNET_4_19", + "Test_TC_CNET_4_20", + "Test_TC_CNET_4_21", + "Test_TC_CNET_4_22" + ], + "DiagnosticsLogs": [ + "Test_TC_DLOG_1_1", + "Test_TC_DLOG_2_1", + "Test_TC_DLOG_2_2", + "Test_TC_DLOG_3_1" + ], + "Descriptor": ["Test_TC_DESC_2_1", "Test_TC_DESC_2_2"], + "EthernetNetworkDiagnostics": ["Test_TC_DGETH_3_1", "Test_TC_DGETH_3_2"], + "GeneralCommissioning": ["Test_TC_CGEN_2_2", "Test_TC_CGEN_2_4"], + "GeneralDiagnostics": [ + "Test_TC_DGGEN_2_2", + "Test_TC_DGGEN_2_3", + "Test_TC_DGGEN_3_1" + ], + "Identify": ["Test_TC_I_3_1", "Test_TC_I_3_2"], + "IlluminanceMeasurement": ["Test_TC_ILL_2_2", "Test_TC_ILL_3_1"], + "InteractionDataModel": [ + "Test_TC_IDM_1_1", + "Test_TC_IDM_1_2", + "Test_TC_IDM_2_1", + "Test_TC_IDM_2_2", + "Test_TC_IDM_3_1", + "Test_TC_IDM_3_2", + "Test_TC_IDM_4_1", + "Test_TC_IDM_4_2", + "Test_TC_IDM_4_3", + "Test_TC_IDM_5_1", + "Test_TC_IDM_5_2", + "Test_TC_IDM_6_1", + "Test_TC_IDM_6_2", + "Test_TC_IDM_6_3", + "Test_TC_IDM_6_4", + "Test_TC_IDM_7_1", + "Test_TC_IDM_8_1" + ], + "MediaControl": [ + "Test_TC_LOWPOWER_2_2", + "Test_TC_APPLAUNCHER_3_7_1", + "Test_TC_APPLAUNCHER_3_8_1", + "Test_TC_APPLAUNCHER_3_9_1", + "Test_TC_MEDIAINPUT_3_14", + "Test_TC_MEDIAINPUT_3_15", + "Test_TC_MEDIAINPUT_3_16", + "Test_TC_MEDIAINPUT_3_17", + "Test_TC_WAKEONLAN_4_1", + "Test_TC_CHANNEL_5_4", + "Test_TC_CHANNEL_5_5", + "Test_TC_CHANNEL_5_6", + "Test_TC_KEYPADINPUT_3_1", + "Test_TC_MEDIAPLAYBACK_6_5", + "Test_TC_MEDIAPLAYBACK_6_7", + "Test_TC_AUDIOOUTPUT_7_3", + "Test_TC_AUDIOOUTPUT_7_4", + "Test_TC_CONTENTLAUNCHER_10_3", + "Test_TC_CONTENTLAUNCHER_10_4", + "Test_TC_CONTENTLAUNCHER_10_5", + "Test_TC_CONTENTLAUNCHER_10_7", + "Test_TC_MC_11_1", + "Test_TC_MC_11_2", + "Test_TC_ALOGIN_12_1", + "Test_TC_ALOGIN_12_2" + ], + "MultipleFabrics": [ + "Test_TC_CADMIN_1_1", + "Test_TC_CADMIN_1_2", + "Test_TC_CADMIN_1_7", + "Test_TC_CADMIN_1_8", + "Test_TC_CADMIN_1_11", + "Test_TC_CADMIN_1_12", + "Test_TC_CADMIN_1_14", + "Test_TC_CADMIN_1_15", + "Test_TC_CADMIN_1_16", + "Test_TC_CADMIN_1_17", + "Test_TC_CADMIN_1_18", + "Test_TC_CADMIN_1_19", + "Test_TC_CADMIN_1_20", + "Test_TC_CADMIN_1_21", + "Test_TC_CADMIN_1_22", + "Test_TC_CADMIN_1_3", + "Test_TC_CADMIN_1_4", + "Test_TC_CADMIN_1_5", + "Test_TC_CADMIN_1_6", + "Test_TC_CADMIN_1_9", + "Test_TC_CADMIN_1_10", + "Test_TC_CADMIN_1_13", + "Test_TC_CADMIN_1_23", + "Test_TC_CADMIN_1_24" + ], + "ModeSelect": [ + "Test_TC_MOD_1_2", + "Test_TC_MOD_1_3", + "Test_TC_MOD_2_1", + "Test_TC_MOD_2_2", + "Test_TC_MOD_3_1", + "Test_TC_MOD_3_2", + "Test_TC_MOD_3_3", + "Test_TC_MOD_3_4" + ], + "OTASoftwareUpdate": [ + "Test_TC_SU_1_1", + "Test_TC_SU_2_1", + "Test_TC_SU_2_2", + "Test_TC_SU_2_3", + "Test_TC_SU_2_4", + "Test_TC_SU_2_5", + "Test_TC_SU_2_6", + "Test_TC_SU_2_7", + "Test_TC_SU_2_8", + "Test_TC_SU_3_1", + "Test_TC_SU_3_2", + "Test_TC_SU_3_3", + "Test_TC_SU_3_4", + "Test_TC_SU_4_1", + "Test_TC_SU_4_2" + ], + "PowerSourceConfiguration": [ + "Test_TC_PSCFG_2_1", + "Test_TC_PSCFG_2_2", + "Test_TC_PSCFG_3_1" + ], + "SecureChannel": [ + "Test_TC_SC_1_1", + "Test_TC_SC_1_2", + "Test_TC_SC_1_3", + "Test_TC_SC_1_4", + "Test_TC_SC_2_1", + "Test_TC_SC_2_2", + "Test_TC_SC_2_3", + "Test_TC_SC_2_4", + "Test_TC_SC_3_1", + "Test_TC_SC_3_2", + "Test_TC_SC_3_3", + "Test_TC_SC_3_4", + "Test_TC_SC_3_6", + "Test_TC_SC_4_1", + "Test_TC_SC_4_3", + "Test_TC_SC_4_4", + "Test_TC_SC_4_5", + "Test_TC_SC_4_6", + "Test_TC_SC_4_7", + "Test_TC_SC_4_8", + "Test_TC_SC_4_9", + "Test_TC_SC_4_10" + ], + "SoftwareDiagnostics": ["Test_TC_DGSW_3_1", "Test_TC_DGSW_3_2"], + "WiFiNetworkDiagnostics": [ + "Test_TC_DGWIFI_1_1", + "Test_TC_DGWIFI_2_2", + "Test_TC_DGWIFI_3_1", + "Test_TC_DGWIFI_3_2" + ], + "WindowCovering": ["Test_TC_WNCV_6_1", "Test_TC_WNCV_7_1"], + "FlowMeasurement": ["Test_TC_FLW_2_2", "Test_TC_FLW_3_1"], + "OccupancySensing": [ + "Test_TC_OCC_2_2", + "Test_TC_OCC_2_3", + "Test_TC_OCC_2_4", + "Test_TC_OCC_3_1", + "Test_TC_OCC_3_2" + ], + "PressureMeasurement": ["Test_TC_PRS_2_2", "Test_TC_PRS_3_1"], + "PowerSource": ["Test_TC_PS_2_2", "Test_TC_PS_3_1"], + "BooleanState": ["Test_TC_BOOL_2_2", "Test_TC_BOOL_3_1"], + "ColorControl": [ + "Test_TC_CC_2_2", + "Test_TC_CC_3_4", + "Test_TC_CC_4_5", + "Test_TC_CC_5_4", + "Test_TC_CC_6_4", + "Test_TC_CC_7_5", + "Test_TC_CC_9_4", + "Test_TC_CC_3_1", + "Test_TC_CC_7_1", + "Test_TC_CC_9_1", + "Test_TC_CC_9_2", + "Test_TC_CC_9_3" + ], + "DoorLock": [ + "Test_TC_DRLK_2_1", + "Test_TC_DRLK_2_6", + "Test_TC_DRLK_2_8", + "Test_TC_DRLK_2_10", + "Test_TC_DRLK_3_1", + "Test_TC_DRLK_3_2", + "Test_TC_DRLK_3_3" + ], + "LocalizationConfiguration": [ + "Test_TC_LCFG_1_1", + "Test_TC_LCFG_2_1", + "Test_TC_LCFG_3_1" + ], + "LevelControl": ["Test_TC_LVL_2_3", "Test_TC_LVL_7_1", "Test_TC_LVL_8_1"], + "OnOff": ["Test_TC_OO_2_3", "Test_TC_OO_3_1", "Test_TC_OO_3_2"], + "RelativeHumidityMeasurement": ["Test_TC_RH_2_2", "Test_TC_RH_3_1"], + "Switch": ["Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_1", "Test_TC_SWTCH_3_2"], + "TemperatureMeasurement": ["Test_TC_TMP_2_2", "Test_TC_TMP_3_1"], + "Thermostat": ["Test_TC_TSTAT_3_1", "Test_TC_TSTAT_3_2"], + "ThermostatUserConfiguration": ["Test_TC_TSUIC_3_1"], + "ThreadNetworkDiagnostics": [ + "Test_TC_DGTHREAD_2_5", + "Test_TC_DGTHREAD_3_1", + "Test_TC_DGTHREAD_3_2", + "Test_TC_DGTHREAD_3_3", + "Test_TC_DGTHREAD_3_4", + "Test_TC_DGTHREAD_3_5" + ], + "Actions": [ + "Test_TC_ACT_2_1", + "Test_TC_ACT_2_2", + "Test_TC_ACT_3_1", + "Test_TC_ACT_3_2" + ], + "TimeFormatLocalization": [ + "Test_TC_LTIME_1_1", + "Test_TC_LTIME_1_2", + "Test_TC_LTIME_2_1", + "Test_TC_LTIME_3_1" + ], + "UnitLocalization": [ + "Test_TC_LUNIT_1_1", + "Test_TC_LUNIT_1_2", + "Test_TC_LUNIT_2_1", + "Test_TC_LUNIT_3_1" + ], + "FixedLabel": [ + "Test_TC_FLABEL_1_1", + "Test_TC_FLABEL_2_1", + "Test_TC_FLABEL_3_1" + ], + "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], + "Scenes": [ + "Test_TC_S_1_1", + "Test_TC_S_2_1", + "Test_TC_S_2_2", + "Test_TC_S_2_3", + "Test_TC_S_3_1" + ], + "PumpConfigurationControl": ["Test_TC_PCC_3_1"], + "AccessControl": [ + "Test_TC_ACL_2_3", + "Test_TC_ACL_2_4", + "Test_TC_ACL_2_5", + "Test_TC_ACL_2_6", + "Test_TC_ACL_2_7", + "Test_TC_ACL_2_8", + "Test_TC_ACL_2_9", + "Test_TC_ACL_2_10" + ], + "UserLabel": ["Test_TC_ULABEL_2_1", "Test_TC_ULABEL_3_1"], + "BridgedDeviceBasicInformation": [ + "Test_TC_BRBINFO_1_1", + "Test_TC_BRBINFO_2_1", + "Test_TC_BRBINFO_2_2", + "Test_TC_BRBINFO_2_3" + ], + "collection": [ + "DeviceDiscovery", + "Groups", + "BulkDataExchangeProtocol", + "bridge", + "DeviceAttestation", + "DeviceManagement", + "DiagnosticsLogs", + "Descriptor", + "EthernetNetworkDiagnostics", + "GeneralCommissioning", + "GeneralDiagnostics", + "Identify", + "IlluminanceMeasurement", + "InteractionDataModel", + "MediaControl", + "MultipleFabrics", + "ModeSelect", + "OTASoftwareUpdate", + "PowerSourceConfiguration", + "SecureChannel", + "SoftwareDiagnostics", + "WiFiNetworkDiagnostics", + "WindowCovering", + "FlowMeasurement", + "OccupancySensing", + "PressureMeasurement", + "PowerSource", + "BooleanState", + "ColorControl", + "DoorLock", + "LocalizationConfiguration", + "LevelControl", + "OnOff", + "RelativeHumidityMeasurement", + "Switch", + "TemperatureMeasurement", + "Thermostat", + "ThermostatUserConfiguration", + "ThreadNetworkDiagnostics", + "Actions", + "TimeFormatLocalization", + "UnitLocalization", + "FixedLabel", + "Binding", + "Scenes", + "PumpConfigurationControl", + "AccessControl", + "UserLabel", + "BridgedDeviceBasicInformation" + ] +} diff --git a/src/app/tests/suites/templates/templates.json b/src/app/tests/suites/templates/templates.json index ec7d113bb14a9e..2a174671c2763b 100644 --- a/src/app/tests/suites/templates/templates.json +++ b/src/app/tests/suites/templates/templates.json @@ -2,11 +2,16 @@ "name": "CHIP Tests templates", "version": "chip-v1", "helpers": [ - "../../../zap-templates/common/StringHelper.js", - "../../../zap-templates/templates/app/helper.js", - "../../../zap-templates/templates/chip/helper.js", - "../../../zap-templates/common/ClusterTestGeneration.js" + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js" ], + "resources": { + "pics-metafile": "../../../tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../tests/suites/certification", + "test-metadir": "../../../tests/suites" + }, "override": "../../../zap-templates/common/override.js", "partials": [ { diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js deleted file mode 100644 index 86799a1415e135..00000000000000 --- a/src/app/tests/suites/tests.js +++ /dev/null @@ -1,945 +0,0 @@ -/* - * - * Copyright (c) 2021-2022 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. - */ - -function disable(testName) -{ - const index = this.indexOf(testName); - if (index == -1) { - const errStr = `Test ${testName} does not exists.`; - throw new Error(errStr); - } - - this.splice(index, 1); -} - -// clang-format off - -function getManualTests() { - const DeviceDiscovery = [ - "Test_TC_DD_1_5", - "Test_TC_DD_1_6", - "Test_TC_DD_1_7", - "Test_TC_DD_1_8", - "Test_TC_DD_1_9", - "Test_TC_DD_1_10", - "Test_TC_DD_1_11", - "Test_TC_DD_1_12", - "Test_TC_DD_1_13", - "Test_TC_DD_1_14", - "Test_TC_DD_1_15", - "Test_TC_DD_2_1", - "Test_TC_DD_2_2", - "Test_TC_DD_3_1", - "Test_TC_DD_3_2", - "Test_TC_DD_3_3", - "Test_TC_DD_3_4", - "Test_TC_DD_3_5", - "Test_TC_DD_3_6", - "Test_TC_DD_3_7", - "Test_TC_DD_3_8", - "Test_TC_DD_3_9", - "Test_TC_DD_3_10", - "Test_TC_DD_3_11", - "Test_TC_DD_3_12", - "Test_TC_DD_3_13", - "Test_TC_DD_3_14", - "Test_TC_DD_3_15", - "Test_TC_DD_3_16", - "Test_TC_DD_3_17", - "Test_TC_DD_3_18", - "Test_TC_DD_3_19", - "Test_TC_DD_3_20", - "Test_TC_DD_3_21", - ]; - - const Groups = [ - "TestGroupDemoCommand", - "TestGroupDemoConfig", - "Test_TC_G_1_1", - "Test_TC_G_2_1", - "Test_TC_G_2_2", - "Test_TC_G_2_3", - "Test_TC_G_3_1", - "Test_TC_G_3_2", - ]; - - const BulkDataExchangeProtocol = [ - "Test_TC_BDX_1_1", - "Test_TC_BDX_1_2", - "Test_TC_BDX_1_3", - "Test_TC_BDX_1_4", - "Test_TC_BDX_1_5", - "Test_TC_BDX_1_6", - "Test_TC_BDX_2_1", - "Test_TC_BDX_2_2", - "Test_TC_BDX_2_3", - "Test_TC_BDX_2_4", - "Test_TC_BDX_2_5", - ]; - - const bridge = [ - "Test_TC_BR_1", - "Test_TC_BR_2", - "Test_TC_BR_3", - "Test_TC_BR_4", - ]; - - const DeviceAttestation = [ - "Test_TC_DA_1_1", - "Test_TC_DA_1_2", - "Test_TC_DA_1_3", - "Test_TC_DA_1_4", - "Test_TC_DA_1_5", - "Test_TC_DA_1_6", - "Test_TC_DA_1_7", - ]; - - const DeviceManagement = [ - "Test_TC_OPCREDS_1_2", - "Test_TC_BINFO_2_2", - "Test_TC_BINFO_2_4", - "Test_TC_OPCREDS_3_1", - "Test_TC_OPCREDS_3_2", - "Test_TC_OPCREDS_3_3", - "Test_TC_OPCREDS_3_4", - "Test_TC_CNET_4_1", - "Test_TC_CNET_4_2", - "Test_TC_CNET_4_3", - "Test_TC_CNET_4_4", - "Test_TC_CNET_4_5", - "Test_TC_CNET_4_6", - "Test_TC_CNET_4_9", - "Test_TC_CNET_4_10", - "Test_TC_CNET_4_11", - "Test_TC_CNET_4_12", - "Test_TC_CNET_4_13", - "Test_TC_CNET_4_14", - "Test_TC_CNET_4_15", - "Test_TC_CNET_4_16", - "Test_TC_CNET_4_17", - "Test_TC_CNET_4_18", - "Test_TC_CNET_4_19", - "Test_TC_CNET_4_20", - "Test_TC_CNET_4_21", - "Test_TC_CNET_4_22", - ]; - - const DiagnosticsLogs = [ - "Test_TC_DLOG_1_1", - "Test_TC_DLOG_2_1", - "Test_TC_DLOG_2_2", - "Test_TC_DLOG_3_1", - ]; - - const Descriptor = [ - "Test_TC_DESC_2_1", - "Test_TC_DESC_2_2", - ]; - - const EthernetNetworkDiagnostics = [ - "Test_TC_DGETH_3_1", - "Test_TC_DGETH_3_2", - ]; - - const GeneralCommissioning = [ - "Test_TC_CGEN_2_2", - "Test_TC_CGEN_2_4", - ]; - - const GeneralDiagnostics = [ - "Test_TC_DGGEN_2_2", - "Test_TC_DGGEN_2_3", - "Test_TC_DGGEN_3_1", - ]; - - const Identify = [ - "Test_TC_I_3_1", - "Test_TC_I_3_2", - ]; - - const IlluminanceMeasurement = [ - "Test_TC_ILL_2_2", - "Test_TC_ILL_3_1", - ]; - - const InteractionDataModel = [ - "Test_TC_IDM_1_1", - "Test_TC_IDM_1_2", - "Test_TC_IDM_2_1", - "Test_TC_IDM_2_2", - "Test_TC_IDM_3_1", - "Test_TC_IDM_3_2", - "Test_TC_IDM_4_1", - "Test_TC_IDM_4_2", - "Test_TC_IDM_4_3", - "Test_TC_IDM_5_1", - "Test_TC_IDM_5_2", - "Test_TC_IDM_6_1", - "Test_TC_IDM_6_2", - "Test_TC_IDM_6_3", - "Test_TC_IDM_6_4", - "Test_TC_IDM_7_1", - "Test_TC_IDM_8_1", - ]; - - const MediaControl = [ - "Test_TC_LOWPOWER_2_2", - "Test_TC_APPLAUNCHER_3_7_1", - "Test_TC_APPLAUNCHER_3_8_1", - "Test_TC_APPLAUNCHER_3_9_1", - "Test_TC_MEDIAINPUT_3_14", - "Test_TC_MEDIAINPUT_3_15", - "Test_TC_MEDIAINPUT_3_16", - "Test_TC_MEDIAINPUT_3_17", - "Test_TC_WAKEONLAN_4_1", - "Test_TC_CHANNEL_5_4", - "Test_TC_CHANNEL_5_5", - "Test_TC_CHANNEL_5_6", - "Test_TC_KEYPADINPUT_3_1", - "Test_TC_MEDIAPLAYBACK_6_5", - "Test_TC_MEDIAPLAYBACK_6_7", - "Test_TC_AUDIOOUTPUT_7_3", - "Test_TC_AUDIOOUTPUT_7_4", - "Test_TC_CONTENTLAUNCHER_10_3", - "Test_TC_CONTENTLAUNCHER_10_4", - "Test_TC_CONTENTLAUNCHER_10_5", - "Test_TC_CONTENTLAUNCHER_10_7", - "Test_TC_MC_11_1", - "Test_TC_MC_11_2", - "Test_TC_ALOGIN_12_1", - "Test_TC_ALOGIN_12_2", - ]; - - const MultipleFabrics = [ - "Test_TC_CADMIN_1_1", - "Test_TC_CADMIN_1_2", - "Test_TC_CADMIN_1_7", - "Test_TC_CADMIN_1_8", - "Test_TC_CADMIN_1_11", - "Test_TC_CADMIN_1_12", - "Test_TC_CADMIN_1_14", - "Test_TC_CADMIN_1_15", - "Test_TC_CADMIN_1_16", - "Test_TC_CADMIN_1_17", - "Test_TC_CADMIN_1_18", - "Test_TC_CADMIN_1_19", - "Test_TC_CADMIN_1_20", - "Test_TC_CADMIN_1_21", - "Test_TC_CADMIN_1_22", - // Slow tests that should not run in CI because they take many minutes each - "Test_TC_CADMIN_1_3", - "Test_TC_CADMIN_1_4", - "Test_TC_CADMIN_1_5", - "Test_TC_CADMIN_1_6", - "Test_TC_CADMIN_1_9", - "Test_TC_CADMIN_1_10", - "Test_TC_CADMIN_1_13", - "Test_TC_CADMIN_1_23", - "Test_TC_CADMIN_1_24", - ]; - - const ModeSelect = [ - "Test_TC_MOD_1_2", - "Test_TC_MOD_1_3", - "Test_TC_MOD_2_1", - "Test_TC_MOD_2_2", - "Test_TC_MOD_3_1", - "Test_TC_MOD_3_2", - "Test_TC_MOD_3_3", - "Test_TC_MOD_3_4", - ]; - - const OTASoftwareUpdate = [ - "Test_TC_SU_1_1", - "Test_TC_SU_2_1", - "Test_TC_SU_2_2", - "Test_TC_SU_2_3", - "Test_TC_SU_2_4", - "Test_TC_SU_2_5", - "Test_TC_SU_2_6", - "Test_TC_SU_2_7", - "Test_TC_SU_2_8", - "Test_TC_SU_3_1", - "Test_TC_SU_3_2", - "Test_TC_SU_3_3", - "Test_TC_SU_3_4", - "Test_TC_SU_4_1", - "Test_TC_SU_4_2", - ]; - - const PowerSourceConfiguration = [ - "Test_TC_PSCFG_2_1", - "Test_TC_PSCFG_2_2", - "Test_TC_PSCFG_3_1", - ]; - - const SecureChannel = [ - "Test_TC_SC_1_1", - "Test_TC_SC_1_2", - "Test_TC_SC_1_3", - "Test_TC_SC_1_4", - "Test_TC_SC_2_1", - "Test_TC_SC_2_2", - "Test_TC_SC_2_3", - "Test_TC_SC_2_4", - "Test_TC_SC_3_1", - "Test_TC_SC_3_2", - "Test_TC_SC_3_3", - "Test_TC_SC_3_4", - "Test_TC_SC_3_6", - "Test_TC_SC_4_1", - "Test_TC_SC_4_3", - "Test_TC_SC_4_4", - "Test_TC_SC_4_5", - "Test_TC_SC_4_6", - "Test_TC_SC_4_7", - "Test_TC_SC_4_8", - "Test_TC_SC_4_9", - "Test_TC_SC_4_10", - ]; - - const SoftwareDiagnostics = [ - "Test_TC_DGSW_3_1", - "Test_TC_DGSW_3_2", - ]; - - const WiFiNetworkDiagnostics = [ - "Test_TC_DGWIFI_1_1", - "Test_TC_DGWIFI_2_2", - "Test_TC_DGWIFI_3_1", - "Test_TC_DGWIFI_3_2", - ]; - - const WindowCovering = [ - "Test_TC_WNCV_6_1", - "Test_TC_WNCV_7_1", - ]; - - const FlowMeasurement = [ - "Test_TC_FLW_2_2", - "Test_TC_FLW_3_1", - ]; - - const OccupancySensing = [ - "Test_TC_OCC_2_2", - "Test_TC_OCC_2_3", - "Test_TC_OCC_2_4", - "Test_TC_OCC_3_1", - "Test_TC_OCC_3_2", - ]; - - const PressureMeasurement = [ - "Test_TC_PRS_2_2", - "Test_TC_PRS_3_1", - ]; - - const PowerSource = [ - "Test_TC_PS_2_2", - "Test_TC_PS_3_1", - ]; - - const BooleanState = [ - "Test_TC_BOOL_2_2", - "Test_TC_BOOL_3_1", - ]; - - const ColorControl = [ - "Test_TC_CC_2_2", - "Test_TC_CC_3_4", - "Test_TC_CC_4_5", - "Test_TC_CC_5_4", - "Test_TC_CC_6_4", - "Test_TC_CC_7_5", - "Test_TC_CC_9_4", - // Slow tests that should not run in CI because they take many minutes each - "Test_TC_CC_3_1", - "Test_TC_CC_7_1", - "Test_TC_CC_9_1", - "Test_TC_CC_9_2", - "Test_TC_CC_9_3", - ]; - - const DoorLock = [ - "Test_TC_DRLK_2_1", - "Test_TC_DRLK_2_6", - "Test_TC_DRLK_2_8", - "Test_TC_DRLK_2_10", - "Test_TC_DRLK_3_1", - "Test_TC_DRLK_3_2", - "Test_TC_DRLK_3_3", - ]; - - const LocalizationConfiguration = [ - "Test_TC_LCFG_1_1", - "Test_TC_LCFG_2_1", - "Test_TC_LCFG_3_1", - ]; - - const LevelControl = [ - "Test_TC_LVL_2_3", - "Test_TC_LVL_7_1", - "Test_TC_LVL_8_1", - ]; - - const OnOff = [ - "Test_TC_OO_2_3", - "Test_TC_OO_3_1", - "Test_TC_OO_3_2", - ]; - - const RelativeHumidityMeasurement = [ - "Test_TC_RH_2_2", - "Test_TC_RH_3_1", - ]; - - const Switch = [ - "Test_TC_SWTCH_2_2", - "Test_TC_SWTCH_3_1", - "Test_TC_SWTCH_3_2", - ]; - - const TemperatureMeasurement = [ - "Test_TC_TMP_2_2", - "Test_TC_TMP_3_1", - ]; - - const Thermostat = [ - "Test_TC_TSTAT_3_1", - "Test_TC_TSTAT_3_2", - ]; - - const ThermostatUserConfiguration = [ - "Test_TC_TSUIC_3_1", - ]; - - const ThreadNetworkDiagnostics = [ - "Test_TC_DGTHREAD_2_5", - "Test_TC_DGTHREAD_3_1", - "Test_TC_DGTHREAD_3_2", - "Test_TC_DGTHREAD_3_3", - "Test_TC_DGTHREAD_3_4", - "Test_TC_DGTHREAD_3_5", - ]; - - const Actions = [ - "Test_TC_ACT_2_1", - "Test_TC_ACT_2_2", - "Test_TC_ACT_3_1", - "Test_TC_ACT_3_2", - ]; - - const TimeFormatLocalization = [ - "Test_TC_LTIME_1_1", - "Test_TC_LTIME_1_2", - "Test_TC_LTIME_2_1", - "Test_TC_LTIME_3_1", - ]; - - const UnitLocalization = [ - "Test_TC_LUNIT_1_1", - "Test_TC_LUNIT_1_2", - "Test_TC_LUNIT_2_1", - "Test_TC_LUNIT_3_1", - ]; - - const FixedLabel = [ - "Test_TC_FLABEL_1_1", - "Test_TC_FLABEL_2_1", - "Test_TC_FLABEL_3_1", - ]; - - const Binding = [ - "Test_TC_BIND_2_1", - "Test_TC_BIND_2_2", - "Test_TC_BIND_2_3", - ]; - - const Scenes = [ - "Test_TC_S_1_1", - "Test_TC_S_2_1", - "Test_TC_S_2_2", - "Test_TC_S_2_3", - "Test_TC_S_3_1", - ]; - - const PumpConfigurationControl = [ - "Test_TC_PCC_3_1", - ]; - - const AccessControl = [ - "Test_TC_ACL_2_3", - "Test_TC_ACL_2_4", - "Test_TC_ACL_2_5", - "Test_TC_ACL_2_6", - "Test_TC_ACL_2_7", - "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9", - "Test_TC_ACL_2_10", - ]; - - const UserLabel = [ - "Test_TC_ULABEL_2_1", - "Test_TC_ULABEL_3_1", - ]; - - const BridgedDeviceBasicInformation = [ - "Test_TC_BRBINFO_1_1", - "Test_TC_BRBINFO_2_1", - "Test_TC_BRBINFO_2_2", - "Test_TC_BRBINFO_2_3", - ]; - - const tests = [ - DeviceDiscovery, - Groups, - BulkDataExchangeProtocol, - bridge, - DeviceAttestation, - DeviceManagement, - DiagnosticsLogs, - Descriptor, - EthernetNetworkDiagnostics, - GeneralCommissioning, - GeneralDiagnostics, - Identify, - IlluminanceMeasurement, - InteractionDataModel, - MediaControl, - MultipleFabrics, - ModeSelect, - OTASoftwareUpdate, - PowerSourceConfiguration, - SecureChannel, - SoftwareDiagnostics, - WiFiNetworkDiagnostics, - WindowCovering, - FlowMeasurement, - OccupancySensing, - PressureMeasurement, - PowerSource, - BooleanState, - ColorControl, - DoorLock, - LocalizationConfiguration, - LevelControl, - OnOff, - RelativeHumidityMeasurement, - Switch, - TemperatureMeasurement, - Thermostat, - ThermostatUserConfiguration, - ThreadNetworkDiagnostics, - Actions, - TimeFormatLocalization, - UnitLocalization, - FixedLabel, - Binding, - Scenes, - PumpConfigurationControl, - AccessControl, - UserLabel, - BridgedDeviceBasicInformation, - ].flat(1); - - tests.disable = disable.bind(tests); - return tests; -} - -function getTests() { - const AccessControl = [ - "TestAccessControlCluster", - "Test_TC_ACL_1_1", - "Test_TC_ACL_2_1", - "Test_TC_ACL_2_2", - ]; - - const BooleanState = [ - "Test_TC_BOOL_1_1", - "Test_TC_BOOL_2_1", - ]; - - const Actions = [ - "Test_TC_ACT_1_1", - ]; - - const Binding = [ - "Test_TC_BIND_1_1", - ] - - const ColorControl = [ - "Test_TC_CC_1_1", - "Test_TC_CC_2_1", - "Test_TC_CC_3_2", - "Test_TC_CC_3_3", - "Test_TC_CC_4_1", - "Test_TC_CC_4_2", - "Test_TC_CC_4_3", - "Test_TC_CC_4_4", - "Test_TC_CC_5_1", - "Test_TC_CC_5_2", - "Test_TC_CC_5_3", - "Test_TC_CC_6_1", - "Test_TC_CC_6_2", - "Test_TC_CC_6_3", - "Test_TC_CC_7_2", - "Test_TC_CC_7_3", - "Test_TC_CC_7_4", - "Test_TC_CC_8_1", - ]; - - const DeviceManagement = [ - "Test_TC_BINFO_1_1", - "Test_TC_BINFO_2_1", - "Test_TC_CNET_1_3", - ]; - - const Descriptor = [ - "Test_TC_DESC_1_1", - ]; - - const EthernetNetworkDiagnostics = [ - "Test_TC_DGETH_1_1", - "Test_TC_DGETH_2_1", - "Test_TC_DGETH_2_2", - ]; - - const FlowMeasurement = [ - "Test_TC_FLW_1_1", - "Test_TC_FLW_2_1", - ]; - - const GeneralCommissioning = [ - "Test_TC_CGEN_1_1", - "Test_TC_CGEN_2_1", - ]; - - const GeneralDiagnostics = [ - "Test_TC_DGGEN_1_1", - "Test_TC_DGGEN_2_1", - ]; - - const Identify = [ - "Test_TC_I_1_1", - "Test_TC_I_2_1", - "Test_TC_I_2_2", - "Test_TC_I_2_3", - ]; - - const IlluminanceMeasurement = [ - "Test_TC_ILL_1_1", - "Test_TC_ILL_2_1", - ]; - - const OccupancySensing = [ - "Test_TC_OCC_1_1", - "Test_TC_OCC_2_1", - ]; - - const LevelControl = [ - "Test_TC_LVL_1_1", - "Test_TC_LVL_2_1", - "Test_TC_LVL_2_2", - "Test_TC_LVL_3_1", - "Test_TC_LVL_4_1", - "Test_TC_LVL_5_1", - "Test_TC_LVL_6_1", - ]; - - const UserLabel = [ - "Test_TC_ULABEL_1_1", - "Test_TC_ULABEL_2_2", - "Test_TC_ULABEL_2_3", - "Test_TC_ULABEL_2_4", - ]; - - const MediaControl = [ - "Test_TC_LOWPOWER_1_1", - "Test_TC_KEYPADINPUT_1_2", - "Test_TC_APPLAUNCHER_1_3", - "Test_TC_MEDIAINPUT_1_4", - "Test_TC_WAKEONLAN_1_5", - "Test_TC_CHANNEL_1_6", - "Test_TC_MEDIAPLAYBACK_1_7", - "Test_TC_AUDIOOUTPUT_1_8", - "Test_TC_TGTNAV_1_9", - "Test_TC_TGTNAV_8_2", - "Test_TC_APBSC_1_10", - "Test_TC_CONTENTLAUNCHER_1_11", - "Test_TC_ALOGIN_1_12", - "Test_TC_LOWPOWER_2_1", - "Test_TC_KEYPADINPUT_3_2", - "Test_TC_KEYPADINPUT_3_3", - "Test_TC_APPLAUNCHER_3_5", - "Test_TC_APPLAUNCHER_3_6", - "Test_TC_APPLAUNCHER_3_7", - "Test_TC_APPLAUNCHER_3_8", - "Test_TC_APPLAUNCHER_3_9", - "Test_TC_MEDIAINPUT_3_10", - "Test_TC_MEDIAINPUT_3_11", - "Test_TC_MEDIAINPUT_3_12", - "Test_TC_MEDIAINPUT_3_13", - "Test_TC_CHANNEL_5_1", - "Test_TC_CHANNEL_5_2", - "Test_TC_CHANNEL_5_3", - "Test_TC_MEDIAPLAYBACK_6_1", - "Test_TC_MEDIAPLAYBACK_6_2", - "Test_TC_MEDIAPLAYBACK_6_3", - "Test_TC_MEDIAPLAYBACK_6_4", - "Test_TC_AUDIOOUTPUT_7_1", - "Test_TC_AUDIOOUTPUT_7_2", - "Test_TC_TGTNAV_8_1", - "Test_TC_APBSC_9_1", - "Test_TC_CONTENTLAUNCHER_10_1", - ]; - - const ModeSelect = [ - "Test_TC_MOD_1_1", - ]; - - const MultipleFabrics = [ - ]; - - const OTASoftwareUpdate = [ - "OTA_SuccessfulTransfer", - ]; - - const OnOff = [ - "Test_TC_OO_1_1", - "Test_TC_OO_2_1", - "Test_TC_OO_2_2", - "Test_TC_OO_2_4", - ]; - - const PowerSource = [ - "Test_TC_PS_1_1", - "Test_TC_PS_2_1", - ]; - - const PressureMeasurement = [ - "Test_TC_PRS_1_1", - "Test_TC_PRS_2_1", - ]; - - const PumpConfigurationControl = [ - "Test_TC_PCC_1_1", - "Test_TC_PCC_2_1", - "Test_TC_PCC_2_2", - "Test_TC_PCC_2_3", - "Test_TC_PCC_2_4", - ]; - - const PowerSourceConfiguration = [ - "Test_TC_PSCFG_1_1", - ]; - - const RelativeHumidityMeasurement = [ - "Test_TC_RH_1_1", - "Test_TC_RH_2_1", - ]; - - const SecureChannel = [ - "Test_TC_SC_4_2", - ]; - - const Switch = [ - "Test_TC_SWTCH_1_1", - "Test_TC_SWTCH_2_1", - ]; - - const TemperatureMeasurement = [ - "Test_TC_TMP_1_1", - "Test_TC_TMP_2_1", - ]; - - const Thermostat = [ - "Test_TC_TSTAT_1_1", - "Test_TC_TSTAT_2_1", - "Test_TC_TSTAT_2_2", - ]; - - const ThermostatUserConfiguration = [ - "Test_TC_TSUIC_1_1", - "Test_TC_TSUIC_2_1", - "Test_TC_TSUIC_2_2", - ]; - - const ThreadNetworkDiagnostics = [ - "Test_TC_DGTHREAD_1_1", - "Test_TC_DGTHREAD_2_1", - "Test_TC_DGTHREAD_2_2", - "Test_TC_DGTHREAD_2_3", - "Test_TC_DGTHREAD_2_4", - ]; - - const WiFiNetworkDiagnostics = [ - "Test_TC_DGWIFI_2_1", - "Test_TC_DGWIFI_2_3", - ]; - - const WindowCovering = [ - "Test_TC_WNCV_1_1", - "Test_TC_WNCV_2_1", - "Test_TC_WNCV_2_2", - "Test_TC_WNCV_2_3", - "Test_TC_WNCV_2_4", - "Test_TC_WNCV_2_5", - "Test_TC_WNCV_3_1", - "Test_TC_WNCV_3_2", - "Test_TC_WNCV_3_3", - "Test_TC_WNCV_3_4", - "Test_TC_WNCV_3_5", - "Test_TC_WNCV_4_1", - "Test_TC_WNCV_4_2", - "Test_TC_WNCV_4_3", - "Test_TC_WNCV_4_4", - "Test_TC_WNCV_4_5", - ]; - - const TV = [ - "TV_TargetNavigatorCluster", - "TV_AudioOutputCluster", - "TV_ApplicationLauncherCluster", - "TV_KeypadInputCluster", - "TV_AccountLoginCluster", - "TV_WakeOnLanCluster", - "TV_ApplicationBasicCluster", - "TV_MediaPlaybackCluster", - "TV_ChannelCluster", - "TV_LowPowerCluster", - "TV_ContentLauncherCluster", - "TV_MediaInputCluster", - ]; - - const Others = [ - "TestCASERecovery", - "TestCluster", - "TestClusterComplexTypes", - "TestConstraints", - "TestDelayCommands", - "TestEvents", - "TestDiscovery", - "TestLogCommands", - "TestSaveAs", - "TestConfigVariables", - "TestDescriptorCluster", - "TestBasicInformation", - "TestFabricRemovalWhileSubscribed", - "TestGeneralCommissioning", - "TestIdentifyCluster", - "TestOperationalCredentialsCluster", - "TestModeSelectCluster", - "TestSelfFabricRemoval", - "TestSystemCommands", - "TestBinding", - "TestUserLabelCluster", - "TestUserLabelClusterConstraints", - "TestArmFailSafe", - "TestFanControl", - "TestAccessControlConstraints", - "TestLevelControlWithOnOffDependency", - "TestCommissioningWindow", - ]; - - const MultiAdmin = [ - "TestMultiAdmin", - ]; - - const SoftwareDiagnostics = [ - "Test_TC_DGSW_1_1", - "Test_TC_DGSW_2_1", - "Test_TC_DGSW_2_2", - "Test_TC_DGSW_2_3", - ]; - - const Subscriptions = [ - "TestSubscribe_OnOff", - ]; - - const DoorLock = [ - "DL_UsersAndCredentials", - "DL_LockUnlock", - "DL_Schedules", - "Test_TC_DRLK_1_1", - "Test_TC_DRLK_2_2", - "Test_TC_DRLK_2_3", - "Test_TC_DRLK_2_4", - "Test_TC_DRLK_2_5", - "Test_TC_DRLK_2_7", - "Test_TC_DRLK_2_9", - ]; - - const Groups = [ - "TestGroupMessaging", - "TestGroupsCluster", - "TestGroupKeyManagementCluster", - ]; - - const tests = [ - AccessControl, - BooleanState, - Actions, - Binding, - ColorControl, - DeviceManagement, - Descriptor, - EthernetNetworkDiagnostics, - FlowMeasurement, - GeneralCommissioning, - GeneralDiagnostics, - Identify, - IlluminanceMeasurement, - LevelControl, - MediaControl, - ModeSelect, - MultipleFabrics, - OTASoftwareUpdate, - OccupancySensing, - OnOff, - PowerSource, - PressureMeasurement, - PumpConfigurationControl, - PowerSourceConfiguration, - RelativeHumidityMeasurement, - SecureChannel, - Switch, - TemperatureMeasurement, - Thermostat, - ThermostatUserConfiguration, - ThreadNetworkDiagnostics, - UserLabel, - WiFiNetworkDiagnostics, - WindowCovering, - TV, - Others, - MultiAdmin, - SoftwareDiagnostics, - Subscriptions, - DoorLock, - Groups, - ].flat(1); - - tests.disable = disable.bind(tests); - return tests; -} - -// clang-format on - -// -// Module exports -// -exports.getTests = getTests; -exports.getManualTests = getManualTests; diff --git a/src/app/zap-templates/common/ChipTypesHelper.js b/src/app/zap-templates/common/ChipTypesHelper.js deleted file mode 100644 index e82c599c6d8783..00000000000000 --- a/src/app/zap-templates/common/ChipTypesHelper.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function asBasicType(type) -{ - switch (type) { - case 'chip::ActionId': - case 'chip::FabricIndex': - case 'chip::Percent': - return 'uint8_t'; - case 'chip::EndpointId': - case 'chip::GroupId': - case 'chip::VendorId': - case 'chip::Percent100ths': - case 'chip::Protocols::InteractionModel::Status': - return 'uint16_t'; - case 'chip::ClusterId': - case 'chip::AttributeId': - case 'chip::FieldId': - case 'chip::EventId': - case 'chip::CommandId': - case 'chip::TransactionId': - case 'chip::DeviceTypeId': - case 'chip::StatusCode': - case 'chip::DataVersion': - return 'uint32_t'; - case 'chip::EventNumber': - case 'chip::FabricId': - case 'chip::NodeId': - return 'uint64_t'; - default: - return type; - } -} - -// -// Module exports -// -exports.asBasicType = asBasicType; diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js deleted file mode 100644 index 88b15d029d6e29..00000000000000 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ /dev/null @@ -1,1087 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const basePath = '../../../../'; -const testPath = 'src/app/tests/suites/'; -const certificationPath = 'src/app/tests/suites/certification/'; -const zapPath = basePath + 'third_party/zap/repo/'; -const YAML = require(zapPath + 'node_modules/yaml'); -const fs = require('fs'); -const path = require('path'); - -// Import helpers from zap core -const templateUtil = require(zapPath + 'dist/src-electron/generator/template-util.js') -const zclHelper = require(zapPath + 'dist/src-electron/generator/helper-zcl.js'); -const queryEnum = require(zapPath + 'dist/src-electron/db/query-enum'); -const queryBitmap = require(zapPath + 'dist/src-electron/db/query-bitmap'); - -const { getClusters, getCommands, getAttributes, getEvents, isTestOnlyCluster } -= require('./simulated-clusters/SimulatedClusters.js'); -const { asBlocks, ensureClusters } = require('./ClustersHelper.js'); -const { Variables } = require('./variables/Variables.js'); - -const kIdentityName = 'identity'; -const kClusterName = 'cluster'; -const kEndpointName = 'endpoint'; -const kGroupId = 'groupId'; -const kCommandName = 'command'; -const kWaitCommandName = 'wait'; -const kIndexName = 'index'; -const kValuesName = 'values'; -const kConstraintsName = 'constraints'; -const kArgumentsName = 'arguments'; -const kResponseName = 'response'; -const kDisabledName = 'disabled'; -const kResponseErrorName = 'error'; -const kPICSName = 'PICS'; -const kSaveAsName = 'saveAs'; -const kFabricFiltered = 'fabricFiltered'; - -const kHexPrefix = 'hex:'; - -class NullObject { - toString() - { - return "YOU SHOULD HAVE CHECKED (isLiteralNull definedValue)" - } -}; - -function throwError(test, errorStr) -{ - console.error('Error in: ' + test.filename + '.yaml for test with label: "' + test.label + '"\n'); - console.error(errorStr); - throw new Error(); -} - -function setDefault(test, name, defaultValue) -{ - if (!(name in test)) { - if (defaultValue == null) { - const errorStr = 'Test does not have any "' + name + '" defined.'; - throwError(test, errorStr); - } - - test[name] = defaultValue; - } -} - -function setDefaultType(test) -{ - if (kWaitCommandName in test) { - setDefaultTypeForWaitCommand(test); - } else { - setDefaultTypeForCommand(test); - } -} - -function setDefaultTypeForWaitCommand(test) -{ - const type = test[kWaitCommandName]; - switch (type) { - case 'readEvent': - test.commandName = 'WaitEvent'; - test.isEvent = true; - test.isReadEvent = true; - break; - case 'subscribeEvent': - test.commandName = 'WaitEvent'; - test.isEvent = true; - test.isSubscribe = true; - test.isSubscribeEvent = true; - break; - case 'readAttribute': - test.commandName = 'WaitAttribute'; - test.isAttribute = true; - test.isReadAttribute = true; - break; - case 'writeAttribute': - test.commandName = 'WaitAttribute'; - test.isAttribute = true; - test.isWriteAttribute = true; - break; - case 'subscribeAttribute': - test.commandName = 'WaitAttribute'; - test.isAttribute = true; - test.isSubscribe = true; - test.isSubscribeAttribute = true; - break; - default: - test.commandName = 'WaitCommand'; - test.isCommand = true; - test.command = test.wait - break; - } - - test.isWait = true; -} - -function setDefaultTypeForCommand(test) -{ - const type = test[kCommandName]; - switch (type) { - case 'readEvent': - test.commandName = 'ReadEvent'; - test.isEvent = true; - test.isReadEvent = true; - break; - - case 'subscribeEvent': - test.commandName = 'SubscribeEvent'; - test.isEvent = true; - test.isSubscribe = true; - test.isSubscribeEvent = true; - break; - - case 'readAttribute': - test.commandName = 'ReadAttribute'; - test.isAttribute = true; - test.isReadAttribute = true; - if (!(kFabricFiltered in test)) { - test[kFabricFiltered] = true; - } - break; - - case 'writeAttribute': - test.commandName = 'WriteAttribute'; - test.isAttribute = true; - test.isWriteAttribute = true; - if ((kGroupId in test)) { - test.isGroupCommand = true; - test.isWriteGroupAttribute = true; - test.commandName = 'WriteGroupAttribute'; - test.groupId = parseInt(test[kGroupId], 10); - } - break; - - case 'subscribeAttribute': - test.commandName = 'SubscribeAttribute'; - test.isAttribute = true; - test.isSubscribe = true; - test.isSubscribeAttribute = true; - if (!(kFabricFiltered in test)) { - test[kFabricFiltered] = true; - } - break; - - case 'waitForReport': - test.commandName = 'WaitForReport'; - if ('attribute' in test) { - test.isAttribute = true; - } else if ('event' in test) { - test.isEvent = true; - } - test.isWaitForReport = true; - break; - - default: - test.commandName = isTestOnlyCluster(test.cluster) ? test.command : 'SendCommand'; - test.isCommand = true; - if ((kGroupId in test)) { - test.isGroupCommand = true; - test.commandName = 'SendGroupCommand'; - test.groupId = parseInt(test[kGroupId], 10); - } - break; - } - - // Sanity Check for GroupId usage - // Only two types of actions can be send to Group : Write attribute, and Commands - // Spec : Action 8.2.4 - if ((kGroupId in test) && !test.isGroupCommand) { - printErrorAndExit(this, 'Wrong Yaml configuration. Action : ' + test.commandName + " can't be sent to group " + test[kGroupId]); - } - - test.isWait = false; -} - -function setDefaultPICS(test) -{ - const defaultPICS = ''; - setDefault(test, kPICSName, defaultPICS); - - if (test[kPICSName] == '') { - return; - } - - const items = test[kPICSName].split(/[&|() !]+/g).filter(item => item.length); - items.forEach(key => { - if (!PICS.has(key)) { - const errorStr = 'PICS database does not contains any defined value for: ' + key; - throwError(test, errorStr); - } - }) -} - -function setDefaultArguments(test) -{ - const defaultArguments = {}; - setDefault(test, kArgumentsName, defaultArguments); - - const defaultArgumentsValues = []; - setDefault(test[kArgumentsName], kValuesName, defaultArgumentsValues); - - if (!test.isWriteAttribute) { - return; - } - - if (!('value' in test[kArgumentsName])) { - const errorStr = 'Test does not have a "value" defined.'; - throwError(test, errorStr); - } - - test[kArgumentsName].values.push({ name : test.attribute, value : test[kArgumentsName].value }); - delete test[kArgumentsName].value; -} - -function ensureValidError(response, errorName) -{ - if (isNaN(response[errorName])) { - response[errorName] = "EMBER_ZCL_STATUS_" + response[errorName]; - } -} - -function setDefaultResponse(test, useSynthesizeWaitForReport) -{ - // Some of the tests does not have any command defined. - if (!test.command || test.isWait) { - setDefault(test, kResponseName, []); - return; - } - - test.expectMultipleResponses = test.isEvent; - - const defaultResponse = test.expectMultipleResponses ? [] : {}; - setDefault(test, kResponseName, defaultResponse); - - // There is different syntax for expressing the expected response, but in the - // end it needs to be converted to an array of responses. - if (kResponseName in test && !Array.isArray(test[kResponseName])) { - let testValues = {}; - - const response = test[kResponseName]; - - if (kValuesName in response) { - testValues[kValuesName] = response[kValuesName]; - } else if ('value' in response || kConstraintsName in response || kSaveAsName in response) { - let obj = {}; - if ('value' in response) { - obj['value'] = response['value']; - } - - if (kConstraintsName in response) { - obj[kConstraintsName] = response[kConstraintsName]; - } - - if (kSaveAsName in response) { - obj[kSaveAsName] = response[kSaveAsName]; - } - - testValues[kValuesName] = [ obj ]; - } else { - testValues[kValuesName] = []; - } - - if (kResponseErrorName in response) { - testValues[kResponseErrorName] = response[kResponseErrorName]; - } - - if ('clusterError' in response) { - testValues['clusterError'] = response['clusterError']; - } - - test[kResponseName] = [ testValues ]; - } - - // Ensure only valid keywords are used for response values. - test[kResponseName].forEach(response => { - const values = response[kValuesName]; - for (let i = 0; i < values.length; i++) { - for (let key in values[i]) { - if (key == "name" || key == "value" || key == kConstraintsName || key == kSaveAsName) { - continue; - } - - const errorStr = `Unknown key "${key}" in "${JSON.stringify(values)}"`; - throwError(test, errorStr); - } - } - }); - - let responseType = ''; - if (test.isCommand) { - responseType = 'command'; - } else if (test.isAttribute) { - responseType = 'attribute'; - } else if (test.isEvent) { - responseType = 'event'; - } else { - const errorStr = 'Unknown response type'; - throwError(response, errorStr); - } - - const defaultName = test[responseType]; - - test[kResponseName].forEach(response => { - const hasResponseError = (kResponseErrorName in response); - - const defaultResponseError = 0; - setDefault(response, kResponseErrorName, defaultResponseError); - ensureValidError(response, kResponseErrorName); - - const values = response[kValuesName]; - values.forEach(expectedValue => { - const hasResponseValue = 'value' in expectedValue; - const hasResponseConstraints = (kConstraintsName in expectedValue) && !!Object.keys(expectedValue.constraints).length; - const hasResponseSaveAs = (kSaveAsName in expectedValue); - - if (test.isWriteAttribute || (useSynthesizeWaitForReport && test.isSubscribe)) { - if (hasResponseValue || hasResponseConstraints) { - const errorStr = 'Test has a "value" or a "constraints" defined.'; - throwError(test, errorStr); - } - } - - if (test.isCommand && !('name' in expectedValue)) { - const errorStr = 'Test value does not have a named argument.\n' + - '\n' + - 'Command should explicitly use the response argument name. Example: \n' + - '- label: "Send Test Specific Command"\n' + - ' command: "testSpecific"\n' + - ' response: \n' + - ' values: \n' + - ' - name: "returnValue"\n' + - ' - value: 7\n'; - throwError(test, errorStr); - } - - setDefault(expectedValue, 'name', defaultName); - }); - - setDefault(response, kCommandName, test.command); - setDefault(response, responseType, test[responseType]); - setDefault(response, kClusterName, test.cluster); - setDefault(response, 'optional', test.optional || false); - setDefault(response, 'async', test.async || false); - setDefaultType(response); - }); -} - -function setDefaults(test, defaultConfig, useSynthesizeWaitForReport) -{ - const defaultIdentityName = kIdentityName in defaultConfig ? defaultConfig[kIdentityName] : "alpha"; - const defaultClusterName = defaultConfig[kClusterName] || null; - const defaultEndpointId = kEndpointName in defaultConfig ? defaultConfig[kEndpointName] : null; - const defaultDisabled = false; - - setDefault(test, kIdentityName, defaultIdentityName); - setDefault(test, kClusterName, defaultClusterName); - setDefault(test, kEndpointName, defaultEndpointId); - setDefault(test, kDisabledName, defaultDisabled); - setDefaultType(test); - setDefaultPICS(test); - setDefaultArguments(test); - setDefaultResponse(test, useSynthesizeWaitForReport); -} - -function parse(filename, useSynthesizeWaitForReport) -{ - let filepath; - const isCertificationTest = filename.startsWith('Test_TC_'); - if (isCertificationTest) { - filepath = path.resolve(__dirname, basePath + certificationPath + filename + '.yaml'); - } else { - filepath = path.resolve(__dirname, basePath + testPath + filename + '.yaml'); - } - - const data = fs.readFileSync(filepath, { encoding : 'utf8', flag : 'r' }); - const yaml = YAML.parse(data); - - if (useSynthesizeWaitForReport) { - // "subscribeAttribute" command expects a report to be acked before - // it got a success response. - // In order to validate that the report has been received with the proper value - // a "subscribeAttribute" command can have a response configured into the test step - // definition. In this case, a new async "waitForReport" test step will be synthesized - // and added to the list of tests. - yaml.tests.forEach((test, index) => { - if (test.command == "subscribeAttribute" && test.response) { - // Create a new report test where the expected response is the response argument - // for the "subscribeAttributeTest" - const reportTest = { - label : "Report: " + test.label, - command : "waitForReport", - attribute : test.attribute, - response : test.response, - async : true, - allocateSubscribeDataCallback : true, - }; - delete test.response; - - // insert the new report test into the tests list - yaml.tests.splice(index, 0, reportTest); - - // Associate the "subscribeAttribute" test with the synthesized report test - test.hasWaitForReport = true; - test.waitForReport = reportTest; - test.allocateSubscribeDataCallback = !test.hasWaitForReport; - } - }); - } - - const defaultConfig = yaml.config || []; - yaml.tests.forEach(test => { - test.filename = filename; - test.testName = yaml.name; - setDefaults(test, defaultConfig, useSynthesizeWaitForReport); - }); - - // Filter disabled tests - yaml.tests = yaml.tests.filter(test => !test.disabled); - - yaml.tests.forEach((test, index) => { - setDefault(test, kIndexName, index); - }); - - yaml.filename = filename; - yaml.totalTests = yaml.tests.length; - - return yaml; -} - -function printErrorAndExit(context, msg) -{ - console.log("\nERROR:\n", context.testName, ': ', context.label); - console.log(msg); - process.exit(1); -} - -function assertCommandOrAttributeOrEvent(context) -{ - const clusterName = context.cluster; - return getClusters(context).then(clusters => { - if (!clusters.find(cluster => cluster.name == clusterName)) { - const names = clusters.map(item => item.name); - printErrorAndExit(context, 'Missing cluster "' + clusterName + '" in: \n\t* ' + names.join('\n\t* ')); - } - - let filterName; - let items; - - if (context.isCommand) { - filterName = context.command; - items = getCommands(context, clusterName); - } else if (context.isAttribute) { - filterName = context.attribute; - items = getAttributes(context, clusterName); - } else if (context.isEvent) { - filterName = context.event; - items = getEvents(context, clusterName); - } else { - printErrorAndExit(context, 'Unsupported command type: ', context); - } - - return items.then(items => { - const filter = item => item.name.toLowerCase() == filterName.toLowerCase(); - const item = items.find(filter); - const itemType = (context.isCommand ? 'Command' : context.isAttribute ? 'Attribute' : 'Event'); - - // If the command/attribute/event is not found, it could be because of a typo in the test - // description, or an attribute/event name not matching the spec, or a wrongly configured zap - // file. - if (!item) { - const names = items.map(item => item.name); - printErrorAndExit(context, 'Missing ' + itemType + ' "' + filterName + '" in: \n\t* ' + names.join('\n\t* ')); - } - - // If the command/attribute/event has been found but the response can not be found, it could be - // because of a wrongly configured cluster definition. - if (!item.response) { - printErrorAndExit(context, 'Missing ' + itemType + ' "' + filterName + '" response'); - } - - return item; - }); - }); -} - -const PICS = (() => { - let filepath = path.resolve(__dirname, basePath + certificationPath + 'PICS.yaml'); - const data = fs.readFileSync(filepath, { encoding : 'utf8', flag : 'r' }); - const yaml = YAML.parse(data); - - const getAll = () => yaml.PICS; - const get = (id) => has(id) ? yaml.PICS.filter(pics => pics.id == id)[0] : null; - const has = (id) => !!(yaml.PICS.filter(pics => pics.id == id)).length; - - const PICS = { - getAll : getAll, - get : get, - has : has, - }; - return PICS; -})(); - -// -// Templates -// -function chip_tests_pics(options) -{ - return templateUtil.collectBlocks(PICS.getAll(), options, this); -} - -async function configureTestItem(item) -{ - if (item.isCommand) { - let command = await assertCommandOrAttributeOrEvent(item); - item.commandObject = command; - item.hasSpecificArguments = true; - item.hasSpecificResponse = command.hasSpecificResponse || false; - } else if (item.isAttribute) { - let attr = await assertCommandOrAttributeOrEvent(item); - item.attributeObject = attr; - item.hasSpecificArguments = item.isWriteAttribute || false; - item.hasSpecificResponse = item.isReadAttribute || item.isSubscribeAttribute || item.isWaitForReport || false; - } else if (item.isEvent) { - let evt = await assertCommandOrAttributeOrEvent(item); - item.eventObject = evt; - item.hasSpecificArguments = false; - item.hasSpecificResponse = true; - } -} - -async function chip_tests(list, options) -{ - // Set a global on our items so assertCommandOrAttributeOrEvent can work. - let global = this.global; - const items = Array.isArray(list) ? list : list.split(','); - const names = items.map(name => name.trim()); - let tests = names.map(item => parse(item, options.hash.useSynthesizeWaitForReport)); - - const context = this; - tests = await Promise.all(tests.map(async function(test) { - test.tests = await Promise.all(test.tests.map(async function(item) { - item.global = global; - await configureTestItem(item); - - if (kResponseName in item) { - await Promise.all(item[kResponseName].map(response => configureTestItem(response))); - } - - return item; - })); - - const variables = await Variables(context, test); - test.variables = { - config : variables.config, - tests : variables.tests, - }; - return test; - })); - return templateUtil.collectBlocks(tests, options, this); -} - -function chip_tests_items(options) -{ - return templateUtil.collectBlocks(this.tests, options, this); -} - -function getVariable(context, key, name) -{ - if (!(typeof name == "string" || (typeof name == "object" && (name instanceof String)))) { - // Non-string key; don't try to look it up. Could end up looking like a - // variable name by accident when stringified. - return null; - } - - while (!('variables' in context) && context.parent) { - context = context.parent; - } - - if (typeof context === 'undefined' || !('variables' in context)) { - return null; - } - - return context.variables[key].find(variable => variable.name == name); -} - -function getVariableOrThrow(context, key, name) -{ - const variable = getVariable(context, key, name); - if (variable == null) { - throw new Error(`Variable ${name} can not be found`); - } - return variable; -} - -function chip_tests_variables(options) -{ - return templateUtil.collectBlocks(this.variables.tests, options, this); -} - -function chip_tests_variables_has(name, options) -{ - const variable = getVariable(this, 'tests', name); - return !!variable; -} - -function chip_tests_variables_get_type(name, options) -{ - const variable = getVariableOrThrow(this, 'tests', name); - return variable.type; -} - -function chip_tests_variables_is_nullable(name, options) -{ - const variable = getVariableOrThrow(this, 'tests', name); - return variable.isNullable; -} - -function chip_tests_config(options) -{ - return templateUtil.collectBlocks(this.variables.config, options, this); -} - -function chip_tests_config_has(name, options) -{ - const variable = getVariable(this, 'config', name); - return !!variable; -} - -function chip_tests_config_get_default_value(name, options) -{ - const variable = getVariableOrThrow(this, 'config', name); - return variable.defaultValue; -} - -function chip_tests_config_get_type(name, options) -{ - const variable = getVariableOrThrow(this, 'config', name); - return variable.type; -} - -// test_cluster_command_value and test_cluster_value-equals are recursive partials using #each. At some point the |global| -// context is lost and it fails. Make sure to attach the global context as a property of the | value | -// that is evaluated. -// -// errorContext should have "thisVal" and "name" properties that will be used -// for error reporting via printErrorAndExit. -function attachGlobal(global, value, errorContext) -{ - if (Array.isArray(value)) { - value = value.map(v => attachGlobal(global, v, errorContext)); - } else if (value instanceof Object) { - for (key in value) { - if (key == "global") { - continue; - } - value[key] = attachGlobal(global, value[key], errorContext); - } - } else if (value === null) { - value = new NullObject(); - } else { - switch (typeof value) { - case 'number': - checkNumberSanity(value, errorContext); - value = new Number(value); - break; - case 'string': - value = new String(value); - break; - case 'boolean': - value = new Boolean(value); - break; - default: - throw new Error('Unsupported value: ' + JSON.stringify(value)); - } - } - - value.global = global; - return value; -} - -/** - * Ensure the given value is not a possibly-corrupted-by-going-through-double - * integer. If it is, tell the user (using that errorContext.name to describe - * it) and die. - */ -function checkNumberSanity(value, errorContext) -{ - // Number.isInteger is false for non-Numbers. - if (Number.isInteger(value) && !Number.isSafeInteger(value)) { - printErrorAndExit(errorContext.thisVal, - `${errorContext.name} value ${ - value} is too large to represent exactly as an integer in YAML. Put quotes around it to treat it as a string.\n\n`); - } -} - -function chip_tests_item_parameters(options) -{ - if (this.isWait) { - return asBlocks.call(this, Promise.resolve([]), options); - } - - const commandValues = this.arguments.values; - - const promise = assertCommandOrAttributeOrEvent(this).then(item => { - if ((this.isAttribute || this.isEvent) && !this.isWriteAttribute) { - if (this.isSubscribe) { - const minInterval = { name : 'minInterval', type : 'int16u', chipType : 'uint16_t', definedValue : this.minInterval }; - const maxInterval = { name : 'maxInterval', type : 'int16u', chipType : 'uint16_t', definedValue : this.maxInterval }; - return [ minInterval, maxInterval ]; - } - return []; - } - - const commandArgs = item.arguments; - const commands = commandArgs.map(commandArg => { - commandArg = JSON.parse(JSON.stringify(commandArg)); - - const expected = commandValues.find(value => value.name.toLowerCase() == commandArg.name.toLowerCase()); - if (!expected) { - if (commandArg.isOptional) { - return undefined; - } - printErrorAndExit(this, - 'Missing "' + commandArg.name + '" in arguments list: \n\t* ' - + commandValues.map(command => command.name).join('\n\t* ')); - } - - commandArg.definedValue = attachGlobal(this.global, expected.value, { thisVal : this, name : commandArg.name }); - - return commandArg; - }); - - return commands.filter(item => item !== undefined); - }); - - return asBlocks.call(this, promise, options); -} - -function chip_tests_item_responses(options) -{ - return templateUtil.collectBlocks(this[kResponseName], options, this); -} - -function chip_tests_item_response_parameters(options) -{ - const responseValues = this.values.slice(); - - const promise = assertCommandOrAttributeOrEvent(this).then(item => { - if (this.isWriteAttribute) { - return []; - } - const responseArgs = item.response.arguments; - - const responses = responseArgs.map(responseArg => { - responseArg = JSON.parse(JSON.stringify(responseArg)); - - const expectedIndex = responseValues.findIndex(value => value.name.toLowerCase() == responseArg.name.toLowerCase()); - if (expectedIndex != -1) { - const expected = responseValues.splice(expectedIndex, 1)[0]; - if ('value' in expected) { - responseArg.hasExpectedValue = true; - responseArg.expectedValue = attachGlobal(this.global, expected.value, { thisVal : this, name : responseArg.name }); - } - - if ('constraints' in expected) { - responseArg.hasExpectedConstraints = true; - responseArg.expectedConstraints - = attachGlobal(this.global, expected.constraints, { thisVal : this, name : responseArg.name }); - } - - if ('saveAs' in expected) { - responseArg.saveAs = expected.saveAs; - } - } - - return responseArg; - }); - - const unusedResponseValues = responseValues.filter(response => 'value' in response); - unusedResponseValues.forEach(unusedResponseValue => { - printErrorAndExit(this, - 'Missing "' + unusedResponseValue.name + '" in response arguments list:\n\t* ' - + responseArgs.map(response => response.name).join('\n\t* ')); - }); - - return responses; - }); - - return asBlocks.call(this, promise, options); -} - -function isLiteralNull(value, options) -{ - // Literal null might look different depending on whether it went through - // attachGlobal or not. - return (value === null) || (value instanceof NullObject); -} - -function isHexString(value) -{ - return value && value.startsWith(kHexPrefix); -} - -function octetStringFromHexString(value) -{ - const hexString = value.substring(kHexPrefix.length); - - if (hexString.length % 2) { - throw new Error("The provided hexadecimal string contains an even number of characters"); - } - - if (!(/^[0-9a-fA-F]+$/.test(hexString))) { - throw new Error("The provided hexadecimal string contains invalid hexadecimal character."); - } - - const bytes = hexString.match(/(..)/g); - return bytes.map(byte => '\\x' + byte).join(''); -} - -function octetStringLengthFromHexString(value) -{ - const hexString = value.substring(kHexPrefix.length); - return (hexString.length / 2); -} - -function octetStringEscapedForCLiteral(value) -{ - // Escape control characters, things outside the ASCII range, and single - // quotes (because that's our string terminator). - return value.replace(/\p{Control}|\P{ASCII}|"/gu, ch => { - var code = ch.charCodeAt(0).toString(8) - return "\\" + - "0".repeat(3 - code.length) + code; - }); -} - -// Structs may not always provide values for optional members. -function if_include_struct_item_value(structValue, name, options) -{ - let hasValue = (name in structValue); - if (hasValue) { - return options.fn(this); - } - - if (!this.isOptional) { - throw new Error(`Value not provided for ${name} where one is expected in ` + JSON.stringify(structValue)); - } - - return options.inverse(this); -} - -// To be used to verify that things are actually arrays before trying to use -// #each with them, since that silently treats non-arrays as empty arrays. -function ensureIsArray(value, options) -{ - if (!(value instanceof Array)) { - printErrorAndExit(this, `Expected array but instead got ${typeof value}: ${JSON.stringify(value)}\n`); - } -} - -function checkIsInsideTestOnlyClusterBlock(conditions, name) -{ - conditions.forEach(condition => { - if (condition == undefined) { - const errorStr = `Not inside a ({#${name}}} block.`; - console.error(errorStr); - throw new Error(errorStr); - } - }); -} - -/** - * Creates block iterator over the simulated clusters. - * - * @param {*} options - */ -async function chip_tests_only_clusters(options) -{ - const clusters = await getClusters(this); - const testOnlyClusters = clusters.filter(cluster => isTestOnlyCluster(cluster.name)); - return asBlocks.call(this, Promise.resolve(testOnlyClusters), options); -} - -/** - * Creates block iterator over the cluster commands for a given simulated cluster. - * - * This function is meant to be used inside a {{#chip_tests_only_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -async function chip_tests_only_cluster_commands(options) -{ - const conditions = [ isTestOnlyCluster(this.name) ]; - checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_clusters'); - - const commands = await getCommands(this, this.name); - return asBlocks.call(this, Promise.resolve(commands), options); -} - -/** - * Creates block iterator over the command arguments for a given simulated cluster command. - * - * This function is meant to be used inside a {{#chip_tests_only_cluster_commands}} - * block. It will throw otherwise. - * - * @param {*} options - */ -async function chip_tests_only_cluster_command_parameters(options) -{ - const conditions = [ isTestOnlyCluster(this.parent.name), this.arguments, this.response ]; - checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_cluster_commands'); - - return asBlocks.call(this, Promise.resolve(this.arguments), options); -} - -/** - * Creates block iterator over the cluster responses for a given simulated cluster. - * - * This function is meant to be used inside a {{#chip_tests_only_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -async function chip_tests_only_cluster_responses(options) -{ - const conditions = [ isTestOnlyCluster(this.name) ]; - checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_clusters'); - - const commands = await getCommands(this, this.name); - const responses = []; - commands.forEach(command => { - if (!command.response.arguments) { - return; - } - - if (!('responseName' in command)) { - return; - } - - const alreadyExists = responses.some(item => item.responseName == command.responseName); - if (alreadyExists) { - return; - } - - command.response.responseName = command.responseName; - responses.push(command.response); - }); - - return asBlocks.call(this, Promise.resolve(responses), options); -} - -/** - * Creates block iterator over the response arguments for a given simulated cluster response. - * - * This function is meant to be used inside a {{#chip_tests_only_cluster_responses}} - * block. It will throw otherwise. - * - * @param {*} options - */ -async function chip_tests_only_cluster_response_parameters(options) -{ - const conditions = [ isTestOnlyCluster(this.parent.name), this.arguments, this.responseName ]; - checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_cluster_responses'); - - return asBlocks.call(this, Promise.resolve(this.arguments), options); -} - -function chip_tests_iterate_expected_list(values, options) -{ - let context = options.hash.context || this; - values = values.map(value => { - return { - global: context.global, parent: context.parent, name: context.name, type: context.type, isArray: false, isNullable: false, - value: value, - } - }); - - return asBlocks.call(this, Promise.resolve(values), options); -} - -function chip_tests_iterate_constraints(constraints, options) -{ - let values = []; - for (let key of Object.keys(constraints)) { - // Skip "global", because that's not an actual constraint. - if (key == "global") { - continue; - } - values.push({ global : this.global, constraint : key, value : constraints[key] }) - } - - return asBlocks.call(this, Promise.resolve(values), options) -} - -async function asTestType(type, isList) -{ - if (isList) { - return 'list'; - } - - const pkgId = await templateUtil.ensureZclPackageId(this); - const db = this.global.db; - - const isEnum = await zclHelper.isEnum(db, type, pkgId); - if (isEnum != 'unknown') { - const enumObj = await queryEnum.selectEnumByName(db, type, pkgId); - return 'enum' + (8 * enumObj.size); - } - - const isBitmap = await zclHelper.isBitmap(db, type, pkgId); - if (isBitmap != 'unknown') { - const bitmapObj = await queryBitmap.selectBitmapByName(db, pkgId, type); - return 'bitmap' + (8 * bitmapObj.size); - } - - return type; -} - -// -// Module exports -// -exports.chip_tests = chip_tests; -exports.chip_tests_items = chip_tests_items; -exports.chip_tests_item_parameters = chip_tests_item_parameters; -exports.chip_tests_item_responses = chip_tests_item_responses; -exports.chip_tests_item_response_parameters = chip_tests_item_response_parameters; -exports.chip_tests_pics = chip_tests_pics; -exports.chip_tests_config = chip_tests_config; -exports.chip_tests_config_has = chip_tests_config_has; -exports.chip_tests_config_get_default_value = chip_tests_config_get_default_value; -exports.chip_tests_config_get_type = chip_tests_config_get_type; -exports.chip_tests_variables = chip_tests_variables; -exports.chip_tests_variables_has = chip_tests_variables_has; -exports.chip_tests_variables_get_type = chip_tests_variables_get_type; -exports.chip_tests_variables_is_nullable = chip_tests_variables_is_nullable; -exports.isTestOnlyCluster = isTestOnlyCluster; -exports.isLiteralNull = isLiteralNull; -exports.octetStringEscapedForCLiteral = octetStringEscapedForCLiteral; -exports.if_include_struct_item_value = if_include_struct_item_value; -exports.ensureIsArray = ensureIsArray; -exports.chip_tests_only_clusters = chip_tests_only_clusters; -exports.chip_tests_only_cluster_commands = chip_tests_only_cluster_commands; -exports.chip_tests_only_cluster_command_parameters = chip_tests_only_cluster_command_parameters; -exports.chip_tests_only_cluster_responses = chip_tests_only_cluster_responses; -exports.chip_tests_only_cluster_response_parameters = chip_tests_only_cluster_response_parameters; -exports.isHexString = isHexString; -exports.octetStringLengthFromHexString = octetStringLengthFromHexString; -exports.octetStringFromHexString = octetStringFromHexString; -exports.chip_tests_iterate_expected_list = chip_tests_iterate_expected_list; -exports.chip_tests_iterate_constraints = chip_tests_iterate_constraints; -exports.asTestType = asTestType; diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js deleted file mode 100644 index 320478ff0c4b0b..00000000000000 --- a/src/app/zap-templates/common/ClustersHelper.js +++ /dev/null @@ -1,941 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../../third_party/zap/repo/dist/src-electron/'; -const queryConfig = require(zapPath + 'db/query-config.js') -const queryCommand = require(zapPath + 'db/query-command.js') -const queryEndpoint = require(zapPath + 'db/query-endpoint.js') -const queryEndpointType = require(zapPath + 'db/query-endpoint-type.js') -const queryEvent = require(zapPath + 'db/query-event.js') -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') -const zclQuery = require(zapPath + 'db/query-zcl.js') - -const { Deferred } = require('./Deferred.js'); -const ListHelper = require('./ListHelper.js'); -const StringHelper = require('./StringHelper.js'); -const ChipTypesHelper = require('./ChipTypesHelper.js'); - -// Helper for better error reporting. -function ensureState(condition, error) -{ - if (!condition) { - let err = new Error(error); - console.log(`${error}: ` + err.stack); - throw err; - } -} - -// -// Load Step 1 -// -function loadAtomics(packageId) -{ - const { db, sessionId } = this.global; - const options = { 'hash' : {} }; - - const resolveZclTypes = atomics => Promise.all(atomics.map(atomic => { - return zclHelper.asUnderlyingZclType.call(this, atomic.name, options).then(zclType => { - atomic.chipType = zclType; - return atomic; - }); - })); - - return zclQuery.selectAllAtomics(db, packageId).then(resolveZclTypes); -} - -function loadBitmaps(packageId) -{ - const { db, sessionId } = this.global; - return zclQuery.selectAllBitmaps(db, packageId); -} - -function loadEnums(packageId) -{ - const { db, sessionId } = this.global; - return zclQuery.selectAllEnums(db, packageId); -} - -function loadStructItems(struct, packageId) -{ - const { db, sessionId } = this.global; - return zclQuery.selectAllStructItemsById(db, struct.id).then(structItems => { - struct.items = structItems; - return struct; - }); -} - -function loadStructs(packageId) -{ - const { db, sessionId } = this.global; - return zclQuery.selectAllStructsWithItemCount(db, packageId) - .then(structs => Promise.all(structs.map(struct => loadStructItems.call(this, struct, packageId)))); -} - -/** - * Loads endpoint data, specifically what endpoints are available and what clusters - * are defined within those endpoints. - */ -async function loadEndpoints() -{ - let result = []; - - const { db, sessionId } = this.global; - - const endpoints = await queryEndpoint.selectAllEndpoints(db, sessionId); - - // Selection is one by one since existing API does not seem to provide - // linkage between cluster and what endpoint it belongs to. - // - // TODO: there should be a better way - for (const endpoint of endpoints) { - const endpointClusters - = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, [ { endpointTypeId : endpoint.endpointTypeRef } ]); - result.push({...endpoint, clusters : endpointClusters.filter(c => c.enabled == 1) }); - } - - return result; -} - -async function loadAllClusters(packageId) -{ - const { db, sessionId } = this.global; - - let allClusters = await zclQuery.selectAllClusters(db, packageId); - // To match what loadClusters does, sort by cluster name (not cluster code). - allClusters.sort((a, b) => { - if (a.name < b.name) { - return -1; - } - if (a.name == b.name) { - return 0; - } - return 1; - }); - let serverClusters = allClusters.map(cluster => ({...cluster, side : 'server', enabled : true })); - let clientClusters = allClusters.map(cluster => ({...cluster, side : 'client', enabled : true })); - return serverClusters.concat(clientClusters); -} - -async function loadClusters() -{ - const { db, sessionId } = this.global; - - const endpointTypes = await queryEndpointType.selectEndpointTypeIds(db, sessionId); - const clusters = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes); - - return clusters.filter(cluster => cluster.enabled == 1); -} - -function loadCommandResponse(command, packageId) -{ - const { db, sessionId } = this.global; - return queryCommand.selectCommandById(db, command.id, packageId).then(commandDetails => { - if (commandDetails.responseRef == null) { - command.response = null; - return command; - } - - return queryCommand.selectCommandById(db, commandDetails.responseRef, packageId).then(response => { - command.response = response; - return command; - }); - }); -} - -function loadCommandArguments(command, packageId) -{ - const { db, sessionId } = this.global; - return queryCommand.selectCommandArgumentsByCommandId(db, command.id, packageId).then(commandArguments => { - command.arguments = commandArguments; - return command; - }); -} - -async function loadAllCommands(packageId) -{ - const { db, sessionId } = this.global; - let cmds = await queryCommand.selectAllCommandsWithClusterInfo(db, [ packageId ]); - // For each command, include it twice: once as outgoing for its source, once - // as incoming for its destination. - let outgoing = cmds.map(cmd => ({...cmd, incoming : false, outgoing : true, clusterSide : cmd.source })); - let incoming = cmds.map( - cmd => ({...cmd, incoming : true, outgoing : false, clusterSide : (cmd.source == 'server' ? 'client' : 'server') })); - let commands = Promise.resolve(outgoing.concat(incoming)); - return loadCommandsCommon.call(this, packageId, commands); -} - -function loadCommands(packageId) -{ - const { db, sessionId } = this.global; - let cmds = queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => queryEndpointType.selectClustersAndEndpointDetailsFromEndpointTypes(db, endpointTypes)) - .then(endpointTypesAndClusters => queryCommand.selectCommandDetailsFromAllEndpointTypesAndClusters( - db, endpointTypesAndClusters, true)); - - return loadCommandsCommon.call(this, packageId, cmds); -} - -// commandsPromise is a promise for an array of commands. -function loadCommandsCommon(packageId, commandsPromise) -{ - return commandsPromise.then(commands => Promise.all(commands.map(command => loadCommandResponse.call(this, command, packageId)))) - .then(commands => Promise.all(commands.map(command => loadCommandArguments.call(this, command, packageId)))); -} - -async function loadAllAttributes(packageId) -{ - // The 'server' side is enforced here, because the list of attributes is used to generate client global - // commands to retrieve server side attributes. - const { db, sessionId } = this.global; - let attrs = await zclQuery.selectAllAttributesBySide(db, 'server', [ packageId ]); - const globalAttrs = attrs.filter(attr => attr.clusterRef == null); - // Exclude global attributes for now, since we will add them ourselves for - // all clusters. - attrs = attrs.filter(attr => attr.clusterRef != null); - // selectAllAttributesBySide sets clusterRef, not clusterId, so manually - // set the latter here. - attrs.forEach(attr => attr.clusterId = attr.clusterRef); - - const clusters = await zclQuery.selectAllClusters(db, packageId); - for (let cluster of clusters) { - for (let globalAttr of globalAttrs) { - attrs.push({...globalAttr, clusterId : cluster.id }); - } - } - // selectAllAttributesBySide includes optionality information, which we - // don't want here, because the types of the attributes are not in fact - // optionals for our purposes. - attrs.forEach(attr => delete attr.isOptional); - // Treat all attributes that could be reportable as reportable. - attrs.forEach(attr => { - if (attr.isReportable) { - attr.includedReportable = true; - } - }); - return attrs.sort((a, b) => a.code - b.code); -} - -function loadAttributes(packageId) -{ - // The 'server' side is enforced here, because the list of attributes is used to generate client global - // commands to retrieve server side attributes. - const { db, sessionId } = this.global; - return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => Promise.all( - endpointTypes.map(({ endpointTypeId }) => queryEndpoint.selectEndpointClusters(db, endpointTypeId)))) - .then(clusters => clusters.flat()) - .then(clusters => Promise.all( - clusters.map(({ clusterId, side, endpointTypeId }) => queryEndpoint.selectEndpointClusterAttributes( - db, clusterId, 'server', endpointTypeId)))) - .then(attributes => attributes.flat()) - .then(attributes => attributes.filter(attribute => attribute.isIncluded)) - .then(attributes => attributes.sort((a, b) => a.code - b.code)); - //.then(attributes => Promise.all(attributes.map(attribute => types.typeSizeAttribute(db, packageId, attribute)) -} - -async function loadAllEvents(packageId) -{ - const { db, sessionId } = this.global; - let clusters = await zclQuery.selectAllClusters(db, packageId); - return loadEventsCommon.call(this, packageId, clusters); -} - -async function loadEvents(packageId) -{ - const { db, sessionId } = this.global; - let clusters = await queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => Promise.all( - endpointTypes.map(({ endpointTypeId }) => queryEndpoint.selectEndpointClusters(db, endpointTypeId)))) - .then(clusters => clusters.flat(3)); - return loadEventsCommon.call(this, packageId, clusters); -} - -// clusters is an array of clusters (not a promise). -function loadEventsCommon(packageId, clusters) -{ - const { db, sessionId } = this.global; - return queryEvent.selectAllEvents(db, packageId).then(events => { - events.forEach(event => { - const cluster = clusters.find(cluster => cluster.code == event.clusterCode); - if (cluster) { - event.clusterId = cluster.clusterId; - event.clusterName = cluster.name; - } - }); - return events.filter(event => clusters.find(cluster => cluster.code == event.clusterCode)); - }); -} - -function loadGlobalAttributes(packageId) -{ - const { db, sessionId } = this.global; - return zclQuery.selectAllAttributes(db, packageId) - .then(attributes => attributes.filter(attribute => attribute.clusterRef == null)) - .then(attributes => attributes.map(attribute => attribute.code)); -} - -// -// Load step 2 -// - -function asChipCallback(item) -{ - if (StringHelper.isOctetString(item.type)) { - return { name : 'OctetString', type : 'const chip::ByteSpan' }; - } - - if (StringHelper.isCharString(item.type)) { - return { name : 'CharString', type : 'const chip::CharSpan' }; - } - - if (item.isArray) { - return { name : 'List', type : null }; - } - - const basicType = ChipTypesHelper.asBasicType(item.chipType); - switch (basicType) { - case 'int8_t': - case 'int16_t': - case 'int32_t': - case 'int64_t': - return { name : 'Int' + basicType.replace(/[^0-9]/g, '') + 's', type : basicType }; - case 'uint8_t': - case 'uint16_t': - case 'uint32_t': - case 'uint64_t': - return { name : 'Int' + basicType.replace(/[^0-9]/g, '') + 'u', type : basicType }; - case 'bool': - return { name : 'Boolean', type : 'bool' }; - case 'float': - return { name : 'Float', type : 'float' }; - case 'double': - return { name : 'Double', type : 'double' }; - default: - return { name : 'Unsupported', type : null }; - } -} - -function getAtomic(atomics, type) -{ - return atomics.find(atomic => atomic.name == type.toLowerCase()); -} - -function getBitmap(bitmaps, type) -{ - return bitmaps.find(bitmap => bitmap.label == type); -} - -function getEnum(enums, type) -{ - return enums.find(enumItem => enumItem.label == type); -} - -function getStruct(structs, type) -{ - return structs.find(struct => struct.label == type); -} - -function handleString(item, [ atomics, enums, bitmaps, structs ]) -{ - if (!StringHelper.isString(item.type)) { - return false; - } - - const atomic = getAtomic(atomics, item.type); - if (!atomic) { - return false; - } - - const kLengthSizeInBytes = 2; - - item.atomicTypeId = atomic.atomicId; - if (StringHelper.isOctetString(item.type)) { - item.chipType = 'chip::ByteSpan'; - } else { - item.chipType = 'chip::CharSpan'; - } - item.size = kLengthSizeInBytes + item.maxLength; - item.name = item.name || item.label; - return true; -} - -function handleList(item, [ atomics, enums, bitmaps, structs ]) -{ - if (!ListHelper.isList(item.type)) { - return false; - } - - const entryType = item.entryType; - if (!entryType) { - console.log(item); - throw new Error(item.label, 'List[T] is missing type "T" information'); - } - - item.isArray = true; - item.type = entryType; - enhancedItem(item, [ atomics, enums, bitmaps, structs ]); - - return true; -} - -function handleStruct(item, [ atomics, enums, bitmaps, structs ]) -{ - const struct = getStruct(structs, item.type); - if (!struct) { - return false; - } - - // Add a leading `_` before the name of struct to match what is done in the af-structs.zapt template. - // For instance structs are declared as "typedef struct _{{asType label}}". - item.chipType = '_' + item.type; - item.isStruct = true; - - struct.items.map(structItem => enhancedItem(structItem, [ atomics, enums, bitmaps, structs ])); - item.items = struct.items; - item.size = struct.items.map(type => type.size).reduce((accumulator, currentValue) => accumulator + currentValue, 0); - return true; -} - -function handleBasic(item, [ atomics, enums, bitmaps, structs ]) -{ - let itemType = item.type; - - const enumItem = getEnum(enums, itemType); - if (enumItem) { - item.isEnum = true; - itemType = 'enum' + enumItem.size * 8; - } - - const bitmap = getBitmap(bitmaps, itemType); - if (bitmap) { - item.isBitmap = true; - itemType = 'bitmap' + bitmap.size * 8; - } - - const atomic = getAtomic(atomics, itemType); - if (atomic) { - item.name = item.name || item.label; - item.isStruct = false; - item.atomicTypeId = atomic.atomicId; - item.size = atomic.size; - item.chipType = atomic.chipType; - return true; - } - - return false; -} - -function enhancedItem(item, types) -{ - if (handleString(item, types)) { - return; - } - - if (handleList(item, types)) { - return; - } - - if (handleStruct(item, types)) { - return; - } - - if (handleBasic(item, types)) { - return; - } - - console.log(item); - throw new Error(item.type + ' not found.'); -} - -function inlineStructItems(args) -{ - const arguments = []; - args.forEach(argument => { - if (!argument.isStruct) { - arguments.push(argument); - return; - } - - argument.items.forEach(item => { - arguments.push(item); - }); - }); - - return arguments; -} - -function enhancedCommands(commands, types) -{ - commands.forEach(command => { - command.arguments.forEach(argument => { - enhancedItem(argument, types); - argument.isComplex = argument.isList || argument.isStruct || argument.isArray; - }); - }); - - commands.forEach(command => { - // Flag things ending in "Response" so we can filter out unused responses, - // but don't stomp on a true isResponse value if it's set already because - // some other command had this one as its response. - command.isResponse = command.isResponse || command.name.includes('Response'); - command.isManufacturerSpecificCommand = !!this.mfgCode; - - command.hasSpecificResponse = !!command.response; - if (command.response) { - const responseName = command.response.name; - command.responseName = responseName; - // The 'response' property contains the response returned by the `selectCommandById` - // helper. But this one does not contains all the metadata informations added by - // `enhancedItem`, so instead of using the one from ZAP, retrieve the enhanced version. - command.response = commands.find(command => command.name == responseName); - // We might have failed to find a response if our configuration is weird - // in some way. - if (command.response) { - command.response.isResponse = true; - } - } else { - command.responseName = 'DefaultSuccess'; - command.response = { arguments : [] }; - } - }); - - // Filter unused responses - commands = commands.filter(command => { - if (!command.isResponse) { - return true; - } - - const responseName = command.name; - return commands.find(command => command.responseName == responseName); - }); - - // At this stage, 'command.arguments' may contains 'struct'. But some controllers does not know (yet) how - // to handle them. So those needs to be inlined. - commands.forEach(command => { - if (command.isResponse) { - return; - } - - command.expandedArguments = inlineStructItems(command.arguments); - }); - - return commands; -} - -function enhancedEvents(events, types) -{ - events.forEach(event => { - const argument = { - name : event.name, - type : event.name, - isArray : false, - isEvent : true, - isNullable : false, - label : event.name, - }; - event.response = { arguments : [ argument ] }; - }); - return events; -} - -function enhancedAttributes(attributes, globalAttributes, types) -{ - attributes.forEach(attribute => { - enhancedItem(attribute, types); - attribute.isGlobalAttribute = globalAttributes.includes(attribute.code); - attribute.isWritableAttribute = !!attribute.isWritable; - attribute.isReportableAttribute = !!attribute.includedReportable; - attribute.chipCallback = asChipCallback(attribute); - attribute.isComplex = attribute.isList || attribute.isStruct || attribute.isArray; - }); - - attributes.forEach(attribute => { - const argument = { - name : attribute.name, - type : attribute.type, - size : attribute.size, - isArray : attribute.isArray, - isEvent : false, - isNullable : attribute.isNullable, - chipType : attribute.chipType, - chipCallback : attribute.chipCallback, - label : attribute.name, - }; - attribute.arguments = [ argument ]; - attribute.response = { arguments : [ argument ] }; - }); - - // At this stage, the 'attributes' array contains all attributes enabled for all endpoints. It means - // that a lot of attributes are duplicated if a cluster is enabled on multiple endpoints but that's - // not what the templates expect. So let's deduplicate them. - const compare = (a, b) => (a.name == b.name && a.clusterId == b.clusterId && a.side == b.side); - return attributes.filter((att, index) => attributes.findIndex(att2 => compare(att, att2)) == index); -} - -const Clusters = { - ready : new Deferred(), - post_processing_ready : new Deferred() -}; - -class ClusterStructUsage { - constructor() - { - this.usedStructures = new Map(); // Structure label -> structure - this.clustersForStructure = new Map(); // Structure label -> Set(Cluster name) - this.structuresForCluster = new Map(); // Cluster name -> Set(Structure label) - } - - addUsedStructure(clusterName, structure) - { - // Record that generally this structure is used - this.usedStructures.set(structure.label, structure); - - // Record that this structure is used by a - // particular cluster name - let clusterSet = this.clustersForStructure.get(structure.label); - if (!clusterSet) { - clusterSet = new Set(); - this.clustersForStructure.set(structure.label, clusterSet); - } - clusterSet.add(clusterName); - - let structureLabelSet = this.structuresForCluster.get(clusterName); - if (!structureLabelSet) { - structureLabelSet = new Set(); - this.structuresForCluster.set(clusterName, structureLabelSet); - } - structureLabelSet.add(structure.label); - } - - /** - * Finds structures that are specific to one cluster: - * - they belong to the cluster - * - only that cluster ever uses it - */ - structuresSpecificToCluster(clusterName) - { - let clusterStructures = this.structuresForCluster.get(clusterName); - if (!clusterStructures) { - return []; - } - - return Array.from(clusterStructures) - .filter(name => this.clustersForStructure.get(name).size == 1) - .map(name => this.usedStructures.get(name)); - } - - structuresUsedByMultipleClusters() - { - return Array.from(this.usedStructures.values()).filter(s => this.clustersForStructure.get(s.label).size > 1); - } -} - -Clusters._addUsedStructureNames = async function(clusterName, startType, allKnownStructs) { - const struct = getStruct(allKnownStructs, startType.type); - if (!struct) { - return; - } - - this._cluster_structures.addUsedStructure(clusterName, struct); - - for (const item of struct.items) { - this._addUsedStructureNames(clusterName, item, allKnownStructs); - } -} - -Clusters._computeUsedStructureNames = async function(structs) { - // NOTE: this MUST be called only after attribute promise is resolved - // as iteration of `get*ByClusterName` needs that data. - for (const cluster of this._clusters) { - const attributes = await this.getAttributesByClusterName(cluster.name); - for (const attribute of attributes) { - if (attribute.isStruct) { - this._addUsedStructureNames(cluster.name, attribute, structs); - } - } - - const commands = await this.getCommandsByClusterName(cluster.name); - for (const command of commands) { - for (const argument of command.arguments) { - this._addUsedStructureNames(cluster.name, argument, structs); - } - } - - const responses = await this.getResponsesByClusterName(cluster.name); - for (const response of responses) { - for (const argument of response.arguments) { - this._addUsedStructureNames(cluster.name, argument, structs); - } - } - } - - this._used_structure_names = new Set(this._cluster_structures.usedStructures.keys()) -} - -/** - * If includeAll is true, all events/commands/attributes will be included, not - * just the ones enabled in the ZAP configuration. - */ -Clusters.init = async function(context, includeAll) { - if (this.ready.running) - { - return this.ready; - } - this.ready.running = true; - - let packageId = await templateUtil.ensureZclPackageId(context).catch(err => { console.log(err); throw err; }); - - const loadTypes = [ - loadAtomics.call(context, packageId), - loadEnums.call(context, packageId), - loadBitmaps.call(context, packageId), - loadStructs.call(context, packageId), - ]; - - const promises = [ - Promise.all(loadTypes), - loadEndpoints.call(context), - // For now just always use loadClusters, because we have a bunch of things - // defined in our XML that are not actually part of Matter. - (includeAll ? loadClusters : loadClusters).call(context, packageId), - (includeAll ? loadAllCommands : loadCommands).call(context, packageId), - (includeAll ? loadAllAttributes : loadAttributes).call(context, packageId), - loadGlobalAttributes.call(context, packageId), - (includeAll ? loadAllEvents : loadEvents).call(context, packageId), - ]; - - let [types, endpoints, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); - - this._endpoints = endpoints; - this._clusters = clusters; - this._commands = enhancedCommands(commands, types); - this._attributes = enhancedAttributes(attributes, globalAttributes, types); - this._events = enhancedEvents(events, types); - this._cluster_structures = new ClusterStructUsage(); - - // data is ready, but not full post - processing - this.ready.resolve(); - - await this._computeUsedStructureNames(types[3]); - - return this.post_processing_ready.resolve(); -} - - -// -// Helpers: All -// -function asBlocks(promise, options) -{ - return promise.then(data => templateUtil.collectBlocks(data, options, this)) -} - -function ensureClusters(context, includeAll = false) -{ - // Kick off Clusters initialization. This is async, but that's fine: all the - // getters on Clusters wait on that initialziation to complete. - ensureState(context, "Don't have a context"); - - Clusters.init(context, includeAll); - return Clusters; -} - -// -// Helpers: Get all clusters/commands/responses/attributes. -// -const kResponseFilter = (isResponse, item) => isResponse == item.isResponse; - -Clusters.ensureReady = function() -{ - ensureState(this.ready.running); - return this.ready; -} - -Clusters.ensurePostProcessingDone = function() -{ - ensureState(this.ready.running); - return this.post_processing_ready; -} - -Clusters.getClusters = function() -{ - return this.ensureReady().then(() => this._clusters); -} - -Clusters.getEndPoints = function() -{ - return this.ensureReady().then(() => this._endpoints); -} - -Clusters.getCommands = function() -{ - return this.ensureReady().then(() => this._commands.filter(kResponseFilter.bind(null, false))); -} - -Clusters.getResponses = function() -{ - return this.ensureReady().then(() => this._commands.filter(kResponseFilter.bind(null, true))); -} - -Clusters.getAttributes = function() -{ - return this.ensureReady().then(() => this._attributes); -} - -Clusters.getEvents = function() -{ - return this.ensureReady().then(() => this._events); -} - -// -// Helpers: Get by Cluster Name -// -const kNameFilter = (name, item) => name.toLowerCase() == (item.clusterName || item.name).toLowerCase(); - -Clusters.getCommandsByClusterName = function(name) -{ - return this.getCommands().then(items => items.filter(kNameFilter.bind(null, name))); -} - -Clusters.getResponsesByClusterName = function(name) -{ - return this.getResponses().then(items => items.filter(kNameFilter.bind(null, name))); -} - -Clusters.getAttributesByClusterName = function(name) -{ - return this.ensureReady().then(() => { - const clusterId = this._clusters.find(kNameFilter.bind(null, name)).id; - const filter = attribute => attribute.clusterId == clusterId; - return this.getAttributes().then(items => items.filter(filter)); - }); -} - -Clusters.getEventsByClusterName = function(name) -{ - return this.getEvents().then(items => items.filter(kNameFilter.bind(null, name))); -} - -// -// Helpers: Get by Cluster Side -// -const kSideFilter = (side, item) => item.source ? ((item.source == side && item.outgoing) || (item.source != side && item.incoming)) - : item.side == side; - -Clusters.getCommandsByClusterSide = function(side) -{ - return this.getCommands().then(items => items.filter(kSideFilter.bind(null, side))); -} - -Clusters.getResponsesByClusterSide = function(side) -{ - return this.getResponses().then(items => items.filter(kSideFilter.bind(null, side))); -} - -Clusters.getAttributesByClusterSide = function(side) -{ - return this.getAttributes().then(items => items.filter(kSideFilter.bind(null, side))); -} - -Clusters.getEventsByClusterSide = function(side) -{ - return this.getEvents().then(items => items.filter(kSideFilter.bind(null, side))); -} - - -// -// Helpers: Client -// -const kClientSideFilter = kSideFilter.bind(null, 'client'); - -Clusters.getClientClusters = function() -{ - return this.getClusters().then(items => items.filter(kClientSideFilter)); -} - -Clusters.getClientCommands = function(name) -{ - return this.getCommandsByClusterName(name).then(items => items.filter(kClientSideFilter)); -} - -Clusters.getClientResponses = function(name) -{ - return this.getResponsesByClusterName(name).then(items => items.filter(kClientSideFilter)); -} - -Clusters.getClientAttributes = function(name) -{ - return this.getAttributesByClusterName(name).then(items => items.filter(kClientSideFilter)); -} - -Clusters.getClientEvents = function(name) -{ - return this.getEventsByClusterName(name).then(items => items.filter(kClientSideFilter)); -} - -// -// Helpers: Server -// -const kServerSideFilter = kSideFilter.bind(null, 'server'); - -Clusters.getServerClusters = function() -{ - return this.getClusters().then(items => items.filter(kServerSideFilter)); -} - -Clusters.getServerCommands = function(name) -{ - return this.getCommandsByClusterName(name).then(items => items.filter(kServerSideFilter)); -} - -Clusters.getServerResponses = function(name) -{ - return this.getResponsesByClusterName(name).then(items => items.filter(kServerSideFilter)); -} - -Clusters.getServerAttributes = function(name) -{ - return this.getAttributesByClusterName(name).then(items => items.filter(kServerSideFilter)); -} - -Clusters.getUsedStructureNames = function() -{ - return this.ensurePostProcessingDone().then(() => this._used_structure_names); -} - -Clusters.getStructuresByClusterName = function(name) -{ - return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresSpecificToCluster(name)); -} - -Clusters.getSharedStructs = function() -{ - return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresUsedByMultipleClusters()); -} - -Clusters.getServerEvents = function(name) -{ - return this.getEventsByClusterName(name).then(items => items.filter(kServerSideFilter)); -} - -// -// Module exports -// -exports.asBlocks = asBlocks; -exports.ensureClusters = ensureClusters; diff --git a/src/app/zap-templates/common/Deferred.js b/src/app/zap-templates/common/Deferred.js deleted file mode 100644 index fa6da232c0a75d..00000000000000 --- a/src/app/zap-templates/common/Deferred.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function Deferred() -{ - let resolve, reject; - - let promise = new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - }); - - promise.resolve = resolve; - promise.reject = reject; - return promise; -} - -// -// Module exports -// -exports.Deferred = Deferred; diff --git a/src/app/zap-templates/common/ListHelper.js b/src/app/zap-templates/common/ListHelper.js deleted file mode 100644 index 4e6011adfa5f95..00000000000000 --- a/src/app/zap-templates/common/ListHelper.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const listType = 'ARRAY'; - -function isList(type) -{ - return type.toUpperCase() == listType; -} - -// -// Module exports -// -exports.isList = isList; diff --git a/src/app/zap-templates/common/StringHelper.js b/src/app/zap-templates/common/StringHelper.js deleted file mode 100644 index b3bc6f57a1d6a3..00000000000000 --- a/src/app/zap-templates/common/StringHelper.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ - -const characterStringTypes = [ 'CHAR_STRING', 'LONG_CHAR_STRING' ]; -const octetStringTypes = [ 'OCTET_STRING', 'LONG_OCTET_STRING' ]; -const stringShortTypes = [ 'CHAR_STRING', 'OCTET_STRING' ]; -const stringLongTypes = [ 'LONG_CHAR_STRING', 'LONG_OCTET_STRING' ]; - -function isString(type) -{ - return isCharString(type) || isOctetString(type); -} - -function isCharString(type) -{ - return characterStringTypes.includes(type.toUpperCase()); -} - -function isOctetString(type) -{ - return octetStringTypes.includes(type.toUpperCase()); -} - -function isShortString(type) -{ - return stringShortTypes.includes(type.toUpperCase()); -} - -function isLongString(type) -{ - return stringLongTypes.includes(type.toUpperCase()); -} - -// -// Module exports -// -exports.isString = isString; -exports.isCharString = isCharString; -exports.isOctetString = isOctetString; -exports.isShortString = isShortString; -exports.isLongString = isLongString; diff --git a/src/app/zap-templates/common/attributes/Accessors.js b/src/app/zap-templates/common/attributes/Accessors.js deleted file mode 100644 index 29c20fb313a37e..00000000000000 --- a/src/app/zap-templates/common/attributes/Accessors.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; -const ListHelper = require('../../common/ListHelper.js'); -const StringHelper = require('../../common/StringHelper.js'); -const appHelper = require('../../templates/app/helper.js'); -const cHelper = require(zapPath + 'generator/helper-c.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclUtil = require(zapPath + 'util/zcl-util.js') - -// Not sure what to do with EUI64 yet. -const unsupportedTypes = [ 'EUI64' ]; -function isUnsupportedType(type) -{ - return unsupportedTypes.includes(type.toUpperCase()); -} - -function canHaveSimpleAccessors(attr) -{ - if (attr.isArray) { - return false; - } - - if (ListHelper.isList(attr.type)) { - return false; - } - - // We can't check for being a struct synchronously, so that's handled manually - // in the template. - if (isUnsupportedType(attr.type)) { - return false; - } - - return true; -} - -async function accessorGetterType(attr) -{ - let type; - let mayNeedPointer = false; - if (StringHelper.isCharString(attr.type)) { - type = "chip::MutableCharSpan"; - } else if (StringHelper.isOctetString(attr.type)) { - type = "chip::MutableByteSpan"; - } else { - mayNeedPointer = true; - const options = { 'hash' : { forceNotNullable : true, forceNotOptional : true, ns : this.parent.name } }; - type = await appHelper.zapTypeToEncodableClusterObjectType.call(this, attr.type, options); - } - - if (attr.isNullable) { - type = `DataModel::Nullable<${type}> &`; - } else if (mayNeedPointer) { - type = `${type} *`; - } - - return type; -} - -async function accessorTraitType(type) -{ - let temp = type.toLowerCase(); - let matches = temp.match(/^int([0-9]+)(s?)/i); - if (matches) { - let signed = matches[2] != ""; - let size = parseInt(matches[1]) / 8; - - if (size != 1 && size != 2 && size != 4 && size != 8) { - return `OddSizedInteger<${size}, ${signed}>`; - } - } - - const options = { 'hash' : { forceNotNullable : true, forceNotOptional : true, ns : this.parent.name } }; - return appHelper.zapTypeToEncodableClusterObjectType.call(this, type, options); -} - -async function typeAsDelimitedMacro(type) -{ - const { db } = this.global; - const pkgId = await templateUtil.ensureZclPackageId(this); - const typeInfo = await zclUtil.determineType(db, type, pkgId); - return cHelper.asDelimitedMacro.call(this, typeInfo.atomicType); -} - -// -// Module exports -// -exports.canHaveSimpleAccessors = canHaveSimpleAccessors; -exports.accessorGetterType = accessorGetterType; -exports.accessorTraitType = accessorTraitType; -exports.typeAsDelimitedMacro = typeAsDelimitedMacro; diff --git a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js b/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js deleted file mode 100644 index e135c0dc020f77..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const { ensureClusters } = require('../ClustersHelper.js'); - -const fs = require('fs'); -const path = require('path'); - -let SimulatedClusters = []; -(async () => { - const simulatedClustersPath = path.join(__dirname, 'clusters'); - const simulatedClustersFiles = await fs.promises.readdir(simulatedClustersPath); - SimulatedClusters = simulatedClustersFiles.map(filename => { - let cluster = (require(path.join(simulatedClustersPath, filename))).cluster; - cluster.commands.forEach(command => { - if (!('name' in command)) { - console.error('Error in: ' + filename + '. Missing command name.'); - throw new Error(); - } - - if (!('arguments' in command)) { - command.arguments = []; - } - - if (!('response' in command)) { - command.response = { arguments : [] }; - } - - if (command.arguments.length) { - command.hasSpecificArguments = true; - } - - if (command.response.arguments.length) { - command.hasSpecificResponse = true; - } - }); - return cluster; - }); - return SimulatedClusters; -})(); - -function getSimulatedCluster(clusterName) -{ - return SimulatedClusters.find(cluster => cluster.name == clusterName); -} - -function getClusters(context) -{ - return ensureClusters(context, true).getClusters().then(clusters => clusters.concat(SimulatedClusters).flat(1)); -} - -function getCommands(context, clusterName) -{ - const cluster = getSimulatedCluster(clusterName); - return cluster ? Promise.resolve(cluster.commands) : ensureClusters(context).getClientCommands(clusterName); -} - -function getAttributes(context, clusterName) -{ - const cluster = getSimulatedCluster(clusterName); - return cluster ? Promise.resolve(cluster.attributes) : ensureClusters(context).getServerAttributes(clusterName); -} - -function getEvents(context, clusterName) -{ - const cluster = getSimulatedCluster(clusterName); - return cluster ? Promise.resolve(cluster.events) : ensureClusters(context).getServerEvents(clusterName); -} - -function isTestOnlyCluster(clusterName) -{ - return !!getSimulatedCluster(clusterName); -} - -// -// Module exports -// -exports.getClusters = getClusters; -exports.getCommands = getCommands; -exports.getAttributes = getAttributes; -exports.getEvents = getEvents; -exports.isTestOnlyCluster = isTestOnlyCluster; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js deleted file mode 100644 index 3acbcb890d5923..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * Copyright (c) 2022 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. - */ - -/* - * This file declare test suites utilities methods for commissioner commands. - * - * Each method declared in this file needs to be implemented on a per-language - * basis and permits to exposes methods to the test suites that are not part - * of the regular cluster set of APIs. - * - */ - -const PairWithCode = { - name : 'PairWithCode', - arguments : [ { type : 'NODE_ID', name : 'nodeId' }, { type : 'CHAR_STRING', name : 'payload' } ], -}; - -const Unpair = { - name : 'Unpair', - arguments : [ { type : 'NODE_ID', name : 'nodeId' } ], -}; - -const name = 'CommissionerCommands'; -const commands = [ PairWithCode, Unpair ]; - -const CommissionerCommands = { - name, - commands -}; - -// -// Module exports -// -exports.cluster = CommissionerCommands; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js deleted file mode 100644 index 23da2c0e1b64ee..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file declare test suites utilities methods for delayed commands. - * - * Each method declared in this file needs to be implemented on a per-language - * basis and permits to exposes methods to the test suites that are not part - * of the regular cluster set of APIs. - * - */ - -const WaitForMs = { - name : 'WaitForMs', - arguments : [ { type : 'INT32U', name : 'ms' } ], -}; - -const WaitForCommissioning = { - name : 'WaitForCommissioning', -}; - -const WaitForCommissionee = { - name : 'WaitForCommissionee', - arguments : [ { type : 'NODE_ID', name : 'nodeId' }, { type : 'BOOLEAN', name : 'expireExistingSession', isOptional : true } ], -}; - -const WaitForMessage = { - name : 'WaitForMessage', - arguments : [ { type : 'CHAR_STRING', name : 'registerKey', isOptional : true }, { type : 'CHAR_STRING', name : 'message' } ], -}; - -const name = 'DelayCommands'; -const commands = [ WaitForMs, WaitForCommissioning, WaitForCommissionee, WaitForMessage ]; - -const DelayCommands = { - name, - commands -}; - -// -// Module exports -// -exports.cluster = DelayCommands; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js deleted file mode 100644 index 7579b69d176f20..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js +++ /dev/null @@ -1,170 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file declares test suite utility methods for discovery. - * - * Each method declared in this file needs to be implemented on a per-language - * basis and allows exposing methods to the test suites that are not part - * of the regular cluster set of APIs. - * - */ - -const kTypeArgument = { - name : 'type', - type : 'CHAR_STRING', -}; - -const kNumberValueArgument = { - name : 'value', - type : 'INT64U', -}; - -const kStringValueArgument = { - name : 'value', - type : 'CHAR_STRING', -}; - -const kDefaultResponse = { - arguments : [ - { name : 'hostName', type : 'CHAR_STRING', chipType : 'chip::CharSpan' }, // - { name : 'instanceName', type : 'CHAR_STRING', chipType : 'chip::CharSpan' }, // - { name : 'longDiscriminator', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'shortDiscriminator', type : 'INT8U', chipType : 'uint8_t' }, // - { name : 'vendorId', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'productId', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'commissioningMode', type : 'INT8U', chipType : 'uint8_t' }, // - { name : 'deviceType', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'deviceName', type : 'CHAR_STRING' }, // - { name : 'rotatingId', type : 'OCTET_STRING', chipType : 'chip::ByteSpan' }, // - { name : 'rotatingIdLen', type : 'INT64U', chipType : 'uint64_t' }, // - { name : 'pairingHint', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'pairingInstruction', type : 'CHAR_STRING' }, // - { name : 'supportsTcp', type : 'BOOLEAN', chipType : 'bool' }, // - { name : 'numIPs', type : 'INT8U', chipType : 'uint8_t' }, // - { name : 'port', type : 'INT16U', chipType : 'uint16_t' }, // - { name : 'mrpRetryIntervalIdle', type : 'INT32U', chipType : 'uint32_t', isOptional : true }, // - { name : 'mrpRetryIntervalActive', type : 'INT32U', chipType : 'uint32_t', isOptional : true }, // - ] -}; - -// -// Commissionable -// - -const FindCommissionable = { - name : 'FindCommissionable', - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByShortDiscriminator = { - name : 'FindCommissionableByShortDiscriminator', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByLongDiscriminator = { - name : 'FindCommissionableByLongDiscriminator', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByCompressedFabricId = { - name : 'FindOperationalByCompressedFabricId', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByCommissioningMode = { - name : 'FindCommissionableByCommissioningMode', - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByVendorId = { - name : 'FindCommissionableByVendorId', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByDeviceType = { - name : 'FindCommissionableByDeviceType', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionableByName = { - name : 'FindCommissionableByName', - arguments : [ kStringValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -// -// Commissioner -// - -const FindCommissioner = { - name : 'FindCommissioner', - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionerByVendorId = { - name : 'FindCommissionerByVendorId', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const FindCommissionerByDeviceType = { - name : 'FindCommissionerByDeviceType', - arguments : [ kNumberValueArgument ], - responseName : 'DiscoveryCommandResponse', - response : kDefaultResponse -}; - -const commands = [ - // Commissionable - FindCommissionable, - FindCommissionableByShortDiscriminator, - FindCommissionableByLongDiscriminator, - FindCommissionableByCommissioningMode, - FindCommissionableByVendorId, - FindCommissionableByDeviceType, - FindCommissionableByName, - // Commissioner - FindCommissioner, - FindCommissionerByVendorId, - FindCommissionerByDeviceType, -]; - -const DiscoveryCommands = { - name : 'DiscoveryCommands', - commands : commands, -}; - -// -// Module exports -// -exports.cluster = DiscoveryCommands; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js deleted file mode 100644 index 3be33a01651a6b..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file declares test suite utility methods for logging. - * - * Each method declared in this file needs to be implemented on a per-language - * basis and allows exposing methods to the test suites that are not part - * of the regular cluster set of APIs. - * - */ - -const Log = { - name : 'Log', - arguments : [ { type : 'CHAR_STRING', name : 'message' } ], -}; - -const UserPrompt = { - name : 'UserPrompt', - arguments : [ { type : 'CHAR_STRING', name : 'message' }, { type : 'CHAR_STRING', name : 'expectedValue', isOptional : true } ], -}; - -const LogCommands = { - name : 'LogCommands', - commands : [ Log, UserPrompt ], -}; - -// -// Module exports -// -exports.cluster = LogCommands; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js deleted file mode 100644 index b59f9c9fc925a0..00000000000000 --- a/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * - * Copyright (c) 2022 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. - */ - -/* - * This file declares test suite utility methods for system commands. - * - * Each method declared in this file needs to be implemented on a per-language - * basis and allows exposing methods to the test suites that are not part - * of the regular cluster set of APIs. - * - */ - -const Start = { - name : 'Start', - arguments : [ - { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true }, - { 'name' : 'discriminator', type : 'INT16U', isOptional : true }, { 'name' : 'port', type : 'INT16U', isOptional : true }, - { 'name' : 'kvs', type : 'CHAR_STRING', isOptional : true }, - { 'name' : 'minCommissioningTimeout', type : 'INT16U', isOptional : true }, - // OTA provider specific arguments - { 'name' : 'filepath', type : 'CHAR_STRING', isOptional : true }, - // OTA requestor specific arguments - { 'name' : 'otaDownloadPath', type : 'CHAR_STRING', isOptional : true } - ], -}; - -const Stop = { - name : 'Stop', - arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], -}; - -const Reboot = { - name : 'Reboot', - arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], -}; - -const FactoryReset = { - name : 'FactoryReset', - arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], -}; - -const CreateOtaImage = { - name : 'CreateOtaImage', - arguments : [ - { 'name' : 'otaImageFilePath', type : 'CHAR_STRING' }, { 'name' : 'rawImageFilePath', type : 'CHAR_STRING' }, - { 'name' : 'rawImageContent', type : 'CHAR_STRING' } - ], -}; - -const CompareFiles = { - name : 'CompareFiles', - arguments : [ { 'name' : 'file1', type : 'CHAR_STRING' }, { 'name' : 'file2', type : 'CHAR_STRING' } ], -}; - -const SystemCommands = { - name : 'SystemCommands', - commands : [ Start, Stop, Reboot, FactoryReset, CreateOtaImage, CompareFiles ], -}; - -// -// Module exports -// -exports.cluster = SystemCommands; diff --git a/src/app/zap-templates/common/variables/Variables.js b/src/app/zap-templates/common/variables/Variables.js deleted file mode 100644 index 31a9eb27caacf2..00000000000000 --- a/src/app/zap-templates/common/variables/Variables.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This file contains code for supporting variables into the YAML tests suites. - */ - -// Import helpers from zap core -const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; -const zclHelper = require(zapPath + 'generator/helper-zcl.js') -const templateUtil = require(zapPath + 'generator/template-util.js') - -const { getCommands, getAttributes } = require('../simulated-clusters/SimulatedClusters.js'); - -const knownVariables = { - 'nodeId' : { type : 'NODE_ID', defaultValue : 0x12345, isNullable : false }, - 'endpoint' : { type : 'ENDPOINT_NO', defaultValue : '', isNullable : false }, - 'cluster' : { type : 'CHAR_STRING', defaultValue : '', isNullable : false }, - 'timeout' : { type : 'INT16U', defaultValue : "kTimeoutInSeconds", isNullable : false }, -}; - -function throwError(test, errorStr) -{ - console.error('Error in: ' + test.filename + '.yaml for test with label: "' + test.label + '"\n'); - console.error(errorStr); - throw new Error(); -} - -async function getItems(test, promise, itemName) -{ - return promise.then(items => { - const item = items.find(item => item.name.toLowerCase() == itemName.toLowerCase()); - if (!item) { - const names = items.map(item => item.name); - throwError(test, 'Missing ' + itemName + '" in: \n\t* ' + names.join('\n\t* ')); - } - - return item; - }); -} - -async function getCommandInformationsFor(context, test, argumentName) -{ - const command = await getItems(test, getCommands(context, test.cluster), test.command); - const argument = command.response.arguments.find(item => item.name.toLowerCase() == argumentName.toLowerCase()); - return { type : argument.type, chipType : argument.chipType, isNullable : argument.isNullable }; -} - -async function getAttributeInformationsFor(context, test, attributeName) -{ - const attribute = await getItems(test, getAttributes(context, test.cluster), attributeName); - return { type : attribute.type, chipType : attribute.chipType, isNullable : attribute.isNullable }; -} - -async function extractVariablesFromConfig(context, suite) -{ - let variables = []; - - // Ensure that timeout is always set in the config, to enable command-line - // control over it. - if (!("timeout" in suite.config)) { - // Set to the defaultValue, because below for the isKnownVariable case we will use - // the actual value as the default value... - suite.config.timeout = knownVariables.timeout.defaultValue; - } - - for (const key in suite.config) { - let value = {}; - - const isKnownVariable = key in knownVariables; - - const target = isKnownVariable ? knownVariables[key] : suite.config[key]; - for (const prop in target) { - value[prop] = target[prop]; - } - - if (!isKnownVariable && !('defaultValue' in target)) { - throw new Error(`${suite.filename}: No default value defined for config '${key}'`); - } - - value.defaultValue = isKnownVariable ? suite.config[key] : suite.config[key].defaultValue; - if (Number.isInteger(value.defaultValue) && !Number.isSafeInteger(value.defaultValue)) { - throw new Error(`${suite.filename}: Default value defined for config '${ - key}' is too large to represent exactly as an integer in YAML. Put quotes around it to treat it as a string.`); - } - value.chipType = await zclHelper.asUnderlyingZclType.call(context, value.type, { 'hash' : {} }); - value.name = key; - variables.push(value); - } - - return variables; -} - -async function extractVariablesFromTests(context, suite) -{ - let variables = {}; - suite.tests.forEach(test => { - test.response.forEach(response => { - response.values.filter(value => value.saveAs).forEach(saveAsValue => { - const key = saveAsValue.saveAs; - if (key in variables) { - throwError(test, `Variable with name: ${key} is already registered.`); - } - - if (!test.isCommand && !test.isAttribute) { - throwError(test, `Variable support for step ${test} is not supported. Only commands and attributes are supported.`); - } - - variables[key] = { test, name : saveAsValue.name }; - }); - }); - }); - - const rv = []; - for (const [key, { test, name }] of Object.entries(variables)) { - let variable = await ( - test.isCommand ? getCommandInformationsFor(context, test, name) : getAttributeInformationsFor(context, test, name)); - variable.name = key; - rv.push(variable); - } - - return rv; -} - -async function Variables(context, suite) -{ - return { - config : await extractVariablesFromConfig(context, suite), - tests : await extractVariablesFromTests(context, suite), - }; -} - -// -// Module exports -// -exports.Variables = Variables; diff --git a/src/app/zap-templates/partials/helper.js b/src/app/zap-templates/partials/helper.js deleted file mode 100644 index 78f61cffccce43..00000000000000 --- a/src/app/zap-templates/partials/helper.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ - -function pad(label, len, ch = ' ') -{ - return label.padEnd(len, ch); -} - -function concat() -{ - let str = '' - // Last argument is our hash argument. - for (let arg = 0; arg < arguments.length - 1; ++arg) - { - if (typeof arguments[arg] != 'object' || arguments[arg] instanceof String) { - str += arguments[arg]; - } else { - throw new TypeError( - `Unexpected object in concat: ${arg}:${Object.prototype.toString.call(arguments[arg])}, ${JSON.stringify(arguments)}`); - } - } - return str -} - -// -// Module exports -// -exports.pad = pad; -exports.concat = concat; diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js deleted file mode 100644 index 66033f0100de5f..00000000000000 --- a/src/app/zap-templates/templates/app/helper.js +++ /dev/null @@ -1,876 +0,0 @@ -/* - * - * Copyright (c) 2020 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 helpers from zap core -const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') -const queryCommand = require(zapPath + 'db/query-command.js') -const zclQuery = require(zapPath + 'db/query-zcl.js') -const queryEvents = require(zapPath + 'db/query-event.js') -const cHelper = require(zapPath + 'generator/helper-c.js') -const string = require(zapPath + 'util/string.js') -const dbEnum = require(zapPath + '../src-shared/db-enum.js') - -const StringHelper = require('../../common/StringHelper.js'); -const ChipTypesHelper = require('../../common/ChipTypesHelper.js'); -const TestHelper = require('../../common/ClusterTestGeneration.js'); - -zclHelper['isEvent'] = function (db, event_name, packageId) { - return queryEvents - .selectAllEvents(db, packageId) - .then(events => events.find(event => event.name == event_name)) - .then(events => events ? 'event' : dbEnum.zclType.unknown); -} - -// This list of attributes is taken from section '11.2. Global Attributes' of the -// Data Model specification. -const kGlobalAttributes = [ - 0xfff8, // GeneratedCommandList - 0xfff9, // AcceptedCommandList - 0xfffb, // AttributeList - 0xfffc, // ClusterRevision - 0xfffd, // FeatureMap -]; - -// Endpoint-config specific helpers -// these helpers are a Hot fix for the "GENERATED_FUNCTIONS" problem -// They should be removed or replace once issue #4369 is resolved -// These helpers only works within the endpoint_config iterator - -// List of all cluster with generated functions -var endpointClusterWithInit = [ - 'Basic', - 'Color Control', - 'Groups', - 'Identify', - 'Level Control', - 'Localization Configuration', - 'Occupancy Sensing', - 'On/Off', - 'Pump Configuration and Control', - 'Scenes', - 'Time Format Localization', - 'Thermostat', - 'Mode Select', -]; -var endpointClusterWithAttributeChanged = [ - 'Bridged Device Basic', - 'Door Lock', - 'Identify', - 'Pump Configuration and Control', - 'Window Covering', - 'Fan Control', -]; -var endpointClusterWithPreAttribute = [ - 'Door Lock', - 'Pump Configuration and Control', - 'Thermostat User Interface Configuration', - 'Time Format Localization', - 'Localization Configuration', - 'Mode Select', - 'Fan Control', - 'Thermostat', -]; - -/** - * Populate the GENERATED_FUNCTIONS field - */ -function chip_endpoint_generated_functions() -{ - let alreadySetCluster = []; - let ret = '\\\n'; - this.clusterList.forEach((c) => { - let clusterName = c.clusterName; - let functionList = ''; - if (alreadySetCluster.includes(clusterName)) { - // Only one array of Generated functions per cluster across all endpoints - return - } - if (c.comment.includes('server')) { - let hasFunctionArray = false - if (endpointClusterWithInit.includes(clusterName)) - { - hasFunctionArray = true - functionList = functionList.concat( - ` (EmberAfGenericClusterFunction) emberAf${cHelper.asCamelCased(clusterName, false)}ClusterServerInitCallback,\\\n`) - } - - if (endpointClusterWithAttributeChanged.includes(clusterName)) { - functionList = functionList.concat(` (EmberAfGenericClusterFunction) Matter${ - cHelper.asCamelCased(clusterName, false)}ClusterServerAttributeChangedCallback,\\\n`) - hasFunctionArray = true - } - - if (endpointClusterWithPreAttribute.includes(clusterName)) { - functionList = functionList.concat(` (EmberAfGenericClusterFunction) Matter${ - cHelper.asCamelCased(clusterName, false)}ClusterServerPreAttributeChangedCallback,\\\n`) - hasFunctionArray = true - } - - if (hasFunctionArray) { - ret = ret.concat( - `const EmberAfGenericClusterFunction chipFuncArray${cHelper.asCamelCased(clusterName, false)}Server[] = {\\\n`) - ret = ret.concat(functionList) - ret = ret.concat(`};\\\n`) - alreadySetCluster.push(clusterName) - } - } - }) - return ret.concat('\n'); -} - -function chip_endpoint_generated_commands_list(options) -{ - let ret = []; - let index = 0; - this.clusterList.forEach((c) => { - let acceptedCommands = []; - let generatedCommands = []; - - c.commands.forEach((cmd) => { - if (cmd.mask.includes('incoming_server')) { - acceptedCommands.push(`${cmd.commandId} /* ${cmd.name} */`); - if (cmd.responseId !== null) { - generatedCommands.push(`${cmd.responseId} /* ${cmd.responseName} */`); - } - } - }); - - generatedCommands = [...new Set(generatedCommands) ].sort(); - - if (acceptedCommands.length > 0 || generatedCommands.length > 0) { - ret.push({ text : ` /* ${c.comment} */\\` }); - } - if (acceptedCommands.length > 0) { - acceptedCommands.push('chip::kInvalidCommandId /* end of list */') - ret.push({ text : ` /* AcceptedCommandList (index=${index}) */ \\\n ${acceptedCommands.join(', \\\n ')}, \\` }); - index += acceptedCommands.length; - } - if (generatedCommands.length > 0) { - generatedCommands.push('chip::kInvalidCommandId /* end of list */') - ret.push({ text : ` /* GeneratedCommandList (index=${index})*/ \\\n ${generatedCommands.join(', \\\n ')}, \\` }); - index += generatedCommands.length; - } - }) - return templateUtil.collectBlocks(ret, options, this); -} - -/** - * Return endpoint config GENERATED_CLUSTER MACRO - * To be used as a replacement of endpoint_cluster_list since this one - * includes the GENERATED_FUNCTIONS array - */ -function chip_endpoint_cluster_list() -{ - let ret = '{ \\\n'; - let totalCommands = 0; - this.clusterList.forEach((c) => { - let mask = ''; - let functionArray = c.functions; - let clusterName = c.clusterName; - - if (c.comment.includes('server')) { - let hasFunctionArray = false; - if (endpointClusterWithInit.includes(clusterName)) { - c.mask.push('INIT_FUNCTION') - hasFunctionArray = true - } - - if (endpointClusterWithAttributeChanged.includes(clusterName)) { - c.mask.push('ATTRIBUTE_CHANGED_FUNCTION') - hasFunctionArray = true - } - - if (endpointClusterWithPreAttribute.includes(clusterName)) { - c.mask.push('PRE_ATTRIBUTE_CHANGED_FUNCTION') - hasFunctionArray = true - } - - if (hasFunctionArray) { - functionArray = 'chipFuncArray' + cHelper.asCamelCased(clusterName, false) + 'Server' - } - } - - if (c.mask.length == 0) { - mask = '0' - } else { - mask = c.mask.map((m) => `ZAP_CLUSTER_MASK(${m.toUpperCase()})`).join(' | ') - } - - let acceptedCommands = 0; - let generatedCommandList = []; - c.commands.forEach((cmd) => { - if (cmd.mask.includes('incoming_server')) { - acceptedCommands++; - if (cmd.responseId !== null) { - generatedCommandList.push(cmd.responseId); - } - } - }); - let generatedCommands = new Set(generatedCommandList).size; - - let acceptedCommandsListVal = "nullptr"; - let generatedCommandsListVal = "nullptr"; - - if (acceptedCommands > 0) { - acceptedCommands++; // Leaves space for the terminator - acceptedCommandsListVal = `ZAP_GENERATED_COMMANDS_INDEX( ${totalCommands} )`; - } - - if (generatedCommands > 0) { - generatedCommands++; // Leaves space for the terminator - generatedCommandsListVal = `ZAP_GENERATED_COMMANDS_INDEX( ${totalCommands + acceptedCommands} )`; - } - - ret = ret.concat(` { \\ - /* ${c.comment} */ \\ - .clusterId = ${c.clusterId}, \\ - .attributes = ZAP_ATTRIBUTE_INDEX(${c.attributeIndex}), \\ - .attributeCount = ${c.attributeCount}, \\ - .clusterSize = ${c.attributeSize}, \\ - .mask = ${mask}, \\ - .functions = ${functionArray}, \\ - .acceptedCommandList = ${acceptedCommandsListVal} ,\\ - .generatedCommandList = ${generatedCommandsListVal} ,\\ - },\\\n`) - - totalCommands = totalCommands + acceptedCommands + generatedCommands; - }) - return ret.concat('}\n'); -} - -/** - * Return the number of data versions we need for our fixed endpoints. - * - * This is just the count of server clusters on those endpoints. - */ -function chip_endpoint_data_version_count() -{ - let serverCount = 0; - for (const ep of this.endpoints) { - let epType = this.endpointTypes.find(type => type.id == ep.endpointTypeRef); - for (const cluster of epType.clusters) { - if (cluster.side == "server") { - ++serverCount; - } - } - } - return serverCount; -} - -// End of Endpoint-config specific helpers - -async function asNativeType(type) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - return ChipTypesHelper.asBasicType(zclType); - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => { - console.log(err); - throw err; - }); - return templateUtil.templatePromise(this.global, promise) -} - -async function asTypedExpression(value, type) -{ - const valueIsANumber = !isNaN(value); - if (!value || valueIsANumber) { - return asTypedLiteral.call(this, value, type); - } - - const tokens = value.split(' '); - if (tokens.length < 2) { - return asTypedLiteral.call(this, value, type); - } - - value = tokens - .map(token => { - if (!TestHelper.chip_tests_variables_has.call(this, token)) { - return token; - } - - if (!TestHelper.chip_tests_variables_is_nullable.call(this, token)) { - return token; - } - - return `${token}.Value()`; - }) - .join(' '); - - const resultType = await asNativeType.call(this, type); - return `static_cast<${resultType}>(${value})`; -} - -async function asTypedLiteral(value, type, cookie) -{ - const valueIsANumber = !isNaN(value); - if (!valueIsANumber) { - return value; - } - - const basicType = await asNativeType.call(this, type); - switch (basicType) { - case 'int32_t': - return value + 'L'; - case 'int64_t': - return value + 'LL'; - case 'uint8_t': - case 'uint16_t': - return value + 'U'; - case 'uint32_t': - return value + 'UL'; - case 'uint64_t': - return value + 'ULL'; - case 'float': - if (value == Infinity || value == -Infinity) { - return `${(value < 0) ? '-' : ''}INFINITY` - } - // If the number looks like an integer, append ".0" to the end; - // otherwise adding an "f" suffix makes compilers complain. - value = value.toString(); - if (value.match(/^-?[0-9]+$/)) { - value = value + ".0"; - } - return value + 'f'; - default: - if (value == Infinity || value == -Infinity) { - return `${(value < 0) ? '-' : ''}INFINITY` - } - return value; - } -} - -function hasSpecificAttributes(options) -{ - return this.count > kGlobalAttributes.length; -} - -function asLowerCamelCase(label) -{ - let str = string.toCamelCase(label, true); - // Check for the case when we're: - // 1. A single word (that's the regexp at the beginning, which matches the - // word-splitting regexp in string.toCamelCase). - // 2. Starting with multiple capital letters in a row. - // 3. But not _all_ capital letters (which we purposefully - // convert to all-lowercase). - // - // and if all those conditions hold, preserve the leading capital letters by - // uppercasing the first one, which got lowercased. - if (!/ |_|-|\//.test(label) && label.length > 1 && label.substring(0, 2).toUpperCase() == label.substring(0, 2) - && label.toUpperCase() != label) { - str = str[0].toUpperCase() + str.substring(1); - } - return str.replace(/[^A-Za-z0-9_]/g, ''); -} - -function asUpperCamelCase(label) -{ - let str = string.toCamelCase(label, false); - return str.replace(/[^A-Za-z0-9_]/g, ''); -} - -function chip_friendly_endpoint_type_name(options) -{ - var name = this.endpointTypeName; - if (name.startsWith("MA-")) { - // prefix likely for "Matter" and is redundant - name = name.substring(3); - } - - return asLowerCamelCase(name); -} - -function asMEI(prefix, suffix) -{ - return cHelper.asHex((prefix << 16) + suffix, 8); -} - -// Not to be exported. -function nsValueToNamespace(ns) -{ - if (ns == "detail") { - return ns; - } - - return asUpperCamelCase(ns); -} - -/* - * @brief - * - * This function converts a given ZAP type to a Cluster Object - * type used by the Matter SDK. - * - * Args: - * - * type: ZAP type specified in the XML - * isDecodable: Whether to emit an Encodable or Decodable cluster - * object type. - * - * These types can be found in src/app/data-model/. - * - */ -async function zapTypeToClusterObjectType(type, isDecodable, options) -{ - // Use the entryType as a type - if (type == 'array' && this.entryType) { - type = this.entryType; - } - - let passByReference = false; - async function fn(pkgId) - { - const ns = options.hash.ns ? ('chip::app::Clusters::' + nsValueToNamespace(options.hash.ns) + '::') : ''; - const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - const types = { - isEnum : await typeChecker('isEnum'), - isBitmap : await typeChecker('isBitmap'), - isEvent : await typeChecker('isEvent'), - isStruct : await typeChecker('isStruct'), - }; - - const typesCount = Object.values(types).filter(isType => isType).length; - if (typesCount > 1) { - let error = type + ' is ambiguous: \n'; - Object.entries(types).forEach(([ key, value ]) => { - if (value) { - error += '\t' + key + ': ' + value + '\n'; - } - }); - throw error; - } - - if (types.isEnum) { - // Catching baseline enums and converting them into 'uint[size]_t' - let s = type.toLowerCase().match(/^enum(\d+)$/); - if (s) { - return 'uint' + s[1] + '_t'; - } - return ns + type; - } - - if (types.isBitmap) { - // Catching baseline bitmaps and converting them into 'uint[size]_t' - let s = type.toLowerCase().match(/^bitmap(\d+)$/); - if (s) { - return 'uint' + s[1] + '_t'; - } - return 'chip::BitMask<' + ns + type + '>'; - } - - if (types.isStruct) { - passByReference = true; - return ns + 'Structs::' + type + '::' + (isDecodable ? 'DecodableType' : 'Type'); - } - - if (types.isEvent) { - passByReference = true; - return ns + 'Events::' + type + '::' + (isDecodable ? 'DecodableType' : 'Type'); - } - - return zclHelper.asUnderlyingZclType.call({ global : this.global }, type, options); - } - - let typeStr = await templateUtil.ensureZclPackageId(this).then(fn.bind(this)); - if ((this.isArray || this.entryType) && !options.hash.forceNotList) { - passByReference = true; - // If we did not have a namespace provided, we can assume we're inside - // chip::app. - let listNamespace = options.hash.ns ? "chip::app::" : "" - if (isDecodable) - { - typeStr = `${listNamespace}DataModel::DecodableList<${typeStr}>`; - } - else - { - // Use const ${typeStr} so that consumers don't have to create non-const - // data to encode. - typeStr = `${listNamespace}DataModel::List`; - } - } - if (this.isNullable && !options.hash.forceNotNullable) { - passByReference = true; - // If we did not have a namespace provided, we can assume we're inside - // chip::app::. - let ns = options.hash.ns ? "chip::app::" : "" - typeStr = `${ns}DataModel::Nullable<${typeStr}>`; - } - if (this.isOptional && !options.hash.forceNotOptional) { - passByReference = true; - // If we did not have a namespace provided, we can assume we're inside - // chip::. - let ns = options.hash.ns ? "chip::" : "" - typeStr = `${ns}Optional<${typeStr}>`; - } - if (options.hash.isArgument && passByReference) { - typeStr = `const ${typeStr} &`; - } - return templateUtil.templatePromise(this.global, Promise.resolve(typeStr)) -} - -function zapTypeToEncodableClusterObjectType(type, options) -{ - return zapTypeToClusterObjectType.call(this, type, false, options) -} - -function zapTypeToDecodableClusterObjectType(type, options) -{ - return zapTypeToClusterObjectType.call(this, type, true, options) -} - -async function _zapTypeToPythonClusterObjectType(type, options) -{ - async function fn(pkgId) - { - const ns = options.hash.ns; - const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - if (await typeChecker('isEnum')) { - // Catching baseline enums and converting them into 'uint' - if (type.toLowerCase().match(/^enum\d+$/g)) { - return 'uint'; - } - return ns + '.Enums.' + type; - } - - if (await typeChecker('isBitmap')) { - return 'uint'; - } - - if (await typeChecker('isStruct')) { - return ns + '.Structs.' + type; - } - - if (StringHelper.isCharString(type)) { - return 'str'; - } - - if (StringHelper.isOctetString(type)) { - return 'bytes'; - } - - if (type.toLowerCase() == 'single') { - return 'float32'; - } - - if (type.toLowerCase() == 'double') { - return 'float'; - } - - if (type.toLowerCase() == 'boolean') { - return 'bool' - } - - // #10748: asUnderlyingZclType will emit wrong types for int{48|56|64}(u), so we process all int values here. - if (type.toLowerCase().match(/^int\d+$/)) { - return 'int' - } - - if (type.toLowerCase().match(/^int\d+u$/)) { - return 'uint' - } - - resolvedType = await zclHelper.asUnderlyingZclType.call({ global : this.global }, type, options); - { - basicType = ChipTypesHelper.asBasicType(resolvedType); - if (basicType.match(/^int\d+_t$/)) { - return 'int' - } - if (basicType.match(/^uint\d+_t$/)) { - return 'uint' - } - } - } - - let promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)); - if ((this.isArray || this.entryType) && !options.hash.forceNotList) { - promise = promise.then(typeStr => `typing.List[${typeStr}]`); - } - - const isNull = (this.isNullable && !options.hash.forceNotNullable); - const isOptional = (this.isOptional && !options.hash.forceNotOptional); - - if (isNull && isOptional) { - promise = promise.then(typeStr => `typing.Union[None, Nullable, ${typeStr}]`); - } else if (isNull) { - promise = promise.then(typeStr => `typing.Union[Nullable, ${typeStr}]`); - } else if (isOptional) { - promise = promise.then(typeStr => `typing.Optional[${typeStr}]`); - } - - return templateUtil.templatePromise(this.global, promise) -} - -function zapTypeToPythonClusterObjectType(type, options) -{ - return _zapTypeToPythonClusterObjectType.call(this, type, options) -} - -async function _getPythonFieldDefault(type, options) -{ - async function fn(pkgId) - { - const ns = options.hash.ns; - const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - if (await typeChecker('isEnum')) { - return '0'; - } - - if (await typeChecker('isBitmap')) { - return '0'; - } - - if (await typeChecker('isStruct')) { - return 'field(default_factory=lambda: ' + ns + '.Structs.' + type + '())'; - } - - if (StringHelper.isCharString(type)) { - return '""'; - } - - if (StringHelper.isOctetString(type)) { - return 'b""'; - } - - if ([ 'single', 'double' ].includes(type.toLowerCase())) { - return '0.0'; - } - - if (type.toLowerCase() == 'boolean') { - return 'False' - } - - // #10748: asUnderlyingZclType will emit wrong types for int{48|56|64}(u), so we process all int values here. - if (type.toLowerCase().match(/^int\d+$/)) { - return '0' - } - - if (type.toLowerCase().match(/^int\d+u$/)) { - return '0' - } - - resolvedType = await zclHelper.asUnderlyingZclType.call({ global : this.global }, type, options); - { - basicType = ChipTypesHelper.asBasicType(resolvedType); - if (basicType.match(/^int\d+_t$/)) { - return '0' - } - if (basicType.match(/^uint\d+_t$/)) { - return '0' - } - } - } - - let promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)); - if ((this.isArray || this.entryType) && !options.hash.forceNotList) { - promise = promise.then(typeStr => `field(default_factory=lambda: [])`); - } - - const isNull = (this.isNullable && !options.hash.forceNotNullable); - const isOptional = (this.isOptional && !options.hash.forceNotOptional); - - if (isNull && isOptional) { - promise = promise.then(typeStr => `None`); - } else if (isNull) { - promise = promise.then(typeStr => `NullValue`); - } else if (isOptional) { - promise = promise.then(typeStr => `None`); - } - - return templateUtil.templatePromise(this.global, promise) -} - -function getPythonFieldDefault(type, options) -{ - return _getPythonFieldDefault.call(this, type, options) -} - -// Allow-list of enums that we generate as enums, not enum classes. The goal is -// to drive this down to 0. -function isWeaklyTypedEnum(label) -{ - return [ - "AttributeWritePermission", - "BarrierControlBarrierPosition", - "BarrierControlMovingState", - "ColorControlOptions", - "ColorLoopAction", - "ColorLoopDirection", - "ColorMode", - "ContentLaunchStatus", - "ContentLaunchStreamingType", - "EnhancedColorMode", - "HardwareFaultType", - "HueDirection", - "HueMoveMode", - "HueStepMode", - "IdentifyEffectIdentifier", - "IdentifyEffectVariant", - "IdentifyIdentifyType", - "InterfaceType", - "KeypadLockout", - "LevelControlOptions", - "MoveMode", - "NetworkFaultType", - "OnOffDelayedAllOffEffectVariant", - "OnOffDyingLightEffectVariant", - "OnOffEffectIdentifier", - "PHYRateType", - "RadioFaultType", - "RoutingRole", - "SaturationMoveMode", - "SaturationStepMode", - "SecurityType", - "SetpointAdjustMode", - "StartUpOnOffValue", - "StatusCode", - "StepMode", - "TemperatureDisplayMode", - "WiFiVersionType", - ].includes(label); -} - -function incrementDepth(depth) -{ - return depth + 1; -} - -function hasProperty(obj, prop) -{ - return prop in obj; -} - -async function zcl_events_fields_by_event_name(name, options) -{ - const { db, sessionId } = this.global; - const packageId = await templateUtil.ensureZclPackageId(this) - - const promise = queryEvents.selectAllEvents(db, packageId) - .then(events => events.find(event => event.name == name)) - .then(evt => queryEvents.selectEventFieldsByEventId(db, evt.id)) - .then(fields => fields.map(field => { - field.label = field.name; - return field; - })) - .then(fields => templateUtil.collectBlocks(fields, options, this)) - return templateUtil.templatePromise(this.global, promise) -} - -// Must be used inside zcl_clusters -async function zcl_commands_that_need_timed_invoke(options) -{ - const { db } = this.global; - let packageId = await templateUtil.ensureZclPackageId(this); - let commands = await queryCommand.selectCommandsByClusterId(db, this.id, packageId); - commands = commands.filter(cmd => cmd.mustUseTimedInvoke); - return templateUtil.collectBlocks(commands, options, this); -} - -// Allows conditioning generation on whether the given type is a fabric-scoped -// struct. -async function if_is_fabric_scoped_struct(type, options) -{ - let packageId = await templateUtil.ensureZclPackageId(this); - let st = await zclQuery.selectStructByName(this.global.db, type, packageId); - - if (st) { - // TODO: Should know whether a struct is fabric-scoped without sniffing its - // members. - let fields = await zclQuery.selectAllStructItemsById(this.global.db, st.id); - if (fields.find((i) => i.type.toLowerCase() == "fabric_idx")) { - return options.fn(this); - } - } - - return options.inverse(this); -} - -// check if a value is numerically 0 for the purpose of default value -// interpretation. Note that this does NOT check for data type, so assumes -// a string of 'false' is 0 because boolean false is 0. -function isNonZeroValue(value) -{ - if (!value) { - return false; - } - - if (value === '0') { - return false; - } - - // Hex value usage is inconsistent in XML. It looks we have - // all of 0x0, 0x00, 0x0000 so support all here. - if (value.match(/^0x0+$/)) { - return false; - } - - // boolean 0 is false. We do not do a type check here - // so if anyone defaults a string to 'false' this will be wrong. - if (value === 'false') { - return false; - } - - return true; -} - -// Check if the default value is non-zero -// Generally does string checks for empty strings, numeric or hex zeroes or -// boolean values. -async function if_is_non_zero_default(value, options) -{ - if (isNonZeroValue(value)) { - return options.fn(this); - } else { - return options.inverse(this); - } -} - -// -// Module exports -// -exports.chip_endpoint_generated_functions = chip_endpoint_generated_functions -exports.chip_endpoint_cluster_list = chip_endpoint_cluster_list -exports.chip_endpoint_data_version_count = chip_endpoint_data_version_count; -exports.chip_endpoint_generated_commands_list = chip_endpoint_generated_commands_list -exports.asTypedExpression = asTypedExpression; -exports.asTypedLiteral = asTypedLiteral; -exports.asLowerCamelCase = asLowerCamelCase; -exports.asUpperCamelCase = asUpperCamelCase; -exports.chip_friendly_endpoint_type_name = chip_friendly_endpoint_type_name; -exports.hasProperty = hasProperty; -exports.hasSpecificAttributes = hasSpecificAttributes; -exports.asMEI = asMEI; -exports.zapTypeToEncodableClusterObjectType = zapTypeToEncodableClusterObjectType; -exports.zapTypeToDecodableClusterObjectType = zapTypeToDecodableClusterObjectType; -exports.zapTypeToPythonClusterObjectType = zapTypeToPythonClusterObjectType; -exports.isWeaklyTypedEnum = isWeaklyTypedEnum; -exports.getPythonFieldDefault = getPythonFieldDefault; -exports.incrementDepth = incrementDepth; -exports.zcl_events_fields_by_event_name = zcl_events_fields_by_event_name; -exports.zcl_commands_that_need_timed_invoke = zcl_commands_that_need_timed_invoke; -exports.if_is_fabric_scoped_struct = if_is_fabric_scoped_struct; -exports.if_is_non_zero_default = if_is_non_zero_default; diff --git a/src/app/zap-templates/templates/chip/ListHelper.js b/src/app/zap-templates/templates/chip/ListHelper.js deleted file mode 100644 index 0713e5d667310b..00000000000000 --- a/src/app/zap-templates/templates/chip/ListHelper.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2020-2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const kListAttributeAtomicTypeId = 0x48; - -/** - * Returns the calculated length of the given attribute list - * - * This function is meant to be used inside a {{#chip_server_cluster_attributes}} block. - * It will throws otherwise. - * - * @param {*} options - */ -function asListEntryLength(options) -{ - return this.size; - if (this.atomicTypeId == undefined) { - const error = 'asListEntryLength: missing atomic type.'; - console.log(error); - throw error; - } - - if (this.atomicTypeId != kListAttributeAtomicTypeId) { - const error = 'asListEntryLength: Not a list.'; - console.log(error); - throw error; - } - - const entryType = this.entryType; - return entryType.size || entryType.map(type => type.size).reduce((accumulator, currentValue) => accumulator + currentValue, 0); -} - -// -// Module exports -// -exports.asListEntryLength = asListEntryLength; diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js deleted file mode 100644 index ccb6164df4df85..00000000000000 --- a/src/app/zap-templates/templates/chip/helper.js +++ /dev/null @@ -1,675 +0,0 @@ -/* - * - * Copyright (c) 2020-2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; -const templateUtil = require(zapPath + 'generator/template-util.js'); -const zclHelper = require(zapPath + 'generator/helper-zcl.js'); -const iteratorUtil = require(zapPath + 'util/iterator-util.js'); -const queryAccess = require(zapPath + 'db/query-access') -const queryZcl = require(zapPath + 'db/query-zcl'); - -const { asBlocks, ensureClusters } = require('../../common/ClustersHelper.js'); -const StringHelper = require('../../common/StringHelper.js'); -const ChipTypesHelper = require('../../common/ChipTypesHelper.js'); - -function throwErrorIfUndefined(item, errorMsg, conditions) -{ - conditions.forEach(condition => { - if (condition == undefined) { - console.log(item); - console.log(errorMsg); - throw error; - } - }); -} - -function checkIsInsideClusterBlock(context, name) -{ - const clusterName = context.name ? context.name : context.clusterName; - const clusterSide = context.side ? context.side : context.clusterSide; - const errorMsg = name + ': Not inside a ({#chip_server_clusters}} block.'; - throwErrorIfUndefined(context, errorMsg, [ clusterName, clusterSide ]); - - return { clusterName, clusterSide }; -} - -function checkIsInsideCommandBlock(context, name) -{ - const clusterName = context.clusterName; - const clusterSide = context.clusterSide; - const commandId = context.id; - const errorMsg = name + ': Not inside a ({#chip_cluster_commands}} block.'; - - throwErrorIfUndefined(context, errorMsg, [ commandId, clusterName, clusterSide ]); - - return commandId; -} - -function checkIsInsideAttributeBlock(context, name) -{ - const code = context.code; - const errorMsg = name + ': Not inside a ({#chip_server_attributes}} block.'; - - throwErrorIfUndefined(context, errorMsg, [ code ]); -} - -function checkIsChipType(context, name) -{ - const type = context.chipType; - const errorMsg = name + ': Could not find chipType'; - - throwErrorIfUndefined(context, errorMsg, [ type ]); - - return type; -} - -function getCommands(methodName) -{ - const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); - return clusterSide == 'client' ? ensureClusters(this).getClientCommands(clusterName) - : ensureClusters(this).getServerCommands(clusterName); -} - -function getAttributes(methodName) -{ - const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); - return ensureClusters(this).getAttributesByClusterName(clusterName); -} - -function getResponses(methodName) -{ - const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); - return clusterSide == 'client' ? ensureClusters(this).getClientResponses(clusterName) - : ensureClusters(this).getServerResponses(clusterName); -} - -/** - * Creates block iterator over the enabled server side clusters - * - * @param {*} options - */ -function chip_server_clusters(options) -{ - return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getServerClusters(), options); -} - -/** - * Check if there is any enabled server clusters - * - */ -function chip_has_server_clusters(options) -{ - return ensureClusters(this).getServerClusters().then(clusters => !!clusters.length); -} - -/** - * Creates block iterator over client side enabled clusters - * - * @param {*} options - */ -function chip_client_clusters(options) -{ - return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getClientClusters(), options); -} - -/** - * Check if there is any enabled client clusters - * - */ -function chip_has_client_clusters(options) -{ - return ensureClusters(this).getClientClusters().then(clusters => !!clusters.length); -} - -/** - * Creates block iterator over enabled clusters - * - * @param {*} options - */ -function chip_clusters(options) -{ - return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getClusters(), options); -} - -/** - * Check if there is any enabled clusters - * - */ -function chip_has_clusters(options) -{ - return ensureClusters(this).getClusters().then(clusters => !!clusters.length); -} - -/** - * Creates block iterator over the server global responses - * - * @param {*} options - */ -function chip_server_global_responses(options) -{ - return asBlocks.call(this, getServerGlobalAttributeResponses(this), options); -} - -async function if_basic_global_response(options) -{ - const attribute = this.response.arguments[0]; - const globalResponses = await getServerGlobalAttributeResponses(this); - const complexType = attribute.isNullable || attribute.isOptional || attribute.isStruct || attribute.isArray; - const responseTypeExists = globalResponses.find(item => item.chipType == attribute.chipType); - - if (!complexType && responseTypeExists) { - return options.fn(this); - } else { - return options.inverse(this); - } -} - -function getServerGlobalAttributeResponses(context) -{ - const sorter = (a, b) => a.chipCallback.name.localeCompare(b.chipCallback.name, 'en', { numeric : true }); - - const reducer = (unique, item) => { - const { type, size, isArray, isOptional, isNullable, chipCallback, chipType } = item.response.arguments[0]; - - // List-typed elements have a dedicated callback - if (isArray) { - return unique; - } - - if (unique.find(item => item.chipCallback.name == chipCallback.name)) { - return unique; - } - - return [...unique, { chipCallback, chipType, size, isOptional, isNullable } ]; - }; - - const filter = attributes => attributes.reduce(reducer, []).sort(sorter); - return ensureClusters(context).getAttributesByClusterSide('server').then(filter); -} - -/** - * Creates block iterator over the cluster commands for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_*_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_cluster_commands(options) -{ - const commands = getCommands.call(this, 'chip_cluster_commands'); - - return asBlocks.call(this, commands, options); -} - -/** - * Creates block iterator over the cluster responses for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_*_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_cluster_responses(options) -{ - const responses = getResponses.call(this, 'chip_cluster_responses'); - - return asBlocks.call(this, responses, options); -} - -/** - * Creates block iterator over the current command arguments for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_cluster_commands}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_cluster_command_arguments(options) -{ - const commandId = checkIsInsideCommandBlock(this, 'chip_cluster_command_arguments'); - const commands = getCommands.call(this.parent, 'chip_cluster_commands_argments'); - - const filter = command => command.id == commandId; - return asBlocks.call(this, commands.then(items => items.find(filter).arguments), options); -} - -/** - * Creates block iterator over the current command arguments for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_cluster_commands}} - * block. It will throw otherwise. - * - * The arguments list built by this function differs from {{chip_cluster_command_arguments}}. - * For example, if a command contains a single struct argument "SomeStruct", with the following type: - * - * struct SomeStruct { - * uint8_t a; - * uint16_t b; - * uint32_t c; - * } - * - * then that argument will be expanded into 3 arguments (uint8_t a, uint16_t b, uint32_t c). - * - * @param {*} options - */ -function chip_cluster_command_arguments_with_structs_expanded(options) -{ - const commandId = checkIsInsideCommandBlock(this, 'chip_cluster_command_arguments'); - const commands = getCommands.call(this.parent, 'chip_cluster_command_arguments_with_structs_expanded'); - - const filter = command => command.id == commandId; - return asBlocks.call(this, commands.then(items => { - const item = items.find(filter); - if (item === undefined) { - return []; - } - return item.expandedArguments || item.arguments; - }), - options); -} - -/** - * Creates block iterator over the current response arguments for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_cluster_responses}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_cluster_response_arguments(options) -{ - const commandId = checkIsInsideCommandBlock(this, 'chip_cluster_response_arguments'); - const responses = getResponses.call(this.parent, 'chip_cluster_responses_argments'); - - const filter = command => command.id == commandId; - return asBlocks.call(this, responses.then(items => items.find(filter).arguments), options); -} - -/** - * Returns if a given server cluster has any attributes of type List[T] - * - * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_server_has_list_attributes(options) -{ - const { clusterName } = checkIsInsideClusterBlock(this, 'chip_server_has_list_attributes'); - const attributes = ensureClusters(this).getServerAttributes(clusterName); - - const filter = attribute => attribute.isArray; - return attributes.then(items => items.find(filter)); -} - -/** - * Returns if a given client cluster has any attributes of type List[T] - * - * This function is meant to be used inside a {{#chip_client_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_client_has_list_attributes(options) -{ - const { clusterName } = checkIsInsideClusterBlock(this, 'chip_client_has_list_attributes'); - const attributes = ensureClusters(this).getClientAttributes(clusterName); - - const filter = attribute => attribute.isArray; - return attributes.then(items => items.find(filter)); -} - -/** - * Returns if a given server cluster has any reportable attribute - * - * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_server_has_reportable_attributes(options) -{ - const { clusterName } = checkIsInsideClusterBlock(this, 'chip_server_has_reportable_attributes'); - const attributes = ensureClusters(this).getServerAttributes(clusterName); - - const filter = attribute => attribute.isReportableAttribute; - return attributes.then(items => items.find(filter)); -} - -/** - * Creates block iterator over the server side cluster attributes - * for a given cluster. - * - * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_server_cluster_attributes(options) -{ - const { clusterName } = checkIsInsideClusterBlock(this, 'chip_server_cluster_attributes'); - const attributes = ensureClusters(this).getServerAttributes(clusterName); - - return asBlocks.call(this, attributes, options); -} - -/** - * Creates block iterator over the server side cluster attributes - * for a given cluster. - * - * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_server_cluster_events(options) -{ - const { clusterName } = checkIsInsideClusterBlock(this, 'chip_server_cluster_events'); - const events = ensureClusters(this).getServerEvents(clusterName); - - return asBlocks.call(this, events, options); -} - -function chip_attribute_list_entryTypes(options) -{ - checkIsInsideAttributeBlock(this, 'chip_attribute_list_entry_types'); - return templateUtil.collectBlocks(this.items, options, this); -} - -/** - * Creates block iterator over commands for a given cluster that have the - * following properties: - * - * 1) Are not manufacturer-specific (to exclude MfgSpecificPing) - * 2) Are available in the isCommandAvailable sense. - */ -function chip_available_cluster_commands(options) -{ - const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, 'chip_available_cluster_commands'); - let promise = iteratorUtil.all_user_cluster_commands_helper.call(this, options) - .then(endpointCommands => endpointCommands.filter(command => { - return command.clusterName == clusterName - && zclHelper.isCommandAvailable( - clusterSide, command.incoming, command.outgoing, command.commandSource, command.name) - && /* exclude MfgSpecificPing */ !command.mfgCode; - })) - .then(filteredCommands => templateUtil.collectBlocks(filteredCommands, options, this)); - return promise; -} - -/** - * Creates block iterator over structures belonging to the current cluster - */ -async function chip_cluster_specific_structs(options) -{ - const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, 'chip_cluster_specific_structs'); - - const structs = await ensureClusters(this).getStructuresByClusterName(clusterName); - - return templateUtil.collectBlocks(structs, options, this); -} - -/** - * Creates block iterator over structures that are shared between clusters - */ -async function chip_shared_structs(options) -{ - const structs = await ensureClusters(this).getSharedStructs(); - return templateUtil.collectBlocks(structs, options, this); -} - -async function chip_endpoints(options) -{ - const endpoints = await ensureClusters(this).getEndPoints(); - return templateUtil.collectBlocks(endpoints, options, this); -} - -async function chip_endpoint_clusters(options) -{ - const clusters = this.clusters; - return templateUtil.collectBlocks(clusters, options, this); -} - -/** - * Helper checks if the type for the bitmap is BitFlags. This generally includes - * all bitmaps apart from - * bitmap8/16/32 (generally defined in types.xml) - * example: - * {{#if_is_strongly_typed_bitmap type}} - * strongly typed bitmap - * {{else}} - * not a strongly typed bitmap - * {{/if_is_strongly_typed_bitmap}} - * - * @param {*} type - * @returns Promise of content. - */ -async function if_is_strongly_typed_bitmap(type, options) -{ - let packageId = await templateUtil.ensureZclPackageId(this); - let bitmap; - if (type && typeof type === 'string') { - bitmap = await queryZcl.selectBitmapByName(this.global.db, packageId, type); - } else { - bitmap = await queryZcl.selectBitmapById(this.global.db, type); - } - - if (bitmap) { - let a = await queryZcl.selectAtomicType(this.global.db, packageId, bitmap.name); - if (a) { - // If this is an atomic type, it's a generic, weakly typed, bitmap. - return options.inverse(this); - } else { - return options.fn(this); - } - } - return options.inverse(this); -} - -/** - * Handlebar helper function which checks if an enum is a strongly typed enum or - * not. This generally includes all enums apart from - * enum8/16/32 (generally defined in types.xml) - * example for if_is_strongly_typed_chip_enum: - * {{#if_is_strongly_typed_chip_enum type}} - * strongly typed enum - * {{else}} - * not a strongly typed enum - * {{/if_is_strongly_typed_chip_enum}} - * - * @param {*} type - * @param {*} options - * @returns Promise of content. - */ -async function if_is_strongly_typed_chip_enum(type, options) -{ - // There are certain exceptions. - if (type.toLowerCase() == 'vendor_id') { - return options.fn(this); - } else { - let packageId = await templateUtil.ensureZclPackageId(this); - let enumRes; - // Retrieving the enum from the enum table - if (type && typeof type === 'string') { - enumRes = await queryZcl.selectEnumByName(this.global.db, type, packageId); - } else { - enumRes = await queryZcl.selectEnumById(this.global.db, type); - } - - // Checking if an enum is atomic. If an enum is not atomic then the enum - // is a strongly typed enum - if (enumRes) { - let a = await queryZcl.selectAtomicType(this.global.db, packageId, enumRes.name); - if (a) { - // if an enum has an atomic type that means it's a weakly-typed enum. - return options.inverse(this); - } else { - return options.fn(this); - } - } - return options.inverse(this); - } -} - -/** - * Checks whether a type is an enum for purposes of its chipType. That includes - * both spec-defined enum types and types that we map to enum types in our code. - */ -async function if_chip_enum(type, options) -{ - if (type.toLowerCase() == 'vendor_id') { - return options.fn(this); - } - - let pkgId = await templateUtil.ensureZclPackageId(this); - let checkResult = await zclHelper.isEnum(this.global.db, type, pkgId); - let result; - if (checkResult != 'unknown') { - result = options.fn(this); - } else { - result = options.inverse(this); - } - return templateUtil.templatePromise(this.global, result); -} - -async function if_chip_complex(options) -{ - // `zcl_command_arguments` has an `isArray` property and `type` - // contains the array element type. - if (this.isArray) { - return options.fn(this); - } - - // zcl_attributes iterators does not expose an `isArray` property - // and `entryType` contains the array element type, while `type` - // contains the atomic type, which is array in this case. - // https://github.com/project-chip/zap/issues/412 - if (this.type == 'array') { - return options.fn(this); - } - - let pkgId = await templateUtil.ensureZclPackageId(this); - let checkResult = await zclHelper.isStruct(this.global.db, this.type, pkgId); - let result; - if (checkResult != 'unknown') { - result = options.fn(this); - } else { - result = options.inverse(this); - } - return templateUtil.templatePromise(this.global, result); -} - -async function chip_access_elements(options) -{ - - // console.log(options); - let entityType = options.hash.entity - - if (entityType == null) - { - throw new Error('Access helper requires entityType, either from context, or from the entity="" option.') - } - - let accessList = null - - // Exaples of operations: - // { operation: null, role: null, accessModifier: 'fabric-scoped' }, - // { operation: 'read', role: 'administer', accessModifier: null }, - // { operation: 'write', role: 'administer', accessModifier: null } - // - // Note the existence of a null operation with a modifier of fabric-scoped - - // accessDefaults contains acceptable operations - // together with their default value - let accessDefaults = new Map(); - - switch (entityType) { - case 'attribute': - accessList = await queryAccess.selectAttributeAccess(this.global.db, this.id); - accessDefaults.set('read', 'view'); - accessDefaults.set('write', 'operate'); - break; - case 'command': - accessList = await queryAccess.selectCommandAccess(this.global.db, this.id); - accessDefaults.set('invoke', 'operate'); - break; - case 'event': - accessList = await queryAccess.selectEventAccess(this.global.db, this.id); - accessDefaults.set('read', 'view'); - break; - default: - throw new Error(`Entity type ${entityType} not supported. Requires: attribute/command/event.`) - } - - let accessEntries = []; - - for (element of accessList) { - if (!element.operation) { - continue; // not a valid operation (likely null) - } - - const operation = element.operation.toLowerCase(); - if (!accessDefaults.has(operation)) { - continue; // not a valid operation (may be a bug or non-matter operation) - } - - const role = element.role.toLowerCase(); - - if (role === accessDefaults.get(operation)) { - continue; // already set as a default - } - - accessEntries.push({ operation, role }) - } - - let p = templateUtil.collectBlocks(accessEntries, options, this) - return templateUtil.templatePromise(this.global, p) -} - -// -// Module exports -// -exports.chip_clusters = chip_clusters; -exports.chip_has_clusters = chip_has_clusters; -exports.chip_client_clusters = chip_client_clusters; -exports.chip_has_client_clusters = chip_has_client_clusters; -exports.chip_server_clusters = chip_server_clusters; -exports.chip_has_server_clusters = chip_has_server_clusters; -exports.chip_cluster_commands = chip_cluster_commands; -exports.chip_cluster_command_arguments = chip_cluster_command_arguments; -exports.chip_cluster_command_arguments_with_structs_expanded = chip_cluster_command_arguments_with_structs_expanded; -exports.chip_server_global_responses = chip_server_global_responses; -exports.chip_cluster_responses = chip_cluster_responses; -exports.chip_cluster_response_arguments = chip_cluster_response_arguments -exports.chip_attribute_list_entryTypes = chip_attribute_list_entryTypes; -exports.chip_server_cluster_attributes = chip_server_cluster_attributes; -exports.chip_server_cluster_events = chip_server_cluster_events; -exports.chip_server_has_list_attributes = chip_server_has_list_attributes; -exports.chip_server_has_reportable_attributes = chip_server_has_reportable_attributes; -exports.chip_available_cluster_commands = chip_available_cluster_commands; -exports.chip_endpoints = chip_endpoints; -exports.chip_endpoint_clusters = chip_endpoint_clusters; -exports.if_chip_enum = if_chip_enum; -exports.if_chip_complex = if_chip_complex; -exports.if_basic_global_response = if_basic_global_response; -exports.chip_cluster_specific_structs = chip_cluster_specific_structs; -exports.chip_shared_structs = chip_shared_structs; -exports.chip_access_elements = chip_access_elements -exports.if_is_strongly_typed_chip_enum = if_is_strongly_typed_chip_enum -exports.if_is_strongly_typed_bitmap = if_is_strongly_typed_bitmap diff --git a/src/controller/java/templates/helper.js b/src/controller/java/templates/helper.js deleted file mode 100644 index 53a77aad35dc8c..00000000000000 --- a/src/controller/java/templates/helper.js +++ /dev/null @@ -1,339 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../../third_party/zap/repo/dist/src-electron/'; -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') - -const ChipTypesHelper = require('../../../../src/app/zap-templates/common/ChipTypesHelper.js'); -const StringHelper = require('../../../../src/app/zap-templates/common/StringHelper.js'); -const appHelper = require('../../../../src/app/zap-templates/templates/app/helper.js'); - -function convertBasicCTypeToJavaType(cType) -{ - switch (cType) { - case 'uint8_t': - case 'int8_t': - case 'uint16_t': - case 'int16_t': - return 'int'; - case 'uint32_t': - case 'int32_t': - // TODO(#8074): replace with BigInteger, or mark as unsigned. - case 'uint64_t': - case 'int64_t': - return 'long'; - case 'bool': - return 'boolean'; - case 'float': - return 'float'; - case 'double': - return 'double'; - default: - error = 'Unhandled type ' + cType; - throw error; - } -} - -function convertBasicCTypeToJniType(cType) -{ - switch (convertBasicCTypeToJavaType(cType)) { - case 'int': - return 'jint'; - case 'long': - return 'jlong'; - case 'boolean': - return 'jboolean'; - case 'float': - return 'jfloat'; - case 'double': - return 'jdouble'; - default: - error = 'Unhandled type ' + cType; - throw error; - } -} - -function convertBasicCTypeToJavaBoxedType(cType) -{ - switch (convertBasicCTypeToJavaType(cType)) { - case 'int': - return 'Integer'; - case 'long': - return 'Long'; - case 'boolean': - return 'Boolean'; - case 'float': - return 'Float'; - case 'double': - return 'Double'; - default: - error = 'Unhandled type ' + cType; - throw error; - } -} - -function asJavaBoxedType(type, zclType) -{ - if (StringHelper.isOctetString(type)) { - return 'byte[]'; - } else if (StringHelper.isCharString(type)) { - return 'String'; - } else { - try { - return convertBasicCTypeToJavaBoxedType(ChipTypesHelper.asBasicType(zclType)); - } catch (error) { - // Unknown type, default to Object. - return "Object"; - } - } -} - -function asJniBasicType(type, useBoxedTypes) -{ - if (this.isOptional) { - return 'jobject'; - } else if (StringHelper.isOctetString(type)) { - return 'jbyteArray'; - } else if (StringHelper.isCharString(type)) { - return 'jstring'; - } else { - if (useBoxedTypes) { - return 'jobject'; - } - return convertBasicCTypeToJniType(ChipTypesHelper.asBasicType(this.chipType)); - } -} - -function asJniSignatureBasic(type, useBoxedTypes) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - return convertCTypeToJniSignature(ChipTypesHelper.asBasicType(zclType), useBoxedTypes); - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => { - console.log(err); - throw err; - }); - return templateUtil.templatePromise(this.global, promise) -} - -function convertCTypeToJniSignature(cType, useBoxedTypes) -{ - let javaType; - if (useBoxedTypes) { - javaType = convertBasicCTypeToJavaBoxedType(cType); - } else { - javaType = convertBasicCTypeToJavaType(cType); - } - - switch (javaType) { - case 'int': - return 'I'; - case 'long': - return 'J'; - case 'boolean': - return 'Z'; - case 'double': - return 'D'; - case 'float': - return 'F'; - case 'Boolean': - return 'Ljava/lang/Boolean;'; - case 'Integer': - return 'Ljava/lang/Integer;'; - case 'Long': - return 'Ljava/lang/Long;'; - case 'double': - return 'D'; - case 'Double': - return 'Ljava/lang/Double;'; - case 'float': - return 'F'; - case 'Float': - return 'Ljava/lang/Float;'; - default: - error = 'Unhandled Java type ' + javaType + ' for C type ' + cType; - throw error; - } -} - -function convertAttributeCallbackTypeToJavaName(cType) -{ - // These correspond to OctetStringAttributeCallback and CharStringAttributeCallback in ChipClusters-java.zapt. - if (StringHelper.isOctetString(this.type)) { - return 'OctetString'; - } else if (StringHelper.isCharString(this.type)) { - return 'CharString'; - } else { - return convertBasicCTypeToJavaBoxedType(cType); - } -} - -async function asUnderlyingBasicType(type) -{ - const options = { 'hash' : {} }; - let zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); - return ChipTypesHelper.asBasicType(zclType); -} - -async function asJavaType(type, zclType, cluster, options) -{ - let pkgId = await templateUtil.ensureZclPackageId(this); - if (zclType == null) { - const options = { 'hash' : {} }; - zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); - } - let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - let classType = ""; - - if (StringHelper.isOctetString(type)) { - classType += 'byte[]'; - } else if (StringHelper.isCharString(type)) { - classType += 'String'; - } else if (isStruct) { - classType += `ChipStructs.${appHelper.asUpperCamelCase(cluster)}Cluster${appHelper.asUpperCamelCase(type)}`; - } else { - classType += asJavaBoxedType(type, zclType); - } - - if (!options.hash.underlyingType) { - if (!options.hash.forceNotList && (this.isArray || this.entryType)) { - if (!options.hash.removeGenericType) { - classType = 'ArrayList<' + classType + '>'; - } else { - classType = 'ArrayList'; - } - } - - if (this.isOptional) { - if (!options.hash.removeGenericType) { - classType = 'Optional<' + classType + '>'; - } else { - classType = 'Optional'; - } - } - - if (this.isNullable && options.hash.includeAnnotations) { - classType = '@Nullable ' + classType; - } - } - - return classType; -} - -async function asJniType(type, zclType, cluster, options) -{ - let types = await asJniHelper.call(this, type, zclType, cluster, options); - return types["jniType"]; -} - -async function asJniSignature(type, zclType, cluster, useBoxedTypes, options) -{ - let types = await asJniHelper.call(this, type, zclType, cluster, options); - return useBoxedTypes ? types["jniBoxedSignature"] : types["jniSignature"]; -} - -async function asJniClassName(type, zclType, cluster, options) -{ - let types = await asJniHelper.call(this, type, zclType, cluster, options); - return types["jniClassName"]; -} - -async function asJniHelper(type, zclType, cluster, options) -{ - let pkgId = await templateUtil.ensureZclPackageId(this); - if (zclType == null) { - zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); - } - let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - if (this.isOptional) { - const signature = "Ljava/util/Optional;" - return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; - } - - if (this.isArray) { - const signature = "Ljava/util/ArrayList;" - return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; - } - - if (StringHelper.isOctetString(type)) { - const signature = "[B"; - return { jniType : "jbyteArray", jniSignature : signature, jniBoxedSignature : signature }; - } - - if (StringHelper.isCharString(type)) { - const signature = "Ljava/lang/String;"; - return { jniType : "jstring", jniSignature : signature, jniBoxedSignature : signature }; - } - - if (isStruct) { - const signature - = `Lchip/devicecontroller/ChipStructs$${appHelper.asUpperCamelCase(cluster)}Cluster${appHelper.asUpperCamelCase(type)};`; - return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; - } - - let jniBoxedSignature; - try { - jniBoxedSignature = await asJniSignatureBasic.call(this, type, true); - } catch (error) { - jniBoxedSignature = "Ljava/lang/Object;"; - } - let jniSignature; - try { - jniSignature = await asJniSignatureBasic.call(this, type, false); - } catch (error) { - jniSignature = "Ljava/lang/Object;"; - } - // Example: Ljava/lang/Integer; -> java/lang/Integer, needed for JNI class lookup - let jniClassName = jniBoxedSignature.substring(1, jniBoxedSignature.length - 1); - return { - jniType : asJniBasicType(type, true), - jniSignature : jniSignature, - jniBoxedSignature : jniBoxedSignature, - jniClassName : jniClassName - }; -} - -function incrementDepth(depth) -{ - return depth + 1; -} - -// -// Module exports -// -exports.asUnderlyingBasicType = asUnderlyingBasicType; -exports.asJavaType = asJavaType; -exports.asJavaBoxedType = asJavaBoxedType; -exports.asJniType = asJniType; -exports.asJniSignature = asJniSignature; -exports.asJniClassName = asJniClassName; -exports.asJniBasicType = asJniBasicType; -exports.asJniSignatureBasic = asJniSignatureBasic; -exports.convertBasicCTypeToJniType = convertBasicCTypeToJniType; -exports.convertCTypeToJniSignature = convertCTypeToJniSignature; -exports.convertBasicCTypeToJavaBoxedType = convertBasicCTypeToJavaBoxedType; -exports.convertAttributeCallbackTypeToJavaName = convertAttributeCallbackTypeToJavaName; -exports.incrementDepth = incrementDepth; diff --git a/src/controller/java/templates/templates.json b/src/controller/java/templates/templates.json index 7b1521f0865053..d839cc4f211a33 100644 --- a/src/controller/java/templates/templates.json +++ b/src/controller/java/templates/templates.json @@ -2,13 +2,13 @@ "name": "CHIP Android templates", "version": "chip-v1", "helpers": [ - "../../../app/zap-templates/common/ChipTypesHelper.js", - "../../../app/zap-templates/common/ListHelper.js", - "../../../app/zap-templates/common/StringHelper.js", - "../../../app/zap-templates/partials/helper.js", - "../../../app/zap-templates/templates/app/helper.js", - "../../../app/zap-templates/templates/chip/helper.js", - "helper.js" + "common/ChipTypesHelper.js", + "common/ListHelper.js", + "common/StringHelper.js", + "partials/helper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "controller/java/templates/helper.js" ], "override": "../../../app/zap-templates/common/override.js", "partials": [ diff --git a/src/controller/python/templates/helper.js b/src/controller/python/templates/helper.js deleted file mode 100644 index 874526cab70910..00000000000000 --- a/src/controller/python/templates/helper.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../../third_party/zap/repo/dist/src-electron/'; -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') - -const ChipTypesHelper = require('../../../../src/app/zap-templates/common/ChipTypesHelper.js'); - -function asPythonType(zclType) -{ - const type = ChipTypesHelper.asBasicType(zclType); - switch (type) { - case 'bool': - return 'bool'; - case 'int8_t': - case 'int16_t': - case 'int32_t': - case 'int64_t': - case 'uint8_t': - case 'uint16_t': - case 'uint32_t': - case 'uint64_t': - return 'int'; - case 'char *': - return 'str'; - case 'uint8_t *': - case 'chip::ByteSpan': - return 'bytes'; - case 'chip::CharSpan': - return 'str'; - } -} - -function asPythonCType(zclType) -{ - const type = ChipTypesHelper.asBasicType(zclType); - switch (type) { - case 'bool': - case 'int8_t': - case 'int16_t': - case 'int32_t': - case 'int64_t': - case 'uint8_t': - case 'uint16_t': - case 'uint32_t': - case 'uint64_t': - return 'c_' + type.replace('_t', ''); - case 'char *': - case 'uint8_t *': - return 'c_char_p'; - } -} - -// -// Module exports -// -exports.asPythonType = asPythonType; -exports.asPythonCType = asPythonCType; diff --git a/src/controller/python/templates/templates.json b/src/controller/python/templates/templates.json index 859c98ad22b619..e5d15198c5aac8 100644 --- a/src/controller/python/templates/templates.json +++ b/src/controller/python/templates/templates.json @@ -2,11 +2,11 @@ "name": "CHIP Python templates", "version": "chip-v1", "helpers": [ - "../../../../src/app/zap-templates/partials/helper.js", - "../../../../src/app/zap-templates/common/StringHelper.js", - "../../../../src/app/zap-templates/templates/app/helper.js", - "../../../../src/app/zap-templates/templates/chip/helper.js", - "helper.js" + "partials/helper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "controller/python/templates/helper.js" ], "override": "../../../../src/app/zap-templates/common/override.js", "partials": [ diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js deleted file mode 100644 index d534312729001e..00000000000000 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ /dev/null @@ -1,244 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Import helpers from zap core -const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; -const string = require(zapPath + 'util/string.js') -const templateUtil = require(zapPath + 'generator/template-util.js') -const zclHelper = require(zapPath + 'generator/helper-zcl.js') - -const ChipTypesHelper = require('../../../../../src/app/zap-templates/common/ChipTypesHelper.js'); -const TestHelper = require('../../../../../src/app/zap-templates/common/ClusterTestGeneration.js'); -const StringHelper = require('../../../../../src/app/zap-templates/common/StringHelper.js'); -const appHelper = require('../../../../../src/app/zap-templates/templates/app/helper.js'); - -function asObjectiveCBasicType(type, options) -{ - if (StringHelper.isOctetString(type)) { - return options.hash.is_mutable ? 'NSMutableData *' : 'NSData *'; - } else if (StringHelper.isCharString(type)) { - return options.hash.is_mutable ? 'NSMutableString *' : 'NSString *'; - } else { - return ChipTypesHelper.asBasicType(this.chipType); - } -} - -/** - * Converts an expression involving possible variables whose types are objective C objects into an expression whose type is a C++ - * type - */ -async function asTypedExpressionFromObjectiveC(value, type) -{ - const valueIsANumber = !isNaN(value); - if (!value || valueIsANumber) { - return appHelper.asTypedLiteral.call(this, value, type); - } - - const tokens = value.split(' '); - if (tokens.length < 2) { - return appHelper.asTypedLiteral.call(this, value, type); - } - - let expr = []; - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if ([ '+', '-', '/', '*', '%', '(', ')' ].includes(token)) { - expr[i] = token; - } else if (!isNaN(token.replace(/ULL$|UL$|U$|LL$|L$/i, ''))) { - expr[i] = await appHelper.asTypedLiteral.call(this, token, type); - } else { - const variableType = TestHelper.chip_tests_variables_get_type.call(this, token); - const asType = await asObjectiveCNumberType.call(this, token, variableType, true); - expr[i] = `[${token} ${asType}Value]`; - } - } - - return expr.join(' '); -} - -function asObjectiveCNumberType(label, type, asLowerCased) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options) - .then(zclType => { - const basicType = ChipTypesHelper.asBasicType(zclType); - switch (basicType) { - case 'bool': - return 'Bool'; - case 'uint8_t': - return 'UnsignedChar'; - case 'uint16_t': - return 'UnsignedShort'; - case 'uint32_t': - return 'UnsignedInt'; - case 'uint64_t': - return 'UnsignedLongLong'; - case 'int8_t': - return 'Char'; - case 'int16_t': - return 'Short'; - case 'int32_t': - return 'Int'; - case 'int64_t': - return 'LongLong'; - case 'float': - return 'Float'; - case 'double': - return 'Double'; - default: - error = label + ': Unhandled underlying type ' + zclType + ' for original type ' + type; - throw error; - } - }) - .then(typeName => asLowerCased ? (typeName[0].toLowerCase() + typeName.substring(1)) : typeName); - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => console.log(err)); - return templateUtil.templatePromise(this.global, promise) -} - -async function asObjectiveCClass(type, cluster, options) -{ - let pkgId = await templateUtil.ensureZclPackageId(this); - let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); - - if ((this.isArray || this.entryType || options.hash.forceList) && !options.hash.forceNotList) { - return 'NSArray'; - } - - if (StringHelper.isOctetString(type)) { - return 'NSData'; - } - - if (StringHelper.isCharString(type)) { - return 'NSString'; - } - - if (isStruct) { - return `MTR${appHelper.asUpperCamelCase(cluster)}Cluster${appHelper.asUpperCamelCase(type)}`; - } - - return 'NSNumber'; -} - -async function asObjectiveCType(type, cluster, options) -{ - let typeStr = await asObjectiveCClass.call(this, type, cluster, options); - if (this.isNullable || this.isOptional) { - typeStr = `${typeStr} * _Nullable`; - } else { - typeStr = `${typeStr} * _Nonnull`; - } - - return typeStr; -} - -function asStructPropertyName(prop) -{ - prop = appHelper.asLowerCamelCase(prop); - - // If prop is now "description", we need to rename it, because that's - // reserved. - if (prop == "description") { - return "descriptionString"; - } - - // If prop starts with a sequence of capital letters (which can happen for - // output of asLowerCamelCase if the original string started that way, - // lowercase all but the last one. - return prop.replace(/^([A-Z]+)([A-Z])/, (match, p1, p2) => { return p1.toLowerCase() + p2 }); -} - -function asGetterName(prop) -{ - let propName = asStructPropertyName(prop); - if (propName.match(/^new[A-Z]/) || propName == "count") { - return "get" + appHelper.asUpperCamelCase(prop); - } - return propName; -} - -function commandHasRequiredField(command) -{ - return command.arguments.some(arg => !arg.isOptional); -} - -/** - * Produce a reasonable name for an Objective C enum for the given cluster name - * and enum label. Because a lot of our enum labels already have the cluster - * name prefixed (e.g. NetworkCommissioning*, or the IdentifyIdentifyType that - * has it prefixed _twice_) just concatenating the two gives overly verbose - * names in a few cases (e.g. "IdentifyIdentifyIdentifyType"). - * - * This function strips out the redundant cluster names, and strips off trailing - * "Enum" bits on the enum names while we're here. - */ -function objCEnumName(clusterName, enumLabel) -{ - clusterName = appHelper.asUpperCamelCase(clusterName); - enumLabel = appHelper.asUpperCamelCase(enumLabel); - // Some enum names have one or more copies of the cluster name at the - // beginning. - while (enumLabel.startsWith(clusterName)) { - enumLabel = enumLabel.substring(clusterName.length); - } - - if (enumLabel.endsWith("Enum")) { - // Strip that off; it'll clearly be an enum anyway. - enumLabel = enumLabel.substring(0, enumLabel.length - "Enum".length); - } - - return "MTR" + clusterName + enumLabel; -} - -function objCEnumItemLabel(itemLabel) -{ - // Check for the case when we're: - // 1. A single word (that's the regexp at the beginning, which matches the - // word-splitting regexp in string.toCamelCase). - // 2. All upper-case. - // - // This will get converted to lowercase except the first letter by - // asUpperCamelCase, which is not really what we want. - if (!/ |_|-|\//.test(itemLabel) && itemLabel.toUpperCase() == itemLabel) { - return itemLabel.replace(/[\.:]/g, ''); - } - - return appHelper.asUpperCamelCase(itemLabel); -} - -function hasArguments() -{ - return !!this.arguments.length -} - -// -// Module exports -// -exports.asObjectiveCBasicType = asObjectiveCBasicType; -exports.asObjectiveCNumberType = asObjectiveCNumberType; -exports.asObjectiveCClass = asObjectiveCClass; -exports.asObjectiveCType = asObjectiveCType; -exports.asStructPropertyName = asStructPropertyName; -exports.asTypedExpressionFromObjectiveC = asTypedExpressionFromObjectiveC; -exports.asGetterName = asGetterName; -exports.commandHasRequiredField = commandHasRequiredField; -exports.objCEnumName = objCEnumName; -exports.objCEnumItemLabel = objCEnumItemLabel; -exports.hasArguments = hasArguments; diff --git a/src/darwin/Framework/CHIP/templates/templates.json b/src/darwin/Framework/CHIP/templates/templates.json index f91c8c3815bca8..aa441fe8b6756a 100644 --- a/src/darwin/Framework/CHIP/templates/templates.json +++ b/src/darwin/Framework/CHIP/templates/templates.json @@ -2,14 +2,19 @@ "name": "Framework templates", "version": "chip-v1", "helpers": [ - "../../../../../src/app/zap-templates/partials/helper.js", - "../../../../../src/app/zap-templates/common/ChipTypesHelper.js", - "../../../../../src/app/zap-templates/common/StringHelper.js", - "../../../../../src/app/zap-templates/templates/app/helper.js", - "../../../../../src/app/zap-templates/templates/chip/helper.js", - "../../../../../src/app/zap-templates/common/ClusterTestGeneration.js", - "helper.js" + "partials/helper.js", + "common/ChipTypesHelper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "darwin/Framework/CHIP/templates/helper.js" ], + "resources": { + "pics-metafile": "../../../../app/tests/suites/certification/PICS.yaml", + "certification-metadir": "../../../../app/tests/suites/certification", + "test-metadir": "../../../../app/tests/suites" + }, "override": "../../../../../src/app/zap-templates/common/override.js", "partials": [ { diff --git a/third_party/zap/repo b/third_party/zap/repo index 1d4be6d96182fa..a94875d430d199 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 1d4be6d96182fac353107b9ffe8efb35ae060984 +Subproject commit a94875d430d199ece002ab5bd971fdb78305fd4e From 1cb778e3bbc107622163ff4212ca41d740efff8b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Aug 2022 23:47:39 -0400 Subject: [PATCH 023/115] Fix the ReadClient destructor to call OnDeallocatePaths. (#21660) This is actually somewhat dangerous, because there is a good chance ~ReadClient is running from under the destructor of the ReadClient::Callback and we are invoking a virtual method on the callback. But this is the only way to ensure we don't leak. ReadClient::Callback implementations need to be able to handle this. Fixes https://github.com/project-chip/connectedhomeip/issues/21658 --- src/app/ReadClient.cpp | 28 +++++++++++++++------- src/app/ReadClient.h | 8 ++++--- src/app/tests/TestReadInteraction.cpp | 3 +++ src/controller/TypedReadCallback.h | 14 +++++++++++ src/darwin/Framework/CHIP/MTRBaseDevice.mm | 14 +++++++++++ src/darwin/Framework/CHIP/MTRDevice.mm | 7 ++++++ 6 files changed, 63 insertions(+), 11 deletions(-) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 257a86f28790cd..3c3bc5b19e2e76 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -68,20 +68,29 @@ void ReadClient::ClearActiveSubscriptionState() void ReadClient::StopResubscription() { - CancelLivenessCheckTimer(); CancelResubscribeTimer(); - mpCallback.OnDeallocatePaths(std::move(mReadPrepareParams)); + + // Only deallocate the paths if they are not already deallocated. + if (mReadPrepareParams.mpAttributePathParamsList != nullptr || mReadPrepareParams.mpEventPathParamsList != nullptr || + mReadPrepareParams.mpDataVersionFilterList != nullptr) + { + mpCallback.OnDeallocatePaths(std::move(mReadPrepareParams)); + // Make sure we will never try to free those pointers again. + mReadPrepareParams.mpAttributePathParamsList = nullptr; + mReadPrepareParams.mAttributePathParamsListSize = 0; + mReadPrepareParams.mpEventPathParamsList = nullptr; + mReadPrepareParams.mEventPathParamsListSize = 0; + mReadPrepareParams.mpDataVersionFilterList = nullptr; + mReadPrepareParams.mDataVersionFilterListSize = 0; + } } ReadClient::~ReadClient() { + Close(CHIP_NO_ERROR, /* allowResubscription = */ false, /* allowOnDone = */ false); if (IsSubscriptionType()) { - CancelLivenessCheckTimer(); - CancelResubscribeTimer(); - - // // Only remove ourselves from the engine's tracker list if we still continue to have a valid pointer to it. // This won't be the case if the engine shut down before this destructor was called (in which case, mpImEngine // will point to null) @@ -141,7 +150,7 @@ CHIP_ERROR ReadClient::ScheduleResubscription(uint32_t aTimeTillNextResubscripti return CHIP_NO_ERROR; } -void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription) +void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription, bool allowOnDone) { if (IsReadType()) { @@ -181,7 +190,10 @@ void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription) StopResubscription(); } - mpCallback.OnDone(this); + if (allowOnDone) + { + mpCallback.OnDone(this); + } } const char * ReadClient::GetStateStr() const diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 89ea133fad5b1b..66c1428c0fa3e3 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -200,8 +200,9 @@ class ReadClient : public Messaging::ExchangeDelegate * This function is invoked when using SendAutoResubscribeRequest, where the ReadClient was configured to auto re-subscribe * and the ReadPrepareParams was moved into this client for management. This will have to be free'ed appropriately by the * application. If SendAutoResubscribeRequest fails, this function will be called before it returns the failure. If - * SendAutoResubscribeRequest succeeds, this function will be called immediately before calling OnDone. If - * SendAutoResubscribeRequest is not called, this function will not be called. + * SendAutoResubscribeRequest succeeds, this function will be called immediately before calling OnDone, or + * when the ReadClient is destroyed, if that happens before OnDone. If SendAutoResubscribeRequest is not called, + * this function will not be called. */ virtual void OnDeallocatePaths(ReadPrepareParams && aReadPrepareParams) {} @@ -474,8 +475,9 @@ class ReadClient : public Messaging::ExchangeDelegate * AND if this ReadClient instance is tracking a subscription AND the applications decides to do so * in their implementation of Callback::OnResubscriptionNeeded(). * + * If allowOnDone is false, will not call OnDone. */ - void Close(CHIP_ERROR aError, bool allowResubscription = true); + void Close(CHIP_ERROR aError, bool allowResubscription = true, bool allowOnDone = true); void StopResubscription(); void ClearActiveSubscriptionState(); diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 481439f8ac3f27..d97b11f3213a8d 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -1763,6 +1763,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap delegate.mGotReport = false; + attributePathParams.release(); err = readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1868,6 +1869,7 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi delegate.mGotReport = false; + attributePathParams.release(); err = readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1944,6 +1946,7 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit delegate.mGotReport = false; + attributePathParams.release(); err = readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index 7fa58df7c932b4..65f4b51a11cd78 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -65,6 +65,13 @@ class TypedReadAttributeCallback final : public app::ReadClient::Callback mBufferedReadAdapter(*this) {} + ~TypedReadAttributeCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + mReadClient = nullptr; + } + app::BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } void AdoptReadClient(Platform::UniquePtr aReadClient) { mReadClient = std::move(aReadClient); } @@ -180,6 +187,13 @@ class TypedReadEventCallback final : public app::ReadClient::Callback mOnResubscriptionAttempt(aOnResubscriptionAttempt) {} + ~TypedReadEventCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + mReadClient = nullptr; + } + void AdoptReadClient(Platform::UniquePtr aReadClient) { mReadClient = std::move(aReadClient); } private: diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 026c3d7a5b504f..62b699dffcbdfa 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -300,6 +300,13 @@ - (void)invalidateCASESession { } + ~SubscriptionCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + mReadClient = nullptr; + } + BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } // We need to exist to get a ReadClient, so can't take this as a constructor argument. @@ -768,6 +775,13 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const { } + ~BufferedReadAttributeCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + mReadClient = nullptr; + } + app::BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } void AdoptReadClient(Platform::UniquePtr aReadClient) { mReadClient = std::move(aReadClient); } diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index c3a9e57b19edc3..937734b497f836 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -118,6 +118,13 @@ - (id)strongObject { } + ~SubscriptionCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + mReadClient = nullptr; + } + BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } // We need to exist to get a ReadClient, so can't take this as a constructor argument. From 89dd220fe65d1fc585cbfb55ad84e5c7278356b3 Mon Sep 17 00:00:00 2001 From: stoneM2017 Date: Tue, 16 Aug 2022 11:48:47 +0800 Subject: [PATCH 024/115] [BL602]1.add bflb-iot-tool to chip-build-vscode;2.support build bl602-light in vscode; (#21572) --- .vscode/tasks.json | 1 + integrations/docker/images/chip-build-vscode/Dockerfile | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 20aff730a74613..6dfc67d22b5457 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -331,6 +331,7 @@ "android-arm64-chip-tvserver", "android-x64-chip-tool", "android-x86-chip-tool", + "bl602-light", "efr32-brd4161a-light", "efr32-brd4163a-light", "efr32-brd4164a-light", diff --git a/integrations/docker/images/chip-build-vscode/Dockerfile b/integrations/docker/images/chip-build-vscode/Dockerfile index 394adea2e19aa3..69cee1937a513c 100644 --- a/integrations/docker/images/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/chip-build-vscode/Dockerfile @@ -66,6 +66,11 @@ RUN set -x \ && rm -rf /var/lib/apt/lists/* \ && : # last line +# Required for the Bouffalolab platform +RUN set -x \ + && pip3 install bflb-iot-tool \ + && : # last line + ENV AMEBA_PATH=/opt/ameba/ambd_sdk_with_chip_non_NDA ENV ANDROID_HOME=/opt/android/sdk ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r21b From 55faf46d6afb47393e01123d96cbf4721656c555 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 15 Aug 2022 20:55:41 -0700 Subject: [PATCH 025/115] Update cherry-picks.yaml --- .github/workflows/cherry-picks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherry-picks.yaml b/.github/workflows/cherry-picks.yaml index 6c6208eb2f6f30..89b8a74cc6aedf 100644 --- a/.github/workflows/cherry-picks.yaml +++ b/.github/workflows/cherry-picks.yaml @@ -27,7 +27,7 @@ jobs: uses: carloscastrojumo/github-cherry-pick-action@v1.0.1 with: token: ${{ secrets.MATTER_PAT }} - branch: sve + branch: sve-2 labels: | sve cherry pick reviewers: | From c24577d10a88ec5bce9de125ab799a23a57213f4 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Tue, 16 Aug 2022 00:27:47 -0400 Subject: [PATCH 026/115] Fix enums in admin commissioning cluster (#21890) * Fix enums in admin commissioning cluster - Enum of cluster custom codes was not following spec - This PR updates the enum values Fixes #21887 Testing done: - Unit tests still pass - Cert tests still pass * Update some tests to validate new codes Co-authored-by: Justin Wood --- .../all-clusters-app.matter | 8 +-- .../all-clusters-minimal-app.matter | 8 +-- .../bridge-common/bridge-app.matter | 8 +-- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 8 +-- .../rootnode_contactsensor_lFAGG1bfRO.matter | 8 +-- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 8 +-- .../rootnode_doorlock_aNKYAreMXE.matter | 8 +-- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 8 +-- .../rootnode_flowsensor_1zVxHedlaV.matter | 8 +-- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 8 +-- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 8 +-- .../rootnode_lightsensor_lZQycTFcJK.matter | 8 +-- ...rootnode_occupancysensor_iHyVgifZuo.matter | 8 +-- .../rootnode_onofflight_bbs1b7IaOV.matter | 8 +-- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 8 +-- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 8 +-- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 8 +-- .../rootnode_speaker_RpzeXdimqA.matter | 8 +-- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 8 +-- .../rootnode_thermostat_bm3fb8dhYi.matter | 8 +-- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 8 +-- .../light-switch-app.matter | 8 +-- .../lighting-common/lighting-app.matter | 8 +-- examples/lock-app/lock-common/lock-app.matter | 8 +-- .../ota-provider-app.matter | 8 +-- .../ota-requestor-app.matter | 8 +-- .../placeholder/linux/apps/app1/config.matter | 8 +-- .../placeholder/linux/apps/app2/config.matter | 8 +-- examples/pump-app/pump-common/pump-app.matter | 8 +-- .../pump-controller-app.matter | 8 +-- .../esp32/main/temperature-measurement.matter | 8 +-- .../thermostat-common/thermostat.matter | 8 +-- examples/tv-app/tv-common/tv-app.matter | 8 +-- .../tv-casting-common/tv-casting-app.matter | 8 +-- examples/window-app/common/window-app.matter | 8 +-- src/app/tests/suites/TestMultiAdmin.yaml | 1 - .../certification/Test_TC_CADMIN_1_5.yaml | 2 + .../administrator-commissioning-cluster.xml | 8 +-- .../data_model/controller-clusters.matter | 8 +-- .../CHIPAttributeTLVValueDecoder.cpp | 2 +- .../python/chip/clusters/Objects.py | 14 ++--- .../MTRAttributeTLVValueDecoder.mm | 2 +- .../CHIP/zap-generated/MTRBaseClusters.h | 6 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 51 +++++++++++-------- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/attributes/Accessors.cpp | 10 ++-- .../zap-generated/attributes/Accessors.h | 5 +- .../app-common/zap-generated/cluster-enums.h | 6 +-- .../zap-generated/cluster-objects.h | 9 ++-- .../app-common/zap-generated/enums.h | 6 +-- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../cluster/logging/DataModelLogger.cpp | 2 +- .../chip-tool/zap-generated/test/Commands.h | 36 ++++++------- .../zap-generated/test/Commands.h | 2 - .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../lock-app/zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../app1/zap-generated/endpoint_config.h | 2 +- .../app2/zap-generated/endpoint_config.h | 2 +- .../pump-app/zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../tv-app/zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- 87 files changed, 265 insertions(+), 255 deletions(-) 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 624d505536b9a6..b5b01cbbe77edd 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 @@ -1520,12 +1520,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index a1e8488dc08e68..0393515a9434ca 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1370,12 +1370,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index a5e458b508db8b..4ba029df533fff 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1207,12 +1207,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 88e49031a81a7a..94e2afd10550fb 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1178,12 +1178,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 49ea336f8ac5ff..6d5ef0db2c89ac 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1057,12 +1057,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index a6c9d6b3bff113..679ac23100dce5 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1312,12 +1312,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index bb7d739f8a736e..61072d01cfed8f 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1279,12 +1279,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 290f97cef9bea7..e9d7612115a077 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1312,12 +1312,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 643a9f84a8cf10..1eeb6ff8a7eae8 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 0298dc9600af84..3b125b0dc67048 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1305,12 +1305,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index d7283b11cc18e2..6f07b93ec1db88 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 82a55dc63925ee..a079bc8b4b2d1f 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 51bd1880a09e75..2f3f18f70b6d62 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index f695c6978b12b6..734df25acf13da 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1312,12 +1312,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index d02bfd290b559d..80b9c2508fecae 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1371,12 +1371,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 434da308d335d7..770296d2fe04a5 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1218,12 +1218,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 12e9a22853af12..5f45a4cfb94265 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 709ac25bad5cf7..b0de2dbd8f02f0 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1192,12 +1192,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 759a2a2311206b..4797130d1ae28f 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1070,12 +1070,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index cbccf1d36b21af..130092342ac222 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1168,12 +1168,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 6118a6848531ea..6d996b85f85e6a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1168,12 +1168,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index eb6f3d244f7c3f..0a6d27521c8a74 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1262,12 +1262,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index cf7b3b4a67065c..d538c8232f7bb0 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1208,12 +1208,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index e9ecd31dec7fb0..4cefbed40a134e 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1139,12 +1139,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 9c754da2cbe516..116c938fb8e65b 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -585,12 +585,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 27b5cb68c0562c..b4f355b42db983 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -767,12 +767,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 44aaab139aebaf..48822ed58e83bf 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1211,12 +1211,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 44aaab139aebaf..48822ed58e83bf 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1211,12 +1211,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 66bbc6e5e5a2ea..8ecaaf510d6cf2 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -873,12 +873,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index fea6937c1da995..a010075f3bbacc 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -777,12 +777,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index c370e0cc2b459e..9938f046a6be56 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -615,12 +615,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 3fda6b1ea19027..a8effc7c102a39 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1174,12 +1174,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index f5bc82fd9a50f9..fe24dc76ed30e0 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1216,12 +1216,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 1d16ba0fb16228..2d495a70d71cd8 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1420,12 +1420,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 66513f7ad2ab7b..f1fdcb1a06a793 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1215,12 +1215,12 @@ server cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/src/app/tests/suites/TestMultiAdmin.yaml b/src/app/tests/suites/TestMultiAdmin.yaml index ff45d1bbe1d985..fb05ce34893cee 100644 --- a/src/app/tests/suites/TestMultiAdmin.yaml +++ b/src/app/tests/suites/TestMultiAdmin.yaml @@ -90,7 +90,6 @@ tests: value: payload response: error: FAILURE - clusterError: 0x09 #OperationalCertStatus::kFabricConflict - label: "Check that we just have the one fabric and did not add a new one" identity: "alpha" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index a27b47f8dc672b..9f47616362ded0 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -235,6 +235,7 @@ tests: value: "SPAKE2P Key Salt" response: error: FAILURE + clusterError: 2 - label: "TH_CR2 starts a commissioning process with DUT_CE" PICS: CADMIN.S @@ -257,6 +258,7 @@ tests: timedInteractionTimeoutMs: 10000 response: error: FAILURE + clusterError: 4 - label: "TH_CR3 starts a commissioning process with DUT_CE" identity: "gamma" diff --git a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml index 3f50632bc78ebb..be76275b14b6f1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml @@ -19,9 +19,9 @@ limitations under the License. - - - + + + @@ -38,7 +38,7 @@ limitations under the License. ADMINISTRATOR_COMMISSIONING_CLUSTER Commands to trigger a Node to allow a new Administrator to commission it. - WindowStatus + WindowStatus AdminFabricIndex AdminVendorId diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 300cede056164e..ddb54a3525ae21 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1748,12 +1748,12 @@ client cluster AdministratorCommissioning = 60 { } enum StatusCode : ENUM8 { - kBusy = 1; - kPAKEParameterError = 2; - kWindowNotOpen = 3; + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; } - readonly attribute int8u windowStatus = 0; + readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index af6ff837ea7abb..336a61be05a3ff 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -8100,7 +8100,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::AdminFabricIndex::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 71014e343e5285..9a13bd93cad370 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10811,7 +10811,7 @@ class AdministratorCommissioning(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="windowStatus", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="windowStatus", Tag=0x00000000, Type=AdministratorCommissioning.Enums.CommissioningWindowStatus), ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=0x00000001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="adminVendorId", Tag=0x00000002, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), @@ -10821,7 +10821,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - windowStatus: 'uint' = None + windowStatus: 'AdministratorCommissioning.Enums.CommissioningWindowStatus' = None adminFabricIndex: 'typing.Union[Nullable, uint]' = None adminVendorId: 'typing.Union[Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None @@ -10837,9 +10837,9 @@ class CommissioningWindowStatus(IntEnum): kBasicWindowOpen = 0x02 class StatusCode(IntEnum): - kBusy = 0x01 - kPAKEParameterError = 0x02 - kWindowNotOpen = 0x03 + kBusy = 0x02 + kPAKEParameterError = 0x03 + kWindowNotOpen = 0x04 @@ -10921,9 +10921,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=AdministratorCommissioning.Enums.CommissioningWindowStatus) - value: 'uint' = 0 + value: 'AdministratorCommissioning.Enums.CommissioningWindowStatus' = 0 @dataclass class AdminFabricIndex(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 35da7e5702df95..3bd3d70a8e3de3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -6711,7 +6711,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::AdminFabricIndex::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 5d6b998442bd78..0c017a184b92f8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -22472,9 +22472,9 @@ typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningCommissioningWindowStatus) }; typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningStatusCode) { - MTRAdministratorCommissioningStatusCodeBusy = 0x01, - MTRAdministratorCommissioningStatusCodePAKEParameterError = 0x02, - MTRAdministratorCommissioningStatusCodeWindowNotOpen = 0x03, + MTRAdministratorCommissioningStatusCodeBusy = 0x02, + MTRAdministratorCommissioningStatusCodePAKEParameterError = 0x03, + MTRAdministratorCommissioningStatusCodeWindowNotOpen = 0x04, }; typedef NS_ENUM(uint8_t, MTROperationalCredentialsOperationalCertStatus) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 345e5d979f71ef..2802b6e31b55c2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -31464,10 +31464,12 @@ new MTRCommandSuccessCallbackBridge( - (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(self.callbackQueue, self.device, + completionHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -31484,7 +31486,7 @@ - (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minIn minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - new MTRInt8uAttributeCallbackSubscriptionBridge( + new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -31492,14 +31494,16 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); @@ -31511,23 +31515,26 @@ + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index fa3c3a36b4e728..397d0a242bfb45 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -710,7 +710,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h index 61bfcef138c696..ad1c7adabef779 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h @@ -512,7 +512,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ 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 90354924895023..fe3e77ae17c2bc 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 @@ -9905,9 +9905,9 @@ namespace Attributes { namespace WindowStatus { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -9920,9 +9920,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9930,7 +9930,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } } // namespace WindowStatus 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 6c4aceb301fc06..bcf76c04bf562a 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 @@ -1722,8 +1722,9 @@ namespace AdministratorCommissioning { namespace Attributes { namespace WindowStatus { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus * value); // CommissioningWindowStatus +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value); } // namespace WindowStatus namespace AdminFabricIndex { 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 d07c83ba6e2ba4..fa7a51a92ee971 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 @@ -918,9 +918,9 @@ enum class CommissioningWindowStatus : uint8_t // Enum for StatusCode enum class StatusCode : uint8_t { - kBusy = 0x01, - kPAKEParameterError = 0x02, - kWindowNotOpen = 0x03, + kBusy = 0x02, + kPAKEParameterError = 0x03, + kWindowNotOpen = 0x04, kUnknownEnumValue = 0, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index e4adf34858c125..c35ba378c1822c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -10805,9 +10805,9 @@ namespace Attributes { namespace WindowStatus { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus; + using DecodableType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus; + using DecodableArgType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus; static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::WindowStatus::Id; } @@ -10877,7 +10877,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::WindowStatus::TypeInfo::DecodableType windowStatus = static_cast(0); + Attributes::WindowStatus::TypeInfo::DecodableType windowStatus = + static_cast(0); Attributes::AdminFabricIndex::TypeInfo::DecodableType adminFabricIndex; Attributes::AdminVendorId::TypeInfo::DecodableType adminVendorId; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index c5d1fd3ff6982d..9becdd8f249d2f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -307,9 +307,9 @@ enum EmberAfStartUpOnOffValue : uint8_t // Enum for StatusCode enum EmberAfStatusCode : uint8_t { - EMBER_ZCL_STATUS_CODE_BUSY = 1, - EMBER_ZCL_STATUS_CODE_PAKE_PARAMETER_ERROR = 2, - EMBER_ZCL_STATUS_CODE_WINDOW_NOT_OPEN = 3, + EMBER_ZCL_STATUS_CODE_BUSY = 2, + EMBER_ZCL_STATUS_CODE_PAKE_PARAMETER_ERROR = 3, + EMBER_ZCL_STATUS_CODE_WINDOW_NOT_OPEN = 4, }; // Enum for StepMode diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 793c4b849cccfd..512ddb00426c88 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -403,7 +403,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index fdfd6129e58deb..419d69e82686cd 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -371,7 +371,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h index e6eeae0309384f..0c665737e4db41 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index c5bf7d7aa934c2..d8e696e270b889 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -383,7 +383,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h index d96c77cf7ee6a3..36fd252952e013 100644 --- a/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_doorlock_aNKYAreMXE/zap-generated/endpoint_config.h @@ -385,7 +385,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h index 8f91e80ce4fdb7..58cae4639d8ccf 100644 --- a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h @@ -389,7 +389,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h index 7edbf350965f5a..226f99388bcfc9 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h index 9eea15bebdc554..dd7929269e4e9b 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h @@ -386,7 +386,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h index 6416065fa2bff3..47191e49890f70 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h index 17c75ca4a7845c..aebdd5400337f9 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h index db33a444c2f58c..876c269870ad92 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h index dbfb4a121bbd63..bb3b206f3e3c54 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h @@ -383,7 +383,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h index 7760683b8fc487..1d632c684a55de 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h index 5cee1a51e4c97b..8c1a8eb31c382f 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h index a18ca3022548a2..86ac798979ca6d 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h index 711e9ec8ba8d25..75958fbfa6613f 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h index 6627619c339bfd..299eaec634f6ef 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h index 19629e77693305..23fcce30b432cc 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h @@ -400,7 +400,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h index cef3ee58e0f28a..5130d5934fe67d 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h @@ -380,7 +380,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 71078e73a0a8d2..815f415a033baf 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6228,7 +6228,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case AdministratorCommissioning::Attributes::WindowStatus::Id: { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("WindowStatus", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index e07ed62db04c83..688f40adc364a3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -59280,7 +59280,7 @@ class TestCommissioningWindowSuite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -59307,7 +59307,7 @@ class TestCommissioningWindowSuite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 2U)); } @@ -59336,7 +59336,7 @@ class TestCommissioningWindowSuite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -59371,7 +59371,7 @@ class TestCommissioningWindowSuite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -59406,7 +59406,7 @@ class TestCommissioningWindowSuite : public TestCommand case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 2U)); } @@ -59440,7 +59440,7 @@ class TestCommissioningWindowSuite : public TestCommand case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 2U)); } @@ -59739,8 +59739,6 @@ class TestMultiAdminSuite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); shouldContinue = true; break; case 6: @@ -81794,7 +81792,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -82157,7 +82155,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -82447,6 +82445,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -82454,6 +82454,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 4)); break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -84085,7 +84087,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 2U)); } @@ -84161,7 +84163,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 1U)); } @@ -84206,7 +84208,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -84586,7 +84588,7 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -84597,7 +84599,7 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -84749,7 +84751,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } @@ -84760,7 +84762,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } 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 56e843108725bc..bae5330c2f3812 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -99923,8 +99923,6 @@ class TestMultiAdmin : public TestCommandBridge { break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus present", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus value", status.mClusterStatus.Value(), 9)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index 9fd63c4551172c..20ceedb2c7cdc4 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -387,7 +387,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index b954740b0e35ea..1361aff82ab860 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -410,7 +410,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 6c42109259c54a..91bcafea15e10d 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -444,7 +444,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 4c81f82156a228..7dd6799d0ad124 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -217,7 +217,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 962f8540b046a1..8bc04ef6e29563 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -230,7 +230,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 22783ee9437ab9..765846c3745642 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -329,7 +329,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 22783ee9437ab9..765846c3745642 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -329,7 +329,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 090696b9c401f8..184510a85d25d5 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -227,7 +227,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index d331e7a06a1eb9..baf09393b318d3 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -218,7 +218,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 53d93539df8bb2..74dd066fb66de0 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -287,7 +287,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 17347ae153b973..7dd22c5618e083 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -424,7 +424,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 4e5feb1a6299f4..7a6c286245e876 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -459,7 +459,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index c51c8baa321c7f..07f42f288b55b7 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -412,7 +412,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 39104a61c0f20b..f9f38afdf23568 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -408,7 +408,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ From 7816a69044e0464444d2bf1bc4afde5fce34dd32 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Tue, 16 Aug 2022 00:32:43 -0400 Subject: [PATCH 027/115] [EFR32] Provide a way to build matter examples using a openthread library (#21836) * WIP build with ot-lib * WIP compile from lib or source * Fix and cleanup build system * Fix efr32 path to internal thread source without breaking other platforms. Add new ot support to all efr32 examples * restyle * add recursive submodule update for efr to pull the openthread repo for ot-efr32 (temporary) * fix for wifi builds * Fix assert with ot lib * Use plaform dmp lib * Update ot-efr32 hash for new libs * Addresse comment by correcting how and where a openthread_target can be set. Change efr32 build system with those changes * restyle * some cleanup * more cleanup * Fix wifi build --- .github/workflows/examples-efr32.yaml | 2 +- .gitmodules | 3 +- examples/chef/efr32/BUILD.gn | 14 +- examples/chef/efr32/args.gni | 2 + examples/chef/efr32/include/AppConfig.h | 2 +- examples/light-switch-app/efr32/BUILD.gn | 14 +- examples/light-switch-app/efr32/args.gni | 2 + .../efr32/include/AppConfig.h | 2 +- examples/lighting-app/efr32/BUILD.gn | 14 +- examples/lighting-app/efr32/args.gni | 3 + examples/lock-app/efr32/BUILD.gn | 14 +- examples/lock-app/efr32/args.gni | 2 + examples/lock-app/efr32/include/AppConfig.h | 2 +- .../efr32/include/AppConfig.h | 2 +- .../pigweed-app/efr32/include/AppConfig.h | 2 +- examples/platform/efr32/BUILD.gn | 18 ++- examples/platform/efr32/efr32_utils.h | 2 +- examples/platform/efr32/init_efrPlatform.cpp | 6 +- examples/shell/efr32/include/AppConfig.h | 2 +- examples/thermostat/efr32/BUILD.gn | 14 +- examples/window-app/efr32/BUILD.gn | 14 +- examples/window-app/efr32/args.gni | 2 + examples/window-app/efr32/include/AppConfig.h | 2 +- scripts/checkout_submodules.py | 6 +- scripts/examples/gn_efr32_example.sh | 7 + src/inet/BUILD.gn | 8 +- src/platform/EFR32/BUILD.gn | 11 +- src/platform/EFR32/Logging.cpp | 4 +- src/platform/EFR32/ThreadStackManagerImpl.cpp | 5 + src/platform/EFR32/args.gni | 4 +- src/test_driver/efr32/.gn | 1 - src/test_driver/efr32/BUILD.gn | 14 +- src/test_driver/efr32/args.gni | 3 + src/test_driver/efr32/include/AppConfig.h | 2 +- third_party/openthread/BUILD.gn | 25 ++++ third_party/openthread/ot-efr32 | 2 +- .../openthread/platforms/efr32/BUILD.gn | 6 +- third_party/silabs/BUILD.gn | 138 ++++++++++++++++++ third_party/silabs/efr32_sdk.gni | 3 + 39 files changed, 243 insertions(+), 136 deletions(-) create mode 100644 third_party/openthread/BUILD.gn diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 16aaaa42a189d4..320dad29dadd31 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -48,7 +48,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform efr32 + run: scripts/checkout_submodules.py --shallow --recursive --platform efr32 # - name: Out of Tree verification # run: third_party/silabs/out_of_tree_verification.sh diff --git a/.gitmodules b/.gitmodules index 16d589e739d539..abde0e5f8cdfd5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -78,7 +78,8 @@ platforms = qpg [submodule "third_party/openthread/ot-efr32"] path = third_party/openthread/ot-efr32 - url = https://github.com/openthread/ot-efr32.git + url = https://github.com/SiliconLabs/ot-efr32.git + branch = matter_sve platforms = efr32 [submodule "third_party/openthread/ot-ifx"] path = third_party/openthread/ot-ifx diff --git a/examples/chef/efr32/BUILD.gn b/examples/chef/efr32/BUILD.gn index e938574e195aa6..efaace05910a0b 100644 --- a/examples/chef/efr32/BUILD.gn +++ b/examples/chef/efr32/BUILD.gn @@ -206,21 +206,9 @@ efr32_executable("chef_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } if (chip_enable_ota_requestor) { diff --git a/examples/chef/efr32/args.gni b/examples/chef/efr32/args.gni index 7d077dce704c2f..4e322f1022501b 100644 --- a/examples/chef/efr32/args.gni +++ b/examples/chef/efr32/args.gni @@ -24,3 +24,5 @@ pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" chip_enable_openthread = true +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/chef/efr32/include/AppConfig.h b/examples/chef/efr32/include/AppConfig.h index 91501d889a6234..946b593cab50a4 100644 --- a/examples/chef/efr32/include/AppConfig.h +++ b/examples/chef/efr32/include/AppConfig.h @@ -32,7 +32,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index b3fb8fdd5b86c8..026dc46d13195c 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -199,21 +199,9 @@ efr32_executable("light_switch_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } # Attestation Credentials diff --git a/examples/light-switch-app/efr32/args.gni b/examples/light-switch-app/efr32/args.gni index 7df1c5e400f56f..8e1885d95d18d4 100644 --- a/examples/light-switch-app/efr32/args.gni +++ b/examples/light-switch-app/efr32/args.gni @@ -24,3 +24,5 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" chip_enable_openthread = true pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/light-switch-app/efr32/include/AppConfig.h b/examples/light-switch-app/efr32/include/AppConfig.h index 91501d889a6234..946b593cab50a4 100644 --- a/examples/light-switch-app/efr32/include/AppConfig.h +++ b/examples/light-switch-app/efr32/include/AppConfig.h @@ -32,7 +32,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 9a9e4c15b8f33c..81a25554eb9ba2 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -204,21 +204,9 @@ efr32_executable("lighting_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } if (chip_enable_ota_requestor) { diff --git a/examples/lighting-app/efr32/args.gni b/examples/lighting-app/efr32/args.gni index 7df1c5e400f56f..1e5ed4ca14102c 100644 --- a/examples/lighting-app/efr32/args.gni +++ b/examples/lighting-app/efr32/args.gni @@ -24,3 +24,6 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" chip_enable_openthread = true pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index a739b266110543..c98bebfed6d942 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -201,21 +201,9 @@ efr32_executable("lock_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } if (chip_enable_ota_requestor) { diff --git a/examples/lock-app/efr32/args.gni b/examples/lock-app/efr32/args.gni index b4a0322c442f40..9ff5e1fd3992f1 100644 --- a/examples/lock-app/efr32/args.gni +++ b/examples/lock-app/efr32/args.gni @@ -24,3 +24,5 @@ chip_enable_openthread = true pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/lock-app/efr32/include/AppConfig.h b/examples/lock-app/efr32/include/AppConfig.h index 852083cb9cbd91..096560abefe349 100644 --- a/examples/lock-app/efr32/include/AppConfig.h +++ b/examples/lock-app/efr32/include/AppConfig.h @@ -32,7 +32,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/persistent-storage/efr32/include/AppConfig.h b/examples/persistent-storage/efr32/include/AppConfig.h index 74a5ae90e43c83..ae2846d90c6caa 100644 --- a/examples/persistent-storage/efr32/include/AppConfig.h +++ b/examples/persistent-storage/efr32/include/AppConfig.h @@ -24,7 +24,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/pigweed-app/efr32/include/AppConfig.h b/examples/pigweed-app/efr32/include/AppConfig.h index 61a5430dafeeb8..8935b7f3bb7284 100644 --- a/examples/pigweed-app/efr32/include/AppConfig.h +++ b/examples/pigweed-app/efr32/include/AppConfig.h @@ -39,7 +39,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); void appError(int err); diff --git a/examples/platform/efr32/BUILD.gn b/examples/platform/efr32/BUILD.gn index ba36aeff00c83b..d1522f93d6d686 100644 --- a/examples/platform/efr32/BUILD.gn +++ b/examples/platform/efr32/BUILD.gn @@ -15,6 +15,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/efr32_sdk.gni") import("${chip_root}/src/lib/lib.gni") +import("${chip_root}/src/platform/device.gni") import("${efr32_sdk_build_root}/efr32_sdk.gni") config("chip_examples_project_config") { @@ -40,14 +41,19 @@ config("chip_examples_project_config") { } source_set("openthread_core_config_efr32_chip_examples") { - sources = [ "project_include/OpenThreadConfig.h" ] + if (chip_enable_openthread) { + sources = [ "project_include/OpenThreadConfig.h" ] - public_deps = [ - "${chip_root}/third_party/openthread/platforms/efr32:openthread_core_config_efr32", - "${efr32_sdk_build_root}:efr32_sdk", - ] + public_deps = [ "${efr32_sdk_build_root}:efr32_sdk" ] - public_configs = [ ":chip_examples_project_config" ] + if (use_silabs_thread_lib) { + public_deps += [ "${efr32_sdk_build_root}:openthread_core_config_efr32" ] + } else { + public_deps += [ "${chip_root}/third_party/openthread/platforms/efr32:openthread_core_config_efr32" ] + } + + public_configs = [ ":chip_examples_project_config" ] + } } source_set("efr-matter-shell") { diff --git a/examples/platform/efr32/efr32_utils.h b/examples/platform/efr32/efr32_utils.h index 610bde3e4e2511..98087091d9c0e9 100644 --- a/examples/platform/efr32/efr32_utils.h +++ b/examples/platform/efr32/efr32_utils.h @@ -24,7 +24,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/platform/efr32/init_efrPlatform.cpp b/examples/platform/efr32/init_efrPlatform.cpp index f251f48f5dbab1..d0fb913165c469 100644 --- a/examples/platform/efr32/init_efrPlatform.cpp +++ b/examples/platform/efr32/init_efrPlatform.cpp @@ -72,13 +72,11 @@ void init_efrPlatform(void) #endif #if EFR32_LOG_ENABLED - efr32LogInit(); + efr32InitLog(); #endif #if CHIP_ENABLE_OPENTHREAD - efr32RadioInit(); - efr32AlarmInit(); - efr32MiscInit(); + sl_ot_sys_init(); #endif // CHIP_ENABLE_OPENTHREAD } diff --git a/examples/shell/efr32/include/AppConfig.h b/examples/shell/efr32/include/AppConfig.h index a14ec9f589f735..743c6eddbb18ad 100644 --- a/examples/shell/efr32/include/AppConfig.h +++ b/examples/shell/efr32/include/AppConfig.h @@ -54,7 +54,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/examples/thermostat/efr32/BUILD.gn b/examples/thermostat/efr32/BUILD.gn index 90f61b99ca1ad6..fe2be76adf88a8 100644 --- a/examples/thermostat/efr32/BUILD.gn +++ b/examples/thermostat/efr32/BUILD.gn @@ -195,21 +195,9 @@ efr32_executable("thermostat_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } # Attestation Credentials diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index fad09d7f4d3ce7..bcd17e3b6dddcf 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -187,21 +187,9 @@ efr32_executable("window_app") { # OpenThread Settings if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/openthread:openthread", "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } } if (chip_enable_ota_requestor) { diff --git a/examples/window-app/efr32/args.gni b/examples/window-app/efr32/args.gni index 0b7ef403df72cd..26f97a8076d141 100644 --- a/examples/window-app/efr32/args.gni +++ b/examples/window-app/efr32/args.gni @@ -23,3 +23,5 @@ chip_enable_ota_requestor = true pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" chip_enable_openthread = true +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/window-app/efr32/include/AppConfig.h b/examples/window-app/efr32/include/AppConfig.h index d8a68d9982e4b8..a9957cf77b5bb9 100644 --- a/examples/window-app/efr32/include/AppConfig.h +++ b/examples/window-app/efr32/include/AppConfig.h @@ -57,7 +57,7 @@ extern "C" { #define COVER_LIFT_TILT_TIMEOUT 500 #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index 486a3e7b3b355d..b150b8df71253e 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -74,7 +74,7 @@ def make_chip_root_safe_directory() -> None: subprocess.check_call(['git', 'config', '--global', '--add', 'safe.directory', CHIP_ROOT]) -def checkout_modules(modules: list, shallow: bool, force: bool) -> None: +def checkout_modules(modules: list, shallow: bool, force: bool, recursive: bool) -> None: names = [module.name.replace('submodule "', '').replace('"', '') for module in modules] names = ', '.join(names) logging.info(f'Checking out: {names}') @@ -82,6 +82,7 @@ def checkout_modules(modules: list, shallow: bool, force: bool) -> None: cmd = ['git', '-C', CHIP_ROOT, 'submodule', 'update', '--init'] cmd += ['--depth', '1'] if shallow else [] cmd += ['--force'] if force else [] + cmd += ['--recursive'] if recursive else [] cmd += [module.path for module in modules] subprocess.check_call(cmd) @@ -109,6 +110,7 @@ def main(): parser.add_argument('--force', action='store_true', help='Perform action despite of warnings') parser.add_argument('--deinit-unmatched', action='store_true', help='Deinitialize submodules for non-matching platforms') + parser.add_argument('--recursive', action='store_true', help='Recursive init of the listed submodules') args = parser.parse_args() modules = list(load_module_info()) @@ -117,7 +119,7 @@ def main(): unmatched_modules = [m for m in modules if not module_matches_platforms(m, selected_platforms)] make_chip_root_safe_directory() - checkout_modules(selected_modules, args.shallow, args.force) + checkout_modules(selected_modules, args.shallow, args.force, args.recursive) if args.deinit_unmatched: deinit_modules(unmatched_modules, args.force) diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index 6882bba7d44d00..5b47c945c771a8 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -34,6 +34,7 @@ set -x env USE_WIFI=false +SILABS_THREAD_TARGET=\""../silabs:ot-efr32-cert"\" USAGE="./scripts/examples/gn_efr32_example.sh []" if [ "$#" == "0" ]; then @@ -102,6 +103,8 @@ if [ "$#" == "0" ]; then build wifi example variant for given exansion board --additional_data_advertising enable Addition data advertissing and rotating device ID + --use_ot_lib + use the silabs openthread library " elif [ "$#" -lt "2" ]; then echo "Invalid number of arguments @@ -149,6 +152,10 @@ else optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " shift ;; + --use_ot_lib) + optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" " + shift + ;; *) if [ "$1" =~ *"use_rs911x=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then USE_WIFI=true diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index 6e671c0f7b358e..5a85beb667c25b 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -108,13 +108,7 @@ static_library("inet") { } if (chip_system_config_use_open_thread_inet_endpoints) { - if (chip_openthread_ftd) { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } + public_deps += [ "${chip_root}/third_party/openthread:openthread" ] } if (chip_inet_config_enable_tcp_endpoint) { diff --git a/src/platform/EFR32/BUILD.gn b/src/platform/EFR32/BUILD.gn index cf1b3b77bcec1c..e406ce994eedee 100644 --- a/src/platform/EFR32/BUILD.gn +++ b/src/platform/EFR32/BUILD.gn @@ -97,15 +97,10 @@ static_library("EFR32") { "$dir_pw_checksum", "$dir_pw_kvs", ] - if (chip_enable_openthread) { - if (chip_openthread_ftd) { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } + public_deps += [ "${chip_root}/third_party/openthread:openthread" ] + + deps += [ "${chip_root}/third_party/silabs:openthread_cli" ] sources += [ "../OpenThread/OpenThreadUtils.cpp", diff --git a/src/platform/EFR32/Logging.cpp b/src/platform/EFR32/Logging.cpp index ad78dfae0a033a..ad0711fe930961 100644 --- a/src/platform/EFR32/Logging.cpp +++ b/src/platform/EFR32/Logging.cpp @@ -104,7 +104,7 @@ static void PrintLog(const char * msg) /** * Initialize Segger RTT for logging */ -extern "C" void efr32LogInit(void) +extern "C" void efr32InitLog(void) { #if EFR32_LOG_ENABLED #if LOG_RTT_BUFFER_INDEX != 0 @@ -344,7 +344,7 @@ extern "C" void debugHardfault(uint32_t * sp) if (sLogInitialized == false) { - efr32LogInit(); + efr32InitLog(); } snprintf(formattedMsg, sizeof formattedMsg, LOG_ERROR "HardFault:\n"); diff --git a/src/platform/EFR32/ThreadStackManagerImpl.cpp b/src/platform/EFR32/ThreadStackManagerImpl.cpp index a90db73b620d39..16d792276644e4 100644 --- a/src/platform/EFR32/ThreadStackManagerImpl.cpp +++ b/src/platform/EFR32/ThreadStackManagerImpl.cpp @@ -100,6 +100,11 @@ extern "C" void otPlatFree(void * aPtr) CHIPPlatformMemoryFree(aPtr); } +extern "C" __WEAK void sl_openthread_init(void) +{ + // Place holder for enabling Silabs specific features available only through Simplicity Studio +} + /** * @brief Openthread UART implementation for the CLI is conflicting * with the UART implemented for Pigweed RPC as they use the same UART port diff --git a/src/platform/EFR32/args.gni b/src/platform/EFR32/args.gni index a66bd28acf86ef..7b80e77e100190 100644 --- a/src/platform/EFR32/args.gni +++ b/src/platform/EFR32/args.gni @@ -43,14 +43,12 @@ chip_with_lwip = false chip_build_tests = false +openthread_root = "${chip_root}/third_party/openthread/ot-efr32/openthread" openthread_core_config_platform_check_file = "openthread-core-efr32-config-check.h" openthread_project_core_config_file = "OpenThreadConfig.h" openthread_core_config_deps = [ "${chip_root}/examples/platform/efr32:openthread_core_config_efr32_chip_examples" ] -openthread_external_platform = - "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" - chip_config_memory_management = "platform" pw_build_LINK_DEPS = [ diff --git a/src/test_driver/efr32/.gn b/src/test_driver/efr32/.gn index 81cec9d11a421b..7bb85d530fae5c 100644 --- a/src/test_driver/efr32/.gn +++ b/src/test_driver/efr32/.gn @@ -23,6 +23,5 @@ check_system_includes = true default_args = { target_cpu = "arm" target_os = "freertos" - import("//args.gni") } diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index d794b4b0ef2485..45e4aff6fe40a7 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -88,21 +88,15 @@ efr32_executable("efr32_device_tests") { "${chip_root}/src:tests", "${chip_root}/src/lib", "${chip_root}/src/lib/support:testing", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", "${nlunit_test_root}:nlunit-test", ] - if (chip_openthread_ftd) { + # OpenThread Settings + if (chip_enable_openthread) { deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + "${chip_root}/third_party/openthread:openthread", + "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 8addd1383ed934..8db9c5e87eb212 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -27,6 +27,9 @@ chip_enable_openthread = true chip_openthread_ftd = true chip_monolithic_tests = true +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + #Fix me : Test driver should use same config as examples # Problem : Linker issue if set to true chip_system_config_use_open_thread_inet_endpoints = false diff --git a/src/test_driver/efr32/include/AppConfig.h b/src/test_driver/efr32/include/AppConfig.h index 302dba47799e5e..3b83d375b46219 100644 --- a/src/test_driver/efr32/include/AppConfig.h +++ b/src/test_driver/efr32/include/AppConfig.h @@ -25,7 +25,7 @@ extern "C" { #endif -void efr32LogInit(void); +void efr32InitLog(void); void efr32Log(const char * aFormat, ...); #define EFR32_LOG(...) efr32Log(__VA_ARGS__); void appError(int err); diff --git a/third_party/openthread/BUILD.gn b/third_party/openthread/BUILD.gn new file mode 100644 index 00000000000000..752f245738a750 --- /dev/null +++ b/third_party/openthread/BUILD.gn @@ -0,0 +1,25 @@ +import("//build_overrides/chip.gni") +import("//build_overrides/openthread.gni") + +import("${chip_root}/src/platform/device.gni") + +declare_args() { + # Use a different target, such as a prebuilt Thread library. + chip_openthread_target = "" +} + +group("openthread") { + if (chip_openthread_target != "") { + public_deps = [ chip_openthread_target ] + } else { + public_deps = [ + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + ] + if (chip_openthread_ftd) { + public_deps += [ "${openthread_root}:libopenthread-ftd" ] + } else { + public_deps += [ "${openthread_root}:libopenthread-mtd" ] + } + } +} diff --git a/third_party/openthread/ot-efr32 b/third_party/openthread/ot-efr32 index 7a567da02a0785..fd77faf7a3443f 160000 --- a/third_party/openthread/ot-efr32 +++ b/third_party/openthread/ot-efr32 @@ -1 +1 @@ -Subproject commit 7a567da02a078546eb34136c1c44170c8832dd55 +Subproject commit fd77faf7a3443f7941dfd9e9713aea09eb08e9b9 diff --git a/third_party/openthread/platforms/efr32/BUILD.gn b/third_party/openthread/platforms/efr32/BUILD.gn index 140070a57b9d8a..b6dba5b98d4351 100644 --- a/third_party/openthread/platforms/efr32/BUILD.gn +++ b/third_party/openthread/platforms/efr32/BUILD.gn @@ -37,9 +37,9 @@ config("openthread_efr32_config") { source_set("openthread_core_config_efr32") { sources = [ + "${openthread_efr32_root}/openthread/src/cli/cli_config.h", "${openthread_efr32_root}/src/src/openthread-core-efr32-config-check.h", "${openthread_efr32_root}/src/src/openthread-core-efr32-config.h", - "${openthread_root}/src/cli/cli_config.h", ] public_deps = [ "${efr32_sdk_build_root}:efr32_sdk" ] @@ -49,6 +49,7 @@ source_set("openthread_core_config_efr32") { source_set("libopenthread-efr32") { sources = [ + "${openthread_efr32_root}/openthread/examples/apps/cli/cli_uart.cpp", "${openthread_efr32_root}/src/src/alarm.c", "${openthread_efr32_root}/src/src/crypto.c", "${openthread_efr32_root}/src/src/entropy.c", @@ -58,12 +59,11 @@ source_set("libopenthread-efr32") { "${openthread_efr32_root}/src/src/security_manager.c", "${openthread_efr32_root}/src/src/sleep.c", "${openthread_efr32_root}/src/src/system.c", - "${openthread_root}/examples/apps/cli/cli_uart.cpp", ] public_deps = [ ":openthread_core_config_efr32", - "${openthread_root}/src/core:libopenthread_core_headers", + "${openthread_efr32_root}/openthread/src/core:libopenthread_core_headers", "..:libopenthread-platform", "..:libopenthread-platform-utils", ] diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index 718852a0a2f235..c4f96d18d339f5 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -12,12 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build_overrides/chip.gni") import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/jlink.gni") +import("${chip_root}/src/platform/device.gni") import("${efr32_sdk_build_root}/efr32_sdk.gni") declare_args() { # Build target to use for efr32 SDK. Use this to set global SDK defines. efr32_sdk_target = "" + sl_ot_efr32_root = "${chip_root}/third_party/openthread/ot-efr32" + sl_openthread_root = "${chip_root}/third_party/openthread/ot-efr32/openthread" } assert(efr32_sdk_target != "", "efr32_sdk_target must be specified") @@ -25,3 +30,136 @@ assert(efr32_sdk_target != "", "efr32_sdk_target must be specified") group("efr32_sdk") { public_deps = [ efr32_sdk_target ] } + +if (chip_enable_openthread) { + group("openthread_cli") { + if (!use_silabs_thread_lib) { + if (chip_openthread_ftd) { + public_deps = [ "${sl_openthread_root}:libopenthread-cli-ftd" ] + } else { + public_deps = [ "${sl_openthread_root}:libopenthread-cli-mtd" ] + } + } + } +} + +if (use_silabs_thread_lib) { + config("libopenthread-platform_config") { + include_dirs = [ "${sl_openthread_root}/examples/platforms" ] + } + + copy("copy_openthread_system") { + sources = [ "${sl_openthread_root}/examples/platforms/openthread-system.h" ] + + outputs = + [ "${root_gen_dir}/include/openthread/platform/{{source_file_part}}" ] + } + + source_set("openthread_system") { + sources = + [ "${root_gen_dir}/include/openthread/platform/openthread-system.h" ] + deps = [ ":copy_openthread_system" ] + } + + source_set("libopenthread-platform") { + sources = [ "${sl_openthread_root}/examples/platforms/openthread-system.h" ] + + public_deps = [ ":openthread_system" ] + + public_configs = [ ":libopenthread-platform_config" ] + } + + config("openthread_efr32_config") { + defines = [ + "RADIO_CONFIG_DMP_SUPPORT=1", + "${efr32_board}=1", + "${efr32_mcu}", + "USE_SL_THREAD_CERT_LIB", + "OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-efr32-config-check.h\"", + ] + + include_dirs = [ + "${chip_root}/examples/platform/efr32", + "${sdk_support_root}/matter/efr32/${efr32_family}/${efr32_board}", + "${sl_ot_efr32_root}/src/src", + "${sl_openthread_root}/src/", + ] + } + + source_set("openthread_core_config_efr32") { + sources = [ + "${sl_openthread_root}/src/cli/cli_config.h", + "${sl_ot_efr32_root}/src/src/openthread-core-efr32-config-check.h", + "${sl_ot_efr32_root}/src/src/openthread-core-efr32-config.h", + ] + + public_deps = [ + ":libopenthread-platform", + "${efr32_sdk_build_root}:efr32_sdk", + ] + + public_configs = [ ":openthread_efr32_config" ] + } + + source_set("ot-efr32-cert") { + sources = [ + "${sl_openthread_root}/examples/apps/cli/cli_uart.cpp", + "${sl_openthread_root}/src/cli/cli.cpp", + "${sl_openthread_root}/src/cli/cli.hpp", + "${sl_openthread_root}/src/cli/cli_coap.cpp", + "${sl_openthread_root}/src/cli/cli_coap.hpp", + "${sl_openthread_root}/src/cli/cli_coap_secure.cpp", + "${sl_openthread_root}/src/cli/cli_coap_secure.hpp", + "${sl_openthread_root}/src/cli/cli_commissioner.cpp", + "${sl_openthread_root}/src/cli/cli_commissioner.hpp", + "${sl_openthread_root}/src/cli/cli_config.h", + "${sl_openthread_root}/src/cli/cli_dataset.cpp", + "${sl_openthread_root}/src/cli/cli_dataset.hpp", + "${sl_openthread_root}/src/cli/cli_history.cpp", + "${sl_openthread_root}/src/cli/cli_history.hpp", + "${sl_openthread_root}/src/cli/cli_joiner.cpp", + "${sl_openthread_root}/src/cli/cli_joiner.hpp", + "${sl_openthread_root}/src/cli/cli_network_data.cpp", + "${sl_openthread_root}/src/cli/cli_network_data.hpp", + "${sl_openthread_root}/src/cli/cli_output.cpp", + "${sl_openthread_root}/src/cli/cli_output.hpp", + "${sl_openthread_root}/src/cli/cli_srp_client.cpp", + "${sl_openthread_root}/src/cli/cli_srp_client.hpp", + "${sl_openthread_root}/src/cli/cli_srp_server.cpp", + "${sl_openthread_root}/src/cli/cli_srp_server.hpp", + "${sl_openthread_root}/src/cli/cli_tcp.cpp", + "${sl_openthread_root}/src/cli/cli_tcp.hpp", + "${sl_openthread_root}/src/cli/cli_udp.cpp", + "${sl_openthread_root}/src/cli/cli_udp.hpp", + "${sl_openthread_root}/src/cli/x509_cert_key.hpp", + ] + + public_configs = [ + ":openthread_efr32_config", + ":libopenthread-platform_config", + ] + + public_deps = [ + ":libopenthread-platform", + ":openthread_core_config_efr32", + "${segger_rtt_root}:segger_rtt", + "${sl_openthread_root}/include/openthread:openthread", + "${sl_openthread_root}/src/core/:libopenthread_core_headers", + ] + + deps = [ "${efr32_sdk_build_root}:efr32_sdk" ] + + # selected thread device type FTD or MTD + XTD = "ftd" + if (!chip_openthread_ftd) { + XTD = "mtd" + } + + public_configs += [ "${sl_openthread_root}:openthread_${XTD}_config" ] + + libs = [ + "${sl_ot_efr32_root}/libs/libsl_ot_stack_${XTD}_${efr32_family}_gcc.a", + "${sl_ot_efr32_root}/libs/libsl_platform_${XTD}_dmp_${efr32_family}_gcc.a", + ] + } +} diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index e4af7e65333a28..727ecea7acd5ef 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -24,6 +24,9 @@ declare_args() { # Location of the efr32 SDK. efr32_sdk_root = "${chip_root}/third_party/silabs/gecko_sdk" sdk_support_root = "${chip_root}/third_party/silabs/matter_support" + + #Build openthread with prebuilt silabs lib + use_silabs_thread_lib = false enable_openthread_cli = true kvs_max_entries = 75 From 08f09832df5c30ab37267f86c6919f8b23bdfbfb Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 15 Aug 2022 21:52:28 -0700 Subject: [PATCH 028/115] Update cherry-picks.yaml --- .github/workflows/cherry-picks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cherry-picks.yaml b/.github/workflows/cherry-picks.yaml index 89b8a74cc6aedf..b3ff4d58c2c12d 100644 --- a/.github/workflows/cherry-picks.yaml +++ b/.github/workflows/cherry-picks.yaml @@ -14,9 +14,9 @@ jobs: (github.event.pull_request.merged == true) && ( (contains(github.event.pull_request.labels.*.name, 'sve')) - (contains(github.event.pull_request.labels.*.name, 'spec')) - (contains(github.event.pull_request.labels.*.name, 'request sve')) - (contains(github.event.pull_request.labels.*.name, 'cert blocker')) + || (contains(github.event.pull_request.labels.*.name, 'spec')) + || (contains(github.event.pull_request.labels.*.name, 'request sve')) + || (contains(github.event.pull_request.labels.*.name, 'cert blocker')) ) steps: - name: Checkout From 5a052078c8a82cb062974130527b477ca71582e7 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Tue, 16 Aug 2022 17:17:46 +0800 Subject: [PATCH 029/115] inet: fix lwIP UDPEndpoint crash on large packets (#21897) --- src/inet/UDPEndPointImplLwIP.cpp | 56 +++++++++++++++----------------- src/inet/UDPEndPointImplLwIP.h | 23 +------------ 2 files changed, 27 insertions(+), 52 deletions(-) diff --git a/src/inet/UDPEndPointImplLwIP.cpp b/src/inet/UDPEndPointImplLwIP.cpp index ad5f25361e40cd..2a46a64217cc20 100644 --- a/src/inet/UDPEndPointImplLwIP.cpp +++ b/src/inet/UDPEndPointImplLwIP.cpp @@ -276,12 +276,10 @@ void UDPEndPointImplLwIP::Free() Release(); } -void UDPEndPointImplLwIP::HandleDataReceived(System::PacketBufferHandle && msg) +void UDPEndPointImplLwIP::HandleDataReceived(System::PacketBufferHandle && msg, IPPacketInfo * pktInfo) { if ((mState == State::kListening) && (OnMessageReceived != nullptr)) { - const IPPacketInfo * pktInfo = GetPacketInfo(msg); - if (pktInfo != nullptr) { const IPPacketInfo pktInfoCopy = *pktInfo; // copy the address info so that the app can free the @@ -296,6 +294,7 @@ void UDPEndPointImplLwIP::HandleDataReceived(System::PacketBufferHandle && msg) } } } + Platform::Delete(pktInfo); } CHIP_ERROR UDPEndPointImplLwIP::GetPCB(IPAddressType addrType) @@ -364,31 +363,36 @@ void UDPEndPointImplLwIP::LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb { Platform::UniquePtr pbufFreeGuard(p); UDPEndPointImplLwIP * ep = static_cast(arg); - IPPacketInfo * pktInfo = nullptr; if (ep->mState == State::kClosed) { return; } + // Raw pointer is required for passing into lambda. + // The memory life cycle of `pktInfo` is manually managed. + IPPacketInfo * pktInfo = Platform::New(); + if (pktInfo == nullptr) + { + ChipLogError(Inet, "Cannot allocate packet info"); + return; + } + // TODO: Skip copying the buffer if the pbuf already meets the PacketBuffer memory model - System::PacketBufferHandle buf = System::PacketBufferHandle::New(p->tot_len); + System::PacketBufferHandle buf = System::PacketBufferHandle::New(p->tot_len, 0); if (buf.IsNull() || pbuf_copy_partial(p, buf->Start(), p->tot_len, 0) != p->tot_len) { ChipLogError(Inet, "Cannot copy received pbuf of size %u", p->tot_len); + return; } buf->SetDataLength(p->tot_len); - pktInfo = GetPacketInfo(buf); - if (pktInfo != nullptr) - { - pktInfo->SrcAddress = IPAddress(*addr); - pktInfo->DestAddress = IPAddress(*ip_current_dest_addr()); - pktInfo->Interface = InterfaceId(ip_current_netif()); - pktInfo->SrcPort = port; - pktInfo->DestPort = pcb->local_port; - } + pktInfo->SrcAddress = IPAddress(*addr); + pktInfo->DestAddress = IPAddress(*ip_current_dest_addr()); + pktInfo->Interface = InterfaceId(ip_current_netif()); + pktInfo->SrcPort = port; + pktInfo->DestPort = pcb->local_port; - CHIP_ERROR err = ep->GetSystemLayer().ScheduleLambda([ep, p = System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(buf)] { - ep->HandleDataReceived(System::PacketBufferHandle::Adopt(p)); + CHIP_ERROR err = ep->GetSystemLayer().ScheduleLambda([ep, p = System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(buf), pktInfo] { + ep->HandleDataReceived(System::PacketBufferHandle::Adopt(p), pktInfo); }); if (err == CHIP_NO_ERROR) @@ -396,6 +400,12 @@ void UDPEndPointImplLwIP::LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb // If ScheduleLambda() succeeded, it has ownership of the buffer, so we need to release it (without freeing it). static_cast(std::move(buf).UnsafeRelease()); } + else + { + // If ScheduleLambda() succeeded, `pktInfo` will be deleted in `HandleDataReceived`. + // Otherwise we delete it here. + Platform::Delete(pktInfo); + } } CHIP_ERROR UDPEndPointImplLwIP::SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback) @@ -499,19 +509,5 @@ struct netif * UDPEndPointImplLwIP::FindNetifFromInterfaceId(InterfaceId aInterf return (lRetval); } -IPPacketInfo * UDPEndPointImplLwIP::GetPacketInfo(const System::PacketBufferHandle & aBuffer) -{ - if (!aBuffer->EnsureReservedSize(sizeof(IPPacketInfo) + 3)) - { - return nullptr; - } - - uintptr_t lStart = (uintptr_t) aBuffer->Start(); - uintptr_t lPacketInfoStart = lStart - sizeof(IPPacketInfo); - - // Align to a 4-byte boundary - return reinterpret_cast(lPacketInfoStart & ~(sizeof(uint32_t) - 1)); -} - } // namespace Inet } // namespace chip diff --git a/src/inet/UDPEndPointImplLwIP.h b/src/inet/UDPEndPointImplLwIP.h index accb18bfcb7dbc..7bc523c913ff3a 100644 --- a/src/inet/UDPEndPointImplLwIP.h +++ b/src/inet/UDPEndPointImplLwIP.h @@ -55,28 +55,7 @@ class UDPEndPointImplLwIP : public UDPEndPoint, public EndPointStateLwIP static struct netif * FindNetifFromInterfaceId(InterfaceId aInterfaceId); static CHIP_ERROR LwIPBindInterface(struct udp_pcb * aUDP, InterfaceId intfId); - void HandleDataReceived(chip::System::PacketBufferHandle && aBuffer); - - /** - * Get LwIP IP layer source and destination addressing information. - * - * @param[in] aBuffer The packet buffer containing the IP message. - * - * @returns a pointer to the address information on success; otherwise, - * nullptr if there is insufficient space in the packet for - * the address information. - * - * When using LwIP information about the packet is 'hidden' in the reserved space before the start of the - * data in the packet buffer. This is necessary because the system layer events only have two arguments, - * which in this case are used to convey the pointer to the end point and the pointer to the buffer. - * - * In most cases this trick of storing information before the data works because the first buffer in an - * LwIP IP message contains the space that was used for the Ethernet/IP/UDP headers. However, given the - * current size of the IPPacketInfo structure (40 bytes), it is possible for there to not be enough room - * to store the structure along with the payload in a single packet buffer. In practice, this should only - * happen for extremely large IPv4 packets that arrive without an Ethernet header. - */ - static IPPacketInfo * GetPacketInfo(const chip::System::PacketBufferHandle & aBuffer); + void HandleDataReceived(System::PacketBufferHandle && msg, IPPacketInfo * pktInfo); CHIP_ERROR GetPCB(IPAddressType addrType4); static void LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb, struct pbuf * p, const ip_addr_t * addr, u16_t port); From b34bdb730dbccdb0632bf6185f61904bcadccca9 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:18:00 +0530 Subject: [PATCH 030/115] Sync light sensor device types with specs (#21901) --- .../zcl/data-model/chip/matter-devices.xml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 2231d822ff5f60..b20ec5df7678c3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1281,23 +1281,11 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - + + ILLUM_MEASURED_VALUE ILLUM_MIN_MEASURED_VALUE ILLUM_MAX_MEASURED_VALUE From 6d46b2303b90e7023b5d91df665fd8e26e514cdd Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:18:32 +0530 Subject: [PATCH 031/115] Sync occupancy sensor device type with specs (#21902) --- .../zcl/data-model/chip/matter-devices.xml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index b20ec5df7678c3..7592fe70b328c2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1312,23 +1312,11 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - + + OCCUPANCY OCCUPANCY_SENSOR_TYPE From cd089f341050c5936beaa9b43d5c93bc379c9572 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:19:00 +0530 Subject: [PATCH 032/115] Sync contact sensor device types with spec (#21900) --- .../zcl/data-model/chip/matter-devices.xml | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7592fe70b328c2..c9e5e084c5ec9c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1242,23 +1242,9 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - + + STATE_VALUE + From 57f73978570dc37a80fea51a15a0fc49793d325d Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:22:11 +0530 Subject: [PATCH 033/115] Sync power source device type with specs (#21914) --- .../zcl/data-model/chip/matter-devices.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index c9e5e084c5ec9c..f4071f7581c9e3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -91,22 +91,12 @@ limitations under the License. 0x0103 0x0011 - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - - BINDING - From c7e40a395710f74a13ad2f129995e4f0ef2637db Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:22:50 +0530 Subject: [PATCH 034/115] Sync aggregator device type with specs (#21918) --- .../zcl/data-model/chip/matter-devices.xml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index f4071f7581c9e3..360145e583e580 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -155,29 +155,19 @@ limitations under the License. - MA-bridge + MA-aggregator CHIP - Matter Bridge + Matter Aggregator 0x0103 0x000e - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - - BINDING - - + From 509b8b47e1f360329fbd794d7165ca6fcaf80f2f Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:23:14 +0530 Subject: [PATCH 035/115] Sync heating/cooling unit device type with specs (#21921) --- .../zcl/data-model/chip/matter-devices.xml | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 360145e583e580..712ab0fe1320b5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1710,7 +1710,7 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING @@ -1726,7 +1726,27 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + AddSceneResponse + ViewScene + ViewSceneResponse + RemoveScene + RemoveSceneResponse + RemoveAllScenes + RemoveAllScenesResponse + StoreScene + StoreSceneResponse + RecallScene + GetSceneMembership + GetSceneMembershipResponse + + From 24cd72252e942b0e58bb58c1fdb73a8e6639a238 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 16 Aug 2022 12:54:28 -0400 Subject: [PATCH 036/115] Remove mRemoteMRPConfig member from OperationalSessionSetup (#21924) --- src/app/OperationalSessionSetup.cpp | 22 ++++++++++++++-------- src/app/OperationalSessionSetup.h | 6 +----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 11ceb8bb6c0e26..3a0d124297a091 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -125,7 +125,12 @@ void OperationalSessionSetup::Connect(Callback::Callback * on isConnected = AttachToExistingSecureSession(); if (!isConnected) { - err = EstablishConnection(); + // We should not actually every be in be in State::HasAddress. This + // is because in the same call that we moved to State::HasAddress + // we either move to State::Connecting or call + // DequeueConnectionCallbacks with an error thus releasing + // ourselves before any call would reach this section of code. + err = CHIP_ERROR_INCORRECT_STATE; } break; @@ -179,13 +184,11 @@ void OperationalSessionSetup::UpdateDeviceData(const Transport::PeerAddress & ad CHIP_ERROR err = CHIP_NO_ERROR; mDeviceAddress = addr; - mRemoteMRPConfig = config; - // Initialize CASE session state with any MRP parameters that DNS-SD has provided. // It can be overridden by CASE session protocol messages that include MRP parameters. if (mCASEClient) { - mCASEClient->SetRemoteMRPIntervals(mRemoteMRPConfig); + mCASEClient->SetRemoteMRPIntervals(config); } if (mState == State::ResolvingAddress) @@ -194,7 +197,7 @@ void OperationalSessionSetup::UpdateDeviceData(const Transport::PeerAddress & ad mInitParams.sessionManager->UpdateAllSessionsPeerAddress(mPeerId, addr); if (!mPerformingAddressUpdate) { - err = EstablishConnection(); + err = EstablishConnection(config); if (err != CHIP_NO_ERROR) { DequeueConnectionCallbacks(err); @@ -216,14 +219,14 @@ void OperationalSessionSetup::UpdateDeviceData(const Transport::PeerAddress & ad // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } -CHIP_ERROR OperationalSessionSetup::EstablishConnection() +CHIP_ERROR OperationalSessionSetup::EstablishConnection(const ReliableMessageProtocolConfig & config) { mCASEClient = mInitParams.clientPool->Allocate(CASEClientInitParams{ mInitParams.sessionManager, mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, mInitParams.exchangeMgr, mFabricTable, mInitParams.groupDataProvider, mInitParams.mrpLocalConfig }); ReturnErrorCodeIf(mCASEClient == nullptr, CHIP_ERROR_NO_MEMORY); - CHIP_ERROR err = mCASEClient->EstablishSession(mPeerId, mDeviceAddress, mRemoteMRPConfig, this); + CHIP_ERROR err = mCASEClient->EstablishSession(mPeerId, mDeviceAddress, config, this); if (err != CHIP_NO_ERROR) { CleanupCASEClient(); @@ -334,7 +337,10 @@ void OperationalSessionSetup::CleanupCASEClient() void OperationalSessionSetup::OnSessionReleased() { - MoveToState(State::HasAddress); + // This is unlikely to be called since within the same call that we get SessionHandle we + // then call DequeueConnectionCallbacks which releases `this`. If this is called, and we + // we have any callbacks we will just send an error. + DequeueConnectionCallbacks(CHIP_ERROR_INCORRECT_STATE); } OperationalSessionSetup::~OperationalSessionSetup() diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index d0db84f6c69ce1..cde2fddc6dac0b 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -208,8 +208,6 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, */ void Connect(Callback::Callback * onConnection, Callback::Callback * onFailure); - bool IsConnecting() const { return mState == State::Connecting; } - bool IsForAddressUpdate() const { return mPerformingAddressUpdate; } //////////// SessionEstablishmentDelegate Implementation /////////////// @@ -288,11 +286,9 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, /// This is used when a node address is required. chip::AddressResolve::NodeLookupHandle mAddressLookupHandle; - ReliableMessageProtocolConfig mRemoteMRPConfig = GetDefaultMRPConfig(); - bool mPerformingAddressUpdate = false; - CHIP_ERROR EstablishConnection(); + CHIP_ERROR EstablishConnection(const ReliableMessageProtocolConfig & config); /* * This checks to see if an existing CASE session exists to the peer within the SessionManager From 12c8c0a75176d5e23e34818b25f29d506c1cab6b Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 00:28:08 +0530 Subject: [PATCH 037/115] Sync fan device type with specs (#21923) * Sync fan device type with specs * Addressed review comments --- .../zcl/data-model/chip/matter-devices.xml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 712ab0fe1320b5..0de5946644ac62 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1816,6 +1816,41 @@ limitations under the License. + + MA-fan + CHIP + Matter Fan + 0x0103 + 0x002B + + + IDENTIFY_TIME + IDENTIFY_TYPE + Identify + TriggerEffect + + + DEVICE_TYPE_LIST + SERVER_LIST + CLIENT_LIST + PARTS_LIST + + + GROUP_NAME_SUPPORT + AddGroup + AddGroupResponse + ViewGroup + ViewGroupResponse + GetGroupMembership + GetGroupMembershipResponse + RemoveGroup + RemoveGroupResponse + RemoveAllGroups + AddGroupIfIdentifying + + + + MA-casting-videoplayer CHIP From 3197e926215b7a44011f2b5867f956e3f316af3d Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:00:48 -0400 Subject: [PATCH 038/115] [EFR32] Destroy PSA key_id if exists. (#21920) * [EFR32] Recover from PSA keygen error. * [EFR32] Destroy existing PSA key_id before re-using it. --- src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp | 73 ++++++++++++------- .../EFR32/Efr32PsaOperationalKeystore.cpp | 7 -- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp index b5141dedf4eeb2..add77c1be63e51 100644 --- a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp +++ b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp @@ -111,6 +111,7 @@ static EFR32OpaqueKeyId opaque_key_id_from_psa(mbedtls_svc_key_id_t id) EFR32OpaqueKeypair::EFR32OpaqueKeypair() { + psa_crypto_init(); // Avoid having a reference to PSA datatypes in the signature of this class mContext = MemoryCalloc(1, sizeof(mbedtls_svc_key_id_t)); } @@ -125,24 +126,25 @@ EFR32OpaqueKeypair::~EFR32OpaqueKeypair() } } -CHIP_ERROR EFR32OpaqueKeypair::Load(EFR32OpaqueKeyId key_id) +CHIP_ERROR EFR32OpaqueKeypair::Load(EFR32OpaqueKeyId opaque_id) { - CHIP_ERROR error = CHIP_NO_ERROR; - psa_status_t status = PSA_ERROR_BAD_STATE; + CHIP_ERROR error = CHIP_NO_ERROR; + psa_status_t status = PSA_ERROR_BAD_STATE; + mbedtls_svc_key_id_t key_id = 0; - VerifyOrExit(key_id != kEFR32OpaqueKeyIdVolatile, error = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(is_opaque_key_valid(key_id), error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(opaque_id != kEFR32OpaqueKeyIdVolatile, error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(is_opaque_key_valid(opaque_id), error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(mContext, error = CHIP_ERROR_INCORRECT_STATE); - psa_crypto_init(); - // If the object contains a volatile key, clean it up before reusing the object storage if (mHasKey && !mIsPersistent) { Delete(); } - status = psa_export_public_key(psa_key_id_from_opaque(key_id), mPubkeyRef, mPubkeySize, &mPubkeyLength); + key_id = psa_key_id_from_opaque(opaque_id); + + status = psa_export_public_key(key_id, mPubkeyRef, mPubkeySize, &mPubkeyLength); if (status == PSA_ERROR_DOES_NOT_EXIST) { @@ -156,7 +158,7 @@ CHIP_ERROR EFR32OpaqueKeypair::Load(EFR32OpaqueKeyId key_id) }); // Store the key ID and mark the key as valid - *(mbedtls_svc_key_id_t *) mContext = psa_key_id_from_opaque(key_id); + *(mbedtls_svc_key_id_t *) mContext = key_id; mHasKey = true; mIsPersistent = true; @@ -169,27 +171,40 @@ CHIP_ERROR EFR32OpaqueKeypair::Load(EFR32OpaqueKeyId key_id) return error; } -CHIP_ERROR EFR32OpaqueKeypair::Create(EFR32OpaqueKeyId key_id, EFR32OpaqueKeyUsages usage) +CHIP_ERROR EFR32OpaqueKeypair::Create(EFR32OpaqueKeyId opaque_id, EFR32OpaqueKeyUsages usage) { - CHIP_ERROR error = CHIP_NO_ERROR; - psa_status_t status = PSA_ERROR_BAD_STATE; - psa_key_attributes_t attr = PSA_KEY_ATTRIBUTES_INIT; + CHIP_ERROR error = CHIP_NO_ERROR; + psa_status_t status = PSA_ERROR_BAD_STATE; + psa_key_attributes_t attr = PSA_KEY_ATTRIBUTES_INIT; + mbedtls_svc_key_id_t key_id = 0; - VerifyOrExit(is_opaque_key_valid(key_id), error = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(is_opaque_key_valid(opaque_id), error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(mContext, error = CHIP_ERROR_INCORRECT_STATE); - psa_crypto_init(); - - if (key_id == kEFR32OpaqueKeyIdVolatile) + if (opaque_id == kEFR32OpaqueKeyIdVolatile) { psa_set_key_lifetime( &attr, PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_LIFETIME_VOLATILE, PSA_CRYPTO_LOCATION_FOR_DEVICE)); } else { + psa_key_handle_t key_handle; + + key_id = psa_key_id_from_opaque(opaque_id); + + // Check if the key already exists + int ret = psa_open_key(key_id, &key_handle); + if (PSA_SUCCESS == ret) + { + // WARNING: Existing key! This is caused by a problem in the key store. + // The key must be destroyed, otherwhise the device won't recover. + ChipLogError(Crypto, "WARNING: PSA key recycled: %d / %ld", opaque_id, key_id); + psa_destroy_key(key_id); + } + + psa_set_key_id(&attr, key_id); psa_set_key_lifetime( &attr, PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_LIFETIME_PERSISTENT, PSA_CRYPTO_LOCATION_FOR_DEVICE)); - psa_set_key_id(&attr, psa_key_id_from_opaque(key_id)); } switch (usage) @@ -209,21 +224,20 @@ CHIP_ERROR EFR32OpaqueKeypair::Create(EFR32OpaqueKeyId key_id, EFR32OpaqueKeyUsa break; } - status = psa_generate_key(&attr, (mbedtls_svc_key_id_t *) mContext); + status = psa_generate_key(&attr, &key_id); VerifyOrExit(status == PSA_SUCCESS, { _log_PSA_error(status); error = CHIP_ERROR_INTERNAL; }); // Export the public key - status = psa_export_public_key(*(mbedtls_svc_key_id_t *) mContext, mPubkeyRef, mPubkeySize, &mPubkeyLength); - - if (status != PSA_SUCCESS) + status = psa_export_public_key(key_id, mPubkeyRef, mPubkeySize, &mPubkeyLength); + if (PSA_SUCCESS != status) { _log_PSA_error(status); // Key generation succeeded, but pubkey export did not. To avoid // memory leaks, delete the generated key before returning the error - psa_destroy_key(*(mbedtls_svc_key_id_t *) mContext); + psa_destroy_key(key_id); error = CHIP_ERROR_INTERNAL; goto exit; } @@ -234,10 +248,16 @@ CHIP_ERROR EFR32OpaqueKeypair::Create(EFR32OpaqueKeyId key_id, EFR32OpaqueKeyUsa exit: psa_reset_key_attributes(&attr); - - if (error != CHIP_NO_ERROR && mContext) + if (mContext) { - *(mbedtls_svc_key_id_t *) mContext = 0; + if (CHIP_NO_ERROR == error) + { + *(mbedtls_svc_key_id_t *) mContext = key_id; + } + else + { + *(mbedtls_svc_key_id_t *) mContext = 0; + } } return error; } @@ -281,6 +301,7 @@ CHIP_ERROR EFR32OpaqueKeypair::Sign(const uint8_t * msg, size_t msg_len, uint8_t CHIP_ERROR error = CHIP_NO_ERROR; psa_status_t status = PSA_ERROR_BAD_STATE; + VerifyOrExit(mContext, error = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(mHasKey, error = CHIP_ERROR_INCORRECT_STATE); status = psa_sign_message(*(mbedtls_svc_key_id_t *) mContext, PSA_ALG_ECDSA(PSA_ALG_SHA_256), msg, msg_len, output, output_size, diff --git a/src/platform/EFR32/Efr32PsaOperationalKeystore.cpp b/src/platform/EFR32/Efr32PsaOperationalKeystore.cpp index 309df0296a1011..de983e247e6782 100644 --- a/src/platform/EFR32/Efr32PsaOperationalKeystore.cpp +++ b/src/platform/EFR32/Efr32PsaOperationalKeystore.cpp @@ -236,13 +236,6 @@ CHIP_ERROR Efr32PsaOperationalKeystore::NewOpKeypairForFabric(FabricIndex fabric // Create new key on the old or found key ID error = mPendingKeypair->Create(id, EFR32OpaqueKeyUsages::ECDSA_P256_SHA256); - if (error != CHIP_NO_ERROR) - { - // Try deleting and recreating this key since keys don't get wiped on factory erase yet - mPendingKeypair->Delete(); - error = mPendingKeypair->Create(id, EFR32OpaqueKeyUsages::ECDSA_P256_SHA256); - } - if (error != CHIP_NO_ERROR) { ResetPendingKey(); From 0691bbcbb26f7fa39d90fc54c35fb66fe12196c5 Mon Sep 17 00:00:00 2001 From: Hrishikesh Dhayagude Date: Wed, 17 Aug 2022 01:40:54 +0530 Subject: [PATCH 039/115] Add Espressif's documentation entry into the top-level README (#21929) --- docs/guides/README.md | 1 + docs/guides/esp32/README.md | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/guides/README.md b/docs/guides/README.md index 34b71306f7aedd..09f3f9c1c4c3e7 100644 --- a/docs/guides/README.md +++ b/docs/guides/README.md @@ -4,6 +4,7 @@ - [Android - Building](./android_building.md) - [Apple - Testing with iPhone, iPad, macOS, Apple TV, HomePod, Watch, etc](./darwin.md) +- [Espressif (ESP32) - Getting Started Guide](./esp32/README.md) - [Infineon - Software Update](./infineon_p6_software_update.md) - [Linux - Simulated Devices](./simulated_device_linux.md) - [mbedOS - Adding a new target](./mbedos_add_new_target.md) diff --git a/docs/guides/esp32/README.md b/docs/guides/esp32/README.md index f73718941a5067..0cdead51a8c289 100644 --- a/docs/guides/esp32/README.md +++ b/docs/guides/esp32/README.md @@ -1,7 +1,10 @@ -## ESP32 Guides +## Espressif (ESP32) Getting Started Guide --- +Please follow the steps below to create and test a fully functional Matter +example on ESP32 series of SoCs + - [Setup ESP-IDF and CHIP Environment](setup_idf_chip.md) - [Using factory data from NVS](factory_data.md) - [Building and commissioning the application](build_app_and_commission.md) From a3cb409a1dde11743cd0977ac75a4952090196c4 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Wed, 17 Aug 2022 04:54:06 +0530 Subject: [PATCH 040/115] Modified script Aug 16 (#21925) * Modified tests TC-DGWIFI-1.1 TC-DLOG-1.1 TC-FLABEL-1.1 TC-FLABEL-2.1 TC-G-1.1 TC-G-2.1 TC-ILL-2.2 TC-LCFG-1.1 TC-LTIME-1.1 TC-LUNIT-1.1 TC-LVL-1.1 TC-OCC-2.1 TC-OCC-2.3 TC-PRS-2.2 TC-PScFG-2.1 TC-SWTCH-1.1 TC-ULABEL-2.1 Modified Manual scripts TC-ACL-2.4 TC-BOOL-2.2 * Auto generated files * Restyled by whitespace * Restyled by prettier-json * Restyled by prettier-yaml * Modified TC-LVL-6.1 Fixed Lint code error * Auto generated files * Disabled TC-G-2.1 test from js file * Auto generated files * Disabled test TC-FLABEL-2.1 in darwin json file * Auto generated files * 1. Updating top level pics for CADMIN test scripts Co-authored-by: Restyled.io Co-authored-by: kvikrambhat --- .../templates/tests/ciTests.json | 4 +- src/app/tests/suites/certification/PICS.yaml | 3 + .../suites/certification/Test_TC_ACL_2_4.yaml | 234 +- .../certification/Test_TC_BOOL_2_2.yaml | 4 +- .../certification/Test_TC_CADMIN_1_1.yaml | 1 + .../certification/Test_TC_CADMIN_1_10.yaml | 1 + .../certification/Test_TC_CADMIN_1_11.yaml | 1 + .../certification/Test_TC_CADMIN_1_12.yaml | 2 + .../certification/Test_TC_CADMIN_1_13.yaml | 1 + .../certification/Test_TC_CADMIN_1_14.yaml | 2 + .../certification/Test_TC_CADMIN_1_16.yaml | 1 + .../certification/Test_TC_CADMIN_1_17.yaml | 1 + .../certification/Test_TC_CADMIN_1_18.yaml | 1 + .../certification/Test_TC_CADMIN_1_2.yaml | 1 + .../certification/Test_TC_CADMIN_1_20.yaml | 1 + .../certification/Test_TC_CADMIN_1_21.yaml | 1 + .../certification/Test_TC_CADMIN_1_23.yaml | 1 + .../certification/Test_TC_CADMIN_1_4.yaml | 1 + .../certification/Test_TC_CADMIN_1_6.yaml | 1 + .../certification/Test_TC_CADMIN_1_7.yaml | 1 + .../certification/Test_TC_CADMIN_1_8.yaml | 1 + .../suites/certification/Test_TC_CC_1_1.yaml | 2 +- .../certification/Test_TC_DGWIFI_1_1.yaml | 176 +- .../certification/Test_TC_DLOG_1_1.yaml | 120 +- .../certification/Test_TC_FLABEL_1_1.yaml | 117 +- .../certification/Test_TC_FLABEL_2_1.yaml | 93 +- .../suites/certification/Test_TC_G_1_1.yaml | 128 +- .../suites/certification/Test_TC_G_2_1.yaml | 68 +- .../suites/certification/Test_TC_ILL_2_2.yaml | 108 +- .../certification/Test_TC_LCFG_1_1.yaml | 143 +- .../certification/Test_TC_LTIME_1_2.yaml | 157 +- .../certification/Test_TC_LUNIT_1_2.yaml | 131 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 16 +- .../suites/certification/Test_TC_LVL_6_1.yaml | 20 +- .../suites/certification/Test_TC_OCC_2_1.yaml | 2 +- .../suites/certification/Test_TC_OCC_2_3.yaml | 54 +- .../certification/Test_TC_OPCREDS_1_2.yaml | 20 +- .../suites/certification/Test_TC_PRS_2_2.yaml | 65 +- .../certification/Test_TC_PSCFG_2_1.yaml | 29 +- .../certification/Test_TC_SWTCH_1_1.yaml | 79 +- .../certification/Test_TC_ULABEL_2_1.yaml | 32 +- .../tests/suites/certification/ci-pics-values | 1 + src/app/tests/suites/ciTests.json | 36 +- src/app/tests/suites/manualTests.json | 31 +- .../chip-tool/zap-generated/test/Commands.h | 4978 ++++++++++------- .../zap-generated/test/Commands.h | 3644 ++++++++++-- 46 files changed, 7073 insertions(+), 3441 deletions(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 5be170ac3d8bba..fd8f8840d162a0 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -18,6 +18,8 @@ "Test_TC_APPLAUNCHER_3_8", "Test_TC_APPLAUNCHER_3_9", "Test_TC_BINFO_2_1", - "Test_TC_SWTCH_2_1" + "Test_TC_SWTCH_2_1", + "Test_TC_G_2_1", + "Test_TC_FLABEL_2_1" ] } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index f8c913f271fea4..1a05e449616317 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -1783,6 +1783,9 @@ PICS: id: LTIME.C.A0000.24HR #Unit Localization Cluster + - label: "Does the device implement different units of temperature ?" + id: LUNIT.S.F00 + - label: "Does the DUT (Server) support TemperatureUnit attribute?" id: LUNIT.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index bcb20c10ac2f43..62b04fb0ab7a70 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -88,10 +88,10 @@ tests: 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, + { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 + On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = [1658323877.660890][2502:2507] CHIP:DMG: { @@ -176,7 +176,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements InteractionModelRevision = 1 [1658229676.712083][4872:4878] CHIP:DMG: } [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 @@ -235,9 +235,9 @@ tests: 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{"fabricIndex": 1, "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = [1658226959.554706][4736:4741] CHIP:DMG: [ [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = @@ -313,7 +313,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 9800.959293][4892:4897] CHIP:DMG: [1658229800.959325][4892:4897] CHIP:DMG: ], [1658229800.959399][4892:4897] CHIP:DMG: @@ -377,8 +377,8 @@ tests: Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool) , Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + On TH(Chiptool)1, Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = [1657276276.709058][2297:2302] CHIP:DMG: { @@ -461,7 +461,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 @@ -535,8 +535,8 @@ tests: DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = @@ -618,7 +618,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278352.938811][2258:2263] CHIP:DMG: [1657278352.938840][2258:2263] CHIP:DMG: }, @@ -686,10 +686,10 @@ tests: Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 + On TH(Chiptool) 1, Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = @@ -771,7 +771,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null [1656656511.643560][2994:2999] CHIP:DMG: [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 @@ -819,10 +819,10 @@ tests: AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH(Chiptool) 1, Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = [1656507141.628515][3224:3229] CHIP:DMG: { @@ -890,7 +890,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507318.740283][3241:3246] CHIP:DMG: ], [1656507318.740346][3241:3246] CHIP:DMG: @@ -925,9 +925,9 @@ tests: (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 + On TH(Chiptool)1 , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = [1656507439.868671][3249:3254] CHIP:DMG: { @@ -994,7 +994,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507517.730614][3261:3266] CHIP:DMG: [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, @@ -1027,7 +1027,7 @@ tests: verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS + On TH(Chiptool)1, verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS [1656657490.002372][3078:3083] CHIP:DMG: [1656657490.002408][3078:3083] CHIP:DMG: ], @@ -1050,8 +1050,8 @@ tests: node IDs (stored as SUBJECTS) Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 + On TH(Chiptool)1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1120,7 +1120,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null [1656928460.992030][4255:4260] CHIP:DMG: ], [1656928460.992075][4255:4260] CHIP:DMG: [1656928460.992101][4255:4260] CHIP:DMG: SuppressResponse = true, @@ -1160,10 +1160,10 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = [1656509348.174272][3403:3408] CHIP:DMG: { @@ -1232,7 +1232,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509471.738046][3416:3421] CHIP:DMG: [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, [1656509471.738120][3416:3421] CHIP:DMG: InteractionModelRevision = 1 @@ -1267,7 +1267,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS + On TH(Chiptool)1, verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS [1656509737.166763][3434:3439] CHIP:DMG: [1656509737.166786][3434:3439] CHIP:DMG: ], [1656509737.166816][3434:3439] CHIP:DMG: @@ -1289,9 +1289,9 @@ tests: MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as null + On TH1(Chiptool) , Verify Successfully acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as null [1657542520.140869][3499:3504] CHIP:DMG: { [1657542520.140922][3499:3504] CHIP:DMG: AttributeStatusIBs = @@ -1357,7 +1357,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as TARGETS + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as TARGETS [1657542633.704684][3522:3527] CHIP:DMG: } [1657542633.705098][3522:3527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245792 @@ -1395,7 +1395,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - On TH(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. + On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = [1656594850.964954][4043:4048] CHIP:DMG: [ @@ -1436,11 +1436,11 @@ tests: field: null subsequent elements same as second element" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, + { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute value is list of AccessControlEntryStruct containing MAXENTRIES elements + On TH1(Chiptool) , Verify Successfully that acl attribute value is list of AccessControlEntryStruct containing MAXENTRIES elements [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = [1657617362.022190][8840:8845] CHIP:DMG: { @@ -1524,7 +1524,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing MAXENTRIES elements + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing MAXENTRIES elements [1657543165.385093][3592:3597] CHIP:DMG: } [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 [1657543165.385586][3592:3597] CHIP:TOO: ACL: 3 entries @@ -1559,10 +1559,10 @@ tests: AuthMode field: PASE (1) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements and Returns CONSTRAINT_ERROR (0x87) for second element path + On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements and Returns CONSTRAINT_ERROR (0x87) for second element path [1658475475.310438][3113:3119] CHIP:DMG: { [1658475475.310466][3113:3119] CHIP:DMG: AttributeStatusIBs = [1658475475.310500][3113:3119] CHIP:DMG: [ @@ -1676,7 +1676,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 1 element + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 1 element [1656914601.250655][3267:3272] CHIP:DMG: ], [1656914601.250709][3267:3272] CHIP:DMG: [1656914601.250746][3267:3272] CHIP:DMG: SuppressResponse = true, @@ -1704,10 +1704,10 @@ tests: (5) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements as Subject null and Target null for second element path Returns CONSTRAINT_ERROR (0x87) + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements as Subject null and Target null for second element path Returns CONSTRAINT_ERROR (0x87) [1658475916.602576][3151:3156] CHIP:DMG: WriteResponseMessage = [1658475916.602649][3151:3156] CHIP:DMG: { [1658475916.602684][3151:3156] CHIP:DMG: AttributeStatusIBs = @@ -1780,12 +1780,12 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Privilege for second element path Returns CONSTRAINT_ERROR (0x87) [1658476127.774933][3171:3176] CHIP:EM: Removed CHIP MessageCounter:240294498 from RetransTable on exchange 6954i @@ -1861,8 +1861,8 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]" 1 0 On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Authmode for second element path Returns CONSTRAINT_ERROR (0x87) @@ -1937,9 +1937,9 @@ tests: AuthMode field: CASE (2) Subjects field: [0] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) [1658476622.665126][3229:3234] CHIP:DMG: WriteClient moving to [ResponseRe] [1658476622.665195][3229:3234] CHIP:DMG: WriteResponseMessage = @@ -2012,11 +2012,11 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 1658476861.356730][3250:3255] CHIP:DMG: { [1658476861.356767][3250:3255] CHIP:DMG: AttributeStatusIBs = @@ -2088,8 +2088,8 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 8477037.056167][3264:3269] CHIP:DMG: { [1658477037.056200][3264:3269] CHIP:DMG: AttributePathIB = @@ -2158,10 +2158,10 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 658477229.869987][3634:3640] CHIP:EM: Removed CHIP MessageCounter:189477251 from RetransTable on exchange 22058i [1658477229.870031][3634:3640] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2232,9 +2232,9 @@ tests: AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) 1658477371.966712][3679:3684] CHIP:EM: Removed CHIP MessageCounter:138419251 from RetransTable on exchange 40076i [1658477371.966756][3679:3684] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2308,9 +2308,9 @@ tests: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) [1657617852.177018][8933:8938] CHIP:DMG: WriteResponseMessage = [1657617852.177055][8933:8938] CHIP:DMG: { @@ -2383,8 +2383,8 @@ tests: null Targets field: [{Endpoint: 65535}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1657617920.044059][8948:8953] CHIP:DMG: { [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = @@ -2456,8 +2456,8 @@ tests: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2532,8 +2532,8 @@ tests: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477583.616961][3701:3706] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477583.617072][3701:3706] CHIP:DMG: WriteResponseMessage = @@ -2608,8 +2608,8 @@ tests: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477662.415412][3710:3715] CHIP:EM: Removed CHIP MessageCounter:35384027 from RetransTable on exchange 6953i [1658477662.415452][3710:3715] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2682,47 +2682,35 @@ tests: is an empty list" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControl cluster ACL attribute value is an empty list since all ACL entries removed. - [1657618011.091198][8968:8973] CHIP:DMG: { - [1657618011.091228][8968:8973] CHIP:DMG: AttributeStatusIBs = - [1657618011.091272][8968:8973] CHIP:DMG: [ - [1657618011.091306][8968:8973] CHIP:DMG: AttributeStatusIB = - [1657618011.091348][8968:8973] CHIP:DMG: { - [1657618011.091383][8968:8973] CHIP:DMG: AttributePathIB = - [1657618011.091424][8968:8973] CHIP:DMG: { - [1657618011.091473][8968:8973] CHIP:DMG: Endpoint = 0x0, - [1657618011.091519][8968:8973] CHIP:DMG: Cluster = 0x1f, - [1657618011.091567][8968:8973] CHIP:DMG: Attribute = 0x0000_0000, - [1657618011.091612][8968:8973] CHIP:DMG: } - [1657618011.091663][8968:8973] CHIP:DMG: - [1657618011.091705][8968:8973] CHIP:DMG: StatusIB = - [1657618011.091748][8968:8973] CHIP:DMG: { - [1657618011.091790][8968:8973] CHIP:DMG: status = 0x00 (SUCCESS), - [1657618011.091832][8968:8973] CHIP:DMG: }, - [1657618011.091878][8968:8973] CHIP:DMG: - [1657618011.091915][8968:8973] CHIP:DMG: }, - [1657618011.091961][8968:8973] CHIP:DMG: - [1657618011.091994][8968:8973] CHIP:DMG: AttributeStatusIB = - [1657618011.092029][8968:8973] CHIP:DMG: { - [1657618011.092063][8968:8973] CHIP:DMG: AttributePathIB = - [1657618011.092103][8968:8973] CHIP:DMG: { - [1657618011.092149][8968:8973] CHIP:DMG: Endpoint = 0x0, - [1657618011.092194][8968:8973] CHIP:DMG: Cluster = 0x1f, - [1657618011.092239][8968:8973] CHIP:DMG: Attribute = 0x0000_0000, - [1657618011.092282][8968:8973] CHIP:DMG: ListIndex = Null, - [1657618011.092328][8968:8973] CHIP:DMG: } - [1657618011.092372][8968:8973] CHIP:DMG: - [1657618011.092416][8968:8973] CHIP:DMG: StatusIB = - [1657618011.092460][8968:8973] CHIP:DMG: { - [1657618011.092503][8968:8973] CHIP:DMG: status = 0x00 (SUCCESS), - [1657618011.092547][8968:8973] CHIP:DMG: }, - [1657618011.092586][8968:8973] CHIP:DMG: - [1657618011.092623][8968:8973] CHIP:DMG: }, - [1657618011.092661][8968:8973] CHIP:DMG: - [1657618011.092693][8968:8973] CHIP:DMG: ], - [1657618011.092736][8968:8973] CHIP:DMG: - [1657618011.092768][8968:8973] CHIP:DMG: InteractionModelRevision = 1 - [1657618011.092798][8968:8973] CHIP:DMG: } - [1657618011.092928][8968:8973] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write acl "[]" 1 0 + + On TH1(Chiptool) , Verify Successfully to AccessControl cluster ACL attribute value is an empty list since all ACL entries removed. + RetransTable on exchange 43997i + [1660632377.411062][3241:3246] CHIP:DMG: WriteClient moving to [ResponseRe] + [1660632377.411111][3241:3246] CHIP:DMG: WriteResponseMessage = + [1660632377.411137][3241:3246] CHIP:DMG: { + [1660632377.411159][3241:3246] CHIP:DMG: AttributeStatusIBs = + [1660632377.411190][3241:3246] CHIP:DMG: [ + [1660632377.411215][3241:3246] CHIP:DMG: AttributeStatusIB = + [1660632377.411248][3241:3246] CHIP:DMG: { + [1660632377.411277][3241:3246] CHIP:DMG: AttributePathIB = + [1660632377.411313][3241:3246] CHIP:DMG: { + [1660632377.411350][3241:3246] CHIP:DMG: Endpoint = 0x0, + [1660632377.411388][3241:3246] CHIP:DMG: Cluster = 0x1f, + [1660632377.411423][3241:3246] CHIP:DMG: Attribute = 0x0000_0000, + [1660632377.411456][3241:3246] CHIP:DMG: } + [1660632377.411496][3241:3246] CHIP:DMG: + [1660632377.411528][3241:3246] CHIP:DMG: StatusIB = + [1660632377.411563][3241:3246] CHIP:DMG: { + [1660632377.411596][3241:3246] CHIP:DMG: status = 0x00 (SUCCESS), + [1660632377.411628][3241:3246] CHIP:DMG: }, + [1660632377.411687][3241:3246] CHIP:DMG: + [1660632377.411717][3241:3246] CHIP:DMG: }, + [1660632377.411748][3241:3246] CHIP:DMG: + [1660632377.411775][3241:3246] CHIP:DMG: ], + [1660632377.411804][3241:3246] CHIP:DMG: + [1660632377.411828][3241:3246] CHIP:DMG: InteractionModelRevision = 1 + [1660632377.411851][3241:3246] CHIP:DMG: } + [1660632377.411922][3241:3246] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1660632377.411986][3241:3246] CHIP:EM: Sending Standalone Ack for MessageCounter:259751171 on exchange 43997i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index 988b4cc058b01f..a9958cd5eed5cb 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -66,12 +66,14 @@ tests: - label: "Set up subscription to StateChange event" PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | + Need an SDK implementation required + Run the below command to start interactive mode ./chip-tool interactive start Subscribe the event using below command in Interactive mode. Once the event occurs, TH(chip-tool) get the subscription message. - booleanstate subscribe-by-id 0x0 1 100 2 1 + booleanstate subscribe-event state-change 1 100 1 1 --is-urgent true disabled: true - label: "Bring the DUT into a state so StateValue is FALSE" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 69671749350344..04cfb077a19798 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index 3b8159c6a97805..f70e43457d47fa 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index a87bb4d5f0986a..54083688e066b7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index bd41c7bcb0f53c..c08854525cad67 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -19,6 +19,8 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 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 4b151704ebc91d..22d1c1654cf2dd 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 @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index c2526b965e5dcd..7622ff87597173 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -19,6 +19,8 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 623466e4edeaa7..8d80ea0b08a370 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 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 fd2367e6ef2057..6ca89bc6035b65 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 @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 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 12cfd95c8d60c4..cbc714bc930b67 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 @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index ee32a4cbd10d91..cfa0869f225c01 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index ebe9ef8c3db72d..50e30a8e4ef88f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index 5097d626ef0cca..4119e0fbebea8b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 7f521e503c5e82..5ba018a444cd38 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 4ee2d08ee9743e..2d5f38f4b1eca4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -16,6 +16,7 @@ name: 24.1.4. [TC-CADMIN-1.4] Node Behavior using BCM [DUT - Commissionee] PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 4015bf778f5759..3b2066c0c6d8a1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index d935c80b5bcaff..d1101134ad7f3c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index 6ee77b6feeb50b..f82ed5c810d580 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 7be4ab23fed5fc..5477760c2ef1bf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -37,7 +37,7 @@ tests: type: int16u - label: "Read the global attribute: FeatureMap" - PICS: (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03) + PICS: ( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 ) command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml index 3f6060a6721936..b370a0337bbf94 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml @@ -11,94 +11,124 @@ # 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.1.1. [TC-DGWIFI-1.1] Global Attributes [DUT as Server] +name: 53.1.1. [TC-DGWIFI-1.1] Global Attributes [DUT as Server] PICS: - DGWIFI.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "WiFi Network Diagnostics" endpoint: 0 tests: - - label: "Commission DUT to TH" - verification: | - ./chip-tool pairing ble-wifi NODEID SSID PASSWD 20202021 3840 (commissioner side) - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read cluster-revision 1 0 - - Verify " ClusterRevision " on the TH(Chip-tool) Log: - - [1651834623.658618][3910:3916] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 2858283115 - [1651834623.658776][3910:3916] CHIP:TOO: ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read feature-map 1 0 - - Verify " Featuremap " on the TH(Chip-tool) Log: - - [1651834671.432383][3919:3924] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFC DataVersion: 2858283115 - [1651834671.432466][3919:3924] CHIP:TOO: FeatureMap: 3 - disabled: true - - - label: "TH reads AttribubteList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read attribute-list 1 0 - - Verify " AttributeList " on the TH(Chip-tool) Log: - - [1651834734.844051][3928:3933] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFB DataVersion: 2858283115 - [1651834734.844159][3928:3933] CHIP:TOO: AttributeList: 18 entries - [1651834734.844193][3928:3933] CHIP:TOO: [1]: 0 - [1651834734.844218][3928:3933] CHIP:TOO: [2]: 1 - [1651834734.844240][3928:3933] CHIP:TOO: [3]: 2 - [1651834734.844264][3928:3933] CHIP:TOO: [4]: 3 - [1651834734.844287][3928:3933] CHIP:TOO: [5]: 4 - [1651834734.844311][3928:3933] CHIP:TOO: [6]: 5 - [1651834734.844335][3928:3933] CHIP:TOO: [7]: 6 - [1651834734.844358][3928:3933] CHIP:TOO: [8]: 7 - [1651834734.844382][3928:3933] CHIP:TOO: [9]: 8 - [1651834734.844403][3928:3933] CHIP:TOO: [10]: 9 - [1651834734.844427][3928:3933] CHIP:TOO: [11]: 10 - [1651834734.844451][3928:3933] CHIP:TOO: [12]: 11 - [1651834734.844475][3928:3933] CHIP:TOO: [13]: 12 - [1651834734.844499][3928:3933] CHIP:TOO: [14]: 65528 - [1651834734.844523][3928:3933] CHIP:TOO: [15]: 65529 - [1651834734.844548][3928:3933] CHIP:TOO: [16]: 65531 - [1651834734.844571][3928:3933] CHIP:TOO: [17]: 65532 - [1651834734.844596][3928:3933] CHIP:TOO: [18]: 65533 - disabled: true + PICS: DGWIFI.S.F00 || DGWIFI.S.F01 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + minValue: 0 + maxValue: 3 + + - label: "TH reads AttributeList from DUT" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + + - label: + "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList + from DUT" + PICS: DGWIFI.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6, 7, 8, 9, 10] + + - label: + "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList + from DUT" + PICS: DGWIFI.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5, 12] + + - label: + "TH reads optional attribute (CurrentMaxRate) in AttributeList from + DUT" + PICS: DGWIFI.S.A000b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [11] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read accepted-command-list 1 0 - - Verify " AcceptedCommandList " on the TH(Chip-tool) Log: - - [1651788161.332422][241228:241233] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFF9 DataVersion: 3097381936 - [1651788161.332475][241228:241233] CHIP:TOO: AcceptedCommandList: 1 entries - [1651788161.332500][241228:241233] CHIP:TOO: [1]: 0 - disabled: true + PICS: " !DGWIFI.S.F01 " + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: + "TH reads Feature dependent(DGWIFI.S.F01) command in + AcceptedCommandList from DUT" + PICS: DGWIFI.S.F01 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read generated-command-list 1 0 - - Verify " GeneratedCommandList " on the TH(Chip-tool) Log: - - [1651788208.608429][241239:241244] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFF8 DataVersion: 3097381936 - [1651788208.608490][241239:241244] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - (Out of scope for v1.0) - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml index 3b8eb6eb42cf96..76dbc6c3572ba7 100644 --- a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLOG_1_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: 56.1.1. [TC-DLOG-1.1] Global Attributes [DUT-Server] @@ -20,82 +19,69 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Diagnostic Logs" endpoint: 0 tests: - - label: "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: "TH reads the ClusterRevision from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read cluster-revision 1 0 - - Verify on the TH Log: - - [1653983972.206171][5186:5191] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 2389393200 - [1653983972.206236][5186:5191] CHIP:TOO: ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read feature-map 1 0 - - Verify on the TH Log: - - [1653983676.882544][5166:5171] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFC DataVersion: 2389393200 - [1653983676.882637][5166:5171] CHIP:TOO: FeatureMap: 0 - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read attribute-list 1 0 - - Verify on the TH Log: - - [1649670392.536999][3576:3581] CHIP:DMG: - [1649670392.537040][3576:3581] CHIP:DMG: SuppressResponse = true, - [1649670392.537081][3576:3581] CHIP:DMG: InteractionModelRevision = 1 - [1649670392.537119][3576:3581] CHIP:DMG: } - [1649670392.537695][3576:3581] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFB DataVersion: 1216963889 - [1649670392.537917][3576:3581] CHIP:TOO: AttributeList: 3 entries - [1649670392.537985][3576:3581] CHIP:TOO: [1]: 65528 - [1649670392.538030][3576:3581] CHIP:TOO: [2]: 65529 - [1649670392.538071][3576:3581] CHIP:TOO: [3]: 65531 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read accepted-command-list 1 0 - - Verify on the TH Log: - - [1649670700.139000][3624:3629] CHIP:DMG: - [1649670700.139033][3624:3629] CHIP:DMG: SuppressResponse = true, - [1649670700.139066][3624:3629] CHIP:DMG: InteractionModelRevision = 1 - [1649670700.139097][3624:3629] CHIP:DMG: } - [1649670700.139387][3624:3629] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF9 DataVersion: 1216963889 - [1649670700.139473][3624:3629] CHIP:TOO: AcceptedCommandList: 1 entries - [1649670700.139528][3624:3629] CHIP:TOO: [1]: 0 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [0] + constraints: + type: list - label: "TH reads GeneratedCommandList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read generated-command-list 1 0 - - Verify on the TH Log: - - [1649670576.965898][3602:3607] CHIP:DMG: - [1649670576.965927][3602:3607] CHIP:DMG: SuppressResponse = true, - [1649670576.965955][3602:3607] CHIP:DMG: InteractionModelRevision = 1 - [1649670576.965987][3602:3607] CHIP:DMG: } - [1649670576.966225][3602:3607] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF8 DataVersion: 1216963889 - [1649670576.966330][3602:3607] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Event-list is not implemented - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [1] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml index 67c2cffc2bd61a..11a5dfb3d8af40 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_1_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: 98.1.1. [TC-FLABEL-1.1] Global Attributes [DUT-server] @@ -20,77 +19,69 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Fixed Label" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool fixedlabel read cluster-revision 1 0 - - On TH(chip-tool), verify that the DUT responsds ClusterRevision attribute as the value 1 - - [1651124058.497301][2367:2372] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 3688229931 - [1651124058.498753][2367:2372] CHIP:TOO: ClusterRevision: 1 - [1651124058.498906][2367:2372] CHIP:EM: Sending Standalone Ack for MessageCounter:8872582 on exchange 60871i - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool fixedlabel read feature-map 1 0 - - On TH(chip-tool), verify that DUT responds the Featuremap value as 0 - - [1653459204.749193][24610:24615] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFC DataVersion: 4022759920 - [1653459204.749266][24610:24615] CHIP:TOO: FeatureMap: 0 - [1653459204.749410][24610:24615] CHIP:EM: Sending Standalone Ack for MessageCounter:7681110 on exchange 50174i - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - ./chip-tool fixedlabel read attribute-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of supported attributes as 6 entries - - [1656929388.949001][6141:6146] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFB DataVersion: 2146772891 - [1656929388.949100][6141:6146] CHIP:TOO: AttributeList: 6 entries - [1656929388.949135][6141:6146] CHIP:TOO: [1]: 0 - [1656929388.949165][6141:6146] CHIP:TOO: [2]: 65528 - [1656929388.949193][6141:6146] CHIP:TOO: [3]: 65529 - [1656929388.949221][6141:6146] CHIP:TOO: [4]: 65531 - [1656929388.949249][6141:6146] CHIP:TOO: [5]: 65532 - [1656929388.949277][6141:6146] CHIP:TOO: [6]: 65533 - [1656929388.949395][6141:6146] CHIP:EM: Sending Standalone Ack for MessageCounter:111128598 on exchange 9716i - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Out of scope for V1.0 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool fixedlabel read accepted-command-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of Accepted Commands as 0 entries - - [1651124239.450485][2392:2397] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF9 DataVersion: 3688229931 - [1651124239.450576][2392:2397] CHIP:TOO: AcceptedCommandList: 0 entries - [1651124239.450713][2392:2397] CHIP:EM: Sending Standalone Ack for MessageCounter:5032784 on exchange 23524i - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool fixedlabel read generated-command-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of GeneratedCommands as 0 entries - - [1651124266.980698][2527:2532] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF8 DataVersion: 3688229931 - [1651124266.980776][2527:2532] CHIP:TOO: GeneratedCommandList: 0 entries - [1651124266.980897][2527:2532] CHIP:EM: Sending Standalone Ack for MessageCounter:11345894 on exchange 5110i - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml index 8eba3aa38999a5..7f42572cfa428c 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml @@ -13,84 +13,45 @@ # 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.2.1. [TC-FLABEL-2.1] Fixed Label cluster [DUT-server] +name: 98.2.1. [TC-FLABEL-2.1] Fixed Label cluster [DUT-server] PICS: - FLABEL.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Fixed Label" + endpoint: 1 tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "TH reads LabelList from the DUT" PICS: FLABEL.S.A0000 - verification: | - ./chip-tool fixedlabel read label-list 1 0 - - On TH(chip-tool), verify that DUT responds with labellist empty or has one or more entries, each entry should contain label and value field - - [1651124649.820293][2819:2824] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_0000 DataVersion: 3688229931 - [1651124649.820478][2819:2824] CHIP:TOO: label list: 4 entries - [1651124649.820534][2819:2824] CHIP:TOO: [1]: { - [1651124649.820570][2819:2824] CHIP:TOO: Label: room - [1651124649.820602][2819:2824] CHIP:TOO: Value: bedroom 2 - [1651124649.820636][2819:2824] CHIP:TOO: } - [1651124649.820676][2819:2824] CHIP:TOO: [2]: { - [1651124649.820709][2819:2824] CHIP:TOO: Label: orientation - [1651124649.820741][2819:2824] CHIP:TOO: Value: North - [1651124649.820773][2819:2824] CHIP:TOO: } - [1651124649.820812][2819:2824] CHIP:TOO: [3]: { - [1651124649.820845][2819:2824] CHIP:TOO: Label: floor - [1651124649.820875][2819:2824] CHIP:TOO: Value: 2 - [1651124649.820906][2819:2824] CHIP:TOO: } - [1651124649.820945][2819:2824] CHIP:TOO: [4]: { - [1651124649.820977][2819:2824] CHIP:TOO: Label: direction - [1651124649.821008][2819:2824] CHIP:TOO: Value: up - [1651124649.821039][2819:2824] CHIP:TOO: } - [1651124649.821193][2819:2824] CHIP:EM: Sending Standalone Ack for MessageCounter:2439070 on exchange 10798i - disabled: true + command: "readAttribute" + attribute: "label list" + response: + constraints: + type: list - label: "TH tries to write LabelList attribute of the DUT by setting Label = Test_Label, Value= Test_Value" PICS: FLABEL.S.A0000 - verification: | - ./chip-tool fixedlabel write-by-id 0x00 "["label","Testlabel", "value","testvalue"]" 1 0 - - On TH(chip-tool), Verify the status code as UNSUPPORTED_WRITE - - [1657629968.892879][2505:2510] CHIP:DMG: WriteResponseMessage = - [1657629968.892909][2505:2510] CHIP:DMG: { - [1657629968.892937][2505:2510] CHIP:DMG: AttributeStatusIBs = - [1657629968.892975][2505:2510] CHIP:DMG: [ - [1657629968.893005][2505:2510] CHIP:DMG: AttributeStatusIB = - [1657629968.893043][2505:2510] CHIP:DMG: { - [1657629968.893077][2505:2510] CHIP:DMG: AttributePathIB = - [1657629968.893119][2505:2510] CHIP:DMG: { - [1657629968.893160][2505:2510] CHIP:DMG: Endpoint = 0x0, - [1657629968.893205][2505:2510] CHIP:DMG: Cluster = 0x40, - [1657629968.893247][2505:2510] CHIP:DMG: Attribute = 0x0000_0000, - [1657629968.893286][2505:2510] CHIP:DMG: } - [1657629968.893329][2505:2510] CHIP:DMG: - [1657629968.893370][2505:2510] CHIP:DMG: StatusIB = - [1657629968.893412][2505:2510] CHIP:DMG: { - [1657629968.893454][2505:2510] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1657629968.893554][2505:2510] CHIP:DMG: }, - [1657629968.893594][2505:2510] CHIP:DMG: - [1657629968.893626][2505:2510] CHIP:DMG: }, - [1657629968.893662][2505:2510] CHIP:DMG: - [1657629968.893692][2505:2510] CHIP:DMG: ], - [1657629968.893729][2505:2510] CHIP:DMG: - [1657629968.893758][2505:2510] CHIP:DMG: InteractionModelRevision = 1 - [1657629968.893787][2505:2510] CHIP:DMG: } - [1657629968.893871][2505:2510] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657629968.893911][2505:2510] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) - disabled: true + command: "writeAttribute" + attribute: "label list" + arguments: + value: [{ label: "Test_Label", value: "Test_Value" }] + response: + error: UNSUPPORTED_WRITE - label: "TH reads LabelList from the DUT" - PICS: FLABEL.S.A0000 verification: | ./chip-tool fixedlabel read label-list 1 0 @@ -115,4 +76,12 @@ tests: [1651124649.821008][2819:2824] CHIP:TOO: Value: up [1651124649.821039][2819:2824] CHIP:TOO: } [1651124649.821193][2819:2824] CHIP:EM: Sending Standalone Ack for MessageCounter:2439070 on exchange 10798i - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && FLABEL.S.A0000 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml b/src/app/tests/suites/certification/Test_TC_G_1_1.yaml index 2e2c1d967e2aac..dc5149bf85842e 100644 --- a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_1_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: 121.1.1. [TC-G-1.1] Global Attributes [DUT-Server] @@ -20,80 +19,79 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Groups" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool groups read cluster-revision 1 1 - - Verify the "clusterrevision value" on the TH(Chip-tool) Log: - - [1651216621.203474][2391:2396] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 745654550 - [1651216621.204919][2391:2396] CHIP:TOO: ClusterRevision: 4 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 4 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool groups read feature-map 1 1 - - Verify the "featuremap value" on the TH(Chip-tool) Log: + PICS: " !G.S.F00 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - [1653556224.547920][18764:18769] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFC DataVersion: 3409054639 - [1653556224.548038][18764:18769] CHIP:TOO: FeatureMap: 1 - disabled: true + - label: "TH reads the FeatureMap from DUT" + PICS: G.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - ./chip-tool groups read attribute-list 1 1 - - Verify the "attibute list contains the mandatory attributes and global attributes" on the TH(Chip-tool) Log: - - [1653556295.417734][18773:18779] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFB DataVersion: 3409054639 - [1653556295.417900][18773:18779] CHIP:TOO: AttributeList: 6 entries - [1653556295.417971][18773:18779] CHIP:TOO: [1]: 0 - [1653556295.418015][18773:18779] CHIP:TOO: [2]: 65528 - [1653556295.418057][18773:18779] CHIP:TOO: [3]: 65529 - [1653556295.418098][18773:18779] CHIP:TOO: [4]: 65531 - [1653556295.418138][18773:18779] CHIP:TOO: [5]: 65532 - [1653556295.418179][18773:18779] CHIP:TOO: [6]: 65533 - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Out of scope for V1.0 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool groups read accepted-command-list 1 1 - - Verify the "AcceptedCommands" on the TH(Chip-tool) Log: - - [1651217107.034926][2435:2440] CHIP:TOO: AcceptedCommandList: 6 entries - [1651217107.034984][2435:2440] CHIP:TOO: [1]: 0 - [1651217107.035028][2435:2440] CHIP:TOO: [2]: 1 - [1651217107.035070][2435:2440] CHIP:TOO: [3]: 2 - [1651217107.035112][2435:2440] CHIP:TOO: [4]: 3 - [1651217107.035153][2435:2440] CHIP:TOO: [5]: 4 - [1651217107.035194][2435:2440] CHIP:TOO: [6]: 5 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 5] - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool groups read generated-command-list 1 1 - - Verify the "GeneratedCommands" on the TH(Chip-tool) Log: - - [1651217152.020233][2444:2449] CHIP:TOO: GeneratedCommandList: 4 entries - [1651217152.020276][2444:2449] CHIP:TOO: [1]: 0 - [1651217152.020312][2444:2449] CHIP:TOO: [2]: 1 - [1651217152.020346][2444:2449] CHIP:TOO: [3]: 2 - [1651217152.020380][2444:2449] CHIP:TOO: [4]: 3 - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [0, 1, 2, 3] + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_2_1.yaml b/src/app/tests/suites/certification/Test_TC_G_2_1.yaml index d7ea24c455cbbe..555c3c9b6dfe26 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_1.yaml @@ -13,46 +13,62 @@ # 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: 125.2.1. [TC-G-2.1] Attributes [DUT-Server] +name: 120.2.1. [TC-G-2.1] Attributes [DUT-Server] PICS: - G.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Groups" + endpoint: 1 tests: - - label: "TH reads NameSupport attribute from DUT" - PICS: G.S.A0000 - verification: | - ./chip-tool groups read name-support 1 1 + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - Verify the "name support value" on the TH(Chip-tool) Log: + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: 128 + saveAs: NameSupportFeatureSupportedValue - [1651217306.461810][2457:2462] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 745654550 - [1651217306.461894][2457:2462] CHIP:TOO: name support: 128(binary:10000000) - disabled: true + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && !G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: 0 + saveAs: NameSupportValue - label: "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1" - verification: | - ./chip-tool groups write-by-id 0x0000 126 1 1 - - Verify the "response is UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: - - [1651217949.041814][2514:2519] CHIP:DMG: } - [1651217949.041889][2514:2519] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) - disabled: true + PICS: G.S.A0000 + command: "writeAttribute" + attribute: "name support" + arguments: + value: 128 + response: + error: UNSUPPORTED_WRITE - label: "TH reads NameSupport attribute from DUT" - verification: | - ./chip-tool groups read name-support 1 1 + PICS: G.S.A0000 && G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: NameSupportFeatureSupportedValue - Verify the "name support value" on the TH(Chip-tool) Log: - - [1651217306.461810][2457:2462] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 745654550 - [1651217306.461894][2457:2462] CHIP:TOO: name support: 128 - disabled: true + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && !G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: NameSupportValue diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml index 8b72b89848bade..ddabc3deaed63e 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml @@ -20,50 +20,92 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Illuminance Measurement" + endpoint: 1 tests: - - label: - "Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - - label: - "Test Harness Client reads MinMeasuredValue attribute and - MaxMeasuredValue attribute from DUT." - PICS: ILL.S.A0001 && ILL.S.A0002 - verification: | - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - On TH(chip-tool), verify the MinMeasuredValue as 1 - [1650881571.375482][2777:2782] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0001 DataVersion: 1034665079 - [1650881571.375596][2777:2782] CHIP:TOO: MinMeasuredValue: 1 + - label: "TH reads MinMeasuredValue attribute from DUT" + PICS: ILL.S.A0001 + command: "readAttribute" + attribute: "MinMeasuredValue" + response: + saveAs: MinMeasuredValue + constraints: + type: int16u - ./chip-tool illuminancemeasurement read max-measured-value 1 1 - On TH(chip-tool), verify the MaxMeasuredValue as 65534 - [1650881715.935533][2791:2797] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0002 DataVersion: 1034665079 - [1650881715.935645][2791:2797] CHIP:TOO: MaxMeasuredValue: 65534 - disabled: true + - label: "TH reads MaxMeasuredValue attribute from DUT" + PICS: ILL.S.A0002 + command: "readAttribute" + attribute: "MaxMeasuredValue" + response: + saveAs: MaxMeasuredValue + constraints: + type: int16u - label: "Cover the sensor or darken the room" verification: | - currently we can"t do this test-step in chip-tool - disabled: true + Manual operation + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for Success" + - name: "expectedValue" + value: "y" + + - label: "Wait 1s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 - label: "After a few seconds, TH reads MeasuredValue attribute from DUT." - PICS: ILL.S.A0000 - verification: | - ./chip-tool illuminancemeasurement read measured-value 1 1 - disabled: true + PICS: ILL.S.A0000 && PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + type: int16u + minValue: 0 - label: "Expose the sensor again to light" verification: | - currently we can"t do this test-step in chip-tool - disabled: true + Manual operation + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for Success" + - name: "expectedValue" + value: "y" + + - label: "Wait 1s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 - label: "After a few seconds, TH reads MeasuredValue attribute from DUT." - PICS: ILL.S.A0000 - verification: | - ./chip-tool illuminancemeasurement read measured-value 1 1 - disabled: true + PICS: ILL.S.A0000 && PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + type: int16u + maxValue: 65534 diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml index d94ff98a8a8421..3322dbbe613ffe 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml @@ -11,92 +11,77 @@ # 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: 99.1.1. [TC-LCFG-1.1] Global Attributes [DUT-Server] +name: 101.1.1. [TC-LCFG-1.1] Global Attributes [DUT-Server] PICS: - LCFG.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Localization Configuration" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true - - - label: "{THread} (0xFFFD) ClusterRevision attribute" - verification: | - ./chip-tool localizationconfiguration read cluster-revision 1 0 - - On TH(chip-tool), verify that DUT sends ClusterRevision attribute value as 1 - - [1649330698.587235][4440:4445] CHIP:DMG: - [1649330698.587269][4440:4445] CHIP:DMG: SuppressResponse = true, - [1649330698.587315][4440:4445] CHIP:DMG: InteractionModelRevision = 1 - [1649330698.587347][4440:4445] CHIP:DMG: } - [1649330698.587556][4440:4445] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 419421945 - [1649330698.587643][4440:4445] CHIP:TOO: ClusterRevision: 1 - disabled: true - - - label: "{THread} (0xFFFC) FeatureMap attribute" - verification: | - ./chip-tool localizationconfiguration read feature-map 1 0 - - On TH(chip-tool), verify that DUT sends FeatureMap attribute value as 0 - [1653462414.221894][29485:29490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFC DataVersion: 2352052086 - [1653462414.222033][29485:29490] CHIP:TOO: FeatureMap: 0 - [1653462414.222207][29485:29490] CHIP:EM: Sending Standalone Ack for MessageCounter:4940181 on exchange 7821i - disabled: true - - - label: "{THread} (0xFFFB) AttributeList attribute" - verification: | - ./chip-tool localizationconfiguration read attribute-list 1 0 - On TH(chip-tool), verify that DUT sends a list of supported attributes - - [1653462309.061114][29477:29482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFB DataVersion: 2352052086 - [1653462309.061199][29477:29482] CHIP:TOO: AttributeList: 7 entries - [1653462309.061233][29477:29482] CHIP:TOO: [1]: 0 - [1653462309.061258][29477:29482] CHIP:TOO: [2]: 1 - [1653462309.061284][29477:29482] CHIP:TOO: [3]: 65528 - [1653462309.061308][29477:29482] CHIP:TOO: [4]: 65529 - [1653462309.061332][29477:29482] CHIP:TOO: [5]: 65531 - [1653462309.061355][29477:29482] CHIP:TOO: [6]: 65532 - [1653462309.061379][29477:29482] CHIP:TOO: [7]: 65533 - [1653462309.061492][29477:29482] CHIP:EM: Sending Standalone Ack for MessageCounter:13553423 on exchange 61180i - disabled: true - - - label: "{THread} (0xFFFA) EventList attribute" - verification: | - out 0f scope for V1.0 - disabled: true - - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" - verification: | - ./chip-tool localizationconfiguration read accepted-command-list 1 0 - On TH(chip-too), verify that DUT responsds as list of Accepted Command as 0 entries. - - [1649331020.031045][4520:4525] CHIP:DMG: - [1649331020.031081][4520:4525] CHIP:DMG: SuppressResponse = true, - [1649331020.031119][4520:4525] CHIP:DMG: InteractionModelRevision = 1 - [1649331020.031153][4520:4525] CHIP:DMG: } - [1649331020.031374][4520:4525] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFF9 DataVersion: 419421945 - [1649331020.031470][4520:4525] CHIP:TOO: AcceptedCommandList: 0 entries - disabled: true - - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" - verification: | - ./chip-tool localizationconfiguration read generated-command-list 1 0 - On TH(chip-tool), verify that DUT responsds as list of GeneratedCommandList as 0 entries. - - [1649330937.798986][4508:4513] CHIP:DMG: - [1649330937.799022][4508:4513] CHIP:DMG: SuppressResponse = true, - [1649330937.799062][4508:4513] CHIP:DMG: InteractionModelRevision = 1 - [1649330937.799096][4508:4513] CHIP:DMG: } - [1649330937.799317][4508:4513] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFF8 DataVersion: 419421945 - [1649330937.799413][4508:4513] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision from DUT" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap from DUT" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: "TH reads AttributeList from DUT" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + + - label: "TH reads AcceptedCommandList from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index 5a3b2864a8f080..8e994af41e62d5 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -11,88 +11,105 @@ # 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: 4.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] +name: 108.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] PICS: - LTIME.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Time Format Localization" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true - - - label: "{THread} (0xFFFD) ClusterRevision attribute" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision from DUT" PICS: LTIME.S.Afffd - verification: | - ./chip-tool timeformatlocalization read cluster-revision 1 0 - On TH(chip-tool), verify that DUT sends ClusterRevision attribute value as 1 - - [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 - [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 - disabled: true - - - label: "{THread} (0xFFFC) FeatureMap attribute" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap from DUT" PICS: LTIME.S.Afffc - verification: | - Out of scope for V1.0 - - https://github.com/project-chip/connectedhomeip/issues/18989 - disabled: true - - - label: "{THread} (0xFFFB) AttributeList attribute" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + minValue: 0 + maxValue: 1 + + - label: "TH reads AttributeList from DUT" PICS: LTIME.S.Afffb - verification: | - ./chip-tool timeformatlocalization read attribute-list 1 0 - - - On TH(chip-tool), verify that DUT sends a list of supported attributes - - [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 - [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries - [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 - [1653999139.214267][7477:7482] CHIP:TOO: [2]: 1 - [1653999139.214293][7477:7482] CHIP:TOO: [3]: 2 - [1653999139.214320][7477:7482] CHIP:TOO: [4]: 65528 - [1653999139.214345][7477:7482] CHIP:TOO: [5]: 65529 - [1653999139.214371][7477:7482] CHIP:TOO: [6]: 65531 - [1653999139.214397][7477:7482] CHIP:TOO: [7]: 65532 - [1653999139.214422][7477:7482] CHIP:TOO: [8]: 65533 - [1653999139.214522][7477:7482] CHIP:EM: Sending Standalone Ack for MessageCounter:5643805 on exchange 4737i - disabled: true - - - label: "{THread} (0xFFFA) EventList attribute" - PICS: LTIME.S.Afffa - verification: | - Out of scope for V1.0 - disabled: true - - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + + - label: + "TH reads optional attribute(ActiveCalendarType) in AttributeList from + DUT" + PICS: LTIME.S.Afffb && LTIME.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] + + - label: + "TH reads optional attribute(SupportedCalendarTypes) in AttributeList + from DUT" + PICS: LTIME.S.Afffb && LTIME.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: "TH reads AcceptedCommandList from DUT" PICS: LTIME.S.Afff9 - verification: | - ./chip-tool timeformatlocalization read accepted-command-list 1 0 - - On TH(chip-tool), verify that DUT responsds as list of Accepted Command as 0 entries. - - [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 - [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries - disabled: true - - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "TH reads GeneratedCommandList from DUT" PICS: LTIME.S.Afff8 - verification: | - ./chip-tool timeformatlocalization read generated-command-list 1 0 - - - On TH(chip-tool), verify that DUT responsds as list of GeneratedCommandList as 0 entries. - - [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 - [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml index 1f883211ed1892..9a137a4febf8d0 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml @@ -11,78 +11,101 @@ # 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: 105.1.2. [TC-LUNIT-1.2] Global Attributes [DUT as Server] +name: 108.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] PICS: - LUNIT.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Unit Localization" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - - label: "{THread} (0xFFFD) ClusterRevision attribute" + - label: "TH reads the ClusterRevision from DUT" PICS: LUNIT.S.Afffd - verification: | - ./chip-tool unitlocalization read cluster-revision 1 0 - On TH, verify that DUT sends ClusterRevision attribute value as 1 - [1651186310867] [11123:114108] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 486381485 - [1651186310867] [11123:114108] CHIP: [TOO] ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - - label: "{THread} (0xFFFC) FeatureMap attribute" - PICS: LUNIT.S.Afffc - verification: | - ./chip-tool unitlocalization read feature-map 1 0 + - label: "TH reads the FeatureMap from DUT" + PICS: LUNIT.S.Afffc && !LUNIT.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - On TH, verify that DUT sends FeatureMap attribute value as 1 - [1651186357789] [11140:114768] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFC DataVersion: 486381485 - [1651186357789] [11140:114768] CHIP: [TOO] FeatureMap: 1 - disabled: true + - label: "TH reads the FeatureMap from DUT" + PICS: LUNIT.S.Afffc && LUNIT.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 - - label: "{THread} (0xFFFB) AttributeList attribute" + - label: "TH reads AttributeList from DUT" PICS: LUNIT.S.Afffb - verification: | - ./chip-tool unitlocalization read attribute-list 1 0 - On TH, verify that DUT sends a list of supported attributes - [1652335691.917681][3124:3129] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFB DataVersion: 3157629909 - [1652335691.917762][3124:3129] CHIP:TOO: AttributeList: 6 entries - [1652335691.917802][3124:3129] CHIP:TOO: [1]: 0 - [1652335691.917834][3124:3129] CHIP:TOO: [2]: 65528 - [1652335691.917865][3124:3129] CHIP:TOO: [3]: 65529 - [1652335691.917895][3124:3129] CHIP:TOO: [4]: 65531 - [1652335691.917924][3124:3129] CHIP:TOO: [5]: 65532 - [1652335691.917957][3124:3129] CHIP:TOO: [6]: 65533 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - - label: "{THread} (0xFFFA) EventList attribute" - PICS: LUNIT.S.Afffa - verification: | - out of scope for V1.0 - disabled: true + - label: + "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList" + PICS: LUNIT.S.Afffb && LUNIT.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0] - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" + - label: "TH reads AcceptedCommandList from DUT" PICS: LUNIT.S.Afff9 - verification: | - ./chip-tool unitlocalization read accepted-command-list 1 0 - On TH, verify that DUT responsds as list of Accepted Command as 0 entries. - [1651186469211] [11184:116328] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFF9 DataVersion: 486381485 - [1651186469211] [11184:116328] CHIP: [TOO] AcceptedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" + - label: "TH reads GeneratedCommandList from DUT" PICS: LUNIT.S.Afff8 - verification: | - ./chip-tool unitlocalization read generated-command-list 1 0 - On TH, verify that DUT responsds as list of GeneratedCommandList as 0 entries. - [1651191485645] [13481:177154] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFF8 DataVersion: 486381492 - [1651191485646] [13481:177154] CHIP: [TOO] GeneratedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 6c2347b8c04b6d..5fc10aabb21232 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -58,7 +58,7 @@ tests: contains: [0, 15, 17] - label: - "Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in + "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList" PICS: LVL.S.F01 command: "readAttribute" @@ -69,7 +69,7 @@ tests: contains: [1, 16384] - label: - "Read the optonal attribute(CurrentFrequency, MinFrequency and + "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList" PICS: LVL.S.F02 command: "readAttribute" @@ -79,7 +79,7 @@ tests: type: list contains: [4, 5, 6] - - label: "Read the optonal attribute(MinLevel) in AttributeList" + - label: "Read the optional attribute(MinLevel) in AttributeList" PICS: LVL.S.A0002 command: "readAttribute" attribute: "AttributeList" @@ -88,7 +88,7 @@ tests: type: list contains: [2] - - label: "Read the optonal attribute(MaxLevel) in AttributeList" + - label: "Read the optional attribute(MaxLevel) in AttributeList" PICS: LVL.S.A0003 command: "readAttribute" attribute: "AttributeList" @@ -97,7 +97,7 @@ tests: type: list contains: [3] - - label: "Read the optonal attribute(OnOffTransitionTime) in AttributeList" + - label: "Read the optional attribute(OnOffTransitionTime) in AttributeList" PICS: LVL.S.A0010 command: "readAttribute" attribute: "AttributeList" @@ -106,7 +106,7 @@ tests: type: list contains: [16] - - label: "Read the optonal attribute(OnTransitionTime) in AttributeList" + - label: "Read the optional attribute(OnTransitionTime) in AttributeList" PICS: LVL.S.A0012 command: "readAttribute" attribute: "AttributeList" @@ -115,7 +115,7 @@ tests: type: list contains: [18] - - label: "Read the optonal attribute(OffTransitionTime) in AttributeList" + - label: "Read the optional attribute(OffTransitionTime) in AttributeList" PICS: LVL.S.A0013 command: "readAttribute" attribute: "AttributeList" @@ -124,7 +124,7 @@ tests: type: list contains: [19] - - label: "Read the optonal attribute(DefaultMoveRate) in AttributeList" + - label: "Read the optional attribute(DefaultMoveRate) in AttributeList" PICS: LVL.S.A0014 command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index dd270c9b8381da..2b87fb422a8f05 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -103,6 +103,16 @@ tests: - name: "ms" value: 5000 + - label: "Sends stop command to DUT" + PICS: LVL.S.C03.Rsp + command: "Stop" + arguments: + values: + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" @@ -114,16 +124,6 @@ tests: - name: "expectedValue" value: "y" - - label: "Sends stop command to DUT" - PICS: LVL.S.C03.Rsp - command: "Stop" - arguments: - values: - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 72ff07f9db86df..ed41fc63926f0d 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -59,7 +59,7 @@ tests: constraints: type: bitmap8 minValue: 1 - maxValue: 273 + maxValue: 7 - label: "Reads optional attribute: PIROccupiedToUnoccupiedDelay" PICS: OCC.S.A0010 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml index 83249b00b24c6b..1f806e9d3757a2 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml @@ -22,34 +22,34 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Occupancy Sensing" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true - - - label: "TH reads OccupancySensorType attribute from DUT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Reads mandatory attribute constrains: OccupancySensorType" PICS: OCC.S.A0001 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type 1 1 - - Verify occupancy sensor type value on the TH(Chip-tool) Log: - - [1648461912.765825][9300:9306] CHIP:DMG: } - [1648461912.766013][9300:9306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3082917122 - [1648461912.766089][9300:9306] CHIP:TOO: occupancy sensor type: 0 - disabled: true - - - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" + command: "readAttribute" + attribute: "occupancy sensor type" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 + + - label: "Reads mandatory attribute constrains: OccupancySensorTypeBitmap" PICS: OCC.S.A0002 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 - - Verify occupancy sensor type bitmap value on the TH(Chip-tool) Log: - - [1648461918.499009][9307:9312] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3082917122 - [1648461918.499082][9307:9312] CHIP:TOO: occupancy sensor type bitmap: 1 - disabled: true + command: "readAttribute" + attribute: "occupancy sensor type bitmap" + response: + constraints: + type: bitmap8 + minValue: 1 + maxValue: 7 diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml index ae5f9b86efaeb9..56736aa83f6600 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml @@ -71,11 +71,6 @@ tests: 0x05, ] - - label: "TH reads EventList from DUT" - verification: | - out of scope for V1.0 - disabled: true - - label: "TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" @@ -91,3 +86,18 @@ tests: constraints: type: list contains: [0x01, 0x03, 0x05, 0x08] + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml index e592f5e55af813..9526002baa96fc 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml @@ -13,48 +13,57 @@ # 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.2.2. [TC-PRS-2.2] Primary functionality with server as DUT +name: 34.2.2. [TC-PRS-2.2] Primary Functionality with Server as DUT PICS: - PRS.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Pressure Measurement" + endpoint: 1 tests: - - label: - "Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads from the DUT the MeasuredValue attribute" PICS: PRS.S.A0000 - verification: | - ./chip-tool pressuremeasurement read measured-value 1 1 - - - verify MeasuredValue on TH(chip-tool) logs: - - CHIP:TOO: MeasuredValue: 0 - disabled: true + command: "readAttribute" + attribute: "MeasuredValue" + response: + saveAs: ValueBeforeChange - label: "Operate on device to change the pressure significantly" - PICS: PRS.M.PressureChange - verification: | - Operate at device - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && PRS.M.PressureChange + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Wait 2s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 - label: "After a few seconds, TH reads from the DUT the MeasuredValue attribute" - PICS: PRS.S.A0000 - verification: | - ./chip-tool pressuremeasurement read measured-value 1 1 - - verify MeasuredValue on TH(chip-tool) logs: - - CHIP:TOO: MeasuredValue: 1 - disabled: true + PICS: PRS.S.A0000 && PRS.M.PressureChange + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + notValue: ValueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml index 9d559f8e302bbc..e63f15fcefd7bc 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml @@ -20,27 +20,22 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Power Source Configuration" endpoint: 0 tests: - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the Sources attribute from the DUT" PICS: PSCFG.S.A0000 - verification: | - ./chip-tool powersourceconfiguration read sources 1 0 - - verify on TH(chip-tool) that source attribute provides a list, and each entry in the list has to be number of an endpoint having a Power Source cluster. - - The response should look like this: - - [1650273002.441884][8875:8880] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_0000 DataVersion: 461632376 - [1653564197.717105][36217:36222] CHIP:TOO: Sources: 3 entries - [1653564197.717154][36217:36222] CHIP:TOO: [1]: 2 - [1653564197.717196][36217:36222] CHIP:TOO: [2]: 1 - [1653564197.717236][36217:36222] CHIP:TOO: [3]: 0 - disabled: true + command: "readAttribute" + attribute: "Sources" + response: + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index c1e47b6ccf900a..33ab17b54a9b02 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -31,78 +31,19 @@ tests: - name: "nodeId" value: nodeId - - label: "Read the global attribute: FeatureMap" + - label: + "Read FeatureMap attribute and Check values of flags in this + FeatureMap" + PICS: + (SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || + SWTCH.S.F04) command: "readAttribute" attribute: "FeatureMap" response: - saveAs: FeatureMapValue - - #bitwise check is not implemented in yaml framework - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 1; MS, MSR, MSL, - MSM are all set to 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F00 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS is set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F01 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR are set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F02 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR, MSL are all set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F03 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR, MSM are all set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F04 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + constraints: + type: bitmap32 + minValue: 0 + maxValue: 31 - label: "read the global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml index 99753e62244e43..973c71075b54a2 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml @@ -20,22 +20,22 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "User Label" + endpoint: 1 tests: - - label: "TH reads LabelList from the DUT" - PICS: ULABEL.S.A0000 - verification: | - ./chip-tool userlabel read label-list 1 0 - - On TH(chip-tool), Verify that the LabelList is empty or has one or more entries. Each tuple has following fields: Label field is of type string and have a length up to 16 bytes, Value field is of type string and have a length up to 16 bytes + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - OO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_0000 DataVersion: 3074415053 - [1657180589.654586][4697:4702] CHIP:TOO: label list: 1 entries - [1657180589.654652][4697:4702] CHIP:TOO: [1]: { - [1657180589.654696][4697:4702] CHIP:TOO: Label: roomName - [1657180589.654737][4697:4702] CHIP:TOO: Value: master bedroom 1 - [1657180589.654778][4697:4702] CHIP:TOO: } - [1657180589.654901][4697:4702] CHIP:EM: Sending Standalone Ack for MessageCounter:68497701 on exchange 45271i - disabled: true + - label: "TH reads LabelList attribute of the DUT" + PICS: ULABEL.S.A0000 + command: "readAttribute" + attribute: "label list" + response: + constraints: + type: list diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index d75838c3862f92..67322305f85885 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -602,6 +602,7 @@ LTIME.C.A0000.12HR=1 LTIME.C.A0000.24HR=1 #Unit Localization Cluster +LUNIT.S.F00=0 LUNIT.S.A0000=1 LUNIT.S.Afff8=1 LUNIT.S.Afff9=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 0e862676eb601b..b8864448e0902b 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -29,6 +29,7 @@ "Test_TC_CC_8_1" ], "DeviceManagement": [ + "Test_TC_OPCREDS_1_2", "Test_TC_BINFO_1_1", "Test_TC_BINFO_2_1", "Test_TC_CNET_1_3" @@ -39,7 +40,9 @@ "Test_TC_DGETH_2_1", "Test_TC_DGETH_2_2" ], + "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], + "FixedLabel": ["Test_TC_FLABEL_1_1", "Test_TC_FLABEL_2_1"], "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], "Identify": [ @@ -48,7 +51,11 @@ "Test_TC_I_2_2", "Test_TC_I_2_3" ], - "IlluminanceMeasurement": ["Test_TC_ILL_1_1", "Test_TC_ILL_2_1"], + "IlluminanceMeasurement": [ + "Test_TC_ILL_1_1", + "Test_TC_ILL_2_1", + "Test_TC_ILL_2_2" + ], "OccupancySensing": ["Test_TC_OCC_1_1", "Test_TC_OCC_2_1"], "LevelControl": [ "Test_TC_LVL_1_1", @@ -59,8 +66,12 @@ "Test_TC_LVL_5_1", "Test_TC_LVL_6_1" ], + "LocalizationConfiguration": ["Test_TC_LCFG_1_1"], + "TimeFormatLocalization": ["Test_TC_LTIME_1_1"], + "UnitLocalization": ["Test_TC_LUNIT_1_1"], "UserLabel": [ "Test_TC_ULABEL_1_1", + "Test_TC_ULABEL_2_1", "Test_TC_ULABEL_2_2", "Test_TC_ULABEL_2_3", "Test_TC_ULABEL_2_4" @@ -114,7 +125,11 @@ "Test_TC_OO_2_4" ], "PowerSource": ["Test_TC_PS_1_1", "Test_TC_PS_2_1"], - "PressureMeasurement": ["Test_TC_PRS_1_1", "Test_TC_PRS_2_1"], + "PressureMeasurement": [ + "Test_TC_PRS_1_1", + "Test_TC_PRS_2_1", + "Test_TC_PRS_2_2" + ], "PumpConfigurationControl": [ "Test_TC_PCC_1_1", "Test_TC_PCC_2_1", @@ -122,7 +137,7 @@ "Test_TC_PCC_2_3", "Test_TC_PCC_2_4" ], - "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1"], + "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1"], "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], "SecureChannel": ["Test_TC_SC_4_2"], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], @@ -144,7 +159,11 @@ "Test_TC_DGTHREAD_2_3", "Test_TC_DGTHREAD_2_4" ], - "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_1", "Test_TC_DGWIFI_2_3"], + "WiFiNetworkDiagnostics": [ + "Test_TC_DGWIFI_1_1", + "Test_TC_DGWIFI_2_1", + "Test_TC_DGWIFI_2_3" + ], "WindowCovering": [ "Test_TC_WNCV_1_1", "Test_TC_WNCV_2_1", @@ -229,7 +248,9 @@ "Groups": [ "TestGroupMessaging", "TestGroupsCluster", - "TestGroupKeyManagementCluster" + "TestGroupKeyManagementCluster", + "Test_TC_G_1_1", + "Test_TC_G_2_1" ], "collection": [ "AccessControl", @@ -239,13 +260,18 @@ "ColorControl", "DeviceManagement", "Descriptor", + "DiagnosticsLogs", "EthernetNetworkDiagnostics", "FlowMeasurement", + "FixedLabel", "GeneralCommissioning", "GeneralDiagnostics", "Identify", "IlluminanceMeasurement", "LevelControl", + "LocalizationConfiguration", + "UnitLocalization", + "TimeFormatLocalization", "MediaControl", "ModeSelect", "MultipleFabrics", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 19f48bc4586852..bfa3a7e67cf84e 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -38,8 +38,6 @@ "Groups": [ "TestGroupDemoCommand", "TestGroupDemoConfig", - "Test_TC_G_1_1", - "Test_TC_G_2_1", "Test_TC_G_2_2", "Test_TC_G_2_3", "Test_TC_G_3_1", @@ -69,7 +67,6 @@ "Test_TC_DA_1_7" ], "DeviceManagement": [ - "Test_TC_OPCREDS_1_2", "Test_TC_BINFO_2_2", "Test_TC_BINFO_2_4", "Test_TC_OPCREDS_3_1", @@ -98,7 +95,6 @@ "Test_TC_CNET_4_22" ], "DiagnosticsLogs": [ - "Test_TC_DLOG_1_1", "Test_TC_DLOG_2_1", "Test_TC_DLOG_2_2", "Test_TC_DLOG_3_1" @@ -112,7 +108,7 @@ "Test_TC_DGGEN_3_1" ], "Identify": ["Test_TC_I_3_1", "Test_TC_I_3_2"], - "IlluminanceMeasurement": ["Test_TC_ILL_2_2", "Test_TC_ILL_3_1"], + "IlluminanceMeasurement": ["Test_TC_ILL_3_1"], "InteractionDataModel": [ "Test_TC_IDM_1_1", "Test_TC_IDM_1_2", @@ -212,11 +208,7 @@ "Test_TC_SU_4_1", "Test_TC_SU_4_2" ], - "PowerSourceConfiguration": [ - "Test_TC_PSCFG_2_1", - "Test_TC_PSCFG_2_2", - "Test_TC_PSCFG_3_1" - ], + "PowerSourceConfiguration": ["Test_TC_PSCFG_2_2", "Test_TC_PSCFG_3_1"], "SecureChannel": [ "Test_TC_SC_1_1", "Test_TC_SC_1_2", @@ -243,7 +235,6 @@ ], "SoftwareDiagnostics": ["Test_TC_DGSW_3_1", "Test_TC_DGSW_3_2"], "WiFiNetworkDiagnostics": [ - "Test_TC_DGWIFI_1_1", "Test_TC_DGWIFI_2_2", "Test_TC_DGWIFI_3_1", "Test_TC_DGWIFI_3_2" @@ -257,7 +248,7 @@ "Test_TC_OCC_3_1", "Test_TC_OCC_3_2" ], - "PressureMeasurement": ["Test_TC_PRS_2_2", "Test_TC_PRS_3_1"], + "PressureMeasurement": ["Test_TC_PRS_3_1"], "PowerSource": ["Test_TC_PS_2_2", "Test_TC_PS_3_1"], "BooleanState": ["Test_TC_BOOL_2_2", "Test_TC_BOOL_3_1"], "ColorControl": [ @@ -283,11 +274,7 @@ "Test_TC_DRLK_3_2", "Test_TC_DRLK_3_3" ], - "LocalizationConfiguration": [ - "Test_TC_LCFG_1_1", - "Test_TC_LCFG_2_1", - "Test_TC_LCFG_3_1" - ], + "LocalizationConfiguration": ["Test_TC_LCFG_2_1", "Test_TC_LCFG_3_1"], "LevelControl": ["Test_TC_LVL_2_3", "Test_TC_LVL_7_1", "Test_TC_LVL_8_1"], "OnOff": ["Test_TC_OO_2_3", "Test_TC_OO_3_1", "Test_TC_OO_3_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2", "Test_TC_RH_3_1"], @@ -310,22 +297,16 @@ "Test_TC_ACT_3_2" ], "TimeFormatLocalization": [ - "Test_TC_LTIME_1_1", "Test_TC_LTIME_1_2", "Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1" ], "UnitLocalization": [ - "Test_TC_LUNIT_1_1", "Test_TC_LUNIT_1_2", "Test_TC_LUNIT_2_1", "Test_TC_LUNIT_3_1" ], - "FixedLabel": [ - "Test_TC_FLABEL_1_1", - "Test_TC_FLABEL_2_1", - "Test_TC_FLABEL_3_1" - ], + "FixedLabel": ["Test_TC_FLABEL_3_1"], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ "Test_TC_S_1_1", @@ -345,7 +326,7 @@ "Test_TC_ACL_2_9", "Test_TC_ACL_2_10" ], - "UserLabel": ["Test_TC_ULABEL_2_1", "Test_TC_ULABEL_3_1"], + "UserLabel": ["Test_TC_ULABEL_3_1"], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_1_1", "Test_TC_BRBINFO_2_1", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 688f40adc364a3..bdd9b181fe77c9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -60,15 +60,19 @@ class TestList : public Command printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); printf("Test_TC_CC_8_1\n"); + printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); + printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLABEL_1_1\n"); + printf("Test_TC_FLABEL_2_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); @@ -79,6 +83,7 @@ class TestList : public Command printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); + printf("Test_TC_ILL_2_2\n"); printf("Test_TC_LVL_1_1\n"); printf("Test_TC_LVL_2_1\n"); printf("Test_TC_LVL_2_2\n"); @@ -86,6 +91,9 @@ class TestList : public Command printf("Test_TC_LVL_4_1\n"); printf("Test_TC_LVL_5_1\n"); printf("Test_TC_LVL_6_1\n"); + printf("Test_TC_LCFG_1_1\n"); + printf("Test_TC_LUNIT_1_1\n"); + printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -135,12 +143,14 @@ class TestList : public Command printf("Test_TC_PS_2_1\n"); printf("Test_TC_PRS_1_1\n"); printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PCC_1_1\n"); printf("Test_TC_PCC_2_1\n"); printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); printf("Test_TC_PSCFG_1_1\n"); + printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SC_4_2\n"); @@ -160,9 +170,11 @@ class TestList : public Command printf("Test_TC_DGTHREAD_2_3\n"); printf("Test_TC_DGTHREAD_2_4\n"); printf("Test_TC_ULABEL_1_1\n"); + printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -239,6 +251,8 @@ class TestList : public Command printf("TestGroupMessaging\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); + printf("Test_TC_G_1_1\n"); + printf("Test_TC_G_2_1\n"); return CHIP_NO_ERROR; } @@ -286,8 +300,6 @@ class ManualTestList : public Command printf("Test_TC_DD_3_21\n"); printf("TestGroupDemoCommand\n"); printf("TestGroupDemoConfig\n"); - printf("Test_TC_G_1_1\n"); - printf("Test_TC_G_2_1\n"); printf("Test_TC_G_2_2\n"); printf("Test_TC_G_2_3\n"); printf("Test_TC_G_3_1\n"); @@ -314,7 +326,6 @@ class ManualTestList : public Command printf("Test_TC_DA_1_5\n"); printf("Test_TC_DA_1_6\n"); printf("Test_TC_DA_1_7\n"); - printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_2_2\n"); printf("Test_TC_BINFO_2_4\n"); printf("Test_TC_OPCREDS_3_1\n"); @@ -341,7 +352,6 @@ class ManualTestList : public Command printf("Test_TC_CNET_4_20\n"); printf("Test_TC_CNET_4_21\n"); printf("Test_TC_CNET_4_22\n"); - printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DLOG_2_1\n"); printf("Test_TC_DLOG_2_2\n"); printf("Test_TC_DLOG_3_1\n"); @@ -356,7 +366,6 @@ class ManualTestList : public Command printf("Test_TC_DGGEN_3_1\n"); printf("Test_TC_I_3_1\n"); printf("Test_TC_I_3_2\n"); - printf("Test_TC_ILL_2_2\n"); printf("Test_TC_ILL_3_1\n"); printf("Test_TC_IDM_1_1\n"); printf("Test_TC_IDM_1_2\n"); @@ -447,7 +456,6 @@ class ManualTestList : public Command printf("Test_TC_SU_3_4\n"); printf("Test_TC_SU_4_1\n"); printf("Test_TC_SU_4_2\n"); - printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_PSCFG_2_2\n"); printf("Test_TC_PSCFG_3_1\n"); printf("Test_TC_SC_1_1\n"); @@ -474,7 +482,6 @@ class ManualTestList : public Command printf("Test_TC_SC_4_10\n"); printf("Test_TC_DGSW_3_1\n"); printf("Test_TC_DGSW_3_2\n"); - printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_2\n"); printf("Test_TC_DGWIFI_3_1\n"); printf("Test_TC_DGWIFI_3_2\n"); @@ -487,7 +494,6 @@ class ManualTestList : public Command printf("Test_TC_OCC_2_4\n"); printf("Test_TC_OCC_3_1\n"); printf("Test_TC_OCC_3_2\n"); - printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PRS_3_1\n"); printf("Test_TC_PS_2_2\n"); printf("Test_TC_PS_3_1\n"); @@ -512,7 +518,6 @@ class ManualTestList : public Command printf("Test_TC_DRLK_3_1\n"); printf("Test_TC_DRLK_3_2\n"); printf("Test_TC_DRLK_3_3\n"); - printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LCFG_2_1\n"); printf("Test_TC_LCFG_3_1\n"); printf("Test_TC_LVL_2_3\n"); @@ -541,16 +546,12 @@ class ManualTestList : public Command printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_1\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LTIME_1_2\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_LUNIT_1_1\n"); printf("Test_TC_LUNIT_1_2\n"); printf("Test_TC_LUNIT_2_1\n"); printf("Test_TC_LUNIT_3_1\n"); - printf("Test_TC_FLABEL_1_1\n"); - printf("Test_TC_FLABEL_2_1\n"); printf("Test_TC_FLABEL_3_1\n"); printf("Test_TC_BIND_2_1\n"); printf("Test_TC_BIND_2_2\n"); @@ -569,7 +570,6 @@ class ManualTestList : public Command printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_9\n"); printf("Test_TC_ACL_2_10\n"); - printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_3_1\n"); printf("Test_TC_BRBINFO_1_1\n"); printf("Test_TC_BRBINFO_2_1\n"); @@ -3227,7 +3227,7 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)"), + VerifyOrDo(!ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, chip::NullOptional); @@ -11683,6 +11683,164 @@ class Test_TC_CC_8_1Suite : public TestCommand } }; +class Test_TC_OPCREDS_1_2Suite : public TestCommand +{ +public: + Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_1_2", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OPCREDS_1_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_BINFO_1_1Suite : public TestCommand { public: @@ -13350,6 +13508,157 @@ class Test_TC_DESC_1_1Suite : public TestCommand } }; +class Test_TC_DLOG_1_1Suite : public TestCommand +{ +public: + Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DLOG_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGETH_1_1Suite : public TestCommand { public: @@ -14497,6 +14806,271 @@ class Test_TC_FLW_2_1Suite : public TestCommand } }; +class Test_TC_FLABEL_1_1Suite : public TestCommand +{ +public: + Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_FLABEL_2_1Suite : public TestCommand +{ +public: + Test_TC_FLABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_2_1", 4, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads LabelList from the DUT"); + VerifyOrDo(!ShouldSkip("FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH tries to write LabelList attribute of the DUT by setting Label = Test_Label, Value= Test_Value"); + VerifyOrDo(!ShouldSkip("FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("Test_Labelgarbage: not in length on purpose", 10); + listHolder_0->mList[0].value = chip::Span("Test_Valuegarbage: not in length on purpose", 10); + + value = + chip::app::DataModel::List(listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads LabelList from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_CGEN_1_1Suite : public TestCommand { public: @@ -16479,10 +17053,10 @@ class Test_TC_ILL_2_1Suite : public TestCommand } }; -class Test_TC_LVL_1_1Suite : public TestCommand +class Test_TC_ILL_2_2Suite : public TestCommand { public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) + Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16490,7 +17064,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LVL_1_1Suite() {} + ~Test_TC_ILL_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -16503,6 +17077,9 @@ class Test_TC_LVL_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable MinMeasuredValue; + chip::app::DataModel::Nullable MaxMeasuredValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -16522,143 +17099,320 @@ class Test_TC_LVL_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + MinMeasuredValue = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + MaxMeasuredValue = value; } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } + shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } + shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads MinMeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("ILL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads MaxMeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("ILL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Cover the sensor or darken the room"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Wait 1s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "After a few seconds, TH reads MeasuredValue attribute from DUT."); + VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Expose the sensor again to light"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Wait 1s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "After a few seconds, TH reads MeasuredValue attribute from DUT."); + VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_1_1Suite : public TestCommand +{ +public: + Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LVL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -16700,49 +17454,49 @@ class Test_TC_LVL_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, "Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); + LogStep(4, "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); + LogStep(5, "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the optonal attribute(MinLevel) in AttributeList"); + LogStep(6, "Read the optional attribute(MinLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optonal attribute(MaxLevel) in AttributeList"); + LogStep(7, "Read the optional attribute(MaxLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Read the optonal attribute(OnOffTransitionTime) in AttributeList"); + LogStep(8, "Read the optional attribute(OnOffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the optonal attribute(OnTransitionTime) in AttributeList"); + LogStep(9, "Read the optional attribute(OnTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Read the optonal attribute(OffTransitionTime) in AttributeList"); + LogStep(10, "Read the optional attribute(OffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the optonal attribute(DefaultMoveRate) in AttributeList"); + LogStep(11, "Read the optional attribute(DefaultMoveRate) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); @@ -19133,10 +19887,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -19281,17 +20035,7 @@ class Test_TC_LVL_6_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Sends stop command to DUT"); + LogStep(9, "Sends stop command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; @@ -19302,6 +20046,16 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } + case 10: { + LogStep(10, "Physically verify that the device has stopped transitioning"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } case 11: { LogStep(11, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), @@ -19381,6 +20135,267 @@ class Test_TC_LVL_6_1Suite : public TestCommand } }; +class Test_TC_LCFG_1_1Suite : public TestCommand +{ +public: + Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_1_1Suite : public TestCommand +{ +public: + Test_TC_LUNIT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LTIME_1_1Suite : public TestCommand +{ +public: + Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LTIME_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_LOWPOWER_1_1Suite : public TestCommand { public: @@ -25893,7 +26908,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; case 4: @@ -28445,6 +29460,128 @@ class Test_TC_PRS_2_1Suite : public TestCommand } }; +class Test_TC_PRS_2_2Suite : public TestCommand +{ +public: + Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_PRS_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::app::DataModel::Nullable ValueBeforeChange; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + ValueBeforeChange = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads from the DUT the MeasuredValue attribute"); + VerifyOrDo(!ShouldSkip("PRS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Operate on device to change the pressure significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "Wait 2s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "After a few seconds, TH reads from the DUT the MeasuredValue attribute"); + VerifyOrDo(!ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_PCC_1_1Suite : public TestCommand { public: @@ -30096,10 +31233,10 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand } }; -class Test_TC_RH_1_1Suite : public TestCommand +class Test_TC_PSCFG_2_1Suite : public TestCommand { public: - Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 7, credsIssuerConfig) + Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_1", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30107,7 +31244,7 @@ class Test_TC_RH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_RH_1_1Suite() {} + ~Test_TC_PSCFG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -30139,67 +31276,8 @@ class Test_TC_RH_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; @@ -30219,52 +31297,27 @@ class Test_TC_RH_1_1Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + LogStep(0, "Commission DUT to TH"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + LogStep(1, "TH reads the Sources attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PSCFG.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, + PowerSourceConfiguration::Attributes::Sources::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_RH_2_1Suite : public TestCommand +class Test_TC_RH_1_1Suite : public TestCommand { public: - Test_TC_RH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_1", 5, credsIssuerConfig) + Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30272,7 +31325,7 @@ class Test_TC_RH_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_RH_2_1Suite() {} + ~Test_TC_RH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -30304,41 +31357,206 @@ class Test_TC_RH_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_RH_2_1Suite : public TestCommand +{ +public: + Test_TC_RH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_1", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_RH_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } break; default: @@ -31244,7 +32462,7 @@ class Test_TC_SC_4_2Suite : public TestCommand class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 12, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -31265,8 +32483,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint32_t FeatureMapValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -31288,30 +32504,12 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - FeatureMapValue = value; + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -31319,7 +32517,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); } break; - case 8: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31335,7 +32533,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 9: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31350,7 +32548,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 10: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31358,7 +32556,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31393,84 +32591,36 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read the global attribute: FeatureMap"); + LogStep(1, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "read the global attribute: ClusterRevision"); + LogStep(2, "read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: AttributeList"); + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the global attribute: AttributeList"); + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: AcceptedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -36953,10 +38103,10 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand } }; -class Test_TC_ULABEL_2_2Suite : public TestCommand +class Test_TC_ULABEL_2_1Suite : public TestCommand { public: - Test_TC_ULABEL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_2", 3, credsIssuerConfig) + Test_TC_ULABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_1", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -36964,7 +38114,7 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ULABEL_2_2Suite() {} + ~Test_TC_ULABEL_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -36994,35 +38144,11 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand shouldContinue = true; break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn( - CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("roomName", 8))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("master bedroom 1", 16))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); - VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); - VerifyOrReturn( - CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("roomType", 8))); - VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); } break; default: @@ -37048,35 +38174,7 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH writes LabelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomNamegarbage: not in length on purpose", 8); - listHolder_0->mList[0].value = chip::Span("master bedroom 1garbage: not in length on purpose", 16); - - listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); - - listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); - listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); - - listHolder_0->mList[3].label = chip::Span("roomTypegarbage: not in length on purpose", 8); - listHolder_0->mList[3].value = chip::Span("bedroomgarbage: not in length on purpose", 7); - - value = - chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads LabelList attribute from the DUT"); + LogStep(1, "TH reads LabelList attribute of the DUT"); VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, chip::NullOptional); @@ -37086,10 +38184,10 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand } }; -class Test_TC_ULABEL_2_3Suite : public TestCommand +class Test_TC_ULABEL_2_2Suite : public TestCommand { public: - Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) + Test_TC_ULABEL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_2", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -37097,7 +38195,140 @@ class Test_TC_ULABEL_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ULABEL_2_3Suite() {} + ~Test_TC_ULABEL_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); + VerifyOrReturn( + CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("roomName", 8))); + VerifyOrReturn( + CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("master bedroom 1", 16))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); + VerifyOrReturn( + CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); + VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); + VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); + VerifyOrReturn( + CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("roomType", 8))); + VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); + VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH writes LabelList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(4); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("roomNamegarbage: not in length on purpose", 8); + listHolder_0->mList[0].value = chip::Span("master bedroom 1garbage: not in length on purpose", 16); + + listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); + listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); + + listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); + listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); + + listHolder_0->mList[3].label = chip::Span("roomTypegarbage: not in length on purpose", 8); + listHolder_0->mList[3].value = chip::Span("bedroomgarbage: not in length on purpose", 7); + + value = + chip::app::DataModel::List(listHolder_0->mList, 4); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads LabelList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3Suite : public TestCommand +{ +public: + Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -37358,6 +38589,226 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand } }; +class Test_TC_DGWIFI_1_1Suite : public TestCommand +{ +public: + Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 10, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DGWIFI_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1Suite : public TestCommand { public: @@ -71927,10 +73378,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } }; -class Test_TC_DD_1_5Suite : public TestCommand +class Test_TC_G_1_1Suite : public TestCommand { public: - Test_TC_DD_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_5", 0, credsIssuerConfig) + Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71938,7 +73389,7 @@ class Test_TC_DD_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_5Suite() {} + ~Test_TC_G_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71963,6 +73414,77 @@ class Test_TC_DD_1_5Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -71978,15 +73500,54 @@ class Test_TC_DD_1_5Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !G.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DD_1_6Suite : public TestCommand +class Test_TC_G_2_1Suite : public TestCommand { public: - Test_TC_DD_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_6", 0, credsIssuerConfig) + Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71994,7 +73555,7 @@ class Test_TC_DD_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_6Suite() {} + ~Test_TC_G_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72007,6 +73568,9 @@ class Test_TC_DD_1_6Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t NameSupportFeatureSupportedValue; + uint8_t NameSupportValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -72019,6 +73583,47 @@ class Test_TC_DD_1_6Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, 128U)); + NameSupportFeatureSupportedValue = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, 0U)); + NameSupportValue = value; + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -72034,15 +73639,55 @@ class Test_TC_DD_1_6Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); + VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 128U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DD_1_7Suite : public TestCommand +class Test_TC_DD_1_5Suite : public TestCommand { public: - Test_TC_DD_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_7", 0, credsIssuerConfig) + Test_TC_DD_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72050,7 +73695,7 @@ class Test_TC_DD_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_7Suite() {} + ~Test_TC_DD_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72095,10 +73740,10 @@ class Test_TC_DD_1_7Suite : public TestCommand } }; -class Test_TC_DD_1_8Suite : public TestCommand +class Test_TC_DD_1_6Suite : public TestCommand { public: - Test_TC_DD_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_8", 0, credsIssuerConfig) + Test_TC_DD_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72106,7 +73751,7 @@ class Test_TC_DD_1_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_8Suite() {} + ~Test_TC_DD_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72151,10 +73796,10 @@ class Test_TC_DD_1_8Suite : public TestCommand } }; -class Test_TC_DD_1_9Suite : public TestCommand +class Test_TC_DD_1_7Suite : public TestCommand { public: - Test_TC_DD_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_9", 0, credsIssuerConfig) + Test_TC_DD_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72162,7 +73807,7 @@ class Test_TC_DD_1_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_9Suite() {} + ~Test_TC_DD_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72207,10 +73852,10 @@ class Test_TC_DD_1_9Suite : public TestCommand } }; -class Test_TC_DD_1_10Suite : public TestCommand +class Test_TC_DD_1_8Suite : public TestCommand { public: - Test_TC_DD_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_10", 0, credsIssuerConfig) + Test_TC_DD_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72218,7 +73863,7 @@ class Test_TC_DD_1_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_10Suite() {} + ~Test_TC_DD_1_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72263,10 +73908,10 @@ class Test_TC_DD_1_10Suite : public TestCommand } }; -class Test_TC_DD_1_11Suite : public TestCommand +class Test_TC_DD_1_9Suite : public TestCommand { public: - Test_TC_DD_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_11", 0, credsIssuerConfig) + Test_TC_DD_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72274,7 +73919,7 @@ class Test_TC_DD_1_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_11Suite() {} + ~Test_TC_DD_1_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72319,10 +73964,10 @@ class Test_TC_DD_1_11Suite : public TestCommand } }; -class Test_TC_DD_1_12Suite : public TestCommand +class Test_TC_DD_1_10Suite : public TestCommand { public: - Test_TC_DD_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_12", 0, credsIssuerConfig) + Test_TC_DD_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72330,7 +73975,7 @@ class Test_TC_DD_1_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_12Suite() {} + ~Test_TC_DD_1_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72375,10 +74020,10 @@ class Test_TC_DD_1_12Suite : public TestCommand } }; -class Test_TC_DD_1_13Suite : public TestCommand +class Test_TC_DD_1_11Suite : public TestCommand { public: - Test_TC_DD_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_13", 0, credsIssuerConfig) + Test_TC_DD_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72386,7 +74031,7 @@ class Test_TC_DD_1_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_13Suite() {} + ~Test_TC_DD_1_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72431,10 +74076,10 @@ class Test_TC_DD_1_13Suite : public TestCommand } }; -class Test_TC_DD_1_14Suite : public TestCommand +class Test_TC_DD_1_12Suite : public TestCommand { public: - Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) + Test_TC_DD_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72442,7 +74087,7 @@ class Test_TC_DD_1_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_14Suite() {} + ~Test_TC_DD_1_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72487,10 +74132,10 @@ class Test_TC_DD_1_14Suite : public TestCommand } }; -class Test_TC_DD_1_15Suite : public TestCommand +class Test_TC_DD_1_13Suite : public TestCommand { public: - Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) + Test_TC_DD_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72498,7 +74143,7 @@ class Test_TC_DD_1_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_15Suite() {} + ~Test_TC_DD_1_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72543,10 +74188,10 @@ class Test_TC_DD_1_15Suite : public TestCommand } }; -class Test_TC_DD_2_1Suite : public TestCommand +class Test_TC_DD_1_14Suite : public TestCommand { public: - Test_TC_DD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_1", 0, credsIssuerConfig) + Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72554,7 +74199,7 @@ class Test_TC_DD_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_2_1Suite() {} + ~Test_TC_DD_1_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72599,10 +74244,10 @@ class Test_TC_DD_2_1Suite : public TestCommand } }; -class Test_TC_DD_2_2Suite : public TestCommand +class Test_TC_DD_1_15Suite : public TestCommand { public: - Test_TC_DD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_2", 0, credsIssuerConfig) + Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72610,7 +74255,7 @@ class Test_TC_DD_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_2_2Suite() {} + ~Test_TC_DD_1_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72655,10 +74300,10 @@ class Test_TC_DD_2_2Suite : public TestCommand } }; -class Test_TC_DD_3_1Suite : public TestCommand +class Test_TC_DD_2_1Suite : public TestCommand { public: - Test_TC_DD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_1", 0, credsIssuerConfig) + Test_TC_DD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72666,7 +74311,7 @@ class Test_TC_DD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_1Suite() {} + ~Test_TC_DD_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72711,10 +74356,10 @@ class Test_TC_DD_3_1Suite : public TestCommand } }; -class Test_TC_DD_3_2Suite : public TestCommand +class Test_TC_DD_2_2Suite : public TestCommand { public: - Test_TC_DD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_2", 0, credsIssuerConfig) + Test_TC_DD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72722,7 +74367,7 @@ class Test_TC_DD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_2Suite() {} + ~Test_TC_DD_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72767,10 +74412,10 @@ class Test_TC_DD_3_2Suite : public TestCommand } }; -class Test_TC_DD_3_3Suite : public TestCommand +class Test_TC_DD_3_1Suite : public TestCommand { public: - Test_TC_DD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_3", 0, credsIssuerConfig) + Test_TC_DD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72778,7 +74423,7 @@ class Test_TC_DD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_3Suite() {} + ~Test_TC_DD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72823,10 +74468,10 @@ class Test_TC_DD_3_3Suite : public TestCommand } }; -class Test_TC_DD_3_4Suite : public TestCommand +class Test_TC_DD_3_2Suite : public TestCommand { public: - Test_TC_DD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_4", 0, credsIssuerConfig) + Test_TC_DD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72834,7 +74479,119 @@ class Test_TC_DD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_4Suite() {} + ~Test_TC_DD_3_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_3_3Suite : public TestCommand +{ +public: + Test_TC_DD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_3", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_3_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_3_4Suite : public TestCommand +{ +public: + Test_TC_DD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74136,413 +75893,28 @@ class TestGroupDemoConfigSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); - } - 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; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Add Group 1 - endpoint 1"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Map Group Key Set to group ID on a given fabric"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Install ACLs for test"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 257ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_1_1Suite : public TestCommand -{ -public: - Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_1Suite : public TestCommand -{ -public: - Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_2Suite : public TestCommand -{ -public: - Test_TC_G_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_3Suite : public TestCommand -{ -public: - Test_TC_G_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_3_1Suite : public TestCommand -{ -public: - Test_TC_G_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + } + 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; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -74558,15 +75930,120 @@ class Test_TC_G_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Add Group 1 - endpoint 1"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::AddGroup::Type value; + value.groupId = 257U; + value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional + + ); + } + case 2: { + LogStep(2, "KeySet Write 1"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Map Group Key Set to group ID on a given fabric"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].groupId = 257U; + listHolder_0->mList[0].groupKeySetID = 417U; + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Install ACLs for test"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = static_cast(5); + listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].subjects.SetNull(); + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = static_cast(3); + listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 257ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_2Suite : public TestCommand +class Test_TC_G_2_2Suite : public TestCommand { public: - Test_TC_G_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_2", 0, credsIssuerConfig) + Test_TC_G_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74574,7 +76051,7 @@ class Test_TC_G_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_G_3_2Suite() {} + ~Test_TC_G_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74619,10 +76096,10 @@ class Test_TC_G_3_2Suite : public TestCommand } }; -class Test_TC_BDX_1_1Suite : public TestCommand +class Test_TC_G_2_3Suite : public TestCommand { public: - Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) + Test_TC_G_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74630,7 +76107,7 @@ class Test_TC_BDX_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_1Suite() {} + ~Test_TC_G_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74675,10 +76152,10 @@ class Test_TC_BDX_1_1Suite : public TestCommand } }; -class Test_TC_BDX_1_2Suite : public TestCommand +class Test_TC_G_3_1Suite : public TestCommand { public: - Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) + Test_TC_G_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74686,7 +76163,7 @@ class Test_TC_BDX_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_2Suite() {} + ~Test_TC_G_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74731,10 +76208,10 @@ class Test_TC_BDX_1_2Suite : public TestCommand } }; -class Test_TC_BDX_1_3Suite : public TestCommand +class Test_TC_G_3_2Suite : public TestCommand { public: - Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) + Test_TC_G_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74742,7 +76219,7 @@ class Test_TC_BDX_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_3Suite() {} + ~Test_TC_G_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74787,10 +76264,10 @@ class Test_TC_BDX_1_3Suite : public TestCommand } }; -class Test_TC_BDX_1_4Suite : public TestCommand +class Test_TC_BDX_1_1Suite : public TestCommand { public: - Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) + Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74798,7 +76275,7 @@ class Test_TC_BDX_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_4Suite() {} + ~Test_TC_BDX_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74843,10 +76320,10 @@ class Test_TC_BDX_1_4Suite : public TestCommand } }; -class Test_TC_BDX_1_5Suite : public TestCommand +class Test_TC_BDX_1_2Suite : public TestCommand { public: - Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) + Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74854,7 +76331,7 @@ class Test_TC_BDX_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_5Suite() {} + ~Test_TC_BDX_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74899,10 +76376,10 @@ class Test_TC_BDX_1_5Suite : public TestCommand } }; -class Test_TC_BDX_1_6Suite : public TestCommand +class Test_TC_BDX_1_3Suite : public TestCommand { public: - Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) + Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74910,7 +76387,7 @@ class Test_TC_BDX_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_6Suite() {} + ~Test_TC_BDX_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74955,10 +76432,10 @@ class Test_TC_BDX_1_6Suite : public TestCommand } }; -class Test_TC_BDX_2_1Suite : public TestCommand +class Test_TC_BDX_1_4Suite : public TestCommand { public: - Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) + Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74966,7 +76443,7 @@ class Test_TC_BDX_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_1Suite() {} + ~Test_TC_BDX_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75011,10 +76488,10 @@ class Test_TC_BDX_2_1Suite : public TestCommand } }; -class Test_TC_BDX_2_2Suite : public TestCommand +class Test_TC_BDX_1_5Suite : public TestCommand { public: - Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) + Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75022,7 +76499,7 @@ class Test_TC_BDX_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_2Suite() {} + ~Test_TC_BDX_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75067,10 +76544,10 @@ class Test_TC_BDX_2_2Suite : public TestCommand } }; -class Test_TC_BDX_2_3Suite : public TestCommand +class Test_TC_BDX_1_6Suite : public TestCommand { public: - Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) + Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75078,7 +76555,7 @@ class Test_TC_BDX_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_3Suite() {} + ~Test_TC_BDX_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75123,10 +76600,10 @@ class Test_TC_BDX_2_3Suite : public TestCommand } }; -class Test_TC_BDX_2_4Suite : public TestCommand +class Test_TC_BDX_2_1Suite : public TestCommand { public: - Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) + Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75134,7 +76611,7 @@ class Test_TC_BDX_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_4Suite() {} + ~Test_TC_BDX_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75179,10 +76656,10 @@ class Test_TC_BDX_2_4Suite : public TestCommand } }; -class Test_TC_BDX_2_5Suite : public TestCommand +class Test_TC_BDX_2_2Suite : public TestCommand { public: - Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) + Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75190,7 +76667,7 @@ class Test_TC_BDX_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_5Suite() {} + ~Test_TC_BDX_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75235,10 +76712,10 @@ class Test_TC_BDX_2_5Suite : public TestCommand } }; -class Test_TC_BR_1Suite : public TestCommand +class Test_TC_BDX_2_3Suite : public TestCommand { public: - Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) + Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75246,7 +76723,7 @@ class Test_TC_BR_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_1Suite() {} + ~Test_TC_BDX_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75291,10 +76768,10 @@ class Test_TC_BR_1Suite : public TestCommand } }; -class Test_TC_BR_2Suite : public TestCommand +class Test_TC_BDX_2_4Suite : public TestCommand { public: - Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) + Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75302,7 +76779,7 @@ class Test_TC_BR_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_2Suite() {} + ~Test_TC_BDX_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75347,10 +76824,10 @@ class Test_TC_BR_2Suite : public TestCommand } }; -class Test_TC_BR_3Suite : public TestCommand +class Test_TC_BDX_2_5Suite : public TestCommand { public: - Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) + Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75358,7 +76835,7 @@ class Test_TC_BR_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_3Suite() {} + ~Test_TC_BDX_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75403,10 +76880,10 @@ class Test_TC_BR_3Suite : public TestCommand } }; -class Test_TC_BR_4Suite : public TestCommand +class Test_TC_BR_1Suite : public TestCommand { public: - Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) + Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75414,7 +76891,7 @@ class Test_TC_BR_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_4Suite() {} + ~Test_TC_BR_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75459,10 +76936,10 @@ class Test_TC_BR_4Suite : public TestCommand } }; -class Test_TC_DA_1_1Suite : public TestCommand +class Test_TC_BR_2Suite : public TestCommand { public: - Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) + Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75470,7 +76947,7 @@ class Test_TC_DA_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_1Suite() {} + ~Test_TC_BR_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75515,10 +76992,10 @@ class Test_TC_DA_1_1Suite : public TestCommand } }; -class Test_TC_DA_1_2Suite : public TestCommand +class Test_TC_BR_3Suite : public TestCommand { public: - Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) + Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75526,7 +77003,7 @@ class Test_TC_DA_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_2Suite() {} + ~Test_TC_BR_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75571,10 +77048,10 @@ class Test_TC_DA_1_2Suite : public TestCommand } }; -class Test_TC_DA_1_3Suite : public TestCommand +class Test_TC_BR_4Suite : public TestCommand { public: - Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) + Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75582,7 +77059,7 @@ class Test_TC_DA_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_3Suite() {} + ~Test_TC_BR_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75627,10 +77104,10 @@ class Test_TC_DA_1_3Suite : public TestCommand } }; -class Test_TC_DA_1_4Suite : public TestCommand +class Test_TC_DA_1_1Suite : public TestCommand { public: - Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) + Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75638,7 +77115,7 @@ class Test_TC_DA_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_4Suite() {} + ~Test_TC_DA_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75683,10 +77160,10 @@ class Test_TC_DA_1_4Suite : public TestCommand } }; -class Test_TC_DA_1_5Suite : public TestCommand +class Test_TC_DA_1_2Suite : public TestCommand { public: - Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75694,7 +77171,7 @@ class Test_TC_DA_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_5Suite() {} + ~Test_TC_DA_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75739,10 +77216,10 @@ class Test_TC_DA_1_5Suite : public TestCommand } }; -class Test_TC_DA_1_6Suite : public TestCommand +class Test_TC_DA_1_3Suite : public TestCommand { public: - Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) + Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75750,7 +77227,7 @@ class Test_TC_DA_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_6Suite() {} + ~Test_TC_DA_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75795,10 +77272,10 @@ class Test_TC_DA_1_6Suite : public TestCommand } }; -class Test_TC_DA_1_7Suite : public TestCommand +class Test_TC_DA_1_4Suite : public TestCommand { public: - Test_TC_DA_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_7", 0, credsIssuerConfig) + Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75806,7 +77283,7 @@ class Test_TC_DA_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_7Suite() {} + ~Test_TC_DA_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75851,11 +77328,10 @@ class Test_TC_DA_1_7Suite : public TestCommand } }; -class Test_TC_OPCREDS_1_2Suite : public TestCommand +class Test_TC_DA_1_5Suite : public TestCommand { public: - Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_1_2", 6, credsIssuerConfig) + Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75863,7 +77339,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_1_2Suite() {} + ~Test_TC_DA_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75888,75 +77364,6 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75972,47 +77379,15 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_BINFO_2_2Suite : public TestCommand +class Test_TC_DA_1_6Suite : public TestCommand { public: - Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 0, credsIssuerConfig) + Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76020,7 +77395,7 @@ class Test_TC_BINFO_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BINFO_2_2Suite() {} + ~Test_TC_DA_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76065,10 +77440,10 @@ class Test_TC_BINFO_2_2Suite : public TestCommand } }; -class Test_TC_BINFO_2_4Suite : public TestCommand +class Test_TC_DA_1_7Suite : public TestCommand { public: - Test_TC_BINFO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_4", 0, credsIssuerConfig) + Test_TC_DA_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76076,7 +77451,7 @@ class Test_TC_BINFO_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BINFO_2_4Suite() {} + ~Test_TC_DA_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76121,11 +77496,10 @@ class Test_TC_BINFO_2_4Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_1Suite : public TestCommand +class Test_TC_BINFO_2_2Suite : public TestCommand { public: - Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) + Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76133,7 +77507,7 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_1Suite() {} + ~Test_TC_BINFO_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76178,11 +77552,10 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_2Suite : public TestCommand +class Test_TC_BINFO_2_4Suite : public TestCommand { public: - Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) + Test_TC_BINFO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76190,7 +77563,7 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_2Suite() {} + ~Test_TC_BINFO_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76235,11 +77608,11 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_3Suite : public TestCommand +class Test_TC_OPCREDS_3_1Suite : public TestCommand { public: - Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76247,7 +77620,7 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_3Suite() {} + ~Test_TC_OPCREDS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76292,11 +77665,11 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_4Suite : public TestCommand +class Test_TC_OPCREDS_3_2Suite : public TestCommand { public: - Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76304,7 +77677,7 @@ class Test_TC_OPCREDS_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_4Suite() {} + ~Test_TC_OPCREDS_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76349,10 +77722,11 @@ class Test_TC_OPCREDS_3_4Suite : public TestCommand } }; -class Test_TC_CNET_4_1Suite : public TestCommand +class Test_TC_OPCREDS_3_3Suite : public TestCommand { public: - Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76360,7 +77734,7 @@ class Test_TC_CNET_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_1Suite() {} + ~Test_TC_OPCREDS_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76405,10 +77779,11 @@ class Test_TC_CNET_4_1Suite : public TestCommand } }; -class Test_TC_CNET_4_2Suite : public TestCommand +class Test_TC_OPCREDS_3_4Suite : public TestCommand { public: - Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76416,7 +77791,7 @@ class Test_TC_CNET_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_2Suite() {} + ~Test_TC_OPCREDS_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76461,10 +77836,10 @@ class Test_TC_CNET_4_2Suite : public TestCommand } }; -class Test_TC_CNET_4_3Suite : public TestCommand +class Test_TC_CNET_4_1Suite : public TestCommand { public: - Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) + Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76472,7 +77847,7 @@ class Test_TC_CNET_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_3Suite() {} + ~Test_TC_CNET_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76517,10 +77892,10 @@ class Test_TC_CNET_4_3Suite : public TestCommand } }; -class Test_TC_CNET_4_4Suite : public TestCommand +class Test_TC_CNET_4_2Suite : public TestCommand { public: - Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) + Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76528,7 +77903,7 @@ class Test_TC_CNET_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_4Suite() {} + ~Test_TC_CNET_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76573,10 +77948,10 @@ class Test_TC_CNET_4_4Suite : public TestCommand } }; -class Test_TC_CNET_4_5Suite : public TestCommand +class Test_TC_CNET_4_3Suite : public TestCommand { public: - Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) + Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76584,7 +77959,7 @@ class Test_TC_CNET_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_5Suite() {} + ~Test_TC_CNET_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76629,10 +78004,10 @@ class Test_TC_CNET_4_5Suite : public TestCommand } }; -class Test_TC_CNET_4_6Suite : public TestCommand +class Test_TC_CNET_4_4Suite : public TestCommand { public: - Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) + Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76640,7 +78015,7 @@ class Test_TC_CNET_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_6Suite() {} + ~Test_TC_CNET_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76685,10 +78060,10 @@ class Test_TC_CNET_4_6Suite : public TestCommand } }; -class Test_TC_CNET_4_9Suite : public TestCommand +class Test_TC_CNET_4_5Suite : public TestCommand { public: - Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) + Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76696,7 +78071,7 @@ class Test_TC_CNET_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_9Suite() {} + ~Test_TC_CNET_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76741,10 +78116,10 @@ class Test_TC_CNET_4_9Suite : public TestCommand } }; -class Test_TC_CNET_4_10Suite : public TestCommand +class Test_TC_CNET_4_6Suite : public TestCommand { public: - Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) + Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76752,7 +78127,7 @@ class Test_TC_CNET_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_10Suite() {} + ~Test_TC_CNET_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76797,10 +78172,10 @@ class Test_TC_CNET_4_10Suite : public TestCommand } }; -class Test_TC_CNET_4_11Suite : public TestCommand +class Test_TC_CNET_4_9Suite : public TestCommand { public: - Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) + Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76808,7 +78183,7 @@ class Test_TC_CNET_4_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_11Suite() {} + ~Test_TC_CNET_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76853,10 +78228,10 @@ class Test_TC_CNET_4_11Suite : public TestCommand } }; -class Test_TC_CNET_4_12Suite : public TestCommand +class Test_TC_CNET_4_10Suite : public TestCommand { public: - Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) + Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76864,7 +78239,7 @@ class Test_TC_CNET_4_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_12Suite() {} + ~Test_TC_CNET_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76909,10 +78284,10 @@ class Test_TC_CNET_4_12Suite : public TestCommand } }; -class Test_TC_CNET_4_13Suite : public TestCommand +class Test_TC_CNET_4_11Suite : public TestCommand { public: - Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) + Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76920,7 +78295,7 @@ class Test_TC_CNET_4_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_13Suite() {} + ~Test_TC_CNET_4_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76965,10 +78340,10 @@ class Test_TC_CNET_4_13Suite : public TestCommand } }; -class Test_TC_CNET_4_14Suite : public TestCommand +class Test_TC_CNET_4_12Suite : public TestCommand { public: - Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) + Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76976,7 +78351,7 @@ class Test_TC_CNET_4_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_14Suite() {} + ~Test_TC_CNET_4_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77021,10 +78396,10 @@ class Test_TC_CNET_4_14Suite : public TestCommand } }; -class Test_TC_CNET_4_15Suite : public TestCommand +class Test_TC_CNET_4_13Suite : public TestCommand { public: - Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) + Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77032,7 +78407,7 @@ class Test_TC_CNET_4_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_15Suite() {} + ~Test_TC_CNET_4_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77077,10 +78452,10 @@ class Test_TC_CNET_4_15Suite : public TestCommand } }; -class Test_TC_CNET_4_16Suite : public TestCommand +class Test_TC_CNET_4_14Suite : public TestCommand { public: - Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) + Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77088,7 +78463,7 @@ class Test_TC_CNET_4_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_16Suite() {} + ~Test_TC_CNET_4_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77133,10 +78508,10 @@ class Test_TC_CNET_4_16Suite : public TestCommand } }; -class Test_TC_CNET_4_17Suite : public TestCommand +class Test_TC_CNET_4_15Suite : public TestCommand { public: - Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) + Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77144,7 +78519,7 @@ class Test_TC_CNET_4_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_17Suite() {} + ~Test_TC_CNET_4_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77189,10 +78564,10 @@ class Test_TC_CNET_4_17Suite : public TestCommand } }; -class Test_TC_CNET_4_18Suite : public TestCommand +class Test_TC_CNET_4_16Suite : public TestCommand { public: - Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77200,7 +78575,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_18Suite() {} + ~Test_TC_CNET_4_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77245,10 +78620,10 @@ class Test_TC_CNET_4_18Suite : public TestCommand } }; -class Test_TC_CNET_4_19Suite : public TestCommand +class Test_TC_CNET_4_17Suite : public TestCommand { public: - Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77256,7 +78631,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_19Suite() {} + ~Test_TC_CNET_4_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77301,10 +78676,10 @@ class Test_TC_CNET_4_19Suite : public TestCommand } }; -class Test_TC_CNET_4_20Suite : public TestCommand +class Test_TC_CNET_4_18Suite : public TestCommand { public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) + Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77312,7 +78687,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_20Suite() {} + ~Test_TC_CNET_4_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77357,10 +78732,10 @@ class Test_TC_CNET_4_20Suite : public TestCommand } }; -class Test_TC_CNET_4_21Suite : public TestCommand +class Test_TC_CNET_4_19Suite : public TestCommand { public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) + Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77368,7 +78743,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_21Suite() {} + ~Test_TC_CNET_4_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77413,10 +78788,10 @@ class Test_TC_CNET_4_21Suite : public TestCommand } }; -class Test_TC_CNET_4_22Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) + Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77424,7 +78799,7 @@ class Test_TC_CNET_4_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_22Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77469,10 +78844,10 @@ class Test_TC_CNET_4_22Suite : public TestCommand } }; -class Test_TC_DLOG_1_1Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 0, credsIssuerConfig) + Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77480,7 +78855,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_1_1Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77525,10 +78900,10 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_CNET_4_22Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77536,7 +78911,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_CNET_4_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77581,10 +78956,10 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77592,7 +78967,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77637,10 +79012,10 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77648,7 +79023,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77693,10 +79068,10 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77704,7 +79079,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77749,10 +79124,10 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_DESC_2_2Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) + Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77760,7 +79135,7 @@ class Test_TC_DESC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77805,10 +79180,10 @@ class Test_TC_DESC_2_2Suite : public TestCommand } }; -class Test_TC_DGETH_3_1Suite : public TestCommand +class Test_TC_DESC_2_2Suite : public TestCommand { public: - Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) + Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77816,7 +79191,7 @@ class Test_TC_DGETH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1Suite() {} + ~Test_TC_DESC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77861,10 +79236,10 @@ class Test_TC_DGETH_3_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_2Suite : public TestCommand +class Test_TC_DGETH_3_1Suite : public TestCommand { public: - Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) + Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77872,7 +79247,7 @@ class Test_TC_DGETH_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_2Suite() {} + ~Test_TC_DGETH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77917,10 +79292,10 @@ class Test_TC_DGETH_3_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_2Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) + Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77928,7 +79303,7 @@ class Test_TC_CGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_2Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77973,10 +79348,10 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77984,7 +79359,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_4Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78029,10 +79404,10 @@ class Test_TC_CGEN_2_4Suite : public TestCommand } }; -class Test_TC_DGGEN_2_2Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78040,7 +79415,7 @@ class Test_TC_DGGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_2_2Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78085,10 +79460,10 @@ class Test_TC_DGGEN_2_2Suite : public TestCommand } }; -class Test_TC_DGGEN_2_3Suite : public TestCommand +class Test_TC_DGGEN_2_2Suite : public TestCommand { public: - Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) + Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78096,7 +79471,7 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_2_3Suite() {} + ~Test_TC_DGGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78141,10 +79516,10 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand } }; -class Test_TC_DGGEN_3_1Suite : public TestCommand +class Test_TC_DGGEN_2_3Suite : public TestCommand { public: - Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) + Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78152,7 +79527,7 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_3_1Suite() {} + ~Test_TC_DGGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78197,10 +79572,10 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand } }; -class Test_TC_I_3_1Suite : public TestCommand +class Test_TC_DGGEN_3_1Suite : public TestCommand { public: - Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) + Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78208,7 +79583,7 @@ class Test_TC_I_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_1Suite() {} + ~Test_TC_DGGEN_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78253,10 +79628,10 @@ class Test_TC_I_3_1Suite : public TestCommand } }; -class Test_TC_I_3_2Suite : public TestCommand +class Test_TC_I_3_1Suite : public TestCommand { public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) + Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78264,7 +79639,7 @@ class Test_TC_I_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_2Suite() {} + ~Test_TC_I_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78309,10 +79684,10 @@ class Test_TC_I_3_2Suite : public TestCommand } }; -class Test_TC_ILL_2_2Suite : public TestCommand +class Test_TC_I_3_2Suite : public TestCommand { public: - Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 0, credsIssuerConfig) + Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78320,7 +79695,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ILL_2_2Suite() {} + ~Test_TC_I_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -86166,62 +87541,6 @@ class Test_TC_SU_4_2Suite : public TestCommand } }; -class Test_TC_PSCFG_2_1Suite : public TestCommand -{ -public: - Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_PSCFG_2_2Suite : public TestCommand { public: @@ -87678,62 +88997,6 @@ class Test_TC_DGSW_3_2Suite : public TestCommand } }; -class Test_TC_DGWIFI_1_1Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGWIFI_2_2Suite : public TestCommand { public: @@ -88246,7 +89509,7 @@ class Test_TC_OCC_2_2Suite : public TestCommand class Test_TC_OCC_2_3Suite : public TestCommand { public: - Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 0, credsIssuerConfig) + Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -88279,6 +89542,30 @@ class Test_TC_OCC_2_3Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -88294,6 +89581,25 @@ class Test_TC_OCC_2_3Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Reads mandatory attribute constrains: OccupancySensorType"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -88522,62 +89828,6 @@ class Test_TC_OCC_3_2Suite : public TestCommand } }; -class Test_TC_PRS_2_2Suite : public TestCommand -{ -public: - Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_PRS_3_1Suite : public TestCommand { public: @@ -93411,62 +94661,6 @@ class Test_TC_DRLK_3_3Suite : public TestCommand } }; -class Test_TC_LCFG_1_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_LCFG_2_1Suite : public TestCommand { public: @@ -95892,178 +97086,10 @@ class Test_TC_RH_3_1Suite : public TestCommand } }; -class Test_TC_SWTCH_2_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_2Suite : public TestCommand +class Test_TC_SWTCH_2_2Suite : public TestCommand { public: - Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) + Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96071,7 +97097,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_2_2Suite() {} + ~Test_TC_SWTCH_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96084,8 +97110,6 @@ class Test_TC_TMP_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::app::DataModel::Nullable valueBeforeChange; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -96098,56 +97122,6 @@ class Test_TC_TMP_2_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -96163,56 +97137,15 @@ class Test_TC_TMP_2_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - 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(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_1Suite : public TestCommand { public: - Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96220,7 +97153,7 @@ class Test_TC_TMP_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1Suite() {} + ~Test_TC_SWTCH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96265,10 +97198,10 @@ class Test_TC_TMP_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96276,7 +97209,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_1Suite() {} + ~Test_TC_SWTCH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96321,10 +97254,10 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_TMP_2_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96332,7 +97265,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_TMP_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96345,6 +97278,8 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable valueBeforeChange; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -96357,6 +97292,56 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + valueBeforeChange = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -96372,15 +97357,56 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the temperature significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1Suite : public TestCommand +class Test_TC_TMP_3_1Suite : public TestCommand { public: - Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) + Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96388,7 +97414,7 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSUIC_3_1Suite() {} + ~Test_TC_TMP_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96433,11 +97459,10 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_TSTAT_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96445,7 +97470,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_TSTAT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96490,11 +97515,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96502,7 +97526,7 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96547,11 +97571,10 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_2Suite : public TestCommand +class Test_TC_TSUIC_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) + Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96559,7 +97582,7 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_2Suite() {} + ~Test_TC_TSUIC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96604,11 +97627,11 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_3Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96616,7 +97639,7 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_3Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96661,11 +97684,11 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_4Suite : public TestCommand +class Test_TC_DGTHREAD_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96673,7 +97696,7 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_4Suite() {} + ~Test_TC_DGTHREAD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96718,11 +97741,11 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_5Suite : public TestCommand +class Test_TC_DGTHREAD_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96730,7 +97753,7 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_5Suite() {} + ~Test_TC_DGTHREAD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96775,10 +97798,11 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_3Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96786,7 +97810,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_DGTHREAD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96831,10 +97855,11 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_DGTHREAD_3_4Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96842,7 +97867,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_DGTHREAD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96887,10 +97912,11 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_5Suite : public TestCommand { public: - Test_TC_ACT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96898,7 +97924,7 @@ class Test_TC_ACT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1Suite() {} + ~Test_TC_DGTHREAD_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96943,10 +97969,10 @@ class Test_TC_ACT_3_1Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96954,7 +97980,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96999,10 +98025,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_1_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97010,7 +98036,7 @@ class Test_TC_LTIME_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97055,10 +98081,10 @@ class Test_TC_LTIME_1_1Suite : public TestCommand } }; -class Test_TC_LTIME_1_2Suite : public TestCommand +class Test_TC_ACT_3_1Suite : public TestCommand { public: - Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 0, credsIssuerConfig) + Test_TC_ACT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97066,7 +98092,7 @@ class Test_TC_LTIME_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_2Suite() {} + ~Test_TC_ACT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97111,10 +98137,10 @@ class Test_TC_LTIME_1_2Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97122,7 +98148,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97167,10 +98193,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_LTIME_1_2Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97178,7 +98204,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} + ~Test_TC_LTIME_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97203,6 +98229,85 @@ class Test_TC_LTIME_3_1Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97218,71 +98323,64 @@ class Test_TC_LTIME_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1Suite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads GeneratedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { } return CHIP_NO_ERROR; } }; -class Test_TC_LUNIT_1_2Suite : public TestCommand +class Test_TC_LTIME_2_1Suite : public TestCommand { public: - Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 0, credsIssuerConfig) + Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97290,7 +98388,7 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_1_2Suite() {} + ~Test_TC_LTIME_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97335,10 +98433,10 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand } }; -class Test_TC_LUNIT_2_1Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_LUNIT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_2_1", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97346,7 +98444,7 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_2_1Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97391,10 +98489,10 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand } }; -class Test_TC_LUNIT_3_1Suite : public TestCommand +class Test_TC_LUNIT_1_2Suite : public TestCommand { public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) + Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97402,7 +98500,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_3_1Suite() {} + ~Test_TC_LUNIT_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97434,47 +98532,76 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97498,74 +98625,56 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads TemperatureUnit attribute from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH reads the ClusterRevision from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + UnitLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + LogStep(3, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 4: { - LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(4, "TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(6, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads GeneratedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH writes 5 to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLABEL_1_1Suite : public TestCommand +class Test_TC_LUNIT_2_1Suite : public TestCommand { public: - Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 0, credsIssuerConfig) + Test_TC_LUNIT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97573,7 +98682,7 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLABEL_1_1Suite() {} + ~Test_TC_LUNIT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97618,10 +98727,10 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand } }; -class Test_TC_FLABEL_2_1Suite : public TestCommand +class Test_TC_LUNIT_3_1Suite : public TestCommand { public: - Test_TC_FLABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_2_1", 0, credsIssuerConfig) + Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97629,7 +98738,7 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLABEL_2_1Suite() {} + ~Test_TC_LUNIT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97654,6 +98763,54 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97669,6 +98826,73 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads TemperatureUnit attribute from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(0); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(1); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH writes 5 to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(5); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -98682,62 +99906,6 @@ class Test_TC_ACL_2_10Suite : public TestCommand } }; -class Test_TC_ULABEL_2_1Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_ULABEL_3_1Suite : public TestCommand { public: @@ -99058,15 +100226,19 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99077,6 +100249,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99084,6 +100257,9 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99133,12 +100309,14 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99158,9 +100336,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99237,6 +100417,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99273,8 +100455,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99301,7 +100481,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99328,7 +100507,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99343,7 +100521,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99434,7 +100611,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99461,7 +100637,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99474,7 +100649,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99499,7 +100673,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99528,16 +100701,12 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99556,7 +100725,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 bae5330c2f3812..f53567df8ac080 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -55,14 +55,17 @@ class TestList : public Command { printf("Test_TC_CC_6_1\n"); printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); + printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); + printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLABEL_1_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); @@ -73,6 +76,7 @@ class TestList : public Command { printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); + printf("Test_TC_ILL_2_2\n"); printf("Test_TC_LVL_1_1\n"); printf("Test_TC_LVL_2_1\n"); printf("Test_TC_LVL_2_2\n"); @@ -80,6 +84,9 @@ class TestList : public Command { printf("Test_TC_LVL_4_1\n"); printf("Test_TC_LVL_5_1\n"); printf("Test_TC_LVL_6_1\n"); + printf("Test_TC_LCFG_1_1\n"); + printf("Test_TC_LUNIT_1_1\n"); + printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -126,12 +133,14 @@ class TestList : public Command { printf("Test_TC_PS_2_1\n"); printf("Test_TC_PRS_1_1\n"); printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PCC_1_1\n"); printf("Test_TC_PCC_2_1\n"); printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); printf("Test_TC_PSCFG_1_1\n"); + printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SWTCH_1_1\n"); @@ -145,9 +154,11 @@ class TestList : public Command { printf("Test_TC_TSUIC_2_2\n"); printf("Test_TC_DGTHREAD_1_1\n"); printf("Test_TC_ULABEL_1_1\n"); + printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -220,6 +231,7 @@ class TestList : public Command { printf("Test_TC_DRLK_2_9\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); + printf("Test_TC_G_1_1\n"); return CHIP_NO_ERROR; } @@ -3583,7 +3595,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)")) { + if (ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )")) { NextTest(); return; } @@ -16873,6 +16885,256 @@ class Test_TC_CC_7_4 : public TestCommandBridge { } }; +class Test_TC_OPCREDS_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OPCREDS_1_2() + : TestCommandBridge("Test_TC_OPCREDS_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_OPCREDS_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OPCREDS_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OPCREDS_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 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + 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; + } + + // 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 = 6; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from 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 TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from 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 TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_BINFO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -17687,11 +17949,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } }; -class Test_TC_DGETH_1_1 : public TestCommandBridge { +class Test_TC_DLOG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_1_1() - : TestCommandBridge("Test_TC_DGETH_1_1") + Test_TC_DLOG_1_1() + : TestCommandBridge("Test_TC_DLOG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -17701,7 +17963,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_1_1() {} + ~Test_TC_DLOG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -17709,11 +17971,11 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLOG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLOG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -17743,23 +18005,270 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGETH.S.F00 || DGETH.S.F01")) { - NextTest(); - return; - } err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 ")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + 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; + } + + // 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 = 6; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from 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 TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from 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 TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT 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 TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList 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(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT 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_DGETH_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGETH_1_1() + : TestCommandBridge("Test_TC_DGETH_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_DGETH_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_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 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGETH.S.F00 || DGETH.S.F01")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 ")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_6(); break; } @@ -19795,11 +20304,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { } }; -class Test_TC_CGEN_1_1 : public TestCommandBridge { +class Test_TC_FLABEL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_1_1() - : TestCommandBridge("Test_TC_CGEN_1_1") + Test_TC_FLABEL_1_1() + : TestCommandBridge("Test_TC_FLABEL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -19809,7 +20318,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_1_1() {} + ~Test_TC_FLABEL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -19817,11 +20326,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLABEL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLABEL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -19838,24 +20347,270 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + 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; + } + + // 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 = 6; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from 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 TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from 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 TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from 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, 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 TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT 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_CGEN_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_1_1() + : TestCommandBridge("Test_TC_CGEN_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_CGEN_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_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 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; } @@ -23171,11 +23926,11 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { } }; -class Test_TC_LVL_1_1 : public TestCommandBridge { +class Test_TC_ILL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_1_1() - : TestCommandBridge("Test_TC_LVL_1_1") + Test_TC_ILL_2_2() + : TestCommandBridge("Test_TC_ILL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -23185,7 +23940,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_1_1() {} + ~Test_TC_ILL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -23193,11 +23948,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -23214,104 +23969,402 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsMinMeasuredValueAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("LVL.S.F00 || LVL.S.F01 || LVL.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Cover the sensor or darken the room\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheOptonalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4(); + err = TestCoverTheSensorOrDarkenTheRoom_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 1s\n"); + err = TestWait1s_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in " - "AttributeList\n"); - if (ShouldSkip("LVL.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptonalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optonal attribute(MinLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Expose the sensor again to light\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheOptonalAttributeMinLevelInAttributeList_6(); + err = TestExposeTheSensorAgainToLight_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optonal attribute(MaxLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0003")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeMaxLevelInAttributeList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1s\n"); + err = TestWait1s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optonal attribute(OnOffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeOnOffTransitionTimeInAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optonal attribute(OnTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptonalAttributeOnTransitionTimeInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optonal attribute(OffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0013")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeOffTransitionTimeInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optonal attribute(DefaultMoveRate) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0014")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeDefaultMoveRateInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_14(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_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; + } + + // 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 = 9; + + 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); + } + NSNumber * _Nullable MinMeasuredValue; + + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + } + { + MinMeasuredValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable MaxMeasuredValue; + + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + } + { + MaxMeasuredValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCoverTheSensorOrDarkenTheRoom_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 TestWait1s_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestExposeTheSensorAgainToLight_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 TestWait1s_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_1_1() + : TestCommandBridge("Test_TC_LVL_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_LVL_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_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 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("LVL.S.F00 || LVL.S.F01 || LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.F01")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " + "AttributeList\n"); + if (ShouldSkip("LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(MinLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMinLevelInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MaxLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMaxLevelInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_14(); break; } @@ -23468,7 +24521,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23477,7 +24530,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23491,7 +24544,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23500,7 +24553,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23515,7 +24568,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeMinLevelInAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23524,7 +24577,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(MinLevel) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23537,7 +24590,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeMaxLevelInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23546,7 +24599,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(MaxLevel) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23559,7 +24612,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOnOffTransitionTimeInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23568,7 +24621,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OnOffTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23581,7 +24634,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOnTransitionTimeInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23590,7 +24643,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OnTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23603,7 +24656,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOffTransitionTimeInAttributeList_10() + CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23612,7 +24665,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OffTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23625,7 +24678,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeDefaultMoveRateInAttributeList_11() + CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23634,7 +24687,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(DefaultMoveRate) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28595,20 +29648,20 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestWait5000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestSendsStopCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_10(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); @@ -28930,16 +29983,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() - { - 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 TestSendsStopCommandToDut_10() + CHIP_ERROR TestSendsStopCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28962,6 +30006,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() + { + 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 TestThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29118,11 +30171,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } }; -class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { +class Test_TC_LCFG_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_LCFG_1_1() + : TestCommandBridge("Test_TC_LCFG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29132,7 +30185,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LOWPOWER_1_1() {} + ~Test_TC_LCFG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29140,11 +30193,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_LCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29161,24 +30214,24 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); break; } @@ -29236,14 +30289,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29259,14 +30313,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29282,49 +30337,48 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads 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)); + 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 TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"TH reads AcceptedCommandList 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")); @@ -29334,14 +30388,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29358,11 +30413,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } }; -class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { +class Test_TC_LUNIT_1_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_LUNIT_1_1() + : TestCommandBridge("Test_TC_LUNIT_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29372,7 +30427,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_KEYPADINPUT_1_2() {} + ~Test_TC_LUNIT_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29380,11 +30435,151 @@ 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_LUNIT_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_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++) { + } + + 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) { + } + + // 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 = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; +}; + +class Test_TC_LTIME_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LTIME_1_1() + : TestCommandBridge("Test_TC_LTIME_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_LTIME_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_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++) { + } + + 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) { + } + + // 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 = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; +}; + +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; } @@ -29401,15 +30596,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: @@ -29483,13 +30674,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29508,9 +30697,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29518,10 +30705,12 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29531,9 +30720,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29541,13 +30728,17 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { 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)); + { + 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(); }]; @@ -29557,9 +30748,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29567,9 +30756,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -29579,9 +30772,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29589,9 +30780,12 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -29599,11 +30793,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { } }; -class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { +class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APPLAUNCHER_1_3() - : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") + Test_TC_KEYPADINPUT_1_2() + : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29613,7 +30807,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_APPLAUNCHER_1_3() {} + ~Test_TC_KEYPADINPUT_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29621,11 +30815,252 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); + 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 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + 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; + } + + // 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 = 6; + + 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 TestReadTheGlobalAttributeClusterRevision_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"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 TestReadTheGlobalAttributeFeatureMap_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList 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 TestReadTheGlobalAttributeAcceptedCommandList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_APPLAUNCHER_1_3() + : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") + , 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_APPLAUNCHER_1_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -39681,7 +41116,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); NextTest(); }]; @@ -44407,11 +45842,11 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { } }; -class Test_TC_PCC_1_1 : public TestCommandBridge { +class Test_TC_PRS_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_1_1() - : TestCommandBridge("Test_TC_PCC_1_1") + Test_TC_PRS_2_2() + : TestCommandBridge("Test_TC_PRS_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -44421,7 +45856,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_1_1() {} + ~Test_TC_PRS_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -44429,11 +45864,11 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -44450,170 +45885,358 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); - err = TestThReadsTheAttributeListAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000a")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000b")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000c")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000")) { NextTest(); return; } - err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + err = TestThReadsFromTheDutTheMeasuredValueAttribute_1(); break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0014")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Operate on device to change the pressure significantly\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange")) { NextTest(); return; } - err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + err = TestOperateOnDeviceToChangeThePressureSignificantly_2(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0015")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 2s\n"); + err = TestWait2s_3(); break; - case 17: + case 4: ChipLogProgress( - chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0016")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0017")) { + chipTool, " ***** Test Step 4 : After a few seconds, TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0021")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); + err = TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4(); + 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; + } + + // 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 = 5; + + 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); + } + NSNumber * _Nullable ValueBeforeChange; + + CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the MeasuredValue attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + ValueBeforeChange = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestOperateOnDeviceToChangeThePressureSignificantly_2() + { + 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 TestWait2s_3() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads from the DUT the MeasuredValue attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("measuredValue", value, ValueBeforeChange)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_PCC_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_PCC_1_1() + : TestCommandBridge("Test_TC_PCC_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_PCC_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_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 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); + err = TestThReadsTheAttributeListAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0010")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0014")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0016")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0021")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); break; } @@ -47705,6 +49328,120 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { } }; +class Test_TC_PSCFG_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_PSCFG_2_1() + : TestCommandBridge("Test_TC_PSCFG_2_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_PSCFG_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_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 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the Sources attribute from the DUT\n"); + if (ShouldSkip("PSCFG.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheSourcesAttributeFromTheDut_1(); + 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; + } + + // 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 = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheSourcesAttributeFromTheDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Sources attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("sources", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_RH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -48248,76 +49985,41 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); + if (ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_2(); + err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_4(); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03")) { - NextTest(); - return; - } - err = TestCheckValuesOfFlagsInThisFeatureMap_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestCheckValuesOfFlagsInThisFeatureMap_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("!SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -48351,21 +50053,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { 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. @@ -48379,7 +50066,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -48392,22 +50079,21 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull FeatureMapValue; - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_1() + CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - FeatureMapValue = value; - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); NextTest(); }]; @@ -48415,52 +50101,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_2() - { - 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 TestCheckValuesOfFlagsInThisFeatureMap_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 TestCheckValuesOfFlagsInThisFeatureMap_4() - { - 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 TestCheckValuesOfFlagsInThisFeatureMap_5() - { - 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 TestCheckValuesOfFlagsInThisFeatureMap_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 TestReadTheGlobalAttributeClusterRevision_7() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48482,7 +50123,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48509,7 +50150,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48535,7 +50176,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48553,7 +50194,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -57345,11 +58986,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { } }; -class Test_TC_ULABEL_2_2 : public TestCommandBridge { +class Test_TC_ULABEL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_2() - : TestCommandBridge("Test_TC_ULABEL_2_2") + Test_TC_ULABEL_2_1() + : TestCommandBridge("Test_TC_ULABEL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -57359,7 +59000,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ULABEL_2_2() {} + ~Test_TC_ULABEL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -57367,11 +59008,11 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -57388,20 +59029,12 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads LabelList attribute of the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThReadsLabelListAttributeFromTheDut_2(); + err = TestThReadsLabelListAttributeOfTheDut_1(); break; } @@ -57420,9 +59053,6 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -57436,7 +59066,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; @@ -57450,73 +59080,18 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; - - temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; - - temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; - - temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; - - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); - VerifyOrReturn( - CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); - VerifyOrReturn( - CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); - } - VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); NextTest(); }]; @@ -57524,11 +59099,11 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { } }; -class Test_TC_ULABEL_2_3 : public TestCommandBridge { +class Test_TC_ULABEL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_3() - : TestCommandBridge("Test_TC_ULABEL_2_3") + Test_TC_ULABEL_2_2() + : TestCommandBridge("Test_TC_ULABEL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -57538,7 +59113,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ULABEL_2_3() {} + ~Test_TC_ULABEL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -57546,11 +59121,11 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -57567,20 +59142,20 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThWritesLabelListAttributeOfTheDut_1(); + err = TestThWritesLabelListAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThWritesLabelListAttributeOfTheDut_2(); + err = TestThReadsLabelListAttributeFromTheDut_2(); break; } @@ -57597,10 +59172,189 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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 = 3; + + 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 TestThWritesLabelListAttributeFromTheDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; + + temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; + + temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; + + temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); + VerifyOrReturn( + CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); + VerifyOrReturn( + CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); + } + + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_3() + : TestCommandBridge("Test_TC_ULABEL_2_3") + , 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_ULABEL_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\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 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThWritesLabelListAttributeOfTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThWritesLabelListAttributeOfTheDut_2(); + 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -57928,6 +59682,394 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { } }; +class Test_TC_DGWIFI_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGWIFI_1_1() + : TestCommandBridge("Test_TC_DGWIFI_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_DGWIFI_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_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 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGWIFI.S.F01 ")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_9(); + 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; + } + + // 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 = 10; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from 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 TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from 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, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + 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 TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.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, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT 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_DGWIFI_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -122195,6 +124337,282 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { } }; +class Test_TC_G_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_G_1_1() + : TestCommandBridge("Test_TC_G_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_G_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_G_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_G_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 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !G.S.F00 ")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_6(); + 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; + } + + // 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 = 7; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from 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 TestThReadsTheFeatureMapFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from 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, 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 TestThReadsAcceptedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + #endif // CONFIG_ENABLE_YAML_TESTS void registerCommandsTests(Commands & commands) @@ -122227,14 +124645,17 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122245,6 +124666,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122252,6 +124674,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122298,12 +124723,14 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122317,9 +124744,11 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122392,6 +124821,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), #endif // CONFIG_ENABLE_YAML_TESTS }; From 06457aea2d2112e76f88c95ee4ab0e22a9dbe9f5 Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Tue, 16 Aug 2022 17:06:29 -0700 Subject: [PATCH 041/115] Feedback from Android commissioning fixes (#21927) * Feedback from Android commissioning fixes * Update src/controller/java/src/chip/devicecontroller/ChipDeviceController.java Co-authored-by: Tennessee Carmel-Veilleux * Update src/controller/java/src/chip/devicecontroller/ChipDeviceController.java Co-authored-by: Tennessee Carmel-Veilleux * Update src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h Co-authored-by: Tennessee Carmel-Veilleux * Restyle Feedback from Android commissioning fixes (#21928) * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format Co-authored-by: Restyled.io Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io --- src/controller/CHIPDeviceController.h | 6 +++++ .../AndroidOperationalCredentialsIssuer.cpp | 1 - .../java/CHIPDeviceController-JNI.cpp | 15 ++++++++++- .../ChipDeviceController.java | 27 +++++++++++++++---- .../DacOnlyPartialAttestationVerifier.cpp | 6 ++++- .../DacOnlyPartialAttestationVerifier.h | 26 ++++++++++++++++++ 6 files changed, 73 insertions(+), 8 deletions(-) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 78581dca42c657..f5a4ddf281618a 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -561,6 +561,12 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, */ CHIP_ERROR NetworkCredentialsReady(); + /** + * @brief + * This function returns the current CommissioningStage for this commissioner. + */ + CommissioningStage GetCommissioningStage() { return mCommissioningStage; } + #if CONFIG_NETWORK_LAYER_BLE #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE /** diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index 249921ae17c923..59872b01486b52 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -205,7 +205,6 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B P256PublicKey pubkey; ReturnErrorOnFailure(VerifyCertificateSigningRequest(csr.data(), csr.size(), pubkey)); - // TODO: verify signed by DAC creds? ChipLogProgress(chipTool, "VerifyCertificateSigningRequest"); jobject csrInfo; diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 2020eb27e45d8a..2f2ccb58cd9d5a 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -524,7 +524,9 @@ JNI_METHOD(void, setUseJavaCallbackForNOCRequest) if (useCallback) { - // if we are assigning a callback, then make the device commissioner delegate verification to the cloud + // if we are assigning a callback, then make the device commissioner delegate verification to the + // PartialDACVerifier so that DAC chain and CD validation can be performed by custom code + // triggered by ChipDeviceController.NOCChainIssuer.onNOCChainGenerationNeeded(). wrapper->Controller()->SetDeviceAttestationVerifier(wrapper->GetPartialDACVerifier()); } else @@ -554,6 +556,17 @@ JNI_METHOD(void, updateCommissioningNetworkCredentials) ChipLogError(Controller, "UpdateCommissioningParameters failed. Err = %" CHIP_ERROR_FORMAT, err.Format()); JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); } + + // Only invoke NetworkCredentialsReady when called in response to NetworkScan result + if (wrapper->Controller()->GetCommissioningStage() == CommissioningStage::kNeedsNetworkCreds) + { + err = wrapper->Controller()->NetworkCredentialsReady(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "NetworkCredentialsReady failed. Err = %" CHIP_ERROR_FORMAT, err.Format()); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } + } } JNI_METHOD(jbyteArray, convertX509CertToMatterCert) diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 541f83e40aba99..97627b56c4ce1f 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -63,9 +63,17 @@ public void setScanNetworksListener(ScanNetworksListener listener) { } /** - * Sets this DeviceController to use the given issuer for issuing operational certs. By default, - * the DeviceController uses an internal, OperationalCredentialsDelegate (see - * AndroidOperationalCredentialsIssuer) + * Sets this DeviceController to use the given issuer for issuing operational certs and verifying + * the DAC. By default, the DeviceController uses an internal, OperationalCredentialsDelegate (see + * AndroidOperationalCredentialsIssuer). + * + *

When a NOCChainIssuer is set for this controller, then onNOCChainGenerationNeeded will be + * called when the NOC CSR needs to be signed and DAC verified. This allows for custom credentials + * issuer and DAC verifier implementations, for example, when a proprietary cloud API will perform + * DAC verification and the CSR signing. + * + *

When a NOCChainIssuer is set for this controller, the PartialDACVerifier will be used rather + * than the DefaultDACVerifier. * * @param issuer */ @@ -692,8 +700,12 @@ protected void finalize() throws Throwable { public interface NOCChainIssuer { /** * When a NOCChainIssuer is set for this controller, then onNOCChainGenerationNeeded will be - * called when the NOC CSR needs to be signed. This allows for custom credentials issuer - * implementations, for example, when a proprietary cloud API will perform the CSR signing. + * called when the DAC chain must be verified and NOC chain needs to be issued from a CSR. This + * allows for custom credentials issuer and DAC verifier implementations, for example, when a + * proprietary cloud API will perform DAC verification and the NOC chain issuance from CSR. + * + *

When a NOCChainIssuer is set for this controller, the PartialDACVerifier will be used + * rather than the DefaultDACVerifier. * *

The commissioning workflow will stop upon the onNOCChainGenerationNeeded callback and * resume once onNOCChainGeneration is called. @@ -716,6 +728,11 @@ public interface NOCChainIssuer { *

Set the AttemptNetworkScanWiFi or AttemptNetworkScanThread to configure the enable/disable * WiFi or Thread network scan during commissioning in the the default CommissioningDelegate used * by the ChipDeviceCommissioner. + * + *

When the callbacks onScanNetworksFailure or onScanNetworksSuccess are invoked, the + * commissioning flow has reached the kNeedsNetworkCreds and will wait to advance until this + * device controller's updateCommissioningNetworkCredentials method is called with the desired + * network credentials set. */ public interface ScanNetworksListener { /** Notifies when scan networks call fails. */ diff --git a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp index e37155886d61ce..4dd6ab7d35a8f2 100644 --- a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp +++ b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.cpp @@ -36,6 +36,10 @@ namespace Credentials { // As per specifications section 11.22.5.1. Constant RESP_MAX constexpr size_t kMaxResponseLength = 900; +/** + * The implementation should track DefaultDACVerifier::VerifyAttestationInformation but with the checks + * disabled that are outlined at the top of DacOnlyPartialAttestationVerifier.h. + */ void PartialDACVerifier::VerifyAttestationInformation(const DeviceAttestationVerifier::AttestationInfo & info, Callback::Callback * onCompletion) { @@ -144,7 +148,7 @@ void PartialDACVerifier::VerifyAttestationInformation(const DeviceAttestationVer } exit: - onCompletion->mCall(onCompletion->mContext, attestationError); // TODO: is this check getting done? + onCompletion->mCall(onCompletion->mContext, attestationError); } } // namespace Credentials diff --git a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h index acd28f66d71054..a987c7c9779ce7 100644 --- a/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h +++ b/src/credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h @@ -21,11 +21,37 @@ namespace chip { namespace Credentials { +/** + * @brief + * This class is based upon the DefaultDACVerifier but has all checks removed which require + * local availability of trust anchors that are not available from the commissionee, such as the + * PAA root certificates and the CSA keys used to sign the Certification Declaration (CD). + * + * This class should only be used in conjunction with an OperationalCredentialsDelegate + * which performs the removed checks. For example, an OperationalCredentialsDelegate implementation + * might send the DAC chain and signed CD to custom code which obtains these keys from the DCL. + * + * Specifically, the following list of checks have been removed: + * (1) Make sure the PAA is valid and approved by CSA. + * (2) vid-scoped PAA check: if the PAA is vid scoped, then its vid must match the DAC vid. + * (3) cert chain check: verify PAI is signed by PAA, and DAC is signed by PAI. + * (4) PAA subject key id extraction: the PAA subject key must match the PAA key referenced in the PAI. + * (5) CD signature check: make sure a valid CSA CD key is used to sign the CD. + * + * Any other checks performed by the DefaultDACVerifier should be performed here too. Changes + * made to DefaultDACVerifier::VerifyAttestationInformation should be made to + * PartialDACVerifier::VerifyAttestationInformation. + */ class PartialDACVerifier : public DefaultDACVerifier { public: PartialDACVerifier() {} + /** + * @brief + * The implementation should track DefaultDACVerifier::VerifyAttestationInformation but with the checks + * disabled that are outlined at the top of DacOnlyPartialAttestationVerifier.h. + */ void VerifyAttestationInformation(const DeviceAttestationVerifier::AttestationInfo & info, Callback::Callback * onCompletion) override; From 4b2de040ec8ecd8f7cd99e3fad4498542eb5c3d6 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 09:34:26 +0530 Subject: [PATCH 042/115] Sync OTA provider device type with specs (#21916) * Sync OTA provider device type with specs * Addressed review comments --- .../zcl/data-model/chip/matter-devices.xml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 0de5946644ac62..dbeae0bfb4cc4a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -134,24 +134,14 @@ limitations under the License. 0x0103 0x0014 - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - - BINDING - - + From 7ff2bda41887b7a3840e72c1723b5177ebabfd8d Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Wed, 17 Aug 2022 10:45:43 +0530 Subject: [PATCH 043/115] Added updated Manual scripts (#21949) * Added Updated Manual scripts * Added Auto generted file * Restyled by whitespace * Restyled by clang-format Co-authored-by: Restyled.io --- .../certification/Test_TC_ACL_2_10.yaml | 38 +- .../suites/certification/Test_TC_ACL_2_3.yaml | 149 +- .../suites/certification/Test_TC_ACL_2_4.yaml | 44 +- .../suites/certification/Test_TC_ACL_2_5.yaml | 132 +- .../suites/certification/Test_TC_ACL_2_6.yaml | 24 +- .../suites/certification/Test_TC_ACL_2_7.yaml | 20 +- .../suites/certification/Test_TC_ACL_2_8.yaml | 49 +- .../suites/certification/Test_TC_ACL_2_9.yaml | 30 +- .../Test_TC_APPLAUNCHER_1_3.yaml | 3 + .../certification/Test_TC_CADMIN_1_1.yaml | 32 +- .../certification/Test_TC_CADMIN_1_2.yaml | 26 +- .../certification/Test_TC_CADMIN_1_7.yaml | 10 +- .../certification/Test_TC_CADMIN_1_8.yaml | 8 +- .../suites/certification/Test_TC_CC_2_2.yaml | 179 +- .../suites/certification/Test_TC_CC_3_4.yaml | 21 +- .../suites/certification/Test_TC_CC_5_4.yaml | 29 +- .../suites/certification/Test_TC_CC_6_4.yaml | 136 +- .../suites/certification/Test_TC_CC_7_5.yaml | 26 +- .../suites/certification/Test_TC_CC_9_4.yaml | 53 +- .../certification/Test_TC_CNET_1_3.yaml | 73 +- .../certification/Test_TC_CNET_4_12.yaml | 22 +- .../suites/certification/Test_TC_DD_1_11.yaml | 1 + .../suites/certification/Test_TC_IDM_7_1.yaml | 3030 +++++++---------- .../Test_TC_KEYPADINPUT_3_1.yaml | 3 + .../certification/Test_TC_OPCREDS_3_1.yaml | 218 +- .../certification/Test_TC_OPCREDS_3_4.yaml | 5 +- .../certification/Test_TC_OPCREDS_3_5.yaml | 6 +- 27 files changed, 2010 insertions(+), 2357 deletions(-) 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 f90dbde49ac69c..839480f42307ce 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 @@ -29,7 +29,7 @@ tests: DUT sudo ./chip-all-clusters-app - TH + TH1 ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true @@ -38,7 +38,7 @@ tests: CurrentFabricIndex attribute" verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - + On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 [1658329512.220471][3036:3041] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 [1658329512.220529][3036:3041] CHIP:TOO: CurrentFabricIndex: 1 [1658329512.220601][3036:3041] CHIP:EM: Sending Standalone Ack for MessageCounter:23447431 on exchange 2287i @@ -51,7 +51,7 @@ tests: Open a commissioning window On TH(Chiptool)1 using below command ./chip-tool administratorcommissioning open-basic-commissioning-window 180 1 0 --timedInteractionTimeoutMs 1000 - On TH(Chiptool)2, verify DUT is commissioned On TH(Chiptool)2 fabric + On TH1(Chiptool), verify DUT is commissioned On TH2(Chiptool) fabric [1657286379.420840][4724:4729] CHIP:DMG: InvokeResponseMessage = [1657286379.420894][4724:4729] CHIP:DMG: { @@ -100,7 +100,7 @@ tests: CurrentFabricIndex attribute" verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 2 + On TH2(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 2 1658329570.828165][4563:4568] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 [1658329570.831838][4563:4568] CHIP:TOO: CurrentFabricIndex: 2 @@ -116,9 +116,9 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]" 1 0 - On TH(Chiptool)1 , Verify Successfully AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]" 1 0 + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements [1658329787.635523][3056:3061] CHIP:DMG: WriteClient moving to [ResponseRe] [1658329787.635615][3056:3061] CHIP:DMG: WriteResponseMessage = @@ -192,11 +192,11 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH(Chiptool)2 , Verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 2 elements + On TH2(Chiptool), Verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 2 elements [1658329868.113411][4587:4592] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -269,7 +269,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH(Chiptool)1 , Verify Successfully to extension attribute list containg one element + On TH1(Chiptool) , Verify Successfully to extension attribute list containg one element [1658330105.863185][3079:3084] CHIP:DMG: WriteClient moving to [ResponseRe] [1658330105.863237][3079:3084] CHIP:DMG: WriteResponseMessage = [1658330105.863262][3079:3084] CHIP:DMG: { @@ -324,7 +324,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH(Chiptool)2 , Verify Successfully extension attribute list containg one element . + On TH1(Chiptool), Verify Successfully extension attribute list containg one element . [1658819083.842765][8349:8354] CHIP:EM: Removed CHIP MessageCounter:249057275 from RetransTable on exchange 59888i [1658819083.842800][8349:8354] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -390,7 +390,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 [1657289627.393651][5251:5256] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 [1657289627.393731][5251:5256] CHIP:TOO: ACL: 2 entries @@ -418,7 +418,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool)1 , Verify Successfully AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool) , Verify Successfully AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 [1657289676.947323][5260:5265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 @@ -434,7 +434,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH(Chiptool) 2, Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F1 + On TH2(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F1 [1657289713.626327][19279:19284] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 @@ -464,7 +464,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH(Chiptool)2 , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 + On TH2(Chiptool) , Verify 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 @@ -485,7 +485,7 @@ tests: verification: | ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH(Chiptool)1 , Verify successfully removed fabric F2 + On TH1(Chiptool), Verify successfully removed fabric F2 [1657289809.358455][19309:19314] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1657289809.358500][19309:19314] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -499,7 +499,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool)1 , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 @@ -529,7 +529,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool)1 , Verify Successfully to AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool), Verify Successfully to AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 [1657289881.142883][5283:5288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml index 7716b52cdfab1b..57e02159a3319b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml @@ -35,7 +35,7 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool), verify the CurrentFabricIndex attribute of operationalCredential cluster as 1 + On TH1(Chiptool), verify the CurrentFabricIndex attribute of operationalCredential cluster as 1 [1658323393.451141][2316:2321] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3882577299 [1658323393.465921][2316:2321] CHIP:TOO: CurrentFabricIndex: 1 @@ -47,7 +47,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify the extension attribute contains an empty list + On TH1(Chiptool) , Verify the extension attribute contains an empty list [1657116435.352869][2667:2672] CHIP:DMG: SuppressResponse = true, [1657116435.352904][2667:2672] CHIP:DMG: InteractionModelRevision = 1 @@ -65,7 +65,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element [1656416335.284463][3747:3752] CHIP:DMG: WriteResponseMessage = [1656416335.284498][3747:3752] CHIP:DMG: { @@ -111,7 +111,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify value is list of AccessControlExtensionStructcontaining 1 element . Data field: D_OK_EMPTY : "1718" + On TH1(Chiptool) , Verify value is list of AccessControlExtensionStructcontaining 1 element . Data field: D_OK_EMPTY : "1718" FabricIndex field: F1 @@ -162,7 +162,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element . + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element . [1656416899.781899][3814:3819] CHIP:DMG: WriteResponseMessage = @@ -217,7 +217,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify the AccessControlExtensionStruct containing 1 element 1.struct + On TH1(Chiptool) , Verify the AccessControlExtensionStruct containing 1 element 1.struct Data field: D_OK_SINGLE :"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" [1657278788.400832][9048:9053] CHIP:DMG: ReportDataMessage = @@ -291,7 +291,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element [1656417544.279572][3888:3893] CHIP:DMG: WriteResponseMessage = [1656417544.279598][3888:3893] CHIP:DMG: { [1656417544.279620][3888:3893] CHIP:DMG: AttributeStatusIBs = @@ -334,7 +334,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify AccessControlExtensionStructcontaining 1 element 1.struct + On TH1(Chiptool) , Verify AccessControlExtensionStructcontaining 1 element 1.struct Data field: D_OK_FULL :"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018" @@ -408,37 +408,9 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) - 1657279033.590101][9081:9086] CHIP:DMG: WriteResponseMessage = - [1657279033.590134][9081:9086] CHIP:DMG: { - [1657279033.590167][9081:9086] CHIP:DMG: AttributeStatusIBs = - [1657279033.590214][9081:9086] CHIP:DMG: [ - [1657279033.590255][9081:9086] CHIP:DMG: AttributeStatusIB = - [1657279033.590301][9081:9086] CHIP:DMG: { - [1657279033.590364][9081:9086] CHIP:DMG: AttributePathIB = - [1657279033.590415][9081:9086] CHIP:DMG: { - [1657279033.590601][9081:9086] CHIP:DMG: Endpoint = 0x0, - [1657279033.590656][9081:9086] CHIP:DMG: Cluster = 0x1f, - [1657279033.590705][9081:9086] CHIP:DMG: Attribute = 0x0000_0001, - [1657279033.590791][9081:9086] CHIP:DMG: } - [1657279033.590851][9081:9086] CHIP:DMG: - [1657279033.590901][9081:9086] CHIP:DMG: StatusIB = - [1657279033.590948][9081:9086] CHIP:DMG: { - [1657279033.590994][9081:9086] CHIP:DMG: status = 0x00 (SUCCESS), - [1657279033.591040][9081:9086] CHIP:DMG: }, - [1657279033.591090][9081:9086] CHIP:DMG: - [1657279033.591130][9081:9086] CHIP:DMG: }, - [1657279033.591184][9081:9086] CHIP:DMG: - [1657279033.591223][9081:9086] CHIP:DMG: AttributeStatusIB = - [1657279033.591266][9081:9086] CHIP:DMG: { - [1657279033.591306][9081:9086] CHIP:DMG: AttributePathIB = - [1657279033.591353][9081:9086] CHIP:DMG: { - [1657279033.591399][9081:9086] CHIP:DMG: Endpoint = 0x0, - [1657279033.591453][9081:9086] CHIP:DMG: Cluster = 0x1f, - [1657279033.591502][9081:9086] CHIP:DMG: Attribute = 0x0000_0001, - [1657279033.591551][9081:9086] CHIP:DMG: ListIndex = Null, - [1657279033.591600][9081:9086] CHIP:DMG: } - [1657279033.591651][9081:9086] CHIP:DMG: + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) + + [1657279033.591694][9081:9086] CHIP:DMG: StatusIB = [1657279033.591739][9081:9086] CHIP:DMG: { [1657279033.591784][9081:9086] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), @@ -466,38 +438,9 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"1518"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) - - [1657609094.514337][8195:8200] CHIP:DMG: WriteResponseMessage = - [1657609094.514410][8195:8200] CHIP:DMG: { - [1657609094.514447][8195:8200] CHIP:DMG: AttributeStatusIBs = - [1657609094.514495][8195:8200] CHIP:DMG: [ - [1657609094.514534][8195:8200] CHIP:DMG: AttributeStatusIB = - [1657609094.514580][8195:8200] CHIP:DMG: { - [1657609094.514623][8195:8200] CHIP:DMG: AttributePathIB = - [1657609094.514676][8195:8200] CHIP:DMG: { - [1657609094.514725][8195:8200] CHIP:DMG: Endpoint = 0x0, - [1657609094.514775][8195:8200] CHIP:DMG: Cluster = 0x1f, - [1657609094.514825][8195:8200] CHIP:DMG: Attribute = 0x0000_0001, - [1657609094.514870][8195:8200] CHIP:DMG: } - [1657609094.514920][8195:8200] CHIP:DMG: - [1657609094.514963][8195:8200] CHIP:DMG: StatusIB = - [1657609094.515008][8195:8200] CHIP:DMG: { - [1657609094.515055][8195:8200] CHIP:DMG: status = 0x00 (SUCCESS), - [1657609094.515100][8195:8200] CHIP:DMG: }, - [1657609094.515145][8195:8200] CHIP:DMG: - [1657609094.515184][8195:8200] CHIP:DMG: }, - [1657609094.515236][8195:8200] CHIP:DMG: - [1657609094.515271][8195:8200] CHIP:DMG: AttributeStatusIB = - [1657609094.515310][8195:8200] CHIP:DMG: { - [1657609094.515347][8195:8200] CHIP:DMG: AttributePathIB = - [1657609094.515390][8195:8200] CHIP:DMG: { - [1657609094.515437][8195:8200] CHIP:DMG: Endpoint = 0x0, - [1657609094.515485][8195:8200] CHIP:DMG: Cluster = 0x1f, - [1657609094.515533][8195:8200] CHIP:DMG: Attribute = 0x0000_0001, - [1657609094.515582][8195:8200] CHIP:DMG: ListIndex = Null, - [1657609094.515625][8195:8200] CHIP:DMG: } - [1657609094.515672][8195:8200] CHIP:DMG: + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) + + [1657609094.515713][8195:8200] CHIP:DMG: StatusIB = [1657609094.515754][8195:8200] CHIP:DMG: { [1657609094.515797][8195:8200] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), @@ -522,38 +465,9 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) - - [1657609434.913859][8206:8211] CHIP:DMG: WriteResponseMessage = - [1657609434.913892][8206:8211] CHIP:DMG: { - [1657609434.913920][8206:8211] CHIP:DMG: AttributeStatusIBs = - [1657609434.913959][8206:8211] CHIP:DMG: [ - [1657609434.913991][8206:8211] CHIP:DMG: AttributeStatusIB = - [1657609434.914030][8206:8211] CHIP:DMG: { - [1657609434.914066][8206:8211] CHIP:DMG: AttributePathIB = - [1657609434.914111][8206:8211] CHIP:DMG: { - [1657609434.914151][8206:8211] CHIP:DMG: Endpoint = 0x0, - [1657609434.914192][8206:8211] CHIP:DMG: Cluster = 0x1f, - [1657609434.914233][8206:8211] CHIP:DMG: Attribute = 0x0000_0001, - [1657609434.914271][8206:8211] CHIP:DMG: } - [1657609434.914314][8206:8211] CHIP:DMG: - [1657609434.914351][8206:8211] CHIP:DMG: StatusIB = - [1657609434.914427][8206:8211] CHIP:DMG: { - [1657609434.914466][8206:8211] CHIP:DMG: status = 0x00 (SUCCESS), - [1657609434.914503][8206:8211] CHIP:DMG: }, - [1657609434.914540][8206:8211] CHIP:DMG: - [1657609434.914575][8206:8211] CHIP:DMG: }, - [1657609434.914618][8206:8211] CHIP:DMG: - [1657609434.914648][8206:8211] CHIP:DMG: AttributeStatusIB = - [1657609434.914680][8206:8211] CHIP:DMG: { - [1657609434.914711][8206:8211] CHIP:DMG: AttributePathIB = - [1657609434.914747][8206:8211] CHIP:DMG: { - [1657609434.914784][8206:8211] CHIP:DMG: Endpoint = 0x0, - [1657609434.914828][8206:8211] CHIP:DMG: Cluster = 0x1f, - [1657609434.914872][8206:8211] CHIP:DMG: Attribute = 0x0000_0001, - [1657609434.914911][8206:8211] CHIP:DMG: ListIndex = Null, - [1657609434.914952][8206:8211] CHIP:DMG: } - [1657609434.914994][8206:8211] CHIP:DMG: + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) + + [1657609434.915033][8206:8211] CHIP:DMG: StatusIB = [1657609434.915073][8206:8211] CHIP:DMG: { [1657609434.915115][8206:8211] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), @@ -578,7 +492,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) [1657609579.494576][8215:8220] CHIP:DMG: @@ -606,7 +520,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) [1657609625.259137][8223:8228] CHIP:DMG: [1657609625.259168][8223:8228] CHIP:DMG: StatusIB = @@ -633,19 +547,8 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) - - [1657609654.299183][8229:8234] CHIP:DMG: - [1657609654.299220][8229:8234] CHIP:DMG: AttributeStatusIB = - [1657609654.299259][8229:8234] CHIP:DMG: { - [1657609654.299296][8229:8234] CHIP:DMG: AttributePathIB = - [1657609654.299340][8229:8234] CHIP:DMG: { - [1657609654.299385][8229:8234] CHIP:DMG: Endpoint = 0x0, - [1657609654.299434][8229:8234] CHIP:DMG: Cluster = 0x1f, - [1657609654.299483][8229:8234] CHIP:DMG: Attribute = 0x0000_0001, - [1657609654.299531][8229:8234] CHIP:DMG: ListIndex = Null, - [1657609654.299576][8229:8234] CHIP:DMG: } - [1657609654.299625][8229:8234] CHIP:DMG: + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) + [1657609654.299668][8229:8234] CHIP:DMG: StatusIB = [1657609654.299712][8229:8234] CHIP:DMG: { [1657609654.299758][8229:8234] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), @@ -669,7 +572,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":""}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) [1657609694.046042][8236:8241] CHIP:DMG: @@ -699,7 +602,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements and CONSTRAINT_ERROR (0x87) for second element path + On TH1(Chiptool) , Verify Successfully AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements and CONSTRAINT_ERROR (0x87) for second element path [1657279798.809590][9208:9213] CHIP:DMG: [1657279798.809629][9208:9213] CHIP:DMG: StatusIB = @@ -724,7 +627,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify Successfully the list of AccessControlExtensionStruct containing 1 element. + On TH1(Chiptool) , Verify Successfully the list of AccessControlExtensionStruct containing 1 element. 1657279968.695899][9221:9226] CHIP:DMG: ReportDataMessage = @@ -795,7 +698,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[]" 1 0 - On TH(Chiptool) , Verify Successfully,AccessControl cluster Extension attribute, value is an empty list + On TH1(Chiptool) , Verify Successfully,AccessControl cluster Extension attribute, value is an empty list 7625][1521:1526] CHIP:DMG: AttributeStatusIB = [1657692723.227673][1521:1526] CHIP:DMG: { @@ -829,7 +732,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is an empty list + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is an empty list [1660223145.427219][80697:80702] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2385810240 [1660223145.427227][80697:80702] CHIP:TOO: Extension: 0 entries diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 62b04fb0ab7a70..9e74143347d01c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -36,7 +36,7 @@ tests: ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 1 + On TH1(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 1 [1656652012.060584][2763:2768] CHIP:DMG: [1656652012.060609][2763:2768] CHIP:DMG: SuppressResponse = true, @@ -54,7 +54,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element [1656652338.381499][2784:2789] CHIP:DMG: }, [1656652338.381552][2784:2789] CHIP:DMG: @@ -91,7 +91,7 @@ tests: ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 - On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool), Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = [1658323877.660890][2502:2507] CHIP:DMG: { @@ -176,7 +176,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements InteractionModelRevision = 1 [1658229676.712083][4872:4878] CHIP:DMG: } [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 @@ -237,7 +237,7 @@ tests: verification: | ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = [1658226959.554706][4736:4741] CHIP:DMG: [ [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = @@ -313,7 +313,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool), Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 9800.959293][4892:4897] CHIP:DMG: [1658229800.959325][4892:4897] CHIP:DMG: ], [1658229800.959399][4892:4897] CHIP:DMG: @@ -378,7 +378,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool)1, Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool), Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = [1657276276.709058][2297:2302] CHIP:DMG: { @@ -461,7 +461,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool), Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 @@ -536,7 +536,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = @@ -618,7 +618,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278352.938811][2258:2263] CHIP:DMG: [1657278352.938840][2258:2263] CHIP:DMG: }, @@ -689,7 +689,7 @@ tests: ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 - On TH(Chiptool) 1, Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. + On TH1(Chiptool) , Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = @@ -771,7 +771,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null + On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null [1656656511.643560][2994:2999] CHIP:DMG: [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 @@ -822,7 +822,7 @@ tests: ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool) 1, Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH1(Chiptool) , Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = [1656507141.628515][3224:3229] CHIP:DMG: { @@ -890,7 +890,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH1(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507318.740283][3241:3246] CHIP:DMG: ], [1656507318.740346][3241:3246] CHIP:DMG: @@ -927,7 +927,7 @@ tests: verification: | ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool)1 , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + On TH1(Chiptool), Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = [1656507439.868671][3249:3254] CHIP:DMG: { @@ -994,7 +994,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507517.730614][3261:3266] CHIP:DMG: [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, @@ -1027,7 +1027,7 @@ tests: verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - On TH(Chiptool)1, verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS + On TH1(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS [1656657490.002372][3078:3083] CHIP:DMG: [1656657490.002408][3078:3083] CHIP:DMG: ], @@ -1051,7 +1051,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 - On TH(Chiptool)1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null + On TH1(Chiptool), Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1120,7 +1120,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null + On TH1(Chiptool) , Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null [1656928460.992030][4255:4260] CHIP:DMG: ], [1656928460.992075][4255:4260] CHIP:DMG: [1656928460.992101][4255:4260] CHIP:DMG: SuppressResponse = true, @@ -1163,7 +1163,7 @@ tests: ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 - On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = [1656509348.174272][3403:3408] CHIP:DMG: { @@ -1232,7 +1232,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH1(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509471.738046][3416:3421] CHIP:DMG: [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, [1656509471.738120][3416:3421] CHIP:DMG: InteractionModelRevision = 1 @@ -1267,7 +1267,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH(Chiptool)1, verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS + On TH1(Chiptool), verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS [1656509737.166763][3434:3439] CHIP:DMG: [1656509737.166786][3434:3439] CHIP:DMG: ], [1656509737.166816][3434:3439] CHIP:DMG: diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml index 91a400018d4ce2..a2815f360a1d95 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml @@ -26,7 +26,11 @@ config: tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | - verification step to be updated. + DUT + sudo ./chip-all-clusters-app + + TH1 + ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true - label: @@ -35,29 +39,15 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 - - [1657283596.149202][2284:2289] CHIP:DMG: { - [1657283596.149247][2284:2289] CHIP:DMG: Endpoint = 0x0, - [1657283596.149293][2284:2289] CHIP:DMG: Cluster = 0x3e, - [1657283596.149340][2284:2289] CHIP:DMG: Attribute = 0x0000_0005, - [1657283596.149384][2284:2289] CHIP:DMG: } - [1657283596.149430][2284:2289] CHIP:DMG: - [1657283596.149479][2284:2289] CHIP:DMG: Data = 1, - [1657283596.149520][2284:2289] CHIP:DMG: }, - [1657283596.149565][2284:2289] CHIP:DMG: - [1657283596.149602][2284:2289] CHIP:DMG: }, - [1657283596.149643][2284:2289] CHIP:DMG: - [1657283596.149674][2284:2289] CHIP:DMG: ], - [1657283596.149714][2284:2289] CHIP:DMG: + On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 + + [1657283596.149747][2284:2289] CHIP:DMG: SuppressResponse = true, [1657283596.149781][2284:2289] CHIP:DMG: InteractionModelRevision = 1 [1657283596.149813][2284:2289] CHIP:DMG: } [1657283596.150010][2284:2289] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 485742003 [1657283596.152307][2284:2289] CHIP:TOO: CurrentFabricIndex: 1 [1657283596.152411][2284:2289] CHIP:EM: Sending Standalone Ack for MessageCounter:50620552 on exchange 25474i - [1657283596.152498][2284:2289] CHIP:IN: Prepared secure message 0xffffab7ed958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 25474i with MessageCounter:219007987. - [1657283596.152548][2284 disabled: true - label: @@ -67,7 +57,7 @@ tests: verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool), Verify AccessControl cluster AccessControlExtensionChanged event value is an empty list + On TH1(Chiptool), Verify AccessControl cluster AccessControlExtensionChanged event value is an empty list 848.856174][2311:2316] CHIP:EM: Removed CHIP MessageCounter:265690133 from RetransTable on exchange 23190i [1657283848.856239][2311:2316] CHIP:DMG: ReportDataMessage = @@ -87,7 +77,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH(Chiptool), Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element + On TH1(Chiptool), Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element 217.510779][2371:2376] CHIP:DMG: AttributePathIB = [1657284217.510818][2371:2376] CHIP:DMG: { @@ -135,7 +125,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool), Verify AccessControlExtensionChanged containing 1 element + On TH1(Chiptool), Verify AccessControlExtensionChanged containing 1 element [1657618132.685459][8992:8998] CHIP:DMG: [1657618132.685495][8992:8998] CHIP:DMG: SuppressResponse = true, @@ -165,7 +155,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify Successfully extension attribute list containg one element + On TH1(Chiptool) , Verify Successfully extension attribute list containg one element 7284747.131523][2411:2416] CHIP:DMG: StatusIB = [1657284747.131568][2411:2416] CHIP:DMG: { [1657284747.131618][2411:2416] CHIP:DMG: status = 0x00 (SUCCESS), @@ -205,7 +195,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool) , Verify AccessControlExtensionChanged containing at least 2 new elements. + On TH1(Chiptool) , Verify AccessControlExtensionChanged containing at least 2 new elements. [1657618237.140162][9007:9012] CHIP:DMG: } @@ -262,37 +252,10 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element Data, exceeds maximum length. - - 1657287642.551842][9699:9704] CHIP:DMG: WriteResponseMessage = - [1657287642.551872][9699:9704] CHIP:DMG: { - [1657287642.551901][9699:9704] CHIP:DMG: AttributeStatusIBs = - [1657287642.551940][9699:9704] CHIP:DMG: [ - [1657287642.551973][9699:9704] CHIP:DMG: AttributeStatusIB = - [1657287642.552012][9699:9704] CHIP:DMG: { - [1657287642.552061][9699:9704] CHIP:DMG: AttributePathIB = - [1657287642.552116][9699:9704] CHIP:DMG: { - [1657287642.552156][9699:9704] CHIP:DMG: Endpoint = 0x0, - [1657287642.552197][9699:9704] CHIP:DMG: Cluster = 0x1f, - [1657287642.552290][9699:9704] CHIP:DMG: Attribute = 0x0000_0001, - [1657287642.552331][9699:9704] CHIP:DMG: } - [1657287642.552375][9699:9704] CHIP:DMG: - [1657287642.552409][9699:9704] CHIP:DMG: StatusIB = - [1657287642.552447][9699:9704] CHIP:DMG: { - [1657287642.552488][9699:9704] CHIP:DMG: status = 0x00 (SUCCESS), - [1657287642.552526][9699:9704] CHIP:DMG: }, - [1657287642.552564][9699:9704] CHIP:DMG: - [1657287642.552598][9699:9704] CHIP:DMG: }, - [1657287642.552641][9699:9704] CHIP:DMG: - [1657287642.552671][9699:9704] CHIP:DMG: AttributeStatusIB = - [1657287642.552704][9699:9704] CHIP:DMG: { - [1657287642.552741][9699:9704] CHIP:DMG: AttributePathIB = - [1657287642.552797][9699:9704] CHIP:DMG: { - [1657287642.552836][9699:9704] CHIP:DMG: Endpoint = 0x0, - [1657287642.552882][9699:9704] CHIP:DMG: Cluster = 0x1f, - [1657287642.552922][9699:9704] CHIP:DMG: Attribute = 0x0000_0001, - [1657287642.552962][9699:9704] CHIP:DMG: ListIndex = Null, - [1657287642.552999][9699:9704] CHIP:DMG: } + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element Data, exceeds maximum length. + + + [1657287642.553045][9699:9704] CHIP:DMG: [1657287642.553083][9699:9704] CHIP:DMG: StatusIB = [1657287642.553121][9699:9704] CHIP:DMG: { @@ -317,7 +280,7 @@ tests: verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged containing at least 1 new element, and MUST NOT contain an added event for the extension with data that is too large + On TH1(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged containing at least 1 new element, and MUST NOT contain an added event for the extension with data that is too large [1657618374.299423][9024:9029] CHIP:DMG: } [1657618374.299739][9024:9029] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 @@ -388,55 +351,10 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements Returns 0x87 (CONSTRAINT_ERROR)-as there are more than 1 entry - - - 1657289068.797364][9823:9828] CHIP:DMG: WriteResponseMessage = - [1657289068.797394][9823:9828] CHIP:DMG: { - [1657289068.797419][9823:9828] CHIP:DMG: AttributeStatusIBs = - [1657289068.797455][9823:9828] CHIP:DMG: [ - [1657289068.797482][9823:9828] CHIP:DMG: AttributeStatusIB = - [1657289068.797515][9823:9828] CHIP:DMG: { - [1657289068.797550][9823:9828] CHIP:DMG: AttributePathIB = - [1657289068.797590][9823:9828] CHIP:DMG: { - [1657289068.797632][9823:9828] CHIP:DMG: Endpoint = 0x0, - [1657289068.797673][9823:9828] CHIP:DMG: Cluster = 0x1f, - [1657289068.797716][9823:9828] CHIP:DMG: Attribute = 0x0000_0001, - [1657289068.797754][9823:9828] CHIP:DMG: } - [1657289068.797798][9823:9828] CHIP:DMG: - [1657289068.797835][9823:9828] CHIP:DMG: StatusIB = - [1657289068.797875][9823:9828] CHIP:DMG: { - [1657289068.797914][9823:9828] CHIP:DMG: status = 0x00 (SUCCESS), - [1657289068.797952][9823:9828] CHIP:DMG: }, - [1657289068.797991][9823:9828] CHIP:DMG: - [1657289068.798025][9823:9828] CHIP:DMG: }, - [1657289068.798071][9823:9828] CHIP:DMG: - [1657289068.798104][9823:9828] CHIP:DMG: AttributeStatusIB = - [1657289068.798139][9823:9828] CHIP:DMG: { - [1657289068.798173][9823:9828] CHIP:DMG: AttributePathIB = - [1657289068.798211][9823:9828] CHIP:DMG: { - [1657289068.798250][9823:9828] CHIP:DMG: Endpoint = 0x0, - [1657289068.798291][9823:9828] CHIP:DMG: Cluster = 0x1f, - [1657289068.798332][9823:9828] CHIP:DMG: Attribute = 0x0000_0001, - [1657289068.798372][9823:9828] CHIP:DMG: ListIndex = Null, - [1657289068.798410][9823:9828] CHIP:DMG: } - [1657289068.798453][9823:9828] CHIP:DMG: - [1657289068.798489][9823:9828] CHIP:DMG: StatusIB = - [1657289068.798527][9823:9828] CHIP:DMG: { - [1657289068.798565][9823:9828] CHIP:DMG: status = 0x00 (SUCCESS), - [1657289068.798603][9823:9828] CHIP:DMG: }, - [1657289068.798640][9823:9828] CHIP:DMG: - [1657289068.798671][9823:9828] CHIP:DMG: }, - [1657289068.798709][9823:9828] CHIP:DMG: - [1657289068.798734][9823:9828] CHIP:DMG: AttributeStatusIB = - [1657289068.798762][9823:9828] CHIP:DMG: { - [1657289068.798791][9823:9828] CHIP:DMG: AttributePathIB = - [1657289068.798819][9823:9828] CHIP:DMG: { - [1657289068.798857][9823:9828] CHIP:DMG: Endpoint = 0x0, - [1657289068.798895][9823:9828] CHIP:DMG: Cluster = 0x1f, - [1657289068.798930][9823:9828] CHIP:DMG: Attribute = 0x0000_0001, - [1657289068.798964][9823:9828] CHIP:DMG: ListIndex = Null, - [1657289068.798997][9823:9828] CHIP:DMG: } + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements Returns 0x87 (CONSTRAINT_ERROR)-as there are more than 1 entry + + + [1657289068.799030][9823:9828] CHIP:DMG: [1657289068.799061][9823:9828] CHIP:DMG: StatusIB = [1657289068.799093][9823:9828] CHIP:DMG: { @@ -460,7 +378,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged event + On TH1(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged event containing at least 1 new element, and MUST NOT contain an added event for the second extension [1657618501.560311][9050:9055] CHIP:DMG: } [1657618501.560653][9050:9055] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 @@ -570,7 +488,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol write extension "[]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster Extension attribute, value is an empty list + On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is an empty list 7625][1521:1526] CHIP:DMG: AttributeStatusIB = [1657692723.227673][1521:1526] CHIP:DMG: { @@ -604,7 +522,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged event containing at least 1 new element + On TH1(Chiptool) , Verify AccessControl cluster AccessControlExtensionChanged event containing at least 1 new element [1657618604.091599][9063:9068] CHIP:DMG: } [1657618604.091929][9063:9068] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml index 94015650f2b6ea..7f8e420f6d489c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml @@ -26,7 +26,11 @@ config: tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | - verification step to be updated. + DUT + sudo ./chip-all-clusters-app + + TH1 + ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true - label: @@ -35,7 +39,7 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 + On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 [1656581567.459433][2846:2851] CHIP:EM: Removed CHIP MessageCounter:147498618 from RetransTable on exchange 16019i @@ -77,7 +81,7 @@ tests: verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing 1 element + On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing 1 element [[1657618697.392815][9079:9084] CHIP:DMG: @@ -148,9 +152,9 @@ tests: AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.E00 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing 2 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": [], "targets":null}]" 1 0 + On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing 2 elements [[1657545728.526415][3928:3933] CHIP:DMG: WriteResponseMessage = [1657545728.526460][3928:3933] CHIP:DMG: { @@ -219,7 +223,7 @@ tests: verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing at least 3 new elements + On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing at least 3 new elements [1657618772.535125][9091:9096] CHIP:DMG: [1657618772.535162][9091:9096] CHIP:DMG: SuppressResponse = true, @@ -305,8 +309,8 @@ tests: (3) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.E00 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": null, "targets":null}]" 1 0 - On TH(Chiptool) ,verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 3, "subjects": null, "targets":null}]" 1 0 + On TH1(Chiptool) ,verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements 58813102.344539][2489:2494] CHIP:EM: Removed CHIP MessageCounter:131488146 from RetransTable on exchange 37188i [1658813102.344581][2489:2494] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -379,7 +383,7 @@ tests: verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 - On TH(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing + On TH1(Chiptool) , Verify AccessControl cluster AccessControlEntryChanged event containing at least 3 new elements and MUST NOT contain an added event for the third entry 1658813186.871698][2504:2509] CHIP:DMG: ], 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 71d1b62d16449d..4cd0beae949f05 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 @@ -29,7 +29,7 @@ tests: DUT sudo ./chip-all-clusters-app - TH + TH1 ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true @@ -39,7 +39,7 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 + On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 [1657186774.908634][10846:10851] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186774.911149][10846:10851] CHIP:TOO: CurrentFabricIndex: 1 @@ -49,7 +49,7 @@ tests: "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2" verification: | - Open a commissioning window On TH(Chiptool)1 using below command + Open a commissioning window On TH1(Chiptool)using below command ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 @@ -71,7 +71,7 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 - On TH(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 2 + On TH2(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 2 [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186956.731658][3910:3915] CHIP:TOO: CurrentFabricIndex: 2 disabled: true @@ -84,7 +84,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH(Chiptool)1,Verify Successfully to extension attribute list containg one element . + On TH1(Chiptool),Verify Successfully to extension attribute list containg one element . 657893593.975649][4116:4121] CHIP:DMG: { @@ -133,7 +133,7 @@ tests: verification: | ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 2 0 - On TH(Chiptool)2,Verify Successfully to extension attribute list containg one element . + On TH2(Chiptool),Verify Successfully to extension attribute list containg one element . 1657894672.479983][2433:2438] CHIP:DMG: WriteClient moving to [ResponseRe] [1657894672.480057][2433:2438] CHIP:DMG: WriteResponseMessage = [1657894672.480092][2433:2438] CHIP:DMG: { @@ -183,7 +183,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool)1 ,verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool) ,verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 [1657187433.621369][10890:10895] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 [1657187433.621422][10890:10895] CHIP:TOO: Extension: 1 entries @@ -199,7 +199,7 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 - On TH(Chiptool)2 , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 + On TH2(Chiptool), Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1658327214.683199][2749:2754] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2953114587 [1658327214.683283][2749:2754] CHIP:TOO: Extension: 1 entries [1658327214.683348][2749:2754] CHIP:TOO: [1]: { @@ -214,7 +214,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool)1 , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F2 [1658327494.282263][2810:2815] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 [1658327494.282295][2810:2815] CHIP:TOO: Event number: 5 @@ -238,7 +238,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 2 - On TH(Chiptool)2 , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F1 + On TH2(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1658327551.622018][4295:4300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 [1658327551.622043][4295:4300] CHIP:TOO: Event number: 6 [1658327551.622065][4295:4300] CHIP:TOO: Priority: Info diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index 192a959c805ee8..37805cdfb0bca0 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -29,7 +29,7 @@ tests: DUT sudo ./chip-all-clusters-app - TH + TH1 ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true @@ -39,7 +39,7 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH(Chiptool)1, verify CurrentFabricIndex attribute of operationalCredential cluster as 1 + On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 [1656588171.078880][3260:3265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1776815488 [1656588171.078952][3260:3265] CHIP:TOO: CurrentFabricIndex: 1 @@ -50,7 +50,7 @@ tests: "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2" verification: | - Open a commissioning window On TH(Chiptool)1 using below command + Open a commissioning window On TH1(Chiptool)1using below command ./chip-tool administratorcommissioning open-basic-commissioning-window 180 1 0 --timedInteractionTimeoutMs 1000 @@ -101,7 +101,7 @@ tests: CurrentFabricIndex attribute" verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH(Chiptool)2, verify CurrentFabricIndex attribute of operationalCredential cluster as 2 + On TH2(Chiptool),verify CurrentFabricIndex attribute of operationalCredential cluster as 2 1658747098.843523][3024:3029] CHIP:DMG: }, [1658747098.843552][3024:3029] CHIP:DMG: @@ -124,8 +124,8 @@ tests: field: [N1, 1111] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets":null}]" 1 0 - On TH(Chiptool)1, verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets":null}]" 1 0 + On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element [1657286416.461279][4737:4742] CHIP:DMG: { [1657286416.461307][4737:4742] CHIP:DMG: AttributeStatusIBs = @@ -178,8 +178,8 @@ tests: field: [N2, 2222] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets":null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH(Chiptool)2, verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets":null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta + On TH2(Chiptool), verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element [1658747124.117113][3031:3036] CHIP:DMG: { @@ -233,7 +233,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool)1, verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 + On TH1(Chiptool), verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 [1657286432.997319][4745:4751] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3308562949 [1657286432.997655][4745:4751] CHIP:TOO: ACL: 1 entries [1657286432.997727][4745:4751] CHIP:TOO: [1]: { @@ -252,7 +252,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH(Chiptool)2, verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 + On TH2(Chiptool), verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1657286742.977222][18111:18116] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3308562953 [1657286742.977287][18111:18116] CHIP:TOO: ACL: 1 entries [1657286742.977344][18111:18116] CHIP:TOO: [1]: { @@ -272,7 +272,7 @@ tests: PICS: ACL.S.E00 verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 - On TH(Chiptool)1, verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F2 + On TH1(Chiptool), verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F2 [1657286873.948408][4767:4772] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 @@ -338,29 +338,10 @@ tests: PICS: ACL.S.E00 verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH(Chiptool)2, verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F1 - - - - [1657287207.040351][18332:18337] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1657287207.040361][18332:18337] CHIP:TOO: Event number: 4 - [1657287207.040369][18332:18337] CHIP:TOO: Priority: Info - [1657287207.040376][18332:18337] CHIP:TOO: Timestamp: 31805127 - [1657287207.040425][18332:18337] CHIP:TOO: AccessControlEntryChanged: { - [1657287207.040440][18332:18337] CHIP:TOO: AdminNodeID: null - [1657287207.040451][18332:18337] CHIP:TOO: AdminPasscodeID: 0 - [1657287207.040460][18332:18337] CHIP:TOO: ChangeType: 1 - [1657287207.040467][18332:18337] CHIP:TOO: LatestValue: { - [1657287207.040474][18332:18337] CHIP:TOO: Privilege: 5 - [1657287207.040482][18332:18337] CHIP:TOO: AuthMode: 2 - [1657287207.040492][18332:18337] CHIP:TOO: Subjects: 1 entries - [1657287207.040502][18332:18337] CHIP:TOO: [1]: 223344 - [1657287207.040510][18332:18337] CHIP:TOO: Targets: null - [1657287207.040518][18332:18337] CHIP:TOO: FabricIndex: 2 - [1657287207.040526][18332:18337] CHIP:TOO: } - [1657287207.040533][18332:18337] CHIP:TOO: AdminFabricIndex: 2 - [1657287207.040540][18332:18337] CHIP:TOO: } - [1657287207.040612][18332:18337] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + On TH2(Chiptool), verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F1 + + + [1657287207.040619][18332:18337] CHIP:TOO: Event number: 7 [1657287207.040624][18332:18337] CHIP:TOO: Priority: Info [1657287207.040630][18332:18337] CHIP:TOO: Timestamp: 31903266 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml index fa68ec0bf8c39a..e605cc3c6ba305 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml @@ -26,7 +26,11 @@ config: tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | - verification step to be updated. + DUT + sudo ./chip-all-clusters-app + + TH1 + ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true - label: @@ -36,8 +40,8 @@ tests: [N1] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 - On TH(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element + ./chip-tool accesscontrol write acl "[{ "privilege": 4, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 + On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element [1656589077.991761][3452:3457] CHIP:DMG: WriteClient moving to [ResponseRe] [1656589077.991838][3452:3457] CHIP:DMG: WriteResponseMessage = @@ -90,7 +94,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool), verify AccessControl cluster ACL attribute Returns UNSUPPORTED_ACCESS (0x7e) + On TH1(Chiptool), verify AccessControl cluster ACL attribute Returns UNSUPPORTED_ACCESS (0x7e) [1656589294.730359][3469:3474] CHIP:DMG: ReportDataMessage = [1656589294.730409][3469:3474] CHIP:DMG: { [1656589294.730449][3469:3474] CHIP:DMG: AttributeReportIBs = @@ -132,8 +136,8 @@ tests: field: [N1] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 - On TH(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element Returns Unsupported Access + ./chip-tool accesscontrol write acl "[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 + On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element Returns Unsupported Access [1656589843.696435][3518:3523] CHIP:DMG: WriteResponseMessage = [1656589843.696471][3518:3523] CHIP:DMG: { @@ -186,7 +190,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol read extension 1 0 - On TH(Chiptool), verify AccessControl cluster Extension attribute Returns UNSUPPORTED_ACCESS (0x7e) + On TH1(Chiptool), verify AccessControl cluster Extension attribute Returns UNSUPPORTED_ACCESS (0x7e) [1656590048.181895][3536:3541] CHIP:DMG: ReportDataMessage = [1656590048.181938][3536:3541] CHIP:DMG: { [1656590048.181973][3536:3541] CHIP:DMG: AttributeReportIBs = @@ -226,7 +230,7 @@ tests: PICS: ACL.S.A0001 verification: | ./chip-tool accesscontrol write extension [] 1 0 - On TH(Chiptool) , Verify the Successfully with extension attribute value is an empty list Returns + On TH1(Chiptool) , Verify the Successfully with extension attribute value is an empty list which Returns UNSUPPORTED_ACCESS (0x7e) [1656592607.144276][3897:3903] CHIP:DMG: WriteClient moving to [ResponseRe] [1656592607.144341][3897:3903] CHIP:DMG: WriteResponseMessage = @@ -254,7 +258,7 @@ tests: PICS: ACL.S.A0002 verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry. + On TH1(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry. [1656592739.107798][3916:3921] CHIP:DMG: ReportDataMessage = [1656592739.107828][3916:3921] CHIP:DMG: { @@ -293,7 +297,7 @@ tests: PICS: ACL.S.A0003 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 3 or greater as TargetsPerAccessControlEntry + On TH1(Chiptool), verify with value 3 or greater as TargetsPerAccessControlEntry [1656593266.074720][3943:3948] CHIP:DMG: ReportDataMessage = [1656593266.074748][3943:3948] CHIP:DMG: { [1656593266.074769][3943:3948] CHIP:DMG: AttributeReportIBs = @@ -332,7 +336,7 @@ tests: verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - On TH(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. + On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. [1656593406.902865][3956:3961] CHIP:DMG: ReportDataMessage = [1656593406.902902][3956:3961] CHIP:DMG: { [1656593406.902931][3956:3961] CHIP:DMG: AttributeReportIBs = @@ -371,7 +375,7 @@ tests: PICS: ACL.S.E00 verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 1 - On TH(Chiptool), Verify AccessControl cluster AccessControlEntryChanged event Returns UNSUPPORTED_ACCESS (0x7e) + On TH1(Chiptool), Verify AccessControl cluster AccessControlEntryChanged event Returns UNSUPPORTED_ACCESS (0x7e) [1656593588.305232][3979:3984] CHIP:DMG: }, [1656593588.305269][3979:3984] CHIP:DMG: [1656593588.305299][3979:3984] CHIP:DMG: StatusIB = @@ -400,7 +404,7 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH(Chiptool), verify AccessControl cluster AccessControlExtensionChanged event Returns UNSUPPORTED_ACCESS (0x7e) + On TH1(Chiptool), verify AccessControl cluster AccessControlExtensionChanged event Returns UNSUPPORTED_ACCESS (0x7e) [1656593726.387025][3990:3995] CHIP:DMG: [1656593726.387048][3990:3995] CHIP:DMG: EventReportIB = [1656593726.387078][3990:3995] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml index 620afffd4ea55f..f0d4f63cd9fc45 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml @@ -16,6 +16,9 @@ name: 19.1.3. [TC-APPLAUNCHER-1.3] Global attributes - Application Launcher Cluster (DUT as Server) +PICS: + - APPLAUNCHER.S + config: nodeId: 0x12344321 cluster: "Application Launcher" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 04cfb077a19798..b2b7678d366c50 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -101,8 +101,10 @@ tests: PICS: CADMIN.C verification: | On 2nd controller, using chip-tool connect using manual code. + + On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server Below is the example when using chip tool as controller (considering 35998938564 as the manual code generated by 1st controller) - ./chip-tool pairing code 2 35998938564 + ./chip-tool pairing code 2 35998938564 --commissioner-name beta Verify whether you got below message in the log of TH @@ -135,8 +137,9 @@ tests: verification: | On 2nd controller using chip tool write and read node-label + On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server Below is the example when using chip tool as controller - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteClient moving to [ResponseRe] [1649671460.431199][20958:20963] CHIP:DMG: WriteResponseMessage = @@ -170,7 +173,8 @@ tests: Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 + On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server + ./chip-tool basic read node-label 2 0 --commissioner-name beta CHIP:DMG: ReportDataMessage = [1649671466.310233][20969:20974] CHIP:DMG: { @@ -211,7 +215,8 @@ tests: Below is the example using chip tool as controller - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 @@ -288,7 +293,7 @@ tests: Below is an example of using chip tool as controller - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -318,7 +323,7 @@ tests: Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new @@ -339,7 +344,7 @@ tests: On 2nd controller open commissioning window using ECM Below is an example when using chip tool as controller - ./chip-tool pairing open-commissionig-window 2 1 300 1000 3841 + ./chip-tool pairing open-commissionig-window 2 1 300 1000 3841 --commissioner-name beta CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec @@ -360,7 +365,7 @@ tests: Below is an example when using chip tool as controller - ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP: [DMG] InvokeResponseMessage = @@ -402,7 +407,7 @@ tests: verification: | On 3rd controller using chip-tool connect using manual code generated from 1st controller. This attempt should fail, i.e - ./chip-tool pairing code 1 34995354639 + ./chip-tool pairing code 3 34995354639 --commissioner-name gamma verify you got the following message in the TH log @@ -420,7 +425,7 @@ tests: Below is the example using chip tool as controller - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -450,7 +455,8 @@ tests: Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new @@ -465,7 +471,7 @@ tests: On 2nd controller open commissioning window using ECM Below is an example when using chip tool as controller - ./chip-tool pairing open-commissioning-window 2 1 180 1000 3840 + ./chip-tool pairing open-commissioning-window 2 1 180 1000 3840 --commissioner-name beta CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec @@ -491,7 +497,7 @@ tests: On 2nd controller open commissioning window using ECM Below is an example when using chip tool as controller - ./chip-tool pairing open-commissionig-window 2 1 300 1000 3840 + ./chip-tool pairing open-commissionig-window 2 1 300 1000 3840 --commissioner-name beta CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index cfa0869f225c01..844c50fc29f807 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -114,7 +114,7 @@ tests: On second Controller connect to the accessory. Below is the example when using chip tool as controller - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -147,7 +147,7 @@ tests: On the 2nd controller write attribute and read attribute to and from TH_CE Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -177,7 +177,7 @@ tests: Verify read attribute returns the updated value written - ./chip-tool basic read node-label 1 0 + ./chip-tool basic read node-label 1 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -190,7 +190,7 @@ tests: On second controller controller read fabricList Below is the example while using chip tool on second controller, - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3229397217 [1650277071.834099][40790:40795] CHIP:TOO: Fabrics: 2 entries @@ -265,7 +265,7 @@ tests: Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -295,7 +295,7 @@ tests: Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -315,7 +315,7 @@ tests: On second controller using chip-tool open commissioning widow using BCM. Below is the example while using chip tool on second controller, - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP:DMG: InvokeResponseMessage = @@ -359,7 +359,7 @@ tests: On second controller using chip-tool run revoke command Below is the example while using chip tool on second controller, - ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP:DMG: InvokeResponseMessage = @@ -401,7 +401,7 @@ tests: PICS: CADMIN.C verification: | 1. On third controller, using chip-tool connect to the accessory. Connect attempt should fail, i.e - ./chip-tool pairing onnetwork 3 20202021 + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma verify you got the following message in the TH log @@ -418,7 +418,7 @@ tests: On second controller, write attribute and read attribute to and from TH_CE Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -447,7 +447,7 @@ tests: [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -461,7 +461,7 @@ tests: On second controller using chip-tool open commissioning widow using BCM. Below is the example while using chip tool on second controller, - ./chip-tool administratorcommissioning open-basic-commissioning-window 180 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 180 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP:DMG: InvokeResponseMessage = @@ -511,7 +511,7 @@ tests: On second controller using chip-tool open commissioning widow using BCM. Below is the example while using chip tool on second controller, - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP:DMG: InvokeResponseMessage = diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index d1101134ad7f3c..c8371b511790e7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -98,7 +98,7 @@ tests: Below is the example when using chip tool as controller (considering 36366524220 as the manual code generated by DUT controller) - ./chip-tool pairing code 2 36366524220 + ./chip-tool pairing code 2 36366524220 --commissioner-name beta verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 @@ -116,7 +116,7 @@ tests: Below is the example while using chip tool as controller, - ./chip-tool pairing open-commissioning-window 2 1 300 1000 3840 + ./chip-tool pairing open-commissioning-window 2 1 300 1000 3840 --commissioner-name beta [1635871058.908790][4273:4278] CHIP:SC: Success status report received. Session was established [1635871058.908827][4273:4278] CHIP:IN: New secure session created for device 0x0000000000000001, key 47!! @@ -180,7 +180,7 @@ tests: Below is the example when using chip tool as controller (considering 34921141778 as the manual code generated by DUT controller) - ./chip-tool pairing code 2 34921141778 + ./chip-tool pairing code 2 34921141778 --commissioner-name beta verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 @@ -306,7 +306,7 @@ tests: Below is the example when using chip tool as controller (considering 35256543344 as the manual code generated by DUT controller) - ./chip-tool pairing code 2 35256543344 + ./chip-tool pairing code 2 35256543344 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -319,7 +319,7 @@ tests: Below is the example when using chip tool as controller (considering 35256543344 as the manual code generated by DUT controller) - ./chip-tool pairing code 3 35256543344 + ./chip-tool pairing code 3 35256543344 --commissioner-name gamma verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index f82ed5c810d580..eea76fb7b1cb0f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -116,7 +116,7 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 @@ -216,7 +216,7 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 @@ -362,7 +362,7 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -373,7 +373,7 @@ tests: verification: | On the 3rd controller using chip-tool , connect to the accessory - ./chip-tool pairing onnetwork 3 20202021 + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma verify you got the following message in the TH log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml index 8ed35a01186c95..1633c8b1f41e04 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml @@ -39,7 +39,7 @@ tests: verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: [1657908705.581609][2861:2861] CHIP:IM: Received Read request [1657908705.581752][2861:2861] CHIP:DMG: ReadRequestMessage = @@ -72,7 +72,7 @@ tests: verification: | ./chip-tool colorcontrol read current-saturation 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: [1657908593.710273][2861:2861] CHIP:IM: Received Read request [1657908593.710359][2861:2861] CHIP:DMG: ReadRequestMessage = @@ -103,7 +103,7 @@ tests: verification: | ./chip-tool colorcontrol read remaining-time 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: [1657908803.102070][2933:2933] CHIP:IM: Received Read request [1657908803.102154][2933:2933] CHIP:DMG: ReadRequestMessage = @@ -136,7 +136,7 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: [1657908856.780574][2933:2933] CHIP:IM: Received Read request [1657908856.780702][2933:2933] CHIP:DMG: ReadRequestMessage = @@ -169,7 +169,8 @@ tests: verification: | ./chip-tool colorcontrol read current-y 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657909305.413625][2933:2933] CHIP:IM: Received Read request [1657909305.413743][2933:2933] CHIP:DMG: ReadRequestMessage = @@ -204,7 +205,8 @@ tests: verification: | ./chip-tool colorcontrol read drift-compensation 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an enum8 in TH(all-clusters-app) Logs: + [1657909433.948649][2933:2933] CHIP:IM: Received Read request [1657909433.948766][2933:2933] CHIP:DMG: ReadRequestMessage = @@ -239,7 +241,9 @@ tests: verification: | ./chip-tool colorcontrol read compensation-text 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains a string in TH(all-clusters-app) Logs: + [1657909470.827379][2933:2933] CHIP:IM: Received Read request [1657909470.827505][2933:2933] CHIP:DMG: ReadRequestMessage = @@ -273,7 +277,8 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657909522.420348][2977:2977] CHIP:IM: Received Read request [1657909522.420471][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -306,7 +311,9 @@ tests: verification: | ./chip-tool colorcontrol read color-mode 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an enum8 in TH(all-clusters-app) Logs: + [1657909555.028998][2977:2977] CHIP:IM: Received Read request [1657909555.029124][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -339,7 +346,9 @@ tests: verification: | ./chip-tool colorcontrol read options 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an bitmap8 in TH(all-clusters-app) Logs: + [1657909576.774655][2977:2977] CHIP:IM: Received Read request [1657909576.774796][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -372,7 +381,8 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657909627.086489][2977:2977] CHIP:IM: Received Read request [1657909627.086602][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -405,7 +415,9 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-color-mode 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an enum8 in TH(all-clusters-app) Logs: + [1657909652.217887][2977:2977] CHIP:IM: Received Read request [1657909652.218015][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -438,7 +450,9 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + [1657909711.352753][2977:2977] CHIP:IM: Received Read request [1657909711.352915][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -471,7 +485,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-direction 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: [1657909741.232136][2977:2977] CHIP:IM: Received Read request [1657909741.232261][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -504,7 +518,8 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-time 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: [1657909771.649273][2977:2977] CHIP:IM: Received Read request [1657909771.649413][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -539,7 +554,9 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-start-enhanced-hue 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657909997.529812][2977:2977] CHIP:IM: Received Read request [1657909997.530002][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -574,7 +591,9 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-stored-enhanced-hue 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910020.977065][2977:2977] CHIP:IM: Received Read request [1657910020.977155][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -607,7 +626,9 @@ tests: verification: | ./chip-tool colorcontrol read color-capabilities 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an map16 in TH(all-clusters-app) Logs: + [1657910072.897195][2977:2977] CHIP:IM: Received Read request [1657910072.897323][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -642,7 +663,9 @@ tests: verification: | ./chip-tool colorcontrol read color-temp-physical-min-mireds 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910109.902989][2977:2977] CHIP:IM: Received Read request [1657910109.903095][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -677,7 +700,9 @@ tests: verification: | ./chip-tool colorcontrol read color-temp-physical-max-mireds 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910176.514563][2977:2977] CHIP:IM: Received Read request [1657910176.514690][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -712,7 +737,9 @@ tests: verification: | ./chip-tool colorcontrol read couple-color-temp-to-level-min-mireds 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910205.278279][2977:2977] CHIP:IM: Received Read request [1657910205.278421][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -747,7 +774,8 @@ tests: verification: | ./chip-tool colorcontrol read start-up-color-temperature-mireds 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910246.097315][2977:2977] CHIP:IM: Received Read request [1657910246.097460][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -780,7 +808,8 @@ tests: verification: | ./chip-tool colorcontrol read number-of-primaries 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: + [1657910445.890552][2977:2977] CHIP:IM: Received Read request [1657910445.890635][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -813,7 +842,9 @@ tests: verification: | ./chip-tool colorcontrol read primary1x 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910568.808716][2977:2977] CHIP:IM: Received Read request [1657910568.808876][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -846,7 +877,9 @@ tests: verification: | ./chip-tool colorcontrol read primary1y 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910588.961223][2977:2977] CHIP:IM: Received Read request [1657910588.961366][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -879,7 +912,9 @@ tests: verification: | ./chip-tool colorcontrol read primary1intensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + [1657910622.925613][2977:2977] CHIP:IM: Received Read request [1657910622.925739][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -912,7 +947,9 @@ tests: verification: | ./chip-tool colorcontrol read primary2x 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910659.885682][2977:2977] CHIP:IM: Received Read request [1657910659.885821][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -945,7 +982,9 @@ tests: verification: | ./chip-tool colorcontrol read primary2y 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + [1657910687.168648][2977:2977] CHIP:IM: Received Read request [1657910687.168754][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -978,7 +1017,8 @@ tests: verification: | ./chip-tool colorcontrol read primary2intensity 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: + [1657910837.125032][2977:2977] CHIP:IM: Received Read request [1657910837.125157][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -1011,7 +1051,8 @@ tests: verification: | ./chip-tool colorcontrol read primary3x 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = CHIP:DMG: { @@ -1036,7 +1077,8 @@ tests: verification: | ./chip-tool colorcontrol read primary3y 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1062,7 +1104,7 @@ tests: verification: | ./chip-tool colorcontrol read primary3intensity 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1088,7 +1130,9 @@ tests: verification: | ./chip-tool colorcontrol read primary4x 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1114,7 +1158,9 @@ tests: verification: | ./chip-tool colorcontrol read primary4y 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1140,7 +1186,8 @@ tests: verification: | ./chip-tool colorcontrol read primary4intensity 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1166,7 +1213,7 @@ tests: verification: | ./chip-tool colorcontrol read primary5x 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1192,7 +1239,8 @@ tests: verification: | ./chip-tool colorcontrol read primary5y 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1218,7 +1266,9 @@ tests: verification: | ./chip-tool colorcontrol read primary5intensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1244,7 +1294,8 @@ tests: verification: | ./chip-tool colorcontrol read primary6x 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1270,7 +1321,8 @@ tests: verification: | ./chip-tool colorcontrol read primary6y 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1296,7 +1348,9 @@ tests: verification: | ./chip-tool colorcontrol read primary6intensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1322,7 +1376,9 @@ tests: verification: | ./chip-tool colorcontrol read white-point-x 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1348,7 +1404,8 @@ tests: verification: | ./chip-tool colorcontrol read white-point-y 1 1 - Verify on TH(all-clusters-app) log: + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1375,7 +1432,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-rx 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1402,7 +1461,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-ry 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1430,7 +1491,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-rintensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1457,7 +1520,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gx 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1484,7 +1549,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gy 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1512,7 +1579,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-gintensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1539,7 +1608,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-bx 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1566,7 +1637,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-by 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint16 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = @@ -1594,7 +1667,9 @@ tests: verification: | ./chip-tool colorcontrol read color-point-bintensity 1 1 - Verify on TH(all-clusters-app) log: + + Verify response contains an uint8 in TH(all-clusters-app) Logs: + CHIP:IM: Received Read request CHIP:DMG: ReadRequestMessage = diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml index 3882463b3106f6..eddc65458d3002 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml @@ -34,7 +34,7 @@ tests: verification: | ./chip-tool colorcontrol move-to-hue 1 0 300 0 0 1 1 - Verify on TH(all-clusters-app) Log + Verify success response in TH(all-clusters-app) Log: [1657911287.814194][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911287.814246][2977:2977] CHIP:DMG: { @@ -76,8 +76,7 @@ tests: verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify on TH(all-clusters-app) Log - + Verify response contains a CurrentHue value in TH(all-clusters-app) Logs: [1657911327.184763][2977:2977] CHIP:IM: Received Read request [1657911327.184901][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911327.184952][2977:2977] CHIP:DMG: { @@ -109,7 +108,7 @@ tests: verification: | ./chip-tool colorcontrol move-hue 1 10 0 0 1 1 - Verify on TH(all-clusters-app) log + Verify success response in TH(all-clusters-app) Log: [1657911357.567908][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911357.567957][2977:2977] CHIP:DMG: { @@ -149,7 +148,8 @@ tests: verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify on TH(all-clusters-app) log + + Verify response contains a CurrentHue value in TH(all-clusters-app) Logs: [1657911381.312873][2977:2977] CHIP:IM: Received Read request [1657911381.312995][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -182,7 +182,8 @@ tests: verification: | ./chip-tool colorcontrol step-hue 1 10 200 0 0 1 1 - Verify on TH(all-clusters-app) log + + Verify success response in TH(all-clusters-app) Log: [1657911412.480684][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911412.480741][2977:2977] CHIP:DMG: { @@ -223,7 +224,8 @@ tests: PICS: CC.C.C02.Rsp && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify on TH(all-clusters-app) Log + + Verify response contains a CurrentHue value in TH(all-clusters-app) Logs: [1657911437.116353][2977:2977] CHIP:IM: Received Read request [1657911437.116480][2977:2977] CHIP:DMG: ReadRequestMessage = @@ -255,7 +257,8 @@ tests: PICS: CC.C.C47.Rsp verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - Verify on TH(all-clusters-app) log + + Verify success response in TH(all-clusters-app) Log: [1657911457.334435][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911457.334464][2977:2977] CHIP:DMG: { @@ -292,8 +295,8 @@ tests: PICS: CC.C.C47.Rsp && CC.C.A0000 verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify on TH(all-clusters-app) Log + Verify response contains a CurrentHue value in TH(all-clusters-app) Logs: [1657911437.116353][2977:2977] CHIP:IM: Received Read request [1657911437.116480][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911437.116528][2977:2977] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml index 0dc2c4ac9afd70..f9b24fd63fb975 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_4.yaml @@ -34,7 +34,8 @@ tests: verification: | ./chip-tool colorcontrol move-to-color 400 500 300 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: + [1657911753.687856][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911753.687913][2977:2977] CHIP:DMG: { [1657911753.687961][2977:2977] CHIP:DMG: suppressResponse = false, @@ -76,7 +77,7 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentX value in TH(all-clusters-app) Logs: [1657911771.965429][2977:2977] CHIP:IM: Received Read request [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911771.965536][2977:2977] CHIP:DMG: { @@ -104,8 +105,7 @@ tests: "./chip-tool colorcontrol read current-y 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentY value in TH(all-clusters-app) Logs: [1657911790.232595][2977:2977] CHIP:IM: Received Read request [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911790.232700][2977:2977] CHIP:DMG: { @@ -138,8 +138,7 @@ tests: PICS: CC.C.C08.Rsp verification: | ./chip-tool colorcontrol move-color 10 20 0 0 1 1 - - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657911814.839535][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911814.839586][2977:2977] CHIP:DMG: { @@ -181,7 +180,7 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentX value in TH(all-clusters-app) Logs: [1657911771.965429][2977:2977] CHIP:IM: Received Read request [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911771.965536][2977:2977] CHIP:DMG: { @@ -209,8 +208,7 @@ tests: "./chip-tool colorcontrol read current-y 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentY value in TH(all-clusters-app) Logs: [1657911790.232595][2977:2977] CHIP:IM: Received Read request [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911790.232700][2977:2977] CHIP:DMG: { @@ -244,7 +242,7 @@ tests: verification: | ./chip-tool colorcontrol step-color 100 100 200 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657911853.249758][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911853.249810][2977:2977] CHIP:DMG: { [1657911853.249851][2977:2977] CHIP:DMG: suppressResponse = false, @@ -286,7 +284,8 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains a CurrentX value in TH(all-clusters-app) Logs: [1657911771.965429][2977:2977] CHIP:IM: Received Read request [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911771.965536][2977:2977] CHIP:DMG: { @@ -315,7 +314,7 @@ tests: "./chip-tool colorcontrol read current-y 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentY value in TH(all-clusters-app) Logs: [1657911790.232595][2977:2977] CHIP:IM: Received Read request [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911790.232700][2977:2977] CHIP:DMG: { @@ -349,7 +348,7 @@ tests: verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657911876.005800][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911876.005828][2977:2977] CHIP:DMG: { @@ -389,7 +388,7 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentX value in TH(all-clusters-app) Logs: [1657911771.965429][2977:2977] CHIP:IM: Received Read request [1657911771.965509][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911771.965536][2977:2977] CHIP:DMG: { @@ -418,7 +417,7 @@ tests: "./chip-tool colorcontrol read current-y 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a CurrentY value in TH(all-clusters-app) Logs: [1657911790.232595][2977:2977] CHIP:IM: Received Read request [1657911790.232674][2977:2977] CHIP:DMG: ReadRequestMessage = [1657911790.232700][2977:2977] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml index 2075de950248b2..19ec1699bb490f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml @@ -39,7 +39,8 @@ tests: verification: | ./chip-tool colorcontrol read color-temp-physical-min-mireds 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains an ColorTempPhysicalMinMireds in TH(all-clusters-app) Logs: [1658215472.478274][3413:3413] CHIP:IM: Received Read request [1658215472.478456][3413:3413] CHIP:DMG: ReadRequestMessage = [1658215472.478527][3413:3413] CHIP:DMG: { @@ -67,7 +68,8 @@ tests: ./chip-tool colorcontrol read color-temp-physical-max-mireds 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains an ColorTempPhysicalMaxMireds in TH(all-clusters-app) Logs: [1658215497.166720][3413:3413] CHIP:IM: Received Read request [1658215497.166886][3413:3413] CHIP:DMG: ReadRequestMessage = [1658215497.166949][3413:3413] CHIP:DMG: { @@ -98,7 +100,8 @@ tests: verification: | ./chip-tool colorcontrol move-to-color-temperature 150 300 0 0 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1657911906.102478][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657911906.102603][2977:2977] CHIP:DMG: { [1657911906.102633][2977:2977] CHIP:DMG: suppressResponse = false, @@ -139,22 +142,23 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = [1659955633.975617][2718:2718] CHIP:DMG: { - [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = - [1659955633.975689][2718:2718] CHIP:DMG: [ - [1659955633.975738][2718:2718] CHIP:DMG: AttributePathIB = - [1659955633.975779][2718:2718] CHIP:DMG: { - [1659955633.975834][2718:2718] CHIP:DMG: Endpoint = 0x1, - [1659955633.975894][2718:2718] CHIP:DMG: Cluster = 0x300, - [1659955633.975941][2718:2718] CHIP:DMG: Attribute = 0x0000_0007, - [1659955633.975998][2718:2718] CHIP:DMG: } + [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = + [1659955633.975689][2718:2718] CHIP:DMG: [ + [1659955633.975738][2718:2718] CHIP:DMG: AttributePathIB = + [1659955633.975779][2718:2718] CHIP:DMG: { + [1659955633.975834][2718:2718] CHIP:DMG: Endpoint = 0x1, + [1659955633.975894][2718:2718] CHIP:DMG: Cluster = 0x300, + [1659955633.975941][2718:2718] CHIP:DMG: Attribute = 0x0000_0007, + [1659955633.975998][2718:2718] CHIP:DMG: } [1659955633.976040][2718:2718] CHIP:DMG: - [1659955633.976090][2718:2718] CHIP:DMG: ], + [1659955633.976090][2718:2718] CHIP:DMG: ], [1659955633.976132][2718:2718] CHIP:DMG: - [1659955633.976183][2718:2718] CHIP:DMG: isFabricFiltered = true, - [1659955633.976221][2718:2718] CHIP:DMG: InteractionModelRevision = 1 + [1659955633.976183][2718:2718] CHIP:DMG: isFabricFiltered = true, + [1659955633.976221][2718:2718] CHIP:DMG: InteractionModelRevision = 1 [1659955633.976268][2718:2718] CHIP:DMG: }, [1659955633.976388][2718:2718] CHIP:DMG: IM RH moving to [GeneratingReports] [1659955633.976525][2718:2718] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 @@ -170,37 +174,39 @@ tests: ./chip-tool colorcontrol move-color-temperature 1 16319 0 65279 0 0 1 1 - Verify in TH(all-clusters-app) log: + + + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955779.460043][2718:2718] CHIP:DMG: InvokeRequestMessage = [1659955779.460071][2718:2718] CHIP:DMG: { - [1659955779.460095][2718:2718] CHIP:DMG: suppressResponse = false, - [1659955779.460122][2718:2718] CHIP:DMG: timedRequest = false, - [1659955779.460147][2718:2718] CHIP:DMG: InvokeRequests = - [1659955779.460178][2718:2718] CHIP:DMG: [ - [1659955779.460202][2718:2718] CHIP:DMG: CommandDataIB = - [1659955779.460230][2718:2718] CHIP:DMG: { - [1659955779.460263][2718:2718] CHIP:DMG: CommandPathIB = - [1659955779.460300][2718:2718] CHIP:DMG: { - [1659955779.460334][2718:2718] CHIP:DMG: EndpointId = 0x1, - [1659955779.460372][2718:2718] CHIP:DMG: ClusterId = 0x300, - [1659955779.460409][2718:2718] CHIP:DMG: CommandId = 0x4b, - [1659955779.460444][2718:2718] CHIP:DMG: }, + [1659955779.460095][2718:2718] CHIP:DMG: suppressResponse = false, + [1659955779.460122][2718:2718] CHIP:DMG: timedRequest = false, + [1659955779.460147][2718:2718] CHIP:DMG: InvokeRequests = + [1659955779.460178][2718:2718] CHIP:DMG: [ + [1659955779.460202][2718:2718] CHIP:DMG: CommandDataIB = + [1659955779.460230][2718:2718] CHIP:DMG: { + [1659955779.460263][2718:2718] CHIP:DMG: CommandPathIB = + [1659955779.460300][2718:2718] CHIP:DMG: { + [1659955779.460334][2718:2718] CHIP:DMG: EndpointId = 0x1, + [1659955779.460372][2718:2718] CHIP:DMG: ClusterId = 0x300, + [1659955779.460409][2718:2718] CHIP:DMG: CommandId = 0x4b, + [1659955779.460444][2718:2718] CHIP:DMG: }, [1659955779.460477][2718:2718] CHIP:DMG: - [1659955779.460504][2718:2718] CHIP:DMG: CommandFields = - [1659955779.460539][2718:2718] CHIP:DMG: { - [1659955779.460572][2718:2718] CHIP:DMG: 0x0 = 1, - [1659955779.460608][2718:2718] CHIP:DMG: 0x1 = 16319, - [1659955779.460646][2718:2718] CHIP:DMG: 0x2 = 0, - [1659955779.460683][2718:2718] CHIP:DMG: 0x3 = 65279, - [1659955779.460717][2718:2718] CHIP:DMG: 0x4 = 0, - [1659955779.460755][2718:2718] CHIP:DMG: 0x5 = 0, - [1659955779.460791][2718:2718] CHIP:DMG: }, - [1659955779.460820][2718:2718] CHIP:DMG: }, + [1659955779.460504][2718:2718] CHIP:DMG: CommandFields = + [1659955779.460539][2718:2718] CHIP:DMG: { + [1659955779.460572][2718:2718] CHIP:DMG: 0x0 = 1, + [1659955779.460608][2718:2718] CHIP:DMG: 0x1 = 16319, + [1659955779.460646][2718:2718] CHIP:DMG: 0x2 = 0, + [1659955779.460683][2718:2718] CHIP:DMG: 0x3 = 65279, + [1659955779.460717][2718:2718] CHIP:DMG: 0x4 = 0, + [1659955779.460755][2718:2718] CHIP:DMG: 0x5 = 0, + [1659955779.460791][2718:2718] CHIP:DMG: }, + [1659955779.460820][2718:2718] CHIP:DMG: }, [1659955779.460851][2718:2718] CHIP:DMG: - [1659955779.460875][2718:2718] CHIP:DMG: ], + [1659955779.460875][2718:2718] CHIP:DMG: ], [1659955779.460907][2718:2718] CHIP:DMG: - [1659955779.460931][2718:2718] CHIP:DMG: InteractionModelRevision = 1 + [1659955779.460931][2718:2718] CHIP:DMG: InteractionModelRevision = 1 [1659955779.460954][2718:2718] CHIP:DMG: }, [1659955779.461068][2718:2718] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=o [1659955779.461110][2718:2718] CHIP:DMG: AccessControl: allowed @@ -218,22 +224,24 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature 1 1 - Verify in TH(all-clusters-app) log: + + + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = [1659955633.975617][2718:2718] CHIP:DMG: { - [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = - [1659955633.975689][2718:2718] CHIP:DMG: [ - [1659955633.975738][2718:2718] CHIP:DMG: AttributePathIB = - [1659955633.975779][2718:2718] CHIP:DMG: { - [1659955633.975834][2718:2718] CHIP:DMG: Endpoint = 0x1, - [1659955633.975894][2718:2718] CHIP:DMG: Cluster = 0x300, - [1659955633.975941][2718:2718] CHIP:DMG: Attribute = 0x0000_0007, - [1659955633.975998][2718:2718] CHIP:DMG: } + [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = + [1659955633.975689][2718:2718] CHIP:DMG: [ + [1659955633.975738][2718:2718] CHIP:DMG: AttributePathIB = + [1659955633.975779][2718:2718] CHIP:DMG: { + [1659955633.975834][2718:2718] CHIP:DMG: Endpoint = 0x1, + [1659955633.975894][2718:2718] CHIP:DMG: Cluster = 0x300, + [1659955633.975941][2718:2718] CHIP:DMG: Attribute = 0x0000_0007, + [1659955633.975998][2718:2718] CHIP:DMG: } [1659955633.976040][2718:2718] CHIP:DMG: - [1659955633.976090][2718:2718] CHIP:DMG: ], + [1659955633.976090][2718:2718] CHIP:DMG: ], [1659955633.976132][2718:2718] CHIP:DMG: - [1659955633.976183][2718:2718] CHIP:DMG: isFabricFiltered = true, - [1659955633.976221][2718:2718] CHIP:DMG: InteractionModelRevision = 1 + [1659955633.976183][2718:2718] CHIP:DMG: isFabricFiltered = true, + [1659955633.976221][2718:2718] CHIP:DMG: InteractionModelRevision = 1 [1659955633.976268][2718:2718] CHIP:DMG: }, [1659955633.976388][2718:2718] CHIP:DMG: IM RH moving to [GeneratingReports] [1659955633.976525][2718:2718] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 @@ -248,7 +256,9 @@ tests: verification: | ./chip-tool colorcontrol step-color-temperature 1 32639 200 0 65279 0 0 1 1 - Verify in TH(all-clusters-app) log: + + + Verify the all fields are within their allowed bounds in CommandFields on TH(all-clusters-app) Logs: [1659955888.144223][2718:2718] CHIP:DMG: InvokeRequestMessage = [1659955888.144251][2718:2718] CHIP:DMG: { @@ -294,11 +304,10 @@ tests: - label: "DUT reads ColorTemperatureMired attribute from TH (potentially multiple times)" - PICS: CC.C.C4c.Rsp && CC.C.A0007 + PICS: CC.C.C4c.Rsp & CC.C.A0007 verification: | ./chip-tool colorcontrol read color-temperature 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = [1659955633.975617][2718:2718] CHIP:DMG: { [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = @@ -327,7 +336,8 @@ tests: PICS: CC.C.C47.Rsp verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - Verify in TH(all-clusters-app) log: + + Verify the all fields are within their allowed bounds in CommandFields on TH(all-clusters-app) Logs: [1659955999.857777][2718:2718] CHIP:DMG: InvokeRequestMessage = @@ -373,7 +383,7 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = [1659955633.975617][2718:2718] CHIP:DMG: { [1659955633.975650][2718:2718] CHIP:DMG: AttributePathIBs = @@ -397,3 +407,13 @@ tests: [1659955633.976650][2718:2718] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0300 e=1 p=v [1659955633.976696][2718:2718] CHIP:DMG: AccessControl: allowed disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml index 9e45d0bfb2c66f..8cccb5a8a4e54d 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml @@ -34,7 +34,7 @@ tests: verification: | ./chip-tool colorcontrol enhanced-move-to-hue 1000 3 200 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657912045.703432][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657912045.703462][2977:2977] CHIP:DMG: { [1657912045.703485][2977:2977] CHIP:DMG: suppressResponse = false, @@ -76,7 +76,8 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains a EnhancedCurrentHue value in TH(all-clusters-app) Logs: [1657912064.296156][2977:2977] CHIP:IM: Received Read request [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = [1657912064.296295][2977:2977] CHIP:DMG: { @@ -108,7 +109,8 @@ tests: verification: | ./chip-tool colorcontrol enhanced-move-hue 0 100 0 0 1 1 - Verify in TH(all-clusters-app) log: + + Verify success response in TH(all-clusters-app) Log: [1657912085.345044][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657912085.345072][2977:2977] CHIP:DMG: { @@ -149,7 +151,7 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a EnhancedCurrentHue value in TH(all-clusters-app) Logs: [1657912064.296156][2977:2977] CHIP:IM: Received Read request [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = [1657912064.296295][2977:2977] CHIP:DMG: { @@ -181,7 +183,7 @@ tests: verification: | ./chip-tool colorcontrol enhanced-step-hue 1 1000 200 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657912123.677693][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657912123.677720][2977:2977] CHIP:DMG: { [1657912123.677742][2977:2977] CHIP:DMG: suppressResponse = false, @@ -223,7 +225,7 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a EnhancedCurrentHue value in TH(all-clusters-app) Logs: [1657912064.296156][2977:2977] CHIP:IM: Received Read request [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = [1657912064.296295][2977:2977] CHIP:DMG: { @@ -255,7 +257,8 @@ tests: verification: | ./chip-tool colorcontrol enhanced-move-to-hue-and-saturation 2500 100 200 0 0 1 1 - Verify in TH(all-clusters-app) log: + + Verify success response in TH(all-clusters-app) Log: [1657912153.500024][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657912153.500080][2977:2977] CHIP:DMG: { [1657912153.500108][2977:2977] CHIP:DMG: suppressResponse = false, @@ -297,7 +300,8 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains a EnhancedCurrentHue value in TH(all-clusters-app) Logs: [1657912064.296156][2977:2977] CHIP:IM: Received Read request [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = [1657912064.296295][2977:2977] CHIP:DMG: { @@ -329,7 +333,8 @@ tests: verification: | ./chip-tool colorcontrol stop-move-step 0 0 1 1 - Verify in TH(all-clusters-app) log: + + Verify success response in TH(all-clusters-app) Log: [1657912172.988756][2977:2977] CHIP:DMG: InvokeRequestMessage = [1657912172.988782][2977:2977] CHIP:DMG: { [1657912172.988805][2977:2977] CHIP:DMG: suppressResponse = false, @@ -367,7 +372,8 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains a EnhancedCurrentHue value in TH(all-clusters-app) Logs: [1657912064.296156][2977:2977] CHIP:IM: Received Read request [1657912064.296261][2977:2977] CHIP:DMG: ReadRequestMessage = [1657912064.296295][2977:2977] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml index e91449eaab5604..4a83af9b79a42d 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_4.yaml @@ -34,7 +34,7 @@ tests: verification: | ./chip-tool colorcontrol color-loop-set 15 0 0 30 160 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657912387.432732][3126:3126] CHIP:DMG: InvokeRequestMessage = [1657912387.432781][3126:3126] CHIP:DMG: { [1657912387.432823][3126:3126] CHIP:DMG: suppressResponse = false, @@ -76,7 +76,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a value consistent in TH(all-clusters-app) Logs: [1657912416.547714][3126:3126] CHIP:IM: Received Read request [1657912416.547842][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912416.547890][3126:3126] CHIP:DMG: { @@ -108,7 +108,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-direction 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a value consistent in TH(all-clusters-app) Logs: [1657912446.661818][3126:3126] CHIP:IM: Received Read request [1657912446.661940][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912446.661989][3126:3126] CHIP:DMG: { @@ -139,8 +139,7 @@ tests: PICS: CC.C.A4004 verification: | ./chip-tool colorcontrol read color-loop-time 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains a value consistent in TH(all-clusters-app) Logs: [1657912469.590293][3126:3126] CHIP:IM: Received Read request [1657912469.590419][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912469.590466][3126:3126] CHIP:DMG: { @@ -171,8 +170,7 @@ tests: PICS: CC.C.A4005 verification: | ./chip-tool colorcontrol read color-loop-start-enhanced-hue 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains a value consistent in TH(all-clusters-app) Logs: [1657912490.104534][3126:3126] CHIP:IM: Received Read request [1657912490.104664][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912490.104713][3126:3126] CHIP:DMG: { @@ -205,23 +203,22 @@ tests: PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains a value consistent in TH(all-clusters-app) Logs: [1659960576.917953][2718:2718] CHIP:DMG: ReadRequestMessage = [1659960576.917989][2718:2718] CHIP:DMG: { - [1659960576.918016][2718:2718] CHIP:DMG: AttributePathIBs = - [1659960576.918051][2718:2718] CHIP:DMG: [ - [1659960576.918084][2718:2718] CHIP:DMG: AttributePathIB = - [1659960576.918121][2718:2718] CHIP:DMG: { - [1659960576.918159][2718:2718] CHIP:DMG: Endpoint = 0x1, - [1659960576.918206][2718:2718] CHIP:DMG: Cluster = 0x300, - [1659960576.918249][2718:2718] CHIP:DMG: Attribute = 0x0000_4000, - [1659960576.918287][2718:2718] CHIP:DMG: } + [1659960576.918016][2718:2718] CHIP:DMG: AttributePathIBs = + [1659960576.918051][2718:2718] CHIP:DMG: [ + [1659960576.918084][2718:2718] CHIP:DMG: AttributePathIB = + [1659960576.918121][2718:2718] CHIP:DMG: { + [1659960576.918159][2718:2718] CHIP:DMG: Endpoint = 0x1, + [1659960576.918206][2718:2718] CHIP:DMG: Cluster = 0x300, + [1659960576.918249][2718:2718] CHIP:DMG: Attribute = 0x0000_4000, + [1659960576.918287][2718:2718] CHIP:DMG: } [1659960576.918325][2718:2718] CHIP:DMG: - [1659960576.918359][2718:2718] CHIP:DMG: ], + [1659960576.918359][2718:2718] CHIP:DMG: ], [1659960576.918397][2718:2718] CHIP:DMG: - [1659960576.918432][2718:2718] CHIP:DMG: isFabricFiltered = true, - [1659960576.918466][2718:2718] CHIP:DMG: InteractionModelRevision = 1 + [1659960576.918432][2718:2718] CHIP:DMG: isFabricFiltered = true, + [1659960576.918466][2718:2718] CHIP:DMG: InteractionModelRevision = 1 [1659960576.918498][2718:2718] CHIP:DMG: }, [1659960576.918604][2718:2718] CHIP:DMG: IM RH moving to [GeneratingReports] [1659960576.918724][2718:2718] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 @@ -233,7 +230,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a Color Loop activated in TH(all-clusters-app) Logs: [1657912750.645121][3126:3126] CHIP:IM: Received Read request [1657912750.645210][3126:3126] CHIP:DMG: ReadRequestMessage = @@ -262,7 +259,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-stored-enhanced-hue 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a value same as EnhencedCurrentHue in TH(all-clusters-app) Logs: [1657912783.463733][3126:3126] CHIP:IM: Received Read request [1657912783.463816][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912783.463844][3126:3126] CHIP:DMG: { @@ -290,8 +287,7 @@ tests: PICS: CC.C.A4000 verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - - Verify in TH(all-clusters-app) log: + Verify response contains EnhencedCurrentHue value in TH(all-clusters-app) Logs: [1657912801.027600][3126:3126] CHIP:IM: Received Read request [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912801.027761][3126:3126] CHIP:DMG: { @@ -321,7 +317,7 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains EnhencedCurrentHue value in TH(all-clusters-app) Logs: [1657912801.027600][3126:3126] CHIP:IM: Received Read request [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912801.027761][3126:3126] CHIP:DMG: { @@ -351,7 +347,7 @@ tests: verification: | ./chip-tool colorcontrol color-loop-set 1 0 0 0 0 0 0 1 1 - Verify in TH(all-clusters-app) log: + Verify success response in TH(all-clusters-app) Log: [1657912615.862118][3126:3126] CHIP:DMG: InvokeRequestMessage = [1657912615.862168][3126:3126] CHIP:DMG: { @@ -394,7 +390,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-active 1 1 - Verify in TH(all-clusters-app) log: + Verify response contains a ColorLoop value in TH(all-clusters-app) Logs: [1657912416.547714][3126:3126] CHIP:IM: Received Read request [1657912416.547842][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912416.547890][3126:3126] CHIP:DMG: { @@ -426,7 +422,8 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify in TH(all-clusters-app) log: + + Verify response contains a ColorLoop value in TH(all-clusters-app) Logs: [1657912801.027600][3126:3126] CHIP:IM: Received Read request [1657912801.027717][3126:3126] CHIP:DMG: ReadRequestMessage = [1657912801.027761][3126:3126] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml index e53ddab91811e2..ec94f45a29f012 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml @@ -44,23 +44,34 @@ tests: - label: "TH reads the FeatureMap from DUT" verification: | + (WiFi) ./chip-tool networkcommissioning read feature-map 1 0 Verify "FeatureMap" on the TH(Chip-tool) Log: [1651215443.195852][3285:3290] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 2584224280 - [1651215443.195939][3285:3290] CHIP:TOO: FeatureMap: 4 + [1651215443.195939][3285:3290] CHIP:TOO: FeatureMap: 1 + (Ethernet) ./chip-tool networkcommissioning read feature-map 1 0 Verify "FeatureMap" on the TH(Chip-tool) Log: [1660315515.081759][32315:32320] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 4034679103 [1660315515.081895][32315:32320] CHIP:TOO: FeatureMap: 4 + + (Thread) + ./chip-tool networkcommissioning read feature-map 1 0 + + Verify "FeatureMap" on the TH(Chip-tool) Log: + + [1660315948.250922][3101:3106] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1122474754 + [1660315948.261520][3101:3106] CHIP:TOO: FeatureMap: 2 disabled: true - label: "TH reads AttributeList from DUT" verification: | + (WiFi) ./chip-tool networkcommissioning read attribute-list 1 0 Verify "AttributeList" on the TH(Chip-tool) Log: @@ -82,10 +93,12 @@ tests: [1651215479.539564][3293:3298] CHIP:TOO: [13]: 65533 - Ethernet: + (Ethernet) ./chip-tool networkcommissioning read attribute-list 1 0 + Verify "AttributeList" on the TH(Chip-tool) Log: + [1660315522.163640][32321:32326] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFB DataVersion: 4034679103 [1660315522.163797][32321:32326] CHIP:TOO: AttributeList: 13 entries [1660315522.163880][32321:32326] CHIP:TOO: [1]: 0 @@ -101,6 +114,28 @@ tests: [1660315522.164636][32321:32326] CHIP:TOO: [11]: 65531 [1660315522.164708][32321:32326] CHIP:TOO: [12]: 65532 [1660315522.164778][32321:32326] CHIP:TOO: [13]: 65533 + + (Thread) + + ./chip-tool networkcommissioning read attribute-list 1 0 + + Verify "AttributeList" on the TH(Chip-tool) Log: + + [1660316011.016650][3112:3117] CHIP:TOO: AttributeList: 13 entries + [1660316011.016678][3112:3117] CHIP:TOO: [1]: 0 + [1660316011.016700][3112:3117] CHIP:TOO: [2]: 1 + [1660316011.016721][3112:3117] CHIP:TOO: [3]: 2 + [1660316011.016741][3112:3117] CHIP:TOO: [4]: 3 + [1660316011.016762][3112:3117] CHIP:TOO: [5]: 4 + [1660316011.016782][3112:3117] CHIP:TOO: [6]: 5 + [1660316011.016803][3112:3117] CHIP:TOO: [7]: 6 + [1660316011.016823][3112:3117] CHIP:TOO: [8]: 7 + [1660316011.016844][3112:3117] CHIP:TOO: [9]: 65528 + [1660316011.016865][3112:3117] CHIP:TOO: [10]: 65529 + [1660316011.016887][3112:3117] CHIP:TOO: [11]: 65531 + [1660316011.016908][3112:3117] CHIP:TOO: [12]: 65532 + [1660316011.016929][3112:3117] CHIP:TOO: [13]: 65533 + [1660316011.017068][3112:3117] CHIP:EM: Sending Standalone Ack for MessageCounter:239150268 on exchange 45209i disabled: true - label: "TH reads EventList from the DUT" @@ -132,6 +167,20 @@ tests: [1660315536.068512][32327:32332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9 DataVersion: 4034679103 [1660315536.068654][32327:32332] CHIP:TOO: AcceptedCommandList: 0 entries + + (Thread) + ./chip-tool networkcommissioning read accepted-command-list 1 0 + + Verify "AcceptedCommandList" on the TH(Chip-tool) Log: + + [1660316038.564553][3121:3126] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9 DataVersion: 1122474754 + [1660316038.564671][3121:3126] CHIP:TOO: AcceptedCommandList: 5 entries + [1660316038.564702][3121:3126] CHIP:TOO: [1]: 0 + [1660316038.564725][3121:3126] CHIP:TOO: [2]: 3 + [1660316038.564747][3121:3126] CHIP:TOO: [3]: 4 + [1660316038.564769][3121:3126] CHIP:TOO: [4]: 6 + [1660316038.564853][3121:3126] CHIP:TOO: [5]: 8 + [1660316038.564991][3121:3126] CHIP:EM: Sending Standalone Ack for MessageCounter:232731891 on exchange 30329i disabled: true - label: "TH reads GeneratedCommandList from DUT" @@ -149,6 +198,17 @@ tests: [1650370123.418013][42418:42423] CHIP:TOO: [3]: 7 [1650370123.418143][42418:42423] CHIP:EM: Sending Standalone Ack for MessageCounter:759910 on exchange 25409i + + + (Ethernet) + ./chip-tool networkcommissioning read generated-command-list 1 0 + + Verify "GeneratedCommandList" on the TH(Chip-tool) Log: + + [1660315548.937195][32333:32338] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF8 DataVersion: 4034679103 + [1660315548.937327][32333:32338] CHIP:TOO: GeneratedCommandList: 0 entries + + ( Thread ) ./chip-tool networkcommissioning read generated-command-list 51 0 @@ -161,15 +221,6 @@ tests: [1650370123.417977][42418:42423] CHIP:TOO: [2]: 5 [1650370123.418013][42418:42423] CHIP:TOO: [3]: 7 [1650370342.693995][7450:7455] CHIP:EM: Sending Standalone Ack for MessageCounter:2345375 on exchange 25146i - - - (Ethernet) - ./chip-tool networkcommissioning read generated-command-list 1 0 - - Verify "GeneratedCommandList" on the TH(Chip-tool) Log: - - [1660315548.937195][32333:32338] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF8 DataVersion: 4034679103 - [1660315548.937327][32333:32338] CHIP:TOO: GeneratedCommandList: 0 entries disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml index 417f62c1f59b30..0d282af563100f 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml @@ -176,6 +176,8 @@ tests: fail-safe and is expected to cause the changes of configuration to NetworkCommissi oning cluster done so far to be reverted." verification: | + Mark as not applicable and proceed to next step + ./chip-tool generalcommissioning arm-fail-safe 0 1 22 0 Verify "ArmFailSafeResponse" on the TH(Chip-tool) Log: @@ -193,13 +195,15 @@ tests: "TH ensures it can communicate on PIXIT.CNET.THRE AD_1ST_OPERATI ONALDATASET" verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: "TH discovers and connects to DUT on the PIXIT.CNET.THRE AD_1ST_OPERATI ONALDATASET operational network" verification: | + Mark as not applicable and proceed to next step + ./chip-tool networkcommissioning read networks 22 0 Verify "Networks entiries and its status" on the TH(Chip-tool) Log: @@ -209,7 +213,7 @@ tests: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 900" verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: @@ -217,7 +221,7 @@ tests: th_xpan and Breadcrumb field set to 1" PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: @@ -226,7 +230,7 @@ tests: ONALDATASET and Breadcrumb field set to 1" PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: @@ -235,14 +239,14 @@ tests: and Breadcrumb field set to 3" PICS: CNET.S.C06.Rsp && CNET.S.C07.Tx verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: "TH discovers and connects to DUT on the PIXIT.CNET.THRE AD_2ND_OPERATI ONALDATASET operational network" verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: @@ -250,16 +254,16 @@ tests: the General Commissioning cluster of the DUT" PICS: CNET.S.C06.Rsp verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: "TH sends the CommissioningCo mplete command to the DUT" verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true - label: "TH reads Networks attribute from the DUT" PICS: CNET.S.A0001 verification: | - verification step to be updated. + Mark as not applicable and proceed to next step disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml index 6d20dadb458d99..fbc359456faba2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml @@ -19,6 +19,7 @@ name: PICS: - MCORE.ROLE.COMMISSIONER + - MCORE.DD.QR_COMMISSIONING config: nodeId: 0x12344321 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 0f47f5bb1ddd97..b38f5ee35f2ef1 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 @@ -40,609 +40,693 @@ tests: verification: | Please run this test in chip tool interactive mode ./chip-tool interactive start + Example commands given below are using 5 reference devices (User can use 5 reference devices and send the below command in from each reference device) - Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT - and verify all the subscription requests are succes, and change the value of - all the attributes by sending write command, after sending write commanfd - verify on each of these Reference Devices that the appropriate attribute + Send 3 Subscriptionrequest messages from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are success and change the value of + all the attributes by sending a write command, after sending a write command verify on each of these Reference Devices that the appropriate attribute value has been received. - Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - - - on the first reference deice enter: - - onoff subscribe on-time 10 100 1 1 - [1657715218.149357][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715218.149399][5956:5961] CHIP:DMG: { - [1657715218.149432][5956:5961] CHIP:DMG: SubscriptionId = 0xea8e5b3b, - [1657715218.149465][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715218.149504][5956:5961] CHIP:DMG: [ - [1657715218.149535][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715218.149581][5956:5961] CHIP:DMG: { - [1657715218.149619][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715218.149663][5956:5961] CHIP:DMG: { - [1657715218.149711][5956:5961] CHIP:DMG: DataVersion = 0x734a2d83, - [1657715218.149755][5956:5961] CHIP:DMG: AttributePathIB = - [1657715218.149802][5956:5961] CHIP:DMG: { - [1657715218.149849][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715218.149895][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715218.149942][5956:5961] CHIP:DMG: Attribute = 0x0000_4001, - [1657715218.149983][5956:5961] CHIP:DMG: } - [1657715218.150027][5956:5961] CHIP:DMG: - [1657715218.150075][5956:5961] CHIP:DMG: Data = 0, - [1657715218.150118][5956:5961] CHIP:DMG: }, - [1657715218.150165][5956:5961] CHIP:DMG: - [1657715218.150201][5956:5961] CHIP:DMG: }, - [1657715218.150245][5956:5961] CHIP:DMG: - [1657715218.150275][5956:5961] CHIP:DMG: ], - [1657715218.150313][5956:5961] CHIP:DMG: - [1657715218.150343][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715218.150372][5956:5961] CHIP:DMG: } - [1657715218.150529][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241155 - [1657715218.150599][5956:5961] CHIP:TOO: OnTime: 0 - [1657715218.150646][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008e40]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 100 1000 1 1 - [1657715273.668717][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715273.668784][5956:5961] CHIP:DMG: { - [1657715273.668846][5956:5961] CHIP:DMG: SubscriptionId = 0xb6497be6, - [1657715273.668908][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715273.668984][5956:5961] CHIP:DMG: [ - [1657715273.669046][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715273.669126][5956:5961] CHIP:DMG: { - [1657715273.669190][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715273.669261][5956:5961] CHIP:DMG: { - [1657715273.669378][5956:5961] CHIP:DMG: DataVersion = 0x319eeda7, - [1657715273.669460][5956:5961] CHIP:DMG: AttributePathIB = - [1657715273.669540][5956:5961] CHIP:DMG: { - [1657715273.669620][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715273.669706][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715273.669792][5956:5961] CHIP:DMG: Attribute = 0x0000_0011, - [1657715273.669875][5956:5961] CHIP:DMG: } - [1657715273.669961][5956:5961] CHIP:DMG: - [1657715273.670043][5956:5961] CHIP:DMG: Data = NULL - [1657715273.670119][5956:5961] CHIP:DMG: }, - [1657715273.670199][5956:5961] CHIP:DMG: - [1657715273.670267][5956:5961] CHIP:DMG: }, - [1657715273.670341][5956:5961] CHIP:DMG: - [1657715273.670400][5956:5961] CHIP:DMG: ], - [1657715273.670474][5956:5961] CHIP:DMG: - [1657715273.670533][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715273.670591][5956:5961] CHIP:DMG: } - [1657715273.670803][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499111 - [1657715273.670879][5956:5961] CHIP:TOO: on level: null - [1657715273.670967][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008f30]: Moving to [AwaitingSu] - - - onoff subscribe start-up-on-off 100 1000 1 1 - [1657715343.924200][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715343.924269][5956:5961] CHIP:DMG: { - [1657715343.924330][5956:5961] CHIP:DMG: SubscriptionId = 0x9fce63ae, - [1657715343.924392][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715343.924470][5956:5961] CHIP:DMG: [ - [1657715343.924532][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715343.924612][5956:5961] CHIP:DMG: { - [1657715343.924678][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715343.924750][5956:5961] CHIP:DMG: { - [1657715343.924833][5956:5961] CHIP:DMG: DataVersion = 0x734a2d84, - [1657715343.924909][5956:5961] CHIP:DMG: AttributePathIB = - [1657715343.924992][5956:5961] CHIP:DMG: { - [1657715343.925074][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715343.925159][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715343.925245][5956:5961] CHIP:DMG: Attribute = 0x0000_4003, - [1657715343.925382][5956:5961] CHIP:DMG: } - [1657715343.925470][5956:5961] CHIP:DMG: - [1657715343.925561][5956:5961] CHIP:DMG: Data = NULL - [1657715343.925631][5956:5961] CHIP:DMG: }, - [1657715343.925713][5956:5961] CHIP:DMG: - [1657715343.925776][5956:5961] CHIP:DMG: }, - [1657715343.925851][5956:5961] CHIP:DMG: - [1657715343.925910][5956:5961] CHIP:DMG: ], - [1657715343.925985][5956:5961] CHIP:DMG: - [1657715343.926046][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715343.926104][5956:5961] CHIP:DMG: } - [1657715343.926315][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241156 - [1657715343.926395][5956:5961] CHIP:TOO: StartUpOnOff: null - [1657715343.926485][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008c80]: Moving to [AwaitingSu] - - - - on the 2nd reference deice enter: - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - [1657715407.685574][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715407.685644][5956:5961] CHIP:DMG: { - [1657715407.685705][5956:5961] CHIP:DMG: SubscriptionId = 0x9c90104c, - [1657715407.685767][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715407.685844][5956:5961] CHIP:DMG: [ - [1657715407.685906][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715407.685985][5956:5961] CHIP:DMG: { - [1657715407.686049][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715407.686122][5956:5961] CHIP:DMG: { - [1657715407.686197][5956:5961] CHIP:DMG: DataVersion = 0x319eeda8, - [1657715407.686271][5956:5961] CHIP:DMG: AttributePathIB = - [1657715407.686347][5956:5961] CHIP:DMG: { - [1657715407.686424][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715407.686505][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715407.686586][5956:5961] CHIP:DMG: Attribute = 0x0000_0010, - [1657715407.686661][5956:5961] CHIP:DMG: } - [1657715407.686739][5956:5961] CHIP:DMG: - [1657715407.686817][5956:5961] CHIP:DMG: Data = 0, - [1657715407.686888][5956:5961] CHIP:DMG: }, - [1657715407.686965][5956:5961] CHIP:DMG: - [1657715407.687029][5956:5961] CHIP:DMG: }, - [1657715407.687105][5956:5961] CHIP:DMG: - [1657715407.687164][5956:5961] CHIP:DMG: ], - [1657715407.687238][5956:5961] CHIP:DMG: - [1657715407.687299][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715407.687358][5956:5961] CHIP:DMG: } - [1657715407.687564][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499112 - [1657715407.687645][5956:5961] CHIP:TOO: on off transition time: 0 - [1657715407.687735][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008e40]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657715505.138806][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715505.138881][5956:5961] CHIP:DMG: { - [1657715505.138943][5956:5961] CHIP:DMG: SubscriptionId = 0xd002abb6, - [1657715505.139045][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715505.139128][5956:5961] CHIP:DMG: [ - [1657715505.139190][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715505.139498][5956:5961] CHIP:DMG: { - [1657715505.139600][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715505.139713][5956:5961] CHIP:DMG: { - [1657715505.139824][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc30, - [1657715505.139932][5956:5961] CHIP:DMG: AttributePathIB = - [1657715505.140020][5956:5961] CHIP:DMG: { - [1657715505.140112][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715505.140202][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715505.140289][5956:5961] CHIP:DMG: Attribute = 0x0000_0005, - [1657715505.140370][5956:5961] CHIP:DMG: } - [1657715505.140560][5956:5961] CHIP:DMG: - [1657715505.140657][5956:5961] CHIP:DMG: Data = "", - [1657715505.140741][5956:5961] CHIP:DMG: }, - [1657715505.140825][5956:5961] CHIP:DMG: - [1657715505.140893][5956:5961] CHIP:DMG: }, - [1657715505.140972][5956:5961] CHIP:DMG: - [1657715505.141031][5956:5961] CHIP:DMG: ], - [1657715505.141105][5956:5961] CHIP:DMG: - [1657715505.141165][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715505.141223][5956:5961] CHIP:DMG: } - [1657715505.141471][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674992 - [1657715505.141554][5956:5961] CHIP:TOO: NodeLabel: - [1657715505.141643][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008c80]: Moving to [AwaitingSu] - - - levelcontrol subscribe options 100 1000 1 1 - [1657715610.399441][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715610.399538][5956:5961] CHIP:DMG: { - [1657715610.399602][5956:5961] CHIP:DMG: SubscriptionId = 0x96289376, - [1657715610.399685][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715610.399763][5956:5961] CHIP:DMG: [ - [1657715610.399845][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715610.399928][5956:5961] CHIP:DMG: { - [1657715610.399992][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715610.400094][5956:5961] CHIP:DMG: { - [1657715610.400195][5956:5961] CHIP:DMG: DataVersion = 0x319eedaa, - [1657715610.400285][5956:5961] CHIP:DMG: AttributePathIB = - [1657715610.400385][5956:5961] CHIP:DMG: { - [1657715610.400467][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715610.400583][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715610.400688][5956:5961] CHIP:DMG: Attribute = 0x0000_000F, - [1657715610.400770][5956:5961] CHIP:DMG: } - [1657715610.400873][5956:5961] CHIP:DMG: - [1657715610.400985][5956:5961] CHIP:DMG: Data = 0, - [1657715610.401063][5956:5961] CHIP:DMG: }, - [1657715610.401162][5956:5961] CHIP:DMG: - [1657715610.401226][5956:5961] CHIP:DMG: }, - [1657715610.401356][5956:5961] CHIP:DMG: - [1657715610.401410][5956:5961] CHIP:DMG: ], - [1657715610.401506][5956:5961] CHIP:DMG: - [1657715610.401571][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715610.401629][5956:5961] CHIP:DMG: } - [1657715610.401887][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_000F DataVersion: 832499114 - [1657715610.401968][5956:5961] CHIP:TOO: options: 0 - [1657715610.402081][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94003070]: Moving to [AwaitingSu] - - - - - on the 3rd reference deice enter: - - basic subscribe local-config-disabled 10 100 1 0 - [1657715779.644677][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715779.644720][5956:5961] CHIP:DMG: { - [1657715779.644758][5956:5961] CHIP:DMG: SubscriptionId = 0xe65b5e5, - [1657715779.644795][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715779.644842][5956:5961] CHIP:DMG: [ - [1657715779.644879][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715779.644927][5956:5961] CHIP:DMG: { - [1657715779.644966][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715779.645013][5956:5961] CHIP:DMG: { - [1657715779.645062][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc35, - [1657715779.645114][5956:5961] CHIP:DMG: AttributePathIB = - [1657715779.645165][5956:5961] CHIP:DMG: { - [1657715779.645216][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715779.645268][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715779.645362][5956:5961] CHIP:DMG: Attribute = 0x0000_0010, - [1657715779.645411][5956:5961] CHIP:DMG: } - [1657715779.645464][5956:5961] CHIP:DMG: - [1657715779.645516][5956:5961] CHIP:DMG: Data = false, - [1657715779.645562][5956:5961] CHIP:DMG: }, - [1657715779.645612][5956:5961] CHIP:DMG: - [1657715779.645653][5956:5961] CHIP:DMG: }, - [1657715779.645701][5956:5961] CHIP:DMG: - [1657715779.645740][5956:5961] CHIP:DMG: ], - [1657715779.645785][5956:5961] CHIP:DMG: - [1657715779.645821][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715779.645856][5956:5961] CHIP:DMG: } - [1657715779.645989][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 462674997 - [1657715779.646067][5956:5961] CHIP:TOO: LocalConfigDisabled: FALSE - [1657715779.646124][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94003070]: Moving to [AwaitingSu] - - - - - colorcontrol subscribe start-up-color-temperature-mireds 10 100 1 1 - [1657715983.658378][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715983.658409][5956:5961] CHIP:DMG: { - [1657715983.658434][5956:5961] CHIP:DMG: SubscriptionId = 0x71492e8f, - [1657715983.658460][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715983.658492][5956:5961] CHIP:DMG: [ - [1657715983.658517][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715983.658551][5956:5961] CHIP:DMG: { - [1657715983.658577][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715983.658612][5956:5961] CHIP:DMG: { - [1657715983.658647][5956:5961] CHIP:DMG: DataVersion = 0x30f1c30e, - [1657715983.658683][5956:5961] CHIP:DMG: AttributePathIB = - [1657715983.658718][5956:5961] CHIP:DMG: { - [1657715983.658752][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715983.658794][5956:5961] CHIP:DMG: Cluster = 0x300, - [1657715983.658834][5956:5961] CHIP:DMG: Attribute = 0x0000_4010, - [1657715983.658871][5956:5961] CHIP:DMG: } - [1657715983.658910][5956:5961] CHIP:DMG: - [1657715983.658945][5956:5961] CHIP:DMG: Data = 0, - [1657715983.658976][5956:5961] CHIP:DMG: }, - [1657715983.659011][5956:5961] CHIP:DMG: - [1657715983.659037][5956:5961] CHIP:DMG: }, - [1657715983.659068][5956:5961] CHIP:DMG: - [1657715983.659092][5956:5961] CHIP:DMG: ], - [1657715983.659122][5956:5961] CHIP:DMG: - [1657715983.659147][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715983.659171][5956:5961] CHIP:DMG: } - [1657715983.659266][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4010 DataVersion: 821150478 - [1657715983.661975][5956:5961] CHIP:TOO: StartUpColorTemperatureMireds: 0 - [1657715983.662048][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94002740]: Moving to [AwaitingSu] - - - - identify subscribe identify-time 10 100 1 1 - [1657716084.847650][5956:5961] CHIP:DMG: ReportDataMessage = - [1657716084.847702][5956:5961] CHIP:DMG: { - [1657716084.847748][5956:5961] CHIP:DMG: SubscriptionId = 0xd5e59a1a, - [1657716084.847795][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657716084.847853][5956:5961] CHIP:DMG: [ - [1657716084.847900][5956:5961] CHIP:DMG: AttributeReportIB = - [1657716084.847965][5956:5961] CHIP:DMG: { - [1657716084.848013][5956:5961] CHIP:DMG: AttributeDataIB = - [1657716084.848071][5956:5961] CHIP:DMG: { - [1657716084.848130][5956:5961] CHIP:DMG: DataVersion = 0xdefea11c, - [1657716084.848194][5956:5961] CHIP:DMG: AttributePathIB = - [1657716084.848257][5956:5961] CHIP:DMG: { - [1657716084.848319][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657716084.848387][5956:5961] CHIP:DMG: Cluster = 0x3, - [1657716084.848459][5956:5961] CHIP:DMG: Attribute = 0x0000_0000, - [1657716084.848525][5956:5961] CHIP:DMG: } - [1657716084.848591][5956:5961] CHIP:DMG: - [1657716084.848655][5956:5961] CHIP:DMG: Data = 0, - [1657716084.848713][5956:5961] CHIP:DMG: }, - [1657716084.848772][5956:5961] CHIP:DMG: - [1657716084.848821][5956:5961] CHIP:DMG: }, - [1657716084.848884][5956:5961] CHIP:DMG: - [1657716084.848930][5956:5961] CHIP:DMG: ], - [1657716084.848986][5956:5961] CHIP:DMG: - [1657716084.849032][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657716084.849075][5956:5961] CHIP:DMG: } - [1657716084.849237][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3741229340 - [1657716084.849338][5956:5961] CHIP:TOO: identify time: 0 - [1657716084.849410][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94003070]: Moving to [AwaitingSu] - - - - - on the first reference deice enter below mentioned commands to change the attribute values - - onoff write on-time 1 1 1 - [1657715232.758666][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715232.758698][5956:5961] CHIP:DMG: { - [1657715232.758724][5956:5961] CHIP:DMG: SubscriptionId = 0xea8e5b3b, - [1657715232.758753][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715232.758782][5956:5961] CHIP:DMG: [ - [1657715232.758803][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715232.758832][5956:5961] CHIP:DMG: { - [1657715232.758854][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715232.758880][5956:5961] CHIP:DMG: { - [1657715232.758911][5956:5961] CHIP:DMG: DataVersion = 0x734a2d84, - [1657715232.758936][5956:5961] CHIP:DMG: AttributePathIB = - [1657715232.758962][5956:5961] CHIP:DMG: { - [1657715232.758989][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715232.759030][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715232.759071][5956:5961] CHIP:DMG: Attribute = 0x0000_4001, - [1657715232.759104][5956:5961] CHIP:DMG: } - [1657715232.759140][5956:5961] CHIP:DMG: - [1657715232.759174][5956:5961] CHIP:DMG: Data = 1, - [1657715232.759203][5956:5961] CHIP:DMG: }, - [1657715232.759235][5956:5961] CHIP:DMG: - [1657715232.759261][5956:5961] CHIP:DMG: }, - [1657715232.759292][5956:5961] CHIP:DMG: - [1657715232.759317][5956:5961] CHIP:DMG: ], - [1657715232.759348][5956:5961] CHIP:DMG: - [1657715232.759373][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715232.759398][5956:5961] CHIP:DMG: } - [1657715232.759493][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241156 - [1657715232.759530][5956:5961] CHIP:TOO: OnTime: 1 - [1657715232.759576][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xea8e5b3b - - - - levelcontrol write on-level 1 1 1 - [1657715287.200431][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715287.200491][5956:5961] CHIP:DMG: { - [1657715287.200557][5956:5961] CHIP:DMG: SubscriptionId = 0xb6497be6, - [1657715287.200622][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715287.200701][5956:5961] CHIP:DMG: [ - [1657715287.200765][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715287.200848][5956:5961] CHIP:DMG: { - [1657715287.200921][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715287.201012][5956:5961] CHIP:DMG: { - [1657715287.201094][5956:5961] CHIP:DMG: DataVersion = 0x319eeda8, - [1657715287.201180][5956:5961] CHIP:DMG: AttributePathIB = - [1657715287.201263][5956:5961] CHIP:DMG: { - [1657715287.201403][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715287.201501][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715287.201596][5956:5961] CHIP:DMG: Attribute = 0x0000_0011, - [1657715287.201686][5956:5961] CHIP:DMG: } - [1657715287.201889][5956:5961] CHIP:DMG: - [1657715287.201987][5956:5961] CHIP:DMG: Data = 1, - [1657715287.202074][5956:5961] CHIP:DMG: }, - [1657715287.202157][5956:5961] CHIP:DMG: - [1657715287.202221][5956:5961] CHIP:DMG: }, - [1657715287.202296][5956:5961] CHIP:DMG: - [1657715287.202354][5956:5961] CHIP:DMG: ], - [1657715287.202429][5956:5961] CHIP:DMG: - [1657715287.202488][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715287.202546][5956:5961] CHIP:DMG: } - [1657715287.202754][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499112 - [1657715287.202838][5956:5961] CHIP:TOO: on level: 1 - [1657715287.202937][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xb6497be6 Peer = 01:0000000000000001 - - onoff write start-up-on-off 1 1 1 - [1657715357.628508][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715357.628536][5956:5961] CHIP:DMG: { - [1657715357.628561][5956:5961] CHIP:DMG: SubscriptionId = 0x9fce63ae, - [1657715357.628586][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715357.628618][5956:5961] CHIP:DMG: [ - [1657715357.628643][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715357.628676][5956:5961] CHIP:DMG: { - [1657715357.628702][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715357.628735][5956:5961] CHIP:DMG: { - [1657715357.628763][5956:5961] CHIP:DMG: DataVersion = 0x734a2d85, - [1657715357.628791][5956:5961] CHIP:DMG: AttributePathIB = - [1657715357.628822][5956:5961] CHIP:DMG: { - [1657715357.628853][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715357.628882][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715357.628914][5956:5961] CHIP:DMG: Attribute = 0x0000_4003, - [1657715357.628944][5956:5961] CHIP:DMG: } - [1657715357.628977][5956:5961] CHIP:DMG: - [1657715357.629009][5956:5961] CHIP:DMG: Data = 1, - [1657715357.629037][5956:5961] CHIP:DMG: }, - [1657715357.629068][5956:5961] CHIP:DMG: - [1657715357.629093][5956:5961] CHIP:DMG: }, - [1657715357.629123][5956:5961] CHIP:DMG: - [1657715357.629147][5956:5961] CHIP:DMG: ], - [1657715357.629177][5956:5961] CHIP:DMG: - [1657715357.629201][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715357.629225][5956:5961] CHIP:DMG: } - [1657715357.629340][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657715357.629432][5956:5961] CHIP:TOO: StartUpOnOff: 1 - [1657715357.629480][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x9fce63ae Peer = 01:0000000000000001 - - - on the 2nd reference deice enter below mentioned commands to change the attribute values - any write-by-id 0x0008 0x0010 1 1 1 - [1657715446.002084][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715446.002120][5956:5961] CHIP:DMG: { - [1657715446.002151][5956:5961] CHIP:DMG: SubscriptionId = 0x9c90104c, - [1657715446.002200][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715446.002242][5956:5961] CHIP:DMG: [ - [1657715446.002273][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715446.002332][5956:5961] CHIP:DMG: { - [1657715446.002379][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715446.002434][5956:5961] CHIP:DMG: { - [1657715446.002489][5956:5961] CHIP:DMG: DataVersion = 0x319eeda9, - [1657715446.002542][5956:5961] CHIP:DMG: AttributePathIB = - [1657715446.002598][5956:5961] CHIP:DMG: { - [1657715446.002654][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715446.002703][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715446.002752][5956:5961] CHIP:DMG: Attribute = 0x0000_0010, - [1657715446.002795][5956:5961] CHIP:DMG: } - [1657715446.002838][5956:5961] CHIP:DMG: - [1657715446.002881][5956:5961] CHIP:DMG: Data = 1, - [1657715446.002921][5956:5961] CHIP:DMG: }, - [1657715446.002963][5956:5961] CHIP:DMG: - [1657715446.002996][5956:5961] CHIP:DMG: }, - [1657715446.003039][5956:5961] CHIP:DMG: - [1657715446.003069][5956:5961] CHIP:DMG: ], - [1657715446.003107][5956:5961] CHIP:DMG: - [1657715446.003138][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715446.003169][5956:5961] CHIP:DMG: } - [1657715446.003278][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499113 - [1657715446.003322][5956:5961] CHIP:TOO: on off transition time: 1 - [1657715446.003375][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x9c90104c Peer = 01:0000000000000001 - - basic write node-label 1 1 0 - [1657715530.832949][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715530.832977][5956:5961] CHIP:DMG: { - [1657715530.833000][5956:5961] CHIP:DMG: SubscriptionId = 0xfd355fe5, - [1657715530.833024][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715530.833063][5956:5961] CHIP:DMG: [ - [1657715530.833091][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715530.833133][5956:5961] CHIP:DMG: { - [1657715530.833165][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715530.833205][5956:5961] CHIP:DMG: { - [1657715530.833243][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc31, - [1657715530.833279][5956:5961] CHIP:DMG: AttributePathIB = - [1657715530.833342][5956:5961] CHIP:DMG: { - [1657715530.833382][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715530.833422][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715530.833466][5956:5961] CHIP:DMG: Attribute = 0x0000_0005, - [1657715530.833505][5956:5961] CHIP:DMG: } - [1657715530.833546][5956:5961] CHIP:DMG: - [1657715530.833587][5956:5961] CHIP:DMG: Data = "1", - [1657715530.833623][5956:5961] CHIP:DMG: }, - [1657715530.833662][5956:5961] CHIP:DMG: - [1657715530.833693][5956:5961] CHIP:DMG: }, - [1657715530.833730][5956:5961] CHIP:DMG: - [1657715530.833760][5956:5961] CHIP:DMG: ], - [1657715530.833794][5956:5961] CHIP:DMG: - [1657715530.833822][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715530.833851][5956:5961] CHIP:DMG: } - [1657715530.833959][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674993 - [1657715530.833999][5956:5961] CHIP:TOO: NodeLabel: 1 - [1657715530.834171][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xfd355fe5 Peer = 01:0000000000000001 - - - - levelcontrol write options 1 1 1 - [1657715624.029906][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715624.029977][5956:5961] CHIP:DMG: { - [1657715624.030039][5956:5961] CHIP:DMG: SubscriptionId = 0x96289376, - [1657715624.030101][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715624.030179][5956:5961] CHIP:DMG: [ - [1657715624.030241][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715624.030321][5956:5961] CHIP:DMG: { - [1657715624.030377][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715624.030438][5956:5961] CHIP:DMG: { - [1657715624.030501][5956:5961] CHIP:DMG: DataVersion = 0x319eedab, - [1657715624.030580][5956:5961] CHIP:DMG: AttributePathIB = - [1657715624.030673][5956:5961] CHIP:DMG: { - [1657715624.030757][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715624.030843][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715624.030937][5956:5961] CHIP:DMG: Attribute = 0x0000_000F, - [1657715624.031017][5956:5961] CHIP:DMG: } - [1657715624.031103][5956:5961] CHIP:DMG: - [1657715624.031177][5956:5961] CHIP:DMG: Data = 1, - [1657715624.031214][5956:5961] CHIP:DMG: }, - [1657715624.031252][5956:5961] CHIP:DMG: - [1657715624.031339][5956:5961] CHIP:DMG: }, - [1657715624.031378][5956:5961] CHIP:DMG: - [1657715624.031406][5956:5961] CHIP:DMG: ], - [1657715624.031438][5956:5961] CHIP:DMG: - [1657715624.031461][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715624.031484][5956:5961] CHIP:DMG: } - [1657715624.031584][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_000F DataVersion: 832499115 - [1657715624.031621][5956:5961] CHIP:TOO: options: 1 - [1657715624.031667][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x96289376 Peer = 01:0000000000000001 - - - on the 3rd reference deice enter below mentioned commands to change the attribute values - basic write local-config-disabled 1 1 0 - [1657715793.400009][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715793.400035][5956:5961] CHIP:DMG: { - [1657715793.400059][5956:5961] CHIP:DMG: SubscriptionId = 0xe65b5e5, - [1657715793.400083][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715793.400114][5956:5961] CHIP:DMG: [ - [1657715793.400138][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715793.400170][5956:5961] CHIP:DMG: { - [1657715793.400195][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715793.400223][5956:5961] CHIP:DMG: { - [1657715793.400252][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657715793.400280][5956:5961] CHIP:DMG: AttributePathIB = - [1657715793.400310][5956:5961] CHIP:DMG: { - [1657715793.400340][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715793.400372][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715793.400403][5956:5961] CHIP:DMG: Attribute = 0x0000_0010, - [1657715793.400432][5956:5961] CHIP:DMG: } - [1657715793.400464][5956:5961] CHIP:DMG: - [1657715793.400495][5956:5961] CHIP:DMG: Data = true, - [1657715793.400522][5956:5961] CHIP:DMG: }, - [1657715793.400553][5956:5961] CHIP:DMG: - [1657715793.400578][5956:5961] CHIP:DMG: }, - [1657715793.400607][5956:5961] CHIP:DMG: - [1657715793.400630][5956:5961] CHIP:DMG: ], - [1657715793.400659][5956:5961] CHIP:DMG: - [1657715793.400681][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715793.400703][5956:5961] CHIP:DMG: } - [1657715793.400800][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 462674998 - [1657715793.400834][5956:5961] CHIP:TOO: LocalConfigDisabled: TRUE - [1657715793.400875][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x0e65b5e5 Peer = 01:0000000000000001 - - - colorcontrol write start-up-color-temperature-mireds 1 1 1 - [1657715994.727404][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715994.727477][5956:5961] CHIP:DMG: { - [1657715994.727539][5956:5961] CHIP:DMG: SubscriptionId = 0x71492e8f, - [1657715994.727600][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715994.727676][5956:5961] CHIP:DMG: [ - [1657715994.727737][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715994.727815][5956:5961] CHIP:DMG: { - [1657715994.727878][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715994.727977][5956:5961] CHIP:DMG: { - [1657715994.728062][5956:5961] CHIP:DMG: DataVersion = 0x30f1c30f, - [1657715994.728141][5956:5961] CHIP:DMG: AttributePathIB = - [1657715994.728224][5956:5961] CHIP:DMG: { - [1657715994.728309][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715994.728398][5956:5961] CHIP:DMG: Cluster = 0x300, - [1657715994.728486][5956:5961] CHIP:DMG: Attribute = 0x0000_4010, - [1657715994.728574][5956:5961] CHIP:DMG: } - [1657715994.728777][5956:5961] CHIP:DMG: - [1657715994.728874][5956:5961] CHIP:DMG: Data = 1, - [1657715994.728952][5956:5961] CHIP:DMG: }, - [1657715994.729042][5956:5961] CHIP:DMG: - [1657715994.729110][5956:5961] CHIP:DMG: }, - [1657715994.729185][5956:5961] CHIP:DMG: - [1657715994.729246][5956:5961] CHIP:DMG: ], - [1657715994.729383][5956:5961] CHIP:DMG: - [1657715994.729445][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715994.729504][5956:5961] CHIP:DMG: } - [1657715994.729713][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4010 DataVersion: 821150479 - [1657715994.729796][5956:5961] CHIP:TOO: StartUpColorTemperatureMireds: 1 - [1657715994.729895][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x71492e8f Peer = 01:0000000000000001 - - - identify write identify-time 1 1 1 - [1657716094.853203][5956:5961] CHIP:DMG: ReportDataMessage = - [1657716094.853245][5956:5961] CHIP:DMG: { - [1657716094.853364][5956:5961] CHIP:DMG: SubscriptionId = 0xd5e59a1a, - [1657716094.853415][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657716094.853517][5956:5961] CHIP:DMG: [ - [1657716094.853578][5956:5961] CHIP:DMG: AttributeReportIB = - [1657716094.853658][5956:5961] CHIP:DMG: { - [1657716094.853743][5956:5961] CHIP:DMG: AttributeDataIB = - [1657716094.853825][5956:5961] CHIP:DMG: { - [1657716094.853905][5956:5961] CHIP:DMG: DataVersion = 0xdefea11d, - [1657716094.854010][5956:5961] CHIP:DMG: AttributePathIB = - [1657716094.854093][5956:5961] CHIP:DMG: { - [1657716094.854197][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657716094.854307][5956:5961] CHIP:DMG: Cluster = 0x3, - [1657716094.854394][5956:5961] CHIP:DMG: Attribute = 0x0000_0000, - [1657716094.854495][5956:5961] CHIP:DMG: } - [1657716094.854599][5956:5961] CHIP:DMG: - [1657716094.854685][5956:5961] CHIP:DMG: Data = 1, - [1657716094.854789][5956:5961] CHIP:DMG: }, - [1657716094.854891][5956:5961] CHIP:DMG: - [1657716094.854960][5956:5961] CHIP:DMG: }, - [1657716094.855035][5956:5961] CHIP:DMG: - [1657716094.855094][5956:5961] CHIP:DMG: ], - [1657716094.855168][5956:5961] CHIP:DMG: - [1657716094.855227][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657716094.855284][5956:5961] CHIP:DMG: } - [1657716094.855493][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3741229341 - [1657716094.855573][5956:5961] CHIP:TOO: identify time: 1 - [1657716094.855675][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xd5e59a1a Peer = 01:0000000000000001 + + + on the first reference device send 3 Subscribe Request Messages to DUT + basic subscribe node-label 100 1000 1 0 --keepSubscriptions 1 + [1660652952.537644][58131:58136] CHIP:EM: Removed CHIP MessageCounter:11153878 from RetransTable on exchange 57366i + [1660652952.537721][58131:58136] CHIP:DMG: ReportDataMessage = + [1660652952.537759][58131:58136] CHIP:DMG: { + [1660652952.537794][58131:58136] CHIP:DMG: SubscriptionId = 0x50d4243c, + [1660652952.537829][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660652952.537873][58131:58136] CHIP:DMG: [ + [1660652952.537907][58131:58136] CHIP:DMG: AttributeReportIB = + [1660652952.537964][58131:58136] CHIP:DMG: { + [1660652952.538008][58131:58136] CHIP:DMG: AttributeDataIB = + [1660652952.538055][58131:58136] CHIP:DMG: { + [1660652952.538106][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660652952.538152][58131:58136] CHIP:DMG: AttributePathIB = + [1660652952.538205][58131:58136] CHIP:DMG: { + [1660652952.538254][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660652952.538308][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660652952.538358][58131:58136] CHIP:DMG: Attribute = 0x0000_0005, + [1660652952.538409][58131:58136] CHIP:DMG: } + [1660652952.538465][58131:58136] CHIP:DMG: + [1660652952.538517][58131:58136] CHIP:DMG: Data = "" (0 chars), + [1660652952.538562][58131:58136] CHIP:DMG: }, + [1660652952.538615][58131:58136] CHIP:DMG: + [1660652952.538654][58131:58136] CHIP:DMG: }, + [1660652952.538700][58131:58136] CHIP:DMG: + [1660652952.538734][58131:58136] CHIP:DMG: ], + [1660652952.538777][58131:58136] CHIP:DMG: + [1660652952.538811][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660652952.538844][58131:58136] CHIP:DMG: } + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 1 0 --keepSubscriptions 1 + [1660653005.341371][58131:58136] CHIP:DMG: ReportDataMessage = + [1660653005.341441][58131:58136] CHIP:DMG: { + [1660653005.341503][58131:58136] CHIP:DMG: SubscriptionId = 0xea4facb0, + [1660653005.341568][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653005.341648][58131:58136] CHIP:DMG: [ + [1660653005.341711][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653005.341808][58131:58136] CHIP:DMG: { + [1660653005.341881][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653005.341972][58131:58136] CHIP:DMG: { + [1660653005.342065][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653005.342148][58131:58136] CHIP:DMG: AttributePathIB = + [1660653005.342244][58131:58136] CHIP:DMG: { + [1660653005.342340][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653005.342436][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653005.342528][58131:58136] CHIP:DMG: Attribute = 0x0000_0006, + [1660653005.342616][58131:58136] CHIP:DMG: } + [1660653005.342708][58131:58136] CHIP:DMG: + [1660653005.342801][58131:58136] CHIP:DMG: Data = "XX" (2 chars), + [1660653005.342883][58131:58136] CHIP:DMG: }, + [1660653005.342972][58131:58136] CHIP:DMG: + [1660653005.343045][58131:58136] CHIP:DMG: }, + [1660653005.343129][58131:58136] CHIP:DMG: + [1660653005.343191][58131:58136] CHIP:DMG: ], + [1660653005.343270][58131:58136] CHIP:DMG: + [1660653005.343331][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653005.343392][58131:58136] CHIP:DMG: } + [1660653005.343616][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653005.343884][58131:58136] CHIP:TOO: Location: XX + [1660653005.343983][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa00129b0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 1 0 --keepSubscriptions 1 + [1660653043.575397][58131:58136] CHIP:DMG: ReportDataMessage = + [1660653043.575423][58131:58136] CHIP:DMG: { + [1660653043.575445][58131:58136] CHIP:DMG: SubscriptionId = 0x1ff9dbc5, + [1660653043.575467][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653043.575504][58131:58136] CHIP:DMG: [ + [1660653043.575526][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653043.575556][58131:58136] CHIP:DMG: { + [1660653043.575579][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653043.575605][58131:58136] CHIP:DMG: { + [1660653043.575633][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653043.575658][58131:58136] CHIP:DMG: AttributePathIB = + [1660653043.575686][58131:58136] CHIP:DMG: { + [1660653043.575713][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653043.575743][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653043.575806][58131:58136] CHIP:DMG: Attribute = 0x0000_0010, + [1660653043.575833][58131:58136] CHIP:DMG: } + [1660653043.575863][58131:58136] CHIP:DMG: + [1660653043.575892][58131:58136] CHIP:DMG: Data = false, + [1660653043.575917][58131:58136] CHIP:DMG: }, + [1660653043.575944][58131:58136] CHIP:DMG: + [1660653043.575966][58131:58136] CHIP:DMG: }, + [1660653043.575993][58131:58136] CHIP:DMG: + [1660653043.576013][58131:58136] CHIP:DMG: ], + [1660653043.576041][58131:58136] CHIP:DMG: + [1660653043.576063][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653043.576084][58131:58136] CHIP:DMG: } + [1660653043.576169][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653043.576207][58131:58136] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653043.576240][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0012b40]: Moving to [AwaitingSu] + + + + on the 2nd reference device send 3 Subscribe Request Messages to DUT + basic subscribe node-label 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653125.592268][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653125.592310][58143:58148] CHIP:DMG: { + [1660653125.592348][58143:58148] CHIP:DMG: SubscriptionId = 0xc15110c4, + [1660653125.592387][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653125.592435][58143:58148] CHIP:DMG: [ + [1660653125.592472][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653125.592527][58143:58148] CHIP:DMG: { + [1660653125.592568][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653125.592618][58143:58148] CHIP:DMG: { + [1660653125.592675][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653125.592726][58143:58148] CHIP:DMG: AttributePathIB = + [1660653125.592785][58143:58148] CHIP:DMG: { + [1660653125.592839][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653125.592896][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653125.592946][58143:58148] CHIP:DMG: Attribute = 0x0000_0005, + [1660653125.592997][58143:58148] CHIP:DMG: } + [1660653125.593051][58143:58148] CHIP:DMG: + [1660653125.593109][58143:58148] CHIP:DMG: Data = "" (0 chars), + [1660653125.593158][58143:58148] CHIP:DMG: }, + [1660653125.593212][58143:58148] CHIP:DMG: + [1660653125.593255][58143:58148] CHIP:DMG: }, + [1660653125.593305][58143:58148] CHIP:DMG: + [1660653125.593342][58143:58148] CHIP:DMG: ], + [1660653125.593390][58143:58148] CHIP:DMG: + [1660653125.593428][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653125.593464][58143:58148] CHIP:DMG: } + [1660653125.593640][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653125.593706][58143:58148] CHIP:TOO: NodeLabel: + [1660653125.593776][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff6800df30]: Moving to [AwaitingSu] + + + + + basic subscribe location 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653198.460290][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653198.460359][58143:58148] CHIP:DMG: { + [1660653198.460423][58143:58148] CHIP:DMG: SubscriptionId = 0xfed77bda, + [1660653198.460487][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653198.460567][58143:58148] CHIP:DMG: [ + [1660653198.460630][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653198.460718][58143:58148] CHIP:DMG: { + [1660653198.460786][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653198.460871][58143:58148] CHIP:DMG: { + [1660653198.460966][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653198.461058][58143:58148] CHIP:DMG: AttributePathIB = + [1660653198.461147][58143:58148] CHIP:DMG: { + [1660653198.461244][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653198.461335][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653198.461427][58143:58148] CHIP:DMG: Attribute = 0x0000_0006, + [1660653198.461513][58143:58148] CHIP:DMG: } + [1660653198.461604][58143:58148] CHIP:DMG: + [1660653198.461699][58143:58148] CHIP:DMG: Data = "XX" (2 chars), + [1660653198.461782][58143:58148] CHIP:DMG: }, + [1660653198.461880][58143:58148] CHIP:DMG: + [1660653198.461952][58143:58148] CHIP:DMG: }, + [1660653198.462037][58143:58148] CHIP:DMG: + [1660653198.462099][58143:58148] CHIP:DMG: ], + [1660653198.462176][58143:58148] CHIP:DMG: + [1660653198.462241][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653198.462303][58143:58148] CHIP:DMG: } + [1660653198.462524][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653198.462606][58143:58148] CHIP:TOO: Location: XX + [1660653198.462695][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68010fa0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653260.633215][58143:58148] CHIP:EM: Removed CHIP MessageCounter:178377836 from RetransTable on exchange 25360i + [1660653260.633327][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653260.633387][58143:58148] CHIP:DMG: { + [1660653260.633442][58143:58148] CHIP:DMG: SubscriptionId = 0x60feee4d, + [1660653260.633493][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653260.633560][58143:58148] CHIP:DMG: [ + [1660653260.633615][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653260.633691][58143:58148] CHIP:DMG: { + [1660653260.633755][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653260.633820][58143:58148] CHIP:DMG: { + [1660653260.633891][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653260.633964][58143:58148] CHIP:DMG: AttributePathIB = + [1660653260.634046][58143:58148] CHIP:DMG: { + [1660653260.634130][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653260.634212][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653260.634292][58143:58148] CHIP:DMG: Attribute = 0x0000_0010, + [1660653260.634366][58143:58148] CHIP:DMG: } + [1660653260.634445][58143:58148] CHIP:DMG: + [1660653260.634523][58143:58148] CHIP:DMG: Data = false, + [1660653260.634600][58143:58148] CHIP:DMG: }, + [1660653260.634674][58143:58148] CHIP:DMG: + [1660653260.634736][58143:58148] CHIP:DMG: }, + [1660653260.634802][58143:58148] CHIP:DMG: + [1660653260.634855][58143:58148] CHIP:DMG: ], + [1660653260.635066][58143:58148] CHIP:DMG: + [1660653260.635128][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653260.635181][58143:58148] CHIP:DMG: } + [1660653260.635371][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653260.635446][58143:58148] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653260.635523][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68011170]: Moving to [AwaitingSu] + + + + + on the 3rd reference device send 3 Subscribe Request Messages to DUT + basic subscribe node-label 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653438.741061][58149:58154] CHIP:EM: Removed CHIP MessageCounter:141916359 from RetransTable on exchange 34400i + [1660653438.741116][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653438.741143][58149:58154] CHIP:DMG: { + [1660653438.741236][58149:58154] CHIP:DMG: SubscriptionId = 0xff93c648, + [1660653438.741262][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653438.741294][58149:58154] CHIP:DMG: [ + [1660653438.741318][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653438.741352][58149:58154] CHIP:DMG: { + [1660653438.741380][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653438.741415][58149:58154] CHIP:DMG: { + [1660653438.741448][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653438.741479][58149:58154] CHIP:DMG: AttributePathIB = + [1660653438.741517][58149:58154] CHIP:DMG: { + [1660653438.741553][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653438.741592][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653438.741627][58149:58154] CHIP:DMG: Attribute = 0x0000_0005, + [1660653438.741660][58149:58154] CHIP:DMG: } + [1660653438.741695][58149:58154] CHIP:DMG: + [1660653438.741732][58149:58154] CHIP:DMG: Data = "" (0 chars), + [1660653438.741764][58149:58154] CHIP:DMG: }, + [1660653438.741800][58149:58154] CHIP:DMG: + [1660653438.741828][58149:58154] CHIP:DMG: }, + [1660653438.741859][58149:58154] CHIP:DMG: + [1660653438.741883][58149:58154] CHIP:DMG: ], + [1660653438.741913][58149:58154] CHIP:DMG: + [1660653438.741938][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653438.741961][58149:58154] CHIP:DMG: } + [1660653438.742081][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653438.742125][58149:58154] CHIP:TOO: NodeLabel: + [1660653438.742171][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740129e0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653500.501007][58149:58154] CHIP:DMG: { + [1660653500.501077][58149:58154] CHIP:DMG: SubscriptionId = 0xb129bd8c, + [1660653500.501126][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653500.501204][58149:58154] CHIP:DMG: [ + [1660653500.501253][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653500.501323][58149:58154] CHIP:DMG: { + [1660653500.501397][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653500.501466][58149:58154] CHIP:DMG: { + [1660653500.501550][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653500.501615][58149:58154] CHIP:DMG: AttributePathIB = + [1660653500.501698][58149:58154] CHIP:DMG: { + [1660653500.501765][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653500.501835][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653500.501905][58149:58154] CHIP:DMG: Attribute = 0x0000_0006, + [1660653500.501971][58149:58154] CHIP:DMG: } + [1660653500.502041][58149:58154] CHIP:DMG: + [1660653500.502111][58149:58154] CHIP:DMG: Data = "XX" (2 chars), + [1660653500.502176][58149:58154] CHIP:DMG: }, + [1660653500.502249][58149:58154] CHIP:DMG: + [1660653500.502303][58149:58154] CHIP:DMG: }, + [1660653500.502367][58149:58154] CHIP:DMG: + [1660653500.502414][58149:58154] CHIP:DMG: ], + [1660653500.502473][58149:58154] CHIP:DMG: + [1660653500.502520][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653500.502567][58149:58154] CHIP:DMG: } + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653545.650817][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653545.650842][58149:58154] CHIP:DMG: { + [1660653545.650864][58149:58154] CHIP:DMG: SubscriptionId = 0x5310d542, + [1660653545.650901][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653545.650929][58149:58154] CHIP:DMG: [ + [1660653545.650950][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653545.650999][58149:58154] CHIP:DMG: { + [1660653545.651032][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653545.651060][58149:58154] CHIP:DMG: { + [1660653545.651088][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653545.651123][58149:58154] CHIP:DMG: AttributePathIB = + [1660653545.651151][58149:58154] CHIP:DMG: { + [1660653545.651179][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653545.651209][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653545.651238][58149:58154] CHIP:DMG: Attribute = 0x0000_0010, + [1660653545.651265][58149:58154] CHIP:DMG: } + [1660653545.651294][58149:58154] CHIP:DMG: + [1660653545.651323][58149:58154] CHIP:DMG: Data = false, + [1660653545.651349][58149:58154] CHIP:DMG: }, + [1660653545.651377][58149:58154] CHIP:DMG: + [1660653545.651399][58149:58154] CHIP:DMG: }, + [1660653545.651425][58149:58154] CHIP:DMG: + [1660653545.651446][58149:58154] CHIP:DMG: ], + [1660653545.651473][58149:58154] CHIP:DMG: + [1660653545.651494][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653545.651514][58149:58154] CHIP:DMG: } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 4th reference device send 3 Subscribe Request Messages to DUT + basic subscribe node-label 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + : } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 5th reference device send 3 Subscribe Request Messages to DUT + basic subscribe node-label 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + + basic subscribe location 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + : } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + once all the subscription is active, on the first reference device enter below mentioned commands to change the attribute values in RD1 + + basic write node-label ""newnode"" 1 0 + ReportDataMessage = + [1660653595.180285][58131:58136] CHIP:DMG: { + [1660653595.180335][58131:58136] CHIP:DMG: SubscriptionId = 0x50d4243c, + [1660653595.180388][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653595.180456][58131:58136] CHIP:DMG: [ + [1660653595.180508][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653595.180579][58131:58136] CHIP:DMG: { + [1660653595.180640][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653595.180707][58131:58136] CHIP:DMG: { + [1660653595.180794][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f7, + [1660653595.180874][58131:58136] CHIP:DMG: AttributePathIB = + [1660653595.180958][58131:58136] CHIP:DMG: { + [1660653595.181042][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653595.181131][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653595.181214][58131:58136] CHIP:DMG: Attribute = 0x0000_0005, + [1660653595.181281][58131:58136] CHIP:DMG: } + [1660653595.181353][58131:58136] CHIP:DMG: + [1660653595.181426][58131:58136] CHIP:DMG: Data = ""newnode"" (9 chars), + [1660653595.181491][58131:58136] CHIP:DMG: }, + [1660653595.181564][58131:58136] CHIP:DMG: + [1660653595.181638][58131:58136] CHIP:DMG: }, + [1660653595.181706][58131:58136] CHIP:DMG: + [1660653595.181772][58131:58136] CHIP:DMG: ], + [1660653595.181858][58131:58136] CHIP:DMG: + [1660653595.181924][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653595.181987][58131:58136] CHIP:DMG: } + [1660653595.182209][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190839 + [1660653595.182295][58131:58136] CHIP:TOO: NodeLabel: "newnode" + [1660653595.182400][58131:58136] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x50d4243c Peer = 01:0000000000000001 + + basic write location in 1 0 + ReportDataMessage = + [1660653646.567396][58131:58136] CHIP:DMG: { + [1660653646.567414][58131:58136] CHIP:DMG: SubscriptionId = 0xea4facb0, + [1660653646.567432][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653646.567455][58131:58136] CHIP:DMG: [ + [1660653646.567472][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653646.567497][58131:58136] CHIP:DMG: { + [1660653646.567515][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653646.567537][58131:58136] CHIP:DMG: { + [1660653646.567560][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f8, + [1660653646.567581][58131:58136] CHIP:DMG: AttributePathIB = + [1660653646.567604][58131:58136] CHIP:DMG: { + [1660653646.567627][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653646.567651][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653646.567676][58131:58136] CHIP:DMG: Attribute = 0x0000_0006, + [1660653646.567699][58131:58136] CHIP:DMG: } + [1660653646.567723][58131:58136] CHIP:DMG: + [1660653646.567749][58131:58136] CHIP:DMG: Data = "in" (2 chars), + [1660653646.567852][58131:58136] CHIP:DMG: }, + [1660653646.567880][58131:58136] CHIP:DMG: + [1660653646.567904][58131:58136] CHIP:DMG: }, + [1660653646.567931][58131:58136] CHIP:DMG: + [1660653646.567952][58131:58136] CHIP:DMG: ], + [1660653646.567980][58131:58136] CHIP:DMG: + [1660653646.568002][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653646.568023][58131:58136] CHIP:DMG: } + [1660653646.568112][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190840 + [1660653646.568151][58131:58136] CHIP:TOO: Location: in + [1660653646.568191][58131:58136] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xea4facb0 Peer = 01:0000000000000001 + + + basic write local-config-disabled 1 1 0 + ReportDataMessage = + [1660653666.029792][58131:58136] CHIP:DMG: { + [1660653666.029813][58131:58136] CHIP:DMG: SubscriptionId = 0x1ff9dbc5, + [1660653666.029835][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653666.029862][58131:58136] CHIP:DMG: [ + [1660653666.029883][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653666.029921][58131:58136] CHIP:DMG: { + [1660653666.029947][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653666.029980][58131:58136] CHIP:DMG: { + [1660653666.030013][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f9, + [1660653666.030045][58131:58136] CHIP:DMG: AttributePathIB = + [1660653666.030071][58131:58136] CHIP:DMG: { + [1660653666.030107][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653666.030137][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653666.030161][58131:58136] CHIP:DMG: Attribute = 0x0000_0010, + [1660653666.030184][58131:58136] CHIP:DMG: } + [1660653666.030209][58131:58136] CHIP:DMG: + [1660653666.030234][58131:58136] CHIP:DMG: Data = true, + [1660653666.030255][58131:58136] CHIP:DMG: }, + [1660653666.030278][58131:58136] CHIP:DMG: + [1660653666.030297][58131:58136] CHIP:DMG: }, + [1660653666.030320][58131:58136] CHIP:DMG: + [1660653666.030337][58131:58136] CHIP:DMG: ], + [1660653666.030361][58131:58136] CHIP:DMG: + [1660653666.030378][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653666.030395][58131:58136] CHIP:DMG: } + [1660653666.030472][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190841 + [1660653666.030502][58131:58136] CHIP:TOO: LocalConfigDisabled: TRUE + [1660653666.030535][58131:58136] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x1ff9dbc5 Peer = 01:00000 + + Once RD1 change the attibute values by sending above command, verify that all the RD*(RD2/3/4/5) should be notified with a subscription report + + on the 2nd reference device verify the ReportDataMessage with the attribute value change + [1660653595.177882][58143:58148] CHIP:EM: Handling via exchange: 9001r, Delegate: 0xaaaaea1cd718 + [1660653595.178151][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653595.178219][58143:58148] CHIP:DMG: { + [1660653595.178272][58143:58148] CHIP:DMG: SubscriptionId = 0xc15110c4, + [1660653595.178325][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653595.178396][58143:58148] CHIP:DMG: [ + [1660653595.178449][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653595.178522][58143:58148] CHIP:DMG: { + [1660653595.178580][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653595.178647][58143:58148] CHIP:DMG: { + [1660653595.178717][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f7, + [1660653595.178804][58143:58148] CHIP:DMG: AttributePathIB = + [1660653595.178874][58143:58148] CHIP:DMG: { + [1660653595.178942][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653595.179014][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653595.179086][58143:58148] CHIP:DMG: Attribute = 0x0000_0005, + [1660653595.179153][58143:58148] CHIP:DMG: } + [1660653595.179225][58143:58148] CHIP:DMG: + [1660653595.179300][58143:58148] CHIP:DMG: Data = ""newnode"" (9 chars), + [1660653595.179363][58143:58148] CHIP:DMG: }, + [1660653595.179438][58143:58148] CHIP:DMG: + [1660653595.179499][58143:58148] CHIP:DMG: }, + [1660653595.179587][58143:58148] CHIP:DMG: + [1660653595.179639][58143:58148] CHIP:DMG: ], + [1660653595.179705][58143:58148] CHIP:DMG: + [1660653595.179894][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653595.179952][58143:58148] CHIP:DMG: } + [1660653595.180163][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190839 + [1660653595.180235][58143:58148] CHIP:TOO: NodeLabel: "newnode" + [1660653595.180511][58143:58148] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xc15110c4 Peer = 02:0000000000000002 + + + [1660653646.567549][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653646.567570][58143:58148] CHIP:DMG: { + [1660653646.567587][58143:58148] CHIP:DMG: SubscriptionId = 0xfed77bda, + [1660653646.567605][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653646.567628][58143:58148] CHIP:DMG: [ + [1660653646.567646][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653646.567670][58143:58148] CHIP:DMG: { + [1660653646.567689][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653646.567709][58143:58148] CHIP:DMG: { + [1660653646.567731][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f8, + [1660653646.567780][58143:58148] CHIP:DMG: AttributePathIB = + [1660653646.567806][58143:58148] CHIP:DMG: { + [1660653646.567829][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653646.567854][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653646.568334][58143:58148] CHIP:DMG: Attribute = 0x0000_0006, + [1660653646.568364][58143:58148] CHIP:DMG: } + [1660653646.568726][58143:58148] CHIP:DMG: + [1660653646.568769][58143:58148] CHIP:DMG: Data = "in" (2 chars), + [1660653646.569119][58143:58148] CHIP:DMG: }, + [1660653646.569313][58143:58148] CHIP:DMG: + [1660653646.569337][58143:58148] CHIP:DMG: }, + [1660653646.569518][58143:58148] CHIP:DMG: + [1660653646.569538][58143:58148] CHIP:DMG: ], + [1660653646.569566][58143:58148] CHIP:DMG: + [1660653646.569588][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653646.569610][58143:58148] CHIP:DMG: } + [1660653646.569682][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190840 + [1660653646.569713][58143:58148] CHIP:TOO: Location: in + [1660653646.569762][58143:58148] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xfed77bda Peer = 02:0000000000000002 + + + [1660653666.030382][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653666.030401][58143:58148] CHIP:DMG: { + [1660653666.030419][58143:58148] CHIP:DMG: SubscriptionId = 0x60feee4d, + [1660653666.030438][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653666.030461][58143:58148] CHIP:DMG: [ + [1660653666.030478][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653666.030502][58143:58148] CHIP:DMG: { + [1660653666.030521][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653666.030542][58143:58148] CHIP:DMG: { + [1660653666.030564][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f9, + [1660653666.030586][58143:58148] CHIP:DMG: AttributePathIB = + [1660653666.030609][58143:58148] CHIP:DMG: { + [1660653666.030647][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653666.030672][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653666.030696][58143:58148] CHIP:DMG: Attribute = 0x0000_0010, + [1660653666.030718][58143:58148] CHIP:DMG: } + [1660653666.030742][58143:58148] CHIP:DMG: + [1660653666.030778][58143:58148] CHIP:DMG: Data = true, + [1660653666.030803][58143:58148] CHIP:DMG: }, + [1660653666.030827][58143:58148] CHIP:DMG: + [1660653666.030846][58143:58148] CHIP:DMG: }, + [1660653666.030868][58143:58148] CHIP:DMG: + [1660653666.030885][58143:58148] CHIP:DMG: ], + [1660653666.030908][58143:58148] CHIP:DMG: + [1660653666.030926][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653666.030944][58143:58148] CHIP:DMG: } + [1660653666.031027][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190841 + [1660653666.031058][58143:58148] CHIP:TOO: LocalConfigDisabled: TRUE + [1660653666.031092][58143:58148] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x60feee4d Peer = 02:0000000000000002 + + + on the 3rd reference device verify the ReportDataMessage with the attribute value change + onic time: 000000000199A0AE msec + [1660653545.654422][58149:58154] CHIP:EM: Flushed pending ack for MessageCounter:144882910 on exchange 34402i + [1660653595.178474][58149:58154] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:144882911 on exchange 9002r + [1660653595.178564][58149:58154] CHIP:EM: Handling via exchange: 9002r, Delegate: 0xaaaade55d718 + [1660653595.178743][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653595.178805][58149:58154] CHIP:DMG: { + [1660653595.178858][58149:58154] CHIP:DMG: SubscriptionId = 0xff93c648, + [1660653595.178912][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653595.178980][58149:58154] CHIP:DMG: [ + [1660653595.179033][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653595.179106][58149:58154] CHIP:DMG: { + [1660653595.179163][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653595.179225][58149:58154] CHIP:DMG: { + [1660653595.179291][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f7, + [1660653595.179355][58149:58154] CHIP:DMG: AttributePathIB = + [1660653595.179422][58149:58154] CHIP:DMG: { + [1660653595.179498][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653595.179640][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653595.179718][58149:58154] CHIP:DMG: Attribute = 0x0000_0005, + [1660653595.179864][58149:58154] CHIP:DMG: } + [1660653595.179939][58149:58154] CHIP:DMG: + [1660653595.180012][58149:58154] CHIP:DMG: Data = ""newnode"" (9 chars), + [1660653595.180077][58149:58154] CHIP:DMG: }, + [1660653595.180148][58149:58154] CHIP:DMG: + [1660653595.180204][58149:58154] CHIP:DMG: }, + [1660653595.180276][58149:58154] CHIP:DMG: + [1660653595.180328][58149:58154] CHIP:DMG: ], + [1660653595.180395][58149:58154] CHIP:DMG: + [1660653595.180462][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653595.180513][58149:58154] CHIP:DMG: } + [1660653595.180721][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190839 + [1660653595.180792][58149:58154] CHIP:TOO: NodeLabel: "newnode" + [1660653595.180894][58149:58154] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = + + + [1660653646.568849][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653646.568878][58149:58154] CHIP:DMG: { + [1660653646.568903][58149:58154] CHIP:DMG: SubscriptionId = 0xb129bd8c, + [1660653646.568926][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653646.568955][58149:58154] CHIP:DMG: [ + [1660653646.568974][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653646.569004][58149:58154] CHIP:DMG: { + [1660653646.569027][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653646.569054][58149:58154] CHIP:DMG: { + [1660653646.569082][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f8, + [1660653646.569109][58149:58154] CHIP:DMG: AttributePathIB = + [1660653646.569138][58149:58154] CHIP:DMG: { + [1660653646.569165][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653646.569194][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653646.569225][58149:58154] CHIP:DMG: Attribute = 0x0000_0006, + [1660653646.569253][58149:58154] CHIP:DMG: } + [1660653646.569282][58149:58154] CHIP:DMG: + [1660653646.569313][58149:58154] CHIP:DMG: Data = "in" (2 chars), + [1660653646.569339][58149:58154] CHIP:DMG: }, + [1660653646.569368][58149:58154] CHIP:DMG: + [1660653646.569392][58149:58154] CHIP:DMG: }, + [1660653646.569419][58149:58154] CHIP:DMG: + [1660653646.569441][58149:58154] CHIP:DMG: ], + [1660653646.569469][58149:58154] CHIP:DMG: + [1660653646.569492][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653646.569510][58149:58154] CHIP:DMG: } + [1660653646.569596][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190840 + [1660653646.569638][58149:58154] CHIP:TOO: Location: in + [1660653646.569738][58149:58154] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xb129bd8c Peer = 03:0000000000000003 + + MessageCounter:144882915 on exchange 9008r + [1660653666.030877][58149:58154] CHIP:EM: Handling via exchange: 9008r, Delegate: 0xaaaade55d718 + [1660653666.030942][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653666.030968][58149:58154] CHIP:DMG: { + [1660653666.030986][58149:58154] CHIP:DMG: SubscriptionId = 0x5310d542, + [1660653666.031004][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653666.031028][58149:58154] CHIP:DMG: [ + [1660653666.031045][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653666.031069][58149:58154] CHIP:DMG: { + [1660653666.031089][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653666.031111][58149:58154] CHIP:DMG: { + [1660653666.031133][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f9, + [1660653666.031155][58149:58154] CHIP:DMG: AttributePathIB = + [1660653666.031178][58149:58154] CHIP:DMG: { + [1660653666.031202][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653666.031226][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653666.031251][58149:58154] CHIP:DMG: Attribute = 0x0000_0010, + [1660653666.031274][58149:58154] CHIP:DMG: } + [1660653666.031308][58149:58154] CHIP:DMG: + [1660653666.031334][58149:58154] CHIP:DMG: Data = true, + [1660653666.031355][58149:58154] CHIP:DMG: }, + [1660653666.031379][58149:58154] CHIP:DMG: + [1660653666.031398][58149:58154] CHIP:DMG: }, + [1660653666.031421][58149:58154] CHIP:DMG: + [1660653666.031438][58149:58154] CHIP:DMG: ], + [1660653666.031462][58149:58154] CHIP:DMG: + [1660653666.031480][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653666.031503][58149:58154] CHIP:DMG: } + [1660653666.031584][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190841 + [1660653666.031617][58149:58154] CHIP:TOO: LocalConfigDisabled: TRUE + [1660653666.031655][58149:58154] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x5310d542 Peer = 03:0000000000 + + + + on the 4th reference device verify the ReportDataMessage with the attribute value change + + [1660653595.182209][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 378219084 + [1660653595.182295][58131:58136] CHIP:TOO: NodeLabel: "newnode" + [1660653595.182400][58131:58136] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x50d4249f Peer = 01:0000000000000001 + + [1660653646.569682][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190840 + [1660653646.569713][58143:58148] CHIP:TOO: Location: in + [1660653646.569762][58143:58148] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xfed77bda Peer = 02:0000000000000002 + + + [1660653666.031584][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 37821909841 + [1660653666.031617][58149:58154] CHIP:TOO: LocalConfigDisabled: TRUE + [1660653666.031655][58149:58154] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x5310d57o2 Peer = 03:0000000000 + + + + + + + on the 5th reference device verify the ReportDataMessage with the attribute value change + + [1660653595.182209][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 378218970 + [1660653595.182295][58131:58136] CHIP:TOO: NodeLabel: "newnode" + [1660653595.182400][58131:58136] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x50d42ftc Peer = 01:0000000000000001 + + + [1660653646.569682][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190840 + [1660653646.569713][58143:58148] CHIP:TOO: Location: in + [1660653646.569762][58143:58148] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0xfed77bda Peer = 02:0000000000000002 + + + [1660653666.031584][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190981 + [1660653666.031617][58149:58154] CHIP:TOO: LocalConfigDisabled: TRUE + [1660653666.031655][58149:58154] CHIP:DMG: Refresh LivenessCheckTime for 1025000 milliseconds with SubscriptionId = 0x5310d5l0 Peer = 03:0000000000 disabled: true - label: @@ -653,339 +737,316 @@ tests: verification: | Please run this test in chip tool interactive mode ./chip-tool interactive start + Example commands given below are using 5 reference devices (User can use 5 reference devices and send the below command in from each reference device) + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 4 paths, Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. - Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - - - on the first reference deice enter: - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - - [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716563.242475][6034:6039] CHIP:DMG: { - [1657716563.242507][6034:6039] CHIP:DMG: SubscriptionId = 0xebc26cc4, - [1657716563.242538][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716563.242577][6034:6039] CHIP:DMG: [ - [1657716563.242607][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716563.242648][6034:6039] CHIP:DMG: { - [1657716563.242680][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716563.242721][6034:6039] CHIP:DMG: { - [1657716563.242762][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716563.242801][6034:6039] CHIP:DMG: AttributePathIB = - [1657716563.242842][6034:6039] CHIP:DMG: { - [1657716563.242883][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716563.242928][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716563.242971][6034:6039] CHIP:DMG: Attribute = 0x0000_0010, - [1657716563.243012][6034:6039] CHIP:DMG: } - [1657716563.243056][6034:6039] CHIP:DMG: - [1657716563.243100][6034:6039] CHIP:DMG: Data = 1, - [1657716563.243138][6034:6039] CHIP:DMG: }, - [1657716563.243179][6034:6039] CHIP:DMG: - [1657716563.243213][6034:6039] CHIP:DMG: }, - [1657716563.243251][6034:6039] CHIP:DMG: - [1657716563.243280][6034:6039] CHIP:DMG: ], - [1657716563.243318][6034:6039] CHIP:DMG: - [1657716563.243348][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716563.243377][6034:6039] CHIP:DMG: } - [1657716563.243531][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499115 - [1657716563.243601][6034:6039] CHIP:TOO: on off transition time: 1 - [1657716563.243648][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716599.928585][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716599.928652][6034:6039] CHIP:DMG: { - [1657716599.928825][6034:6039] CHIP:DMG: SubscriptionId = 0x3d9f1c1, - [1657716599.928890][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716599.928968][6034:6039] CHIP:DMG: [ - [1657716599.929029][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716599.929122][6034:6039] CHIP:DMG: { - [1657716599.929192][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716599.929278][6034:6039] CHIP:DMG: { - [1657716599.929399][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716599.929476][6034:6039] CHIP:DMG: AttributePathIB = - [1657716599.929687][6034:6039] CHIP:DMG: { - [1657716599.929774][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716599.929861][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716599.929949][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716599.930031][6034:6039] CHIP:DMG: } - [1657716599.930115][6034:6039] CHIP:DMG: - [1657716599.930285][6034:6039] CHIP:DMG: Data = "1", - [1657716599.930370][6034:6039] CHIP:DMG: }, - [1657716599.930454][6034:6039] CHIP:DMG: - [1657716599.930578][6034:6039] CHIP:DMG: }, - [1657716599.930660][6034:6039] CHIP:DMG: - [1657716599.930720][6034:6039] CHIP:DMG: ], - [1657716599.930796][6034:6039] CHIP:DMG: - [1657716599.930856][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716599.930914][6034:6039] CHIP:DMG: } - [1657716599.931131][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716599.931326][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716599.931420][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - onoff subscribe on-time 10 100 1 1 - [1657716634.400468][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716634.400499][6034:6039] CHIP:DMG: { - [1657716634.400525][6034:6039] CHIP:DMG: SubscriptionId = 0xf9b815a2, - [1657716634.400551][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716634.400585][6034:6039] CHIP:DMG: [ - [1657716634.400610][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716634.400647][6034:6039] CHIP:DMG: { - [1657716634.400674][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716634.400705][6034:6039] CHIP:DMG: { - [1657716634.400739][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716634.400775][6034:6039] CHIP:DMG: AttributePathIB = - [1657716634.400809][6034:6039] CHIP:DMG: { - [1657716634.400847][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716634.400883][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716634.400920][6034:6039] CHIP:DMG: Attribute = 0x0000_4001, - [1657716634.400950][6034:6039] CHIP:DMG: } - [1657716634.400987][6034:6039] CHIP:DMG: - [1657716634.401024][6034:6039] CHIP:DMG: Data = 1, - [1657716634.401058][6034:6039] CHIP:DMG: }, - [1657716634.401092][6034:6039] CHIP:DMG: - [1657716634.401117][6034:6039] CHIP:DMG: }, - [1657716634.401148][6034:6039] CHIP:DMG: - [1657716634.401172][6034:6039] CHIP:DMG: ], - [1657716634.401202][6034:6039] CHIP:DMG: - [1657716634.401227][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716634.401250][6034:6039] CHIP:DMG: } - [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 - [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 - [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - on the 2nd reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716703.322836][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716703.322895][6034:6039] CHIP:DMG: { - [1657716703.322947][6034:6039] CHIP:DMG: SubscriptionId = 0x8962f8b4, - [1657716703.323010][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716703.323080][6034:6039] CHIP:DMG: [ - [1657716703.323133][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716703.323217][6034:6039] CHIP:DMG: { - [1657716703.323280][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716703.323341][6034:6039] CHIP:DMG: { - [1657716703.323396][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716703.323449][6034:6039] CHIP:DMG: AttributePathIB = - [1657716703.323519][6034:6039] CHIP:DMG: { - [1657716703.323591][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716703.323671][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716703.323759][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716703.323835][6034:6039] CHIP:DMG: } - [1657716703.323909][6034:6039] CHIP:DMG: - [1657716703.323981][6034:6039] CHIP:DMG: Data = 1, - [1657716703.324047][6034:6039] CHIP:DMG: }, - [1657716703.324113][6034:6039] CHIP:DMG: - [1657716703.324170][6034:6039] CHIP:DMG: }, - [1657716703.324238][6034:6039] CHIP:DMG: - [1657716703.324289][6034:6039] CHIP:DMG: ], - [1657716703.324352][6034:6039] CHIP:DMG: - [1657716703.324403][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716703.324457][6034:6039] CHIP:DMG: } - [1657716703.324785][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716703.324904][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716703.324985][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716743.523056][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716743.523131][6034:6039] CHIP:DMG: { - [1657716743.523178][6034:6039] CHIP:DMG: SubscriptionId = 0xc3b3c364, - [1657716743.523240][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716743.523302][6034:6039] CHIP:DMG: [ - [1657716743.523362][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716743.523433][6034:6039] CHIP:DMG: { - [1657716743.523499][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716743.523555][6034:6039] CHIP:DMG: { - [1657716743.523627][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716743.523682][6034:6039] CHIP:DMG: AttributePathIB = - [1657716743.523738][6034:6039] CHIP:DMG: { - [1657716743.523812][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716743.523873][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716743.523934][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716743.523990][6034:6039] CHIP:DMG: } - [1657716743.524050][6034:6039] CHIP:DMG: - [1657716743.524111][6034:6039] CHIP:DMG: Data = "1", - [1657716743.524164][6034:6039] CHIP:DMG: }, - [1657716743.524223][6034:6039] CHIP:DMG: - [1657716743.524271][6034:6039] CHIP:DMG: }, - [1657716743.524328][6034:6039] CHIP:DMG: - [1657716743.524372][6034:6039] CHIP:DMG: ], - [1657716743.524430][6034:6039] CHIP:DMG: - [1657716743.524475][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716743.524518][6034:6039] CHIP:DMG: } - [1657716743.524683][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716743.524745][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716743.524813][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-transition-time 10 100 1 1 - [1657716911.280884][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716911.280957][6034:6039] CHIP:DMG: { - [1657716911.281018][6034:6039] CHIP:DMG: SubscriptionId = 0x1a544eea, - [1657716911.281080][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716911.281157][6034:6039] CHIP:DMG: [ - [1657716911.281217][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716911.281338][6034:6039] CHIP:DMG: { - [1657716911.281408][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716911.281487][6034:6039] CHIP:DMG: { - [1657716911.281570][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716911.281649][6034:6039] CHIP:DMG: AttributePathIB = - [1657716911.281723][6034:6039] CHIP:DMG: { - [1657716911.281813][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716911.281892][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716911.281978][6034:6039] CHIP:DMG: Attribute = 0x0000_0012, - [1657716911.282059][6034:6039] CHIP:DMG: } - [1657716911.282145][6034:6039] CHIP:DMG: - [1657716911.282236][6034:6039] CHIP:DMG: Data = 0, - [1657716911.282311][6034:6039] CHIP:DMG: }, - [1657716911.282392][6034:6039] CHIP:DMG: - [1657716911.282459][6034:6039] CHIP:DMG: }, - [1657716911.282534][6034:6039] CHIP:DMG: - [1657716911.282593][6034:6039] CHIP:DMG: ], - [1657716911.282667][6034:6039] CHIP:DMG: - [1657716911.282727][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716911.282786][6034:6039] CHIP:DMG: } - [1657716911.282995][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0012 DataVersion: 832499115 - [1657716911.283082][6034:6039] CHIP:TOO: on transition time: 0 - [1657716911.283172][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - - on the 3rd reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716965.736576][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313969 from RetransTable on exchange 50225i - [1657716965.736639][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716965.736669][6034:6039] CHIP:DMG: { - [1657716965.736695][6034:6039] CHIP:DMG: SubscriptionId = 0x5a6ddc07, - [1657716965.736741][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716965.736777][6034:6039] CHIP:DMG: [ - [1657716965.736802][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716965.736848][6034:6039] CHIP:DMG: { - [1657716965.736887][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716965.736932][6034:6039] CHIP:DMG: { - [1657716965.736978][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716965.737021][6034:6039] CHIP:DMG: AttributePathIB = - [1657716965.737067][6034:6039] CHIP:DMG: { - [1657716965.737113][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716965.737159][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716965.737207][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716965.737251][6034:6039] CHIP:DMG: } - [1657716965.737346][6034:6039] CHIP:DMG: - [1657716965.737396][6034:6039] CHIP:DMG: Data = 1, - [1657716965.737438][6034:6039] CHIP:DMG: }, - [1657716965.737484][6034:6039] CHIP:DMG: - [1657716965.737521][6034:6039] CHIP:DMG: }, - [1657716965.737563][6034:6039] CHIP:DMG: - [1657716965.737589][6034:6039] CHIP:DMG: ], - [1657716965.737620][6034:6039] CHIP:DMG: - [1657716965.737645][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716965.737679][6034:6039] CHIP:DMG: } - [1657716965.737779][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716965.737827][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716965.737867][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - basic subscribe reachable 10 100 1 0 - [1657717032.547326][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313975 from RetransTable on exchange 50227i - [1657717032.547406][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717032.547470][6034:6039] CHIP:DMG: { - [1657717032.547507][6034:6039] CHIP:DMG: SubscriptionId = 0x242f7180, - [1657717032.547560][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717032.547607][6034:6039] CHIP:DMG: [ - [1657717032.547644][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717032.547696][6034:6039] CHIP:DMG: { - [1657717032.547734][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717032.547779][6034:6039] CHIP:DMG: { - [1657717032.547829][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657717032.547876][6034:6039] CHIP:DMG: AttributePathIB = - [1657717032.547925][6034:6039] CHIP:DMG: { - [1657717032.547974][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657717032.548027][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657717032.548077][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657717032.548124][6034:6039] CHIP:DMG: } - [1657717032.548175][6034:6039] CHIP:DMG: - [1657717032.548225][6034:6039] CHIP:DMG: Data = true, - [1657717032.548272][6034:6039] CHIP:DMG: }, - [1657717032.548321][6034:6039] CHIP:DMG: - [1657717032.548358][6034:6039] CHIP:DMG: }, - [1657717032.548403][6034:6039] CHIP:DMG: - [1657717032.548438][6034:6039] CHIP:DMG: ], - [1657717032.548482][6034:6039] CHIP:DMG: - [1657717032.548518][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717032.548553][6034:6039] CHIP:DMG: } - [1657717032.548686][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 462674998 - [1657717032.548795][6034:6039] CHIP:TOO: Reachable: TRUE - [1657717032.548850][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - onoff subscribe off-wait-time 10 100 1 1 - [1657717085.996867][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717085.996895][6034:6039] CHIP:DMG: { - [1657717085.996920][6034:6039] CHIP:DMG: SubscriptionId = 0xbe7eee69, - [1657717085.996945][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717085.996977][6034:6039] CHIP:DMG: [ - [1657717085.997002][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717085.997035][6034:6039] CHIP:DMG: { - [1657717085.997060][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717085.997089][6034:6039] CHIP:DMG: { - [1657717085.997122][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717085.997153][6034:6039] CHIP:DMG: AttributePathIB = - [1657717085.997187][6034:6039] CHIP:DMG: { - [1657717085.997220][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717085.997258][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717085.997317][6034:6039] CHIP:DMG: Attribute = 0x0000_4002, - [1657717085.997367][6034:6039] CHIP:DMG: } - [1657717085.997404][6034:6039] CHIP:DMG: - [1657717085.997440][6034:6039] CHIP:DMG: Data = 0, - [1657717085.997471][6034:6039] CHIP:DMG: }, - [1657717085.997504][6034:6039] CHIP:DMG: - [1657717085.997531][6034:6039] CHIP:DMG: }, - [1657717085.997561][6034:6039] CHIP:DMG: - [1657717085.997585][6034:6039] CHIP:DMG: ], - [1657717085.997615][6034:6039] CHIP:DMG: - [1657717085.997640][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717085.997663][6034:6039] CHIP:DMG: } - [1657717085.997757][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4002 DataVersion: 1934241157 - [1657717085.997793][6034:6039] CHIP:TOO: OffWaitTime: 0 - [1657717085.997830][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] + on the first reference device(RD1) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 1 0 --keepSubscriptions 1 + [1660652952.537644][58131:58136] CHIP:EM: Removed CHIP MessageCounter:11153878 from RetransTable on exchange 57366i + [1660652952.537721][58131:58136] CHIP:DMG: ReportDataMessage = + [1660652952.537759][58131:58136] CHIP:DMG: { + [1660652952.537794][58131:58136] CHIP:DMG: SubscriptionId = 0x50d4243c, + [1660652952.537829][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660652952.537873][58131:58136] CHIP:DMG: [ + [1660652952.537907][58131:58136] CHIP:DMG: AttributeReportIB = + [1660652952.537964][58131:58136] CHIP:DMG: { + [1660652952.538008][58131:58136] CHIP:DMG: AttributeDataIB = + [1660652952.538055][58131:58136] CHIP:DMG: { + [1660652952.538106][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660652952.538152][58131:58136] CHIP:DMG: AttributePathIB = + [1660652952.538205][58131:58136] CHIP:DMG: { + [1660652952.538254][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660652952.538308][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660652952.538358][58131:58136] CHIP:DMG: Attribute = 0x0000_0005, + [1660652952.538409][58131:58136] CHIP:DMG: } + [1660652952.538465][58131:58136] CHIP:DMG: + [1660652952.538517][58131:58136] CHIP:DMG: Data = "" (0 chars), + [1660652952.538562][58131:58136] CHIP:DMG: }, + [1660652952.538615][58131:58136] CHIP:DMG: + [1660652952.538654][58131:58136] CHIP:DMG: }, + [1660652952.538700][58131:58136] CHIP:DMG: + [1660652952.538734][58131:58136] CHIP:DMG: ], + [1660652952.538777][58131:58136] CHIP:DMG: + [1660652952.538811][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660652952.538844][58131:58136] CHIP:DMG: } + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 1 0 --keepSubscriptions 1 + [1660653005.341371][58131:58136] CHIP:DMG: ReportDataMessage = + [1660653005.341441][58131:58136] CHIP:DMG: { + [1660653005.341503][58131:58136] CHIP:DMG: SubscriptionId = 0xea4facb0, + [1660653005.341568][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653005.341648][58131:58136] CHIP:DMG: [ + [1660653005.341711][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653005.341808][58131:58136] CHIP:DMG: { + [1660653005.341881][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653005.341972][58131:58136] CHIP:DMG: { + [1660653005.342065][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653005.342148][58131:58136] CHIP:DMG: AttributePathIB = + [1660653005.342244][58131:58136] CHIP:DMG: { + [1660653005.342340][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653005.342436][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653005.342528][58131:58136] CHIP:DMG: Attribute = 0x0000_0006, + [1660653005.342616][58131:58136] CHIP:DMG: } + [1660653005.342708][58131:58136] CHIP:DMG: + [1660653005.342801][58131:58136] CHIP:DMG: Data = "XX" (2 chars), + [1660653005.342883][58131:58136] CHIP:DMG: }, + [1660653005.342972][58131:58136] CHIP:DMG: + [1660653005.343045][58131:58136] CHIP:DMG: }, + [1660653005.343129][58131:58136] CHIP:DMG: + [1660653005.343191][58131:58136] CHIP:DMG: ], + [1660653005.343270][58131:58136] CHIP:DMG: + [1660653005.343331][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653005.343392][58131:58136] CHIP:DMG: } + [1660653005.343616][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653005.343884][58131:58136] CHIP:TOO: Location: XX + [1660653005.343983][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa00129b0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 1 0 --keepSubscriptions 1 + [1660653043.575397][58131:58136] CHIP:DMG: ReportDataMessage = + [1660653043.575423][58131:58136] CHIP:DMG: { + [1660653043.575445][58131:58136] CHIP:DMG: SubscriptionId = 0x1ff9dbc5, + [1660653043.575467][58131:58136] CHIP:DMG: AttributeReportIBs = + [1660653043.575504][58131:58136] CHIP:DMG: [ + [1660653043.575526][58131:58136] CHIP:DMG: AttributeReportIB = + [1660653043.575556][58131:58136] CHIP:DMG: { + [1660653043.575579][58131:58136] CHIP:DMG: AttributeDataIB = + [1660653043.575605][58131:58136] CHIP:DMG: { + [1660653043.575633][58131:58136] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653043.575658][58131:58136] CHIP:DMG: AttributePathIB = + [1660653043.575686][58131:58136] CHIP:DMG: { + [1660653043.575713][58131:58136] CHIP:DMG: Endpoint = 0x0, + [1660653043.575743][58131:58136] CHIP:DMG: Cluster = 0x28, + [1660653043.575806][58131:58136] CHIP:DMG: Attribute = 0x0000_0010, + [1660653043.575833][58131:58136] CHIP:DMG: } + [1660653043.575863][58131:58136] CHIP:DMG: + [1660653043.575892][58131:58136] CHIP:DMG: Data = false, + [1660653043.575917][58131:58136] CHIP:DMG: }, + [1660653043.575944][58131:58136] CHIP:DMG: + [1660653043.575966][58131:58136] CHIP:DMG: }, + [1660653043.575993][58131:58136] CHIP:DMG: + [1660653043.576013][58131:58136] CHIP:DMG: ], + [1660653043.576041][58131:58136] CHIP:DMG: + [1660653043.576063][58131:58136] CHIP:DMG: InteractionModelRevision = 1 + [1660653043.576084][58131:58136] CHIP:DMG: } + [1660653043.576169][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653043.576207][58131:58136] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653043.576240][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0012b40]: Moving to [AwaitingSu] + + + + on the 2nd reference device(RD2) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653125.592268][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653125.592310][58143:58148] CHIP:DMG: { + [1660653125.592348][58143:58148] CHIP:DMG: SubscriptionId = 0xc15110c4, + [1660653125.592387][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653125.592435][58143:58148] CHIP:DMG: [ + [1660653125.592472][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653125.592527][58143:58148] CHIP:DMG: { + [1660653125.592568][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653125.592618][58143:58148] CHIP:DMG: { + [1660653125.592675][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653125.592726][58143:58148] CHIP:DMG: AttributePathIB = + [1660653125.592785][58143:58148] CHIP:DMG: { + [1660653125.592839][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653125.592896][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653125.592946][58143:58148] CHIP:DMG: Attribute = 0x0000_0005, + [1660653125.592997][58143:58148] CHIP:DMG: } + [1660653125.593051][58143:58148] CHIP:DMG: + [1660653125.593109][58143:58148] CHIP:DMG: Data = "" (0 chars), + [1660653125.593158][58143:58148] CHIP:DMG: }, + [1660653125.593212][58143:58148] CHIP:DMG: + [1660653125.593255][58143:58148] CHIP:DMG: }, + [1660653125.593305][58143:58148] CHIP:DMG: + [1660653125.593342][58143:58148] CHIP:DMG: ], + [1660653125.593390][58143:58148] CHIP:DMG: + [1660653125.593428][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653125.593464][58143:58148] CHIP:DMG: } + [1660653125.593640][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653125.593706][58143:58148] CHIP:TOO: NodeLabel: + [1660653125.593776][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff6800df30]: Moving to [AwaitingSu] + + + + + basic subscribe location 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653198.460290][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653198.460359][58143:58148] CHIP:DMG: { + [1660653198.460423][58143:58148] CHIP:DMG: SubscriptionId = 0xfed77bda, + [1660653198.460487][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653198.460567][58143:58148] CHIP:DMG: [ + [1660653198.460630][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653198.460718][58143:58148] CHIP:DMG: { + [1660653198.460786][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653198.460871][58143:58148] CHIP:DMG: { + [1660653198.460966][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653198.461058][58143:58148] CHIP:DMG: AttributePathIB = + [1660653198.461147][58143:58148] CHIP:DMG: { + [1660653198.461244][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653198.461335][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653198.461427][58143:58148] CHIP:DMG: Attribute = 0x0000_0006, + [1660653198.461513][58143:58148] CHIP:DMG: } + [1660653198.461604][58143:58148] CHIP:DMG: + [1660653198.461699][58143:58148] CHIP:DMG: Data = "XX" (2 chars), + [1660653198.461782][58143:58148] CHIP:DMG: }, + [1660653198.461880][58143:58148] CHIP:DMG: + [1660653198.461952][58143:58148] CHIP:DMG: }, + [1660653198.462037][58143:58148] CHIP:DMG: + [1660653198.462099][58143:58148] CHIP:DMG: ], + [1660653198.462176][58143:58148] CHIP:DMG: + [1660653198.462241][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653198.462303][58143:58148] CHIP:DMG: } + [1660653198.462524][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653198.462606][58143:58148] CHIP:TOO: Location: XX + [1660653198.462695][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68010fa0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653260.633215][58143:58148] CHIP:EM: Removed CHIP MessageCounter:178377836 from RetransTable on exchange 25360i + [1660653260.633327][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653260.633387][58143:58148] CHIP:DMG: { + [1660653260.633442][58143:58148] CHIP:DMG: SubscriptionId = 0x60feee4d, + [1660653260.633493][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653260.633560][58143:58148] CHIP:DMG: [ + [1660653260.633615][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653260.633691][58143:58148] CHIP:DMG: { + [1660653260.633755][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653260.633820][58143:58148] CHIP:DMG: { + [1660653260.633891][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653260.633964][58143:58148] CHIP:DMG: AttributePathIB = + [1660653260.634046][58143:58148] CHIP:DMG: { + [1660653260.634130][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653260.634212][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653260.634292][58143:58148] CHIP:DMG: Attribute = 0x0000_0010, + [1660653260.634366][58143:58148] CHIP:DMG: } + [1660653260.634445][58143:58148] CHIP:DMG: + [1660653260.634523][58143:58148] CHIP:DMG: Data = false, + [1660653260.634600][58143:58148] CHIP:DMG: }, + [1660653260.634674][58143:58148] CHIP:DMG: + [1660653260.634736][58143:58148] CHIP:DMG: }, + [1660653260.634802][58143:58148] CHIP:DMG: + [1660653260.634855][58143:58148] CHIP:DMG: ], + [1660653260.635066][58143:58148] CHIP:DMG: + [1660653260.635128][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653260.635181][58143:58148] CHIP:DMG: } + [1660653260.635371][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653260.635446][58143:58148] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653260.635523][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68011170]: Moving to [AwaitingSu] + + + + + on the 3rd reference device(RD3) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653438.741061][58149:58154] CHIP:EM: Removed CHIP MessageCounter:141916359 from RetransTable on exchange 34400i + [1660653438.741116][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653438.741143][58149:58154] CHIP:DMG: { + [1660653438.741236][58149:58154] CHIP:DMG: SubscriptionId = 0xff93c648, + [1660653438.741262][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653438.741294][58149:58154] CHIP:DMG: [ + [1660653438.741318][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653438.741352][58149:58154] CHIP:DMG: { + [1660653438.741380][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653438.741415][58149:58154] CHIP:DMG: { + [1660653438.741448][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653438.741479][58149:58154] CHIP:DMG: AttributePathIB = + [1660653438.741517][58149:58154] CHIP:DMG: { + [1660653438.741553][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653438.741592][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653438.741627][58149:58154] CHIP:DMG: Attribute = 0x0000_0005, + [1660653438.741660][58149:58154] CHIP:DMG: } + [1660653438.741695][58149:58154] CHIP:DMG: + [1660653438.741732][58149:58154] CHIP:DMG: Data = "" (0 chars), + [1660653438.741764][58149:58154] CHIP:DMG: }, + [1660653438.741800][58149:58154] CHIP:DMG: + [1660653438.741828][58149:58154] CHIP:DMG: }, + [1660653438.741859][58149:58154] CHIP:DMG: + [1660653438.741883][58149:58154] CHIP:DMG: ], + [1660653438.741913][58149:58154] CHIP:DMG: + [1660653438.741938][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653438.741961][58149:58154] CHIP:DMG: } + [1660653438.742081][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653438.742125][58149:58154] CHIP:TOO: NodeLabel: + [1660653438.742171][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740129e0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 4th reference device(RD4) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 5th reference device(RD5) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + + basic subscribe location 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + : } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + Once all 15 subscriptions are active send one more subscriptiopn command in RD1 and Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. + basic subscribe product-id 100 1000 1 0 --keepSubscriptions 1 + [1660654945.477837][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3782190841 + [1660654945.477932][58149:58154] CHIP:TOO: ProductID: 32769 + [1660654945.478023][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740127c0]: Moving to [AwaitingSu] disabled: true - label: @@ -997,440 +1058,285 @@ tests: verification: | Please run this test in chip tool interactive mode ./chip-tool interactive start + Example commands given below are using 5 reference devices (User can use 5 reference devices and send the below command in from each reference device) + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 6 paths, Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. - Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - - on the first reference deice enter: - - levelcontrol subscribe min-level 10 100 1 1 - [1657717758.176398][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717758.176466][6034:6039] CHIP:DMG: { - [1657717758.176545][6034:6039] CHIP:DMG: SubscriptionId = 0xbf960b6c, - [1657717758.176619][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717758.176698][6034:6039] CHIP:DMG: [ - [1657717758.176750][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717758.176818][6034:6039] CHIP:DMG: { - [1657717758.176872][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717758.176959][6034:6039] CHIP:DMG: { - [1657717758.177034][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657717758.177136][6034:6039] CHIP:DMG: AttributePathIB = - [1657717758.177206][6034:6039] CHIP:DMG: { - [1657717758.177269][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717758.177377][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657717758.177429][6034:6039] CHIP:DMG: Attribute = 0x0000_0002, - [1657717758.177488][6034:6039] CHIP:DMG: } - [1657717758.177551][6034:6039] CHIP:DMG: - [1657717758.177600][6034:6039] CHIP:DMG: Data = 1, - [1657717758.177655][6034:6039] CHIP:DMG: }, - [1657717758.177716][6034:6039] CHIP:DMG: - [1657717758.177755][6034:6039] CHIP:DMG: }, - [1657717758.177813][6034:6039] CHIP:DMG: - [1657717758.177850][6034:6039] CHIP:DMG: ], - [1657717758.177896][6034:6039] CHIP:DMG: - [1657717758.177933][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717758.177969][6034:6039] CHIP:DMG: } - [1657717758.178105][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0002 DataVersion: 832499115 - [1657717758.178156][6034:6039] CHIP:TOO: min level: 1 - [1657717758.178215][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - - onoff subscribe global-scene-control 10 100 1 1 - [1657717721.303602][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717721.303670][6034:6039] CHIP:DMG: { - [1657717721.303730][6034:6039] CHIP:DMG: SubscriptionId = 0x2b768ffd, - [1657717721.303791][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717721.303867][6034:6039] CHIP:DMG: [ - [1657717721.303928][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717721.304007][6034:6039] CHIP:DMG: { - [1657717721.304071][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717721.304149][6034:6039] CHIP:DMG: { - [1657717721.304225][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717721.304297][6034:6039] CHIP:DMG: AttributePathIB = - [1657717721.304372][6034:6039] CHIP:DMG: { - [1657717721.304454][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717721.304542][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717721.304628][6034:6039] CHIP:DMG: Attribute = 0x0000_4000, - [1657717721.304711][6034:6039] CHIP:DMG: } - [1657717721.304797][6034:6039] CHIP:DMG: - [1657717721.304881][6034:6039] CHIP:DMG: Data = true, - [1657717721.304958][6034:6039] CHIP:DMG: }, - [1657717721.305039][6034:6039] CHIP:DMG: - [1657717721.305102][6034:6039] CHIP:DMG: }, - [1657717721.305178][6034:6039] CHIP:DMG: - [1657717721.305238][6034:6039] CHIP:DMG: ], - [1657717721.305348][6034:6039] CHIP:DMG: - [1657717721.305412][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717721.305470][6034:6039] CHIP:DMG: } - [1657717721.305679][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4000 DataVersion: 1934241157 - [1657717721.305761][6034:6039] CHIP:TOO: GlobalSceneControl: TRUE - [1657717721.305849][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - temperaturemeasurement subscribe tolerance 10 100 1 1 - [1657717893.368431][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717893.368514][6034:6039] CHIP:DMG: { - [1657717893.368562][6034:6039] CHIP:DMG: SubscriptionId = 0x87e778d7, - [1657717893.368649][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717893.368744][6034:6039] CHIP:DMG: [ - [1657717893.368837][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717893.368943][6034:6039] CHIP:DMG: { - [1657717893.369046][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717893.369138][6034:6039] CHIP:DMG: { - [1657717893.369231][6034:6039] CHIP:DMG: DataVersion = 0x8ca282b3, - [1657717893.369359][6034:6039] CHIP:DMG: AttributePathIB = - [1657717893.369461][6034:6039] CHIP:DMG: { - [1657717893.369563][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717893.369674][6034:6039] CHIP:DMG: Cluster = 0x402, - [1657717893.369786][6034:6039] CHIP:DMG: Attribute = 0x0000_0003, - [1657717893.369896][6034:6039] CHIP:DMG: } - [1657717893.370000][6034:6039] CHIP:DMG: - [1657717893.370094][6034:6039] CHIP:DMG: Data = 0, - [1657717893.370192][6034:6039] CHIP:DMG: }, - [1657717893.370284][6034:6039] CHIP:DMG: - [1657717893.370359][6034:6039] CHIP:DMG: }, - [1657717893.370439][6034:6039] CHIP:DMG: - [1657717893.370504][6034:6039] CHIP:DMG: ], - [1657717893.370575][6034:6039] CHIP:DMG: - [1657717893.370630][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717893.370699][6034:6039] CHIP:DMG: } - [1657717893.370819][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_0003 DataVersion: 2359460531 - [1657717893.370888][6034:6039] CHIP:TOO: Tolerance: 0 - [1657717893.370929][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - - [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716563.242475][6034:6039] CHIP:DMG: { - [1657716563.242507][6034:6039] CHIP:DMG: SubscriptionId = 0xebc26cc4, - [1657716563.242538][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716563.242577][6034:6039] CHIP:DMG: [ - [1657716563.242607][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716563.242648][6034:6039] CHIP:DMG: { - [1657716563.242680][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716563.242721][6034:6039] CHIP:DMG: { - [1657716563.242762][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716563.242801][6034:6039] CHIP:DMG: AttributePathIB = - [1657716563.242842][6034:6039] CHIP:DMG: { - [1657716563.242883][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716563.242928][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716563.242971][6034:6039] CHIP:DMG: Attribute = 0x0000_0010, - [1657716563.243012][6034:6039] CHIP:DMG: } - [1657716563.243056][6034:6039] CHIP:DMG: - [1657716563.243100][6034:6039] CHIP:DMG: Data = 1, - [1657716563.243138][6034:6039] CHIP:DMG: }, - [1657716563.243179][6034:6039] CHIP:DMG: - [1657716563.243213][6034:6039] CHIP:DMG: }, - [1657716563.243251][6034:6039] CHIP:DMG: - [1657716563.243280][6034:6039] CHIP:DMG: ], - [1657716563.243318][6034:6039] CHIP:DMG: - [1657716563.243348][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716563.243377][6034:6039] CHIP:DMG: } - [1657716563.243531][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499115 - [1657716563.243601][6034:6039] CHIP:TOO: on off transition time: 1 - [1657716563.243648][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716599.928585][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716599.928652][6034:6039] CHIP:DMG: { - [1657716599.928825][6034:6039] CHIP:DMG: SubscriptionId = 0x3d9f1c1, - [1657716599.928890][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716599.928968][6034:6039] CHIP:DMG: [ - [1657716599.929029][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716599.929122][6034:6039] CHIP:DMG: { - [1657716599.929192][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716599.929278][6034:6039] CHIP:DMG: { - [1657716599.929399][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716599.929476][6034:6039] CHIP:DMG: AttributePathIB = - [1657716599.929687][6034:6039] CHIP:DMG: { - [1657716599.929774][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716599.929861][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716599.929949][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716599.930031][6034:6039] CHIP:DMG: } - [1657716599.930115][6034:6039] CHIP:DMG: - [1657716599.930285][6034:6039] CHIP:DMG: Data = "1", - [1657716599.930370][6034:6039] CHIP:DMG: }, - [1657716599.930454][6034:6039] CHIP:DMG: - [1657716599.930578][6034:6039] CHIP:DMG: }, - [1657716599.930660][6034:6039] CHIP:DMG: - [1657716599.930720][6034:6039] CHIP:DMG: ], - [1657716599.930796][6034:6039] CHIP:DMG: - [1657716599.930856][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716599.930914][6034:6039] CHIP:DMG: } - [1657716599.931131][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716599.931326][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716599.931420][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - onoff subscribe on-time 10 100 1 1 - [1657716634.400468][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716634.400499][6034:6039] CHIP:DMG: { - [1657716634.400525][6034:6039] CHIP:DMG: SubscriptionId = 0xf9b815a2, - [1657716634.400551][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716634.400585][6034:6039] CHIP:DMG: [ - [1657716634.400610][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716634.400647][6034:6039] CHIP:DMG: { - [1657716634.400674][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716634.400705][6034:6039] CHIP:DMG: { - [1657716634.400739][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716634.400775][6034:6039] CHIP:DMG: AttributePathIB = - [1657716634.400809][6034:6039] CHIP:DMG: { - [1657716634.400847][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716634.400883][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716634.400920][6034:6039] CHIP:DMG: Attribute = 0x0000_4001, - [1657716634.400950][6034:6039] CHIP:DMG: } - [1657716634.400987][6034:6039] CHIP:DMG: - [1657716634.401024][6034:6039] CHIP:DMG: Data = 1, - [1657716634.401058][6034:6039] CHIP:DMG: }, - [1657716634.401092][6034:6039] CHIP:DMG: - [1657716634.401117][6034:6039] CHIP:DMG: }, - [1657716634.401148][6034:6039] CHIP:DMG: - [1657716634.401172][6034:6039] CHIP:DMG: ], - [1657716634.401202][6034:6039] CHIP:DMG: - [1657716634.401227][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716634.401250][6034:6039] CHIP:DMG: } - [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 - [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 - [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - on the 2nd reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716703.322836][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716703.322895][6034:6039] CHIP:DMG: { - [1657716703.322947][6034:6039] CHIP:DMG: SubscriptionId = 0x8962f8b4, - [1657716703.323010][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716703.323080][6034:6039] CHIP:DMG: [ - [1657716703.323133][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716703.323217][6034:6039] CHIP:DMG: { - [1657716703.323280][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716703.323341][6034:6039] CHIP:DMG: { - [1657716703.323396][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716703.323449][6034:6039] CHIP:DMG: AttributePathIB = - [1657716703.323519][6034:6039] CHIP:DMG: { - [1657716703.323591][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716703.323671][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716703.323759][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716703.323835][6034:6039] CHIP:DMG: } - [1657716703.323909][6034:6039] CHIP:DMG: - [1657716703.323981][6034:6039] CHIP:DMG: Data = 1, - [1657716703.324047][6034:6039] CHIP:DMG: }, - [1657716703.324113][6034:6039] CHIP:DMG: - [1657716703.324170][6034:6039] CHIP:DMG: }, - [1657716703.324238][6034:6039] CHIP:DMG: - [1657716703.324289][6034:6039] CHIP:DMG: ], - [1657716703.324352][6034:6039] CHIP:DMG: - [1657716703.324403][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716703.324457][6034:6039] CHIP:DMG: } - [1657716703.324785][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716703.324904][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716703.324985][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716743.523056][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716743.523131][6034:6039] CHIP:DMG: { - [1657716743.523178][6034:6039] CHIP:DMG: SubscriptionId = 0xc3b3c364, - [1657716743.523240][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716743.523302][6034:6039] CHIP:DMG: [ - [1657716743.523362][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716743.523433][6034:6039] CHIP:DMG: { - [1657716743.523499][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716743.523555][6034:6039] CHIP:DMG: { - [1657716743.523627][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716743.523682][6034:6039] CHIP:DMG: AttributePathIB = - [1657716743.523738][6034:6039] CHIP:DMG: { - [1657716743.523812][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716743.523873][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716743.523934][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716743.523990][6034:6039] CHIP:DMG: } - [1657716743.524050][6034:6039] CHIP:DMG: - [1657716743.524111][6034:6039] CHIP:DMG: Data = "1", - [1657716743.524164][6034:6039] CHIP:DMG: }, - [1657716743.524223][6034:6039] CHIP:DMG: - [1657716743.524271][6034:6039] CHIP:DMG: }, - [1657716743.524328][6034:6039] CHIP:DMG: - [1657716743.524372][6034:6039] CHIP:DMG: ], - [1657716743.524430][6034:6039] CHIP:DMG: - [1657716743.524475][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716743.524518][6034:6039] CHIP:DMG: } - [1657716743.524683][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716743.524745][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716743.524813][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-transition-time 10 100 1 1 - [1657716911.280884][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716911.280957][6034:6039] CHIP:DMG: { - [1657716911.281018][6034:6039] CHIP:DMG: SubscriptionId = 0x1a544eea, - [1657716911.281080][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716911.281157][6034:6039] CHIP:DMG: [ - [1657716911.281217][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716911.281338][6034:6039] CHIP:DMG: { - [1657716911.281408][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716911.281487][6034:6039] CHIP:DMG: { - [1657716911.281570][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716911.281649][6034:6039] CHIP:DMG: AttributePathIB = - [1657716911.281723][6034:6039] CHIP:DMG: { - [1657716911.281813][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716911.281892][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716911.281978][6034:6039] CHIP:DMG: Attribute = 0x0000_0012, - [1657716911.282059][6034:6039] CHIP:DMG: } - [1657716911.282145][6034:6039] CHIP:DMG: - [1657716911.282236][6034:6039] CHIP:DMG: Data = 0, - [1657716911.282311][6034:6039] CHIP:DMG: }, - [1657716911.282392][6034:6039] CHIP:DMG: - [1657716911.282459][6034:6039] CHIP:DMG: }, - [1657716911.282534][6034:6039] CHIP:DMG: - [1657716911.282593][6034:6039] CHIP:DMG: ], - [1657716911.282667][6034:6039] CHIP:DMG: - [1657716911.282727][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716911.282786][6034:6039] CHIP:DMG: } - [1657716911.282995][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0012 DataVersion: 832499115 - [1657716911.283082][6034:6039] CHIP:TOO: on transition time: 0 - [1657716911.283172][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - - on the 3rd reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716965.736576][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313969 from RetransTable on exchange 50225i - [1657716965.736639][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716965.736669][6034:6039] CHIP:DMG: { - [1657716965.736695][6034:6039] CHIP:DMG: SubscriptionId = 0x5a6ddc07, - [1657716965.736741][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716965.736777][6034:6039] CHIP:DMG: [ - [1657716965.736802][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716965.736848][6034:6039] CHIP:DMG: { - [1657716965.736887][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716965.736932][6034:6039] CHIP:DMG: { - [1657716965.736978][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716965.737021][6034:6039] CHIP:DMG: AttributePathIB = - [1657716965.737067][6034:6039] CHIP:DMG: { - [1657716965.737113][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716965.737159][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716965.737207][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716965.737251][6034:6039] CHIP:DMG: } - [1657716965.737346][6034:6039] CHIP:DMG: - [1657716965.737396][6034:6039] CHIP:DMG: Data = 1, - [1657716965.737438][6034:6039] CHIP:DMG: }, - [1657716965.737484][6034:6039] CHIP:DMG: - [1657716965.737521][6034:6039] CHIP:DMG: }, - [1657716965.737563][6034:6039] CHIP:DMG: - [1657716965.737589][6034:6039] CHIP:DMG: ], - [1657716965.737620][6034:6039] CHIP:DMG: - [1657716965.737645][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716965.737679][6034:6039] CHIP:DMG: } - [1657716965.737779][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716965.737827][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716965.737867][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - basic subscribe reachable 10 100 1 0 - [1657717032.547326][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313975 from RetransTable on exchange 50227i - [1657717032.547406][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717032.547470][6034:6039] CHIP:DMG: { - [1657717032.547507][6034:6039] CHIP:DMG: SubscriptionId = 0x242f7180, - [1657717032.547560][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717032.547607][6034:6039] CHIP:DMG: [ - [1657717032.547644][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717032.547696][6034:6039] CHIP:DMG: { - [1657717032.547734][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717032.547779][6034:6039] CHIP:DMG: { - [1657717032.547829][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657717032.547876][6034:6039] CHIP:DMG: AttributePathIB = - [1657717032.547925][6034:6039] CHIP:DMG: { - [1657717032.547974][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657717032.548027][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657717032.548077][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657717032.548124][6034:6039] CHIP:DMG: } - [1657717032.548175][6034:6039] CHIP:DMG: - [1657717032.548225][6034:6039] CHIP:DMG: Data = true, - [1657717032.548272][6034:6039] CHIP:DMG: }, - [1657717032.548321][6034:6039] CHIP:DMG: - [1657717032.548358][6034:6039] CHIP:DMG: }, - [1657717032.548403][6034:6039] CHIP:DMG: - [1657717032.548438][6034:6039] CHIP:DMG: ], - [1657717032.548482][6034:6039] CHIP:DMG: - [1657717032.548518][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717032.548553][6034:6039] CHIP:DMG: } - [1657717032.548686][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 462674998 - [1657717032.548795][6034:6039] CHIP:TOO: Reachable: TRUE - [1657717032.548850][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - onoff subscribe off-wait-time 10 100 1 1 - [1657717085.996867][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717085.996895][6034:6039] CHIP:DMG: { - [1657717085.996920][6034:6039] CHIP:DMG: SubscriptionId = 0xbe7eee69, - [1657717085.996945][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717085.996977][6034:6039] CHIP:DMG: [ - [1657717085.997002][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717085.997035][6034:6039] CHIP:DMG: { - [1657717085.997060][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717085.997089][6034:6039] CHIP:DMG: { - [1657717085.997122][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717085.997153][6034:6039] CHIP:DMG: AttributePathIB = - [1657717085.997187][6034:6039] CHIP:DMG: { - [1657717085.997220][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717085.997258][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717085.997317][6034:6039] CHIP:DMG: Attribute = 0x0000_4002, - [1657717085.997367][6034:6039] CHIP:DMG: } - [1657717085.997404][6034:6039] CHIP:DMG: - [1657717085.997440][6034:6039] CHIP:DMG: Data = 0, - [1657717085.997471][6034:6039] CHIP:DMG: }, - [1657717085.997504][6034:6039] CHIP:DMG: - [1657717085.997531][6034:6039] CHIP:DMG: }, - [1657717085.997561][6034:6039] CHIP:DMG: - [1657717085.997585][6034:6039] CHIP:DMG: ], - [1657717085.997615][6034:6039] CHIP:DMG: - [1657717085.997640][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717085.997663][6034:6039] CHIP:DMG: } - [1657717085.997757][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4002 DataVersion: 1934241157 - [1657717085.997793][6034:6039] CHIP:TOO: OffWaitTime: 0 - [1657717085.997830][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] + on the 2nd reference device(RD2) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653125.592268][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653125.592310][58143:58148] CHIP:DMG: { + [1660653125.592348][58143:58148] CHIP:DMG: SubscriptionId = 0xc15110c4, + [1660653125.592387][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653125.592435][58143:58148] CHIP:DMG: [ + [1660653125.592472][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653125.592527][58143:58148] CHIP:DMG: { + [1660653125.592568][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653125.592618][58143:58148] CHIP:DMG: { + [1660653125.592675][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653125.592726][58143:58148] CHIP:DMG: AttributePathIB = + [1660653125.592785][58143:58148] CHIP:DMG: { + [1660653125.592839][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653125.592896][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653125.592946][58143:58148] CHIP:DMG: Attribute = 0x0000_0005, + [1660653125.592997][58143:58148] CHIP:DMG: } + [1660653125.593051][58143:58148] CHIP:DMG: + [1660653125.593109][58143:58148] CHIP:DMG: Data = "" (0 chars), + [1660653125.593158][58143:58148] CHIP:DMG: }, + [1660653125.593212][58143:58148] CHIP:DMG: + [1660653125.593255][58143:58148] CHIP:DMG: }, + [1660653125.593305][58143:58148] CHIP:DMG: + [1660653125.593342][58143:58148] CHIP:DMG: ], + [1660653125.593390][58143:58148] CHIP:DMG: + [1660653125.593428][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653125.593464][58143:58148] CHIP:DMG: } + [1660653125.593640][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653125.593706][58143:58148] CHIP:TOO: NodeLabel: + [1660653125.593776][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff6800df30]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653198.460290][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653198.460359][58143:58148] CHIP:DMG: { + [1660653198.460423][58143:58148] CHIP:DMG: SubscriptionId = 0xfed77bda, + [1660653198.460487][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653198.460567][58143:58148] CHIP:DMG: [ + [1660653198.460630][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653198.460718][58143:58148] CHIP:DMG: { + [1660653198.460786][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653198.460871][58143:58148] CHIP:DMG: { + [1660653198.460966][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653198.461058][58143:58148] CHIP:DMG: AttributePathIB = + [1660653198.461147][58143:58148] CHIP:DMG: { + [1660653198.461244][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653198.461335][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653198.461427][58143:58148] CHIP:DMG: Attribute = 0x0000_0006, + [1660653198.461513][58143:58148] CHIP:DMG: } + [1660653198.461604][58143:58148] CHIP:DMG: + [1660653198.461699][58143:58148] CHIP:DMG: Data = "XX" (2 chars), + [1660653198.461782][58143:58148] CHIP:DMG: }, + [1660653198.461880][58143:58148] CHIP:DMG: + [1660653198.461952][58143:58148] CHIP:DMG: }, + [1660653198.462037][58143:58148] CHIP:DMG: + [1660653198.462099][58143:58148] CHIP:DMG: ], + [1660653198.462176][58143:58148] CHIP:DMG: + [1660653198.462241][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653198.462303][58143:58148] CHIP:DMG: } + [1660653198.462524][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653198.462606][58143:58148] CHIP:TOO: Location: XX + [1660653198.462695][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68010fa0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 2 0 --commissioner-name beta --keepSubscriptions 1 + [1660653260.633215][58143:58148] CHIP:EM: Removed CHIP MessageCounter:178377836 from RetransTable on exchange 25360i + [1660653260.633327][58143:58148] CHIP:DMG: ReportDataMessage = + [1660653260.633387][58143:58148] CHIP:DMG: { + [1660653260.633442][58143:58148] CHIP:DMG: SubscriptionId = 0x60feee4d, + [1660653260.633493][58143:58148] CHIP:DMG: AttributeReportIBs = + [1660653260.633560][58143:58148] CHIP:DMG: [ + [1660653260.633615][58143:58148] CHIP:DMG: AttributeReportIB = + [1660653260.633691][58143:58148] CHIP:DMG: { + [1660653260.633755][58143:58148] CHIP:DMG: AttributeDataIB = + [1660653260.633820][58143:58148] CHIP:DMG: { + [1660653260.633891][58143:58148] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653260.633964][58143:58148] CHIP:DMG: AttributePathIB = + [1660653260.634046][58143:58148] CHIP:DMG: { + [1660653260.634130][58143:58148] CHIP:DMG: Endpoint = 0x0, + [1660653260.634212][58143:58148] CHIP:DMG: Cluster = 0x28, + [1660653260.634292][58143:58148] CHIP:DMG: Attribute = 0x0000_0010, + [1660653260.634366][58143:58148] CHIP:DMG: } + [1660653260.634445][58143:58148] CHIP:DMG: + [1660653260.634523][58143:58148] CHIP:DMG: Data = false, + [1660653260.634600][58143:58148] CHIP:DMG: }, + [1660653260.634674][58143:58148] CHIP:DMG: + [1660653260.634736][58143:58148] CHIP:DMG: }, + [1660653260.634802][58143:58148] CHIP:DMG: + [1660653260.634855][58143:58148] CHIP:DMG: ], + [1660653260.635066][58143:58148] CHIP:DMG: + [1660653260.635128][58143:58148] CHIP:DMG: InteractionModelRevision = 1 + [1660653260.635181][58143:58148] CHIP:DMG: } + [1660653260.635371][58143:58148] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653260.635446][58143:58148] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653260.635523][58143:58148] CHIP:DMG: MoveToState ReadClient[0xffff68011170]: Moving to [AwaitingSu] + + + + + on the 3nd reference device(RD3) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653438.741061][58149:58154] CHIP:EM: Removed CHIP MessageCounter:141916359 from RetransTable on exchange 34400i + [1660653438.741116][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653438.741143][58149:58154] CHIP:DMG: { + [1660653438.741236][58149:58154] CHIP:DMG: SubscriptionId = 0xff93c648, + [1660653438.741262][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653438.741294][58149:58154] CHIP:DMG: [ + [1660653438.741318][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653438.741352][58149:58154] CHIP:DMG: { + [1660653438.741380][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653438.741415][58149:58154] CHIP:DMG: { + [1660653438.741448][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653438.741479][58149:58154] CHIP:DMG: AttributePathIB = + [1660653438.741517][58149:58154] CHIP:DMG: { + [1660653438.741553][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653438.741592][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653438.741627][58149:58154] CHIP:DMG: Attribute = 0x0000_0005, + [1660653438.741660][58149:58154] CHIP:DMG: } + [1660653438.741695][58149:58154] CHIP:DMG: + [1660653438.741732][58149:58154] CHIP:DMG: Data = "" (0 chars), + [1660653438.741764][58149:58154] CHIP:DMG: }, + [1660653438.741800][58149:58154] CHIP:DMG: + [1660653438.741828][58149:58154] CHIP:DMG: }, + [1660653438.741859][58149:58154] CHIP:DMG: + [1660653438.741883][58149:58154] CHIP:DMG: ], + [1660653438.741913][58149:58154] CHIP:DMG: + [1660653438.741938][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653438.741961][58149:58154] CHIP:DMG: } + [1660653438.742081][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660653438.742125][58149:58154] CHIP:TOO: NodeLabel: + [1660653438.742171][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740129e0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653500.501007][58149:58154] CHIP:DMG: { + [1660653500.501077][58149:58154] CHIP:DMG: SubscriptionId = 0xb129bd8c, + [1660653500.501126][58149:58154] CHIP:DMG: AttributeReportIBs = + [1660653500.501204][58149:58154] CHIP:DMG: [ + [1660653500.501253][58149:58154] CHIP:DMG: AttributeReportIB = + [1660653500.501323][58149:58154] CHIP:DMG: { + [1660653500.501397][58149:58154] CHIP:DMG: AttributeDataIB = + [1660653500.501466][58149:58154] CHIP:DMG: { + [1660653500.501550][58149:58154] CHIP:DMG: DataVersion = 0xe16fa6f6, + [1660653500.501615][58149:58154] CHIP:DMG: AttributePathIB = + [1660653500.501698][58149:58154] CHIP:DMG: { + [1660653500.501765][58149:58154] CHIP:DMG: Endpoint = 0x0, + [1660653500.501835][58149:58154] CHIP:DMG: Cluster = 0x28, + [1660653500.501905][58149:58154] CHIP:DMG: Attribute = 0x0000_0006, + [1660653500.501971][58149:58154] CHIP:DMG: } + [1660653500.502041][58149:58154] CHIP:DMG: + [1660653500.502111][58149:58154] CHIP:DMG: Data = "XX" (2 chars), + [1660653500.502176][58149:58154] CHIP:DMG: }, + [1660653500.502249][58149:58154] CHIP:DMG: + [1660653500.502303][58149:58154] CHIP:DMG: }, + [1660653500.502367][58149:58154] CHIP:DMG: + [1660653500.502414][58149:58154] CHIP:DMG: ], + [1660653500.502473][58149:58154] CHIP:DMG: + [1660653500.502520][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653500.502567][58149:58154] CHIP:DMG: } + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 3 0 --commissioner-name 4 --keepSubscriptions 1 + [1660653545.650817][58149:58154] CHIP:DMG: ReportDataMessage = + [1660653545.650842][58149:58154] CHIP:DMG: { + [1660653545.650864][58149:58154] CHIP:DMG: SubscriptionId = 0x5310d542, + . + . + . + [1660653545.651494][58149:58154] CHIP:DMG: InteractionModelRevision = 1 + [1660653545.651514][58149:58154] CHIP:DMG: } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 4nd reference device(RD4) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 4 0 --commissioner-name 5 --keepSubscriptions 1 + : } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + + on the 5th reference device(RD5) send 3 Subscribe Request Messages to DUT. + basic subscribe node-label 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + + basic subscribe location 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 + + [1660653500.502738][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653500.502801][58149:58154] CHIP:TOO: Location: XX + [1660653500.502870][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff7400adb0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + : } + [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653545.651669][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff74009a20]: Moving to [AwaitingSu] + + + on the 1st reference device(RD1) send 6 Subscribe Request Messages to DUT, and Verify that the Subscriptions from RD2, RD3, RD4, RD5 are not affected. + basic subscribe node-label 100 1000 1 0 --keepSubscriptions 1 + [1660652952.539010][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3782190838 + [1660652952.539073][58131:58136] CHIP:TOO: NodeLabel: + [1660652952.539140][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0004bc0]: Moving to [AwaitingSu] + + + basic subscribe location 100 1000 1 0 --keepSubscriptions 1 + [1660653005.343616][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3782190838 + [1660653005.343884][58131:58136] CHIP:TOO: Location: XX + [1660653005.343983][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa00129b0]: Moving to [AwaitingSu] + + + + basic subscribe local-config-disabled 100 1000 1 0 --keepSubscriptions 1 + [1660653043.576169][58131:58136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 + [1660653043.576207][58131:58136] CHIP:TOO: LocalConfigDisabled: FALSE + [1660653043.576240][58131:58136] CHIP:DMG: MoveToState ReadClient[0xffffa0012b40]: Moving to [AwaitingSu] + + + + + basic subscribe product-id 100 1000 1 0 --keepSubscriptions 1 + + [1660654945.477837][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3782190841 + [1660654945.477932][58149:58154] CHIP:TOO: ProductID: 32769 + [1660654945.478023][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740127c0]: Moving to [AwaitingSu] + + + basic subscribe software-version 100 1000 1 0 --keepSubscriptions 1 + + [1660654945.477837][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3782190841 + [1660654945.477932][58149:58154] CHIP:TOO: software-version: + [1660654945.478023][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740127c0]: Moving to [AwaitingSu] + + + + + basic subscribe hardware-version 100 1000 1 0 --keepSubscriptions 1 + [1660654945.477837][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3782190841 + [1660654945.477932][58149:58154] CHIP:TOO: hardware-version: + [1660654945.478023][58149:58154] CHIP:DMG: MoveToState ReadClient[0xffff740127c0]: Moving to [AwaitingSu] disabled: true - label: @@ -1440,408 +1346,6 @@ tests: Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT." verification: | - Please run this test in chip tool interactive mode ./chip-tool interactive start - - Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT - and verify all the subscription requests are succes, then send a Subscribe request messages having 3 different paths from RD1A to the DUT. - - - Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - - - on the 1st reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716965.736576][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313969 from RetransTable on exchange 50225i - [1657716965.736639][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716965.736669][6034:6039] CHIP:DMG: { - [1657716965.736695][6034:6039] CHIP:DMG: SubscriptionId = 0x5a6ddc07, - [1657716965.736741][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716965.736777][6034:6039] CHIP:DMG: [ - [1657716965.736802][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716965.736848][6034:6039] CHIP:DMG: { - [1657716965.736887][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716965.736932][6034:6039] CHIP:DMG: { - [1657716965.736978][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716965.737021][6034:6039] CHIP:DMG: AttributePathIB = - [1657716965.737067][6034:6039] CHIP:DMG: { - [1657716965.737113][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716965.737159][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716965.737207][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716965.737251][6034:6039] CHIP:DMG: } - [1657716965.737346][6034:6039] CHIP:DMG: - [1657716965.737396][6034:6039] CHIP:DMG: Data = 1, - [1657716965.737438][6034:6039] CHIP:DMG: }, - [1657716965.737484][6034:6039] CHIP:DMG: - [1657716965.737521][6034:6039] CHIP:DMG: }, - [1657716965.737563][6034:6039] CHIP:DMG: - [1657716965.737589][6034:6039] CHIP:DMG: ], - [1657716965.737620][6034:6039] CHIP:DMG: - [1657716965.737645][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716965.737679][6034:6039] CHIP:DMG: } - [1657716965.737779][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716965.737827][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716965.737867][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - basic subscribe reachable 10 100 1 0 - [1657717032.547326][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313975 from RetransTable on exchange 50227i - [1657717032.547406][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717032.547470][6034:6039] CHIP:DMG: { - [1657717032.547507][6034:6039] CHIP:DMG: SubscriptionId = 0x242f7180, - [1657717032.547560][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717032.547607][6034:6039] CHIP:DMG: [ - [1657717032.547644][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717032.547696][6034:6039] CHIP:DMG: { - [1657717032.547734][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717032.547779][6034:6039] CHIP:DMG: { - [1657717032.547829][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657717032.547876][6034:6039] CHIP:DMG: AttributePathIB = - [1657717032.547925][6034:6039] CHIP:DMG: { - [1657717032.547974][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657717032.548027][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657717032.548077][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657717032.548124][6034:6039] CHIP:DMG: } - [1657717032.548175][6034:6039] CHIP:DMG: - [1657717032.548225][6034:6039] CHIP:DMG: Data = true, - [1657717032.548272][6034:6039] CHIP:DMG: }, - [1657717032.548321][6034:6039] CHIP:DMG: - [1657717032.548358][6034:6039] CHIP:DMG: }, - [1657717032.548403][6034:6039] CHIP:DMG: - [1657717032.548438][6034:6039] CHIP:DMG: ], - [1657717032.548482][6034:6039] CHIP:DMG: - [1657717032.548518][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717032.548553][6034:6039] CHIP:DMG: } - [1657717032.548686][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 462674998 - [1657717032.548795][6034:6039] CHIP:TOO: Reachable: TRUE - [1657717032.548850][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - onoff subscribe off-wait-time 10 100 1 1 - [1657717085.996867][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717085.996895][6034:6039] CHIP:DMG: { - [1657717085.996920][6034:6039] CHIP:DMG: SubscriptionId = 0xbe7eee69, - [1657717085.996945][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717085.996977][6034:6039] CHIP:DMG: [ - [1657717085.997002][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717085.997035][6034:6039] CHIP:DMG: { - [1657717085.997060][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717085.997089][6034:6039] CHIP:DMG: { - [1657717085.997122][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717085.997153][6034:6039] CHIP:DMG: AttributePathIB = - [1657717085.997187][6034:6039] CHIP:DMG: { - [1657717085.997220][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717085.997258][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717085.997317][6034:6039] CHIP:DMG: Attribute = 0x0000_4002, - [1657717085.997367][6034:6039] CHIP:DMG: } - [1657717085.997404][6034:6039] CHIP:DMG: - [1657717085.997440][6034:6039] CHIP:DMG: Data = 0, - [1657717085.997471][6034:6039] CHIP:DMG: }, - [1657717085.997504][6034:6039] CHIP:DMG: - [1657717085.997531][6034:6039] CHIP:DMG: }, - [1657717085.997561][6034:6039] CHIP:DMG: - [1657717085.997585][6034:6039] CHIP:DMG: ], - [1657717085.997615][6034:6039] CHIP:DMG: - [1657717085.997640][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717085.997663][6034:6039] CHIP:DMG: } - [1657717085.997757][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4002 DataVersion: 1934241157 - [1657717085.997793][6034:6039] CHIP:TOO: OffWaitTime: 0 - [1657717085.997830][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - - on the 2nd reference deice enter: - onoff subscribe start-up-on-off 10 100 1 1 - [1657716703.322836][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716703.322895][6034:6039] CHIP:DMG: { - [1657716703.322947][6034:6039] CHIP:DMG: SubscriptionId = 0x8962f8b4, - [1657716703.323010][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716703.323080][6034:6039] CHIP:DMG: [ - [1657716703.323133][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716703.323217][6034:6039] CHIP:DMG: { - [1657716703.323280][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716703.323341][6034:6039] CHIP:DMG: { - [1657716703.323396][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716703.323449][6034:6039] CHIP:DMG: AttributePathIB = - [1657716703.323519][6034:6039] CHIP:DMG: { - [1657716703.323591][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716703.323671][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716703.323759][6034:6039] CHIP:DMG: Attribute = 0x0000_4003, - [1657716703.323835][6034:6039] CHIP:DMG: } - [1657716703.323909][6034:6039] CHIP:DMG: - [1657716703.323981][6034:6039] CHIP:DMG: Data = 1, - [1657716703.324047][6034:6039] CHIP:DMG: }, - [1657716703.324113][6034:6039] CHIP:DMG: - [1657716703.324170][6034:6039] CHIP:DMG: }, - [1657716703.324238][6034:6039] CHIP:DMG: - [1657716703.324289][6034:6039] CHIP:DMG: ], - [1657716703.324352][6034:6039] CHIP:DMG: - [1657716703.324403][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716703.324457][6034:6039] CHIP:DMG: } - [1657716703.324785][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657716703.324904][6034:6039] CHIP:TOO: StartUpOnOff: 1 - [1657716703.324985][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716743.523056][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716743.523131][6034:6039] CHIP:DMG: { - [1657716743.523178][6034:6039] CHIP:DMG: SubscriptionId = 0xc3b3c364, - [1657716743.523240][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716743.523302][6034:6039] CHIP:DMG: [ - [1657716743.523362][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716743.523433][6034:6039] CHIP:DMG: { - [1657716743.523499][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716743.523555][6034:6039] CHIP:DMG: { - [1657716743.523627][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716743.523682][6034:6039] CHIP:DMG: AttributePathIB = - [1657716743.523738][6034:6039] CHIP:DMG: { - [1657716743.523812][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716743.523873][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716743.523934][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716743.523990][6034:6039] CHIP:DMG: } - [1657716743.524050][6034:6039] CHIP:DMG: - [1657716743.524111][6034:6039] CHIP:DMG: Data = "1", - [1657716743.524164][6034:6039] CHIP:DMG: }, - [1657716743.524223][6034:6039] CHIP:DMG: - [1657716743.524271][6034:6039] CHIP:DMG: }, - [1657716743.524328][6034:6039] CHIP:DMG: - [1657716743.524372][6034:6039] CHIP:DMG: ], - [1657716743.524430][6034:6039] CHIP:DMG: - [1657716743.524475][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716743.524518][6034:6039] CHIP:DMG: } - [1657716743.524683][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716743.524745][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716743.524813][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-transition-time 10 100 1 1 - [1657716911.280884][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716911.280957][6034:6039] CHIP:DMG: { - [1657716911.281018][6034:6039] CHIP:DMG: SubscriptionId = 0x1a544eea, - [1657716911.281080][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716911.281157][6034:6039] CHIP:DMG: [ - [1657716911.281217][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716911.281338][6034:6039] CHIP:DMG: { - [1657716911.281408][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716911.281487][6034:6039] CHIP:DMG: { - [1657716911.281570][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716911.281649][6034:6039] CHIP:DMG: AttributePathIB = - [1657716911.281723][6034:6039] CHIP:DMG: { - [1657716911.281813][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716911.281892][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716911.281978][6034:6039] CHIP:DMG: Attribute = 0x0000_0012, - [1657716911.282059][6034:6039] CHIP:DMG: } - [1657716911.282145][6034:6039] CHIP:DMG: - [1657716911.282236][6034:6039] CHIP:DMG: Data = 0, - [1657716911.282311][6034:6039] CHIP:DMG: }, - [1657716911.282392][6034:6039] CHIP:DMG: - [1657716911.282459][6034:6039] CHIP:DMG: }, - [1657716911.282534][6034:6039] CHIP:DMG: - [1657716911.282593][6034:6039] CHIP:DMG: ], - [1657716911.282667][6034:6039] CHIP:DMG: - [1657716911.282727][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716911.282786][6034:6039] CHIP:DMG: } - [1657716911.282995][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0012 DataVersion: 832499115 - [1657716911.283082][6034:6039] CHIP:TOO: on transition time: 0 - [1657716911.283172][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - - on the 3rd reference deice enter: - - levelcontrol subscribe min-level 10 100 1 1 - [1657717758.176398][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717758.176466][6034:6039] CHIP:DMG: { - [1657717758.176545][6034:6039] CHIP:DMG: SubscriptionId = 0xbf960b6c, - [1657717758.176619][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717758.176698][6034:6039] CHIP:DMG: [ - [1657717758.176750][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717758.176818][6034:6039] CHIP:DMG: { - [1657717758.176872][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717758.176959][6034:6039] CHIP:DMG: { - [1657717758.177034][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657717758.177136][6034:6039] CHIP:DMG: AttributePathIB = - [1657717758.177206][6034:6039] CHIP:DMG: { - [1657717758.177269][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717758.177377][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657717758.177429][6034:6039] CHIP:DMG: Attribute = 0x0000_0002, - [1657717758.177488][6034:6039] CHIP:DMG: } - [1657717758.177551][6034:6039] CHIP:DMG: - [1657717758.177600][6034:6039] CHIP:DMG: Data = 1, - [1657717758.177655][6034:6039] CHIP:DMG: }, - [1657717758.177716][6034:6039] CHIP:DMG: - [1657717758.177755][6034:6039] CHIP:DMG: }, - [1657717758.177813][6034:6039] CHIP:DMG: - [1657717758.177850][6034:6039] CHIP:DMG: ], - [1657717758.177896][6034:6039] CHIP:DMG: - [1657717758.177933][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717758.177969][6034:6039] CHIP:DMG: } - [1657717758.178105][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0002 DataVersion: 832499115 - [1657717758.178156][6034:6039] CHIP:TOO: min level: 1 - [1657717758.178215][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - - onoff subscribe global-scene-control 10 100 1 1 - [1657717721.303602][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717721.303670][6034:6039] CHIP:DMG: { - [1657717721.303730][6034:6039] CHIP:DMG: SubscriptionId = 0x2b768ffd, - [1657717721.303791][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717721.303867][6034:6039] CHIP:DMG: [ - [1657717721.303928][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717721.304007][6034:6039] CHIP:DMG: { - [1657717721.304071][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717721.304149][6034:6039] CHIP:DMG: { - [1657717721.304225][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717721.304297][6034:6039] CHIP:DMG: AttributePathIB = - [1657717721.304372][6034:6039] CHIP:DMG: { - [1657717721.304454][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717721.304542][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717721.304628][6034:6039] CHIP:DMG: Attribute = 0x0000_4000, - [1657717721.304711][6034:6039] CHIP:DMG: } - [1657717721.304797][6034:6039] CHIP:DMG: - [1657717721.304881][6034:6039] CHIP:DMG: Data = true, - [1657717721.304958][6034:6039] CHIP:DMG: }, - [1657717721.305039][6034:6039] CHIP:DMG: - [1657717721.305102][6034:6039] CHIP:DMG: }, - [1657717721.305178][6034:6039] CHIP:DMG: - [1657717721.305238][6034:6039] CHIP:DMG: ], - [1657717721.305348][6034:6039] CHIP:DMG: - [1657717721.305412][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717721.305470][6034:6039] CHIP:DMG: } - [1657717721.305679][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4000 DataVersion: 1934241157 - [1657717721.305761][6034:6039] CHIP:TOO: GlobalSceneControl: TRUE - [1657717721.305849][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - temperaturemeasurement subscribe tolerance 10 100 1 1 - [1657717893.368431][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717893.368514][6034:6039] CHIP:DMG: { - [1657717893.368562][6034:6039] CHIP:DMG: SubscriptionId = 0x87e778d7, - [1657717893.368649][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717893.368744][6034:6039] CHIP:DMG: [ - [1657717893.368837][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717893.368943][6034:6039] CHIP:DMG: { - [1657717893.369046][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717893.369138][6034:6039] CHIP:DMG: { - [1657717893.369231][6034:6039] CHIP:DMG: DataVersion = 0x8ca282b3, - [1657717893.369359][6034:6039] CHIP:DMG: AttributePathIB = - [1657717893.369461][6034:6039] CHIP:DMG: { - [1657717893.369563][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717893.369674][6034:6039] CHIP:DMG: Cluster = 0x402, - [1657717893.369786][6034:6039] CHIP:DMG: Attribute = 0x0000_0003, - [1657717893.369896][6034:6039] CHIP:DMG: } - [1657717893.370000][6034:6039] CHIP:DMG: - [1657717893.370094][6034:6039] CHIP:DMG: Data = 0, - [1657717893.370192][6034:6039] CHIP:DMG: }, - [1657717893.370284][6034:6039] CHIP:DMG: - [1657717893.370359][6034:6039] CHIP:DMG: }, - [1657717893.370439][6034:6039] CHIP:DMG: - [1657717893.370504][6034:6039] CHIP:DMG: ], - [1657717893.370575][6034:6039] CHIP:DMG: - [1657717893.370630][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717893.370699][6034:6039] CHIP:DMG: } - [1657717893.370819][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_0003 DataVersion: 2359460531 - [1657717893.370888][6034:6039] CHIP:TOO: Tolerance: 0 - [1657717893.370929][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - - After all above mentioned subscription are activated send below mentioned command in 4th reference device which is having same same fabric as 1st reference device - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - - [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716563.242475][6034:6039] CHIP:DMG: { - [1657716563.242507][6034:6039] CHIP:DMG: SubscriptionId = 0xebc26cc4, - [1657716563.242538][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716563.242577][6034:6039] CHIP:DMG: [ - [1657716563.242607][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716563.242648][6034:6039] CHIP:DMG: { - [1657716563.242680][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716563.242721][6034:6039] CHIP:DMG: { - [1657716563.242762][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716563.242801][6034:6039] CHIP:DMG: AttributePathIB = - [1657716563.242842][6034:6039] CHIP:DMG: { - [1657716563.242883][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716563.242928][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716563.242971][6034:6039] CHIP:DMG: Attribute = 0x0000_0010, - [1657716563.243012][6034:6039] CHIP:DMG: } - [1657716563.243056][6034:6039] CHIP:DMG: - [1657716563.243100][6034:6039] CHIP:DMG: Data = 1, - [1657716563.243138][6034:6039] CHIP:DMG: }, - [1657716563.243179][6034:6039] CHIP:DMG: - [1657716563.243213][6034:6039] CHIP:DMG: }, - [1657716563.243251][6034:6039] CHIP:DMG: - [1657716563.243280][6034:6039] CHIP:DMG: ], - [1657716563.243318][6034:6039] CHIP:DMG: - [1657716563.243348][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716563.243377][6034:6039] CHIP:DMG: } - [1657716563.243531][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499115 - [1657716563.243601][6034:6039] CHIP:TOO: on off transition time: 1 - [1657716563.243648][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716599.928585][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716599.928652][6034:6039] CHIP:DMG: { - [1657716599.928825][6034:6039] CHIP:DMG: SubscriptionId = 0x3d9f1c1, - [1657716599.928890][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716599.928968][6034:6039] CHIP:DMG: [ - [1657716599.929029][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716599.929122][6034:6039] CHIP:DMG: { - [1657716599.929192][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716599.929278][6034:6039] CHIP:DMG: { - [1657716599.929399][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716599.929476][6034:6039] CHIP:DMG: AttributePathIB = - [1657716599.929687][6034:6039] CHIP:DMG: { - [1657716599.929774][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716599.929861][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716599.929949][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716599.930031][6034:6039] CHIP:DMG: } - [1657716599.930115][6034:6039] CHIP:DMG: - [1657716599.930285][6034:6039] CHIP:DMG: Data = "1", - [1657716599.930370][6034:6039] CHIP:DMG: }, - [1657716599.930454][6034:6039] CHIP:DMG: - [1657716599.930578][6034:6039] CHIP:DMG: }, - [1657716599.930660][6034:6039] CHIP:DMG: - [1657716599.930720][6034:6039] CHIP:DMG: ], - [1657716599.930796][6034:6039] CHIP:DMG: - [1657716599.930856][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716599.930914][6034:6039] CHIP:DMG: } - [1657716599.931131][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716599.931326][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716599.931420][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - onoff subscribe on-time 10 100 1 1 - [1657716634.400468][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716634.400499][6034:6039] CHIP:DMG: { - [1657716634.400525][6034:6039] CHIP:DMG: SubscriptionId = 0xf9b815a2, - [1657716634.400551][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716634.400585][6034:6039] CHIP:DMG: [ - [1657716634.400610][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716634.400647][6034:6039] CHIP:DMG: { - [1657716634.400674][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716634.400705][6034:6039] CHIP:DMG: { - [1657716634.400739][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716634.400775][6034:6039] CHIP:DMG: AttributePathIB = - [1657716634.400809][6034:6039] CHIP:DMG: { - [1657716634.400847][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716634.400883][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716634.400920][6034:6039] CHIP:DMG: Attribute = 0x0000_4001, - [1657716634.400950][6034:6039] CHIP:DMG: } - [1657716634.400987][6034:6039] CHIP:DMG: - [1657716634.401024][6034:6039] CHIP:DMG: Data = 1, - [1657716634.401058][6034:6039] CHIP:DMG: }, - [1657716634.401092][6034:6039] CHIP:DMG: - [1657716634.401117][6034:6039] CHIP:DMG: }, - [1657716634.401148][6034:6039] CHIP:DMG: - [1657716634.401172][6034:6039] CHIP:DMG: ], - [1657716634.401202][6034:6039] CHIP:DMG: - [1657716634.401227][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716634.401250][6034:6039] CHIP:DMG: } - [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 - [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 - [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] + Verification step identification is in progress + https://github.com/project-chip/connectedhomeip/issues/21009 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_1.yaml index 8e091da7881008..edfa5fbac41fd9 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_1.yaml @@ -15,6 +15,9 @@ name: 3.3.1. [TC-KEYPADINPUT-3.1] Send Key Command Verification (DUT as Client) +PICS: + - KEYPADINPUT.C + config: nodeId: 0x12344321 cluster: "Basic" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml index 92052a3e0b268a..7e59af1e090f4f 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml @@ -38,7 +38,7 @@ tests: - label: "Start the commissioning process of DUT by TH1 on a first Fabric" verification: | DUT side: - sudo ./chip-all-clusters-app --wifi + sudo ./chip-all-clusters-app --wifi --trace_decode 1 TH side: ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1 @@ -83,7 +83,7 @@ tests: - label: "TH1 sends AttestationRequest command to DUT" PICS: OPCREDS.S.C00.Rsp && OPCREDS.S.C01.Tx verification: | - To get attestation nonce give below command + To get attestation nonce give below command Raspi platform on TH echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) @@ -105,21 +105,105 @@ tests: saves the certififate as PAICert" PICS: OPCREDS.S.C02.Rsp && OPCREDS.S.C03.Tx verification: | - ./chip-tool operationalcredentials certificate-chain-request 2 1 0 + ./chip-tool operationalcredentials certificate-chain-request 2 1 0 --trace_decode 1 - Verify the CertificateChainResponse and verify that the size of certificate is less than or equal to 600 bytes and of type octstr in TH Log - - [1658223566.816155][5951:5956] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003 - [1658223566.816246][5951:5956] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0003 - [1658223566.816346][5951:5956] CHIP:TOO: CertificateChainResponse: { - [1658223566.816403][5951:5956] CHIP:TOO: certificate: 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C - [1658223566.816475][5951:5956] CHIP:TOO: ...........: B88FACE529368D12054C0C0220655DC92B86BD909882A6C62177B825D7D05EDBE7C22F9FEA71220E7EA703F891 - [1658223566.816510][5951:5956] CHIP:TOO: } - Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log + Verify the CertificateChainResponse and verify that the size of certificate is less than or equal to 600 bytes and of type octstr in TH Log - Example : - 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C + [1660214092.609231][14671:14676] CHIP:DMG: InvokeRequestMessage = + [1660214092.609243][14671:14676] CHIP:DMG: { + [1660214092.609255][14671:14676] CHIP:DMG: suppressResponse = false, + [1660214092.609269][14671:14676] CHIP:DMG: timedRequest = false, + [1660214092.609281][14671:14676] CHIP:DMG: InvokeRequests = + [1660214092.609301][14671:14676] CHIP:DMG: [ + [1660214092.609311][14671:14676] CHIP:DMG: CommandDataIB = + [1660214092.609326][14671:14676] CHIP:DMG: { + [1660214092.609338][14671:14676] CHIP:DMG: CommandPathIB = + [1660214092.609352][14671:14676] CHIP:DMG: { + [1660214092.609367][14671:14676] CHIP:DMG: EndpointId = 0x0, + [1660214092.609383][14671:14676] CHIP:DMG: ClusterId = 0x3e, + [1660214092.609396][14671:14676] CHIP:DMG: CommandId = 0x2, + [1660214092.609410][14671:14676] CHIP:DMG: }, + [1660214092.609426][14671:14676] CHIP:DMG: + [1660214092.609437][14671:14676] CHIP:DMG: CommandFields = + [1660214092.609452][14671:14676] CHIP:DMG: { + [1660214092.609467][14671:14676] CHIP:DMG: 0x0 = 2, + [1660214092.609481][14671:14676] CHIP:DMG: }, + [1660214092.609493][14671:14676] CHIP:DMG: }, + [1660214092.609511][14671:14676] CHIP:DMG: + [1660214092.609522][14671:14676] CHIP:DMG: ], + [1660214092.609541][14671:14676] CHIP:DMG: + [1660214092.609551][14671:14676] CHIP:DMG: InteractionModelRevision = 1 + [1660214092.609563][14671:14676] CHIP:DMG: }, + [1660214092.609576][14671:14676] CHIP:DMG: + [1660214092.609674][14671:14676] CHIP:DMG: ICR moving to [CommandSen] + [1660214092.609707][14671:14676] CHIP:EM: Sending Standalone Ack for MessageCounter:33263154 on exchange 56685i + [1660214092.609876][14671:14676] CHIP:IN: Prepared unauthenticated message 0x7f5ae77fd000 to 0x0000000000000000 (0) of type 0x10 and protocolId (0, 0) on exchange 56685i with MessageCounter:66323624. + [1660214092.609904][14671:14676] CHIP:IN: Sending unauthenticated msg 0x7f5ae77fd000 with MessageCounter:66323624 to 0x0000000000000000 at monotonic time: 00000000012052C1 msec + [1660214092.610138][14671:14676] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 66323624 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 0 / Exchange = 56685] + [1660214092.610167][14671:14676] CHIP:DMG: Header Flags = + [1660214092.610177][14671:14676] CHIP:DMG: { + [1660214092.610198][14671:14676] CHIP:DMG: Message (0x04) = + [1660214092.610208][14671:14676] CHIP:DMG: { + [1660214092.610222][14671:14676] CHIP:DMG: SourceNodeId = 86B22B3066A1B459 + [1660214092.610234][14671:14676] CHIP:DMG: } + [1660214092.610255][14671:14676] CHIP:DMG: Exchange (0x03) = + [1660214092.610265][14671:14676] CHIP:DMG: { + [1660214092.610276][14671:14676] CHIP:DMG: Initiator = true + [1660214092.610290][14671:14676] CHIP:DMG: AckMsg = 33263154 + [1660214092.610301][14671:14676] CHIP:DMG: } + [1660214092.610333][14671:14676] CHIP:DMG: } + [1660214092.610355][14671:14676] CHIP:DMG: + [1660214092.610379][14671:14676] CHIP:DMG: Encrypted Payload (26 bytes) = + [1660214092.610394][14671:14676] CHIP:DMG: { + [1660214092.610407][14671:14676] CHIP:DMG: data = 04000000a804f40359b4a166302bb28603106ddd0000328efb01 + [1660214092.610423][14671:14676] CHIP:DMG: buffer_ptr = 140028080604320 + [1660214092.610436][14671:14676] CHIP:DMG: } + [1660214092.610450][14671:14676] CHIP:DMG: + [1660214092.610521][14671:14676] CHIP:EM: Flushed pending ack for MessageCounter:33263154 on exchange 56685i + [1660214092.617596][14671:14676] CHIP:DMG: << from UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 219026739 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 20731 / Exchange = 56686] + [1660214092.617620][14671:14676] CHIP:DMG: Header Flags = + [1660214092.617626][14671:14676] CHIP:DMG: { + [1660214092.617637][14671:14676] CHIP:DMG: Exchange (0x06) = + [1660214092.617645][14671:14676] CHIP:DMG: { + [1660214092.617652][14671:14676] CHIP:DMG: AckMsg = 21510045 + [1660214092.617657][14671:14676] CHIP:DMG: NeedsAck = true + [1660214092.617663][14671:14676] CHIP:DMG: } + [1660214092.617672][14671:14676] CHIP:DMG: } + [1660214092.617678][14671:14676] CHIP:DMG: + [1660214092.617686][14671:14676] CHIP:DMG: Encrypted Payload (531 bytes) = + [1660214092.617692][14671:14676] CHIP:DMG: { + [1660214092.617698][14671:14676] CHIP:DMG: data = 00fb500033150e0d1ee5b6538768098d8ef37ec0e09fbeb30c158a93ffdd1ca81041b2baa637a7e200110cd7cf06f5ffa40a8e4529a8a38cdd47e50715aaa344941b0c760264022f21b37432352c00f457fade1bdee072261fcb5cde3fcd70e2e71d5a8ec9fa038e670a404d8641162b8fb34919e9d6e431a1c895a6e01cbd3125c9322ff741caf28b79f69f103ec0e9c5b1b74c43fde4d4ac21f15e48b2090916feca5662682ae9eb1f8d18011d618492d57139ad99e94f99e3a755d2a8e46ba7133a0f1d2fe20b7e5cf2906542c4685866c7ccbd8e2e15e84e3dc653057623dac7d65d7bb785466bab3e816e06f378d0165aadf7ef38d23afdb42731191683a995fa1223bcccf27c0314aced823b2a00ff0da758b1f910631fab7098f013a7fed82136cf072c1150e4f351541f194f0aa2987bc0d1d7688d7955d94560b34bbce0b407d340b0ebaef6f5e9343af6cb8d030fb8040a9a6b7cd9465974a692072d05597b98ec66c42cf4edd86d841048cf5f045f90fb74d4066f2f23e038530e18dd4a0f3c1d86800077661bbd5ff28ff873bb87c6a2545871c6eeca5426466cecff984822b8dd3b7822fb109ec80c9ca3c9bb70b20056f2f4f8b25d1ec3bd8c17a86403bdd42d8cf2c2f66ca8983812361f34770992a7724fc33c5297169a2dcc99b92f290d2894bad6c612684f29c71eb0190b5d8d31dee66650da1942a798de69389d9c5bcfbf0e56a08c820092a53d4f34 + [1660214092.617712][14671:14676] CHIP:DMG: buffer_ptr = 140028080581472 + [1660214092.617717][14671:14676] CHIP:DMG: } + [1660214092.617722][14671:14676] CHIP:DMG: + [1660214092.617768][14671:14676] CHIP:DMG: DAC/PAI (463) = + [1660214092.617789][14671:14676] CHIP:DMG: { + -----BEGIN CERTIFICATE----- + MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP + TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw + MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ + QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO + PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU + xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E + CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk + YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI + zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl + Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== + -----END CERTIFICATE----- + [1660214092.617801][14671:14676] CHIP:DMG: } + [1660214092.617807][14671:14676] CHIP:DMG: + [1660214092.617815][14671:14676] CHIP:DMG: + [1660214092.617827][14671:14676] CHIP:DMG: Additional Fields = + [1660214092.617832][14671:14676] CHIP:DMG: { + [1660214092.617839][14671:14676] CHIP:DMG: peer_address = UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 + [1660214092.617845][14671:14676] CHIP:DMG: } + [1660214092.617851][14671:14676] CHIP:DMG: + [1660214092.617861][14671:14676] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:219026739 on exchange 56686i + [1660214092.617870][14671:14676] CHIP:EM: Found matching exchange: 56686i, Delegate: 0x7f5ad4003a48 + [1660214092.617885][14671:14676] CHIP:EM: Rxd Ack; Removing MessageCounter:21510045 from Retrans Table on exchange 56686i + [1660214092.617891][14671:14676] CHIP:EM: Removed CHIP MessageCounter:21510045 from RetransTable on exchange 56686i + [1660214092.617904][14671:14676] CHIP:DMG: ICR moving to [ResponseRe] disabled: true - label: @@ -131,17 +215,101 @@ tests: Verify the CertificateChainResponse in TH Log - [1658223537.868606][5857:5862] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003 - [1658223537.868656][5857:5862] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0003 - [1658223537.868716][5857:5862] CHIP:TOO: CertificateChainResponse: { - [1658223537.868762][5857:5862] CHIP:TOO: certificate: 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302 - [1658223537.868809][5857:5862] CHIP:TOO: ...........: 034700304402200127A27B4B44610EE2FCDC4D2B7885563660BC0F76F17219ED6A08DFB2B3C1CD02206B59E0AF45F3EB2A85B919D35731528C6028C415239545E108E4E54E70971353 - [1658223537.868834][5857:5862] CHIP:TOO: } - - Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log - - Example : - 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302 + [1660218221.819087][17048:17053] CHIP:DMG: InvokeRequestMessage = + [1660218221.819106][17048:17053] CHIP:DMG: { + [1660218221.819126][17048:17053] CHIP:DMG: suppressResponse = false, + [1660218221.819147][17048:17053] CHIP:DMG: timedRequest = false, + [1660218221.819164][17048:17053] CHIP:DMG: InvokeRequests = + [1660218221.819194][17048:17053] CHIP:DMG: [ + [1660218221.819210][17048:17053] CHIP:DMG: CommandDataIB = + [1660218221.819233][17048:17053] CHIP:DMG: { + [1660218221.819251][17048:17053] CHIP:DMG: CommandPathIB = + [1660218221.819274][17048:17053] CHIP:DMG: { + [1660218221.819296][17048:17053] CHIP:DMG: EndpointId = 0x0, + [1660218221.819319][17048:17053] CHIP:DMG: ClusterId = 0x3e, + [1660218221.819341][17048:17053] CHIP:DMG: CommandId = 0x2, + [1660218221.819361][17048:17053] CHIP:DMG: }, + [1660218221.819386][17048:17053] CHIP:DMG: + [1660218221.819403][17048:17053] CHIP:DMG: CommandFields = + [1660218221.819425][17048:17053] CHIP:DMG: { + [1660218221.819448][17048:17053] CHIP:DMG: 0x0 = 1, + [1660218221.819470][17048:17053] CHIP:DMG: }, + [1660218221.819488][17048:17053] CHIP:DMG: }, + [1660218221.819515][17048:17053] CHIP:DMG: + [1660218221.819530][17048:17053] CHIP:DMG: ], + [1660218221.819559][17048:17053] CHIP:DMG: + [1660218221.819575][17048:17053] CHIP:DMG: InteractionModelRevision = 1 + [1660218221.819592][17048:17053] CHIP:DMG: }, + [1660218221.819611][17048:17053] CHIP:DMG: + [1660218221.819755][17048:17053] CHIP:DMG: ICR moving to [CommandSen] + [1660218221.819807][17048:17053] CHIP:EM: Sending Standalone Ack for MessageCounter:33263156 on exchange 41890i + [1660218221.820060][17048:17053] CHIP:IN: Prepared unauthenticated message 0x7f950d02b000 to 0x0000000000000000 (0) of type 0x10 and protocolId (0, 0) on exchange 41890i with MessageCounter:146063148. + [1660218221.820102][17048:17053] CHIP:IN: Sending unauthenticated msg 0x7f950d02b000 with MessageCounter:146063148 to 0x0000000000000000 at monotonic time: 00000000015F547B msec + [1660218221.820457][17048:17053] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 146063148 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 0 / Exchange = 41890] + [1660218221.820501][17048:17053] CHIP:DMG: Header Flags = + [1660218221.820519][17048:17053] CHIP:DMG: { + [1660218221.820578][17048:17053] CHIP:DMG: Message (0x04) = + [1660218221.820596][17048:17053] CHIP:DMG: { + [1660218221.820622][17048:17053] CHIP:DMG: SourceNodeId = EB2A0D2FCD128BCD + [1660218221.820642][17048:17053] CHIP:DMG: } + [1660218221.820677][17048:17053] CHIP:DMG: Exchange (0x03) = + [1660218221.820692][17048:17053] CHIP:DMG: { + [1660218221.820709][17048:17053] CHIP:DMG: Initiator = true + [1660218221.820730][17048:17053] CHIP:DMG: AckMsg = 33263156 + [1660218221.820747][17048:17053] CHIP:DMG: } + [1660218221.820778][17048:17053] CHIP:DMG: } + [1660218221.820792][17048:17053] CHIP:DMG: + [1660218221.820819][17048:17053] CHIP:DMG: Encrypted Payload (26 bytes) = + [1660218221.820834][17048:17053] CHIP:DMG: { + [1660218221.820853][17048:17053] CHIP:DMG: data = 040000002cbfb408cd8b12cd2f0d2aeb0310a2a30000348efb01 + [1660218221.820871][17048:17053] CHIP:DMG: buffer_ptr = 140277792687280 + [1660218221.820888][17048:17053] CHIP:DMG: } + [1660218221.820906][17048:17053] CHIP:DMG: + [1660218221.820997][17048:17053] CHIP:EM: Flushed pending ack for MessageCounter:33263156 on exchange 41890i + [1660218221.826505][17048:17053] CHIP:DMG: << from UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 217571241 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 16041 / Exchange = 41891] + [1660218221.826559][17048:17053] CHIP:DMG: Header Flags = + [1660218221.826581][17048:17053] CHIP:DMG: { + [1660218221.826620][17048:17053] CHIP:DMG: Exchange (0x06) = + [1660218221.826636][17048:17053] CHIP:DMG: { + [1660218221.826658][17048:17053] CHIP:DMG: AckMsg = 228316047 + [1660218221.826677][17048:17053] CHIP:DMG: NeedsAck = true + [1660218221.826695][17048:17053] CHIP:DMG: } + [1660218221.826723][17048:17053] CHIP:DMG: } + [1660218221.826736][17048:17053] CHIP:DMG: + [1660218221.826764][17048:17053] CHIP:DMG: Encrypted Payload (559 bytes) = + [1660218221.826778][17048:17053] CHIP:DMG: { + [1660218221.826796][17048:17053] CHIP:DMG: data = 00a93e00a9dff70c44f908196a2718a5b4cd8fb67b67d2223ade09fa1f23a5e9d6081ef9003a293b4f7ddf1e64767c15165a5544c4bc162a2eea22b085a5392580dec393bc15a705abc25360a7f05f99baf448b6c29e93defc8d01b00c11b268b2a197f88fc5984fe4c541fc523e2ecd2316b5dc1109c54408186296772f48d484047770f70a6af3e639833481b4663c7b65b902a850a8d55d3a86c73523a6853f47727582113480efece0e72f552a42ce49a26746e8d6b405ae87fadc7711a313f1865b90ac934486e05d2ed6868a5b5c4e13010eec98f917308c6fe5e9c6816c045f4640aea37804278a600cede11aee2bb591224edd0524bda56ee2d4d64c8a29c664edb006f4f42855f3868f272e94d8648d2431c0e95f6a55802c18d5938497b6b5c5aa37e37597a6782ca55a2948ceededd45e63537f4f1985f45653dbb118a0e1108eca228973b5c8fb48a1afeb649c46aec6259a649f0795c677ca492452c9fcb07969b6f851421252d30d6e160a350feb8baee6ccea79f54e0ebfae94c99eafa466964671b1fe3aa8585c83c28d9484444ba7d5a8a8e3178aedea00d292a53e3f0939b15bb7bee982e346410d5b064ec496409ba26e6a3b2182cff7b1955ba8f980d99590dfa0f2b690d1f1e5d8d178b1a64893dfcd242949ade66269336bc6c0440e9e4a120af59bfbbaabee32871ec1208915f63f91bdb1305045afeface4c7fc39e8eae7db8923b95aa01d4fee30d525664297305e569a3bfca01a767d47f6fdc0eb1b7706bc4547b1 + [1660218221.826837][17048:17053] CHIP:DMG: buffer_ptr = 140277792657648 + [1660218221.826854][17048:17053] CHIP:DMG: } + [1660218221.826870][17048:17053] CHIP:DMG: + [1660218221.826979][17048:17053] CHIP:DMG: DAC/PAI (491) = + [1660218221.827025][17048:17053] CHIP:DMG: { + -----BEGIN CERTIFICATE----- + MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwc + TWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZG + RjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMM + HE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARG + RkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYL + gpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/ + BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAW + gBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0Rh + DuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUj + lUXhCOTlTnCXE1M= + -----END CERTIFICATE----- + [1660218221.827089][17048:17053] CHIP:DMG: } + [1660218221.827105][17048:17053] CHIP:DMG: + [1660218221.827125][17048:17053] CHIP:DMG: + [1660218221.827158][17048:17053] CHIP:DMG: Additional Fields = + [1660218221.827173][17048:17053] CHIP:DMG: { + [1660218221.827194][17048:17053] CHIP:DMG: peer_address = UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 + [1660218221.827211][17048:17053] CHIP:DMG: } + [1660218221.827226][17048:17053] CHIP:DMG: + [1660218221.827257][17048:17053] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:217571241 on exchange 41891i + [1660218221.827276][17048:17053] CHIP:EM: Found matching exchange: 41891i, Delegate: 0x7f94f8003a48 + [1660218221.827310][17048:17053] CHIP:EM: Rxd Ack; Removing MessageCounter:228316047 from Retrans Table on exchange 41891i + [1660218221.827326][17048:17053] CHIP:EM: Removed CHIP MessageCounter:228316047 from RetransTable on exchange 41891i + [1660218221.827357][17048:17053] CHIP:DMG: ICR moving to [ResponseRe] disabled: true - label: "TH1 Sends CSRRequest command with a random 32-byte nonce" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml index 391d9df013fae9..54f13b1619d207 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml @@ -41,7 +41,7 @@ tests: verification: | ./chip-tool operationalcredentials read nocs 1 0 --fabric-filtered 1 - Verify in TH Log + Verify NOC lists and verify the returned lists has single entry in TH(chip-tool) Log [1658736497.592132][3787:3792] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 999376603 [1658736497.595396][3787:3792] CHIP:TOO: NOCs: 1 entries @@ -150,11 +150,12 @@ tests: verification: | Verify that the DUT returns a CSRResponse and save as csr_not_update - To get csr nonce give below command 2 times + To get csr nonce give below command 2 times in TH(chip-tool) Log echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) ./chip-tool operationalcredentials csrrequest hex:C11D6EAA00A54066220DA7F3FC5DC0F684C13D8B8FD3758B51163C2AEDD6F10F 1 0 --IsForUpdateNOC 0 + Verify DUT returns a CSRResponse in TH(chip-tool) Log [1658743641.233113][9670:9675] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 [1658743641.233162][9670:9675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 [1658743641.233226][9670:9675] CHIP:TOO: CSRResponse: { diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_5.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_5.yaml index b769dc2185a587..15598fea93abdb 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_5.yaml @@ -41,7 +41,8 @@ tests: verification: | ./chip-tool operationalcredentials read nocs 1 0 --fabric-filtered 1 - Verify in TH Log + Verify NOC lists and verify the returned lists has single entry in TH(chip-tool) Log + [1658736497.592132][3787:3792] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 999376603 [1658736497.595396][3787:3792] CHIP:TOO: NOCs: 1 entries [1658736497.595477][3787:3792] CHIP:TOO: [1]: { @@ -85,11 +86,12 @@ tests: true" PICS: OPCREDS.S.C04.Rsp verification: | - To get csr nonce give below command 2 times + To get csr nonce give below command 2 times in TH(chip-tool) echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) ./chip-tool operationalcredentials csrrequest hex:C11D6EAA00A54066220DA7F3FC5DC0F684C13D8B8FD3758B51163C2AEDD6F10F 1 0 --IsForUpdateNOC 0 + Verify that the DUT returns a CSRResponse in TH(chip-tool) log [1658743641.233113][9670:9675] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 [1658743641.233162][9670:9675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 [1658743641.233226][9670:9675] CHIP:TOO: CSRResponse: { From 1b1ff71efb66ea80e7c4d0bd1f9c3b30942b078c Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:18:49 +0530 Subject: [PATCH 044/115] Sync on/off sensor device type with specs (#21907) --- .../zcl/data-model/chip/matter-devices.xml | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index dbeae0bfb4cc4a..4ac26a53c3e314 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1441,7 +1441,7 @@ limitations under the License. 0x0103 0x0850 - + IDENTIFY_TIME IDENTIFY_TYPE Identify @@ -1454,27 +1454,14 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - - + + - - + + From 3b667df7432b42bc86e80a8bd6d001857d0157f3 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:19:31 +0530 Subject: [PATCH 045/115] Sync temperature sensor device type with specs (#21903) --- .../zcl/data-model/chip/matter-devices.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 4ac26a53c3e314..7383207d194e33 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1298,22 +1298,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - From 12996dd959809f2405db2679d06e2063d7c80f0a Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:20:10 +0530 Subject: [PATCH 046/115] Sync pressure sensor device type with specs (#21904) --- .../zcl/data-model/chip/matter-devices.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7383207d194e33..27cdd3107e2c46 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1321,22 +1321,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - From 6f3d168e85f678a578da658981219cb7f9fa1d57 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:20:39 +0530 Subject: [PATCH 047/115] Sync humidity sensor device type with specs (#21906) --- .../zcl/data-model/chip/matter-devices.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 27cdd3107e2c46..1eeb0dad3c17d8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1383,22 +1383,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - From 65176fa647e52b5983c647079fbdbc416d283213 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:02:36 +0530 Subject: [PATCH 048/115] Sync flow sensor device type with specs (#21905) --- .../zcl/data-model/chip/matter-devices.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 1eeb0dad3c17d8..09670cfdbbfe68 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1344,22 +1344,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - From 69d3d59b48c8ea5a73a3d192850f08fd5cecdc11 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 17 Aug 2022 10:39:10 -0400 Subject: [PATCH 049/115] Implement 2 missing tests in FabricTable (#21948) - In #19819, TODOs were left for a couple tests of things "anecdotally" known to work, or tested outside of SDK, but not tested yet in official SDK. - This PR implements TestAddMultipleSameRootDifferentFabricId and TestInvalidChaining Fixes #21946 Fixes #21947 Testing done: - Added 2 new unit tests, both pass - Did some messing about to make assertions fail on purpose and validated the the wrong behavior was not passing --- src/credentials/tests/TestFabricTable.cpp | 220 +++++++++++++++++++++- 1 file changed, 217 insertions(+), 3 deletions(-) diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 16c23046aa066c..2d43a699176e77 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -980,12 +980,111 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) void TestAddMultipleSameRootDifferentFabricId(nlTestSuite * inSuite, void * inContext) { - // TODO: Write test + Credentials::TestOnlyLocalCertificateAuthority fabricCertAuthority; + + chip::TestPersistentStorageDelegate storage; + NL_TEST_ASSERT(inSuite, fabricCertAuthority.Init().IsSuccess()); + + constexpr uint16_t kVendorId = 0xFFF1u; + + // Initialize a fabric table. + ScopedFabricTable fabricTableHolder; + NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&storage) == CHIP_NO_ERROR); + FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + + uint8_t rcac1Buf[kMaxCHIPCertLength]; + MutableByteSpan rcac1Span{ rcac1Buf }; + + // First scope: add FabricID 1111, node ID 55 + { + FabricId fabricId = 1111; + NodeId nodeId = 55; + + uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + MutableByteSpan csrSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + ByteSpan rcac = fabricCertAuthority.GetRcac(); + // Keep a copy for second scope check + CopySpanToMutableSpan(rcac, rcac1Span); + + ByteSpan icac = fabricCertAuthority.GetIcac(); + ByteSpan noc = fabricCertAuthority.GetNoc(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + FabricIndex newFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + NL_TEST_ASSERT(inSuite, newFabricIndex == 1); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); + + // Validate contents + const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); + NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); + if (fabricInfo != nullptr) + { + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 1); + NL_TEST_ASSERT(inSuite, fabricInfo->GetNodeId() == 55); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricId() == 1111); + NL_TEST_ASSERT(inSuite, fabricInfo->GetVendorId() == kVendorId); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().size() == 0); + } + } + size_t numStorageKeysAfterFirstAdd = storage.GetNumKeys(); + NL_TEST_ASSERT(inSuite, numStorageKeysAfterFirstAdd == 7); // Metadata, index, 3 certs, 1 opkey, last known good time + + // Second scope: add FabricID 2222, node ID 66, same root as first + { + FabricId fabricId = 2222; + NodeId nodeId = 66; + + uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + MutableByteSpan csrSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + ByteSpan rcac2 = fabricCertAuthority.GetRcac(); + NL_TEST_ASSERT(inSuite, rcac2.data_equal(rcac1Span)); + + ByteSpan icac = fabricCertAuthority.GetIcac(); + ByteSpan noc = fabricCertAuthority.GetNoc(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac2)); + FabricIndex newFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); + NL_TEST_ASSERT(inSuite, newFabricIndex == 2); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); + + // Validate contents + const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); + NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); + if (fabricInfo != nullptr) + { + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 2); + NL_TEST_ASSERT(inSuite, fabricInfo->GetNodeId() == 66); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricId() == 2222); + NL_TEST_ASSERT(inSuite, fabricInfo->GetVendorId() == kVendorId); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().size() == 0); + } + } + size_t numStorageKeysAfterSecondAdd = storage.GetNumKeys(); + NL_TEST_ASSERT(inSuite, numStorageKeysAfterSecondAdd == (numStorageKeysAfterFirstAdd + 5)); // Add 3 certs, 1 metadata, 1 opkey } void TestPersistence(nlTestSuite * inSuite, void * inContext) { - // TODO: Write test /** * * - Create an outer scope with storage delegate @@ -2290,7 +2389,122 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) void TestInvalidChaining(nlTestSuite * inSuite, void * inContext) { - // TODO: Write test + Credentials::TestOnlyLocalCertificateAuthority fabricCertAuthority; + Credentials::TestOnlyLocalCertificateAuthority differentCertAuthority; + + chip::TestPersistentStorageDelegate storage; + NL_TEST_ASSERT(inSuite, fabricCertAuthority.Init().IsSuccess()); + NL_TEST_ASSERT(inSuite, differentCertAuthority.Init().IsSuccess()); + + constexpr uint16_t kVendorId = 0xFFF1u; + + // Initialize a fabric table. + ScopedFabricTable fabricTableHolder; + NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&storage) == CHIP_NO_ERROR); + FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + + // Try to add fabric with either the NOC not chaining properly, or ICAC not chaining properly, fail, + // then succeed with proper chaining + { + FabricId fabricId = 1111; + NodeId nodeId = 55; + + uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + MutableByteSpan csrSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + + // Generate same cert chain from two different roots + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + NL_TEST_ASSERT_SUCCESS(inSuite, + differentCertAuthority.SetIncludeIcac(true).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + + ByteSpan rcac = fabricCertAuthority.GetRcac(); + ByteSpan icac = fabricCertAuthority.GetIcac(); + ByteSpan noc = fabricCertAuthority.GetNoc(); + + ByteSpan otherIcac = differentCertAuthority.GetIcac(); + ByteSpan otherNoc = differentCertAuthority.GetNoc(); + + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + + // Add with NOC not chaining to ICAC: fail + { + FabricIndex newFabricIndex = kUndefinedFabricIndex; + CHIP_ERROR err = fabricTable.AddNewPendingFabricWithOperationalKeystore(otherNoc, icac, kVendorId, &newFabricIndex); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + } + + // Add with ICAC not chaining to root: fail + { + FabricIndex newFabricIndex = kUndefinedFabricIndex; + CHIP_ERROR err = fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, otherIcac, kVendorId, &newFabricIndex); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + } + + // Add with NOC and ICAC chaining together, but not to root: fail + { + FabricIndex newFabricIndex = kUndefinedFabricIndex; + CHIP_ERROR err = + fabricTable.AddNewPendingFabricWithOperationalKeystore(otherNoc, otherIcac, kVendorId, &newFabricIndex); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + } + + // Revert state, start tests without ICAC + fabricTable.RevertPendingFabricData(); + + // Generate same cert chain from two different roots + + csrSpan = MutableByteSpan{ csrBuf }; + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricCertAuthority.SetIncludeIcac(false).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + NL_TEST_ASSERT_SUCCESS( + inSuite, differentCertAuthority.SetIncludeIcac(false).GenerateNocChain(fabricId, nodeId, csrSpan).GetStatus()); + + rcac = fabricCertAuthority.GetRcac(); + noc = fabricCertAuthority.GetNoc(); + + otherNoc = differentCertAuthority.GetNoc(); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); + + // Add with NOC not chaining to RCAC: fail + { + FabricIndex newFabricIndex = kUndefinedFabricIndex; + CHIP_ERROR err = + fabricTable.AddNewPendingFabricWithOperationalKeystore(otherNoc, ByteSpan{}, kVendorId, &newFabricIndex); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + } + + // Add properly now + FabricIndex newFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT_SUCCESS(inSuite, + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, ByteSpan{}, kVendorId, &newFabricIndex)); + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + NL_TEST_ASSERT(inSuite, newFabricIndex == 1); + + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); + + // Validate contents + const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); + NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); + if (fabricInfo != nullptr) + { + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 1); + NL_TEST_ASSERT(inSuite, fabricInfo->GetNodeId() == 55); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricId() == 1111); + NL_TEST_ASSERT(inSuite, fabricInfo->GetVendorId() == kVendorId); + NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().size() == 0); + } + } } void TestEphemeralKeys(nlTestSuite * inSuite, void * inContext) From 22bd31ab804a8c07d192a267dc2a4440365023eb Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 20:11:45 +0530 Subject: [PATCH 050/115] Sync window covering device type with specs (#21910) * Sync window covering device type with specs * Addressed review comments --- .../zap-templates/zcl/data-model/chip/matter-devices.xml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 09670cfdbbfe68..7d0e96fdd7d708 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1523,10 +1523,7 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1546,7 +1543,7 @@ limitations under the License. GetSceneMembership GetSceneMembershipResponse - + GROUP_NAME_SUPPORT AddGroup AddGroupResponse From e5b2e6b39f056b13035938a530202ed38fdc2476 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 20:11:55 +0530 Subject: [PATCH 051/115] Sync door lock controller device type with specs (#21909) * Sync door lock controller device type with specs * Addressed review comments --- .../zcl/data-model/chip/matter-devices.xml | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7d0e96fdd7d708..48e96cabbd3b66 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1468,39 +1468,17 @@ limitations under the License. 0x0103 0x000B - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - + BINDING - - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - + From c1eafcd24f150ab9e1adf3e0718cfb19343f4f99 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Wed, 17 Aug 2022 10:42:47 -0400 Subject: [PATCH 052/115] Add missing includes (#21913) --- examples/chip-tool/commands/clusters/CustomArgument.h | 1 + examples/chip-tool/commands/discover/Commands.h | 7 ++++--- examples/chip-tool/commands/group/Commands.h | 7 ++++--- examples/chip-tool/commands/interactive/Commands.h | 7 +++---- examples/chip-tool/commands/pairing/Commands.h | 9 +++++---- examples/chip-tool/commands/payload/Commands.h | 9 +++++---- examples/chip-tool/templates/ComplexArgumentParser.zapt | 5 +++++ .../chip-tool/templates/logging/DataModelLogger.zapt | 3 +++ examples/chip-tool/templates/tests/commands.zapt | 1 + src/app/tests/suites/include/PICSChecker.h | 2 +- src/app/tests/suites/include/TestRunner.h | 4 ++++ src/lib/dnssd/minimal_mdns/ResponseBuilder.h | 1 + .../zap-generated/cluster/ComplexArgumentParser.h | 5 +++++ .../zap-generated/cluster/logging/DataModelLogger.h | 3 +++ zzz_generated/chip-tool/zap-generated/test/Commands.h | 1 + 15 files changed, 46 insertions(+), 19 deletions(-) diff --git a/examples/chip-tool/commands/clusters/CustomArgument.h b/examples/chip-tool/commands/clusters/CustomArgument.h index 6755703fa0b7d5..63fe7d7ade387e 100644 --- a/examples/chip-tool/commands/clusters/CustomArgument.h +++ b/examples/chip-tool/commands/clusters/CustomArgument.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include diff --git a/examples/chip-tool/commands/discover/Commands.h b/examples/chip-tool/commands/discover/Commands.h index f7a41183bedf56..b6ef1e3240ebb7 100644 --- a/examples/chip-tool/commands/discover/Commands.h +++ b/examples/chip-tool/commands/discover/Commands.h @@ -18,9 +18,10 @@ #pragma once -#include "DiscoverCommand.h" -#include "DiscoverCommissionablesCommand.h" -#include "DiscoverCommissionersCommand.h" +#include "commands/common/Commands.h" +#include "commands/discover/DiscoverCommand.h" +#include "commands/discover/DiscoverCommissionablesCommand.h" +#include "commands/discover/DiscoverCommissionersCommand.h" #include class Resolve : public DiscoverCommand, public chip::AddressResolve::NodeListener diff --git a/examples/chip-tool/commands/group/Commands.h b/examples/chip-tool/commands/group/Commands.h index 6aa59c581fdd80..e60ba6853fda85 100644 --- a/examples/chip-tool/commands/group/Commands.h +++ b/examples/chip-tool/commands/group/Commands.h @@ -18,11 +18,12 @@ #pragma once -#include "../common/CHIPCommand.h" -#include "../common/Command.h" - #include +#include "commands/common/CHIPCommand.h" +#include "commands/common/Command.h" +#include "commands/common/Commands.h" + class ShowControllerGroups : public CHIPCommand { public: diff --git a/examples/chip-tool/commands/interactive/Commands.h b/examples/chip-tool/commands/interactive/Commands.h index 19feb20f163999..04249045c9caef 100644 --- a/examples/chip-tool/commands/interactive/Commands.h +++ b/examples/chip-tool/commands/interactive/Commands.h @@ -18,10 +18,9 @@ #pragma once -#include "../common/CHIPCommand.h" -#include "../common/Commands.h" - -#include "InteractiveCommands.h" +#include "commands/common/CHIPCommand.h" +#include "commands/common/Commands.h" +#include "commands/interactive/InteractiveCommands.h" void registerCommandsInteractive(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index 80506e6df0e9e0..4841d0c0e0f03c 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -18,10 +18,11 @@ #pragma once -#include "CloseSessionCommand.h" -#include "CommissionedListCommand.h" -#include "OpenCommissioningWindowCommand.h" -#include "PairingCommand.h" +#include "commands/common/Commands.h" +#include "commands/pairing/CloseSessionCommand.h" +#include "commands/pairing/CommissionedListCommand.h" +#include "commands/pairing/OpenCommissioningWindowCommand.h" +#include "commands/pairing/PairingCommand.h" #include #include diff --git a/examples/chip-tool/commands/payload/Commands.h b/examples/chip-tool/commands/payload/Commands.h index 1b5eb2c7c5c62a..0cc5cae0a0879c 100644 --- a/examples/chip-tool/commands/payload/Commands.h +++ b/examples/chip-tool/commands/payload/Commands.h @@ -18,10 +18,11 @@ #pragma once -#include "AdditionalDataParseCommand.h" -#include "SetupPayloadGenerateCommand.h" -#include "SetupPayloadParseCommand.h" -#include "SetupPayloadVerhoeff.h" +#include "commands/common/Commands.h" +#include "commands/payload/AdditionalDataParseCommand.h" +#include "commands/payload/SetupPayloadGenerateCommand.h" +#include "commands/payload/SetupPayloadParseCommand.h" +#include "commands/payload/SetupPayloadVerhoeff.h" void registerCommandsPayload(Commands & commands) { diff --git a/examples/chip-tool/templates/ComplexArgumentParser.zapt b/examples/chip-tool/templates/ComplexArgumentParser.zapt index 9597dc57fcbdab..9ac2c7094c8cd0 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser.zapt @@ -1,5 +1,10 @@ {{> header}} +#include + +#include +#include + {{#structs_with_cluster_name}} static CHIP_ERROR Setup(const char * label, {{zapTypeToEncodableClusterObjectType name ns=clusterName}} & request, Json::Value & value); diff --git a/examples/chip-tool/templates/logging/DataModelLogger.zapt b/examples/chip-tool/templates/logging/DataModelLogger.zapt index 69550b9bdf12b1..468f26619d689d 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger.zapt @@ -1,5 +1,8 @@ {{> header}} +#include +#include + {{#structs_with_cluster_name}} static CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=clusterName isArgument=true}} value); {{/structs_with_cluster_name}} diff --git a/examples/chip-tool/templates/tests/commands.zapt b/examples/chip-tool/templates/tests/commands.zapt index b960267359fa0d..64b9b349372e76 100644 --- a/examples/chip-tool/templates/tests/commands.zapt +++ b/examples/chip-tool/templates/tests/commands.zapt @@ -5,6 +5,7 @@ #if CONFIG_ENABLE_YAML_TESTS #include +#include #include #include #include diff --git a/src/app/tests/suites/include/PICSChecker.h b/src/app/tests/suites/include/PICSChecker.h index 28c07af5a94482..e7c7b7deb9fd11 100644 --- a/src/app/tests/suites/include/PICSChecker.h +++ b/src/app/tests/suites/include/PICSChecker.h @@ -22,7 +22,7 @@ #include #include - +#include #include class PICSChecker diff --git a/src/app/tests/suites/include/TestRunner.h b/src/app/tests/suites/include/TestRunner.h index 3bdea10f29d7ab..9fd5450f14bc01 100644 --- a/src/app/tests/suites/include/TestRunner.h +++ b/src/app/tests/suites/include/TestRunner.h @@ -18,6 +18,10 @@ #pragma once +#include + +#include +#include #include class TestRunner diff --git a/src/lib/dnssd/minimal_mdns/ResponseBuilder.h b/src/lib/dnssd/minimal_mdns/ResponseBuilder.h index 6391d185f8f9e9..3341576bf4bf60 100644 --- a/src/lib/dnssd/minimal_mdns/ResponseBuilder.h +++ b/src/lib/dnssd/minimal_mdns/ResponseBuilder.h @@ -19,6 +19,7 @@ #include +#include #include #include diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index f0aad84c4ec221..874f778f58992f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -17,6 +17,11 @@ // THIS FILE IS GENERATED BY ZAP +#include + +#include +#include + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::AccessControl::Structs::AccessControlEntry::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 6eaf6cb9845421..9b079c170522cc 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -17,6 +17,9 @@ // THIS FILE IS GENERATED BY ZAP +#include +#include + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccessControl::Structs::AccessControlEntry::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bdd9b181fe77c9..3b2a0ea71e7199 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -21,6 +21,7 @@ #if CONFIG_ENABLE_YAML_TESTS +#include #include #include #include From 1eb240cac7f82a67ee0cd7cfa5bfb21090f0f221 Mon Sep 17 00:00:00 2001 From: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:03:08 +0200 Subject: [PATCH 053/115] Improve occupancy testing cluster tests (#21595) --- src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml | 4 ++-- src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml index 5149c821801132..4be4ecaa5c749f 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml @@ -20,8 +20,8 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Occupancy Sensing" + endpoint: 1 tests: - label: "Commission DUT to TH" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml index a44fb8e171151f..f70d33351a6031 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml @@ -22,8 +22,8 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Occupancy Sensing" + endpoint: 1 tests: - label: "Commission DUT to TH" From d3817ce7ab767bc994d00e02396c0e4ad3f2338d Mon Sep 17 00:00:00 2001 From: Vijay Selvaraj Date: Wed, 17 Aug 2022 11:06:47 -0400 Subject: [PATCH 054/115] VID/PID override in Linux Examples (#20875) --- examples/chip-tool/BUILD.gn | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 2c5880cea2d9a0..f7340a3fb3f00b 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -61,6 +61,7 @@ static_library("chip-tool-utils") { "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", "commands/discover/DiscoverCommissionersCommand.cpp", + "commands/pairing/PairingCommand.cpp", # TODO - enable CommissionedListCommand once DNS Cache is implemented # "commands/pairing/CommissionedListCommand.cpp", @@ -97,6 +98,7 @@ static_library("chip-tool-utils") { "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/commands/system", "${chip_root}/src/app/tests/suites/pics", + "${chip_root}/src/controller/data_model", "${chip_root}/src/credentials:file_attestation_trust_store", "${chip_root}/src/lib", "${chip_root}/src/platform", @@ -115,15 +117,9 @@ static_library("chip-tool-utils") { } executable("chip-tool") { - sources = [ - "commands/pairing/PairingCommand.cpp", - "main.cpp", - ] + sources = [ "main.cpp" ] - deps = [ - ":chip-tool-utils", - "${chip_root}/src/controller/data_model", - ] + deps = [ ":chip-tool-utils" ] output_dir = root_out_dir } From e278aa42166d29ad49156d549376a96d0a3c82a0 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 17 Aug 2022 20:54:00 +0530 Subject: [PATCH 055/115] [ESP32] Added some OTA events for the device (#21953) * [ESP32] Added some OTA events for the device * Addressed review comments * fix the cut pasted log prints --- .../ota-requestor-app/esp32/main/main.cpp | 36 +++++++++++++++++++ src/include/platform/CHIPDeviceEvent.h | 28 +++++++++++++++ src/platform/ESP32/OTAImageProcessorImpl.cpp | 35 +++++++++++++++--- 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index 021fd5b3fb6675..ba9ed616b05e5f 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -80,6 +80,40 @@ DeviceLayer::ESP32DeviceInfoProvider gExampleDeviceInfoProvider; #else DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; #endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER + +void OTAEventsHandler(const DeviceLayer::ChipDeviceEvent * event, intptr_t arg) +{ + if (event->Type == DeviceLayer::DeviceEventType::kOtaStateChanged) + { + switch (event->OtaStateChanged.newState) + { + case DeviceLayer::kOtaDownloadInProgress: + ChipLogProgress(DeviceLayer, "OTA image download in progress"); + break; + case DeviceLayer::kOtaDownloadComplete: + ChipLogProgress(DeviceLayer, "OTA image download complete"); + break; + case DeviceLayer::kOtaDownloadFailed: + ChipLogProgress(DeviceLayer, "OTA image download failed"); + break; + case DeviceLayer::kOtaDownloadAborted: + ChipLogProgress(DeviceLayer, "OTA image download aborted"); + break; + case DeviceLayer::kOtaApplyInProgress: + ChipLogProgress(DeviceLayer, "OTA image apply in progress"); + break; + case DeviceLayer::kOtaApplyComplete: + ChipLogProgress(DeviceLayer, "OTA image apply complete"); + break; + case DeviceLayer::kOtaApplyFailed: + ChipLogProgress(DeviceLayer, "OTA image apply failed"); + break; + default: + break; + } + } +} + } // namespace extern "C" void app_main() @@ -136,4 +170,6 @@ extern "C" void app_main() #endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); + + chip::DeviceLayer::PlatformMgrImpl().AddEventHandler(OTAEventsHandler, reinterpret_cast(nullptr)); } diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 1bbf424baa611d..4d3e8353e85e13 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -287,6 +287,34 @@ enum ActivityChange enum OtaState { kOtaSpaceAvailable = 0, + /** + * This state indicates that Node is currently downloading a software update. + */ + kOtaDownloadInProgress, + /** + * This state indicates that Node has successfully downloaded a software update. + */ + kOtaDownloadComplete, + /** + * This state indicates that Node has failed to download a software update. + */ + kOtaDownloadFailed, + /** + * This state indicates that Node has aborted the download of a software update. + */ + kOtaDownloadAborted, + /** + * This state indicate that Node is currently in the process of verifying and applying a software update. + */ + kOtaApplyInProgress, + /** + * This state indicates that Node has successfully applied a software update. + */ + kOtaApplyComplete, + /** + * This state indicates that Node has failed to apply a software update. + */ + kOtaApplyFailed, }; inline ConnectivityChange GetConnectivityChange(bool prevState, bool newState) diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index 62fbe55410bef2..ad93fa8e439238 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include "OTAImageProcessorImpl.h" @@ -37,11 +38,25 @@ void HandleRestart(Layer * systemLayer, void * appState) { esp_restart(); } + +void PostOTAStateChangeEvent(DeviceLayer::OtaState newState) +{ + DeviceLayer::ChipDeviceEvent otaChange; + otaChange.Type = DeviceLayer::DeviceEventType::kOtaStateChanged; + otaChange.OtaStateChanged.newState = newState; + CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&otaChange); + + if (error != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Error while posting OtaChange event %" CHIP_ERROR_FORMAT, error.Format()); + } +} + } // namespace bool OTAImageProcessorImpl::IsFirstImageRun() { - OTARequestorInterface * requestor = chip::GetRequestorInstance(); + OTARequestorInterface * requestor = GetRequestorInstance(); if (requestor == nullptr) { return false; @@ -52,7 +67,7 @@ bool OTAImageProcessorImpl::IsFirstImageRun() CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() { - OTARequestorInterface * requestor = chip::GetRequestorInstance(); + OTARequestorInterface * requestor = GetRequestorInstance(); if (requestor == nullptr) { return CHIP_ERROR_INTERNAL; @@ -132,6 +147,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) } imageProcessor->mHeaderParser.Init(); imageProcessor->mDownloader->OnPreparedForDownload(CHIP_NO_ERROR); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadInProgress); } void OTAImageProcessorImpl::HandleFinalize(intptr_t context) @@ -153,10 +169,12 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) { ESP_LOGE(TAG, "esp_ota_end failed (%s)!", esp_err_to_name(err)); } + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } imageProcessor->ReleaseBlock(); ChipLogProgress(SoftwareUpdate, "OTA image downloaded to offset 0x%x", imageProcessor->mOTAUpdatePartition->address); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadComplete); } void OTAImageProcessorImpl::HandleAbort(intptr_t context) @@ -172,6 +190,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) ESP_LOGE(TAG, "ESP OTA abort failed"); } imageProcessor->ReleaseBlock(); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadAborted); } void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) @@ -195,6 +214,7 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) { ESP_LOGE(TAG, "Failed to process OTA image header"); imageProcessor->mDownloader->EndDownload(error); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } @@ -203,6 +223,7 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) { ESP_LOGE(TAG, "esp_ota_write failed (%s)", esp_err_to_name(err)); imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } imageProcessor->mParams.downloadedBytes += block.size(); @@ -211,17 +232,21 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) void OTAImageProcessorImpl::HandleApply(intptr_t context) { + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyInProgress); auto * imageProcessor = reinterpret_cast(context); esp_err_t err = esp_ota_set_boot_partition(imageProcessor->mOTAUpdatePartition); if (err != ESP_OK) { ESP_LOGE(TAG, "esp_ota_set_boot_partition failed (%s)!", esp_err_to_name(err)); + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyFailed); return; } ESP_LOGI(TAG, "Applying, Boot partition set offset:0x%x", imageProcessor->mOTAUpdatePartition->address); + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyComplete); + // HandleApply is called after delayed action time seconds are elapsed, so it would be safe to schedule the restart - chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(2 * 1000), HandleRestart, nullptr); + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(2 * 1000), HandleRestart, nullptr); } CHIP_ERROR OTAImageProcessorImpl::SetBlock(ByteSpan & block) @@ -237,7 +262,7 @@ CHIP_ERROR OTAImageProcessorImpl::SetBlock(ByteSpan & block) { ReleaseBlock(); } - uint8_t * mBlock_ptr = static_cast(chip::Platform::MemoryAlloc(block.size())); + uint8_t * mBlock_ptr = static_cast(Platform::MemoryAlloc(block.size())); if (mBlock_ptr == nullptr) { return CHIP_ERROR_NO_MEMORY; @@ -257,7 +282,7 @@ CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock() { if (mBlock.data() != nullptr) { - chip::Platform::MemoryFree(mBlock.data()); + Platform::MemoryFree(mBlock.data()); } mBlock = MutableByteSpan(); return CHIP_NO_ERROR; From 6fbf8d9a6362b7d48b5bacdabd71ef4df33df6c0 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 17 Aug 2022 08:57:50 -0700 Subject: [PATCH 056/115] Enable faultinjection mechnism when chip_with_nlfaultinjection build flag is set (#21944) --- src/inet/InetFaultInjection.cpp | 4 ---- src/inet/InetFaultInjection.h | 6 +++--- src/lib/support/CHIPFaultInjection.cpp | 4 ---- src/lib/support/CHIPFaultInjection.h | 8 ++++---- src/system/SystemFaultInjection.cpp | 3 --- src/system/SystemFaultInjection.h | 6 +++--- 6 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/inet/InetFaultInjection.cpp b/src/inet/InetFaultInjection.cpp index 866895daa6247a..faf0b421762960 100644 --- a/src/inet/InetFaultInjection.cpp +++ b/src/inet/InetFaultInjection.cpp @@ -25,8 +25,6 @@ #include -#if INET_CONFIG_TEST - namespace chip { namespace Inet { namespace FaultInjection { @@ -55,5 +53,3 @@ nl::FaultInjection::Manager & GetManager() } // namespace FaultInjection } // namespace Inet } // namespace chip - -#endif // INET_CONFIG_TEST diff --git a/src/inet/InetFaultInjection.h b/src/inet/InetFaultInjection.h index 5b084261b03594..4a4c55d1f1f2ad 100644 --- a/src/inet/InetFaultInjection.h +++ b/src/inet/InetFaultInjection.h @@ -25,7 +25,7 @@ #include -#if INET_CONFIG_TEST && CHIP_WITH_NLFAULTINJECTION +#if CHIP_WITH_NLFAULTINJECTION #include @@ -67,8 +67,8 @@ DLL_EXPORT nl::FaultInjection::Manager & GetManager(); */ #define INET_FAULT_INJECT(aFaultID, aStatement) nlFAULT_INJECT(Inet::FaultInjection::GetManager(), aFaultID, aStatement) -#else // INET_CONFIG_TEST +#else // CHIP_WITH_NLFAULTINJECTION #define INET_FAULT_INJECT(aFaultID, aStatement) -#endif // INET_CONFIG_TEST +#endif // CHIP_WITH_NLFAULTINJECTION diff --git a/src/lib/support/CHIPFaultInjection.cpp b/src/lib/support/CHIPFaultInjection.cpp index ec4a286cefc8e0..fc50021a6fe1e9 100644 --- a/src/lib/support/CHIPFaultInjection.cpp +++ b/src/lib/support/CHIPFaultInjection.cpp @@ -26,8 +26,6 @@ #include -#if CHIP_CONFIG_TEST && CHIP_WITH_NLFAULTINJECTION - namespace chip { namespace FaultInjection { @@ -91,5 +89,3 @@ DLL_EXPORT void FuzzExchangeHeader(uint8_t * p, int32_t arg) } // namespace FaultInjection } // namespace chip - -#endif // CHIP_CONFIG_TEST diff --git a/src/lib/support/CHIPFaultInjection.h b/src/lib/support/CHIPFaultInjection.h index db9f5cbe66d00e..06d94e2d9ed5ff 100644 --- a/src/lib/support/CHIPFaultInjection.h +++ b/src/lib/support/CHIPFaultInjection.h @@ -18,7 +18,7 @@ /** * @file - * Header file for the fault-injection utilities for Inet. + * Header file for the fault-injection utilities for CHIP. */ #pragma once @@ -26,7 +26,7 @@ #include #include -#if CHIP_CONFIG_TEST && CHIP_WITH_NLFAULTINJECTION +#if CHIP_WITH_NLFAULTINJECTION #include @@ -128,10 +128,10 @@ DLL_EXPORT void FuzzExchangeHeader(uint8_t * p, int32_t arg); #define CHIP_FAULT_INJECTION_EXCH_HEADER_NUM_FIELDS 4 #define CHIP_FAULT_INJECTION_EXCH_HEADER_NUM_FIELDS_RMP 5 -#else // CHIP_CONFIG_TEST +#else // CHIP_WITH_NLFAULTINJECTION #define CHIP_FAULT_INJECT(aFaultID, aStatements) #define CHIP_FAULT_INJECT_WITH_ARGS(aFaultID, aProtectedStatements, aUnprotectedStatements) #define CHIP_FAULT_INJECT_MAX_ARG(aFaultID, aMaxArg, aProtectedStatements, aUnprotectedStatements) -#endif // CHIP_CONFIG_TEST +#endif // CHIP_WITH_NLFAULTINJECTION diff --git a/src/system/SystemFaultInjection.cpp b/src/system/SystemFaultInjection.cpp index 8383dfdee76513..11544096742b8a 100644 --- a/src/system/SystemFaultInjection.cpp +++ b/src/system/SystemFaultInjection.cpp @@ -22,7 +22,6 @@ * @file * Implementation of the fault-injection utilities for CHIP System Layer. */ -#if CHIP_SYSTEM_CONFIG_TEST /* module header, also carries config, comes first */ #include @@ -106,5 +105,3 @@ void SetAsyncEventCallbacks(int32_t (*aGetNumEventsAvailable)(), void (*aInjectA } // namespace FaultInjection } // namespace System } // namespace chip - -#endif // CHIP_SYSTEM_CONFIG_TEST diff --git a/src/system/SystemFaultInjection.h b/src/system/SystemFaultInjection.h index 6b6d8e1fbd7d76..f5c0245be95c2a 100644 --- a/src/system/SystemFaultInjection.h +++ b/src/system/SystemFaultInjection.h @@ -25,7 +25,7 @@ #include -#if CHIP_SYSTEM_CONFIG_TEST && CHIP_WITH_NLFAULTINJECTION +#if CHIP_WITH_NLFAULTINJECTION #include @@ -119,10 +119,10 @@ DLL_EXPORT void InjectAsyncEvent(); chip::System::FaultInjection::InjectAsyncEvent(); \ } while (0) -#else // CHIP_SYSTEM_CONFIG_TEST +#else // CHIP_WITH_NLFAULTINJECTION #define CHIP_SYSTEM_FAULT_INJECT(aFaultId, aStatement) #define CHIP_SYSTEM_FAULT_INJECT_ASYNC_EVENT() -#endif // CHIP_SYSTEM_CONFIG_TEST +#endif // CHIP_WITH_NLFAULTINJECTION From f577005d0674586702ce8f754c621d93993a7dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Wed, 17 Aug 2022 18:13:26 +0200 Subject: [PATCH 057/115] [system] Increase number of timers to 32 (#21966) The maximum number of timers is set to 32, but most platforms override this value to 16 (well, for platforms that use heap-allocated pools, such as Darwin or Linux, it doesn't matter). The problem is that 16 timers is too little to handle the spec-mandated number of active subscriptions and other scheduled activities. Double the number of timers to pass stress/capacity tests. Signed-off-by: Damian Krolik Signed-off-by: Damian Krolik --- src/platform/Ameba/SystemPlatformConfig.h | 4 ---- src/platform/Beken/SystemPlatformConfig.h | 4 ---- src/platform/Darwin/SystemPlatformConfig.h | 4 ---- src/platform/EFR32/SystemPlatformConfig.h | 4 ---- src/platform/Linux/SystemPlatformConfig.h | 4 ---- src/platform/P6/SystemPlatformConfig.h | 4 ---- src/platform/Tizen/SystemPlatformConfig.h | 4 ---- src/platform/Zephyr/SystemPlatformConfig.h | 4 ---- src/platform/android/SystemPlatformConfig.h | 4 ---- src/platform/bouffalolab/BL602/SystemPlatformConfig.h | 4 ---- src/platform/mbed/SystemPlatformConfig.h | 4 ---- src/platform/nrfconnect/SystemPlatformConfig.h | 4 ---- src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h | 4 ---- src/platform/nxp/mw320/SystemPlatformConfig.h | 4 ---- src/platform/qpg/SystemPlatformConfig.h | 4 ---- src/platform/telink/SystemPlatformConfig.h | 4 ---- src/platform/webos/SystemPlatformConfig.h | 4 ---- src/system/SystemConfig.h | 4 ---- 18 files changed, 72 deletions(-) diff --git a/src/platform/Ameba/SystemPlatformConfig.h b/src/platform/Ameba/SystemPlatformConfig.h index 26ba0379e3d04f..1e8690af84b796 100755 --- a/src/platform/Ameba/SystemPlatformConfig.h +++ b/src/platform/Ameba/SystemPlatformConfig.h @@ -49,10 +49,6 @@ struct ChipDeviceEvent; // NOTE: Values that are mapped to CONFIG_ #defines are settable via the Kconfig mechanism. -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS - #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 0 #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS00 diff --git a/src/platform/Beken/SystemPlatformConfig.h b/src/platform/Beken/SystemPlatformConfig.h index b1f16a18fb0283..a6b38ca79d41da 100755 --- a/src/platform/Beken/SystemPlatformConfig.h +++ b/src/platform/Beken/SystemPlatformConfig.h @@ -50,10 +50,6 @@ struct ChipDeviceEvent; // NOTE: Values that are mapped to CONFIG_ #defines are settable via the Kconfig mechanism. -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS - #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 0 #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS0 0 diff --git a/src/platform/Darwin/SystemPlatformConfig.h b/src/platform/Darwin/SystemPlatformConfig.h index 641f735999f323..48613ba75db9b2 100644 --- a/src/platform/Darwin/SystemPlatformConfig.h +++ b/src/platform/Darwin/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/EFR32/SystemPlatformConfig.h b/src/platform/EFR32/SystemPlatformConfig.h index ab83dbca1b435e..722198fc148d41 100644 --- a/src/platform/EFR32/SystemPlatformConfig.h +++ b/src/platform/EFR32/SystemPlatformConfig.h @@ -39,7 +39,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Linux/SystemPlatformConfig.h b/src/platform/Linux/SystemPlatformConfig.h index 9d4d02f92fc83d..8edc16c1c00307 100644 --- a/src/platform/Linux/SystemPlatformConfig.h +++ b/src/platform/Linux/SystemPlatformConfig.h @@ -41,7 +41,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/P6/SystemPlatformConfig.h b/src/platform/P6/SystemPlatformConfig.h index dd1672e2a5c87c..11dd5882d11b61 100644 --- a/src/platform/P6/SystemPlatformConfig.h +++ b/src/platform/P6/SystemPlatformConfig.h @@ -49,7 +49,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ==================== General Configuration Overrides ==================== - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Tizen/SystemPlatformConfig.h b/src/platform/Tizen/SystemPlatformConfig.h index 80afd51b52e65b..761a1c3a976516 100644 --- a/src/platform/Tizen/SystemPlatformConfig.h +++ b/src/platform/Tizen/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/Zephyr/SystemPlatformConfig.h b/src/platform/Zephyr/SystemPlatformConfig.h index 6fa52c1728c093..b8e8872a617d93 100644 --- a/src/platform/Zephyr/SystemPlatformConfig.h +++ b/src/platform/Zephyr/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index a83190fde82dc3..1c601906812edc 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -42,7 +42,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/bouffalolab/BL602/SystemPlatformConfig.h b/src/platform/bouffalolab/BL602/SystemPlatformConfig.h index 3410e99bff1ce4..cf6fbdc4be2240 100644 --- a/src/platform/bouffalolab/BL602/SystemPlatformConfig.h +++ b/src/platform/bouffalolab/BL602/SystemPlatformConfig.h @@ -47,7 +47,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/mbed/SystemPlatformConfig.h b/src/platform/mbed/SystemPlatformConfig.h index 9d4a520f7cf07c..05ee9ef143220b 100644 --- a/src/platform/mbed/SystemPlatformConfig.h +++ b/src/platform/mbed/SystemPlatformConfig.h @@ -43,7 +43,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index ec4ba9e2f1ea90..803005c4df4531 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h index f7514dcb68bec9..084b759158d5f0 100644 --- a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h @@ -40,7 +40,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 7 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/nxp/mw320/SystemPlatformConfig.h b/src/platform/nxp/mw320/SystemPlatformConfig.h index 408c3d36e17296..1f05e9bc688aae 100644 --- a/src/platform/nxp/mw320/SystemPlatformConfig.h +++ b/src/platform/nxp/mw320/SystemPlatformConfig.h @@ -58,7 +58,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/qpg/SystemPlatformConfig.h b/src/platform/qpg/SystemPlatformConfig.h index 70f20518c77909..78d4757355226c 100644 --- a/src/platform/qpg/SystemPlatformConfig.h +++ b/src/platform/qpg/SystemPlatformConfig.h @@ -37,7 +37,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/telink/SystemPlatformConfig.h b/src/platform/telink/SystemPlatformConfig.h index f81b07573b378d..5e3fce6a5b0023 100644 --- a/src/platform/telink/SystemPlatformConfig.h +++ b/src/platform/telink/SystemPlatformConfig.h @@ -52,7 +52,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/webos/SystemPlatformConfig.h b/src/platform/webos/SystemPlatformConfig.h index f225657f9f0a21..3ceb8a5d621fbd 100644 --- a/src/platform/webos/SystemPlatformConfig.h +++ b/src/platform/webos/SystemPlatformConfig.h @@ -41,7 +41,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index b32c9bf1dec1a6..87171af3352059 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -159,10 +159,6 @@ #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE INET_CONFIG_NUM_BUFS #endif // !defined(CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE) && defined(INET_CONFIG_NUM_BUFS) -#if !defined(CHIP_SYSTEM_CONFIG_NUM_TIMERS) && defined(INET_CONFIG_NUM_TIMERS) -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS INET_CONFIG_NUM_TIMERS -#endif // !defined(CHIP_SYSTEM_CONFIG_NUM_TIMERS) && defined(INET_CONFIG_NUM_TIMERS) - #endif // CHIP_SYSTEM_CONFIG_TRANSFER_INETLAYER_PROJECT_CONFIGURATION #if CHIP_SYSTEM_CONFIG_USE_LWIP From 1939019303695a7714051a227645ae7b7bf8bde4 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 17 Aug 2022 21:46:00 +0530 Subject: [PATCH 058/115] Sync window covering controller device type with specs (#21911) * Sync window covering controller device type with specs * Addressed review comments --- .../zcl/data-model/chip/matter-devices.xml | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 48e96cabbd3b66..7c2924a7b28208 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1544,7 +1544,7 @@ limitations under the License. 0x0103 0x0203 - + IDENTIFY_TIME IDENTIFY_TYPE Identify @@ -1557,24 +1557,11 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - + + From cd35ddad87093880c690c5294f164619b3cc9340 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Wed, 17 Aug 2022 10:24:38 -0700 Subject: [PATCH 059/115] Removing todos (#21945) --- src/app/clusters/door-lock-server/door-lock-server.cpp | 3 --- 1 file changed, 3 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 8aae6a8baf9fa1..1465f22809cb5d 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -2085,7 +2085,6 @@ DlStatus DoorLockServer::addCredentialToUser(chip::EndpointId endpointId, chip:: return DlStatus::kFailure; } - // TODO: Do we need to check the modifier fabric here? Discuss with Spec team and add it if necessary. for (size_t i = 0; i < user.credentials.size(); ++i) { // appclusters, 5.2.4.40: user should not be already associated with given credentialIndex @@ -2163,8 +2162,6 @@ DlStatus DoorLockServer::modifyCredentialForUser(chip::EndpointId endpointId, ch return DlStatus::kFailure; } - // TODO: Do we need to check the modifier fabric here? Discuss with Spec team and add it if necessary. - for (size_t i = 0; i < user.credentials.size(); ++i) { // appclusters, 5.2.4.40: user should already be associated with given credentialIndex From 0190df475d6fec241bae619bac150eb44c2ddb76 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 17 Aug 2022 23:39:21 +0530 Subject: [PATCH 060/115] Removing completed TODO (#21954) --- .github/workflows/examples-esp32.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index b684c60ad82be0..4339a8d0f38b46 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -23,7 +23,6 @@ concurrency: cancel-in-progress: true jobs: - # TODO ESP32 https://github.com/project-chip/connectedhomeip/issues/1510 esp32: name: ESP32 timeout-minutes: 120 From fc45b77b4b903903ed041752173be0b86d9d2377 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Thu, 18 Aug 2022 00:03:35 +0530 Subject: [PATCH 061/115] Sync bridged node device type with specs (#21919) --- .../zcl/data-model/chip/matter-devices.xml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7c2924a7b28208..8f65768e7118e3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -167,27 +167,17 @@ limitations under the License. 0x0103 0x0013 - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - - BINDING - REACHABLE - - + + From 87be9a8206bab8368998d7473d617c953886f2de Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Thu, 18 Aug 2022 00:34:24 +0530 Subject: [PATCH 062/115] Sync thermostat device type with specs (#21922) * Sync thermostat device type with specs * Updated zap files * Updated groups cluster to optional * Addressed review comments and restyled --- .../zcl/data-model/chip/matter-devices.xml | 15 +- .../chip/time-synchronization-cluster.xml | 76 +++- .../python/chip/clusters/Objects.py | 259 +++++++++++++ .../CHIP/zap-generated/MTRBaseClusters.h | 28 ++ .../CHIP/zap-generated/MTRCallbackBridge.mm | 106 ++++++ .../MTRCallbackBridge_internal.h | 208 ++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 13 + .../zap-generated/MTRCommandPayloadsObjc.h | 26 ++ .../zap-generated/MTRCommandPayloadsObjc.mm | 35 ++ .../CHIP/zap-generated/MTRStructsObjc.h | 18 + .../CHIP/zap-generated/MTRStructsObjc.mm | 68 ++++ .../app-common/zap-generated/af-structs.h | 16 + .../app-common/zap-generated/attribute-id.h | 10 + .../zap-generated/attributes/Accessors.cpp | 354 ++++++++++++++++++ .../zap-generated/attributes/Accessors.h | 50 +++ .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-enums-check.h | 43 +++ .../app-common/zap-generated/cluster-enums.h | 34 ++ .../zap-generated/cluster-objects.cpp | 180 +++++++++ .../zap-generated/cluster-objects.h | 240 ++++++++++++ .../app-common/zap-generated/command-id.h | 3 + .../app-common/zap-generated/ids/Attributes.h | 40 ++ .../app-common/zap-generated/ids/Commands.h | 10 + .../zap-generated/cluster/Commands.h | 90 ++++- .../cluster/ComplexArgumentParser.cpp | 62 +++ .../cluster/ComplexArgumentParser.h | 8 + .../cluster/logging/DataModelLogger.cpp | 64 ++++ .../cluster/logging/DataModelLogger.h | 4 + 28 files changed, 2050 insertions(+), 16 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 8f65768e7118e3..26c9d6acd3cfee 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1637,10 +1637,10 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1660,7 +1660,7 @@ limitations under the License. GetSceneMembership GetSceneMembershipResponse - + GROUP_NAME_SUPPORT AddGroup AddGroupResponse @@ -1674,11 +1674,12 @@ limitations under the License. AddGroupIfIdentifying + - - - - + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml index c5ce83f9049804..5f997a98f68002 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml @@ -17,6 +17,49 @@ limitations under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General @@ -28,8 +71,39 @@ limitations under the License. Accurate time is required for a number of reasons, including scheduling, display and validating security materials. + UTCTime + Granularity + TimeSource + + TrustedTimeNodeId + + + + + DefaultNtp + + + + + TimeZone + + + + + DstOffset + + + + LocalTime + TimeZoneDatabase + NtpServerPort - + + Upon receipt of this command, the server MAY update its UTCTime Attribute to match the time specified in the command + + + + diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9a13bd93cad370..b13159384185e8 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -9955,6 +9955,16 @@ class TimeSynchronization(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="UTCTime", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="granularity", Tag=0x00000001, Type=TimeSynchronization.Enums.GranularityEnum), + ClusterObjectFieldDescriptor(Label="timeSource", Tag=0x00000002, Type=typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]), + ClusterObjectFieldDescriptor(Label="trustedTimeNodeId", Tag=0x00000003, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="defaultNtp", Tag=0x00000004, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="timeZone", Tag=0x00000005, Type=typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneType]]), + ClusterObjectFieldDescriptor(Label="dstOffset", Tag=0x00000006, Type=typing.Optional[typing.List[TimeSynchronization.Structs.DstOffsetType]]), + ClusterObjectFieldDescriptor(Label="localTime", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="timeZoneDatabase", Tag=0x00000008, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="ntpServerPort", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -9962,16 +9972,265 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) + UTCTime: 'typing.Union[Nullable, uint]' = None + granularity: 'TimeSynchronization.Enums.GranularityEnum' = None + timeSource: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None + trustedTimeNodeId: 'typing.Union[Nullable, uint]' = None + defaultNtp: 'typing.Union[None, Nullable, str]' = None + timeZone: 'typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneType]]' = None + dstOffset: 'typing.Optional[typing.List[TimeSynchronization.Structs.DstOffsetType]]' = None + localTime: 'typing.Union[None, Nullable, uint]' = None + timeZoneDatabase: 'typing.Optional[bool]' = None + ntpServerPort: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class GranularityEnum(IntEnum): + kNoTimeGranularity = 0x00 + kMinutesGranularity = 0x01 + kSecondsGranularity = 0x02 + kMillisecondsGranularity = 0x03 + kMicrosecondsGranularity = 0x04 + + class TimeSourceEnum(IntEnum): + kNone = 0x00 + kUnknown = 0x01 + kAdmin = 0x02 + kNodeTimeCluster = 0x03 + kNonFabricSntp = 0x04 + kNonFabricNtp = 0x05 + kFabricSntp = 0x06 + kFabricNtp = 0x07 + kMixedNtp = 0x08 + kNonFabricSntpNts = 0x09 + kNonFabricNtpNts = 0x0A + kFabricSntpNts = 0x0B + kFabricNtpNts = 0x0C + kMixedNtpNts = 0x0D + kCloudSource = 0x0E + kPtp = 0x0F + kGnss = 0x10 + + + class Structs: + @dataclass + class DstOffsetType(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="offset", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="validStarting", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="validUntil", Tag=2, Type=uint), + ]) + + offset: 'int' = 0 + validStarting: 'uint' = 0 + validUntil: 'uint' = 0 + + @dataclass + class TimeZoneType(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="offset", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="validAt", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Optional[str]), + ]) + + offset: 'int' = 0 + validAt: 'uint' = 0 + name: 'typing.Optional[str]' = None + class Commands: + @dataclass + class SetUtcTime(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0038 + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="utcTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="granularity", Tag=1, Type=TimeSynchronization.Enums.GranularityEnum), + ClusterObjectFieldDescriptor(Label="timeSource", Tag=2, Type=typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]), + ]) + + utcTime: 'uint' = 0 + granularity: 'TimeSynchronization.Enums.GranularityEnum' = 0 + timeSource: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None + + class Attributes: + @dataclass + class UTCTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class Granularity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=TimeSynchronization.Enums.GranularityEnum) + + value: 'TimeSynchronization.Enums.GranularityEnum' = 0 + + @dataclass + class TimeSource(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]) + + value: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None + + @dataclass + class TrustedTimeNodeId(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class DefaultNtp(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, str]) + + value: 'typing.Union[None, Nullable, str]' = None + + @dataclass + class TimeZone(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneType]]) + + value: 'typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneType]]' = None + + @dataclass + class DstOffset(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeSynchronization.Structs.DstOffsetType]]) + + value: 'typing.Optional[typing.List[TimeSynchronization.Structs.DstOffsetType]]' = None + + @dataclass + class LocalTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class TimeZoneDatabase(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: 'typing.Optional[bool]' = None + + @dataclass + class NtpServerPort(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 0c017a184b92f8..fcd359ef6e62ad 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -22465,6 +22465,34 @@ typedef NS_ENUM(uint8_t, MTREthernetNetworkDiagnosticsPHYRateType) { MTREthernetNetworkDiagnosticsPHYRateType400G = 0x09, }; +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationGranularity) { + MTRTimeSynchronizationGranularityNoTimeGranularity = 0x00, + MTRTimeSynchronizationGranularityMinutesGranularity = 0x01, + MTRTimeSynchronizationGranularitySecondsGranularity = 0x02, + MTRTimeSynchronizationGranularityMillisecondsGranularity = 0x03, + MTRTimeSynchronizationGranularityMicrosecondsGranularity = 0x04, +}; + +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { + MTRTimeSynchronizationTimeSourceNone = 0x00, + MTRTimeSynchronizationTimeSourceUnknown = 0x01, + MTRTimeSynchronizationTimeSourceAdmin = 0x02, + MTRTimeSynchronizationTimeSourceNodeTimeCluster = 0x03, + MTRTimeSynchronizationTimeSourceNonFabricSntp = 0x04, + MTRTimeSynchronizationTimeSourceNonFabricNtp = 0x05, + MTRTimeSynchronizationTimeSourceFabricSntp = 0x06, + MTRTimeSynchronizationTimeSourceFabricNtp = 0x07, + MTRTimeSynchronizationTimeSourceMixedNtp = 0x08, + MTRTimeSynchronizationTimeSourceNonFabricSntpNts = 0x09, + MTRTimeSynchronizationTimeSourceNonFabricNtpNts = 0x0A, + MTRTimeSynchronizationTimeSourceFabricSntpNts = 0x0B, + MTRTimeSynchronizationTimeSourceFabricNtpNts = 0x0C, + MTRTimeSynchronizationTimeSourceMixedNtpNts = 0x0D, + MTRTimeSynchronizationTimeSourceCloudSource = 0x0E, + MTRTimeSynchronizationTimeSourcePtp = 0x0F, + MTRTimeSynchronizationTimeSourceGnss = 0x10, +}; + typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningCommissioningWindowStatus) { MTRAdministratorCommissioningCommissioningWindowStatusWindowNotOpen = 0x00, MTRAdministratorCommissioningCommissioningWindowStatusEnhancedWindowOpen = 0x01, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 46579243420093..4c82f32c8365f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -16181,6 +16181,112 @@ } } +void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 2b4c03392ec8eb..36ef0831588eb6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -327,6 +327,14 @@ typedef void (*EthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallback)( void *, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType); typedef void (*NullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*TimeSynchronizationClusterGranularityEnumAttributeCallback)( + void *, chip::app::Clusters::TimeSynchronization::GranularityEnum); +typedef void (*NullableTimeSynchronizationClusterGranularityEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*TimeSynchronizationClusterTimeSourceEnumAttributeCallback)(void *, + chip::app::Clusters::TimeSynchronization::TimeSourceEnum); +typedef void (*NullableTimeSynchronizationClusterTimeSourceEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*AdministratorCommissioningClusterCommissioningWindowStatusAttributeCallback)( void *, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus); typedef void (*NullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallback)( @@ -21653,6 +21661,206 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu SubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, + OnSuccessFn, keepAlive){}; + + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value); +}; + +class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge +{ +public: + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, + action, OnSuccessFn, keepAlive){}; + + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, + OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge +{ +public: + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, + true), + mEstablishedHandler(establishedHandler) + {} + + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, + OnSuccessFn, keepAlive){}; + + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); +}; + +class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge +{ +public: + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, + action, OnSuccessFn, keepAlive){}; + + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, + OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge + : public MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge +{ +public: + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, + true), + mEstablishedHandler(establishedHandler) + {} + + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 858b48d69e85d4..e7ee53846f750a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -527,6 +527,16 @@ typedef NS_ENUM(uint32_t, MTRClusterAttributeIDType) { MTRClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, // Cluster TimeSynchronization attributes + MTRClusterTimeSynchronizationAttributeUTCTimeID = 0x00000000, + MTRClusterTimeSynchronizationAttributeGranularityID = 0x00000001, + MTRClusterTimeSynchronizationAttributeTimeSourceID = 0x00000002, + MTRClusterTimeSynchronizationAttributeTrustedTimeNodeIdID = 0x00000003, + MTRClusterTimeSynchronizationAttributeDefaultNtpID = 0x00000004, + MTRClusterTimeSynchronizationAttributeTimeZoneID = 0x00000005, + MTRClusterTimeSynchronizationAttributeDstOffsetID = 0x00000006, + MTRClusterTimeSynchronizationAttributeLocalTimeID = 0x00000007, + MTRClusterTimeSynchronizationAttributeTimeZoneDatabaseID = 0x00000008, + MTRClusterTimeSynchronizationAttributeNtpServerPortID = 0x00000009, MTRClusterTimeSynchronizationAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, MTRClusterTimeSynchronizationAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, MTRClusterTimeSynchronizationAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, @@ -1482,6 +1492,9 @@ typedef NS_ENUM(uint32_t, MTRClusterCommandIDType) { // Cluster EthernetNetworkDiagnostics commands MTRClusterEthernetNetworkDiagnosticsCommandResetCountsID = 0x00000000, + // Cluster TimeSynchronization commands + MTRClusterTimeSynchronizationCommandSetUtcTimeID = 0x00000000, + // Cluster AdministratorCommissioning commands MTRClusterAdministratorCommissioningCommandOpenCommissioningWindowID = 0x00000000, MTRClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID = 0x00000001, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index f4aa3641d0ad77..d3043ec6452991 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2191,6 +2191,32 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRTimeSynchronizationClusterSetUtcTimeParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull utcTime; + +@property (nonatomic, copy) NSNumber * _Nonnull granularity; + +@property (nonatomic, copy) NSNumber * _Nullable timeSource; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; - (id)copyWithZone:(nullable NSZone *)zone; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a48ecc364b3209..6a7c94a88aa7a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -2942,6 +2942,41 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRTimeSynchronizationClusterSetUtcTimeParams +- (instancetype)init +{ + if (self = [super init]) { + + _utcTime = @(0); + + _granularity = @(0); + + _timeSource = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTimeSynchronizationClusterSetUtcTimeParams alloc] init]; + + other.utcTime = self.utcTime; + other.granularity = self.granularity; + other.timeSource = self.timeSource; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: utcTime:%@; granularity:%@; timeSource:%@; >", + NSStringFromClass([self class]), _utcTime, _granularity, _timeSource]; + return descriptionString; +} + @end @implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 6cf016c2fa6507..7351fed1616c57 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -449,6 +449,24 @@ NS_ASSUME_NONNULL_BEGIN - (id)copyWithZone:(nullable NSZone *)zone; @end +@interface MTRTimeSynchronizationClusterDstOffsetType : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull offset; +@property (nonatomic, copy) NSNumber * _Nonnull validStarting; +@property (nonatomic, copy) NSNumber * _Nonnull validUntil; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRTimeSynchronizationClusterTimeZoneType : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull offset; +@property (nonatomic, copy) NSNumber * _Nonnull validAt; +@property (nonatomic, copy) NSString * _Nullable name; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + @interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 4ed92c2d3c4931..9496ac336661de 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -1648,6 +1648,74 @@ - (NSString *)description @end +@implementation MTRTimeSynchronizationClusterDstOffsetType +- (instancetype)init +{ + if (self = [super init]) { + + _offset = @(0); + + _validStarting = @(0); + + _validUntil = @(0); + } + return self; +} + +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTimeSynchronizationClusterDstOffsetType alloc] init]; + + other.offset = self.offset; + other.validStarting = self.validStarting; + other.validUntil = self.validUntil; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: offset:%@; validStarting:%@; validUntil:%@; >", + NSStringFromClass([self class]), _offset, _validStarting, _validUntil]; + return descriptionString; +} + +@end + +@implementation MTRTimeSynchronizationClusterTimeZoneType +- (instancetype)init +{ + if (self = [super init]) { + + _offset = @(0); + + _validAt = @(0); + + _name = nil; + } + return self; +} + +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTimeSynchronizationClusterTimeZoneType alloc] init]; + + other.offset = self.offset; + other.validAt = self.validAt; + other.name = self.name; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString + stringWithFormat:@"<%@: offset:%@; validAt:%@; name:%@; >", NSStringFromClass([self class]), _offset, _validAt, _name]; + return descriptionString; +} + +@end + @implementation MTRBridgedDeviceBasicClusterStartUpEvent - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 93a09ffe05e0ac..c2ef3f9b0e97cd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -278,6 +278,14 @@ typedef struct _DlCredential uint16_t CredentialIndex; } DlCredential; +// Struct for DstOffsetType +typedef struct _DstOffsetType +{ + int32_t Offset; + uint64_t ValidStarting; + uint64_t ValidUntil; +} DstOffsetType; + // Struct for EndpointListStruct typedef struct _EndpointListStruct { @@ -548,6 +556,14 @@ typedef struct _ThreadMetrics uint32_t StackSize; } ThreadMetrics; +// Struct for TimeZoneType +typedef struct _TimeZoneType +{ + int32_t Offset; + uint64_t ValidAt; + chip::CharSpan Name; +} TimeZoneType; + // Struct for WiFiInterfaceScanResult typedef struct _WiFiInterfaceScanResult { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index d8054f97b1ca4d..aa7fbc1afd08ab 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -427,6 +427,16 @@ // Client attributes // Server attributes +#define ZCL_UTC_TIME_ATTRIBUTE_ID (0x0000) +#define ZCL_GRANULARITY_ATTRIBUTE_ID (0x0001) +#define ZCL_TIME_SOURCE_ATTRIBUTE_ID (0x0002) +#define ZCL_TRUSTED_TIME_NODE_ID_ATTRIBUTE_ID (0x0003) +#define ZCL_DEFAULT_NTP_ATTRIBUTE_ID (0x0004) +#define ZCL_TIME_ZONE_ATTRIBUTE_ID (0x0005) +#define ZCL_DST_OFFSET_ATTRIBUTE_ID (0x0006) +#define ZCL_LOCAL_TIME_ATTRIBUTE_ID (0x0007) +#define ZCL_TIME_ZONE_DATABASE_ATTRIBUTE_ID (0x0008) +#define ZCL_NTP_SERVER_PORT_ATTRIBUTE_ID (0x0009) // Attribute ids for cluster: Bridged Device Basic 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 fe3e77ae17c2bc..9fa1281d38db4f 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 @@ -9151,6 +9151,360 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace TimeSynchronization { namespace Attributes { +namespace UTCTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace UTCTime + +namespace Granularity { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::GranularityEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::GranularityEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace Granularity + +namespace TimeSource { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace TimeSource + +namespace TrustedTimeNodeId { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace TrustedTimeNodeId + +namespace DefaultNtp { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[128 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 128, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 128); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 128, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[128 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace DefaultNtp + +namespace LocalTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LocalTime + +namespace TimeZoneDatabase { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace TimeZoneDatabase + +namespace NtpServerPort { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NtpServerPort + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index bcf76c04bf562a..239360ac366b9a 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 @@ -1583,6 +1583,56 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace TimeSynchronization { namespace Attributes { +namespace UTCTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace UTCTime + +namespace Granularity { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::GranularityEnum * value); // GranularityEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::GranularityEnum value); +} // namespace Granularity + +namespace TimeSource { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value); // TimeSourceEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); +} // namespace TimeSource + +namespace TrustedTimeNodeId { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // node_id +EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace TrustedTimeNodeId + +namespace DefaultNtp { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace DefaultNtp + +namespace LocalTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace LocalTime + +namespace TimeZoneDatabase { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace TimeZoneDatabase + +namespace NtpServerPort { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NtpServerPort + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index cfefbae274133f..02c2a59c511de5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -7870,6 +7870,12 @@ bool emberAfWiFiNetworkDiagnosticsClusterResetCountsCallback( bool emberAfEthernetNetworkDiagnosticsClusterResetCountsCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::DecodableType & commandData); +/** + * @brief Time Synchronization Cluster SetUtcTime Command callback (from client) + */ +bool emberAfTimeSynchronizationClusterSetUtcTimeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::TimeSynchronization::Commands::SetUtcTime::DecodableType & commandData); /** * @brief AdministratorCommissioning Cluster OpenCommissioningWindow Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index aad00776c2b222..64d9c1da0ff753 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -973,6 +973,49 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnost } } +static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::GranularityEnum val) +{ + using EnumType = TimeSynchronization::GranularityEnum; + switch (val) + { + case EnumType::kNoTimeGranularity: + case EnumType::kMinutesGranularity: + case EnumType::kSecondsGranularity: + case EnumType::kMillisecondsGranularity: + case EnumType::kMicrosecondsGranularity: + return val; + default: + return static_cast(5); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::TimeSourceEnum val) +{ + using EnumType = TimeSynchronization::TimeSourceEnum; + switch (val) + { + case EnumType::kNone: + case EnumType::kUnknown: + case EnumType::kAdmin: + case EnumType::kNodeTimeCluster: + case EnumType::kNonFabricSntp: + case EnumType::kNonFabricNtp: + case EnumType::kFabricSntp: + case EnumType::kFabricNtp: + case EnumType::kMixedNtp: + case EnumType::kNonFabricSntpNts: + case EnumType::kNonFabricNtpNts: + case EnumType::kFabricSntpNts: + case EnumType::kFabricNtpNts: + case EnumType::kMixedNtpNts: + case EnumType::kCloudSource: + case EnumType::kPtp: + case EnumType::kGnss: + return val; + default: + return static_cast(17); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(AdministratorCommissioning::CommissioningWindowStatus val) { using EnumType = AdministratorCommissioning::CommissioningWindowStatus; 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 fa7a51a92ee971..08e5853c7d3ead 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 @@ -893,6 +893,40 @@ static PHYRateType __attribute__((unused)) kPHYRateTypekUnknownEnumValue } // namespace EthernetNetworkDiagnostics namespace TimeSynchronization { + +// Enum for GranularityEnum +enum class GranularityEnum : uint8_t +{ + kNoTimeGranularity = 0x00, + kMinutesGranularity = 0x01, + kSecondsGranularity = 0x02, + kMillisecondsGranularity = 0x03, + kMicrosecondsGranularity = 0x04, + kUnknownEnumValue = 5, +}; + +// Enum for TimeSourceEnum +enum class TimeSourceEnum : uint8_t +{ + kNone = 0x00, + kUnknown = 0x01, + kAdmin = 0x02, + kNodeTimeCluster = 0x03, + kNonFabricSntp = 0x04, + kNonFabricNtp = 0x05, + kFabricSntp = 0x06, + kFabricNtp = 0x07, + kMixedNtp = 0x08, + kNonFabricSntpNts = 0x09, + kNonFabricNtpNts = 0x0A, + kFabricSntpNts = 0x0B, + kFabricNtpNts = 0x0C, + kMixedNtpNts = 0x0D, + kCloudSource = 0x0E, + kPtp = 0x0F, + kGnss = 0x10, + kUnknownEnumValue = 17, +}; } // namespace TimeSynchronization namespace BridgedDeviceBasic { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 00f5e64b716f5f..f3971342a281ad 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -7836,8 +7836,151 @@ namespace Events { } // namespace EthernetNetworkDiagnostics namespace TimeSynchronization { +namespace Structs { +namespace DstOffsetType { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOffset)), offset)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValidStarting)), validStarting)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValidUntil)), validUntil)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kOffset): + ReturnErrorOnFailure(DataModel::Decode(reader, offset)); + break; + case to_underlying(Fields::kValidStarting): + ReturnErrorOnFailure(DataModel::Decode(reader, validStarting)); + break; + case to_underlying(Fields::kValidUntil): + ReturnErrorOnFailure(DataModel::Decode(reader, validUntil)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace DstOffsetType +namespace TimeZoneType { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOffset)), offset)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValidAt)), validAt)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kOffset): + ReturnErrorOnFailure(DataModel::Decode(reader, offset)); + break; + case to_underlying(Fields::kValidAt): + ReturnErrorOnFailure(DataModel::Decode(reader, validAt)); + break; + case to_underlying(Fields::kName): + ReturnErrorOnFailure(DataModel::Decode(reader, name)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace TimeZoneType +} // namespace Structs namespace Commands { +namespace SetUtcTime { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUtcTime)), utcTime)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGranularity)), granularity)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeSource)), timeSource)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kUtcTime): + ReturnErrorOnFailure(DataModel::Decode(reader, utcTime)); + break; + case to_underlying(Fields::kGranularity): + ReturnErrorOnFailure(DataModel::Decode(reader, granularity)); + break; + case to_underlying(Fields::kTimeSource): + ReturnErrorOnFailure(DataModel::Decode(reader, timeSource)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace SetUtcTime. } // namespace Commands namespace Attributes { @@ -7845,6 +7988,36 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { + case Attributes::UTCTime::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, UTCTime)); + break; + case Attributes::Granularity::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, granularity)); + break; + case Attributes::TimeSource::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, timeSource)); + break; + case Attributes::TrustedTimeNodeId::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, trustedTimeNodeId)); + break; + case Attributes::DefaultNtp::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, defaultNtp)); + break; + case Attributes::TimeZone::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, timeZone)); + break; + case Attributes::DstOffset::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, dstOffset)); + break; + case Attributes::LocalTime::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, localTime)); + break; + case Attributes::TimeZoneDatabase::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, timeZoneDatabase)); + break; + case Attributes::NtpServerPort::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, ntpServerPort)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; @@ -20931,6 +21104,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::TimeSynchronization::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::AdministratorCommissioning::Id: { switch (aCommand) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index c35ba378c1822c..7aba9ed714c63e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -9908,9 +9908,237 @@ struct TypeInfo } // namespace Attributes } // namespace EthernetNetworkDiagnostics namespace TimeSynchronization { +namespace Structs { +namespace DstOffsetType { +enum class Fields +{ + kOffset = 0, + kValidStarting = 1, + kValidUntil = 2, +}; + +struct Type +{ +public: + int32_t offset = static_cast(0); + uint64_t validStarting = static_cast(0); + uint64_t validUntil = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace DstOffsetType +namespace TimeZoneType { +enum class Fields +{ + kOffset = 0, + kValidAt = 1, + kName = 2, +}; + +struct Type +{ +public: + int32_t offset = static_cast(0); + uint64_t validAt = static_cast(0); + Optional name; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace TimeZoneType +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetUtcTime { +struct Type; +struct DecodableType; +} // namespace SetUtcTime + +} // namespace Commands + +namespace Commands { +namespace SetUtcTime { +enum class Fields +{ + kUtcTime = 0, + kGranularity = 1, + kTimeSource = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetUtcTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + uint64_t utcTime = static_cast(0); + GranularityEnum granularity = static_cast(0); + Optional timeSource; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetUtcTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + uint64_t utcTime = static_cast(0); + GranularityEnum granularity = static_cast(0); + Optional timeSource; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetUtcTime +} // namespace Commands namespace Attributes { +namespace UTCTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UTCTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UTCTime +namespace Granularity { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeSynchronization::GranularityEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::GranularityEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::GranularityEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Granularity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Granularity +namespace TimeSource { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeSource::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeSource +namespace TrustedTimeNodeId { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TrustedTimeNodeId::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TrustedTimeNodeId +namespace DefaultNtp { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultNtp::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 128; } +}; +} // namespace DefaultNtp +namespace TimeZone { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZone::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeZone +namespace DstOffset { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DstOffset::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DstOffset +namespace LocalTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LocalTime +namespace TimeZoneDatabase { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneDatabase::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeZoneDatabase +namespace NtpServerPort { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NtpServerPort::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NtpServerPort namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -9950,6 +10178,18 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::UTCTime::TypeInfo::DecodableType UTCTime; + Attributes::Granularity::TypeInfo::DecodableType granularity = + static_cast(0); + Attributes::TimeSource::TypeInfo::DecodableType timeSource = + static_cast(0); + Attributes::TrustedTimeNodeId::TypeInfo::DecodableType trustedTimeNodeId; + Attributes::DefaultNtp::TypeInfo::DecodableType defaultNtp; + Attributes::TimeZone::TypeInfo::DecodableType timeZone; + Attributes::DstOffset::TypeInfo::DecodableType dstOffset; + Attributes::LocalTime::TypeInfo::DecodableType localTime; + Attributes::TimeZoneDatabase::TypeInfo::DecodableType timeZoneDatabase = static_cast(0); + Attributes::NtpServerPort::TypeInfo::DecodableType ntpServerPort; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index ad1b44624cee7c..502843e55b69b8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -153,6 +153,9 @@ // Commands for cluster: Ethernet Network Diagnostics #define ZCL_RESET_COUNTS_COMMAND_ID (0x00) +// Commands for cluster: Time Synchronization +#define ZCL_SET_UTC_TIME_COMMAND_ID (0x00) + // Commands for cluster: AdministratorCommissioning #define ZCL_OPEN_COMMISSIONING_WINDOW_COMMAND_ID (0x00) #define ZCL_OPEN_BASIC_COMMISSIONING_WINDOW_COMMAND_ID (0x01) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 02c182f3bf50a0..3c07637a654a29 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -1682,6 +1682,46 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace TimeSynchronization { namespace Attributes { +namespace UTCTime { +static constexpr AttributeId Id = 0x00000000; +} // namespace UTCTime + +namespace Granularity { +static constexpr AttributeId Id = 0x00000001; +} // namespace Granularity + +namespace TimeSource { +static constexpr AttributeId Id = 0x00000002; +} // namespace TimeSource + +namespace TrustedTimeNodeId { +static constexpr AttributeId Id = 0x00000003; +} // namespace TrustedTimeNodeId + +namespace DefaultNtp { +static constexpr AttributeId Id = 0x00000004; +} // namespace DefaultNtp + +namespace TimeZone { +static constexpr AttributeId Id = 0x00000005; +} // namespace TimeZone + +namespace DstOffset { +static constexpr AttributeId Id = 0x00000006; +} // namespace DstOffset + +namespace LocalTime { +static constexpr AttributeId Id = 0x00000007; +} // namespace LocalTime + +namespace TimeZoneDatabase { +static constexpr AttributeId Id = 0x00000008; +} // namespace TimeZoneDatabase + +namespace NtpServerPort { +static constexpr AttributeId Id = 0x00000009; +} // namespace NtpServerPort + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 57d1a772ea1d89..b2575ebb67f9e2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -477,6 +477,16 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace EthernetNetworkDiagnostics +namespace TimeSynchronization { +namespace Commands { + +namespace SetUtcTime { +static constexpr CommandId Id = 0x00000000; +} // namespace SetUtcTime + +} // namespace Commands +} // namespace TimeSynchronization + namespace AdministratorCommissioning { namespace Commands { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a460a482359f20..fc77b7c93e1fc8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -2908,8 +2908,19 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand | Cluster TimeSynchronization | 0x0038 | |------------------------------------------------------------------------------| | Commands: | | +| * SetUtcTime | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * UTCTime | 0x0000 | +| * Granularity | 0x0001 | +| * TimeSource | 0x0002 | +| * TrustedTimeNodeId | 0x0003 | +| * DefaultNtp | 0x0004 | +| * TimeZone | 0x0005 | +| * DstOffset | 0x0006 | +| * LocalTime | 0x0007 | +| * TimeZoneDatabase | 0x0008 | +| * NtpServerPort | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -2919,6 +2930,38 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ +/* + * Command SetUtcTime + */ +class TimeSynchronizationSetUtcTime : public ClusterCommand +{ +public: + TimeSynchronizationSetUtcTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-utc-time", credsIssuerConfig) + { + AddArgument("UtcTime", 0, UINT64_MAX, &mRequest.utcTime); + AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); + AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetUtcTime::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster BridgedDeviceBasic | 0x0039 | |------------------------------------------------------------------------------| @@ -9780,18 +9823,49 @@ void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCom // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-node-id", Attributes::TrustedTimeNodeId::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNtp::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dst-offset", Attributes::DstOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntp-server-port", Attributes::NtpServerPort::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "trusted-time-node-id", 0, UINT64_MAX, Attributes::TrustedTimeNodeId::Id, credsIssuerConfig), // + make_unique>>(Id, "default-ntp", Attributes::DefaultNtp::Id, + credsIssuerConfig), // + make_unique>>( + Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique>>( + Id, "dst-offset", Attributes::DstOffset::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-node-id", Attributes::TrustedTimeNodeId::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNtp::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dst-offset", Attributes::DstOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntp-server-port", Attributes::NtpServerPort::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index de1b57421ea07d..df9712528bc224 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -566,6 +566,37 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::TestCluster::Structs:: { ComplexArgumentParser::Finalize(request.a); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DstOffsetType.offset", "offset", value.isMember("offset"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("DstOffsetType.validStarting", "validStarting", value.isMember("validStarting"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("DstOffsetType.validUntil", "validUntil", value.isMember("validUntil"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "offset"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.offset, value["offset"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "validStarting"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.validStarting, value["validStarting"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "validUntil"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.validUntil, value["validUntil"])); + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::Type & request) +{ + ComplexArgumentParser::Finalize(request.offset); + ComplexArgumentParser::Finalize(request.validStarting); + ComplexArgumentParser::Finalize(request.validUntil); +} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Actions::Structs::EndpointListStruct::Type & request, Json::Value & value) @@ -2109,6 +2140,37 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::SoftwareDiagnostics::S ComplexArgumentParser::Finalize(request.stackFreeMinimum); ComplexArgumentParser::Finalize(request.stackSize); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TimeZoneType.offset", "offset", value.isMember("offset"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TimeZoneType.validAt", "validAt", value.isMember("validAt"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "offset"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.offset, value["offset"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "validAt"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.validAt, value["validAt"])); + + if (value.isMember("name")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + } + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::Type & request) +{ + ComplexArgumentParser::Finalize(request.offset); + ComplexArgumentParser::Finalize(request.validAt); + ComplexArgumentParser::Finalize(request.name); +} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 874f778f58992f..9a1049157f4d91 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -96,6 +96,10 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TestCluster::St Json::Value & value); static void Finalize(chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Actions::Structs::EndpointListStruct::Type & request, Json::Value & value); @@ -241,6 +245,10 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::SoftwareDiagnos Json::Value & value); static void Finalize(chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetrics::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 815f415a033baf..f2031dd1c3b7d6 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -561,6 +561,38 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Offset", indent + 1, value.offset); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Offset'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ValidStarting", indent + 1, value.validStarting); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ValidStarting'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ValidUntil", indent + 1, value.validUntil); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ValidUntil'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::EndpointListStruct::DecodableType & value) { @@ -2263,6 +2295,38 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Offset", indent + 1, value.offset); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Offset'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ValidAt", indent + 1, value.validAt); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ValidAt'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::DecodableType & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 9b079c170522cc..8fd227ef675145 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -57,6 +57,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::DlCredential::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TestCluster::Structs::DoubleNestedStructList::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::EndpointListStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -131,6 +133,8 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::NetworkCommissioning::Structs::ThreadInterfaceScanResult::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetrics::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::DecodableType & value); From 3e1b7c927d734fed2493d26e3bb00cae9e55d014 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Thu, 18 Aug 2022 00:34:31 +0530 Subject: [PATCH 063/115] Sync door lock device type with specs (#21908) * Sync door lock device type with specs * Addressed review comments --- .../zcl/data-model/chip/matter-devices.xml | 39 ++----------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 26c9d6acd3cfee..5c5c1a16fa4224 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1410,45 +1410,12 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + BINDING - - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID - SCENE_NAME_SUPPORT - AddScene - AddSceneResponse - ViewScene - ViewSceneResponse - RemoveScene - RemoveSceneResponse - RemoveAllScenes - RemoveAllScenesResponse - StoreScene - StoreSceneResponse - RecallScene - GetSceneMembership - GetSceneMembershipResponse - - - GROUP_NAME_SUPPORT - AddGroup - AddGroupResponse - ViewGroup - ViewGroupResponse - GetGroupMembership - GetGroupMembershipResponse - RemoveGroup - RemoveGroupResponse - RemoveAllGroups - AddGroupIfIdentifying - - - + + From 866e7eeca094d86cc4338651dfa8ee7f85961558 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Thu, 18 Aug 2022 00:35:43 +0530 Subject: [PATCH 064/115] [ESP32] Fix some incorrect log levels in lighting-app (#21960) * [ESP32] Fix some incorrect log levels in lighting-app * fix typo --- examples/lighting-app/esp32/main/AppTask.cpp | 4 ++-- examples/lighting-app/esp32/main/LEDWidget.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index 5d3718855b8eba..1af833792d0f71 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -152,7 +152,7 @@ void AppTask::ButtonPressCallback() void AppTask::UpdateClusterState() { - ESP_LOGI(TAG, "Writting to OnOff cluster"); + ESP_LOGI(TAG, "Writing to OnOff cluster"); // write the new on/off value EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kLightEndpointId, AppLED.IsTurnedOn()); @@ -161,7 +161,7 @@ void AppTask::UpdateClusterState() ESP_LOGE(TAG, "Updating on/off cluster failed: %x", status); } - ESP_LOGE(TAG, "Writting to Current Level cluster"); + ESP_LOGI(TAG, "Writing to Current Level cluster"); status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kLightEndpointId, AppLED.GetLevel()); if (status != EMBER_ZCL_STATUS_SUCCESS) diff --git a/examples/lighting-app/esp32/main/LEDWidget.cpp b/examples/lighting-app/esp32/main/LEDWidget.cpp index 8eb1aa5114c857..12cbf0f6d3295a 100644 --- a/examples/lighting-app/esp32/main/LEDWidget.cpp +++ b/examples/lighting-app/esp32/main/LEDWidget.cpp @@ -126,7 +126,7 @@ void LEDWidget::DoSet(void) mStrip->refresh(mStrip, 100); } #else - ESP_LOGE(TAG, "DoSet to GPIO number %d", mGPIONum); + ESP_LOGI(TAG, "DoSet to GPIO number %d", mGPIONum); if (mGPIONum < GPIO_NUM_MAX) { ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, brightness); From 96c1b28aeb0458ddf8f9945874af7a67e6b34f46 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Thu, 18 Aug 2022 02:36:11 +0530 Subject: [PATCH 065/115] Sync OTA requestor device type with specs (#21915) --- .../zcl/data-model/chip/matter-devices.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 5c5c1a16fa4224..210e6a60d91362 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -107,22 +107,12 @@ limitations under the License. 0x0103 0x0012 - - IDENTIFY_TIME - IDENTIFY_TYPE - Identify - IdentifyQuery - TriggerEffect - DEVICE_TYPE_LIST SERVER_LIST CLIENT_LIST PARTS_LIST - - BINDING - From c037fc2e185134e139c48f140ed7e15d1363b87d Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Wed, 17 Aug 2022 16:02:52 -0700 Subject: [PATCH 066/115] Drop-off fabric sensitive event when fabric is undefined (#21942) --- src/app/EventLogging.h | 2 ++ .../test-cluster-server/test-cluster-server.cpp | 2 +- .../python/test/test_scripts/cluster_objects.py | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/EventLogging.h b/src/app/EventLogging.h index 9d5d56d362d2d2..b2ce7667ab2364 100644 --- a/src/app/EventLogging.h +++ b/src/app/EventLogging.h @@ -72,6 +72,8 @@ CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aE eventOptions.mPath = path; eventOptions.mPriority = aEventData.GetPriorityLevel(); eventOptions.mFabricIndex = aEventData.GetFabricIndex(); + // this skips logging the event if it's fabric-scoped but no fabric association exists yet. + VerifyOrReturnError(eventOptions.mFabricIndex != kUndefinedFabricIndex, CHIP_NO_ERROR); // // Unlike attributes which have a different 'EncodeForRead' for fabric-scoped structs, diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 320bce3f34ad24..0da23b39b189e1 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -797,7 +797,7 @@ bool emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback( { Commands::TestEmitTestFabricScopedEventResponse::Type responseData; Events::TestFabricScopedEvent::Type event{ commandData.arg1 }; - + event.fabricIndex = commandData.arg1; if (CHIP_NO_ERROR != LogEvent(event, commandPath.mEndpointId, responseData.value)) { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index 71320e7cd92261..deae10c2cd6962 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -331,6 +331,16 @@ async def TriggerAndWaitForEvents(cls, devCtrl, req): await cls._TriggerEvent(devCtrl) await cls._RetryForContent(request=lambda: devCtrl.ReadEvent(nodeid=NODE_ID, events=req), until=lambda res: res != 0) + @classmethod + @base.test_case + async def TestGenerateUndefinedFabricScopedEventRequests(cls, devCtrl): + logger.info("Running TestGenerateUndefinedFabricScopedEventRequests") + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=0)) + res = await devCtrl.ReadEvent(nodeid=NODE_ID, events=[ + (1, Clusters.TestCluster.Events.TestEvent, 0), + ]) + logger.info(f"return result is {res}") + @classmethod @base.test_case async def TestReadEventRequests(cls, devCtrl, expectEventsNum): @@ -557,6 +567,7 @@ async def RunTest(cls, devCtrl): await cls.TestWriteRequest(devCtrl) await cls.TestTimedRequest(devCtrl) await cls.TestTimedRequestTimeout(devCtrl) + await cls.TestGenerateUndefinedFabricScopedEventRequests(devCtrl) except Exception as ex: logger.error( f"Unexpected error occurred when running tests: {ex}") From 1ea6bbedcf3b06f6f6313c21fcb519771e38fefe Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 18 Aug 2022 00:08:12 -0700 Subject: [PATCH 067/115] Allow configure nlfaultinjection via fault-cluster in yaml (#21951) * Define and Enable fault injection cluster * Run codegen --- .../all-clusters-app.matter | 34 ++ .../all-clusters-common/all-clusters-app.zap | 142 ++++++ .../esp32/main/CMakeLists.txt | 2 + .../fault-injection-server.cpp | 96 ++++ .../tests/suites/TestDescriptorCluster.yaml | 1 + src/app/zap-templates/zcl/data-model/all.xml | 1 + .../chip/fault-injection-cluster.xml | 43 ++ .../zcl/zcl-with-test-extensions.json | 1 + src/app/zap-templates/zcl/zcl.json | 1 + src/app/zap_cluster_list.py | 2 + .../data_model/controller-clusters.matter | 27 ++ .../data_model/controller-clusters.zap | 142 ++++++ .../CHIPAttributeTLVValueDecoder.cpp | 112 +++++ .../java/zap-generated/CHIPCallbackTypes.h | 11 + .../CHIPEventTLVValueDecoder.cpp | 10 + .../java/zap-generated/CHIPReadCallbacks.cpp | 213 +++++++++ .../java/zap-generated/CHIPReadCallbacks.h | 90 ++++ .../chip/devicecontroller/ChipClusters.java | 159 +++++++ .../chip/devicecontroller/ChipIdLookup.java | 24 + .../devicecontroller/ClusterInfoMapping.java | 123 +++++ .../devicecontroller/ClusterReadMapping.java | 75 +++ .../devicecontroller/ClusterWriteMapping.java | 2 + .../python/chip/clusters/CHIPClusters.py | 51 +++ .../python/chip/clusters/Objects.py | 139 ++++++ .../MTRAttributeTLVValueDecoder.mm | 109 +++++ .../CHIP/zap-generated/MTRBaseClusters.h | 117 +++++ .../CHIP/zap-generated/MTRBaseClusters.mm | 401 ++++++++++++++++ .../zap-generated/MTRBaseClusters_internal.h | 5 + .../CHIP/zap-generated/MTRCallbackBridge.mm | 169 +++++++ .../MTRCallbackBridge_internal.h | 250 ++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 11 + .../CHIP/zap-generated/MTRClusters.h | 30 ++ .../CHIP/zap-generated/MTRClusters.mm | 94 ++++ .../CHIP/zap-generated/MTRClusters_internal.h | 5 + .../zap-generated/MTRCommandPayloadsObjc.h | 30 ++ .../zap-generated/MTRCommandPayloadsObjc.mm | 42 ++ .../zap-generated/MTREventTLVValueDecoder.mm | 10 + .../zap-generated/IMClusterCommandHandler.cpp | 40 ++ .../PluginApplicationCallbacks.h | 3 +- .../all-clusters-app/zap-generated/access.h | 3 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 239 +++++----- .../zap-generated/gen_config.h | 6 + .../app-common/zap-generated/attribute-id.h | 6 + .../zap-generated/attributes/Accessors.cpp | 68 +++ .../zap-generated/attributes/Accessors.h | 16 + .../app-common/zap-generated/callback.h | 112 +++++ .../zap-generated/callbacks/PluginCallbacks.h | 2 + .../zap-generated/cluster-enums-check.h | 16 + .../app-common/zap-generated/cluster-enums.h | 14 + .../app-common/zap-generated/cluster-id.h | 3 + .../zap-generated/cluster-objects.cpp | 97 ++++ .../zap-generated/cluster-objects.h | 109 +++++ .../app-common/zap-generated/command-id.h | 3 + .../app-common/zap-generated/ids/Attributes.h | 26 ++ .../app-common/zap-generated/ids/Clusters.h | 3 + .../app-common/zap-generated/ids/Commands.h | 10 + .../app-common/zap-generated/print-cluster.h | 9 +- .../zap-generated/cluster/Commands.h | 89 ++++ .../cluster/logging/DataModelLogger.cpp | 31 ++ .../chip-tool/zap-generated/test/Commands.h | 4 +- .../zap-generated/CHIPClientCallbacks.h | 6 + .../zap-generated/CHIPClusters.h | 9 + .../PluginApplicationCallbacks.h | 3 +- .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 15 +- .../zap-generated/gen_config.h | 5 + .../zap-generated/cluster/Commands.h | 428 ++++++++++++++++++ .../zap-generated/test/Commands.h | 3 +- 69 files changed, 4051 insertions(+), 117 deletions(-) create mode 100644 src/app/clusters/fault-injection-server/fault-injection-server.cpp create mode 100644 src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml 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 b5b01cbbe77edd..ba13b42667e261 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 @@ -3827,6 +3827,32 @@ server cluster TestCluster = 4294048773 { command TestEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventRequestRequest): TestEmitTestFabricScopedEventResponse = 21; } +server cluster FaultInjection = 4294048774 { + enum FaultType : ENUM8 { + kUnspecified = 0; + kSystemFault = 1; + kInetFault = 2; + kChipFault = 3; + kCertFault = 4; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct FailAtFaultRequest { + FaultType type = 0; + INT32U id = 1; + INT32U numCallsToSkip = 2; + INT32U numCallsToFail = 3; + BOOLEAN takeMutex = 4; + } + + command access(invoke: manage) FailAtFault(FailAtFaultRequest): DefaultSuccess = 0; +} + endpoint 0 { device type rootdevice = 22; binding cluster OtaSoftwareUpdateProvider; @@ -4145,6 +4171,14 @@ endpoint 0 { ram attribute featureMap; ram attribute clusterRevision default = 3; } + + server cluster FaultInjection { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type onofflight = 256; 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 89133045cc89c6..baefdc4cf4a07c 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 @@ -8445,6 +8445,148 @@ "reportableChange": 0 } ] + }, + { + "name": "Fault Injection", + "code": 4294048774, + "mfgCode": null, + "define": "FAULT_INJECTION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "FailAtFault", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fault Injection", + "code": 4294048774, + "mfgCode": null, + "define": "FAULT_INJECTION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] }, diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 7c33a523e965bb..f8ea390ec05a99 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -23,6 +23,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlfaultinjection/repo/include" ) set(SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}" @@ -41,6 +42,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-basic-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/test-cluster-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fault-injection-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fan-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" diff --git a/src/app/clusters/fault-injection-server/fault-injection-server.cpp b/src/app/clusters/fault-injection-server/fault-injection-server.cpp new file mode 100644 index 00000000000000..83e1e678f8e8e2 --- /dev/null +++ b/src/app/clusters/fault-injection-server/fault-injection-server.cpp @@ -0,0 +1,96 @@ +/** + * + * Copyright (c) 2022 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 "app/server/Server.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#if CHIP_WITH_NLFAULTINJECTION +#include +#include +#include +#endif + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::FaultInjection; +using chip::Protocols::InteractionModel::Status; + +bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::FailAtFault::DecodableType & commandData) +{ + if (commandPath.mClusterId != Clusters::FaultInjection::Id) + { + // We shouldn't have been called at all. + commandObj->AddStatus(commandPath, Status::UnsupportedCluster); + return true; + } + +#if CHIP_WITH_NLFAULTINJECTION + Status returnStatus = Status::Success; + nl::FaultInjection::Manager * faultInjectionMgr = nullptr; + + switch (commandData.type) + { + case FaultType::kSystemFault: + faultInjectionMgr = &chip::System::FaultInjection::GetManager(); + break; + case FaultType::kInetFault: + faultInjectionMgr = &chip::Inet::FaultInjection::GetManager(); + break; + case FaultType::kChipFault: + faultInjectionMgr = &chip::FaultInjection::GetManager(); + break; + default: + ChipLogError(Zcl, "FaultInjection: Unsupported Fault type received"); + returnStatus = Status::InvalidCommand; + break; + } + + if (faultInjectionMgr != nullptr) + { + ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %d and Id: %d to be triggered deterministically", + static_cast(commandData.type), commandData.id); + int32_t err = faultInjectionMgr->FailAtFault(commandData.id, commandData.numCallsToSkip, commandData.numCallsToFail, + commandData.takeMutex); + + if (err != 0) + { + ChipLogError(Zcl, "FaultInjection: Pass invalid inputs to FailAtFault"); + returnStatus = Status::InvalidCommand; + } + } + else + { + ChipLogError(Zcl, "FaultInjection: Failed to get Fault Injection manager"); + returnStatus = Status::Failure; + } +#else + Status returnStatus = Status::UnsupportedCommand; +#endif // CHIP_WITH_NLFAULTINJECTION + + commandObj->AddStatus(commandPath, returnStatus); + return true; +} + +void MatterFaultInjectionPluginServerInitCallback() {} diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index c8bf01e3ab3d00..543010309e8372 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -65,6 +65,7 @@ tests: 0x0040, # Fixed Label 0x0041, # User Label 0x0405, # Relative Humidity Measurement (why on EP0?) + 0xFFF1FC06, # Fault Injection ] - label: "Read attribute Client list" diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index ac3fe6e5aa22d1..c050af49dcafa5 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -19,6 +19,7 @@ + diff --git a/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml new file mode 100644 index 00000000000000..f8c764d8e139c6 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + CHIP + Fault Injection + 0xFFF1FC06 + FAULT_INJECTION_CLUSTER + The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). + + Configure a fault to be triggered deterministically + + + + + + + + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index ef8507106cdd5f..971824a0081df5 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -31,6 +31,7 @@ "diagnostic-logs-cluster.xml", "door-lock-cluster.xml", "ethernet-network-diagnostics-cluster.xml", + "fault-injection-cluster.xml", "fixed-label-cluster.xml", "flow-measurement-cluster.xml", "general-commissioning-cluster.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index a5478bfb9e2057..da4c1d78bd83c2 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -26,6 +26,7 @@ "diagnostic-logs-cluster.xml", "door-lock-cluster.xml", "ethernet-network-diagnostics-cluster.xml", + "fault-injection-cluster.xml", "fixed-label-cluster.xml", "flow-measurement-cluster.xml", "general-commissioning-cluster.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 9dd6cf3182469f..bf61468e3fcc2b 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -34,6 +34,7 @@ 'DOOR_LOCK_CLUSTER': ['door-lock-server'], 'ELECTRICAL_MEASUREMENT_CLUSTER': [], 'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': ['ethernet-network-diagnostics-server'], + 'FAULT_INJECTION_CLUSTER': ['fault-injection-server'], 'FAN_CONTROL_CLUSTER': ['fan-control-server'], 'FIXED_LABEL_CLUSTER': ['fixed-label-server'], 'FLOW_MEASUREMENT_CLUSTER': [], @@ -118,6 +119,7 @@ 'DOOR_LOCK_CLUSTER': [], 'ELECTRICAL_MEASUREMENT_CLUSTER': [], 'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': [], + 'FAULT_INJECTION_CLUSTER': [], 'FAN_CONTROL_CLUSTER': [], 'FIXED_LABEL_CLUSTER': [], 'FLOW_MEASUREMENT_CLUSTER': [], diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index ddb54a3525ae21..f8a88c7b66bb5f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4387,6 +4387,32 @@ client cluster TestCluster = 4294048773 { command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; } +client cluster FaultInjection = 4294048774 { + enum FaultType : ENUM8 { + kUnspecified = 0; + kSystemFault = 1; + kInetFault = 2; + kChipFault = 3; + kCertFault = 4; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct FailAtFaultRequest { + FaultType type = 0; + INT32U id = 1; + INT32U numCallsToSkip = 2; + INT32U numCallsToFail = 3; + BOOLEAN takeMutex = 4; + } + + command access(invoke: manage) FailAtFault(FailAtFaultRequest): DefaultSuccess = 0; +} + endpoint 1 { device type rootdevice = 22; binding cluster Identify; @@ -4454,6 +4480,7 @@ endpoint 1 { binding cluster AccountLogin; binding cluster ElectricalMeasurement; binding cluster TestCluster; + binding cluster FaultInjection; } diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 584ca5177c3405..88b9b7cc085330 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -19401,6 +19401,148 @@ "reportableChange": 0 } ] + }, + { + "name": "Fault Injection", + "code": 4294048774, + "mfgCode": null, + "define": "FAULT_INJECTION_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "FailAtFault", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fault Injection", + "code": 4294048774, + "mfgCode": null, + "define": "FAULT_INJECTION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 336a61be05a3ff..fe0eb5ce4cd193 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -19478,6 +19478,118 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } + case app::Clusters::FaultInjection::Id: { + using namespace app::Clusters::FaultInjection; + switch (aPath.mAttributeId) + { + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index be01149ef4bc17..cf42bf39d28966 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -1963,3 +1963,14 @@ typedef void (*CHIPTestClusterClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::TestCluster::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPTestClusterClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::TestCluster::Attributes::ClusterRevision::TypeInfo::DecodableArgType); + +typedef void (*CHIPFaultInjectionClusterGeneratedCommandListAttributeCallbackType)( + void *, const chip::app::Clusters::FaultInjection::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); +typedef void (*CHIPFaultInjectionClusterAcceptedCommandListAttributeCallbackType)( + void *, const chip::app::Clusters::FaultInjection::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); +typedef void (*CHIPFaultInjectionClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::FaultInjection::Attributes::AttributeList::TypeInfo::DecodableType &); +typedef void (*CHIPFaultInjectionClusterFeatureMapAttributeCallbackType)( + void *, chip::app::Clusters::FaultInjection::Attributes::FeatureMap::TypeInfo::DecodableArgType); +typedef void (*CHIPFaultInjectionClusterClusterRevisionAttributeCallbackType)( + void *, chip::app::Clusters::FaultInjection::Attributes::ClusterRevision::TypeInfo::DecodableArgType); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index fcdb5b536f65a1..411028f4237550 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -3495,6 +3495,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::FaultInjection::Id: { + using namespace app::Clusters::FaultInjection; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 68e371fabf727c..2dab6e13780b9d 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -29193,3 +29193,216 @@ void CHIPTestClusterAttributeListAttributeCallback::CallbackFn(void * context, env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } + +CHIPFaultInjectionGeneratedCommandListAttributeCallback::CHIPFaultInjectionGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPFaultInjectionGeneratedCommandListAttributeCallback::~CHIPFaultInjectionGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPFaultInjectionGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPFaultInjectionAcceptedCommandListAttributeCallback::CHIPFaultInjectionAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPFaultInjectionAcceptedCommandListAttributeCallback::~CHIPFaultInjectionAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPFaultInjectionAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPFaultInjectionAttributeListAttributeCallback::CHIPFaultInjectionAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPFaultInjectionAttributeListAttributeCallback::~CHIPFaultInjectionAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPFaultInjectionAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index b1951ce5d661c3..f5dc7866c0e0c9 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -12045,3 +12045,93 @@ class CHIPTestClusterAttributeListAttributeCallback jobject javaCallbackRef; bool keepAlive; }; + +class CHIPFaultInjectionGeneratedCommandListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFaultInjectionGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFaultInjectionGeneratedCommandListAttributeCallback(); + + static void maybeDestroy(CHIPFaultInjectionGeneratedCommandListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPFaultInjectionAcceptedCommandListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFaultInjectionAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFaultInjectionAcceptedCommandListAttributeCallback(); + + static void maybeDestroy(CHIPFaultInjectionAcceptedCommandListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPFaultInjectionAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFaultInjectionAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFaultInjectionAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPFaultInjectionAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 1aa9a1d2574557..73c28214ab6173 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -25168,4 +25168,163 @@ private native void readClusterRevisionAttribute( private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } + + public static class FaultInjectionCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 4294048774L; + + public FaultInjectionCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void failAtFault( + DefaultClusterCallback callback, + Integer type, + Long id, + Long numCallsToSkip, + Long numCallsToFail, + Boolean takeMutex) { + failAtFault( + chipClusterPtr, callback, type, id, numCallsToSkip, numCallsToFail, takeMutex, null); + } + + public void failAtFault( + DefaultClusterCallback callback, + Integer type, + Long id, + Long numCallsToSkip, + Long numCallsToFail, + Boolean takeMutex, + int timedInvokeTimeoutMs) { + failAtFault( + chipClusterPtr, + callback, + type, + id, + numCallsToSkip, + numCallsToFail, + takeMutex, + timedInvokeTimeoutMs); + } + + private native void failAtFault( + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer type, + Long id, + Long numCallsToSkip, + Long numCallsToFail, + Boolean takeMutex, + @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface AcceptedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute( + long chipClusterPtr, GeneratedCommandListAttributeCallback callback); + + private native void subscribeGeneratedCommandListAttribute( + long chipClusterPtr, + GeneratedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readAcceptedCommandListAttribute( + long chipClusterPtr, AcceptedCommandListAttributeCallback callback); + + private native void subscribeAcceptedCommandListAttribute( + long chipClusterPtr, + AcceptedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index fddd0ee7c03216..c61f98c598aa61 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -220,6 +220,9 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 4294048773L) { return "TestCluster"; } + if (clusterId == 4294048774L) { + return "FaultInjection"; + } return ""; } @@ -3087,6 +3090,24 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 4294048774L) { + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } return ""; } @@ -3461,6 +3482,9 @@ public static String eventIdToName(long clusterId, long eventId) { } return ""; } + if (clusterId == 4294048774L) { + return ""; + } return ""; } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 955ae30c67da52..365bee708efccb 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -7131,6 +7131,78 @@ public void onError(Exception ex) { } } + public static class DelegatedFaultInjectionClusterGeneratedCommandListAttributeCallback + implements ChipClusters.FaultInjectionCluster.GeneratedCommandListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterAcceptedCommandListAttributeCallback + implements ChipClusters.FaultInjectionCluster.AcceptedCommandListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterAttributeListAttributeCallback + implements ChipClusters.FaultInjectionCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public Map getClusterMap() { Map clusterMap = initializeClusterMap(); Map> commandMap = getCommandMap(); @@ -7470,6 +7542,11 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.TestClusterCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("testCluster", testClusterClusterInfo); + ClusterInfo faultInjectionClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.FaultInjectionCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("faultInjection", faultInjectionClusterInfo); return clusterMap; } @@ -7562,6 +7639,7 @@ public void combineCommand( destination.get("accountLogin").combineCommands(source.get("accountLogin")); destination.get("electricalMeasurement").combineCommands(source.get("electricalMeasurement")); destination.get("testCluster").combineCommands(source.get("testCluster")); + destination.get("faultInjection").combineCommands(source.get("faultInjection")); } @SuppressWarnings("unchecked") @@ -12001,6 +12079,51 @@ public Map> getCommandMap() { testClusterClusterInteractionInfoMap.put( "testEmitTestEventRequest", testClustertestEmitTestEventRequestInteractionInfo); commandMap.put("testCluster", testClusterClusterInteractionInfoMap); + Map faultInjectionClusterInteractionInfoMap = new LinkedHashMap<>(); + Map faultInjectionfailAtFaultCommandParams = + new LinkedHashMap(); + CommandParameterInfo faultInjectionfailAtFaulttypeCommandParameterInfo = + new CommandParameterInfo("type", Integer.class, Integer.class); + faultInjectionfailAtFaultCommandParams.put( + "type", faultInjectionfailAtFaulttypeCommandParameterInfo); + + CommandParameterInfo faultInjectionfailAtFaultidCommandParameterInfo = + new CommandParameterInfo("id", Long.class, Long.class); + faultInjectionfailAtFaultCommandParams.put( + "id", faultInjectionfailAtFaultidCommandParameterInfo); + + CommandParameterInfo faultInjectionfailAtFaultnumCallsToSkipCommandParameterInfo = + new CommandParameterInfo("numCallsToSkip", Long.class, Long.class); + faultInjectionfailAtFaultCommandParams.put( + "numCallsToSkip", faultInjectionfailAtFaultnumCallsToSkipCommandParameterInfo); + + CommandParameterInfo faultInjectionfailAtFaultnumCallsToFailCommandParameterInfo = + new CommandParameterInfo("numCallsToFail", Long.class, Long.class); + faultInjectionfailAtFaultCommandParams.put( + "numCallsToFail", faultInjectionfailAtFaultnumCallsToFailCommandParameterInfo); + + CommandParameterInfo faultInjectionfailAtFaulttakeMutexCommandParameterInfo = + new CommandParameterInfo("takeMutex", Boolean.class, Boolean.class); + faultInjectionfailAtFaultCommandParams.put( + "takeMutex", faultInjectionfailAtFaulttakeMutexCommandParameterInfo); + + InteractionInfo faultInjectionfailAtFaultInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .failAtFault( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("type"), + (Long) commandArguments.get("id"), + (Long) commandArguments.get("numCallsToSkip"), + (Long) commandArguments.get("numCallsToFail"), + (Boolean) commandArguments.get("takeMutex")); + }, + () -> new DelegatedDefaultClusterCallback(), + faultInjectionfailAtFaultCommandParams); + faultInjectionClusterInteractionInfoMap.put( + "failAtFault", faultInjectionfailAtFaultInteractionInfo); + commandMap.put("faultInjection", faultInjectionClusterInteractionInfoMap); return commandMap; } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index b56a5d2d0e01ef..bb881021b50feb 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -12422,6 +12422,81 @@ public Map> getReadAttributeMap() { readTestClusterInteractionInfo.put( "readClusterRevisionAttribute", readTestClusterClusterRevisionAttributeInteractionInfo); readAttributeMap.put("testCluster", readTestClusterInteractionInfo); + Map readFaultInjectionInteractionInfo = new LinkedHashMap<>(); + Map readFaultInjectionGeneratedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readFaultInjectionGeneratedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .readGeneratedCommandListAttribute( + (ChipClusters.FaultInjectionCluster.GeneratedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedFaultInjectionClusterGeneratedCommandListAttributeCallback(), + readFaultInjectionGeneratedCommandListCommandParams); + readFaultInjectionInteractionInfo.put( + "readGeneratedCommandListAttribute", + readFaultInjectionGeneratedCommandListAttributeInteractionInfo); + Map readFaultInjectionAcceptedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readFaultInjectionAcceptedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .readAcceptedCommandListAttribute( + (ChipClusters.FaultInjectionCluster.AcceptedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedFaultInjectionClusterAcceptedCommandListAttributeCallback(), + readFaultInjectionAcceptedCommandListCommandParams); + readFaultInjectionInteractionInfo.put( + "readAcceptedCommandListAttribute", + readFaultInjectionAcceptedCommandListAttributeInteractionInfo); + Map readFaultInjectionAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readFaultInjectionAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.FaultInjectionCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedFaultInjectionClusterAttributeListAttributeCallback(), + readFaultInjectionAttributeListCommandParams); + readFaultInjectionInteractionInfo.put( + "readAttributeListAttribute", readFaultInjectionAttributeListAttributeInteractionInfo); + Map readFaultInjectionFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readFaultInjectionFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readFaultInjectionFeatureMapCommandParams); + readFaultInjectionInteractionInfo.put( + "readFeatureMapAttribute", readFaultInjectionFeatureMapAttributeInteractionInfo); + Map readFaultInjectionClusterRevisionCommandParams = + new LinkedHashMap(); + InteractionInfo readFaultInjectionClusterRevisionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FaultInjectionCluster) cluster) + .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readFaultInjectionClusterRevisionCommandParams); + readFaultInjectionInteractionInfo.put( + "readClusterRevisionAttribute", readFaultInjectionClusterRevisionAttributeInteractionInfo); + readAttributeMap.put("faultInjection", readFaultInjectionInteractionInfo); return readAttributeMap; } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 95414b21f13d0e..7a2eb30d7bc107 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -2837,6 +2837,8 @@ public Map> getWriteAttributeMap() { "writeNullableRangeRestrictedInt16sAttribute", writeTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo); writeAttributeMap.put("testCluster", writeTestClusterInteractionInfo); + Map writeFaultInjectionInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("faultInjection", writeFaultInjectionInteractionInfo); return writeAttributeMap; } } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 4513a38a25ae45..474e44c941c097 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7502,6 +7502,55 @@ class ChipClusters: }, }, } + _FAULT_INJECTION_CLUSTER_INFO = { + "clusterName": "FaultInjection", + "clusterId": 0xFFF1FC06, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "FailAtFault", + "args": { + "type": "int", + "id": "int", + "numCallsToSkip": "int", + "numCallsToFail": "int", + "takeMutex": "bool", + }, + }, + }, + "attributes": { + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _CLUSTER_ID_DICT = { 0x00000003: _IDENTIFY_CLUSTER_INFO, @@ -7569,6 +7618,7 @@ class ChipClusters: 0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO, 0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, 0xFFF1FC05: _TEST_CLUSTER_CLUSTER_INFO, + 0xFFF1FC06: _FAULT_INJECTION_CLUSTER_INFO, } _CLUSTER_NAME_DICT = { @@ -7637,6 +7687,7 @@ class ChipClusters: "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO, "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, "TestCluster": _TEST_CLUSTER_CLUSTER_INFO, + "FaultInjection": _FAULT_INJECTION_CLUSTER_INFO, } def __init__(self, chipstack): diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b13159384185e8..4397258fed9dcb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -28985,3 +28985,142 @@ def descriptor(cls) -> ClusterObjectDescriptor: fabricIndex: 'uint' = 0 +@dataclass +class FaultInjection(Cluster): + id: typing.ClassVar[int] = 0xFFF1FC06 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class FaultType(IntEnum): + kUnspecified = 0x00 + kSystemFault = 0x01 + kInetFault = 0x02 + kChipFault = 0x03 + kCertFault = 0x04 + + + + class Commands: + @dataclass + class FailAtFault(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0xFFF1FC06 + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=FaultInjection.Enums.FaultType), + ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="numCallsToSkip", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="numCallsToFail", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="takeMutex", Tag=4, Type=bool), + ]) + + type: 'FaultInjection.Enums.FaultType' = 0 + id: 'uint' = 0 + numCallsToSkip: 'uint' = 0 + numCallsToFail: 'uint' = 0 + takeMutex: 'bool' = False + + + class Attributes: + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC06 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC06 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC06 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC06 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC06 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + + diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 3bd3d70a8e3de3..671a368001c51d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -17553,6 +17553,115 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } + case Clusters::FaultInjection::Id: { + using namespace Clusters::FaultInjection; + switch (aPath.mAttributeId) { + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } default: { *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index fcd359ef6e62ad..43e1ddc4bf0516 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -21986,6 +21986,115 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Fault Injection + * + */ +@interface MTRBaseClusterFaultInjection : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * MTRSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { MTRIdentifyEffectIdentifierBlink = 0x00, MTRIdentifyEffectIdentifierBreathe = 0x01, @@ -23413,4 +23522,12 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { MTRTestClusterSimpleBitmapValueC = 0x4, }; +typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { + MTRFaultInjectionFaultTypeUnspecified = 0x00, + MTRFaultInjectionFaultTypeSystemFault = 0x01, + MTRFaultInjectionFaultTypeInetFault = 0x02, + MTRFaultInjectionFaultTypeChipFault = 0x03, + MTRFaultInjectionFaultTypeCertFault = 0x04, +}; + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 2802b6e31b55c2..e043a252d51acc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -93568,4 +93568,405 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end +@implementation MTRBaseClusterFaultInjection + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = endpoint; + } + return self; +} + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + FaultInjection::Commands::FailAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.numCallsToSkip = params.numCallsToSkip.unsignedIntValue; + request.numCallsToFail = params.numCallsToFail.unsignedIntValue; + request.takeMutex = params.takeMutex.boolValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + new MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + new MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + new MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRFaultInjectionAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h index 359f771f5b8910..9c3afd19a23a4d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_internal.h @@ -348,3 +348,8 @@ @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end + +@interface MTRBaseClusterFaultInjection () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 4c82f32c8365f6..70a58543255418 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -11563,6 +11563,123 @@ } } +void MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRFaultInjectionAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void MTRGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) { @@ -19339,3 +19456,55 @@ self->mEstablishedHandler = nil; } } + +void MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FaultInjection::FaultType value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 36ef0831588eb6..c4f9a9ea72702e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -532,6 +532,9 @@ typedef void (*NullableApplicationBasicClusterApplicationStatusEnumAttributeCall typedef void (*TestClusterClusterSimpleEnumAttributeCallback)(void *, chip::app::Clusters::TestCluster::SimpleEnum); typedef void (*NullableTestClusterClusterSimpleEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*FaultInjectionClusterFaultTypeAttributeCallback)(void *, chip::app::Clusters::FaultInjection::FaultType); +typedef void (*NullableFaultInjectionClusterFaultTypeAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -1109,6 +1112,12 @@ typedef void (*TestClusterAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { @@ -15142,6 +15151,150 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, + OnSuccessFn, keepAlive){}; + + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, + OnSuccessFn, keepAlive){}; + + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFaultInjectionAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + MTRFaultInjectionAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, + keepAlive){}; + + MTRFaultInjectionAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionAttributeListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge { public: @@ -27534,3 +27687,100 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge private: SubscriptionEstablishedHandler mEstablishedHandler; }; + +class MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, OnSuccessFn, + keepAlive){}; + + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::FaultInjection::FaultType value); +}; + +class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge +{ +public: + MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRLocalActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, chip::NodeId nodeID, + MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, bool keepAlive = false) : + MTRCallbackBridge(queue, nodeID, controller, handler, action, + OnSuccessFn, keepAlive){}; + + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, MTRBaseDevice * device, + ResponseHandler handler, MTRActionBlock action, + bool keepAlive = false) : + MTRCallbackBridge(queue, device, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge + : public MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge +{ +public: + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index e7ee53846f750a..dbcc34b4f7e45f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -93,6 +93,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterAccountLoginID = 0x0000050E, MTRClusterElectricalMeasurementID = 0x00000B04, MTRClusterTestClusterID = 0xFFF1FC05, + MTRClusterFaultInjectionID = 0xFFF1FC06, }; #pragma mark - Attributes IDs @@ -1366,6 +1367,13 @@ typedef NS_ENUM(uint32_t, MTRClusterAttributeIDType) { MTRClusterTestClusterAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, MTRClusterTestClusterAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, + // Cluster FaultInjection attributes + MTRClusterFaultInjectionAttributeGeneratedCommandListID = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterFaultInjectionAttributeAcceptedCommandListID = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterFaultInjectionAttributeAttributeListID = MTRClusterGlobalAttributeAttributeListID, + MTRClusterFaultInjectionAttributeFeatureMapID = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterFaultInjectionAttributeClusterRevisionID = MTRClusterGlobalAttributeClusterRevisionID, + }; #pragma mark - Commands IDs @@ -1692,6 +1700,9 @@ typedef NS_ENUM(uint32_t, MTRClusterCommandIDType) { MTRClusterTestClusterCommandTestEmitTestEventRequestID = 0x00000014, MTRClusterTestClusterCommandTestEmitTestFabricScopedEventRequestID = 0x00000015, + // Cluster FaultInjection commands + MTRClusterFaultInjectionCommandFailAtFaultID = 0x00000000, + }; #pragma mark - Events IDs diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index ef8bc064a5524f..38664c17e71687 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -5283,4 +5283,34 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Fault Injection + * + */ +@interface MTRClusterFaultInjection : MTRCluster + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(StatusCompletion)completionHandler; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 9172a6d3b320c2..26f39666023990 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -22036,4 +22036,98 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(StatusCompletion)completionHandler +{ + // Make a copy of params before we go async. + params = [params copy]; + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, baseDevice, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + FaultInjection::Commands::FailAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.numCallsToSkip = params.numCallsToSkip.unsignedIntValue; + request.numCallsToFail = params.numCallsToFail.unsignedIntValue; + request.takeMutex = params.takeMutex.boolValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); + + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterFaultInjectionID) + attributeID:@(MTRClusterFaultInjectionAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterFaultInjectionID) + attributeID:@(MTRClusterFaultInjectionAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterFaultInjectionID) + attributeID:@(MTRClusterFaultInjectionAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterFaultInjectionID) + attributeID:@(MTRClusterFaultInjectionAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterFaultInjectionID) + attributeID:@(MTRClusterFaultInjectionAttributeClusterRevisionID) + params:params]; +} + +@end + // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h index 3bc39dea076933..7db0939f5c1565 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_internal.h @@ -349,3 +349,8 @@ @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end + +@interface MTRClusterFaultInjection () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index d3043ec6452991..bfdc4a5aecdfb3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -6045,6 +6045,36 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRFaultInjectionClusterFailAtFaultParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull type; + +@property (nonatomic, copy) NSNumber * _Nonnull id; + +@property (nonatomic, copy) NSNumber * _Nonnull numCallsToSkip; + +@property (nonatomic, copy) NSNumber * _Nonnull numCallsToFail; + +@property (nonatomic, copy) NSNumber * _Nonnull takeMutex; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; - (id)copyWithZone:(nullable NSZone *)zone; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 6a7c94a88aa7a4..004f2f29070299 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -8115,6 +8115,48 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRFaultInjectionClusterFailAtFaultParams +- (instancetype)init +{ + if (self = [super init]) { + + _type = @(0); + + _id = @(0); + + _numCallsToSkip = @(0); + + _numCallsToFail = @(0); + + _takeMutex = @(0); + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRFaultInjectionClusterFailAtFaultParams alloc] init]; + + other.type = self.type; + other.id = self.id; + other.numCallsToSkip = self.numCallsToSkip; + other.numCallsToFail = self.numCallsToFail; + other.takeMutex = self.takeMutex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: type:%@; id:%@; numCallsToSkip:%@; numCallsToFail:%@; takeMutex:%@; >", + NSStringFromClass([self class]), _type, _id, _numCallsToSkip, _numCallsToFail, _takeMutex]; + return descriptionString; +} + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 6ee6ada8dabb0f..92ccbc1751f4d9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -2246,6 +2246,16 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::FaultInjection::Id: { + using namespace Clusters::FaultInjection; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } default: { *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 9f7a13348a8157..411c19ff34c510 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -573,6 +573,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace EthernetNetworkDiagnostics +namespace FaultInjection { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::FailAtFault::Id: { + Commands::FailAtFault::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfFaultInjectionClusterFailAtFaultCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace FaultInjection + namespace GeneralCommissioning { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -2029,6 +2066,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::EthernetNetworkDiagnostics::Id: Clusters::EthernetNetworkDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::FaultInjection::Id: + Clusters::FaultInjection::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::GeneralCommissioning::Id: Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 91b13ebc3ec0dc..841c63fdb69b0e 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -84,4 +84,5 @@ MatterApplicationBasicPluginServerInitCallback(); \ MatterAccountLoginPluginServerInitCallback(); \ MatterElectricalMeasurementPluginServerInitCallback(); \ - MatterTestClusterPluginServerInitCallback(); + MatterTestClusterPluginServerInitCallback(); \ + MatterFaultInjectionPluginServerInitCallback(); diff --git a/zzz_generated/all-clusters-app/zap-generated/access.h b/zzz_generated/all-clusters-app/zap-generated/access.h index 14751b3beb7416..5c5f1df7633748 100644 --- a/zzz_generated/all-clusters-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-app/zap-generated/access.h @@ -430,6 +430,7 @@ 257, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + 4294048774, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ } // Parallel array data (cluster, *command*, privilege) for invoke command @@ -480,6 +481,7 @@ 34, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ 36, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 38, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + 0, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ } // Parallel array data (cluster, command, *privilege*) for invoke command @@ -530,6 +532,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index ef520e0bd1b5bf..79eb5a24243274 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -92,6 +92,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_FAN_CONTROL_CLUSTER_ID: emberAfFanControlClusterInitCallback(endpoint); break; + case ZCL_FAULT_INJECTION_CLUSTER_ID: + emberAfFaultInjectionClusterInitCallback(endpoint); + break; case ZCL_FIXED_LABEL_CLUSTER_ID: emberAfFixedLabelClusterInitCallback(endpoint); break; @@ -329,6 +332,11 @@ void __attribute__((weak)) emberAfFanControlClusterInitCallback(EndpointId endpo // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfFaultInjectionClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 397d0a242bfb45..2ec296db48ed69 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -369,7 +369,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 715 +#define GENERATED_ATTRIBUTE_COUNT 717 #define GENERATED_ATTRIBUTES \ { \ \ @@ -761,6 +761,10 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Fault Injection (server) */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ @@ -1668,13 +1672,17 @@ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Identify (server) */\ + /* Endpoint: 0, Cluster: Fault Injection (server) */\ /* AcceptedCommandList (index=76) */ \ + 0x00000000 /* FailAtFault */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Identify (server) */\ + /* AcceptedCommandList (index=78) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=79) */ \ + /* AcceptedCommandList (index=81) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1682,14 +1690,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=86)*/ \ + /* GeneratedCommandList (index=88)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=91) */ \ + /* AcceptedCommandList (index=93) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1698,7 +1706,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=99)*/ \ + /* GeneratedCommandList (index=101)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1707,7 +1715,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=106) */ \ + /* AcceptedCommandList (index=108) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1716,7 +1724,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=113) */ \ + /* AcceptedCommandList (index=115) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1727,11 +1735,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=122) */ \ + /* AcceptedCommandList (index=124) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=124) */ \ + /* AcceptedCommandList (index=126) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1747,7 +1755,7 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=139)*/ \ + /* GeneratedCommandList (index=141)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ @@ -1755,7 +1763,7 @@ 0x00000025 /* GetCredentialStatusResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=145) */ \ + /* AcceptedCommandList (index=147) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1765,16 +1773,16 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=153) */ \ + /* AcceptedCommandList (index=155) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=156) */ \ + /* AcceptedCommandList (index=158) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=158) */ \ + /* AcceptedCommandList (index=160) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1796,32 +1804,32 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=178) */ \ + /* AcceptedCommandList (index=180) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=180)*/ \ + /* GeneratedCommandList (index=182)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=182) */ \ + /* AcceptedCommandList (index=184) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=187) */ \ + /* AcceptedCommandList (index=189) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=189) */ \ + /* AcceptedCommandList (index=191) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=191)*/ \ + /* GeneratedCommandList (index=193)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* AcceptedCommandList (index=193) */ \ + /* AcceptedCommandList (index=195) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1841,7 +1849,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=212)*/ \ + /* GeneratedCommandList (index=214)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1853,7 +1861,7 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=222) */ \ + /* AcceptedCommandList (index=224) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1861,20 +1869,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=229)*/ \ + /* GeneratedCommandList (index=231)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=234) */ \ + /* AcceptedCommandList (index=236) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=238) */ \ + /* AcceptedCommandList (index=240) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1882,7 +1890,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=245)*/ \ + /* GeneratedCommandList (index=247)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -1892,7 +1900,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 77 +#define GENERATED_CLUSTER_COUNT 78 // clang-format off #define GENERATED_CLUSTERS { \ @@ -2193,54 +2201,65 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 0, Cluster: Fault Injection (server) */ \ + .clusterId = 0xFFF1FC06, \ + .attributes = ZAP_ATTRIBUTE_INDEX(231), \ + .attributeCount = 2, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(231), \ + .attributes = ZAP_ATTRIBUTE_INDEX(233), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(235), \ + .attributes = ZAP_ATTRIBUTE_INDEX(237), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 88 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(238), \ + .attributes = ZAP_ATTRIBUTE_INDEX(240), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 99 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 93 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(245), \ + .attributes = ZAP_ATTRIBUTE_INDEX(247), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 106 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 108 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(252), \ + .attributes = ZAP_ATTRIBUTE_INDEX(254), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2251,18 +2270,18 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(256), \ + .attributes = ZAP_ATTRIBUTE_INDEX(258), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(272), \ + .attributes = ZAP_ATTRIBUTE_INDEX(274), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2273,7 +2292,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(279), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2284,7 +2303,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(283), \ + .attributes = ZAP_ATTRIBUTE_INDEX(285), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2295,7 +2314,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(286), \ + .attributes = ZAP_ATTRIBUTE_INDEX(288), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2306,7 +2325,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(291), \ + .attributes = ZAP_ATTRIBUTE_INDEX(293), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2317,7 +2336,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(299), \ + .attributes = ZAP_ATTRIBUTE_INDEX(301), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2328,7 +2347,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(304), \ + .attributes = ZAP_ATTRIBUTE_INDEX(306), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2339,7 +2358,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(307), \ + .attributes = ZAP_ATTRIBUTE_INDEX(309), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2350,7 +2369,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(310), \ + .attributes = ZAP_ATTRIBUTE_INDEX(312), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2361,51 +2380,51 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(313), \ + .attributes = ZAP_ATTRIBUTE_INDEX(315), \ .attributeCount = 9, \ .clusterSize = 45, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 122 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(322), \ + .attributes = ZAP_ATTRIBUTE_INDEX(324), \ .attributeCount = 33, \ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 139 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(355), \ + .attributes = ZAP_ATTRIBUTE_INDEX(357), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 145 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 147 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(379), \ + .attributes = ZAP_ATTRIBUTE_INDEX(381), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 153 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 155 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(385), \ + .attributes = ZAP_ATTRIBUTE_INDEX(387), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2416,18 +2435,18 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(410), \ + .attributes = ZAP_ATTRIBUTE_INDEX(412), \ .attributeCount = 16, \ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 158 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(426), \ + .attributes = ZAP_ATTRIBUTE_INDEX(428), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2438,7 +2457,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(439), \ + .attributes = ZAP_ATTRIBUTE_INDEX(441), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2449,18 +2468,18 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(444), \ + .attributes = ZAP_ATTRIBUTE_INDEX(446), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 158 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(498), \ + .attributes = ZAP_ATTRIBUTE_INDEX(500), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2471,7 +2490,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(505), \ + .attributes = ZAP_ATTRIBUTE_INDEX(507), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2482,7 +2501,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(511), \ + .attributes = ZAP_ATTRIBUTE_INDEX(513), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2493,7 +2512,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(516), \ + .attributes = ZAP_ATTRIBUTE_INDEX(518), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2504,7 +2523,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(522), \ + .attributes = ZAP_ATTRIBUTE_INDEX(524), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2515,7 +2534,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(528), \ + .attributes = ZAP_ATTRIBUTE_INDEX(530), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2526,7 +2545,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(533), \ + .attributes = ZAP_ATTRIBUTE_INDEX(535), \ .attributeCount = 3, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2537,7 +2556,7 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(536), \ + .attributes = ZAP_ATTRIBUTE_INDEX(538), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2548,18 +2567,18 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(539), \ + .attributes = ZAP_ATTRIBUTE_INDEX(541), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 178 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 180 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 180 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(543), \ + .attributes = ZAP_ATTRIBUTE_INDEX(545), \ .attributeCount = 8, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2570,40 +2589,40 @@ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(551), \ + .attributes = ZAP_ATTRIBUTE_INDEX(553), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 184 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(555), \ + .attributes = ZAP_ATTRIBUTE_INDEX(557), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 187 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 189 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(557), \ + .attributes = ZAP_ATTRIBUTE_INDEX(559), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 189 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(559), \ + .attributes = ZAP_ATTRIBUTE_INDEX(561), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2614,7 +2633,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(563), \ + .attributes = ZAP_ATTRIBUTE_INDEX(565), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2625,7 +2644,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(567), \ + .attributes = ZAP_ATTRIBUTE_INDEX(569), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2636,7 +2655,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(570), \ + .attributes = ZAP_ATTRIBUTE_INDEX(572), \ .attributeCount = 9, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2647,7 +2666,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(579), \ + .attributes = ZAP_ATTRIBUTE_INDEX(581), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2658,7 +2677,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(581), \ + .attributes = ZAP_ATTRIBUTE_INDEX(583), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2669,40 +2688,40 @@ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(594), \ + .attributes = ZAP_ATTRIBUTE_INDEX(596), \ .attributeCount = 82, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 212 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 195 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 214 ) ,\ },\ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(676), \ + .attributes = ZAP_ATTRIBUTE_INDEX(678), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 222 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 229 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 224 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 231 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(679), \ + .attributes = ZAP_ATTRIBUTE_INDEX(681), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 234 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 236 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(686), \ + .attributes = ZAP_ATTRIBUTE_INDEX(688), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2713,7 +2732,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(692), \ + .attributes = ZAP_ATTRIBUTE_INDEX(694), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2724,7 +2743,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(700), \ + .attributes = ZAP_ATTRIBUTE_INDEX(702), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2735,13 +2754,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(705), \ + .attributes = ZAP_ATTRIBUTE_INDEX(707), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 238 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 245 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 247 ) ,\ },\ } @@ -2749,13 +2768,13 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 76 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 77 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 44, 3459 }, { ZAP_CLUSTER_INDEX(71), 5, 105 }, \ - { ZAP_CLUSTER_INDEX(76), 1, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 28, 361 }, { ZAP_CLUSTER_INDEX(28), 44, 3459 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(77), 1, 0 }, \ } // Largest attribute size is needed for various buffers @@ -2767,7 +2786,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3919) +#define ATTRIBUTE_MAX_SIZE (3925) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index a5e29aced289a2..a80439e03c9b04 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -92,6 +92,7 @@ #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEST_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -428,3 +429,8 @@ #define ZCL_USING_TEST_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TEST_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TEST_CLUSTER + +// Use this macro to check if the server side of the Fault Injection cluster is included +#define ZCL_USING_FAULT_INJECTION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_FAULT_INJECTION_SERVER +#define EMBER_AF_PLUGIN_FAULT_INJECTION diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index aa7fbc1afd08ab..ab7abb68c6bc5c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1219,3 +1219,9 @@ #define ZCL_NULLABLE_RANGE_RESTRICTED_INT8S_ATTRIBUTE_ID (0x4027) #define ZCL_NULLABLE_RANGE_RESTRICTED_INT16_U_ATTRIBUTE_ID (0x4028) #define ZCL_NULLABLE_RANGE_RESTRICTED_INT16_S_ATTRIBUTE_ID (0x4029) + +// Attribute ids for cluster: Fault Injection + +// Client attributes + +// Server attributes 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 9fa1281d38db4f..d1b8ec87b5220a 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 @@ -30735,6 +30735,74 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace TestCluster +namespace FaultInjection { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FaultInjection::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FaultInjection::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FaultInjection + } // namespace Clusters } // namespace app } // namespace chip 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 239360ac366b9a..d26576e7723a10 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 @@ -5108,6 +5108,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace TestCluster +namespace FaultInjection { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FaultInjection + } // namespace Clusters } // namespace app } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 02c2a59c511de5..26c16148347095 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -605,6 +605,14 @@ void emberAfElectricalMeasurementClusterInitCallback(chip::EndpointId endpoint); */ void emberAfTestClusterClusterInitCallback(chip::EndpointId endpoint); +/** @brief Fault Injection Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFaultInjectionClusterInitCallback(chip::EndpointId endpoint); + // Cluster Server/Client Init Functions // @@ -7354,6 +7362,104 @@ void emberAfTestClusterClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfTestClusterClusterClientTickCallback(chip::EndpointId endpoint); +// +// Fault Injection Cluster +// + +/** @brief Fault Injection Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFaultInjectionClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Fault Injection Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFaultInjectionClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Fault Injection Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterFaultInjectionClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Fault Injection Cluster Server Message Sent + * + * Server Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfFaultInjectionClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Fault Injection Cluster Client Message Sent + * + * Client Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfFaultInjectionClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Fault Injection Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterFaultInjectionClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Fault Injection Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterFaultInjectionClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Fault Injection Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfFaultInjectionClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Fault Injection Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfFaultInjectionClusterClientTickCallback(chip::EndpointId endpoint); + // Cluster Commands Callback /** @@ -8807,6 +8913,12 @@ bool emberAfTestClusterClusterTestEmitTestEventRequestCallback( bool emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::DecodableType & commandData); +/** + * @brief Fault Injection Cluster FailAtFault Command callback (from client) + */ +bool emberAfFaultInjectionClusterFailAtFaultCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::FaultInjection::Commands::FailAtFault::DecodableType & commandData); /** @brief Add To Current App Tasks * diff --git a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h index 8fb031e6b583c8..fbc1968cc73d06 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h +++ b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h @@ -159,3 +159,5 @@ void __attribute__((weak)) MatterElectricalMeasurementPluginClientInitCallback() void MatterElectricalMeasurementPluginServerInitCallback(); void __attribute__((weak)) MatterTestClusterPluginClientInitCallback() {} void MatterTestClusterPluginServerInitCallback(); +void __attribute__((weak)) MatterFaultInjectionPluginClientInitCallback() {} +void MatterFaultInjectionPluginServerInitCallback(); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 64d9c1da0ff753..df67872fcb78ed 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2096,6 +2096,22 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(TestCluster::SimpleEnum } } +static auto __attribute__((unused)) EnsureKnownEnumValue(FaultInjection::FaultType val) +{ + using EnumType = FaultInjection::FaultType; + switch (val) + { + case EnumType::kUnspecified: + case EnumType::kSystemFault: + case EnumType::kInetFault: + case EnumType::kChipFault: + case EnumType::kCertFault: + return val; + default: + return static_cast(5); + } +} + } // namespace Clusters } // namespace app } // namespace chip 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 08e5853c7d3ead..70a3f843d43583 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 @@ -2306,6 +2306,20 @@ enum class SimpleBitmap : uint8_t }; } // namespace TestCluster +namespace FaultInjection { + +// Enum for FaultType +enum class FaultType : uint8_t +{ + kUnspecified = 0x00, + kSystemFault = 0x01, + kInetFault = 0x02, + kChipFault = 0x03, + kCertFault = 0x04, + kUnknownEnumValue = 5, +}; +} // namespace FaultInjection + } // namespace Clusters } // namespace app } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h index 65c4bc484a460b..c587107bd3b10f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -231,3 +231,6 @@ static constexpr chip::ClusterId ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04; // Definitions for cluster: Test Cluster static constexpr chip::ClusterId ZCL_TEST_CLUSTER_ID = 0xFFF1FC05; + +// Definitions for cluster: Fault Injection +static constexpr chip::ClusterId ZCL_FAULT_INJECTION_CLUSTER_ID = 0xFFF1FC06; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index f3971342a281ad..ec0eb5147c7f97 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -20883,6 +20883,96 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace TestCluster +namespace FaultInjection { + +namespace Commands { +namespace FailAtFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kId)), id)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumCallsToSkip)), numCallsToSkip)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumCallsToFail)), numCallsToFail)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTakeMutex)), takeMutex)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kType): + ReturnErrorOnFailure(DataModel::Decode(reader, type)); + break; + case to_underlying(Fields::kId): + ReturnErrorOnFailure(DataModel::Decode(reader, id)); + break; + case to_underlying(Fields::kNumCallsToSkip): + ReturnErrorOnFailure(DataModel::Decode(reader, numCallsToSkip)); + break; + case to_underlying(Fields::kNumCallsToFail): + ReturnErrorOnFailure(DataModel::Decode(reader, numCallsToFail)); + break; + case to_underlying(Fields::kTakeMutex): + ReturnErrorOnFailure(DataModel::Decode(reader, takeMutex)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace FailAtFault. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events { +} // namespace Events + +} // namespace FaultInjection } // namespace Clusters @@ -21270,6 +21360,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::FaultInjection::Id: { + switch (aCommand) + { + default: + return false; + } + } } return false; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 7aba9ed714c63e..17019d9d8b12a5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -28085,6 +28085,115 @@ struct DecodableType } // namespace TestFabricScopedEvent } // namespace Events } // namespace TestCluster +namespace FaultInjection { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace FailAtFault { +struct Type; +struct DecodableType; +} // namespace FailAtFault + +} // namespace Commands + +namespace Commands { +namespace FailAtFault { +enum class Fields +{ + kType = 0, + kId = 1, + kNumCallsToSkip = 2, + kNumCallsToFail = 3, + kTakeMutex = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::FailAtFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } + + FaultType type = static_cast(0); + uint32_t id = static_cast(0); + uint32_t numCallsToSkip = static_cast(0); + uint32_t numCallsToFail = static_cast(0); + bool takeMutex = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::FailAtFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } + + FaultType type = static_cast(0); + uint32_t id = static_cast(0); + uint32_t numCallsToSkip = static_cast(0); + uint32_t numCallsToFail = static_cast(0); + bool takeMutex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace FailAtFault +} // namespace Commands + +namespace Attributes { + +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } +}; +} // namespace AcceptedCommandList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace FaultInjection } // namespace Clusters diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 502843e55b69b8..95b03a5e717fa4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -352,3 +352,6 @@ #define ZCL_TEST_SIMPLE_OPTIONAL_ARGUMENT_REQUEST_COMMAND_ID (0x13) #define ZCL_TEST_EMIT_TEST_EVENT_REQUEST_COMMAND_ID (0x14) #define ZCL_TEST_EMIT_TEST_FABRIC_SCOPED_EVENT_REQUEST_COMMAND_ID (0x15) + +// Commands for cluster: Fault Injection +#define ZCL_FAIL_AT_FAULT_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 3c07637a654a29..d56fbc9210279e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4955,6 +4955,32 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace TestCluster +namespace FaultInjection { +namespace Attributes { + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FaultInjection + } // namespace Clusters } // namespace app } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 9fb0221c98f1d4..1ac3f6831081e6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -235,6 +235,9 @@ static constexpr ClusterId Id = 0x00000B04; namespace TestCluster { static constexpr ClusterId Id = 0xFFF1FC05; } // namespace TestCluster +namespace FaultInjection { +static constexpr ClusterId Id = 0xFFF1FC06; +} // namespace FaultInjection } // namespace Clusters } // namespace app diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index b2575ebb67f9e2..cf911dedc35e02 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1233,6 +1233,16 @@ static constexpr CommandId Id = 0x00000015; } // namespace Commands } // namespace TestCluster +namespace FaultInjection { +namespace Commands { + +namespace FailAtFault { +static constexpr CommandId Id = 0x00000000; +} // namespace FailAtFault + +} // namespace Commands +} // namespace FaultInjection + } // namespace Clusters } // namespace app } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index f3c9e801570922..89aa6ee258eb45 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -452,6 +452,12 @@ #define CHIP_PRINTCLUSTER_TEST_CLUSTER #endif +#if defined(ZCL_USING_FAULT_INJECTION_CLUSTER_SERVER) || defined(ZCL_USING_FAULT_INJECTION_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER { ZCL_FAULT_INJECTION_CLUSTER_ID, "Fault Injection" }, +#else +#define CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER +#endif + #define CLUSTER_IDS_TO_NAMES \ CHIP_PRINTCLUSTER_IDENTIFY_CLUSTER \ CHIP_PRINTCLUSTER_GROUPS_CLUSTER \ @@ -522,6 +528,7 @@ CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER \ CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER \ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ - CHIP_PRINTCLUSTER_TEST_CLUSTER + CHIP_PRINTCLUSTER_TEST_CLUSTER \ + CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER #define MAX_CLUSTER_NAME_LENGTH 39 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index fc77b7c93e1fc8..5c25721dfc3bdd 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -103,6 +103,7 @@ | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | | TestCluster | 0xFFF1FC05| +| FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ @@ -8143,6 +8144,56 @@ class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster FaultInjection | 0xFFF1FC06| +|------------------------------------------------------------------------------| +| Commands: | | +| * FailAtFault | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command FailAtFault + */ +class FaultInjectionFailAtFault : public ClusterCommand +{ +public: + FaultInjectionFailAtFault(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fail-at-fault", credsIssuerConfig) + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("NumCallsToSkip", 0, UINT32_MAX, &mRequest.numCallsToSkip); + AddArgument("NumCallsToFail", 0, UINT32_MAX, &mRequest.numCallsToFail); + AddArgument("TakeMutex", 0, 1, &mRequest.takeMutex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC06, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC06, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::FaultInjection::Commands::FailAtFault::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Register all Clusters commands | \*----------------------------------------------------------------------------*/ @@ -13205,6 +13256,43 @@ void registerClusterTestCluster(Commands & commands, CredentialIssuerCommands * commands.Register(clusterName, clusterCommands); } +void registerClusterFaultInjection(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::FaultInjection; + + const char * clusterName = "FaultInjection"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { @@ -13297,5 +13385,6 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterAccountLogin(commands, credsIssuerConfig); registerClusterElectricalMeasurement(commands, credsIssuerConfig); registerClusterTestCluster(commands, credsIssuerConfig); + registerClusterFaultInjection(commands, credsIssuerConfig); registerClusterSubscriptions(commands, credsIssuerConfig); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index f2031dd1c3b7d6..3c74e880afe835 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -10002,6 +10002,37 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case FaultInjection::Id: { + switch (path.mAttributeId) + { + case FaultInjection::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case FaultInjection::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case FaultInjection::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case FaultInjection::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case FaultInjection::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } default: break; } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 3b2a0ea71e7199..93aea4dc646cd1 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -56238,7 +56238,9 @@ class TestDescriptorClusterSuite : public TestCommand VerifyOrReturn(CheckValue("serverList[24]", iter_0.GetValue(), 65UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 25)); VerifyOrReturn(CheckValue("serverList[25]", iter_0.GetValue(), 1029UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 26)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 26)); + VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 4294048774UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 27)); } } break; diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 63a1b997dd5b6c..5850925843b055 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -519,3 +519,9 @@ typedef void (*TestClusterAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 96283a05033cd6..6762d44ce16409 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -631,5 +631,14 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase ~TestClusterCluster() {} }; +class DLL_EXPORT FaultInjectionCluster : public ClusterBase +{ +public: + FaultInjectionCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FaultInjection::Id, endpoint) + {} + ~FaultInjectionCluster() {} +}; + } // namespace Controller } // namespace chip diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index 0b55a4004fc6ec..f11dc67564f01d 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -86,4 +86,5 @@ MatterApplicationBasicPluginClientInitCallback(); \ MatterAccountLoginPluginClientInitCallback(); \ MatterElectricalMeasurementPluginClientInitCallback(); \ - MatterTestClusterPluginClientInitCallback(); + MatterTestClusterPluginClientInitCallback(); \ + MatterFaultInjectionPluginClientInitCallback(); diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 8258822775bbef..5522f84665c1e7 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -98,6 +98,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_FAN_CONTROL_CLUSTER_ID: emberAfFanControlClusterInitCallback(endpoint); break; + case ZCL_FAULT_INJECTION_CLUSTER_ID: + emberAfFaultInjectionClusterInitCallback(endpoint); + break; case ZCL_FIXED_LABEL_CLUSTER_ID: emberAfFixedLabelClusterInitCallback(endpoint); break; @@ -345,6 +348,11 @@ void __attribute__((weak)) emberAfFanControlClusterInitCallback(EndpointId endpo // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfFaultInjectionClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 02e8566c7cd596..730a7fb6a32cf6 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -79,7 +79,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 65 +#define GENERATED_CLUSTER_COUNT 66 // clang-format off #define GENERATED_CLUSTERS { \ @@ -798,6 +798,17 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Fault Injection (client) */ \ + .clusterId = 0xFFF1FC06, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ } // clang-format on @@ -809,7 +820,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 65, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 66, 0 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 0653ff31923019..ce1b5279cc45b9 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -94,6 +94,7 @@ #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TEST_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -356,3 +357,7 @@ // Use this macro to check if the client side of the Test Cluster cluster is included #define ZCL_USING_TEST_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TEST_CLUSTER_CLIENT + +// Use this macro to check if the client side of the Fault Injection cluster is included +#define ZCL_USING_FAULT_INJECTION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_FAULT_INJECTION_CLIENT diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index fb2dc70021bd18..b29a4a8455674d 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -105,6 +105,7 @@ | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | | TestCluster | 0xFFF1FC05| +| FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ @@ -93048,6 +93049,406 @@ class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster FaultInjection | 0xFFF1FC06| +|------------------------------------------------------------------------------| +| Commands: | | +| * FailAtFault | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command FailAtFault + */ +class FaultInjectionFailAtFault : public ClusterCommand { +public: + FaultInjectionFailAtFault() + : ClusterCommand("fail-at-fault") + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("NumCallsToSkip", 0, UINT32_MAX, &mRequest.numCallsToSkip); + AddArgument("NumCallsToFail", 0, UINT32_MAX, &mRequest.numCallsToFail); + AddArgument("TakeMutex", 0, 1, &mRequest.takeMutex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + __auto_type * params = [[MTRFaultInjectionClusterFailAtFaultParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.type)]; + params.id = [NSNumber numberWithUnsignedInt:mRequest.id]; + params.numCallsToSkip = [NSNumber numberWithUnsignedInt:mRequest.numCallsToSkip]; + params.numCallsToFail = [NSNumber numberWithUnsignedInt:mRequest.numCallsToFail]; + params.takeMutex = [NSNumber numberWithBool:mRequest.takeMutex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster failAtFaultWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::FaultInjection::Commands::FailAtFault::Type mRequest; +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadFaultInjectionGeneratedCommandList : public ReadAttribute { +public: + ReadFaultInjectionGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadFaultInjectionGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeFaultInjectionGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeGeneratedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadFaultInjectionAcceptedCommandList : public ReadAttribute { +public: + ReadFaultInjectionAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadFaultInjectionAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeFaultInjectionAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAcceptedCommandListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadFaultInjectionAttributeList : public ReadAttribute { +public: + ReadFaultInjectionAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadFaultInjectionAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeFaultInjectionAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeAttributeListWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadFaultInjectionFeatureMap : public ReadAttribute { +public: + ReadFaultInjectionFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadFaultInjectionFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeFaultInjectionFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeFeatureMapWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadFaultInjectionClusterRevision : public ReadAttribute { +public: + ReadFaultInjectionClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadFaultInjectionClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeFaultInjectionClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + MTRSubscribeParams * params = [[MTRSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeClusterRevisionWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /*----------------------------------------------------------------------------*\ | Register all Clusters commands | \*----------------------------------------------------------------------------*/ @@ -96608,6 +97009,32 @@ void registerClusterTestCluster(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterFaultInjection(Commands & commands) +{ + using namespace chip::app::Clusters::FaultInjection; + + const char * clusterName = "FaultInjection"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterAny(Commands & commands) { @@ -96692,4 +97119,5 @@ void registerClusters(Commands & commands) registerClusterAccountLogin(commands); registerClusterElectricalMeasurement(commands); registerClusterTestCluster(commands); + registerClusterFaultInjection(commands); } 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 f53567df8ac080..7f5059b72519be 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -93557,7 +93557,7 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("server list", [actualValue count], static_cast(26))); + VerifyOrReturn(CheckValue("server list", [actualValue count], static_cast(27))); VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); @@ -93584,6 +93584,7 @@ class TestDescriptorCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[23], 64UL)); VerifyOrReturn(CheckValue("", actualValue[24], 65UL)); VerifyOrReturn(CheckValue("", actualValue[25], 1029UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 4294048774UL)); } NextTest(); From ab028397daec2c3053998bf56624aa40da76a7fa Mon Sep 17 00:00:00 2001 From: Praveen Chandran Date: Thu, 18 Aug 2022 07:39:28 -0700 Subject: [PATCH 068/115] [Infineon] Restructure p6 and cyw30739 devices to single folder (#21926) * [Infineon] Restructure p6 folders under infineon * [Infineon] Support CYW30739 platform inside infineon folder * [Infineon] Rebase code rebase to avoid conflicts and fix github timeout change Co-authored-by: Andrei Litvin --- .github/workflows/examples-cyw30739.yaml | 102 ------------- .github/workflows/examples-infineon.yaml | 81 +++++++---- .gitmodules | 116 +++++++-------- BUILD.gn | 16 +-- build_overrides/{p6.gni => psoc6.gni} | 8 +- config/{p6 => psoc6}/toolchain/BUILD.gn | 4 +- docs/guides/README.md | 2 +- docs/guides/darwin.md | 4 +- ...e.md => infineon_psoc6_software_update.md} | 24 ++-- .../{p6 => infineon/psoc6}/.gn | 0 .../{p6 => infineon/psoc6}/BUILD.gn | 41 +++--- .../{p6 => infineon/psoc6}/README.md | 28 ++-- .../{p6 => infineon/psoc6}/args.gni | 4 +- .../infineon/psoc6/build_overrides | 1 + .../psoc6}/include/AppConfig.h | 0 .../{p6 => infineon/psoc6}/include/AppEvent.h | 0 .../{p6 => infineon/psoc6}/include/AppTask.h | 0 .../psoc6}/include/ButtonHandler.h | 0 .../psoc6}/include/CHIPProjectConfig.h | 0 .../psoc6}/include/ClusterManager.h | 0 .../{p6 => infineon/psoc6}/src/AppTask.cpp | 4 +- .../psoc6}/src/ButtonHandler.cpp | 0 .../psoc6}/src/ClusterManager.cpp | 0 .../psoc6}/src/ZclCallbacks.cpp | 0 .../{p6 => infineon/psoc6}/src/main.cpp | 2 +- .../psoc6/third_party/connectedhomeip | 1 + examples/all-clusters-app/p6/build_overrides | 1 - .../p6/third_party/connectedhomeip | 1 - .../{p6 => infineon/psoc6}/.gn | 0 .../{p6 => infineon/psoc6}/BUILD.gn | 42 +++--- .../{p6 => infineon/psoc6}/README.md | 28 ++-- .../{p6 => infineon/psoc6}/args.gni | 4 +- .../infineon/psoc6/build_overrides | 1 + .../psoc6}/include/AppConfig.h | 0 .../{p6 => infineon/psoc6}/include/AppEvent.h | 0 .../{p6 => infineon/psoc6}/include/AppTask.h | 0 .../psoc6}/include/ButtonHandler.h | 0 .../psoc6}/include/CHIPProjectConfig.h | 0 .../psoc6}/include/ClusterManager.h | 0 .../{p6 => infineon/psoc6}/src/AppTask.cpp | 4 +- .../psoc6}/src/ButtonHandler.cpp | 0 .../psoc6}/src/ClusterManager.cpp | 0 .../psoc6}/src/ZclCallbacks.cpp | 0 .../{p6 => infineon/psoc6}/src/main.cpp | 4 +- .../psoc6/third_party/connectedhomeip | 1 + .../p6/build_overrides | 1 - .../p6/third_party/connectedhomeip | 1 - examples/build_overrides/cyw30739_sdk.gni | 2 +- .../build_overrides/{p6.gni => psoc6.gni} | 9 +- .../lighting-app/cyw30739/build_overrides | 1 - .../cyw30739/third_party/connectedhomeip | 1 - .../lighting-app/{ => infineon}/cyw30739/.gn | 0 .../{ => infineon}/cyw30739/BUILD.gn | 4 +- .../{ => infineon}/cyw30739/README.md | 8 +- .../infineon}/cyw30739/args.gni | 2 +- .../infineon/cyw30739/build_overrides | 1 + .../cyw30739/include/AppShellCommands.h | 0 .../cyw30739/include/ButtonHandler.h | 0 .../cyw30739/include/CHIPProjectConfig.h | 0 .../cyw30739/include/LightingManager.h | 0 .../cyw30739/src/AppShellCommands.cpp | 0 .../cyw30739/src/ButtonHandler.cpp | 0 .../cyw30739/src/LightingManager.cpp | 0 .../cyw30739/src/ZclCallbacks.cpp | 0 .../{ => infineon}/cyw30739/src/main.cpp | 0 .../{ => infineon}/cyw30739/static_config.txt | 0 .../cyw30739/third_party/connectedhomeip | 1 + .../lighting-app/{p6 => infineon/psoc6}/.gn | 0 .../{p6 => infineon/psoc6}/BUILD.gn | 42 +++--- .../{p6 => infineon/psoc6}/README.md | 26 ++-- .../{p6 => infineon/psoc6}/args.gni | 4 +- .../infineon/psoc6/build_overrides | 1 + .../psoc6}/include/AppConfig.h | 0 .../{p6 => infineon/psoc6}/include/AppEvent.h | 0 .../{p6 => infineon/psoc6}/include/AppTask.h | 0 .../psoc6}/include/ButtonHandler.h | 0 .../psoc6}/include/CHIPProjectConfig.h | 0 .../psoc6}/include/LightingManager.h | 0 .../{p6 => infineon/psoc6}/src/AppTask.cpp | 4 +- .../psoc6}/src/ButtonHandler.cpp | 0 .../psoc6}/src/LightingManager.cpp | 0 .../psoc6}/src/ZclCallbacks.cpp | 0 .../{p6 => infineon/psoc6}/src/main.cpp | 2 +- .../psoc6/third_party/connectedhomeip | 1 + examples/lighting-app/p6/build_overrides | 1 - .../p6/third_party/connectedhomeip | 1 - examples/lock-app/cyw30739/build_overrides | 1 - .../cyw30739/third_party/connectedhomeip | 1 - examples/lock-app/{ => infineon}/cyw30739/.gn | 0 .../lock-app/{ => infineon}/cyw30739/BUILD.gn | 4 +- .../{ => infineon}/cyw30739/README.md | 8 +- .../infineon}/cyw30739/args.gni | 2 +- .../infineon/cyw30739/build_overrides | 1 + .../cyw30739/include/AppEvent.h | 0 .../cyw30739/include/AppShellCommands.h | 0 .../cyw30739/include/ButtonHandler.h | 0 .../cyw30739/include/CHIPProjectConfig.h | 0 .../cyw30739/include/LockManager.h | 0 .../cyw30739/include/chip_lock.h | 0 .../cyw30739/src/AppShellCommands.cpp | 0 .../cyw30739/src/ButtonHandler.cpp | 0 .../cyw30739/src/LockManager.cpp | 0 .../cyw30739/src/ZclCallbacks.cpp | 0 .../{ => infineon}/cyw30739/src/main.cpp | 0 .../{ => infineon}/cyw30739/static_config.txt | 0 .../cyw30739/third_party/connectedhomeip | 1 + examples/lock-app/{p6 => infineon/psoc6}/.gn | 0 .../lock-app/{p6 => infineon/psoc6}/BUILD.gn | 43 +++--- .../lock-app/{p6 => infineon/psoc6}/README.md | 26 ++-- .../lock-app/{p6 => infineon/psoc6}/args.gni | 4 +- .../lock-app/infineon/psoc6/build_overrides | 1 + .../psoc6}/include/AppConfig.h | 0 .../{p6 => infineon/psoc6}/include/AppEvent.h | 0 .../{p6 => infineon/psoc6}/include/AppTask.h | 0 .../psoc6}/include/ButtonHandler.h | 0 .../psoc6}/include/CHIPProjectConfig.h | 0 .../psoc6}/include/LockManager.h | 0 .../{p6 => infineon/psoc6}/src/AppTask.cpp | 4 +- .../psoc6}/src/ButtonHandler.cpp | 0 .../psoc6}/src/LockManager.cpp | 2 +- .../psoc6}/src/ZclCallbacks.cpp | 0 .../{p6 => infineon/psoc6}/src/main.cpp | 2 +- .../psoc6/third_party/connectedhomeip | 1 + examples/lock-app/p6/build_overrides | 1 - .../lock-app/p6/third_party/connectedhomeip | 1 - .../cyw30739/build_overrides | 1 - .../cyw30739/third_party/connectedhomeip | 1 - .../{ => infineon}/cyw30739/.gn | 0 .../{ => infineon}/cyw30739/BUILD.gn | 5 +- .../{ => infineon}/cyw30739/README.md | 8 +- .../{ => infineon}/cyw30739/args.gni | 2 +- .../infineon/cyw30739/build_overrides | 1 + .../cyw30739/include/CHIPProjectConfig.h | 0 .../{ => infineon}/cyw30739/src/main.cpp | 0 .../{ => infineon}/cyw30739/static_config.txt | 0 .../cyw30739/third_party/connectedhomeip | 1 + .../{p6 => infineon/psoc6}/.gn | 0 .../{p6 => infineon/psoc6}/BUILD.gn | 37 ++--- .../{p6 => infineon/psoc6}/README.md | 18 +-- .../{p6 => infineon/psoc6}/args.gni | 4 +- .../infineon/psoc6/build_overrides | 1 + .../psoc6}/include/AppConfig.h | 0 .../psoc6}/include/CHIPProjectConfig.h | 0 .../{p6 => infineon/psoc6}/main.cpp | 2 +- .../psoc6/third_party/connectedhomeip | 1 + .../persistent-storage/p6/build_overrides | 1 - .../p6/third_party/connectedhomeip | 1 - .../platform/{ => infineon}/cyw30739/BUILD.gn | 0 .../{ => infineon}/cyw30739/OTAConfig.cpp | 2 +- .../{ => infineon}/cyw30739/OTAConfig.h | 0 .../platform/{ => infineon}/cyw30739/args.gni | 0 .../project_include/OpenThreadConfig.h | 0 .../platform/{p6 => infineon/psoc6}/BUILD.gn | 4 +- .../{p6 => infineon/psoc6}/LEDWidget.cpp | 0 .../{p6 => infineon/psoc6}/LEDWidget.h | 0 .../platform/{p6 => infineon/psoc6}/args.gni | 0 .../psoc6/init_psoc6Platform.cpp} | 0 .../psoc6/init_psoc6Platform.h} | 0 gn_build.sh | 8 +- scripts/build/build/targets.py | 2 +- scripts/build/builders/cyw30739.py | 2 +- scripts/build/builders/infineon.py | 18 +-- .../testdata/all_targets_except_host.txt | 32 ++--- .../build/testdata/build_all_except_host.txt | 136 +++++++++--------- .../glob_star_targets_except_host.txt | 8 +- scripts/checkout_submodules.py | 3 +- .../{gn_p6_example.sh => gn_psoc6_example.sh} | 4 +- ...mware_utils.py => psoc6_firmware_utils.py} | 18 +-- scripts/tools/check_includes_config.py | 4 +- src/lwip/BUILD.gn | 10 +- src/platform/BUILD.gn | 14 +- .../CYW30739/BLEManagerImpl.cpp | 0 .../{ => Infineon}/CYW30739/BLEManagerImpl.h | 0 src/platform/{ => Infineon}/CYW30739/BUILD.gn | 6 +- .../CYW30739/BlePlatformConfig.h | 0 .../CYW30739/CHIPDevicePlatformConfig.h | 0 .../CYW30739/CHIPDevicePlatformEvent.h | 0 .../CYW30739/CHIPPlatformConfig.h | 0 .../CYW30739/CYW30739Config.cpp | 2 +- .../{ => Infineon}/CYW30739/CYW30739Config.h | 0 .../CYW30739/ConfigurationManagerImpl.cpp | 2 +- .../CYW30739/ConfigurationManagerImpl.h | 0 .../CYW30739/ConnectivityManagerImpl.cpp | 0 .../CYW30739/ConnectivityManagerImpl.h | 0 .../DeviceNetworkProvisioningDelegateImpl.cpp | 0 .../DeviceNetworkProvisioningDelegateImpl.h | 0 .../CYW30739/DiagnosticDataProviderImpl.cpp | 2 +- .../CYW30739/DiagnosticDataProviderImpl.h | 0 .../CYW30739/InetPlatformConfig.h | 0 .../CYW30739/KeyValueStoreManagerImpl.cpp | 0 .../CYW30739/KeyValueStoreManagerImpl.h | 0 .../{ => Infineon}/CYW30739/Logging.cpp | 0 .../CYW30739/OTAImageProcessorImpl.cpp | 0 .../CYW30739/OTAImageProcessorImpl.h | 0 .../CYW30739/PlatformManagerImpl.cpp | 2 +- .../CYW30739/PlatformManagerImpl.h | 0 .../CYW30739/SystemPlatformConfig.h | 0 .../CYW30739/SystemTimeSupport.cpp | 0 .../CYW30739/ThreadStackManagerImpl.cpp | 0 .../CYW30739/ThreadStackManagerImpl.h | 0 src/platform/{ => Infineon}/CYW30739/args.gni | 4 +- .../{ => Infineon}/CYW30739/cycfg_gatt_db.c | 0 .../{ => Infineon}/CYW30739/cycfg_gatt_db.h | 0 .../CYW30739/cyw30739-chip-mbedtls-config.h | 0 .../{P6 => Infineon/PSOC6}/BLEManagerImpl.cpp | 0 .../{P6 => Infineon/PSOC6}/BLEManagerImpl.h | 0 src/platform/{P6 => Infineon/PSOC6}/BUILD.gn | 8 +- .../PSOC6}/BlePlatformConfig.h | 0 .../PSOC6}/CHIPDevicePlatformConfig.h | 0 .../PSOC6}/CHIPDevicePlatformEvent.h | 0 .../PSOC6}/CHIPPlatformConfig.h | 0 .../PSOC6}/ConfigurationManagerImpl.cpp | 2 +- .../PSOC6}/ConfigurationManagerImpl.h | 0 .../PSOC6}/ConnectivityManagerImpl.cpp | 4 +- .../PSOC6}/ConnectivityManagerImpl.h | 0 .../DeviceNetworkProvisioningDelegateImpl.cpp | 2 +- .../DeviceNetworkProvisioningDelegateImpl.h | 0 .../PSOC6}/DiagnosticDataProviderImpl.cpp | 4 +- .../PSOC6}/DiagnosticDataProviderImpl.h | 2 +- .../PSOC6}/InetPlatformConfig.h | 0 .../PSOC6}/KeyValueStoreManagerImpl.cpp | 0 .../PSOC6}/KeyValueStoreManagerImpl.h | 0 .../{P6 => Infineon/PSOC6}/Logging.cpp | 0 .../{P6 => Infineon/PSOC6}/LwIPCoreLock.cpp | 0 .../PSOC6}/MTBKeyValueStore.cpp | 0 .../{P6 => Infineon/PSOC6}/MTBKeyValueStore.h | 0 .../PSOC6}/NetworkCommissioningDriver.h | 0 .../PSOC6}/NetworkCommissioningWiFiDriver.cpp | 6 +- .../PSOC6}/OTAImageProcessorImpl.cpp | 0 .../PSOC6}/OTAImageProcessorImpl.h | 0 .../{P6 => Infineon/PSOC6}/P6Config.cpp | 4 +- .../{P6 => Infineon/PSOC6}/P6Config.h | 0 .../{P6 => Infineon/PSOC6}/P6Utils.cpp | 4 +- src/platform/{P6 => Infineon/PSOC6}/P6Utils.h | 0 .../PSOC6}/PlatformManagerImpl.cpp | 2 +- .../PSOC6}/PlatformManagerImpl.h | 0 .../PSOC6}/SystemPlatformConfig.h | 0 .../PSOC6}/WarmPlatformConfig.h | 0 .../{P6 => Infineon/PSOC6}/app_platform_cfg.c | 0 .../{P6 => Infineon/PSOC6}/app_platform_cfg.h | 0 src/platform/{P6 => Infineon/PSOC6}/args.gni | 14 +- .../PSOC6}/cycfg_bt_settings.cpp | 0 .../PSOC6}/cycfg_bt_settings.h | 0 .../{P6 => Infineon/PSOC6}/cycfg_gap.cpp | 0 .../{P6 => Infineon/PSOC6}/cycfg_gap.h | 0 .../{P6 => Infineon/PSOC6}/cycfg_gatt_db.c | 0 .../{P6 => Infineon/PSOC6}/cycfg_gatt_db.h | 0 .../{P6 => Infineon/PSOC6}/ethernet.h | 0 src/platform/device.gni | 10 +- .../{ => infineon}/cyw30739_sdk/BUILD.gn | 2 +- .../bsp_design_modus/cycfg_notices.h | 0 .../bsp_design_modus/cycfg_pins.c | 0 .../bsp_design_modus/cycfg_pins.h | 0 .../bsp_design_modus/cycfg_routing.h | 0 .../{ => infineon}/cyw30739_sdk/btp_reader.py | 0 .../cyw30739_sdk/compress_cgs_data.py | 0 .../cyw30739_sdk/cyw30739_arm.gni | 0 .../cyw30739_sdk/cyw30739_executable.gni | 0 .../cyw30739_sdk/cyw30739_sdk.gni | 0 .../{ => infineon}/cyw30739_sdk/flash.btp | 0 .../cyw30739_sdk/gen_ota_image.py | 0 .../cyw30739_sdk/include/auto_flags.h | 0 .../cyw30739_sdk/include/ota_fw_upgrade.h | 0 .../include/wiced_button_manager.h | 0 .../cyw30739_sdk/include/wiced_led_manager.h | 0 .../{ => infineon}/cyw30739_sdk/merge_hex.py | 0 .../{ => infineon}/cyw30739_sdk/repos/30739A0 | 0 .../cyw30739_sdk/repos/CYW930739M2EVB-01 | 0 .../cyw30739_sdk/repos/btsdk-include | 0 .../cyw30739_sdk/repos/btsdk-tools | 0 .../cyw30739_sdk/scripts/wiced-gen-ld.pl | 0 .../cyw30739_sdk/src/ota_fw_upgrade.c | 0 .../cyw30739_sdk/src/platform_retarget_lock.c | 0 .../cyw30739_sdk/src/wiced_button_manager.c | 0 .../cyw30739_sdk/src/wiced_led_manager.c | 0 third_party/{p6 => infineon/psoc6}/BUILD.gn | 26 ++-- .../psoc6/psoc6_arm.gni} | 2 +- .../psoc6/psoc6_board.gni} | 8 +- .../psoc6/psoc6_executable.gni} | 10 +- .../psoc6/psoc6_sdk.gni} | 27 ++-- .../psoc6/psoc6_sdk}/.gitignore | 0 .../psoc6/psoc6_sdk}/Makefile | 0 .../psoc6/psoc6_sdk}/arch/cc.h | 0 .../psoc6/psoc6_sdk}/arch/sys_arch.c | 0 .../psoc6/psoc6_sdk}/arch/sys_arch.h | 0 .../CY8CKIT-062S2-43012/Debug/GCC_ARM.json | 0 .../CY8CKIT-062S2-43012/Release/GCC_ARM.json | 0 .../psoc6/psoc6_sdk}/configs/FreeRTOSConfig.h | 0 .../psoc6/psoc6_sdk}/configs/iot_config.h | 0 .../psoc6/psoc6_sdk}/configs/lwipopts.h | 0 .../psoc6_sdk}/configs/mbedtls_user_config.h | 0 .../psoc6_sdk}/configs/mqtt_client_config.h | 0 .../psoc6/psoc6_sdk}/configs/wifi_config.h | 0 .../libs/TARGET_CY8CKIT-062S2-43012 | 0 .../psoc6/psoc6_sdk}/libs/abstraction-rtos | 0 .../psoc6/psoc6_sdk}/libs/anycloud-ota | 0 .../psoc6/psoc6_sdk}/libs/bluetooth-freertos | 0 .../psoc6/psoc6_sdk}/libs/btstack | 0 .../psoc6/psoc6_sdk}/libs/clib-support | 0 .../psoc6_sdk}/libs/connectivity-utilities | 0 .../psoc6/psoc6_sdk}/libs/core-lib | 0 .../psoc6/psoc6_sdk}/libs/core-make | 0 .../psoc6/psoc6_sdk}/libs/freertos | 0 .../psoc6/psoc6_sdk}/libs/kv-store | 0 .../psoc6/psoc6_sdk}/libs/lwip | 0 .../psoc6/psoc6_sdk}/libs/mbedtls | 0 .../psoc6/psoc6_sdk}/libs/mtb-hal-cat1 | 0 .../psoc6/psoc6_sdk}/libs/mtb-pdl-cat1 | 0 .../psoc6/psoc6_sdk}/libs/psoc6cm0p | 0 .../psoc6/psoc6_sdk}/libs/recipe-make-cat1a | 0 .../psoc6/psoc6_sdk}/libs/retarget-io | 0 .../psoc6/psoc6_sdk}/libs/secure-sockets | 0 .../psoc6/psoc6_sdk}/libs/serial-flash | 0 .../psoc6/psoc6_sdk}/libs/whd-bsp-integration | 0 .../psoc6_sdk}/libs/wifi-connection-manager | 0 .../psoc6/psoc6_sdk}/libs/wifi-host-driver | 0 .../psoc6/psoc6_sdk}/libs/wifi-mw-core | 0 .../config/mcuboot_config/mcuboot_assert.h | 0 .../config/mcuboot_config/mcuboot_config.h | 0 .../config/mcuboot_config/mcuboot_logging.h | 0 .../ota/config/mcuboot_crypto_acc_config.h | 0 .../ota/config/mcuboot_crypto_config.h | 0 .../ota/cy8c6xxa_cm4_dual_ota_int.ld | 0 .../ota/matter-psoc6-mcuboot-bootloader.hex | 0 .../psoc6/psoc6_sdk}/ota/ota_base_build.sh | 0 .../psoc6/psoc6_sdk}/ota/ota_update_build.sh | 0 326 files changed, 592 insertions(+), 652 deletions(-) delete mode 100644 .github/workflows/examples-cyw30739.yaml rename build_overrides/{p6.gni => psoc6.gni} (75%) rename config/{p6 => psoc6}/toolchain/BUILD.gn (88%) rename docs/guides/{infineon_p6_software_update.md => infineon_psoc6_software_update.md} (75%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/.gn (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/BUILD.gn (79%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/README.md (75%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/args.gni (89%) create mode 120000 examples/all-clusters-app/infineon/psoc6/build_overrides rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/AppConfig.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/AppEvent.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/AppTask.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/ButtonHandler.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/CHIPProjectConfig.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/include/ClusterManager.h (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/src/AppTask.cpp (99%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/src/ButtonHandler.cpp (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/src/ClusterManager.cpp (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/src/ZclCallbacks.cpp (100%) rename examples/all-clusters-app/{p6 => infineon/psoc6}/src/main.cpp (99%) create mode 120000 examples/all-clusters-app/infineon/psoc6/third_party/connectedhomeip delete mode 120000 examples/all-clusters-app/p6/build_overrides delete mode 120000 examples/all-clusters-app/p6/third_party/connectedhomeip rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/.gn (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/BUILD.gn (78%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/README.md (75%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/args.gni (89%) create mode 120000 examples/all-clusters-minimal-app/infineon/psoc6/build_overrides rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/AppConfig.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/AppEvent.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/AppTask.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/ButtonHandler.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/CHIPProjectConfig.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/include/ClusterManager.h (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/src/AppTask.cpp (99%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/src/ButtonHandler.cpp (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/src/ClusterManager.cpp (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/src/ZclCallbacks.cpp (100%) rename examples/all-clusters-minimal-app/{p6 => infineon/psoc6}/src/main.cpp (96%) create mode 120000 examples/all-clusters-minimal-app/infineon/psoc6/third_party/connectedhomeip delete mode 120000 examples/all-clusters-minimal-app/p6/build_overrides delete mode 120000 examples/all-clusters-minimal-app/p6/third_party/connectedhomeip rename examples/build_overrides/{p6.gni => psoc6.gni} (73%) delete mode 120000 examples/lighting-app/cyw30739/build_overrides delete mode 120000 examples/lighting-app/cyw30739/third_party/connectedhomeip rename examples/lighting-app/{ => infineon}/cyw30739/.gn (100%) rename examples/lighting-app/{ => infineon}/cyw30739/BUILD.gn (93%) rename examples/lighting-app/{ => infineon}/cyw30739/README.md (93%) rename examples/{lock-app => lighting-app/infineon}/cyw30739/args.gni (93%) create mode 120000 examples/lighting-app/infineon/cyw30739/build_overrides rename examples/lighting-app/{ => infineon}/cyw30739/include/AppShellCommands.h (100%) rename examples/lighting-app/{ => infineon}/cyw30739/include/ButtonHandler.h (100%) rename examples/lighting-app/{ => infineon}/cyw30739/include/CHIPProjectConfig.h (100%) rename examples/lighting-app/{ => infineon}/cyw30739/include/LightingManager.h (100%) rename examples/lighting-app/{ => infineon}/cyw30739/src/AppShellCommands.cpp (100%) rename examples/lighting-app/{ => infineon}/cyw30739/src/ButtonHandler.cpp (100%) rename examples/lighting-app/{ => infineon}/cyw30739/src/LightingManager.cpp (100%) rename examples/lighting-app/{ => infineon}/cyw30739/src/ZclCallbacks.cpp (100%) rename examples/lighting-app/{ => infineon}/cyw30739/src/main.cpp (100%) rename examples/lighting-app/{ => infineon}/cyw30739/static_config.txt (100%) create mode 120000 examples/lighting-app/infineon/cyw30739/third_party/connectedhomeip rename examples/lighting-app/{p6 => infineon/psoc6}/.gn (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/BUILD.gn (77%) rename examples/lighting-app/{p6 => infineon/psoc6}/README.md (81%) rename examples/lighting-app/{p6 => infineon/psoc6}/args.gni (89%) create mode 120000 examples/lighting-app/infineon/psoc6/build_overrides rename examples/lighting-app/{p6 => infineon/psoc6}/include/AppConfig.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/include/AppEvent.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/include/AppTask.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/include/ButtonHandler.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/include/CHIPProjectConfig.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/include/LightingManager.h (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/src/AppTask.cpp (99%) rename examples/lighting-app/{p6 => infineon/psoc6}/src/ButtonHandler.cpp (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/src/LightingManager.cpp (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/src/ZclCallbacks.cpp (100%) rename examples/lighting-app/{p6 => infineon/psoc6}/src/main.cpp (99%) create mode 120000 examples/lighting-app/infineon/psoc6/third_party/connectedhomeip delete mode 120000 examples/lighting-app/p6/build_overrides delete mode 120000 examples/lighting-app/p6/third_party/connectedhomeip delete mode 120000 examples/lock-app/cyw30739/build_overrides delete mode 120000 examples/lock-app/cyw30739/third_party/connectedhomeip rename examples/lock-app/{ => infineon}/cyw30739/.gn (100%) rename examples/lock-app/{ => infineon}/cyw30739/BUILD.gn (93%) rename examples/lock-app/{ => infineon}/cyw30739/README.md (92%) rename examples/{lighting-app => lock-app/infineon}/cyw30739/args.gni (93%) create mode 120000 examples/lock-app/infineon/cyw30739/build_overrides rename examples/lock-app/{ => infineon}/cyw30739/include/AppEvent.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/include/AppShellCommands.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/include/ButtonHandler.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/include/CHIPProjectConfig.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/include/LockManager.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/include/chip_lock.h (100%) rename examples/lock-app/{ => infineon}/cyw30739/src/AppShellCommands.cpp (100%) rename examples/lock-app/{ => infineon}/cyw30739/src/ButtonHandler.cpp (100%) rename examples/lock-app/{ => infineon}/cyw30739/src/LockManager.cpp (100%) rename examples/lock-app/{ => infineon}/cyw30739/src/ZclCallbacks.cpp (100%) rename examples/lock-app/{ => infineon}/cyw30739/src/main.cpp (100%) rename examples/lock-app/{ => infineon}/cyw30739/static_config.txt (100%) create mode 120000 examples/lock-app/infineon/cyw30739/third_party/connectedhomeip rename examples/lock-app/{p6 => infineon/psoc6}/.gn (100%) rename examples/lock-app/{p6 => infineon/psoc6}/BUILD.gn (75%) rename examples/lock-app/{p6 => infineon/psoc6}/README.md (81%) rename examples/lock-app/{p6 => infineon/psoc6}/args.gni (89%) create mode 120000 examples/lock-app/infineon/psoc6/build_overrides rename examples/lock-app/{p6 => infineon/psoc6}/include/AppConfig.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/include/AppEvent.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/include/AppTask.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/include/ButtonHandler.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/include/CHIPProjectConfig.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/include/LockManager.h (100%) rename examples/lock-app/{p6 => infineon/psoc6}/src/AppTask.cpp (99%) rename examples/lock-app/{p6 => infineon/psoc6}/src/ButtonHandler.cpp (100%) rename examples/lock-app/{p6 => infineon/psoc6}/src/LockManager.cpp (99%) rename examples/lock-app/{p6 => infineon/psoc6}/src/ZclCallbacks.cpp (100%) rename examples/lock-app/{p6 => infineon/psoc6}/src/main.cpp (99%) create mode 120000 examples/lock-app/infineon/psoc6/third_party/connectedhomeip delete mode 120000 examples/lock-app/p6/build_overrides delete mode 120000 examples/lock-app/p6/third_party/connectedhomeip delete mode 120000 examples/ota-requestor-app/cyw30739/build_overrides delete mode 120000 examples/ota-requestor-app/cyw30739/third_party/connectedhomeip rename examples/ota-requestor-app/{ => infineon}/cyw30739/.gn (100%) rename examples/ota-requestor-app/{ => infineon}/cyw30739/BUILD.gn (92%) rename examples/ota-requestor-app/{ => infineon}/cyw30739/README.md (93%) rename examples/ota-requestor-app/{ => infineon}/cyw30739/args.gni (92%) create mode 120000 examples/ota-requestor-app/infineon/cyw30739/build_overrides rename examples/ota-requestor-app/{ => infineon}/cyw30739/include/CHIPProjectConfig.h (100%) rename examples/ota-requestor-app/{ => infineon}/cyw30739/src/main.cpp (100%) rename examples/ota-requestor-app/{ => infineon}/cyw30739/static_config.txt (100%) create mode 120000 examples/ota-requestor-app/infineon/cyw30739/third_party/connectedhomeip rename examples/persistent-storage/{p6 => infineon/psoc6}/.gn (100%) rename examples/persistent-storage/{p6 => infineon/psoc6}/BUILD.gn (63%) rename examples/persistent-storage/{p6 => infineon/psoc6}/README.md (65%) rename examples/persistent-storage/{p6 => infineon/psoc6}/args.gni (89%) create mode 120000 examples/persistent-storage/infineon/psoc6/build_overrides rename examples/persistent-storage/{p6 => infineon/psoc6}/include/AppConfig.h (100%) rename examples/persistent-storage/{p6 => infineon/psoc6}/include/CHIPProjectConfig.h (100%) rename examples/persistent-storage/{p6 => infineon/psoc6}/main.cpp (98%) create mode 120000 examples/persistent-storage/infineon/psoc6/third_party/connectedhomeip delete mode 120000 examples/persistent-storage/p6/build_overrides delete mode 120000 examples/persistent-storage/p6/third_party/connectedhomeip rename examples/platform/{ => infineon}/cyw30739/BUILD.gn (100%) rename examples/platform/{ => infineon}/cyw30739/OTAConfig.cpp (97%) rename examples/platform/{ => infineon}/cyw30739/OTAConfig.h (100%) rename examples/platform/{ => infineon}/cyw30739/args.gni (100%) rename examples/platform/{ => infineon}/cyw30739/project_include/OpenThreadConfig.h (100%) rename examples/platform/{p6 => infineon/psoc6}/BUILD.gn (89%) rename examples/platform/{p6 => infineon/psoc6}/LEDWidget.cpp (100%) rename examples/platform/{p6 => infineon/psoc6}/LEDWidget.h (100%) rename examples/platform/{p6 => infineon/psoc6}/args.gni (100%) rename examples/platform/{p6/init_p6Platform.cpp => infineon/psoc6/init_psoc6Platform.cpp} (100%) rename examples/platform/{p6/init_p6Platform.h => infineon/psoc6/init_psoc6Platform.h} (100%) rename scripts/examples/{gn_p6_example.sh => gn_psoc6_example.sh} (95%) rename scripts/flashing/{p6_firmware_utils.py => psoc6_firmware_utils.py} (90%) rename src/platform/{ => Infineon}/CYW30739/BLEManagerImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/BLEManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/BUILD.gn (94%) rename src/platform/{ => Infineon}/CYW30739/BlePlatformConfig.h (100%) rename src/platform/{ => Infineon}/CYW30739/CHIPDevicePlatformConfig.h (100%) rename src/platform/{ => Infineon}/CYW30739/CHIPDevicePlatformEvent.h (100%) rename src/platform/{ => Infineon}/CYW30739/CHIPPlatformConfig.h (100%) rename src/platform/{ => Infineon}/CYW30739/CYW30739Config.cpp (99%) rename src/platform/{ => Infineon}/CYW30739/CYW30739Config.h (100%) rename src/platform/{ => Infineon}/CYW30739/ConfigurationManagerImpl.cpp (99%) rename src/platform/{ => Infineon}/CYW30739/ConfigurationManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/ConnectivityManagerImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/ConnectivityManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/DeviceNetworkProvisioningDelegateImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/DeviceNetworkProvisioningDelegateImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/DiagnosticDataProviderImpl.cpp (98%) rename src/platform/{ => Infineon}/CYW30739/DiagnosticDataProviderImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/InetPlatformConfig.h (100%) rename src/platform/{ => Infineon}/CYW30739/KeyValueStoreManagerImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/KeyValueStoreManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/Logging.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/OTAImageProcessorImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/OTAImageProcessorImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/PlatformManagerImpl.cpp (99%) rename src/platform/{ => Infineon}/CYW30739/PlatformManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/SystemPlatformConfig.h (100%) rename src/platform/{ => Infineon}/CYW30739/SystemTimeSupport.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/ThreadStackManagerImpl.cpp (100%) rename src/platform/{ => Infineon}/CYW30739/ThreadStackManagerImpl.h (100%) rename src/platform/{ => Infineon}/CYW30739/args.gni (94%) rename src/platform/{ => Infineon}/CYW30739/cycfg_gatt_db.c (100%) rename src/platform/{ => Infineon}/CYW30739/cycfg_gatt_db.h (100%) rename src/platform/{ => Infineon}/CYW30739/cyw30739-chip-mbedtls-config.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/BLEManagerImpl.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/BLEManagerImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/BUILD.gn (93%) rename src/platform/{P6 => Infineon/PSOC6}/BlePlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/CHIPDevicePlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/CHIPDevicePlatformEvent.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/CHIPPlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/ConfigurationManagerImpl.cpp (99%) rename src/platform/{P6 => Infineon/PSOC6}/ConfigurationManagerImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/ConnectivityManagerImpl.cpp (99%) rename src/platform/{P6 => Infineon/PSOC6}/ConnectivityManagerImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/DeviceNetworkProvisioningDelegateImpl.cpp (97%) rename src/platform/{P6 => Infineon/PSOC6}/DeviceNetworkProvisioningDelegateImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/DiagnosticDataProviderImpl.cpp (99%) rename src/platform/{P6 => Infineon/PSOC6}/DiagnosticDataProviderImpl.h (99%) rename src/platform/{P6 => Infineon/PSOC6}/InetPlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/KeyValueStoreManagerImpl.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/KeyValueStoreManagerImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/Logging.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/LwIPCoreLock.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/MTBKeyValueStore.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/MTBKeyValueStore.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/NetworkCommissioningDriver.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/NetworkCommissioningWiFiDriver.cpp (98%) rename src/platform/{P6 => Infineon/PSOC6}/OTAImageProcessorImpl.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/OTAImageProcessorImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/P6Config.cpp (99%) rename src/platform/{P6 => Infineon/PSOC6}/P6Config.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/P6Utils.cpp (99%) rename src/platform/{P6 => Infineon/PSOC6}/P6Utils.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/PlatformManagerImpl.cpp (97%) rename src/platform/{P6 => Infineon/PSOC6}/PlatformManagerImpl.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/SystemPlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/WarmPlatformConfig.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/app_platform_cfg.c (100%) rename src/platform/{P6 => Infineon/PSOC6}/app_platform_cfg.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/args.gni (66%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_bt_settings.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_bt_settings.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_gap.cpp (100%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_gap.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_gatt_db.c (100%) rename src/platform/{P6 => Infineon/PSOC6}/cycfg_gatt_db.h (100%) rename src/platform/{P6 => Infineon/PSOC6}/ethernet.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/BUILD.gn (94%) rename third_party/{ => infineon}/cyw30739_sdk/bsp_design_modus/cycfg_notices.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/bsp_design_modus/cycfg_pins.c (100%) rename third_party/{ => infineon}/cyw30739_sdk/bsp_design_modus/cycfg_pins.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/bsp_design_modus/cycfg_routing.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/btp_reader.py (100%) rename third_party/{ => infineon}/cyw30739_sdk/compress_cgs_data.py (100%) rename third_party/{ => infineon}/cyw30739_sdk/cyw30739_arm.gni (100%) rename third_party/{ => infineon}/cyw30739_sdk/cyw30739_executable.gni (100%) rename third_party/{ => infineon}/cyw30739_sdk/cyw30739_sdk.gni (100%) rename third_party/{ => infineon}/cyw30739_sdk/flash.btp (100%) rename third_party/{ => infineon}/cyw30739_sdk/gen_ota_image.py (100%) rename third_party/{ => infineon}/cyw30739_sdk/include/auto_flags.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/include/ota_fw_upgrade.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/include/wiced_button_manager.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/include/wiced_led_manager.h (100%) rename third_party/{ => infineon}/cyw30739_sdk/merge_hex.py (100%) rename third_party/{ => infineon}/cyw30739_sdk/repos/30739A0 (100%) rename third_party/{ => infineon}/cyw30739_sdk/repos/CYW930739M2EVB-01 (100%) rename third_party/{ => infineon}/cyw30739_sdk/repos/btsdk-include (100%) rename third_party/{ => infineon}/cyw30739_sdk/repos/btsdk-tools (100%) rename third_party/{ => infineon}/cyw30739_sdk/scripts/wiced-gen-ld.pl (100%) rename third_party/{ => infineon}/cyw30739_sdk/src/ota_fw_upgrade.c (100%) rename third_party/{ => infineon}/cyw30739_sdk/src/platform_retarget_lock.c (100%) rename third_party/{ => infineon}/cyw30739_sdk/src/wiced_button_manager.c (100%) rename third_party/{ => infineon}/cyw30739_sdk/src/wiced_led_manager.c (100%) rename third_party/{p6 => infineon/psoc6}/BUILD.gn (80%) rename third_party/{p6/p6_arm.gni => infineon/psoc6/psoc6_arm.gni} (96%) rename third_party/{p6/p6_board.gni => infineon/psoc6/psoc6_board.gni} (82%) rename third_party/{p6/p6_executable.gni => infineon/psoc6/psoc6_executable.gni} (92%) rename third_party/{p6/p6_sdk.gni => infineon/psoc6/psoc6_sdk.gni} (81%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/.gitignore (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/Makefile (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/arch/cc.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/arch/sys_arch.c (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/arch/sys_arch.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/FreeRTOSConfig.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/iot_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/lwipopts.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/mbedtls_user_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/mqtt_client_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/configs/wifi_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/TARGET_CY8CKIT-062S2-43012 (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/abstraction-rtos (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/anycloud-ota (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/bluetooth-freertos (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/btstack (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/clib-support (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/connectivity-utilities (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/core-lib (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/core-make (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/freertos (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/kv-store (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/lwip (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/mbedtls (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/mtb-hal-cat1 (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/mtb-pdl-cat1 (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/psoc6cm0p (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/recipe-make-cat1a (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/retarget-io (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/secure-sockets (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/serial-flash (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/whd-bsp-integration (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/wifi-connection-manager (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/wifi-host-driver (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/libs/wifi-mw-core (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/config/mcuboot_config/mcuboot_assert.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/config/mcuboot_config/mcuboot_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/config/mcuboot_config/mcuboot_logging.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/config/mcuboot_crypto_acc_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/config/mcuboot_crypto_config.h (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/cy8c6xxa_cm4_dual_ota_int.ld (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/matter-psoc6-mcuboot-bootloader.hex (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/ota_base_build.sh (100%) rename third_party/{p6/p6_sdk => infineon/psoc6/psoc6_sdk}/ota/ota_update_build.sh (100%) diff --git a/.github/workflows/examples-cyw30739.yaml b/.github/workflows/examples-cyw30739.yaml deleted file mode 100644 index a3126dbba0442c..00000000000000 --- a/.github/workflows/examples-cyw30739.yaml +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Build example - Infineon CYW30739 - -on: - push: - pull_request: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - cyw30739: - name: CYW30739 - timeout-minutes: 60 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: connectedhomeip/chip-build:latest - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform cyw30739 - - - name: Set up environment for size reports - if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - name: Bootstrap - timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build example CYW30739 Apps - timeout-minutes: 30 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target-glob 'cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor-no-progress-logging}' \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get light size stats - timeout-minutes: 5 - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 cyw930739m2evb_01 light \ - out/artifacts/cyw30739-cyw930739m2evb_01-light/chip-cyw30739-lighting-example.elf \ - /tmp/bloat_reports/ - - name: Get lock size stats - timeout-minutes: 5 - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 cyw930739m2evb_01 lock \ - out/artifacts/cyw30739-cyw930739m2evb_01-lock/chip-cyw30739-lock-example.elf \ - /tmp/bloat_reports/ - - name: Get ota-requestor size stats - timeout-minutes: 5 - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 cyw930739m2evb_01 ota-requestor-no-progress-logging \ - out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging/chip-cyw30739-ota-requestor-example.elf \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: actions/upload-artifact@v2 - if: ${{ !env.ACT }} - with: - name: Size,CYW30739-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 7fc9cdd4485be0..cc5a8f522596d5 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Build example - Infineon P6 +name: Build example - Infineon on: push: @@ -33,7 +33,8 @@ jobs: container: image: connectedhomeip/chip-build-infineon:0.5.91 - + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - uses: Wandalen/wretry.action@v1.0.15 name: Checkout @@ -44,7 +45,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform p6 + run: scripts/checkout_submodules.py --shallow --platform infineon - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -63,65 +64,97 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - - name: Build lock-app example + - name: Build PSoC6 lock-app example timeout-minutes: 15 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-lock \ + --target infineon-psoc6-lock \ build \ --copy-artifacts-to out/artifacts \ " .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default lock-app \ - out/infineon-p6-lock/chip-p6-lock-example.out - - name: Build all-clusters-app example + psoc6 cy8ckit_062s2_43012 lock \ + out/artifacts/infineon-psoc6-lock/chip-psoc6-lock-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 all-clusters-app example timeout-minutes: 20 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-all-clusters \ + --target infineon-psoc6-all-clusters \ build \ --copy-artifacts-to out/artifacts \ " .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default all-clusters-app \ - out/infineon-p6-all-clusters/chip-p6-clusters-example.out - - name: Build all-clusters-minimal-app example + psoc6 cy8ckit_062s2_43012 all-clusters \ + out/artifacts/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 all-clusters-minimal-app example timeout-minutes: 20 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-all-clusters-minimal \ + --target infineon-psoc6-all-clusters-minimal \ build \ --copy-artifacts-to out/artifacts \ " .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default all-clusters-minimal-app \ - out/infineon-p6-all-clusters-minimal/chip-p6-clusters-minimal-example.out - - name: Build lighting-app example + psoc6 cy8ckit_062s2_43012 all-clusters-minimal \ + out/artifacts/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 lighting-app example timeout-minutes: 15 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-light \ + --target infineon-psoc6-light \ build \ --copy-artifacts-to out/artifacts \ " .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default light-app \ - out/infineon-p6-light/chip-p6-lighting-example.out + psoc6 cy8ckit_062s2_43012 light \ + out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \ + /tmp/bloat_reports/ + + - name: Build example CYW30739 Apps + timeout-minutes: 30 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target-glob 'cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor-no-progress-logging}' \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get light size stats + timeout-minutes: 5 + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 cyw930739m2evb_01 light \ + out/artifacts/cyw30739-cyw930739m2evb_01-light/chip-cyw30739-lighting-example.elf \ + /tmp/bloat_reports/ + - name: Get lock size stats + timeout-minutes: 5 + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 cyw930739m2evb_01 lock \ + out/artifacts/cyw30739-cyw930739m2evb_01-lock/chip-cyw30739-lock-example.elf \ + /tmp/bloat_reports/ + - name: Get ota-requestor size stats + timeout-minutes: 5 + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 cyw930739m2evb_01 ota-requestor-no-progress-logging \ + out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging/chip-cyw30739-ota-requestor-example.elf \ + /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} with: - name: Size,P6-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + name: Size,Infineon-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} path: | - out/infineon-p6-lock/p6-default-lock-app-sizes.json - out/infineon-p6-all-clusters/p6-default-all-clusters-app-sizes.json - out/infineon-p6-all-clusters-minimal/p6-default-all-clusters-minimal-app-sizes.json - out/infineon-p6-light/p6-default-light-app-sizes.json + /tmp/bloat_reports/ diff --git a/.gitmodules b/.gitmodules index abde0e5f8cdfd5..2f40b45697df5a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -62,7 +62,7 @@ path = third_party/freertos/repo url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git branch = V10.3.1-kernel-only - platforms = ameba,cc13x2_26x2,bl602,efr32,esp32,k32w0,p6,qpg + platforms = ameba,cc13x2_26x2,bl602,efr32,esp32,k32w0,infineon,qpg [submodule "simw-top-mini"] path = third_party/simw-top-mini/repo url = https://github.com/NXP/plug-and-trust.git @@ -84,7 +84,7 @@ [submodule "third_party/openthread/ot-ifx"] path = third_party/openthread/ot-ifx url = https://github.com/Infineon/ot-ifx-release.git - platforms = cyw30739 + platforms = infineon [submodule "third_party/mbed-os/repo"] path = third_party/mbed-os/repo url = https://github.com/ARMmbed/mbed-os.git @@ -101,129 +101,129 @@ branch = main platforms = mbed [submodule "p6/abstraction-rtos"] - path = third_party/p6/p6_sdk/libs/abstraction-rtos + path = third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos url = https://github.com/Infineon/abstraction-rtos - platforms = p6 + platforms = infineon [submodule "p6/bluetooth-freertos"] - path = third_party/p6/p6_sdk/libs/bluetooth-freertos + path = third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos url = https://github.com/Infineon/bluetooth-freertos branch = v2.X - platforms = p6 + platforms = infineon [submodule "p6/btstack"] - path = third_party/p6/p6_sdk/libs/btstack + path = third_party/infineon/psoc6/psoc6_sdk/libs/btstack url = https://github.com/Infineon/btstack - platforms = p6 + platforms = infineon [submodule "p6/clib-support"] - path = third_party/p6/p6_sdk/libs/clib-support + path = third_party/infineon/psoc6/psoc6_sdk/libs/clib-support url = https://github.com/Infineon/clib-support - platforms = p6 + platforms = infineon [submodule "p6/connectivity-utilities"] - path = third_party/p6/p6_sdk/libs/connectivity-utilities + path = third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities url = https://github.com/Infineon/connectivity-utilities - platforms = p6 + platforms = infineon [submodule "p6/core-lib"] - path = third_party/p6/p6_sdk/libs/core-lib + path = third_party/infineon/psoc6/psoc6_sdk/libs/core-lib url = https://github.com/Infineon/core-lib - platforms = p6 + platforms = infineon [submodule "p6/core-make"] - path = third_party/p6/p6_sdk/libs/core-make + path = third_party/infineon/psoc6/psoc6_sdk/libs/core-make url = https://github.com/Infineon/core-make - platforms = p6 + platforms = infineon [submodule "p6/kv-store"] - path = third_party/p6/p6_sdk/libs/kv-store + path = third_party/infineon/psoc6/psoc6_sdk/libs/kv-store url = https://github.com/Infineon/kv-store - platforms = p6 + platforms = infineon [submodule "p6/mtb-hal-cat1"] - path = third_party/p6/p6_sdk/libs/mtb-hal-cat1 + path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 url = https://github.com/Infineon/mtb-hal-cat1 - platforms = p6 + platforms = infineon [submodule "p6/mtb-pdl-cat1"] - path = third_party/p6/p6_sdk/libs/mtb-pdl-cat1 + path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 url = https://github.com/Infineon/mtb-pdl-cat1 - platforms = p6 + platforms = infineon [submodule "p6/psoc6cm0p"] - path = third_party/p6/p6_sdk/libs/psoc6cm0p + path = third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p url = https://github.com/Infineon/psoc6cm0p - platforms = p6 + platforms = infineon [submodule "p6/whd-bsp-integration"] - path = third_party/p6/p6_sdk/libs/whd-bsp-integration + path = third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration url = https://github.com/Infineon/whd-bsp-integration - platforms = p6 + platforms = infineon [submodule "p6/wifi-connection-manager"] - path = third_party/p6/p6_sdk/libs/wifi-connection-manager + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager url = https://github.com/Infineon/wifi-connection-manager - platforms = p6 + platforms = infineon [submodule "p6/wifi-host-driver"] - path = third_party/p6/p6_sdk/libs/wifi-host-driver + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver url = https://github.com/Infineon/wifi-host-driver - platforms = p6 + platforms = infineon [submodule "p6/wifi-mw-core"] - path = third_party/p6/p6_sdk/libs/wifi-mw-core + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core url = https://github.com/Infineon/wifi-mw-core - platforms = p6 + platforms = infineon [submodule "p6/TARGET_CY8CKIT-062S2-43012"] - path = third_party/p6/p6_sdk/libs/TARGET_CY8CKIT-062S2-43012 + path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 - platforms = p6 + platforms = infineon [submodule "p6/freertos"] - path = third_party/p6/p6_sdk/libs/freertos + path = third_party/infineon/psoc6/psoc6_sdk/libs/freertos url = https://github.com/Infineon/freertos - platforms = p6 + platforms = infineon [submodule "p6/retarget-io"] - path = third_party/p6/p6_sdk/libs/retarget-io + path = third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io url = https://github.com/Infineon/retarget-io - platforms = p6 + platforms = infineon [submodule "p6/mbedtls"] - path = third_party/p6/p6_sdk/libs/mbedtls + path = third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls url = https://github.com/ARMmbed/mbedtls - platforms = p6 + platforms = infineon [submodule "p6/secure-sockets"] - path = third_party/p6/p6_sdk/libs/secure-sockets + path = third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets url = https://github.com/Infineon/secure-sockets - platforms = p6 + platforms = infineon [submodule "p6/recipe-make-cat1a"] - path = third_party/p6/p6_sdk/libs/recipe-make-cat1a + path = third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a url = https://github.com/Infineon/recipe-make-cat1a - platforms = p6 + platforms = infineon [submodule "third_party/pybind11/repo"] path = third_party/pybind11/repo url = https://github.com/pybind/pybind11 branch = stable [submodule "p6/lwip"] - path = third_party/p6/p6_sdk/libs/lwip + path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip url = https://github.com/lwip-tcpip/lwip.git - platforms = p6 + platforms = infineon [submodule "third_party/jsoncpp/repo"] path = third_party/jsoncpp/repo url = https://github.com/open-source-parsers/jsoncpp.git [submodule "cyw30739_sdk/30739A0"] - path = third_party/cyw30739_sdk/repos/30739A0 + path = third_party/infineon/cyw30739_sdk/repos/30739A0 url = https://github.com/Infineon/OT-Matter-30739A0.git - platforms = cyw30739 + platforms = infineon [submodule "cyw30739_sdk/include"] - path = third_party/cyw30739_sdk/repos/btsdk-include + path = third_party/infineon/cyw30739_sdk/repos/btsdk-include url = https://github.com/Infineon/btsdk-include.git - platforms = cyw30739 + platforms = infineon [submodule "cyw30739_sdk/target"] - path = third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 + path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git - platforms = cyw30739 + platforms = infineon [submodule "cyw30739_sdk/tools"] - path = third_party/cyw30739_sdk/repos/btsdk-tools + path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools url = https://github.com/Infineon/btsdk-tools.git - platforms = cyw30739 + platforms = infineon [submodule "third_party/p6/p6_sdk/libs/anycloud-ota"] - path = third_party/p6/p6_sdk/libs/anycloud-ota + path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota url = https://github.com/Infineon/anycloud-ota - platforms = p6 + platforms = infineon [submodule "third_party/mbed-mcu-boot/repo"] path = third_party/mbed-mcu-boot/repo url = https://github.com/ATmobica/mcuboot.git platforms = mbed [submodule "p6/serial-flash"] - path = third_party/p6/p6_sdk/libs/serial-flash + path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash url = https://github.com/Infineon/serial-flash - platforms = p6 + platforms = infineon [submodule "third_party/telink_sdk/repo"] path = third_party/telink_sdk/repo url = https://github.com/telink-semi/telink_b91_ble_single_connection_sdk_matter diff --git a/BUILD.gn b/BUILD.gn index a233ab272621c7..7dbbb83d3cc77b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -271,8 +271,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Set this to true to enable efr32 builds by default. enable_efr32_builds = false - # Set this to true to enable p6 builds by default. - enable_p6_builds = false + # Set this to true to enable psoc6 builds by default. + enable_psoc6_builds = false # Set this to true to enable Qorvo qpg builds by default. enable_qpg_builds = false @@ -364,8 +364,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Build the efr32 lock app example. enable_efr32_lock_app_build = enable_efr32_builds - # Build the p6 lock app example. - enable_p6_lock_app_build = enable_p6_builds + # Build the psoc6 lock app example. + enable_psoc6_lock_app_build = enable_psoc6_builds # Build the qpgxxxx lock app example. enable_qpg_lock_app_build = enable_qpg_builds && !is_debug @@ -610,12 +610,12 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { extra_build_deps += [ ":efr32_lock_app" ] } - if (enable_p6_lock_app_build) { - group("p6_lock_app") { - deps = [ "${chip_root}/examples/lock-app/p6(${chip_root}/config/p6/toolchain:p6_lock_app)" ] + if (enable_psoc6_lock_app_build) { + group("psoc6_lock_app") { + deps = [ "${chip_root}/examples/lock-app/infineon/psoc6(${chip_root}/config/psoc6/toolchain:psoc6_lock_app)" ] } - extra_build_deps += [ ":p6_lock_app" ] + extra_build_deps += [ ":psoc6_lock_app" ] } if (enable_qpg_lock_app_build) { diff --git a/build_overrides/p6.gni b/build_overrides/psoc6.gni similarity index 75% rename from build_overrides/p6.gni rename to build_overrides/psoc6.gni index 0ae9c543ee8456..a4fc95b53917c1 100644 --- a/build_overrides/p6.gni +++ b/build_overrides/psoc6.gni @@ -13,11 +13,11 @@ # limitations under the License. declare_args() { - # Root directory for p6 SDK build files. - p6_sdk_build_root = "//third_party/p6" + # Root directory for psoc6 SDK build files. + psoc6_sdk_build_root = "//third_party/infineon/psoc6" } declare_args() { - # Root directory for p6 SDK sources. - p6_sdk_root = "${p6_sdk_build_root}/p6_sdk" + # Root directory for psoc6 SDK sources. + psoc6_sdk_root = "${psoc6_sdk_build_root}/psoc6_sdk" } diff --git a/config/p6/toolchain/BUILD.gn b/config/psoc6/toolchain/BUILD.gn similarity index 88% rename from config/p6/toolchain/BUILD.gn rename to config/psoc6/toolchain/BUILD.gn index 219ae1bf1102ed..542012522ea8cb 100644 --- a/config/p6/toolchain/BUILD.gn +++ b/config/psoc6/toolchain/BUILD.gn @@ -17,9 +17,9 @@ import("//build_overrides/chip.gni") import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") -arm_toolchain("p6_lock_app") { +arm_toolchain("psoc6_lock_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lock-app/p6/args.gni") + import("${chip_root}/examples/lock-app/infineon/psoc6/args.gni") } } diff --git a/docs/guides/README.md b/docs/guides/README.md index 09f3f9c1c4c3e7..44d0a8dc9fcb4a 100644 --- a/docs/guides/README.md +++ b/docs/guides/README.md @@ -5,7 +5,7 @@ - [Android - Building](./android_building.md) - [Apple - Testing with iPhone, iPad, macOS, Apple TV, HomePod, Watch, etc](./darwin.md) - [Espressif (ESP32) - Getting Started Guide](./esp32/README.md) -- [Infineon - Software Update](./infineon_p6_software_update.md) +- [Infineon PSoC6 - Software Update](./infineon_psoc6_software_update.md) - [Linux - Simulated Devices](./simulated_device_linux.md) - [mbedOS - Adding a new target](./mbedos_add_new_target.md) - [mbedOS - Commissioning](./mbedos_commissioning.md) diff --git a/docs/guides/darwin.md b/docs/guides/darwin.md index 2d9443d70a6d0a..b28a9925d53cd0 100644 --- a/docs/guides/darwin.md +++ b/docs/guides/darwin.md @@ -205,7 +205,6 @@ requirements ##### Guides - [Bouffalo Lab](/examples/lighting-app/bouffalolab/bl602/README.md) -- [CYW30739 Lighting](/examples/lighting-app/cyw30739/README.md) - [EFR32 Window Covering](/examples/window-app/efr32/README.md) - [ESP32 All Clusters](/examples/all-clusters-app/esp32/README.md) - [ESP32 Lighting](/examples/lighting-app/esp32/README.md) @@ -215,7 +214,8 @@ requirements - [nRF Connect Pump](/examples/pump-app/nrfconnect/README.md) - [NXP Examples](./nxp_imx8m_linux_examples.md) - [NXP](/examples/all-clusters-app/nxp/mw320/README.md) -- [P6](/examples/all-clusters-app/p6/README.md) +- [Infineon CYW30739 Lighting](/examples/lighting-app/infineon/cyw30739/README.md) +- [Infineon PSoC6](/examples/all-clusters-app/infineon/psoc6/README.md) - [Qorvo](/examples/lighting-app/qpg/README.md) - [SiliconLabs](./silabs_efr32_building.md) - [Simulated Linux](./simulated_device_linux.md) diff --git a/docs/guides/infineon_p6_software_update.md b/docs/guides/infineon_psoc6_software_update.md similarity index 75% rename from docs/guides/infineon_p6_software_update.md rename to docs/guides/infineon_psoc6_software_update.md index 136f577dfb6301..7cddc020c6c417 100644 --- a/docs/guides/infineon_p6_software_update.md +++ b/docs/guides/infineon_psoc6_software_update.md @@ -1,8 +1,8 @@ -# Matter Software Update with Infineon P6 example applications +# Matter Software Update with Infineon PSoC6 example applications The Over The Air (OTA) Software Update functionality can be added to any of the -Infineon P6 example applications by passing the `chip_enable_ota_requestor=true` -option to the build script. +Infineon PSoC6 example applications by passing the +`chip_enable_ota_requestor=true` option to the build script. ## Running the OTA Download scenario @@ -11,7 +11,7 @@ option to the build script. OTA Requestor is any node that needs to be updated and can communicate with the OTA Provider to fetch applicable software updates. In the procedure described below, the OTA Provider will be a Linux application and the - example running on the Infineon P6 board will work as the OTA Requestor. + example running on the Infineon PSoC6 board will work as the OTA Requestor. - On a Linux or Darwin platform build the chip-tool and the ota-provider-app as follows: @@ -21,33 +21,33 @@ option to the build script. scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false ``` -- Build the P6 OTA Requestor application from the chip root dir: +- Build the PSoC6 OTA Requestor application from the chip root dir: ``` - $ scripts/build/build_examples.py --enable-flashbundle --target infineon-p6-lock-ota build - $ third_party/p6/p6_sdk/ota/ota_base_build.sh out/infineon-p6-lock-ota chip-p6-lock-example + $ scripts/build/build_examples.py --enable-flashbundle --target infineon-psoc6-lock-ota build + $ third_party/psoc6/psoc6_sdk/ota/ota_base_build.sh out/infineon-psoc6-lock-ota chip-psoc6-lock-example ``` -- Build the P6 OTA Update application from the chip root dir and create OTA +- Build the PSoC6 OTA Update application from the chip root dir and create OTA file ``` - $ scripts/build/build_examples.py --enable-flashbundle --no-log-timestamps --target infineon-p6-lock-ota-updateimage build - $ third_party/p6/p6_sdk/ota/ota_update_build.sh out/infineon-p6-lock-ota-updateimage chip-p6-lock-example + $ scripts/build/build_examples.py --enable-flashbundle --no-log-timestamps --target infineon-psoc6-lock-ota-updateimage build + $ third_party/psoc6/psoc6_sdk/ota/ota_update_build.sh out/infineon-psoc6-lock-ota-updateimage chip-psoc6-lock-example ``` * Additionally a pre-compiled bootloader must be flashed to the board using [Cypress Programmer](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.cypressprogrammer). This image can be found at: - $ ./third_party/p6/p6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex + $ ./third_party/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex * In a terminal start the Provider app passing to it the path to the Matter OTA file created in the previous step:(output of ota_update_build step) ``` rm -r /tmp/chip_* - ./out/debug/chip-ota-provider-app -f chip-p6-lock-example.ota + ./out/debug/chip-ota-provider-app -f chip-psoc6-lock-example.ota ``` * In a separate terminal run the chip-tool commands to provision the Provider: diff --git a/examples/all-clusters-app/p6/.gn b/examples/all-clusters-app/infineon/psoc6/.gn similarity index 100% rename from examples/all-clusters-app/p6/.gn rename to examples/all-clusters-app/infineon/psoc6/.gn diff --git a/examples/all-clusters-app/p6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn similarity index 79% rename from examples/all-clusters-app/p6/BUILD.gn rename to examples/all-clusters-app/infineon/psoc6/BUILD.gn index 1fa873956a4830..a92d8fb969e171 100644 --- a/examples/all-clusters-app/p6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -14,17 +14,17 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/src/platform/device.gni") -import("${p6_sdk_build_root}/p6_executable.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_executable.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") assert(current_os == "freertos") -p6_project_dir = "${chip_root}/examples/all-clusters-app/p6" -examples_plat_dir = "${chip_root}/examples/platform/p6" +psoc6_project_dir = "${chip_root}/examples/all-clusters-app/infineon/psoc6" +examples_plat_dir = "${chip_root}/examples/platform/infineon/psoc6" declare_args() { # Dump memory usage at link time. @@ -40,8 +40,8 @@ declare_args() { build_update_image = false } -config("p6_ota_config") { - linker_script = "${p6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" +config("psoc6_ota_config") { + linker_script = "${psoc6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" ldflags = [ "-T" + rebase_path(linker_script, root_build_dir) ] @@ -78,38 +78,39 @@ config("p6_ota_config") { } } -p6_sdk_sources("all_clusters_app_sdk_sources") { +psoc6_sdk_sources("all_clusters_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/P6", - "${p6_project_dir}/include", + "${chip_root}/src/platform/PSOC6", + "${psoc6_project_dir}/include", "${examples_plat_dir}", ] defines = [ - "BOARD_ID=${p6_board}", + "BOARD_ID=${psoc6_board}", "P6_LOG_ENABLED=1", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}", ] - sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] + sources = [ "${psoc6_project_dir}/include/CHIPProjectConfig.h" ] - public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] + public_configs = + [ "${chip_root}/third_party/infineon/psoc6:psoc6_sdk_config" ] if (chip_enable_ota_requestor) { - public_configs += [ ":p6_ota_config" ] + public_configs += [ ":psoc6_ota_config" ] } } -p6_executable("clusters_app") { +psoc6_executable("clusters_app") { include_dirs = [] defines = [] - output_name = "chip-p6-clusters-example.out" + output_name = "chip-psoc6-clusters-example.out" sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", - "${examples_plat_dir}/init_p6Platform.cpp", + "${examples_plat_dir}/init_psoc6Platform.cpp", "src/AppTask.cpp", "src/ButtonHandler.cpp", "src/ClusterManager.cpp", @@ -129,7 +130,7 @@ p6_executable("clusters_app") { include_dirs += [ "include", "${examples_plat_dir}", - "${p6_project_dir}/include", + "${psoc6_project_dir}/include", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", ] @@ -150,10 +151,10 @@ p6_executable("clusters_app") { output_dir = root_out_dir } -group("p6") { +group("psoc6") { deps = [ ":clusters_app" ] } group("default") { - deps = [ ":p6" ] + deps = [ ":psoc6" ] } diff --git a/examples/all-clusters-app/p6/README.md b/examples/all-clusters-app/infineon/psoc6/README.md similarity index 75% rename from examples/all-clusters-app/p6/README.md rename to examples/all-clusters-app/infineon/psoc6/README.md index d218c24c97dc46..c28c43d9c3f248 100644 --- a/examples/all-clusters-app/p6/README.md +++ b/examples/all-clusters-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP P6 All Clusters Example +#CHIP PSoC6 All Clusters Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.


-- [Matter P6 All Clusters Example](#chip-p6-clusters-example) +- [Matter PSoC6 All Clusters Example](#chip-psoc6-clusters-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -20,13 +20,13 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board. ## Introduction -The P6 clusters example provides a baseline demonstration of a Cluster control -device, built using Matter and the Infineon Modustoolbox SDK. It can be +The PSoC6 clusters example provides a baseline demonstration of a Cluster +control device, built using Matter and the Infineon Modustoolbox SDK. It can be controlled by Matter controller over Wi-Fi network. -The P6 device can be commissioned over Bluetooth Low Energy where the device and -the Matter controller will exchange security information with the Rendezvous -procedure. Wi-Fi Network credentials are then provided to the P6 device which +The PSoC6 device can be commissioned over Bluetooth Low Energy where the device +and the Matter controller will exchange security information with the Rendezvous +procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. @@ -36,8 +36,8 @@ will then join the network. - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_p6_example.sh` for downloading the Software and related - tools. + `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + related tools. - Install some additional tools (likely already present for Matter developers): @@ -54,7 +54,7 @@ will then join the network. * Build the example application: $ source scripts/activate.sh - $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-all-clusters' build + $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-psoc6-all-clusters' build - To delete generated executable, libraries and object files use: @@ -72,7 +72,7 @@ will then join the network. - On the command line: $ cd ~/connectedhomeip - $ python3 out/infineon-p6-all-clusters/chip-p6-clusters-example.flash.py + $ python3 out/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.flash.py @@ -84,7 +84,7 @@ Commissioning can be carried out using BLE. ### Setting up Chip tool -Once P6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to +Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to perform commissioning and cluster control. - Set up python controller. @@ -125,6 +125,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. ## OTA Software Update -For the description of Software Update process with infineon P6 example +For the description of Software Update process with infineon PSoC6 example applications see -[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) diff --git a/examples/all-clusters-app/p6/args.gni b/examples/all-clusters-app/infineon/psoc6/args.gni similarity index 89% rename from examples/all-clusters-app/p6/args.gni rename to examples/all-clusters-app/infineon/psoc6/args.gni index 2a93385cf36bd6..ce7a2ab93e794d 100644 --- a/examples/all-clusters-app/p6/args.gni +++ b/examples/all-clusters-app/infineon/psoc6/args.gni @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/src/platform/P6/args.gni") +import("${chip_root}/src/platform/Infineon/PSOC6/args.gni") -p6_target_project = +psoc6_target_project = get_label_info(":all_clusters_app_sdk_sources", "label_no_toolchain") diff --git a/examples/all-clusters-app/infineon/psoc6/build_overrides b/examples/all-clusters-app/infineon/psoc6/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/all-clusters-app/infineon/psoc6/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/all-clusters-app/p6/include/AppConfig.h b/examples/all-clusters-app/infineon/psoc6/include/AppConfig.h similarity index 100% rename from examples/all-clusters-app/p6/include/AppConfig.h rename to examples/all-clusters-app/infineon/psoc6/include/AppConfig.h diff --git a/examples/all-clusters-app/p6/include/AppEvent.h b/examples/all-clusters-app/infineon/psoc6/include/AppEvent.h similarity index 100% rename from examples/all-clusters-app/p6/include/AppEvent.h rename to examples/all-clusters-app/infineon/psoc6/include/AppEvent.h diff --git a/examples/all-clusters-app/p6/include/AppTask.h b/examples/all-clusters-app/infineon/psoc6/include/AppTask.h similarity index 100% rename from examples/all-clusters-app/p6/include/AppTask.h rename to examples/all-clusters-app/infineon/psoc6/include/AppTask.h diff --git a/examples/all-clusters-app/p6/include/ButtonHandler.h b/examples/all-clusters-app/infineon/psoc6/include/ButtonHandler.h similarity index 100% rename from examples/all-clusters-app/p6/include/ButtonHandler.h rename to examples/all-clusters-app/infineon/psoc6/include/ButtonHandler.h diff --git a/examples/all-clusters-app/p6/include/CHIPProjectConfig.h b/examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h similarity index 100% rename from examples/all-clusters-app/p6/include/CHIPProjectConfig.h rename to examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h diff --git a/examples/all-clusters-app/p6/include/ClusterManager.h b/examples/all-clusters-app/infineon/psoc6/include/ClusterManager.h similarity index 100% rename from examples/all-clusters-app/p6/include/ClusterManager.h rename to examples/all-clusters-app/infineon/psoc6/include/ClusterManager.h diff --git a/examples/all-clusters-app/p6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp similarity index 99% rename from examples/all-clusters-app/p6/src/AppTask.cpp rename to examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp index 615660976db3ef..4e0d1c8cf731e8 100644 --- a/examples/all-clusters-app/p6/src/AppTask.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include /* OTA related includes */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -50,7 +50,7 @@ #include #include #include -#include +#include using chip::BDXDownloader; using chip::CharSpan; diff --git a/examples/all-clusters-app/p6/src/ButtonHandler.cpp b/examples/all-clusters-app/infineon/psoc6/src/ButtonHandler.cpp similarity index 100% rename from examples/all-clusters-app/p6/src/ButtonHandler.cpp rename to examples/all-clusters-app/infineon/psoc6/src/ButtonHandler.cpp diff --git a/examples/all-clusters-app/p6/src/ClusterManager.cpp b/examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp similarity index 100% rename from examples/all-clusters-app/p6/src/ClusterManager.cpp rename to examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp diff --git a/examples/all-clusters-app/p6/src/ZclCallbacks.cpp b/examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp similarity index 100% rename from examples/all-clusters-app/p6/src/ZclCallbacks.cpp rename to examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp diff --git a/examples/all-clusters-app/p6/src/main.cpp b/examples/all-clusters-app/infineon/psoc6/src/main.cpp similarity index 99% rename from examples/all-clusters-app/p6/src/main.cpp rename to examples/all-clusters-app/infineon/psoc6/src/main.cpp index 7f38b516b93fe1..84b1961f9a881f 100644 --- a/examples/all-clusters-app/p6/src/main.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/main.cpp @@ -36,7 +36,7 @@ #include "AppConfig.h" #include "cyhal_wdt.h" -#include "init_p6Platform.h" +#include "init_psoc6Platform.h" #include #ifdef HEAP_MONITORING diff --git a/examples/all-clusters-app/infineon/psoc6/third_party/connectedhomeip b/examples/all-clusters-app/infineon/psoc6/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/all-clusters-app/infineon/psoc6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/all-clusters-app/p6/build_overrides b/examples/all-clusters-app/p6/build_overrides deleted file mode 120000 index 194ee0b812dc3d..00000000000000 --- a/examples/all-clusters-app/p6/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides/ \ No newline at end of file diff --git a/examples/all-clusters-app/p6/third_party/connectedhomeip b/examples/all-clusters-app/p6/third_party/connectedhomeip deleted file mode 120000 index 11a54ed360106c..00000000000000 --- a/examples/all-clusters-app/p6/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../ \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/p6/.gn b/examples/all-clusters-minimal-app/infineon/psoc6/.gn similarity index 100% rename from examples/all-clusters-minimal-app/p6/.gn rename to examples/all-clusters-minimal-app/infineon/psoc6/.gn diff --git a/examples/all-clusters-minimal-app/p6/BUILD.gn b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn similarity index 78% rename from examples/all-clusters-minimal-app/p6/BUILD.gn rename to examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn index 53d303ce5f4ecb..2b90698856083a 100644 --- a/examples/all-clusters-minimal-app/p6/BUILD.gn +++ b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn @@ -14,17 +14,18 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/src/platform/device.gni") -import("${p6_sdk_build_root}/p6_executable.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_executable.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") assert(current_os == "freertos") -p6_project_dir = "${chip_root}/examples/all-clusters-minimal-app/p6" -examples_plat_dir = "${chip_root}/examples/platform/p6" +psoc6_project_dir = + "${chip_root}/examples/all-clusters-minimal-app/infineon/psoc6" +examples_plat_dir = "${chip_root}/examples/platform/infineon/psoc6" declare_args() { # Dump memory usage at link time. @@ -40,8 +41,8 @@ declare_args() { build_update_image = false } -config("p6_ota_config") { - linker_script = "${p6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" +config("psoc6_ota_config") { + linker_script = "${psoc6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" ldflags = [ "-T" + rebase_path(linker_script, root_build_dir) ] @@ -78,38 +79,39 @@ config("p6_ota_config") { } } -p6_sdk_sources("all_clusters_app_sdk_sources") { +psoc6_sdk_sources("all_clusters_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/P6", - "${p6_project_dir}/include", + "${chip_root}/src/platform/PSOC6", + "${psoc6_project_dir}/include", "${examples_plat_dir}", ] defines = [ - "BOARD_ID=${p6_board}", + "BOARD_ID=${psoc6_board}", "P6_LOG_ENABLED=1", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}", ] - sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] + sources = [ "${psoc6_project_dir}/include/CHIPProjectConfig.h" ] - public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] + public_configs = + [ "${chip_root}/third_party/infineon/psoc6:psoc6_sdk_config" ] if (chip_enable_ota_requestor) { - public_configs += [ ":p6_ota_config" ] + public_configs += [ ":psoc6_ota_config" ] } } -p6_executable("clusters_minimal_app") { +psoc6_executable("clusters_minimal_app") { include_dirs = [] defines = [] - output_name = "chip-p6-clusters-minimal-example.out" + output_name = "chip-psoc6-clusters-minimal-example.out" sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", - "${examples_plat_dir}/init_p6Platform.cpp", + "${examples_plat_dir}/init_psoc6Platform.cpp", "src/AppTask.cpp", "src/ButtonHandler.cpp", "src/ClusterManager.cpp", @@ -129,7 +131,7 @@ p6_executable("clusters_minimal_app") { include_dirs += [ "include", "${examples_plat_dir}", - "${p6_project_dir}/include", + "${psoc6_project_dir}/include", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", ] @@ -150,10 +152,10 @@ p6_executable("clusters_minimal_app") { output_dir = root_out_dir } -group("p6") { +group("psoc6") { deps = [ ":clusters_minimal_app" ] } group("default") { - deps = [ ":p6" ] + deps = [ ":psoc6" ] } diff --git a/examples/all-clusters-minimal-app/p6/README.md b/examples/all-clusters-minimal-app/infineon/psoc6/README.md similarity index 75% rename from examples/all-clusters-minimal-app/p6/README.md rename to examples/all-clusters-minimal-app/infineon/psoc6/README.md index 730891ccef53a1..1f7a40ef9b28ac 100644 --- a/examples/all-clusters-minimal-app/p6/README.md +++ b/examples/all-clusters-minimal-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP P6 All Clusters Example +#CHIP PSoC6 All Clusters Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter P6 All Clusters Example](#chip-p6-clusters-example) +- [Matter PSoC6 All Clusters Example](#chip-psoc6-clusters-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -20,13 +20,13 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board. ## Introduction -The P6 clusters example provides a baseline demonstration of a Cluster control -device, built using Matter and the Infineon Modustoolbox SDK. It can be +The PSoC6 clusters example provides a baseline demonstration of a Cluster +control device, built using Matter and the Infineon Modustoolbox SDK. It can be controlled by Matter controller over Wi-Fi network. -The P6 device can be commissioned over Bluetooth Low Energy where the device and -the Matter controller will exchange security information with the Rendezvous -procedure. Wi-Fi Network credentials are then provided to the P6 device which +The PSoC6 device can be commissioned over Bluetooth Low Energy where the device +and the Matter controller will exchange security information with the Rendezvous +procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. @@ -36,8 +36,8 @@ will then join the network. - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_p6_example.sh` for downloading the Software and related - tools. + `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + related tools. - Install some additional tools (likely already present for Matter developers): @@ -54,7 +54,7 @@ will then join the network. * Build the example application: $ source scripts/activate.sh - $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-all-clusters-minimal' build + $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-psoc6-all-clusters-minimal' build - To delete generated executable, libraries and object files use: @@ -72,7 +72,7 @@ will then join the network. - On the command line: $ cd ~/connectedhomeip - $ python3 out/infineon-p6-all-clusters-minimal/chip-p6-clusters-minimal-example.flash.py + $ python3 out/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.flash.py @@ -84,7 +84,7 @@ Commissioning can be carried out using BLE. ### Setting up Chip tool -Once P6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to +Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to perform commissioning and cluster control. - Set up python controller. @@ -125,6 +125,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. ## OTA Software Update -For the description of Software Update process with infineon P6 example +For the description of Software Update process with infineon PSoC6 example applications see -[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) diff --git a/examples/all-clusters-minimal-app/p6/args.gni b/examples/all-clusters-minimal-app/infineon/psoc6/args.gni similarity index 89% rename from examples/all-clusters-minimal-app/p6/args.gni rename to examples/all-clusters-minimal-app/infineon/psoc6/args.gni index 2a93385cf36bd6..ce7a2ab93e794d 100644 --- a/examples/all-clusters-minimal-app/p6/args.gni +++ b/examples/all-clusters-minimal-app/infineon/psoc6/args.gni @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/src/platform/P6/args.gni") +import("${chip_root}/src/platform/Infineon/PSOC6/args.gni") -p6_target_project = +psoc6_target_project = get_label_info(":all_clusters_app_sdk_sources", "label_no_toolchain") diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/build_overrides b/examples/all-clusters-minimal-app/infineon/psoc6/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/all-clusters-minimal-app/infineon/psoc6/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/p6/include/AppConfig.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/AppConfig.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/AppConfig.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/AppConfig.h diff --git a/examples/all-clusters-minimal-app/p6/include/AppEvent.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/AppEvent.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/AppEvent.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/AppEvent.h diff --git a/examples/all-clusters-minimal-app/p6/include/AppTask.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/AppTask.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/AppTask.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/AppTask.h diff --git a/examples/all-clusters-minimal-app/p6/include/ButtonHandler.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/ButtonHandler.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/ButtonHandler.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/ButtonHandler.h diff --git a/examples/all-clusters-minimal-app/p6/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/CHIPProjectConfig.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h diff --git a/examples/all-clusters-minimal-app/p6/include/ClusterManager.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/ClusterManager.h similarity index 100% rename from examples/all-clusters-minimal-app/p6/include/ClusterManager.h rename to examples/all-clusters-minimal-app/infineon/psoc6/include/ClusterManager.h diff --git a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp similarity index 99% rename from examples/all-clusters-minimal-app/p6/src/AppTask.cpp rename to examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp index 45a3dfb8af90b7..13eb9e09e01431 100644 --- a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include /* OTA related includes */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -50,7 +50,7 @@ #include #include #include -#include +#include using chip::BDXDownloader; using chip::CharSpan; diff --git a/examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/ButtonHandler.cpp similarity index 100% rename from examples/all-clusters-minimal-app/p6/src/ButtonHandler.cpp rename to examples/all-clusters-minimal-app/infineon/psoc6/src/ButtonHandler.cpp diff --git a/examples/all-clusters-minimal-app/p6/src/ClusterManager.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp similarity index 100% rename from examples/all-clusters-minimal-app/p6/src/ClusterManager.cpp rename to examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp diff --git a/examples/all-clusters-minimal-app/p6/src/ZclCallbacks.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp similarity index 100% rename from examples/all-clusters-minimal-app/p6/src/ZclCallbacks.cpp rename to examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp diff --git a/examples/all-clusters-minimal-app/p6/src/main.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/main.cpp similarity index 96% rename from examples/all-clusters-minimal-app/p6/src/main.cpp rename to examples/all-clusters-minimal-app/infineon/psoc6/src/main.cpp index 7f38b516b93fe1..a7587170607d28 100644 --- a/examples/all-clusters-minimal-app/p6/src/main.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/main.cpp @@ -36,7 +36,7 @@ #include "AppConfig.h" #include "cyhal_wdt.h" -#include "init_p6Platform.h" +#include "init_psoc6Platform.h" #include #ifdef HEAP_MONITORING @@ -143,7 +143,7 @@ int main(void) #endif P6_LOG("==================================================\r\n"); - P6_LOG("chip-p6-all-clusters-example starting Version %d\r\n", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); + P6_LOG("chip-p6-all-clusters-minimal-example starting Version %d\r\n", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); P6_LOG("==================================================\r\n"); /* Start the FreeRTOS scheduler */ diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/third_party/connectedhomeip b/examples/all-clusters-minimal-app/infineon/psoc6/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/all-clusters-minimal-app/infineon/psoc6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/p6/build_overrides b/examples/all-clusters-minimal-app/p6/build_overrides deleted file mode 120000 index 194ee0b812dc3d..00000000000000 --- a/examples/all-clusters-minimal-app/p6/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides/ \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/p6/third_party/connectedhomeip b/examples/all-clusters-minimal-app/p6/third_party/connectedhomeip deleted file mode 120000 index 11a54ed360106c..00000000000000 --- a/examples/all-clusters-minimal-app/p6/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../ \ No newline at end of file diff --git a/examples/build_overrides/cyw30739_sdk.gni b/examples/build_overrides/cyw30739_sdk.gni index d2c81de46ba614..d98ac9866b0a4f 100644 --- a/examples/build_overrides/cyw30739_sdk.gni +++ b/examples/build_overrides/cyw30739_sdk.gni @@ -15,5 +15,5 @@ declare_args() { # Root directory for CYW30739 SDK. cyw30739_sdk_build_root = - "//third_party/connectedhomeip/third_party/cyw30739_sdk" + "//third_party/connectedhomeip/third_party/infineon/cyw30739_sdk" } diff --git a/examples/build_overrides/p6.gni b/examples/build_overrides/psoc6.gni similarity index 73% rename from examples/build_overrides/p6.gni rename to examples/build_overrides/psoc6.gni index 91890631da64bf..87d5ca9f2a295f 100644 --- a/examples/build_overrides/p6.gni +++ b/examples/build_overrides/psoc6.gni @@ -13,11 +13,12 @@ # limitations under the License. declare_args() { - # Root directory for P6 SDK. - p6_sdk_build_root = "//third_party/connectedhomeip/third_party/p6" + # Root directory for PSOC6 SDK. + psoc6_sdk_build_root = + "//third_party/connectedhomeip/third_party/infineon/psoc6" } declare_args() { - # Root directory for p6 SDK sources. - p6_sdk_root = "${p6_sdk_build_root}/p6_sdk" + # Root directory for psoc6 SDK sources. + psoc6_sdk_root = "${psoc6_sdk_build_root}/psoc6_sdk" } diff --git a/examples/lighting-app/cyw30739/build_overrides b/examples/lighting-app/cyw30739/build_overrides deleted file mode 120000 index e578e73312ebd1..00000000000000 --- a/examples/lighting-app/cyw30739/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/cyw30739/third_party/connectedhomeip b/examples/lighting-app/cyw30739/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/lighting-app/cyw30739/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/lighting-app/cyw30739/.gn b/examples/lighting-app/infineon/cyw30739/.gn similarity index 100% rename from examples/lighting-app/cyw30739/.gn rename to examples/lighting-app/infineon/cyw30739/.gn diff --git a/examples/lighting-app/cyw30739/BUILD.gn b/examples/lighting-app/infineon/cyw30739/BUILD.gn similarity index 93% rename from examples/lighting-app/cyw30739/BUILD.gn rename to examples/lighting-app/infineon/cyw30739/BUILD.gn index 86d7342430b378..be63607b0bf97b 100644 --- a/examples/lighting-app/cyw30739/BUILD.gn +++ b/examples/lighting-app/infineon/cyw30739/BUILD.gn @@ -19,8 +19,8 @@ import("//build_overrides/cyw30739_sdk.gni") import("${cyw30739_sdk_build_root}/cyw30739_executable.gni") import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni") -cyw30739_project_dir = "${chip_root}/examples/lighting-app/cyw30739" -examples_plat_dir = "${chip_root}/examples/platform/cyw30739" +cyw30739_project_dir = "${chip_root}/examples/lighting-app/infineon/cyw30739" +examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739" declare_args() { setupPinCode = 20202021 diff --git a/examples/lighting-app/cyw30739/README.md b/examples/lighting-app/infineon/cyw30739/README.md similarity index 93% rename from examples/lighting-app/cyw30739/README.md rename to examples/lighting-app/infineon/cyw30739/README.md index d43e663b5f12e0..72753e2299f942 100644 --- a/examples/lighting-app/cyw30739/README.md +++ b/examples/lighting-app/infineon/cyw30739/README.md @@ -32,7 +32,7 @@ dataset and CASE credentials are then provided. ```bash $ cd ~/connectedhomeip $ git submodule update --init - $ ./scripts/examples/gn_build_example.sh examples/lighting-app/cyw30739 out/lighting-app + $ ./scripts/examples/gn_build_example.sh examples/lighting-app/infineon/cyw30739 out/lighting-app ``` - To delete generated executable, libraries and object files use: @@ -45,7 +45,7 @@ dataset and CASE credentials are then provided. - OR use GN/Ninja directly ```bash - $ cd ~/connectedhomeip/examples/lighting-app/cyw30739 + $ cd ~/connectedhomeip/examples/lighting-app/infineon/cyw30739 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ gn gen out/debug @@ -55,7 +55,7 @@ dataset and CASE credentials are then provided. - To delete generated executable, libraries and object files use: ```bash - $ cd ~/connectedhomeip/examples/lighting-app/cyw30739 + $ cd ~/connectedhomeip/examples/lighting-app/infineon/cyw30739 $ rm -rf out/ ``` @@ -75,7 +75,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - On the command line: ```bash - $ cd ~/connectedhomeip/examples/lighting-app/cyw30739 + $ cd ~/connectedhomeip/examples/lighting-app/infineon/cyw30739 $ python3 out/debug/chip-cyw30739-lighting-example.flash.py ``` diff --git a/examples/lock-app/cyw30739/args.gni b/examples/lighting-app/infineon/cyw30739/args.gni similarity index 93% rename from examples/lock-app/cyw30739/args.gni rename to examples/lighting-app/infineon/cyw30739/args.gni index 267c1db9b56817..ff653ee769356a 100644 --- a/examples/lock-app/cyw30739/args.gni +++ b/examples/lighting-app/infineon/cyw30739/args.gni @@ -13,7 +13,7 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/src/platform/CYW30739/args.gni") +import("${chip_root}/src/platform/Infineon/CYW30739/args.gni") cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/lighting-app/infineon/cyw30739/build_overrides b/examples/lighting-app/infineon/cyw30739/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lighting-app/infineon/cyw30739/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lighting-app/cyw30739/include/AppShellCommands.h b/examples/lighting-app/infineon/cyw30739/include/AppShellCommands.h similarity index 100% rename from examples/lighting-app/cyw30739/include/AppShellCommands.h rename to examples/lighting-app/infineon/cyw30739/include/AppShellCommands.h diff --git a/examples/lighting-app/cyw30739/include/ButtonHandler.h b/examples/lighting-app/infineon/cyw30739/include/ButtonHandler.h similarity index 100% rename from examples/lighting-app/cyw30739/include/ButtonHandler.h rename to examples/lighting-app/infineon/cyw30739/include/ButtonHandler.h diff --git a/examples/lighting-app/cyw30739/include/CHIPProjectConfig.h b/examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h similarity index 100% rename from examples/lighting-app/cyw30739/include/CHIPProjectConfig.h rename to examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h diff --git a/examples/lighting-app/cyw30739/include/LightingManager.h b/examples/lighting-app/infineon/cyw30739/include/LightingManager.h similarity index 100% rename from examples/lighting-app/cyw30739/include/LightingManager.h rename to examples/lighting-app/infineon/cyw30739/include/LightingManager.h diff --git a/examples/lighting-app/cyw30739/src/AppShellCommands.cpp b/examples/lighting-app/infineon/cyw30739/src/AppShellCommands.cpp similarity index 100% rename from examples/lighting-app/cyw30739/src/AppShellCommands.cpp rename to examples/lighting-app/infineon/cyw30739/src/AppShellCommands.cpp diff --git a/examples/lighting-app/cyw30739/src/ButtonHandler.cpp b/examples/lighting-app/infineon/cyw30739/src/ButtonHandler.cpp similarity index 100% rename from examples/lighting-app/cyw30739/src/ButtonHandler.cpp rename to examples/lighting-app/infineon/cyw30739/src/ButtonHandler.cpp diff --git a/examples/lighting-app/cyw30739/src/LightingManager.cpp b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp similarity index 100% rename from examples/lighting-app/cyw30739/src/LightingManager.cpp rename to examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp diff --git a/examples/lighting-app/cyw30739/src/ZclCallbacks.cpp b/examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp similarity index 100% rename from examples/lighting-app/cyw30739/src/ZclCallbacks.cpp rename to examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp diff --git a/examples/lighting-app/cyw30739/src/main.cpp b/examples/lighting-app/infineon/cyw30739/src/main.cpp similarity index 100% rename from examples/lighting-app/cyw30739/src/main.cpp rename to examples/lighting-app/infineon/cyw30739/src/main.cpp diff --git a/examples/lighting-app/cyw30739/static_config.txt b/examples/lighting-app/infineon/cyw30739/static_config.txt similarity index 100% rename from examples/lighting-app/cyw30739/static_config.txt rename to examples/lighting-app/infineon/cyw30739/static_config.txt diff --git a/examples/lighting-app/infineon/cyw30739/third_party/connectedhomeip b/examples/lighting-app/infineon/cyw30739/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/lighting-app/infineon/cyw30739/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/lighting-app/p6/.gn b/examples/lighting-app/infineon/psoc6/.gn similarity index 100% rename from examples/lighting-app/p6/.gn rename to examples/lighting-app/infineon/psoc6/.gn diff --git a/examples/lighting-app/p6/BUILD.gn b/examples/lighting-app/infineon/psoc6/BUILD.gn similarity index 77% rename from examples/lighting-app/p6/BUILD.gn rename to examples/lighting-app/infineon/psoc6/BUILD.gn index 7e6608f45c60d7..08a91b1180728f 100644 --- a/examples/lighting-app/p6/BUILD.gn +++ b/examples/lighting-app/infineon/psoc6/BUILD.gn @@ -14,17 +14,17 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/src/platform/device.gni") -import("${p6_sdk_build_root}/p6_executable.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_executable.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") assert(current_os == "freertos") -p6_project_dir = "${chip_root}/examples/lighting-app/p6" -examples_plat_dir = "${chip_root}/examples/platform/p6" +psoc6_project_dir = "${chip_root}/examples/lighting-app/infineon/psoc6" +examples_plat_dir = "${chip_root}/examples/platform/infineon/psoc6" declare_args() { # Dump memory usage at link time. @@ -40,8 +40,8 @@ declare_args() { build_update_image = false } -config("p6_ota_config") { - linker_script = "${p6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" +config("psoc6_ota_config") { + linker_script = "${psoc6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" ldflags = [ "-T" + rebase_path(linker_script, root_build_dir) ] @@ -78,35 +78,37 @@ config("p6_ota_config") { } } -p6_sdk_sources("lighting_app_sdk_sources") { +psoc6_sdk_sources("lighting_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/P6", - "${p6_project_dir}/include", + "${chip_root}/src/platform/PSOC6", + "${psoc6_project_dir}/include", "${examples_plat_dir}", ] defines = [ - "BOARD_ID=${p6_board}", + "BOARD_ID=${psoc6_board}", "P6_LOG_ENABLED=1", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}", ] - sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] - public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] + sources = [ "${psoc6_project_dir}/include/CHIPProjectConfig.h" ] + + public_configs = + [ "${chip_root}/third_party/infineon/psoc6:psoc6_sdk_config" ] if (chip_enable_ota_requestor) { - public_configs += [ ":p6_ota_config" ] + public_configs += [ ":psoc6_ota_config" ] } } -p6_executable("lighting_app") { +psoc6_executable("lighting_app") { include_dirs = [] defines = [] - output_name = "chip-p6-lighting-example.out" + output_name = "chip-psoc6-lighting-example.out" sources = [ "${examples_plat_dir}/LEDWidget.cpp", - "${examples_plat_dir}/init_p6Platform.cpp", + "${examples_plat_dir}/init_psoc6Platform.cpp", "src/AppTask.cpp", "src/ButtonHandler.cpp", "src/LightingManager.cpp", @@ -126,7 +128,7 @@ p6_executable("lighting_app") { include_dirs += [ "include", "${examples_plat_dir}", - "${p6_project_dir}/include", + "${psoc6_project_dir}/include", ] defines = [] @@ -146,10 +148,10 @@ p6_executable("lighting_app") { output_dir = root_out_dir } -group("p6") { +group("psoc6") { deps = [ ":lighting_app" ] } group("default") { - deps = [ ":p6" ] + deps = [ ":psoc6" ] } diff --git a/examples/lighting-app/p6/README.md b/examples/lighting-app/infineon/psoc6/README.md similarity index 81% rename from examples/lighting-app/p6/README.md rename to examples/lighting-app/infineon/psoc6/README.md index e37894efcafb2d..ea229f0f391029 100644 --- a/examples/lighting-app/p6/README.md +++ b/examples/lighting-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP P6 Lighting Example +#CHIP PSoC6 Lighting Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter P6 Lighting Example](#chip-p6-Lighting-example) +- [Matter PSoC6 Lighting Example](#chip-psoc6-Lighting-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -21,13 +21,13 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board. ## Introduction -The P6 lighting example provides a baseline demonstration of a Light control +The PSoC6 lighting example provides a baseline demonstration of a Light control device, built using Matter and the Infineon Modustoolbox SDK. It can be controlled by Matter controller over Wi-Fi network. -The P6 device can be commissioned over Bluetooth Low Energy where the device and -the Matter controller will exchange security information with the Rendezvous -procedure. Wi-Fi Network credentials are then provided to the P6 device which +The PSoC6 device can be commissioned over Bluetooth Low Energy where the device +and the Matter controller will exchange security information with the Rendezvous +procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. @@ -37,8 +37,8 @@ will then join the network. - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_p6_example.sh` for downloading the Software and related - tools. + `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + related tools. - Install some additional tools (likely already present for Matter developers): \$ sudo apt install gcc g++ clang ninja-build python @@ -51,7 +51,7 @@ will then join the network. * Build the example application: $ source scripts/activate.sh - $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-light' build + $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-psoc6-light' build - To delete generated executable, libraries and object files use: @@ -69,7 +69,7 @@ will then join the network. - On the command line: $ cd ~/connectedhomeip - $ python3 out/infineon-p6-light/chip-p6-lighting-example.flash.py + $ python3 out/infineon-psoc6-light/chip-psoc6-lighting-example.flash.py @@ -81,7 +81,7 @@ Commissioning can be carried out using BLE. ### Setting up Chip tool -Once P6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to +Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to perform commissioning and cluster control. - Set up python controller. @@ -139,6 +139,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. ## OTA Software Update -For the description of Software Update process with infineon P6 example +For the description of Software Update process with infineon PSoC6 example applications see -[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) diff --git a/examples/lighting-app/p6/args.gni b/examples/lighting-app/infineon/psoc6/args.gni similarity index 89% rename from examples/lighting-app/p6/args.gni rename to examples/lighting-app/infineon/psoc6/args.gni index f239efee01e5da..9ca701ab363c9f 100644 --- a/examples/lighting-app/p6/args.gni +++ b/examples/lighting-app/infineon/psoc6/args.gni @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/src/platform/P6/args.gni") +import("${chip_root}/src/platform/Infineon/PSOC6/args.gni") -p6_target_project = +psoc6_target_project = get_label_info(":lighting_app_sdk_sources", "label_no_toolchain") diff --git a/examples/lighting-app/infineon/psoc6/build_overrides b/examples/lighting-app/infineon/psoc6/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lighting-app/infineon/psoc6/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lighting-app/p6/include/AppConfig.h b/examples/lighting-app/infineon/psoc6/include/AppConfig.h similarity index 100% rename from examples/lighting-app/p6/include/AppConfig.h rename to examples/lighting-app/infineon/psoc6/include/AppConfig.h diff --git a/examples/lighting-app/p6/include/AppEvent.h b/examples/lighting-app/infineon/psoc6/include/AppEvent.h similarity index 100% rename from examples/lighting-app/p6/include/AppEvent.h rename to examples/lighting-app/infineon/psoc6/include/AppEvent.h diff --git a/examples/lighting-app/p6/include/AppTask.h b/examples/lighting-app/infineon/psoc6/include/AppTask.h similarity index 100% rename from examples/lighting-app/p6/include/AppTask.h rename to examples/lighting-app/infineon/psoc6/include/AppTask.h diff --git a/examples/lighting-app/p6/include/ButtonHandler.h b/examples/lighting-app/infineon/psoc6/include/ButtonHandler.h similarity index 100% rename from examples/lighting-app/p6/include/ButtonHandler.h rename to examples/lighting-app/infineon/psoc6/include/ButtonHandler.h diff --git a/examples/lighting-app/p6/include/CHIPProjectConfig.h b/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h similarity index 100% rename from examples/lighting-app/p6/include/CHIPProjectConfig.h rename to examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h diff --git a/examples/lighting-app/p6/include/LightingManager.h b/examples/lighting-app/infineon/psoc6/include/LightingManager.h similarity index 100% rename from examples/lighting-app/p6/include/LightingManager.h rename to examples/lighting-app/infineon/psoc6/include/LightingManager.h diff --git a/examples/lighting-app/p6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp similarity index 99% rename from examples/lighting-app/p6/src/AppTask.cpp rename to examples/lighting-app/infineon/psoc6/src/AppTask.cpp index 08f9b76a1a3f8f..2ee2baf54bcde8 100644 --- a/examples/lighting-app/p6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include /* OTA related includes */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -48,7 +48,7 @@ #include #include #include -#include +#include using chip::BDXDownloader; using chip::CharSpan; diff --git a/examples/lighting-app/p6/src/ButtonHandler.cpp b/examples/lighting-app/infineon/psoc6/src/ButtonHandler.cpp similarity index 100% rename from examples/lighting-app/p6/src/ButtonHandler.cpp rename to examples/lighting-app/infineon/psoc6/src/ButtonHandler.cpp diff --git a/examples/lighting-app/p6/src/LightingManager.cpp b/examples/lighting-app/infineon/psoc6/src/LightingManager.cpp similarity index 100% rename from examples/lighting-app/p6/src/LightingManager.cpp rename to examples/lighting-app/infineon/psoc6/src/LightingManager.cpp diff --git a/examples/lighting-app/p6/src/ZclCallbacks.cpp b/examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp similarity index 100% rename from examples/lighting-app/p6/src/ZclCallbacks.cpp rename to examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp diff --git a/examples/lighting-app/p6/src/main.cpp b/examples/lighting-app/infineon/psoc6/src/main.cpp similarity index 99% rename from examples/lighting-app/p6/src/main.cpp rename to examples/lighting-app/infineon/psoc6/src/main.cpp index 9c5daa77856b60..a2dcdae1cc63f1 100644 --- a/examples/lighting-app/p6/src/main.cpp +++ b/examples/lighting-app/infineon/psoc6/src/main.cpp @@ -35,7 +35,7 @@ #include "AppConfig.h" #include "cyhal_wdt.h" -#include "init_p6Platform.h" +#include "init_psoc6Platform.h" #include #ifdef HEAP_MONITORING diff --git a/examples/lighting-app/infineon/psoc6/third_party/connectedhomeip b/examples/lighting-app/infineon/psoc6/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/lighting-app/infineon/psoc6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/lighting-app/p6/build_overrides b/examples/lighting-app/p6/build_overrides deleted file mode 120000 index e578e73312ebd1..00000000000000 --- a/examples/lighting-app/p6/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/p6/third_party/connectedhomeip b/examples/lighting-app/p6/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/lighting-app/p6/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/lock-app/cyw30739/build_overrides b/examples/lock-app/cyw30739/build_overrides deleted file mode 120000 index e578e73312ebd1..00000000000000 --- a/examples/lock-app/cyw30739/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides \ No newline at end of file diff --git a/examples/lock-app/cyw30739/third_party/connectedhomeip b/examples/lock-app/cyw30739/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/lock-app/cyw30739/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/lock-app/cyw30739/.gn b/examples/lock-app/infineon/cyw30739/.gn similarity index 100% rename from examples/lock-app/cyw30739/.gn rename to examples/lock-app/infineon/cyw30739/.gn diff --git a/examples/lock-app/cyw30739/BUILD.gn b/examples/lock-app/infineon/cyw30739/BUILD.gn similarity index 93% rename from examples/lock-app/cyw30739/BUILD.gn rename to examples/lock-app/infineon/cyw30739/BUILD.gn index 87f0e15e92bff3..8d0cc6333d32d9 100644 --- a/examples/lock-app/cyw30739/BUILD.gn +++ b/examples/lock-app/infineon/cyw30739/BUILD.gn @@ -19,8 +19,8 @@ import("//build_overrides/cyw30739_sdk.gni") import("${cyw30739_sdk_build_root}/cyw30739_executable.gni") import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni") -cyw30739_project_dir = "${chip_root}/examples/lock-app/cyw30739" -examples_plat_dir = "${chip_root}/examples/platform/cyw30739" +cyw30739_project_dir = "${chip_root}/examples/lock-app/infineon/cyw30739" +examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739" declare_args() { setupPinCode = 20202021 diff --git a/examples/lock-app/cyw30739/README.md b/examples/lock-app/infineon/cyw30739/README.md similarity index 92% rename from examples/lock-app/cyw30739/README.md rename to examples/lock-app/infineon/cyw30739/README.md index 41a6a23598d3df..12ac917071ce55 100644 --- a/examples/lock-app/cyw30739/README.md +++ b/examples/lock-app/infineon/cyw30739/README.md @@ -32,7 +32,7 @@ dataset and CASE credentials are then provided. ```bash $ cd ~/connectedhomeip $ git submodule update --init - $ ./scripts/examples/gn_build_example.sh examples/lock-app/cyw30739 out/lock-app + $ ./scripts/examples/gn_build_example.sh examples/lock-app/infineon/cyw30739 out/lock-app ``` - To delete generated executable, libraries and object files use: @@ -45,7 +45,7 @@ dataset and CASE credentials are then provided. - OR use GN/Ninja directly ```bash - $ cd ~/connectedhomeip/examples/lock-app/cyw30739 + $ cd ~/connectedhomeip/examples/lock-app/infineon/cyw30739 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ gn gen out/debug @@ -55,7 +55,7 @@ dataset and CASE credentials are then provided. - To delete generated executable, libraries and object files use: ```bash - $ cd ~/connectedhomeip/examples/lock-app/cyw30739 + $ cd ~/connectedhomeip/examples/lock-app/infineon/cyw30739 $ rm -rf out/ ``` @@ -75,7 +75,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - On the command line: ```bash - $ cd ~/connectedhomeip/examples/lock-app/cyw30739 + $ cd ~/connectedhomeip/examples/lock-app/infineon/cyw30739 $ python3 out/debug/chip-cyw30739-lock-example.flash.py ``` diff --git a/examples/lighting-app/cyw30739/args.gni b/examples/lock-app/infineon/cyw30739/args.gni similarity index 93% rename from examples/lighting-app/cyw30739/args.gni rename to examples/lock-app/infineon/cyw30739/args.gni index 267c1db9b56817..ff653ee769356a 100644 --- a/examples/lighting-app/cyw30739/args.gni +++ b/examples/lock-app/infineon/cyw30739/args.gni @@ -13,7 +13,7 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/src/platform/CYW30739/args.gni") +import("${chip_root}/src/platform/Infineon/CYW30739/args.gni") cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/lock-app/infineon/cyw30739/build_overrides b/examples/lock-app/infineon/cyw30739/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lock-app/infineon/cyw30739/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lock-app/cyw30739/include/AppEvent.h b/examples/lock-app/infineon/cyw30739/include/AppEvent.h similarity index 100% rename from examples/lock-app/cyw30739/include/AppEvent.h rename to examples/lock-app/infineon/cyw30739/include/AppEvent.h diff --git a/examples/lock-app/cyw30739/include/AppShellCommands.h b/examples/lock-app/infineon/cyw30739/include/AppShellCommands.h similarity index 100% rename from examples/lock-app/cyw30739/include/AppShellCommands.h rename to examples/lock-app/infineon/cyw30739/include/AppShellCommands.h diff --git a/examples/lock-app/cyw30739/include/ButtonHandler.h b/examples/lock-app/infineon/cyw30739/include/ButtonHandler.h similarity index 100% rename from examples/lock-app/cyw30739/include/ButtonHandler.h rename to examples/lock-app/infineon/cyw30739/include/ButtonHandler.h diff --git a/examples/lock-app/cyw30739/include/CHIPProjectConfig.h b/examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h similarity index 100% rename from examples/lock-app/cyw30739/include/CHIPProjectConfig.h rename to examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h diff --git a/examples/lock-app/cyw30739/include/LockManager.h b/examples/lock-app/infineon/cyw30739/include/LockManager.h similarity index 100% rename from examples/lock-app/cyw30739/include/LockManager.h rename to examples/lock-app/infineon/cyw30739/include/LockManager.h diff --git a/examples/lock-app/cyw30739/include/chip_lock.h b/examples/lock-app/infineon/cyw30739/include/chip_lock.h similarity index 100% rename from examples/lock-app/cyw30739/include/chip_lock.h rename to examples/lock-app/infineon/cyw30739/include/chip_lock.h diff --git a/examples/lock-app/cyw30739/src/AppShellCommands.cpp b/examples/lock-app/infineon/cyw30739/src/AppShellCommands.cpp similarity index 100% rename from examples/lock-app/cyw30739/src/AppShellCommands.cpp rename to examples/lock-app/infineon/cyw30739/src/AppShellCommands.cpp diff --git a/examples/lock-app/cyw30739/src/ButtonHandler.cpp b/examples/lock-app/infineon/cyw30739/src/ButtonHandler.cpp similarity index 100% rename from examples/lock-app/cyw30739/src/ButtonHandler.cpp rename to examples/lock-app/infineon/cyw30739/src/ButtonHandler.cpp diff --git a/examples/lock-app/cyw30739/src/LockManager.cpp b/examples/lock-app/infineon/cyw30739/src/LockManager.cpp similarity index 100% rename from examples/lock-app/cyw30739/src/LockManager.cpp rename to examples/lock-app/infineon/cyw30739/src/LockManager.cpp diff --git a/examples/lock-app/cyw30739/src/ZclCallbacks.cpp b/examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp similarity index 100% rename from examples/lock-app/cyw30739/src/ZclCallbacks.cpp rename to examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp diff --git a/examples/lock-app/cyw30739/src/main.cpp b/examples/lock-app/infineon/cyw30739/src/main.cpp similarity index 100% rename from examples/lock-app/cyw30739/src/main.cpp rename to examples/lock-app/infineon/cyw30739/src/main.cpp diff --git a/examples/lock-app/cyw30739/static_config.txt b/examples/lock-app/infineon/cyw30739/static_config.txt similarity index 100% rename from examples/lock-app/cyw30739/static_config.txt rename to examples/lock-app/infineon/cyw30739/static_config.txt diff --git a/examples/lock-app/infineon/cyw30739/third_party/connectedhomeip b/examples/lock-app/infineon/cyw30739/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/lock-app/infineon/cyw30739/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/lock-app/p6/.gn b/examples/lock-app/infineon/psoc6/.gn similarity index 100% rename from examples/lock-app/p6/.gn rename to examples/lock-app/infineon/psoc6/.gn diff --git a/examples/lock-app/p6/BUILD.gn b/examples/lock-app/infineon/psoc6/BUILD.gn similarity index 75% rename from examples/lock-app/p6/BUILD.gn rename to examples/lock-app/infineon/psoc6/BUILD.gn index b0db8078d672b5..83823b18d0eaff 100644 --- a/examples/lock-app/p6/BUILD.gn +++ b/examples/lock-app/infineon/psoc6/BUILD.gn @@ -14,17 +14,17 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/src/platform/device.gni") -import("${p6_sdk_build_root}/p6_executable.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_executable.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") assert(current_os == "freertos") -p6_project_dir = "${chip_root}/examples/lock-app/p6" -examples_plat_dir = "${chip_root}/examples/platform/p6" +psoc6_project_dir = "${chip_root}/examples/lock-app/infineon/psoc6" +examples_plat_dir = "${chip_root}/examples/platform/infineon/psoc6" declare_args() { # Dump memory usage at link time. @@ -37,8 +37,8 @@ declare_args() { build_update_image = false } -config("p6_ota_config") { - linker_script = "${p6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" +config("psoc6_ota_config") { + linker_script = "${psoc6_sdk_root}/ota/cy8c6xxa_cm4_dual_ota_int.ld" ldflags = [ "-T" + rebase_path(linker_script, root_build_dir) ] @@ -74,32 +74,33 @@ config("p6_ota_config") { defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=2" ] } } -p6_sdk_sources("lock_app_sdk_sources") { +psoc6_sdk_sources("lock_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/P6", - "${p6_project_dir}/include", + "${chip_root}/src/platform/PSOC6", + "${psoc6_project_dir}/include", "${examples_plat_dir}", ] defines = [ - "BOARD_ID=${p6_board}", + "BOARD_ID=${psoc6_board}", "P6_LOG_ENABLED=1", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}", ] - sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] + sources = [ "${psoc6_project_dir}/include/CHIPProjectConfig.h" ] - public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] + public_configs = + [ "${chip_root}/third_party/infineon/psoc6:psoc6_sdk_config" ] if (chip_enable_ota_requestor) { - public_configs += [ ":p6_ota_config" ] + public_configs += [ ":psoc6_ota_config" ] } } -p6_executable("lock_app") { +psoc6_executable("lock_app") { include_dirs = [] defines = [] - output_name = "chip-p6-lock-example.out" + output_name = "chip-psoc6-lock-example.out" public_deps = [ ":lock_app_sdk_sources", @@ -113,13 +114,13 @@ p6_executable("lock_app") { include_dirs += [ "include", "${examples_plat_dir}", - "${p6_project_dir}/include", + "${psoc6_project_dir}/include", ] sources = [ "${examples_plat_dir}/LEDWidget.cpp", - "${examples_plat_dir}/init_p6Platform.cpp", - "${p6_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/init_psoc6Platform.cpp", + "${psoc6_project_dir}/include/CHIPProjectConfig.h", "src/AppTask.cpp", "src/ButtonHandler.cpp", "src/LockManager.cpp", @@ -137,10 +138,10 @@ p6_executable("lock_app") { } } -group("p6") { +group("psoc6") { deps = [ ":lock_app" ] } group("default") { - deps = [ ":p6" ] + deps = [ ":psoc6" ] } diff --git a/examples/lock-app/p6/README.md b/examples/lock-app/infineon/psoc6/README.md similarity index 81% rename from examples/lock-app/p6/README.md rename to examples/lock-app/infineon/psoc6/README.md index 345782204802df..5046ce5c0343c7 100644 --- a/examples/lock-app/p6/README.md +++ b/examples/lock-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -# Matter P6 Lock Example +# Matter PSoC6 Lock Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter P6 Lock Example](#chip-p6-lock-example) +- [Matter PSoC6 Lock Example](#chip-psoc6-lock-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -21,13 +21,13 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board. ## Introduction -The P6 lock example provides a demonstration of a door lock control device, +The PSoC6 lock example provides a demonstration of a door lock control device, built using Matter and the Infineon Modustoolbox SDK. It can be controlled by a Matter controller over Wi-Fi network. -The P6 device can be commissioned over Bluetooth Low Energy where the device and -the Matter controller will exchange security information with the Rendezvous -procedure. Wi-Fi Network credentials are then provided to the P6 device which +The PSoC6 device can be commissioned over Bluetooth Low Energy where the device +and the Matter controller will exchange security information with the Rendezvous +procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. @@ -37,8 +37,8 @@ will then join the network. - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_p6_example.sh` for downloading the Software and related - tools. + `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + related tools. - Install some additional tools (likely already present for Matter developers): \$ sudo apt install gcc g++ clang ninja-build python @@ -51,7 +51,7 @@ will then join the network. * Build the example application: $ source scripts/activate.sh - $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-lock' build + $ scripts/build/build_examples.py --no-log-timestamps --target 'infineon-psoc6-lock' build - To delete generated executable, libraries and object files use: @@ -69,7 +69,7 @@ will then join the network. - On the command line: $ cd ~/connectedhomeip - $ python3 out/infineon-p6-lock/chip-p6-lock-example.flash.py + $ python3 out/infineon-psoc6-lock/chip-psoc6-lock-example.flash.py @@ -81,7 +81,7 @@ Commissioning can be carried out using BLE. ### Setting up Chip tool -Once P6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to +Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to perform commissioning and cluster control. - Set up python controller. @@ -139,6 +139,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. ## OTA Software Update -For the description of Software Update process with infineon P6 example +For the description of Software Update process with infineon PSoC6 example applications see -[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../docs/guides/infineon_psoc6_software_update.md) diff --git a/examples/lock-app/p6/args.gni b/examples/lock-app/infineon/psoc6/args.gni similarity index 89% rename from examples/lock-app/p6/args.gni rename to examples/lock-app/infineon/psoc6/args.gni index a83cf1abdcb38e..62bdc6d3f6908c 100644 --- a/examples/lock-app/p6/args.gni +++ b/examples/lock-app/infineon/psoc6/args.gni @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/src/platform/P6/args.gni") +import("${chip_root}/src/platform/Infineon/PSOC6/args.gni") -p6_target_project = +psoc6_target_project = get_label_info(":lock_app_sdk_sources", "label_no_toolchain") diff --git a/examples/lock-app/infineon/psoc6/build_overrides b/examples/lock-app/infineon/psoc6/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lock-app/infineon/psoc6/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lock-app/p6/include/AppConfig.h b/examples/lock-app/infineon/psoc6/include/AppConfig.h similarity index 100% rename from examples/lock-app/p6/include/AppConfig.h rename to examples/lock-app/infineon/psoc6/include/AppConfig.h diff --git a/examples/lock-app/p6/include/AppEvent.h b/examples/lock-app/infineon/psoc6/include/AppEvent.h similarity index 100% rename from examples/lock-app/p6/include/AppEvent.h rename to examples/lock-app/infineon/psoc6/include/AppEvent.h diff --git a/examples/lock-app/p6/include/AppTask.h b/examples/lock-app/infineon/psoc6/include/AppTask.h similarity index 100% rename from examples/lock-app/p6/include/AppTask.h rename to examples/lock-app/infineon/psoc6/include/AppTask.h diff --git a/examples/lock-app/p6/include/ButtonHandler.h b/examples/lock-app/infineon/psoc6/include/ButtonHandler.h similarity index 100% rename from examples/lock-app/p6/include/ButtonHandler.h rename to examples/lock-app/infineon/psoc6/include/ButtonHandler.h diff --git a/examples/lock-app/p6/include/CHIPProjectConfig.h b/examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h similarity index 100% rename from examples/lock-app/p6/include/CHIPProjectConfig.h rename to examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h diff --git a/examples/lock-app/p6/include/LockManager.h b/examples/lock-app/infineon/psoc6/include/LockManager.h similarity index 100% rename from examples/lock-app/p6/include/LockManager.h rename to examples/lock-app/infineon/psoc6/include/LockManager.h diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp similarity index 99% rename from examples/lock-app/p6/src/AppTask.cpp rename to examples/lock-app/infineon/psoc6/src/AppTask.cpp index f93438d47cbbf5..fe4baf6eb3f752 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include @@ -56,7 +56,7 @@ #include #include #include -#include +#include using chip::BDXDownloader; using chip::CharSpan; diff --git a/examples/lock-app/p6/src/ButtonHandler.cpp b/examples/lock-app/infineon/psoc6/src/ButtonHandler.cpp similarity index 100% rename from examples/lock-app/p6/src/ButtonHandler.cpp rename to examples/lock-app/infineon/psoc6/src/ButtonHandler.cpp diff --git a/examples/lock-app/p6/src/LockManager.cpp b/examples/lock-app/infineon/psoc6/src/LockManager.cpp similarity index 99% rename from examples/lock-app/p6/src/LockManager.cpp rename to examples/lock-app/infineon/psoc6/src/LockManager.cpp index d83b984b789779..059f059f3735eb 100644 --- a/examples/lock-app/p6/src/LockManager.cpp +++ b/examples/lock-app/infineon/psoc6/src/LockManager.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include LockManager LockManager::sLock; diff --git a/examples/lock-app/p6/src/ZclCallbacks.cpp b/examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp similarity index 100% rename from examples/lock-app/p6/src/ZclCallbacks.cpp rename to examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp diff --git a/examples/lock-app/p6/src/main.cpp b/examples/lock-app/infineon/psoc6/src/main.cpp similarity index 99% rename from examples/lock-app/p6/src/main.cpp rename to examples/lock-app/infineon/psoc6/src/main.cpp index f998b3c4e54f54..8dc525dc8d717f 100644 --- a/examples/lock-app/p6/src/main.cpp +++ b/examples/lock-app/infineon/psoc6/src/main.cpp @@ -35,7 +35,7 @@ #include "AppConfig.h" #include "cyhal_wdt.h" -#include "init_p6Platform.h" +#include "init_psoc6Platform.h" #include #define MAIN_TASK_STACK_SIZE (4096) diff --git a/examples/lock-app/infineon/psoc6/third_party/connectedhomeip b/examples/lock-app/infineon/psoc6/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/lock-app/infineon/psoc6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/lock-app/p6/build_overrides b/examples/lock-app/p6/build_overrides deleted file mode 120000 index 194ee0b812dc3d..00000000000000 --- a/examples/lock-app/p6/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides/ \ No newline at end of file diff --git a/examples/lock-app/p6/third_party/connectedhomeip b/examples/lock-app/p6/third_party/connectedhomeip deleted file mode 120000 index 11a54ed360106c..00000000000000 --- a/examples/lock-app/p6/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../ \ No newline at end of file diff --git a/examples/ota-requestor-app/cyw30739/build_overrides b/examples/ota-requestor-app/cyw30739/build_overrides deleted file mode 120000 index e578e73312ebd1..00000000000000 --- a/examples/ota-requestor-app/cyw30739/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides \ No newline at end of file diff --git a/examples/ota-requestor-app/cyw30739/third_party/connectedhomeip b/examples/ota-requestor-app/cyw30739/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/ota-requestor-app/cyw30739/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/ota-requestor-app/cyw30739/.gn b/examples/ota-requestor-app/infineon/cyw30739/.gn similarity index 100% rename from examples/ota-requestor-app/cyw30739/.gn rename to examples/ota-requestor-app/infineon/cyw30739/.gn diff --git a/examples/ota-requestor-app/cyw30739/BUILD.gn b/examples/ota-requestor-app/infineon/cyw30739/BUILD.gn similarity index 92% rename from examples/ota-requestor-app/cyw30739/BUILD.gn rename to examples/ota-requestor-app/infineon/cyw30739/BUILD.gn index b1ea6fde6aa876..3701330b0f7113 100644 --- a/examples/ota-requestor-app/cyw30739/BUILD.gn +++ b/examples/ota-requestor-app/infineon/cyw30739/BUILD.gn @@ -19,8 +19,9 @@ import("//build_overrides/cyw30739_sdk.gni") import("${cyw30739_sdk_build_root}/cyw30739_executable.gni") import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni") -cyw30739_project_dir = "${chip_root}/examples/ota-requestor-app/cyw30739" -examples_plat_dir = "${chip_root}/examples/platform/cyw30739" +cyw30739_project_dir = + "${chip_root}/examples/ota-requestor-app/infineon/cyw30739" +examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739" declare_args() { setupPinCode = 20202021 diff --git a/examples/ota-requestor-app/cyw30739/README.md b/examples/ota-requestor-app/infineon/cyw30739/README.md similarity index 93% rename from examples/ota-requestor-app/cyw30739/README.md rename to examples/ota-requestor-app/infineon/cyw30739/README.md index 49737cd4f270fc..7ac0990009fbcd 100644 --- a/examples/ota-requestor-app/cyw30739/README.md +++ b/examples/ota-requestor-app/infineon/cyw30739/README.md @@ -33,7 +33,7 @@ dataset and CASE credentials are then provided. ```bash $ cd ~/connectedhomeip $ git submodule update --init - $ ./scripts/examples/gn_build_example.sh examples/ota-requestor-app/cyw30739 out/ota-requestor-app + $ ./scripts/examples/gn_build_example.sh examples/ota-requestor-app/infineon/cyw30739 out/ota-requestor-app ``` - To delete generated executable, libraries and object files use: @@ -46,7 +46,7 @@ dataset and CASE credentials are then provided. - OR use GN/Ninja directly ```bash - $ cd ~/connectedhomeip/examples/ota-requestor-app/cyw30739 + $ cd ~/connectedhomeip/examples/ota-requestor-app/infineon/cyw30739 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ gn gen out/debug @@ -56,7 +56,7 @@ dataset and CASE credentials are then provided. - To delete generated executable, libraries and object files use: ```bash - $ cd ~/connectedhomeip/examples/ota-requestor-app/cyw30739 + $ cd ~/connectedhomeip/examples/ota-requestor-app/infineon/cyw30739 $ rm -rf out/ ``` @@ -76,7 +76,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - On the command line: ```bash - $ cd ~/connectedhomeip/examples/ota-requestor-app/cyw30739 + $ cd ~/connectedhomeip/examples/ota-requestor-app/infineon/cyw30739 $ python3 out/debug/chip-cyw30739-ota-requestor-example.flash.py ``` diff --git a/examples/ota-requestor-app/cyw30739/args.gni b/examples/ota-requestor-app/infineon/cyw30739/args.gni similarity index 92% rename from examples/ota-requestor-app/cyw30739/args.gni rename to examples/ota-requestor-app/infineon/cyw30739/args.gni index 8eda8fb616b4aa..37d8fa8d701fb9 100644 --- a/examples/ota-requestor-app/cyw30739/args.gni +++ b/examples/ota-requestor-app/infineon/cyw30739/args.gni @@ -13,7 +13,7 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/src/platform/CYW30739/args.gni") +import("${chip_root}/src/platform/Infineon/CYW30739/args.gni") cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/ota-requestor-app/infineon/cyw30739/build_overrides b/examples/ota-requestor-app/infineon/cyw30739/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/ota-requestor-app/infineon/cyw30739/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/ota-requestor-app/cyw30739/include/CHIPProjectConfig.h b/examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h similarity index 100% rename from examples/ota-requestor-app/cyw30739/include/CHIPProjectConfig.h rename to examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h diff --git a/examples/ota-requestor-app/cyw30739/src/main.cpp b/examples/ota-requestor-app/infineon/cyw30739/src/main.cpp similarity index 100% rename from examples/ota-requestor-app/cyw30739/src/main.cpp rename to examples/ota-requestor-app/infineon/cyw30739/src/main.cpp diff --git a/examples/ota-requestor-app/cyw30739/static_config.txt b/examples/ota-requestor-app/infineon/cyw30739/static_config.txt similarity index 100% rename from examples/ota-requestor-app/cyw30739/static_config.txt rename to examples/ota-requestor-app/infineon/cyw30739/static_config.txt diff --git a/examples/ota-requestor-app/infineon/cyw30739/third_party/connectedhomeip b/examples/ota-requestor-app/infineon/cyw30739/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/ota-requestor-app/infineon/cyw30739/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/persistent-storage/p6/.gn b/examples/persistent-storage/infineon/psoc6/.gn similarity index 100% rename from examples/persistent-storage/p6/.gn rename to examples/persistent-storage/infineon/psoc6/.gn diff --git a/examples/persistent-storage/p6/BUILD.gn b/examples/persistent-storage/infineon/psoc6/BUILD.gn similarity index 63% rename from examples/persistent-storage/p6/BUILD.gn rename to examples/persistent-storage/infineon/psoc6/BUILD.gn index 944a2e07178056..d359f833815136 100644 --- a/examples/persistent-storage/p6/BUILD.gn +++ b/examples/persistent-storage/infineon/psoc6/BUILD.gn @@ -14,43 +14,44 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${build_root}/config/defaults.gni") -import("${p6_sdk_build_root}/p6_executable.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_executable.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") assert(current_os == "freertos") -p6_project_dir = "${chip_root}/examples/persistent-storage/p6" -examples_plat_dir = "${chip_root}/examples/platform/p6" +psoc6_project_dir = "${chip_root}/examples/persistent-storage/infineon/psoc6" +examples_plat_dir = "${chip_root}/examples/platform/infineon/psoc6" declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false } -p6_sdk_sources("persistent_storage_app_sdk_sources") { +psoc6_sdk_sources("persistent_storage_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/P6", - "${p6_project_dir}/include", + "${chip_root}/src/platform/Infineon/PSOC6", + "${psoc6_project_dir}/include", "${examples_plat_dir}", ] defines = [ - "BOARD_ID=${p6_board}", + "BOARD_ID=${psoc6_board}", "P6_LOG_ENABLED=1", ] - sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] + sources = [ "${psoc6_project_dir}/include/CHIPProjectConfig.h" ] - public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] + public_configs = + [ "${chip_root}/third_party/infineon/psoc6:psoc6_sdk_config" ] } -p6_executable("persistent_storage_app") { +psoc6_executable("persistent_storage_app") { include_dirs = [] defines = [] - output_name = "chip-p6-persistent-storage-example.out" + output_name = "chip-psoc6-persistent-storage-example.out" public_deps = [ ":persistent_storage_app_sdk_sources", @@ -61,14 +62,14 @@ p6_executable("persistent_storage_app") { include_dirs += [ "include", "${examples_plat_dir}", - "${p6_project_dir}/include", + "${psoc6_project_dir}/include", "${chip_root}/examples/persistent-storage", ] sources = [ "${chip_root}/examples/persistent-storage/KeyValueStorageTest.cpp", - "${examples_plat_dir}/init_p6Platform.cpp", - "${p6_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/init_psoc6Platform.cpp", + "${psoc6_project_dir}/include/CHIPProjectConfig.h", "main.cpp", ] @@ -82,10 +83,10 @@ p6_executable("persistent_storage_app") { } } -group("p6") { +group("psoc6") { deps = [ ":persistent_storage_app" ] } group("default") { - deps = [ ":p6" ] + deps = [ ":psoc6" ] } diff --git a/examples/persistent-storage/p6/README.md b/examples/persistent-storage/infineon/psoc6/README.md similarity index 65% rename from examples/persistent-storage/p6/README.md rename to examples/persistent-storage/infineon/psoc6/README.md index 8f30ecab6dbc39..19a32c60c85acf 100644 --- a/examples/persistent-storage/p6/README.md +++ b/examples/persistent-storage/infineon/psoc6/README.md @@ -1,12 +1,12 @@ -# CHIP P6 Persistent Storage Example +# CHIP PSoC6 Persistent Storage Example An example testing and demonstrating the key value storage API.
-- [CHIP P6 Persistent Storage Example](#chip-P6-persistent-storage-example) +- [CHIP PSoC6 Persistent Storage Example](#chip-PSoC6-persistent-storage-example) - [Introduction](#introduction) - - [P6](#P6) + - [PSoC6](#PSoC6) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -23,12 +23,12 @@ to use the API. In the future this example can be moved into a unit test when available on all platforms. - + -## P6 +## PSoC6 -The P6 platform KVS is fully implemented, the KVS is enabled and configured by -providing a file during the init call. +The Infineon PSoC6 platform KVS is fully implemented, the KVS is enabled and +configured by providing a file during the init call. @@ -38,7 +38,7 @@ providing a file during the init call. $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ ./scripts/examples/gn_p6_example.sh examples/persistent-storage/p6 out/persistent_storage_app_p6 + $ ./scripts/examples/gn_psoc6_example.sh examples/persistent-storage/infineon/psoc6 out/persistent_storage_app_psoc6 @@ -51,4 +51,4 @@ providing a file during the init call. - On the command line: $ cd ~/connectedhomeip - $ python3 out/persistent_storage_app_p6/chip-p6-persistent-storage-example.flash.py + $ python3 out/persistent_storage_app_psoc6/chip-psoc6-persistent-storage-example.flash.py diff --git a/examples/persistent-storage/p6/args.gni b/examples/persistent-storage/infineon/psoc6/args.gni similarity index 89% rename from examples/persistent-storage/p6/args.gni rename to examples/persistent-storage/infineon/psoc6/args.gni index 1c30d812940d3d..0b4443ebd96fcc 100644 --- a/examples/persistent-storage/p6/args.gni +++ b/examples/persistent-storage/infineon/psoc6/args.gni @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/src/platform/P6/args.gni") +import("${chip_root}/src/platform/Infineon/PSOC6/args.gni") -p6_target_project = +psoc6_target_project = get_label_info(":persistent_storage_app_sdk_sources", "label_no_toolchain") diff --git a/examples/persistent-storage/infineon/psoc6/build_overrides b/examples/persistent-storage/infineon/psoc6/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/persistent-storage/infineon/psoc6/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/persistent-storage/p6/include/AppConfig.h b/examples/persistent-storage/infineon/psoc6/include/AppConfig.h similarity index 100% rename from examples/persistent-storage/p6/include/AppConfig.h rename to examples/persistent-storage/infineon/psoc6/include/AppConfig.h diff --git a/examples/persistent-storage/p6/include/CHIPProjectConfig.h b/examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h similarity index 100% rename from examples/persistent-storage/p6/include/CHIPProjectConfig.h rename to examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h diff --git a/examples/persistent-storage/p6/main.cpp b/examples/persistent-storage/infineon/psoc6/main.cpp similarity index 98% rename from examples/persistent-storage/p6/main.cpp rename to examples/persistent-storage/infineon/psoc6/main.cpp index 03a5132aa73d99..104d63ffea0085 100644 --- a/examples/persistent-storage/p6/main.cpp +++ b/examples/persistent-storage/infineon/psoc6/main.cpp @@ -18,7 +18,7 @@ #include "AppConfig.h" #include "KeyValueStorageTest.h" -#include "init_p6Platform.h" +#include "init_psoc6Platform.h" #include #include #include diff --git a/examples/persistent-storage/infineon/psoc6/third_party/connectedhomeip b/examples/persistent-storage/infineon/psoc6/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/persistent-storage/infineon/psoc6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/persistent-storage/p6/build_overrides b/examples/persistent-storage/p6/build_overrides deleted file mode 120000 index 194ee0b812dc3d..00000000000000 --- a/examples/persistent-storage/p6/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides/ \ No newline at end of file diff --git a/examples/persistent-storage/p6/third_party/connectedhomeip b/examples/persistent-storage/p6/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/persistent-storage/p6/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/platform/cyw30739/BUILD.gn b/examples/platform/infineon/cyw30739/BUILD.gn similarity index 100% rename from examples/platform/cyw30739/BUILD.gn rename to examples/platform/infineon/cyw30739/BUILD.gn diff --git a/examples/platform/cyw30739/OTAConfig.cpp b/examples/platform/infineon/cyw30739/OTAConfig.cpp similarity index 97% rename from examples/platform/cyw30739/OTAConfig.cpp rename to examples/platform/infineon/cyw30739/OTAConfig.cpp index 05902c113aa451..206db24040f98c 100644 --- a/examples/platform/cyw30739/OTAConfig.cpp +++ b/examples/platform/infineon/cyw30739/OTAConfig.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include using namespace ::chip; using namespace ::chip::DeviceLayer; diff --git a/examples/platform/cyw30739/OTAConfig.h b/examples/platform/infineon/cyw30739/OTAConfig.h similarity index 100% rename from examples/platform/cyw30739/OTAConfig.h rename to examples/platform/infineon/cyw30739/OTAConfig.h diff --git a/examples/platform/cyw30739/args.gni b/examples/platform/infineon/cyw30739/args.gni similarity index 100% rename from examples/platform/cyw30739/args.gni rename to examples/platform/infineon/cyw30739/args.gni diff --git a/examples/platform/cyw30739/project_include/OpenThreadConfig.h b/examples/platform/infineon/cyw30739/project_include/OpenThreadConfig.h similarity index 100% rename from examples/platform/cyw30739/project_include/OpenThreadConfig.h rename to examples/platform/infineon/cyw30739/project_include/OpenThreadConfig.h diff --git a/examples/platform/p6/BUILD.gn b/examples/platform/infineon/psoc6/BUILD.gn similarity index 89% rename from examples/platform/p6/BUILD.gn rename to examples/platform/infineon/psoc6/BUILD.gn index 6d4842abf36dc1..d574f634a6e53e 100644 --- a/examples/platform/p6/BUILD.gn +++ b/examples/platform/infineon/psoc6/BUILD.gn @@ -13,9 +13,9 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") config("chip_examples_project_config") { include_dirs = [ "project_include" ] diff --git a/examples/platform/p6/LEDWidget.cpp b/examples/platform/infineon/psoc6/LEDWidget.cpp similarity index 100% rename from examples/platform/p6/LEDWidget.cpp rename to examples/platform/infineon/psoc6/LEDWidget.cpp diff --git a/examples/platform/p6/LEDWidget.h b/examples/platform/infineon/psoc6/LEDWidget.h similarity index 100% rename from examples/platform/p6/LEDWidget.h rename to examples/platform/infineon/psoc6/LEDWidget.h diff --git a/examples/platform/p6/args.gni b/examples/platform/infineon/psoc6/args.gni similarity index 100% rename from examples/platform/p6/args.gni rename to examples/platform/infineon/psoc6/args.gni diff --git a/examples/platform/p6/init_p6Platform.cpp b/examples/platform/infineon/psoc6/init_psoc6Platform.cpp similarity index 100% rename from examples/platform/p6/init_p6Platform.cpp rename to examples/platform/infineon/psoc6/init_psoc6Platform.cpp diff --git a/examples/platform/p6/init_p6Platform.h b/examples/platform/infineon/psoc6/init_psoc6Platform.h similarity index 100% rename from examples/platform/p6/init_p6Platform.h rename to examples/platform/infineon/psoc6/init_psoc6Platform.h diff --git a/gn_build.sh b/gn_build.sh index 0615a1833ef40d..18473f34f6d517 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -106,7 +106,7 @@ for arg; do enable_p6_builds=true) p6_builds_enabled=1 ;; - p6_board=*) + psoc6_board=*) p6_board_selected=1 ;; esac @@ -141,13 +141,13 @@ fi echo -# P6 Build setup +# PSoC6 Build setup if [[ -z "$p6_builds_enabled" ]]; then echo "Hint: Pass enable_p6_builds=true to this script to enable building for PSoC6-43012" else - p6_sdk_args="" + psoc6_sdk_args="" if [[ -z "$p6_board_selected" ]]; then - p6_sdk_args="p6_board=\"CY8CKIT-062S2-43012\"" + psoc6_sdk_args="psoc6_board=\"CY8CKIT-062S2-43012\"" fi fi diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index cb457e61a4b6a6..c9edb01794bca9 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -520,7 +520,7 @@ def InfineonTargets(): builder.AppendVariant(name="ota", enable_ota_requestor=True) builder.AppendVariant(name="updateimage", update_image=True) - target = Target('infineon-p6', InfineonBuilder, board=InfineonBoard.P6BOARD) + target = Target('infineon-psoc6', InfineonBuilder, board=InfineonBoard.PSOC6BOARD) builder.targets.append(target.Extend('lock', app=InfineonApp.LOCK)) builder.targets.append(target.Extend('light', app=InfineonApp.LIGHT)) diff --git a/scripts/build/builders/cyw30739.py b/scripts/build/builders/cyw30739.py index 5d4470fef17535..b0347750c6593a 100644 --- a/scripts/build/builders/cyw30739.py +++ b/scripts/build/builders/cyw30739.py @@ -44,7 +44,7 @@ def AppNamePrefix(self): raise Exception("Unknown app type: %r" % self) def BuildRoot(self, root): - return os.path.join(root, "examples", self.ExampleName(), "cyw30739") + return os.path.join(root, "examples", self.ExampleName(), "infineon/cyw30739") class Cyw30739Board(Enum): diff --git a/scripts/build/builders/infineon.py b/scripts/build/builders/infineon.py index d0b73611a318cc..1783faefa0ef75 100644 --- a/scripts/build/builders/infineon.py +++ b/scripts/build/builders/infineon.py @@ -38,13 +38,13 @@ def ExampleName(self): def AppNamePrefix(self): if self == InfineonApp.LOCK: - return 'chip-p6-lock-example' + return 'chip-psoc6-lock-example' elif self == InfineonApp.LIGHT: - return 'chip-p6-lighting-example' + return 'chip-psoc6-lighting-example' elif self == InfineonApp.ALL_CLUSTERS: - return 'chip-p6-clusters-example' + return 'chip-psoc6-clusters-example' elif self == InfineonApp.ALL_CLUSTERS_MINIMAL: - return 'chip-p6-clusters-minimal-example' + return 'chip-psoc6-clusters-minimal-example' else: raise Exception('Unknown app type: %r' % self) @@ -61,14 +61,14 @@ def FlashBundleName(self): raise Exception('Unknown app type: %r' % self) def BuildRoot(self, root): - return os.path.join(root, 'examples', self.ExampleName(), 'p6') + return os.path.join(root, 'examples', self.ExampleName(), 'infineon/psoc6') class InfineonBoard(Enum): - P6BOARD = 1 + PSOC6BOARD = 1 def GnArgName(self): - if self == InfineonBoard.P6BOARD: + if self == InfineonBoard.PSOC6BOARD: return 'CY8CKIT-062S2-43012' @@ -78,7 +78,7 @@ def __init__(self, root, runner, app: InfineonApp = InfineonApp.LOCK, - board: InfineonBoard = InfineonBoard.P6BOARD, + board: InfineonBoard = InfineonBoard.PSOC6BOARD, enable_ota_requestor: bool = False, update_image: bool = False): super(InfineonBuilder, self).__init__( @@ -86,7 +86,7 @@ def __init__(self, runner=runner) self.app = app - self.extra_gn_options = ['p6_board="%s"' % board.GnArgName()] + self.extra_gn_options = ['psoc6_board="%s"' % board.GnArgName()] if enable_ota_requestor: self.extra_gn_options.append('chip_enable_ota_requestor=true') diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index fe98801f8ee5ac..ffbe1be7a1a4f2 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -178,22 +178,22 @@ imx-ota-provider-app imx-ota-provider-app-release imx-thermostat imx-thermostat-release -infineon-p6-all-clusters -infineon-p6-all-clusters-minimal -infineon-p6-all-clusters-minimal-ota (NOGLOB: Reduce default build variants) -infineon-p6-all-clusters-minimal-ota-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-all-clusters-minimal-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-all-clusters-ota (NOGLOB: Reduce default build variants) -infineon-p6-all-clusters-ota-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-all-clusters-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-light -infineon-p6-light-ota (NOGLOB: Reduce default build variants) -infineon-p6-light-ota-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-light-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-lock -infineon-p6-lock-ota (NOGLOB: Reduce default build variants) -infineon-p6-lock-ota-updateimage (NOGLOB: Reduce default build variants) -infineon-p6-lock-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters +infineon-psoc6-all-clusters-minimal +infineon-psoc6-all-clusters-minimal-ota (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters-minimal-ota-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters-minimal-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters-ota (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters-ota-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-all-clusters-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-light +infineon-psoc6-light-ota (NOGLOB: Reduce default build variants) +infineon-psoc6-light-ota-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-light-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-lock +infineon-psoc6-lock-ota (NOGLOB: Reduce default build variants) +infineon-psoc6-lock-ota-updateimage (NOGLOB: Reduce default build variants) +infineon-psoc6-lock-updateimage (NOGLOB: Reduce default build variants) k32w-light-ota-se (NOGLOB: Only on demand build) k32w-light-release-no-ota k32w-lock-low-power-release (NOGLOB: Only on demand build) diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 6cb3d25fcf67a2..7c255c2eb96d29 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -173,16 +173,16 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/cc13x2x7_26x2x7 '--args=ti_sysconfig_root="TEST_TI_SYSCONFIG_ROOT"' {out}/cc13x2x7_26x2x7-shell # Generating cyw30739-cyw930739m2evb_01-light -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/cyw30739 {out}/cyw30739-cyw930739m2evb_01-light +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/infineon/cyw30739 {out}/cyw30739-cyw930739m2evb_01-light # Generating cyw30739-cyw930739m2evb_01-lock -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/cyw30739 {out}/cyw30739-cyw930739m2evb_01-lock +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/infineon/cyw30739 {out}/cyw30739-cyw930739m2evb_01-lock # Generating cyw30739-cyw930739m2evb_01-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/cyw30739 {out}/cyw30739-cyw930739m2evb_01-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/infineon/cyw30739 {out}/cyw30739-cyw930739m2evb_01-ota-requestor # Generating cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/cyw30739 --args=chip_progress_logging=false {out}/cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/infineon/cyw30739 --args=chip_progress_logging=false {out}/cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging # Generating efr32-brd4161a-light gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A"' {out}/efr32-brd4161a-light @@ -843,53 +843,53 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating imx-thermostat-release gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/thermostat/linux '--args=treat_warnings_as_errors=false target_os="linux" target_cpu="arm64" arm_arch="armv8-a" import("//build_overrides/build.gni") custom_toolchain="${build_root}/toolchain/custom" sysroot="IMX_SDK_ROOT/sysroots/cortexa53-crypto-poky-linux" target_cflags=[ "-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s \"" ] target_cc="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc" target_cxx="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++" target_ar="IMX_SDK_ROOT/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar" is_debug=false' {out}/imx-thermostat-release -# Generating infineon-p6-all-clusters -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-all-clusters +# Generating infineon-psoc6-all-clusters +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012"' {out}/infineon-psoc6-all-clusters -# Generating infineon-p6-all-clusters-minimal -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-all-clusters-minimal +# Generating infineon-psoc6-all-clusters-minimal +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012"' {out}/infineon-psoc6-all-clusters-minimal -# Generating infineon-p6-all-clusters-minimal-ota -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-p6-all-clusters-minimal-ota +# Generating infineon-psoc6-all-clusters-minimal-ota +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-psoc6-all-clusters-minimal-ota -# Generating infineon-p6-all-clusters-minimal-ota-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-p6-all-clusters-minimal-ota-updateimage +# Generating infineon-psoc6-all-clusters-minimal-ota-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-psoc6-all-clusters-minimal-ota-updateimage -# Generating infineon-p6-all-clusters-minimal-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-p6-all-clusters-minimal-updateimage +# Generating infineon-psoc6-all-clusters-minimal-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-minimal-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-psoc6-all-clusters-minimal-updateimage -# Generating infineon-p6-all-clusters-ota -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-p6-all-clusters-ota +# Generating infineon-psoc6-all-clusters-ota +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-psoc6-all-clusters-ota -# Generating infineon-p6-all-clusters-ota-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-p6-all-clusters-ota-updateimage +# Generating infineon-psoc6-all-clusters-ota-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-psoc6-all-clusters-ota-updateimage -# Generating infineon-p6-all-clusters-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-p6-all-clusters-updateimage +# Generating infineon-psoc6-all-clusters-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-psoc6-all-clusters-updateimage -# Generating infineon-p6-light -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-light +# Generating infineon-psoc6-light +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012"' {out}/infineon-psoc6-light -# Generating infineon-p6-light-ota -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-p6-light-ota +# Generating infineon-psoc6-light-ota +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-psoc6-light-ota -# Generating infineon-p6-light-ota-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-p6-light-ota-updateimage +# Generating infineon-psoc6-light-ota-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-psoc6-light-ota-updateimage -# Generating infineon-p6-light-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-p6-light-updateimage +# Generating infineon-psoc6-light-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-psoc6-light-updateimage -# Generating infineon-p6-lock -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-lock +# Generating infineon-psoc6-lock +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012"' {out}/infineon-psoc6-lock -# Generating infineon-p6-lock-ota -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-p6-lock-ota +# Generating infineon-psoc6-lock-ota +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true' {out}/infineon-psoc6-lock-ota -# Generating infineon-p6-lock-ota-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-p6-lock-ota-updateimage +# Generating infineon-psoc6-lock-ota-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" chip_enable_ota_requestor=true build_update_image=true' {out}/infineon-psoc6-lock-ota-updateimage -# Generating infineon-p6-lock-updateimage -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/p6 '--args=p6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-p6-lock-updateimage +# Generating infineon-psoc6-lock-updateimage +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/infineon/psoc6 '--args=psoc6_board="CY8CKIT-062S2-43012" build_update_image=true' {out}/infineon-psoc6-lock-updateimage {root}/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh @@ -2103,53 +2103,53 @@ ninja -C {out}/imx-thermostat # Building imx-thermostat-release ninja -C {out}/imx-thermostat-release -# Building infineon-p6-all-clusters -ninja -C {out}/infineon-p6-all-clusters +# Building infineon-psoc6-all-clusters +ninja -C {out}/infineon-psoc6-all-clusters -# Building infineon-p6-all-clusters-minimal -ninja -C {out}/infineon-p6-all-clusters-minimal +# Building infineon-psoc6-all-clusters-minimal +ninja -C {out}/infineon-psoc6-all-clusters-minimal -# Building infineon-p6-all-clusters-minimal-ota -ninja -C {out}/infineon-p6-all-clusters-minimal-ota +# Building infineon-psoc6-all-clusters-minimal-ota +ninja -C {out}/infineon-psoc6-all-clusters-minimal-ota -# Building infineon-p6-all-clusters-minimal-ota-updateimage -ninja -C {out}/infineon-p6-all-clusters-minimal-ota-updateimage +# Building infineon-psoc6-all-clusters-minimal-ota-updateimage +ninja -C {out}/infineon-psoc6-all-clusters-minimal-ota-updateimage -# Building infineon-p6-all-clusters-minimal-updateimage -ninja -C {out}/infineon-p6-all-clusters-minimal-updateimage +# Building infineon-psoc6-all-clusters-minimal-updateimage +ninja -C {out}/infineon-psoc6-all-clusters-minimal-updateimage -# Building infineon-p6-all-clusters-ota -ninja -C {out}/infineon-p6-all-clusters-ota +# Building infineon-psoc6-all-clusters-ota +ninja -C {out}/infineon-psoc6-all-clusters-ota -# Building infineon-p6-all-clusters-ota-updateimage -ninja -C {out}/infineon-p6-all-clusters-ota-updateimage +# Building infineon-psoc6-all-clusters-ota-updateimage +ninja -C {out}/infineon-psoc6-all-clusters-ota-updateimage -# Building infineon-p6-all-clusters-updateimage -ninja -C {out}/infineon-p6-all-clusters-updateimage +# Building infineon-psoc6-all-clusters-updateimage +ninja -C {out}/infineon-psoc6-all-clusters-updateimage -# Building infineon-p6-light -ninja -C {out}/infineon-p6-light +# Building infineon-psoc6-light +ninja -C {out}/infineon-psoc6-light -# Building infineon-p6-light-ota -ninja -C {out}/infineon-p6-light-ota +# Building infineon-psoc6-light-ota +ninja -C {out}/infineon-psoc6-light-ota -# Building infineon-p6-light-ota-updateimage -ninja -C {out}/infineon-p6-light-ota-updateimage +# Building infineon-psoc6-light-ota-updateimage +ninja -C {out}/infineon-psoc6-light-ota-updateimage -# Building infineon-p6-light-updateimage -ninja -C {out}/infineon-p6-light-updateimage +# Building infineon-psoc6-light-updateimage +ninja -C {out}/infineon-psoc6-light-updateimage -# Building infineon-p6-lock -ninja -C {out}/infineon-p6-lock +# Building infineon-psoc6-lock +ninja -C {out}/infineon-psoc6-lock -# Building infineon-p6-lock-ota -ninja -C {out}/infineon-p6-lock-ota +# Building infineon-psoc6-lock-ota +ninja -C {out}/infineon-psoc6-lock-ota -# Building infineon-p6-lock-ota-updateimage -ninja -C {out}/infineon-p6-lock-ota-updateimage +# Building infineon-psoc6-lock-ota-updateimage +ninja -C {out}/infineon-psoc6-lock-ota-updateimage -# Building infineon-p6-lock-updateimage -ninja -C {out}/infineon-p6-lock-updateimage +# Building infineon-psoc6-lock-updateimage +ninja -C {out}/infineon-psoc6-lock-updateimage # Building k32w-light-ota-se ninja -C {out}/k32w-light-ota-se diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index d7090c2c52ccfd..9d7a22bfc4c937 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -72,10 +72,10 @@ imx-ota-provider-app imx-ota-provider-app-release imx-thermostat imx-thermostat-release -infineon-p6-all-clusters -infineon-p6-all-clusters-minimal -infineon-p6-light -infineon-p6-lock +infineon-psoc6-all-clusters +infineon-psoc6-all-clusters-minimal +infineon-psoc6-light +infineon-psoc6-lock k32w-light-release-no-ota k32w-lock-release k32w-shell-release diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index b150b8df71253e..c98f54c249e418 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -30,15 +30,14 @@ 'bl602', 'cc13x2_26x2', 'cc32xx', - 'cyw30739', 'darwin', 'efr32', 'esp32', + 'infineon', 'k32w0', 'linux', 'mbed', 'nrfconnect', - 'p6', 'qpg', 'telink', 'tizen', diff --git a/scripts/examples/gn_p6_example.sh b/scripts/examples/gn_psoc6_example.sh similarity index 95% rename from scripts/examples/gn_p6_example.sh rename to scripts/examples/gn_psoc6_example.sh index 746c2d743779e4..403063ff575f0d 100755 --- a/scripts/examples/gn_p6_example.sh +++ b/scripts/examples/gn_psoc6_example.sh @@ -43,7 +43,7 @@ env EXAMPLE_DIR=$1 shift OUTPUT_DIR=out/example_app -P6_BOARD=CY8CKIT-062S2-43012 +PSOC6_BOARD=CY8CKIT-062S2-43012 if [[ ! -z "$1" ]]; then OUTPUT_DIR=$1 @@ -70,7 +70,7 @@ for arg; do esac done -gn gen --check --fail-on-unused-args "$OUTPUT_DIR" --root="$EXAMPLE_DIR" --args="p6_board=\"$P6_BOARD\" ${GN_ARGS[*]}" +gn gen --check --fail-on-unused-args "$OUTPUT_DIR" --root="$EXAMPLE_DIR" --args="psoc6_board=\"$PSOC6_BOARD\" ${GN_ARGS[*]}" ninja -C "$OUTPUT_DIR" "${NINJA_ARGS[@]}" #print stats arm-none-eabi-size -A "$OUTPUT_DIR"/*.out diff --git a/scripts/flashing/p6_firmware_utils.py b/scripts/flashing/psoc6_firmware_utils.py similarity index 90% rename from scripts/flashing/p6_firmware_utils.py rename to scripts/flashing/psoc6_firmware_utils.py index 0fe247247b4070..aeef78030a1d74 100755 --- a/scripts/flashing/p6_firmware_utils.py +++ b/scripts/flashing/psoc6_firmware_utils.py @@ -12,18 +12,18 @@ # 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. -"""Flash an P6 device. +"""Flash an Infineon PSoC6 device. This is layered so that a caller can perform individual operations through an `Flasher` instance, or operations according to a command line. For `Flasher`, see the class documentation. For the parse_command() interface or standalone execution: -usage: p6_firmware_utils.py [-h] [--verbose] [--erase] [--application FILE] +usage: psoc6_firmware_utils.py [-h] [--verbose] [--erase] [--application FILE] [--verify_application] [--reset] [--skip_reset] [--device DEVICE] -Flash P6 device +Flash PSoC6 device optional arguments: -h, --help show this help message and exit @@ -64,7 +64,7 @@ "-C", {'option': 'sdk_path'}, ['TARGET={device}'], - ['CY_OPENOCD_PROGRAM_IMG=../../../{application}'], + ['CY_OPENOCD_PROGRAM_IMG=../../../../{application}'], {'option': 'mtb_target'} ], 'verify': ['{make}', '--version'], @@ -77,15 +77,15 @@ }, 'device': { 'help': 'Device family or platform to target', - 'default': 'P6', + 'default': 'PSoC6', 'alias': ['-d'], 'argparse': { 'metavar': 'DEVICE' }, }, 'sdk_path': { - 'help': 'Path to p6 sdk', - 'default': 'third_party/p6/p6_sdk', + 'help': 'Path to psoc6 sdk', + 'default': 'third_party/infineon/psoc6/psoc6_sdk', 'alias': ['-p'], 'argparse': { 'metavar': 'SDK_PATH' @@ -96,10 +96,10 @@ class Flasher(firmware_utils.Flasher): - """Manage P6 flashing.""" + """Manage PSoC6 flashing.""" def __init__(self, **options): - super().__init__(platform='P6', module=__name__, **options) + super().__init__(platform='PSOC6', module=__name__, **options) self.define_options(P6_OPTIONS) def erase(self): diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 30b66bcd01fddd..3ab64a2f9250be 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -40,7 +40,7 @@ '/platform/Ameba/', '/platform/android/', '/platform/Beken/', - '/platform/CYW30739/', + '/platform/Infineon/CYW30739/', '/platform/Darwin/', '/platform/EFR32/', '/platform/ESP32/', @@ -48,7 +48,7 @@ '/platform/Linux/', '/platform/nxp/', '/platform/Tizen/', - '/platform/P6/', + '/platform/Infineon/PSOC6/', '/platform/bouffalolab/BL602', '/platform/webos/', r'POSIX\.h$', diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index 4490159793bbd0..830e82b3cb0e75 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -32,7 +32,7 @@ assert(lwip_platform == "external" || lwip_platform == "standalone" || lwip_platform == "cc13x2_26x2" || lwip_platform == "cc32xx" || lwip_platform == "efr32" || lwip_platform == "k32w0" || lwip_platform == "qpg" || lwip_platform == "mbed" || - lwip_platform == "p6" || lwip_platform == "cyw30739" || + lwip_platform == "psoc6" || lwip_platform == "cyw30739" || lwip_platform == "bl602" || lwip_platform == "mw320", "Unsupported lwIP platform: ${lwip_platform}") @@ -54,8 +54,8 @@ if (lwip_platform == "cc13x2_26x2") { import("${qpg_sdk_build_root}/qpg_sdk.gni") } else if (lwip_platform == "k32w0") { import("//build_overrides/k32w0_sdk.gni") -} else if (lwip_platform == "p6") { - import("//build_overrides/p6.gni") +} else if (lwip_platform == "psoc6") { + import("//build_overrides/psoc6.gni") } else if (lwip_platform == "cyw30739") { import("//build_overrides/cyw30739_sdk.gni") } else if (lwip_platform == "bl602") { @@ -95,11 +95,11 @@ if (current_os == "zephyr" || current_os == "mbed") { group("all") { deps = [ ":lwip" ] } -} else if (lwip_platform == "p6") { +} else if (lwip_platform == "psoc6") { group("lwip") { public_deps = [ ":lwip_buildconfig" ] public_configs = [ "${chip_root}/src:includes" ] - public_configs += [ "${p6_sdk_build_root}:p6_sdk_config" ] + public_configs += [ "${psoc6_sdk_build_root}:psoc6_sdk_config" ] } group("all") { diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 31e25b41a6a5df..e5758593538fde 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -172,10 +172,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_DEVICE_LAYER_TARGET_ESP32=1", "CHIP_DEVICE_LAYER_TARGET=ESP32", ] - } else if (chip_device_platform == "p6") { + } else if (chip_device_platform == "psoc6") { defines += [ - "CHIP_DEVICE_LAYER_TARGET_P6=1", - "CHIP_DEVICE_LAYER_TARGET=P6", + "CHIP_DEVICE_LAYER_TARGET_PSOC6=1", + "CHIP_DEVICE_LAYER_TARGET=Infineon/PSOC6", ] } else if (chip_device_platform == "linux") { defines += [ @@ -242,7 +242,7 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { } else if (chip_device_platform == "cyw30739") { defines += [ "CHIP_DEVICE_LAYER_TARGET_CYW30739=1", - "CHIP_DEVICE_LAYER_TARGET=CYW30739", + "CHIP_DEVICE_LAYER_TARGET=Infineon/CYW30739", ] } else if (chip_device_platform == "webos") { defines += [ @@ -421,8 +421,8 @@ if (chip_device_platform != "none") { _platform_target = "android" } else if (chip_device_platform == "external") { _platform_target = chip_platform_target - } else if (chip_device_platform == "p6") { - _platform_target = "P6" + } else if (chip_device_platform == "psoc6") { + _platform_target = "Infineon/PSOC6" } else if (chip_device_platform == "ameba") { _platform_target = "Ameba" } else if (chip_device_platform == "webos") { @@ -432,7 +432,7 @@ if (chip_device_platform != "none") { } else if (chip_device_platform == "fake") { _platform_target = "fake" } else if (chip_device_platform == "cyw30739") { - _platform_target = "CYW30739" + _platform_target = "Infineon/CYW30739" } else if (chip_device_platform == "mw320") { _platform_target = "nxp/mw320" } else if (chip_device_platform == "zephyr") { diff --git a/src/platform/CYW30739/BLEManagerImpl.cpp b/src/platform/Infineon/CYW30739/BLEManagerImpl.cpp similarity index 100% rename from src/platform/CYW30739/BLEManagerImpl.cpp rename to src/platform/Infineon/CYW30739/BLEManagerImpl.cpp diff --git a/src/platform/CYW30739/BLEManagerImpl.h b/src/platform/Infineon/CYW30739/BLEManagerImpl.h similarity index 100% rename from src/platform/CYW30739/BLEManagerImpl.h rename to src/platform/Infineon/CYW30739/BLEManagerImpl.h diff --git a/src/platform/CYW30739/BUILD.gn b/src/platform/Infineon/CYW30739/BUILD.gn similarity index 94% rename from src/platform/CYW30739/BUILD.gn rename to src/platform/Infineon/CYW30739/BUILD.gn index 50d3f464057e74..623cd188bd8343 100644 --- a/src/platform/CYW30739/BUILD.gn +++ b/src/platform/Infineon/CYW30739/BUILD.gn @@ -24,7 +24,7 @@ if (chip_enable_openthread) { static_library("CYW30739") { sources = [ - "../SingletonConfigurationManager.cpp", + "../../SingletonConfigurationManager.cpp", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "BlePlatformConfig.h", @@ -67,7 +67,7 @@ static_library("CYW30739") { if (chip_enable_openthread) { sources += [ - "../OpenThread/OpenThreadUtils.cpp", + "../../OpenThread/OpenThreadUtils.cpp", "ThreadStackManagerImpl.cpp", "ThreadStackManagerImpl.h", ] @@ -85,7 +85,7 @@ static_library("CYW30739") { } if (chip_mdns == "platform") { - sources += [ "../OpenThread/DnssdImpl.cpp" ] + sources += [ "../../OpenThread/DnssdImpl.cpp" ] deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } diff --git a/src/platform/CYW30739/BlePlatformConfig.h b/src/platform/Infineon/CYW30739/BlePlatformConfig.h similarity index 100% rename from src/platform/CYW30739/BlePlatformConfig.h rename to src/platform/Infineon/CYW30739/BlePlatformConfig.h diff --git a/src/platform/CYW30739/CHIPDevicePlatformConfig.h b/src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h similarity index 100% rename from src/platform/CYW30739/CHIPDevicePlatformConfig.h rename to src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h diff --git a/src/platform/CYW30739/CHIPDevicePlatformEvent.h b/src/platform/Infineon/CYW30739/CHIPDevicePlatformEvent.h similarity index 100% rename from src/platform/CYW30739/CHIPDevicePlatformEvent.h rename to src/platform/Infineon/CYW30739/CHIPDevicePlatformEvent.h diff --git a/src/platform/CYW30739/CHIPPlatformConfig.h b/src/platform/Infineon/CYW30739/CHIPPlatformConfig.h similarity index 100% rename from src/platform/CYW30739/CHIPPlatformConfig.h rename to src/platform/Infineon/CYW30739/CHIPPlatformConfig.h diff --git a/src/platform/CYW30739/CYW30739Config.cpp b/src/platform/Infineon/CYW30739/CYW30739Config.cpp similarity index 99% rename from src/platform/CYW30739/CYW30739Config.cpp rename to src/platform/Infineon/CYW30739/CYW30739Config.cpp index 2d84fd0703c798..651b4fb3cb40b4 100644 --- a/src/platform/CYW30739/CYW30739Config.cpp +++ b/src/platform/Infineon/CYW30739/CYW30739Config.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include namespace chip { diff --git a/src/platform/CYW30739/CYW30739Config.h b/src/platform/Infineon/CYW30739/CYW30739Config.h similarity index 100% rename from src/platform/CYW30739/CYW30739Config.h rename to src/platform/Infineon/CYW30739/CYW30739Config.h diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.cpp b/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp similarity index 99% rename from src/platform/CYW30739/ConfigurationManagerImpl.cpp rename to src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp index a706ceec55e492..5489a58441c3ff 100644 --- a/src/platform/CYW30739/ConfigurationManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp @@ -27,9 +27,9 @@ #include #include -#include #include #include +#include #include namespace chip { diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.h b/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.h similarity index 100% rename from src/platform/CYW30739/ConfigurationManagerImpl.h rename to src/platform/Infineon/CYW30739/ConfigurationManagerImpl.h diff --git a/src/platform/CYW30739/ConnectivityManagerImpl.cpp b/src/platform/Infineon/CYW30739/ConnectivityManagerImpl.cpp similarity index 100% rename from src/platform/CYW30739/ConnectivityManagerImpl.cpp rename to src/platform/Infineon/CYW30739/ConnectivityManagerImpl.cpp diff --git a/src/platform/CYW30739/ConnectivityManagerImpl.h b/src/platform/Infineon/CYW30739/ConnectivityManagerImpl.h similarity index 100% rename from src/platform/CYW30739/ConnectivityManagerImpl.h rename to src/platform/Infineon/CYW30739/ConnectivityManagerImpl.h diff --git a/src/platform/CYW30739/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/Infineon/CYW30739/DeviceNetworkProvisioningDelegateImpl.cpp similarity index 100% rename from src/platform/CYW30739/DeviceNetworkProvisioningDelegateImpl.cpp rename to src/platform/Infineon/CYW30739/DeviceNetworkProvisioningDelegateImpl.cpp diff --git a/src/platform/CYW30739/DeviceNetworkProvisioningDelegateImpl.h b/src/platform/Infineon/CYW30739/DeviceNetworkProvisioningDelegateImpl.h similarity index 100% rename from src/platform/CYW30739/DeviceNetworkProvisioningDelegateImpl.h rename to src/platform/Infineon/CYW30739/DeviceNetworkProvisioningDelegateImpl.h diff --git a/src/platform/CYW30739/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/CYW30739/DiagnosticDataProviderImpl.cpp similarity index 98% rename from src/platform/CYW30739/DiagnosticDataProviderImpl.cpp rename to src/platform/Infineon/CYW30739/DiagnosticDataProviderImpl.cpp index 2af3114c1ad148..2deec6df8b4646 100644 --- a/src/platform/CYW30739/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/CYW30739/DiagnosticDataProviderImpl.cpp @@ -23,8 +23,8 @@ #include -#include #include +#include #include #include diff --git a/src/platform/CYW30739/DiagnosticDataProviderImpl.h b/src/platform/Infineon/CYW30739/DiagnosticDataProviderImpl.h similarity index 100% rename from src/platform/CYW30739/DiagnosticDataProviderImpl.h rename to src/platform/Infineon/CYW30739/DiagnosticDataProviderImpl.h diff --git a/src/platform/CYW30739/InetPlatformConfig.h b/src/platform/Infineon/CYW30739/InetPlatformConfig.h similarity index 100% rename from src/platform/CYW30739/InetPlatformConfig.h rename to src/platform/Infineon/CYW30739/InetPlatformConfig.h diff --git a/src/platform/CYW30739/KeyValueStoreManagerImpl.cpp b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp similarity index 100% rename from src/platform/CYW30739/KeyValueStoreManagerImpl.cpp rename to src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp diff --git a/src/platform/CYW30739/KeyValueStoreManagerImpl.h b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h similarity index 100% rename from src/platform/CYW30739/KeyValueStoreManagerImpl.h rename to src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h diff --git a/src/platform/CYW30739/Logging.cpp b/src/platform/Infineon/CYW30739/Logging.cpp similarity index 100% rename from src/platform/CYW30739/Logging.cpp rename to src/platform/Infineon/CYW30739/Logging.cpp diff --git a/src/platform/CYW30739/OTAImageProcessorImpl.cpp b/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp similarity index 100% rename from src/platform/CYW30739/OTAImageProcessorImpl.cpp rename to src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp diff --git a/src/platform/CYW30739/OTAImageProcessorImpl.h b/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.h similarity index 100% rename from src/platform/CYW30739/OTAImageProcessorImpl.h rename to src/platform/Infineon/CYW30739/OTAImageProcessorImpl.h diff --git a/src/platform/CYW30739/PlatformManagerImpl.cpp b/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp similarity index 99% rename from src/platform/CYW30739/PlatformManagerImpl.cpp rename to src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp index 41e91ea0a205a6..c2da0a1efc8414 100644 --- a/src/platform/CYW30739/PlatformManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp @@ -23,7 +23,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include diff --git a/src/platform/CYW30739/PlatformManagerImpl.h b/src/platform/Infineon/CYW30739/PlatformManagerImpl.h similarity index 100% rename from src/platform/CYW30739/PlatformManagerImpl.h rename to src/platform/Infineon/CYW30739/PlatformManagerImpl.h diff --git a/src/platform/CYW30739/SystemPlatformConfig.h b/src/platform/Infineon/CYW30739/SystemPlatformConfig.h similarity index 100% rename from src/platform/CYW30739/SystemPlatformConfig.h rename to src/platform/Infineon/CYW30739/SystemPlatformConfig.h diff --git a/src/platform/CYW30739/SystemTimeSupport.cpp b/src/platform/Infineon/CYW30739/SystemTimeSupport.cpp similarity index 100% rename from src/platform/CYW30739/SystemTimeSupport.cpp rename to src/platform/Infineon/CYW30739/SystemTimeSupport.cpp diff --git a/src/platform/CYW30739/ThreadStackManagerImpl.cpp b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp similarity index 100% rename from src/platform/CYW30739/ThreadStackManagerImpl.cpp rename to src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp diff --git a/src/platform/CYW30739/ThreadStackManagerImpl.h b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h similarity index 100% rename from src/platform/CYW30739/ThreadStackManagerImpl.h rename to src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h diff --git a/src/platform/CYW30739/args.gni b/src/platform/Infineon/CYW30739/args.gni similarity index 94% rename from src/platform/CYW30739/args.gni rename to src/platform/Infineon/CYW30739/args.gni index 20266d8f86f825..a0d31c75f4c49b 100644 --- a/src/platform/CYW30739/args.gni +++ b/src/platform/Infineon/CYW30739/args.gni @@ -17,7 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/cyw30739_sdk.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/examples/platform/cyw30739/args.gni") +import("${chip_root}/examples/platform/infineon/cyw30739/args.gni") custom_toolchain = "${build_root}/toolchain/arm_gcc" @@ -51,7 +51,7 @@ mbedtls_target = "${cyw30739_sdk_build_root}:mbedtls" openthread_external_mbedtls = mbedtls_target openthread_project_core_config_file = "OpenThreadConfig.h" -openthread_core_config_deps = [ "${chip_root}/examples/platform/cyw30739:openthread_core_config_ifx_chip_examples" ] +openthread_core_config_deps = [ "${chip_root}/examples/platform/infineon/cyw30739:openthread_core_config_ifx_chip_examples" ] openthread_external_platform = "${chip_root}/third_party/openthread/platforms/ifx:libopenthread-ifx" diff --git a/src/platform/CYW30739/cycfg_gatt_db.c b/src/platform/Infineon/CYW30739/cycfg_gatt_db.c similarity index 100% rename from src/platform/CYW30739/cycfg_gatt_db.c rename to src/platform/Infineon/CYW30739/cycfg_gatt_db.c diff --git a/src/platform/CYW30739/cycfg_gatt_db.h b/src/platform/Infineon/CYW30739/cycfg_gatt_db.h similarity index 100% rename from src/platform/CYW30739/cycfg_gatt_db.h rename to src/platform/Infineon/CYW30739/cycfg_gatt_db.h diff --git a/src/platform/CYW30739/cyw30739-chip-mbedtls-config.h b/src/platform/Infineon/CYW30739/cyw30739-chip-mbedtls-config.h similarity index 100% rename from src/platform/CYW30739/cyw30739-chip-mbedtls-config.h rename to src/platform/Infineon/CYW30739/cyw30739-chip-mbedtls-config.h diff --git a/src/platform/P6/BLEManagerImpl.cpp b/src/platform/Infineon/PSOC6/BLEManagerImpl.cpp similarity index 100% rename from src/platform/P6/BLEManagerImpl.cpp rename to src/platform/Infineon/PSOC6/BLEManagerImpl.cpp diff --git a/src/platform/P6/BLEManagerImpl.h b/src/platform/Infineon/PSOC6/BLEManagerImpl.h similarity index 100% rename from src/platform/P6/BLEManagerImpl.h rename to src/platform/Infineon/PSOC6/BLEManagerImpl.h diff --git a/src/platform/P6/BUILD.gn b/src/platform/Infineon/PSOC6/BUILD.gn similarity index 93% rename from src/platform/P6/BUILD.gn rename to src/platform/Infineon/PSOC6/BUILD.gn index d7af750cb91df7..d2ed65a9bdf1d4 100644 --- a/src/platform/P6/BUILD.gn +++ b/src/platform/Infineon/PSOC6/BUILD.gn @@ -16,16 +16,16 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("${chip_root}/src/platform/device.gni") -assert(chip_device_platform == "p6") +assert(chip_device_platform == "psoc6") if (chip_enable_openthread) { import("//build_overrides/openthread.gni") } -static_library("P6") { +static_library("PSOC6") { sources = [ - "../FreeRTOS/SystemTimeSupport.cpp", - "../SingletonConfigurationManager.cpp", + "../../FreeRTOS/SystemTimeSupport.cpp", + "../../SingletonConfigurationManager.cpp", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "BlePlatformConfig.h", diff --git a/src/platform/P6/BlePlatformConfig.h b/src/platform/Infineon/PSOC6/BlePlatformConfig.h similarity index 100% rename from src/platform/P6/BlePlatformConfig.h rename to src/platform/Infineon/PSOC6/BlePlatformConfig.h diff --git a/src/platform/P6/CHIPDevicePlatformConfig.h b/src/platform/Infineon/PSOC6/CHIPDevicePlatformConfig.h similarity index 100% rename from src/platform/P6/CHIPDevicePlatformConfig.h rename to src/platform/Infineon/PSOC6/CHIPDevicePlatformConfig.h diff --git a/src/platform/P6/CHIPDevicePlatformEvent.h b/src/platform/Infineon/PSOC6/CHIPDevicePlatformEvent.h similarity index 100% rename from src/platform/P6/CHIPDevicePlatformEvent.h rename to src/platform/Infineon/PSOC6/CHIPDevicePlatformEvent.h diff --git a/src/platform/P6/CHIPPlatformConfig.h b/src/platform/Infineon/PSOC6/CHIPPlatformConfig.h similarity index 100% rename from src/platform/P6/CHIPPlatformConfig.h rename to src/platform/Infineon/PSOC6/CHIPPlatformConfig.h diff --git a/src/platform/P6/ConfigurationManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp similarity index 99% rename from src/platform/P6/ConfigurationManagerImpl.cpp rename to src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp index afa771d5acb837..753b82369512a2 100644 --- a/src/platform/P6/ConfigurationManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp @@ -28,8 +28,8 @@ #include #include +#include #include -#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/P6/ConfigurationManagerImpl.h b/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.h similarity index 100% rename from src/platform/P6/ConfigurationManagerImpl.h rename to src/platform/Infineon/PSOC6/ConfigurationManagerImpl.h diff --git a/src/platform/P6/ConnectivityManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp similarity index 99% rename from src/platform/P6/ConnectivityManagerImpl.cpp rename to src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp index 0e50d347b3f111..a005d88f01fe5a 100644 --- a/src/platform/P6/ConnectivityManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include @@ -45,7 +45,7 @@ #include "lwip/opt.h" #include -#include +#include #include #if !CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION diff --git a/src/platform/P6/ConnectivityManagerImpl.h b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.h similarity index 100% rename from src/platform/P6/ConnectivityManagerImpl.h rename to src/platform/Infineon/PSOC6/ConnectivityManagerImpl.h diff --git a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp similarity index 97% rename from src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp rename to src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp index 08f8593072584d..0379d62a630071 100644 --- a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp @@ -19,7 +19,7 @@ #include #include "DeviceNetworkProvisioningDelegateImpl.h" -#include "platform/P6/P6Utils.h" +#include "platform/Infineon/PSOC6/P6Utils.h" namespace chip { namespace DeviceLayer { diff --git a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.h b/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.h similarity index 100% rename from src/platform/P6/DeviceNetworkProvisioningDelegateImpl.h rename to src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.h diff --git a/src/platform/P6/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp similarity index 99% rename from src/platform/P6/DiagnosticDataProviderImpl.cpp rename to src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp index ae3efbcf091e80..16fe1300fdeed3 100644 --- a/src/platform/P6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/P6/DiagnosticDataProviderImpl.h b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h similarity index 99% rename from src/platform/P6/DiagnosticDataProviderImpl.h rename to src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h index cba4725b43eaf4..c1c08fac480d37 100644 --- a/src/platform/P6/DiagnosticDataProviderImpl.h +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h @@ -31,7 +31,7 @@ #include "whd_wlioctl.h" #include #include -#include +#include #define PHYRATE_KPBS_BYTES_PER_SEC 125 diff --git a/src/platform/P6/InetPlatformConfig.h b/src/platform/Infineon/PSOC6/InetPlatformConfig.h similarity index 100% rename from src/platform/P6/InetPlatformConfig.h rename to src/platform/Infineon/PSOC6/InetPlatformConfig.h diff --git a/src/platform/P6/KeyValueStoreManagerImpl.cpp b/src/platform/Infineon/PSOC6/KeyValueStoreManagerImpl.cpp similarity index 100% rename from src/platform/P6/KeyValueStoreManagerImpl.cpp rename to src/platform/Infineon/PSOC6/KeyValueStoreManagerImpl.cpp diff --git a/src/platform/P6/KeyValueStoreManagerImpl.h b/src/platform/Infineon/PSOC6/KeyValueStoreManagerImpl.h similarity index 100% rename from src/platform/P6/KeyValueStoreManagerImpl.h rename to src/platform/Infineon/PSOC6/KeyValueStoreManagerImpl.h diff --git a/src/platform/P6/Logging.cpp b/src/platform/Infineon/PSOC6/Logging.cpp similarity index 100% rename from src/platform/P6/Logging.cpp rename to src/platform/Infineon/PSOC6/Logging.cpp diff --git a/src/platform/P6/LwIPCoreLock.cpp b/src/platform/Infineon/PSOC6/LwIPCoreLock.cpp similarity index 100% rename from src/platform/P6/LwIPCoreLock.cpp rename to src/platform/Infineon/PSOC6/LwIPCoreLock.cpp diff --git a/src/platform/P6/MTBKeyValueStore.cpp b/src/platform/Infineon/PSOC6/MTBKeyValueStore.cpp similarity index 100% rename from src/platform/P6/MTBKeyValueStore.cpp rename to src/platform/Infineon/PSOC6/MTBKeyValueStore.cpp diff --git a/src/platform/P6/MTBKeyValueStore.h b/src/platform/Infineon/PSOC6/MTBKeyValueStore.h similarity index 100% rename from src/platform/P6/MTBKeyValueStore.h rename to src/platform/Infineon/PSOC6/MTBKeyValueStore.h diff --git a/src/platform/P6/NetworkCommissioningDriver.h b/src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h similarity index 100% rename from src/platform/P6/NetworkCommissioningDriver.h rename to src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h diff --git a/src/platform/P6/NetworkCommissioningWiFiDriver.cpp b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp similarity index 98% rename from src/platform/P6/NetworkCommissioningWiFiDriver.cpp rename to src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp index 56c98f5d1d6938..7f94651fb9b61e 100644 --- a/src/platform/P6/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp @@ -18,9 +18,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/platform/P6/OTAImageProcessorImpl.cpp b/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp similarity index 100% rename from src/platform/P6/OTAImageProcessorImpl.cpp rename to src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp diff --git a/src/platform/P6/OTAImageProcessorImpl.h b/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.h similarity index 100% rename from src/platform/P6/OTAImageProcessorImpl.h rename to src/platform/Infineon/PSOC6/OTAImageProcessorImpl.h diff --git a/src/platform/P6/P6Config.cpp b/src/platform/Infineon/PSOC6/P6Config.cpp similarity index 99% rename from src/platform/P6/P6Config.cpp rename to src/platform/Infineon/PSOC6/P6Config.cpp index e15d56c5583b6e..2a4b48df11bf3e 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/Infineon/PSOC6/P6Config.cpp @@ -27,14 +27,14 @@ #include -#include +#include #include #include #include #include #include -#include +#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/P6/P6Config.h b/src/platform/Infineon/PSOC6/P6Config.h similarity index 100% rename from src/platform/P6/P6Config.h rename to src/platform/Infineon/PSOC6/P6Config.h diff --git a/src/platform/P6/P6Utils.cpp b/src/platform/Infineon/PSOC6/P6Utils.cpp similarity index 99% rename from src/platform/P6/P6Utils.cpp rename to src/platform/Infineon/PSOC6/P6Utils.cpp index 584646c9b4cb2f..ac8744382784f0 100644 --- a/src/platform/P6/P6Utils.cpp +++ b/src/platform/Infineon/PSOC6/P6Utils.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "lwip/icmp.h" #include "lwip/inet.h" @@ -43,7 +43,7 @@ #include "lwip/sys.h" #include "lwip/timeouts.h" #include -#include +#include using namespace ::chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::DeviceNetworkInfo; diff --git a/src/platform/P6/P6Utils.h b/src/platform/Infineon/PSOC6/P6Utils.h similarity index 100% rename from src/platform/P6/P6Utils.h rename to src/platform/Infineon/PSOC6/P6Utils.h diff --git a/src/platform/P6/PlatformManagerImpl.cpp b/src/platform/Infineon/PSOC6/PlatformManagerImpl.cpp similarity index 97% rename from src/platform/P6/PlatformManagerImpl.cpp rename to src/platform/Infineon/PSOC6/PlatformManagerImpl.cpp index ac22597407dc98..8292e817719288 100644 --- a/src/platform/P6/PlatformManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/PlatformManagerImpl.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/src/platform/P6/PlatformManagerImpl.h b/src/platform/Infineon/PSOC6/PlatformManagerImpl.h similarity index 100% rename from src/platform/P6/PlatformManagerImpl.h rename to src/platform/Infineon/PSOC6/PlatformManagerImpl.h diff --git a/src/platform/P6/SystemPlatformConfig.h b/src/platform/Infineon/PSOC6/SystemPlatformConfig.h similarity index 100% rename from src/platform/P6/SystemPlatformConfig.h rename to src/platform/Infineon/PSOC6/SystemPlatformConfig.h diff --git a/src/platform/P6/WarmPlatformConfig.h b/src/platform/Infineon/PSOC6/WarmPlatformConfig.h similarity index 100% rename from src/platform/P6/WarmPlatformConfig.h rename to src/platform/Infineon/PSOC6/WarmPlatformConfig.h diff --git a/src/platform/P6/app_platform_cfg.c b/src/platform/Infineon/PSOC6/app_platform_cfg.c similarity index 100% rename from src/platform/P6/app_platform_cfg.c rename to src/platform/Infineon/PSOC6/app_platform_cfg.c diff --git a/src/platform/P6/app_platform_cfg.h b/src/platform/Infineon/PSOC6/app_platform_cfg.h similarity index 100% rename from src/platform/P6/app_platform_cfg.h rename to src/platform/Infineon/PSOC6/app_platform_cfg.h diff --git a/src/platform/P6/args.gni b/src/platform/Infineon/PSOC6/args.gni similarity index 66% rename from src/platform/P6/args.gni rename to src/platform/Infineon/PSOC6/args.gni index b34b5678ae231d..5577e67db7072c 100644 --- a/src/platform/P6/args.gni +++ b/src/platform/Infineon/PSOC6/args.gni @@ -13,17 +13,17 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") -import("${chip_root}/examples/platform/p6/args.gni") +import("${chip_root}/examples/platform/infineon/psoc6/args.gni") -#ARM architecture flags will be set based on p6_family. -arm_platform_config = "${p6_sdk_build_root}/p6_arm.gni" +#ARM architecture flags will be set based on psoc6_family. +arm_platform_config = "${psoc6_sdk_build_root}/psoc6_arm.gni" -mbedtls_target = "${p6_sdk_build_root}:p6_build" +mbedtls_target = "${psoc6_sdk_build_root}:psoc6_build" -chip_device_platform = "p6" +chip_device_platform = "psoc6" -lwip_platform = "p6" +lwip_platform = "psoc6" chip_build_tests = false diff --git a/src/platform/P6/cycfg_bt_settings.cpp b/src/platform/Infineon/PSOC6/cycfg_bt_settings.cpp similarity index 100% rename from src/platform/P6/cycfg_bt_settings.cpp rename to src/platform/Infineon/PSOC6/cycfg_bt_settings.cpp diff --git a/src/platform/P6/cycfg_bt_settings.h b/src/platform/Infineon/PSOC6/cycfg_bt_settings.h similarity index 100% rename from src/platform/P6/cycfg_bt_settings.h rename to src/platform/Infineon/PSOC6/cycfg_bt_settings.h diff --git a/src/platform/P6/cycfg_gap.cpp b/src/platform/Infineon/PSOC6/cycfg_gap.cpp similarity index 100% rename from src/platform/P6/cycfg_gap.cpp rename to src/platform/Infineon/PSOC6/cycfg_gap.cpp diff --git a/src/platform/P6/cycfg_gap.h b/src/platform/Infineon/PSOC6/cycfg_gap.h similarity index 100% rename from src/platform/P6/cycfg_gap.h rename to src/platform/Infineon/PSOC6/cycfg_gap.h diff --git a/src/platform/P6/cycfg_gatt_db.c b/src/platform/Infineon/PSOC6/cycfg_gatt_db.c similarity index 100% rename from src/platform/P6/cycfg_gatt_db.c rename to src/platform/Infineon/PSOC6/cycfg_gatt_db.c diff --git a/src/platform/P6/cycfg_gatt_db.h b/src/platform/Infineon/PSOC6/cycfg_gatt_db.h similarity index 100% rename from src/platform/P6/cycfg_gatt_db.h rename to src/platform/Infineon/PSOC6/cycfg_gatt_db.h diff --git a/src/platform/P6/ethernet.h b/src/platform/Infineon/PSOC6/ethernet.h similarity index 100% rename from src/platform/P6/ethernet.h rename to src/platform/Infineon/PSOC6/ethernet.h diff --git a/src/platform/device.gni b/src/platform/device.gni index 0592a6720e13c0..87330499cbca6e 100755 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -82,7 +82,7 @@ declare_args() { # Select DNS-SD implementation if (chip_device_platform == "linux" || chip_device_platform == "esp32" || - chip_device_platform == "mbed" || chip_device_platform == "p6" || + chip_device_platform == "mbed" || chip_device_platform == "psoc6" || chip_device_platform == "ameba" || chip_device_platform == "webos" || chip_device_platform == "cc32xx" || chip_device_platform == "bl602" || chip_device_platform == "mw320" || chip_device_platform == "beken") { @@ -122,8 +122,8 @@ if (chip_device_platform == "cc13x2_26x2") { _chip_device_layer = "telink" } else if (chip_device_platform == "mbed") { _chip_device_layer = "mbed" -} else if (chip_device_platform == "p6") { - _chip_device_layer = "P6" +} else if (chip_device_platform == "psoc6") { + _chip_device_layer = "Infineon/PSOC6" } else if (chip_device_platform == "android") { _chip_device_layer = "android" } else if (chip_device_platform == "ameba") { @@ -131,7 +131,7 @@ if (chip_device_platform == "cc13x2_26x2") { } else if (chip_device_platform == "bl602") { _chip_device_layer = "bouffalolab/BL602" } else if (chip_device_platform == "cyw30739") { - _chip_device_layer = "CYW30739" + _chip_device_layer = "Infineon/CYW30739" } else if (chip_device_platform == "webos") { _chip_device_layer = "webos" } else if (chip_device_platform == "mw320") { @@ -196,7 +196,7 @@ assert( chip_device_platform == "nrfconnect" || chip_device_platform == "k32w0" || chip_device_platform == "qpg" || chip_device_platform == "telink" || chip_device_platform == "mbed" || - chip_device_platform == "p6" || chip_device_platform == "android" || + chip_device_platform == "psoc6" || chip_device_platform == "android" || chip_device_platform == "ameba" || chip_device_platform == "cyw30739" || chip_device_platform == "webos" || chip_device_platform == "bl602" || chip_device_platform == "mw320" || chip_device_platform == "zephyr" || diff --git a/third_party/cyw30739_sdk/BUILD.gn b/third_party/infineon/cyw30739_sdk/BUILD.gn similarity index 94% rename from third_party/cyw30739_sdk/BUILD.gn rename to third_party/infineon/cyw30739_sdk/BUILD.gn index a64a0293f54305..75b9e272840b63 100644 --- a/third_party/cyw30739_sdk/BUILD.gn +++ b/third_party/infineon/cyw30739_sdk/BUILD.gn @@ -32,7 +32,7 @@ group("cyw30739_sdk") { config("mbedtls_cyw30739_config") { defines = [ "MBEDTLS_CONFIG_FILE=", - "MBEDTLS_USER_CONFIG_FILE=", + "MBEDTLS_USER_CONFIG_FILE=", ] include_dirs = [ chip_root ] diff --git a/third_party/cyw30739_sdk/bsp_design_modus/cycfg_notices.h b/third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_notices.h similarity index 100% rename from third_party/cyw30739_sdk/bsp_design_modus/cycfg_notices.h rename to third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_notices.h diff --git a/third_party/cyw30739_sdk/bsp_design_modus/cycfg_pins.c b/third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_pins.c similarity index 100% rename from third_party/cyw30739_sdk/bsp_design_modus/cycfg_pins.c rename to third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_pins.c diff --git a/third_party/cyw30739_sdk/bsp_design_modus/cycfg_pins.h b/third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_pins.h similarity index 100% rename from third_party/cyw30739_sdk/bsp_design_modus/cycfg_pins.h rename to third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_pins.h diff --git a/third_party/cyw30739_sdk/bsp_design_modus/cycfg_routing.h b/third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_routing.h similarity index 100% rename from third_party/cyw30739_sdk/bsp_design_modus/cycfg_routing.h rename to third_party/infineon/cyw30739_sdk/bsp_design_modus/cycfg_routing.h diff --git a/third_party/cyw30739_sdk/btp_reader.py b/third_party/infineon/cyw30739_sdk/btp_reader.py similarity index 100% rename from third_party/cyw30739_sdk/btp_reader.py rename to third_party/infineon/cyw30739_sdk/btp_reader.py diff --git a/third_party/cyw30739_sdk/compress_cgs_data.py b/third_party/infineon/cyw30739_sdk/compress_cgs_data.py similarity index 100% rename from third_party/cyw30739_sdk/compress_cgs_data.py rename to third_party/infineon/cyw30739_sdk/compress_cgs_data.py diff --git a/third_party/cyw30739_sdk/cyw30739_arm.gni b/third_party/infineon/cyw30739_sdk/cyw30739_arm.gni similarity index 100% rename from third_party/cyw30739_sdk/cyw30739_arm.gni rename to third_party/infineon/cyw30739_sdk/cyw30739_arm.gni diff --git a/third_party/cyw30739_sdk/cyw30739_executable.gni b/third_party/infineon/cyw30739_sdk/cyw30739_executable.gni similarity index 100% rename from third_party/cyw30739_sdk/cyw30739_executable.gni rename to third_party/infineon/cyw30739_sdk/cyw30739_executable.gni diff --git a/third_party/cyw30739_sdk/cyw30739_sdk.gni b/third_party/infineon/cyw30739_sdk/cyw30739_sdk.gni similarity index 100% rename from third_party/cyw30739_sdk/cyw30739_sdk.gni rename to third_party/infineon/cyw30739_sdk/cyw30739_sdk.gni diff --git a/third_party/cyw30739_sdk/flash.btp b/third_party/infineon/cyw30739_sdk/flash.btp similarity index 100% rename from third_party/cyw30739_sdk/flash.btp rename to third_party/infineon/cyw30739_sdk/flash.btp diff --git a/third_party/cyw30739_sdk/gen_ota_image.py b/third_party/infineon/cyw30739_sdk/gen_ota_image.py similarity index 100% rename from third_party/cyw30739_sdk/gen_ota_image.py rename to third_party/infineon/cyw30739_sdk/gen_ota_image.py diff --git a/third_party/cyw30739_sdk/include/auto_flags.h b/third_party/infineon/cyw30739_sdk/include/auto_flags.h similarity index 100% rename from third_party/cyw30739_sdk/include/auto_flags.h rename to third_party/infineon/cyw30739_sdk/include/auto_flags.h diff --git a/third_party/cyw30739_sdk/include/ota_fw_upgrade.h b/third_party/infineon/cyw30739_sdk/include/ota_fw_upgrade.h similarity index 100% rename from third_party/cyw30739_sdk/include/ota_fw_upgrade.h rename to third_party/infineon/cyw30739_sdk/include/ota_fw_upgrade.h diff --git a/third_party/cyw30739_sdk/include/wiced_button_manager.h b/third_party/infineon/cyw30739_sdk/include/wiced_button_manager.h similarity index 100% rename from third_party/cyw30739_sdk/include/wiced_button_manager.h rename to third_party/infineon/cyw30739_sdk/include/wiced_button_manager.h diff --git a/third_party/cyw30739_sdk/include/wiced_led_manager.h b/third_party/infineon/cyw30739_sdk/include/wiced_led_manager.h similarity index 100% rename from third_party/cyw30739_sdk/include/wiced_led_manager.h rename to third_party/infineon/cyw30739_sdk/include/wiced_led_manager.h diff --git a/third_party/cyw30739_sdk/merge_hex.py b/third_party/infineon/cyw30739_sdk/merge_hex.py similarity index 100% rename from third_party/cyw30739_sdk/merge_hex.py rename to third_party/infineon/cyw30739_sdk/merge_hex.py diff --git a/third_party/cyw30739_sdk/repos/30739A0 b/third_party/infineon/cyw30739_sdk/repos/30739A0 similarity index 100% rename from third_party/cyw30739_sdk/repos/30739A0 rename to third_party/infineon/cyw30739_sdk/repos/30739A0 diff --git a/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 b/third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 similarity index 100% rename from third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 rename to third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 diff --git a/third_party/cyw30739_sdk/repos/btsdk-include b/third_party/infineon/cyw30739_sdk/repos/btsdk-include similarity index 100% rename from third_party/cyw30739_sdk/repos/btsdk-include rename to third_party/infineon/cyw30739_sdk/repos/btsdk-include diff --git a/third_party/cyw30739_sdk/repos/btsdk-tools b/third_party/infineon/cyw30739_sdk/repos/btsdk-tools similarity index 100% rename from third_party/cyw30739_sdk/repos/btsdk-tools rename to third_party/infineon/cyw30739_sdk/repos/btsdk-tools diff --git a/third_party/cyw30739_sdk/scripts/wiced-gen-ld.pl b/third_party/infineon/cyw30739_sdk/scripts/wiced-gen-ld.pl similarity index 100% rename from third_party/cyw30739_sdk/scripts/wiced-gen-ld.pl rename to third_party/infineon/cyw30739_sdk/scripts/wiced-gen-ld.pl diff --git a/third_party/cyw30739_sdk/src/ota_fw_upgrade.c b/third_party/infineon/cyw30739_sdk/src/ota_fw_upgrade.c similarity index 100% rename from third_party/cyw30739_sdk/src/ota_fw_upgrade.c rename to third_party/infineon/cyw30739_sdk/src/ota_fw_upgrade.c diff --git a/third_party/cyw30739_sdk/src/platform_retarget_lock.c b/third_party/infineon/cyw30739_sdk/src/platform_retarget_lock.c similarity index 100% rename from third_party/cyw30739_sdk/src/platform_retarget_lock.c rename to third_party/infineon/cyw30739_sdk/src/platform_retarget_lock.c diff --git a/third_party/cyw30739_sdk/src/wiced_button_manager.c b/third_party/infineon/cyw30739_sdk/src/wiced_button_manager.c similarity index 100% rename from third_party/cyw30739_sdk/src/wiced_button_manager.c rename to third_party/infineon/cyw30739_sdk/src/wiced_button_manager.c diff --git a/third_party/cyw30739_sdk/src/wiced_led_manager.c b/third_party/infineon/cyw30739_sdk/src/wiced_led_manager.c similarity index 100% rename from third_party/cyw30739_sdk/src/wiced_led_manager.c rename to third_party/infineon/cyw30739_sdk/src/wiced_led_manager.c diff --git a/third_party/p6/BUILD.gn b/third_party/infineon/psoc6/BUILD.gn similarity index 80% rename from third_party/p6/BUILD.gn rename to third_party/infineon/psoc6/BUILD.gn index cc892053658136..ebb79e618655c3 100644 --- a/third_party/p6/BUILD.gn +++ b/third_party/infineon/psoc6/BUILD.gn @@ -12,18 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build_overrides/p6.gni") -import("${p6_sdk_build_root}/p6_sdk.gni") +import("//build_overrides/psoc6.gni") +import("${psoc6_sdk_build_root}/psoc6_sdk.gni") declare_args() { - # Build target to use for p6 SDK. Use this to set global SDK defines. - p6_target_project = "" + # Build target to use for psoc6 SDK. Use this to set global SDK defines. + psoc6_target_project = "" } -assert(p6_target_project != "", "p6_target_project must be specified") +assert(psoc6_target_project != "", "psoc6_target_project must be specified") # Add includes, cflags, asmflags, etc in config -config("p6_sdk_config") { +config("psoc6_sdk_config") { # Pull out includes from generated json # Treat these includes as system includes, so warnings in them are not fatal. _system_include_dirs = [] @@ -32,7 +32,7 @@ config("p6_sdk_config") { include_dir = string_replace(include_dir, "-I", "", 1) # Path is relative to SDK - include_dir = "${p6_sdk_root}/${include_dir}" + include_dir = "${psoc6_sdk_root}/${include_dir}" _system_include_dirs += [ include_dir ] } @@ -43,7 +43,7 @@ config("p6_sdk_config") { } # Also add project include path (passed in from project build) - proj_path = get_label_info(p6_target_project, "dir") + proj_path = get_label_info(psoc6_target_project, "dir") include_dirs = [ "${proj_path}/include" ] # Pull out defines from generated json @@ -57,7 +57,7 @@ config("p6_sdk_config") { libs = [] foreach(lib, mtb_json.libs) { # Path is relative to SDK - lib = "${p6_sdk_root}/${lib}" + lib = "${psoc6_sdk_root}/${lib}" libs += [ lib ] } @@ -76,7 +76,7 @@ config("p6_sdk_config") { linker_script = string_replace(linker_script, "-T", "", 1) # Path is relative to SDK - linker_script = "${p6_sdk_root}/${linker_script}" + linker_script = "${psoc6_sdk_root}/${linker_script}" ldflags += [ "-T" + rebase_path(linker_script, root_build_dir) ] } @@ -89,7 +89,7 @@ config("p6_sdk_config") { ldflags -= [ "--specs=nano.specs" ] } -group("p6_build") { - public_configs = [ ":p6_sdk_config" ] - public_deps = [ p6_target_project ] +group("psoc6_build") { + public_configs = [ ":psoc6_sdk_config" ] + public_deps = [ psoc6_target_project ] } diff --git a/third_party/p6/p6_arm.gni b/third_party/infineon/psoc6/psoc6_arm.gni similarity index 96% rename from third_party/p6/p6_arm.gni rename to third_party/infineon/psoc6/psoc6_arm.gni index 1bd10393e9c60e..031e6e1cd4ce23 100644 --- a/third_party/p6/p6_arm.gni +++ b/third_party/infineon/psoc6/psoc6_arm.gni @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("p6_board.gni") +import("psoc6_board.gni") arm_arch = "armv7e-m" arm_abi = "aapcs" diff --git a/third_party/p6/p6_board.gni b/third_party/infineon/psoc6/psoc6_board.gni similarity index 82% rename from third_party/p6/p6_board.gni rename to third_party/infineon/psoc6/psoc6_board.gni index 01fedc36959abc..a6cae75a7aecc3 100644 --- a/third_party/p6/p6_board.gni +++ b/third_party/infineon/psoc6/psoc6_board.gni @@ -14,13 +14,13 @@ declare_args() { # P6 board used - p6_board = "" + psoc6_board = "" } -if (p6_board == "") { - p6_board = getenv("P6_BOARD") +if (psoc6_board == "") { + psoc6_board = getenv("PSOC6_BOARD") } -assert(p6_board != "", "P6_BOARD must be specified") +assert(psoc6_board != "", "PSOC6_BOARD must be specified") board_defines = [] diff --git a/third_party/p6/p6_executable.gni b/third_party/infineon/psoc6/psoc6_executable.gni similarity index 92% rename from third_party/p6/p6_executable.gni rename to third_party/infineon/psoc6/psoc6_executable.gni index bec0a3e3835a5c..02fd0e6b1593ed 100644 --- a/third_party/p6/p6_executable.gni +++ b/third_party/infineon/psoc6/psoc6_executable.gni @@ -16,9 +16,9 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("${build_root}/toolchain/flashable_executable.gni") -import("p6_board.gni") +import("psoc6_board.gni") -template("p6_executable") { +template("psoc6_executable") { output_base_name = get_path_info(invoker.output_name, "name") objcopy_image_name = output_base_name + ".hex" @@ -33,7 +33,7 @@ template("p6_executable") { flashing_runtime_target = target_name + ".flashing_runtime" flashing_script_inputs = [ "${chip_root}/scripts/flashing/firmware_utils.py", - "${chip_root}/scripts/flashing/p6_firmware_utils.py", + "${chip_root}/scripts/flashing/psoc6_firmware_utils.py", ] copy(flashing_runtime_target) { @@ -45,9 +45,9 @@ template("p6_executable") { "${chip_root}/scripts/flashing/gen_flashing_script.py" flashing_script_name = output_base_name + ".flash.py" flashing_options = [ - "p6", + "psoc6", "--device", - "${p6_board}", + "${psoc6_board}", ] flashable_executable(target_name) { diff --git a/third_party/p6/p6_sdk.gni b/third_party/infineon/psoc6/psoc6_sdk.gni similarity index 81% rename from third_party/p6/p6_sdk.gni rename to third_party/infineon/psoc6/psoc6_sdk.gni index fb86bb34937030..90366ddac471aa 100644 --- a/third_party/p6/p6_sdk.gni +++ b/third_party/infineon/psoc6/psoc6_sdk.gni @@ -15,9 +15,9 @@ import("//build_overrides/chip.gni") import("//build_overrides/jlink.gni") import("//build_overrides/mbedtls.gni") -import("//build_overrides/p6.gni") +import("//build_overrides/psoc6.gni") import("${chip_root}/src/platform/device.gni") -import("p6_board.gni") +import("psoc6_board.gni") # TODO: Don't hardcode config/toolchain # TODO: Convert to GN action? @@ -27,17 +27,18 @@ if (is_debug) { debug_str = "Release" } -mtb_json = read_file("${p6_sdk_root}/build/${p6_board}/$debug_str/GCC_ARM.json", - "json") +mtb_json = + read_file("${psoc6_sdk_root}/build/${psoc6_board}/$debug_str/GCC_ARM.json", + "json") -# Defines an p6 SDK build target. +# Defines an psoc6 SDK build target. # # Parameters: # sources - The sources files to build. # -template("p6_sdk_sources") { - if (defined(invoker.p6_project_dir)) { - p6_project_dir = invoker.p6_project_dir +template("psoc6_sdk_sources") { + if (defined(invoker.psoc6_project_dir)) { + psoc6_project_dir = invoker.psoc6_project_dir } if (defined(invoker.chip_enable_ota_requestor)) { @@ -46,7 +47,7 @@ template("p6_sdk_sources") { } } - # While most p6 sdk includes come from the p6_sdk_config config (in + # While most psoc6 sdk includes come from the psoc6_sdk_config config (in # BUILD.gn), this template gets instantiated by each project each of which # provides a few extra includes/defines. Handle those here. config("project_configs") { @@ -54,7 +55,7 @@ template("p6_sdk_sources") { if (defined(invoker.include_dirs)) { include_dirs += invoker.include_dirs } - include_dirs += [ "${p6_project_dir}/include" ] + include_dirs += [ "${psoc6_project_dir}/include" ] defines = [] if (defined(invoker.defines)) { @@ -84,17 +85,17 @@ template("p6_sdk_sources") { # Pull out c sources from generated json foreach(src, mtb_json_local.c_source) { - sources += [ "${p6_sdk_root}/${src}" ] + sources += [ "${psoc6_sdk_root}/${src}" ] } # Pull out cpp sources from generated json foreach(src, mtb_json_local.cxx_source) { - sources += [ "${p6_sdk_root}/${src}" ] + sources += [ "${psoc6_sdk_root}/${src}" ] } # Pull out .S files from generated json foreach(asm, mtb_json_local.asm_source) { - sources += [ "${p6_sdk_root}/${asm}" ] + sources += [ "${psoc6_sdk_root}/${asm}" ] } public_deps = [] diff --git a/third_party/p6/p6_sdk/.gitignore b/third_party/infineon/psoc6/psoc6_sdk/.gitignore similarity index 100% rename from third_party/p6/p6_sdk/.gitignore rename to third_party/infineon/psoc6/psoc6_sdk/.gitignore diff --git a/third_party/p6/p6_sdk/Makefile b/third_party/infineon/psoc6/psoc6_sdk/Makefile similarity index 100% rename from third_party/p6/p6_sdk/Makefile rename to third_party/infineon/psoc6/psoc6_sdk/Makefile diff --git a/third_party/p6/p6_sdk/arch/cc.h b/third_party/infineon/psoc6/psoc6_sdk/arch/cc.h similarity index 100% rename from third_party/p6/p6_sdk/arch/cc.h rename to third_party/infineon/psoc6/psoc6_sdk/arch/cc.h diff --git a/third_party/p6/p6_sdk/arch/sys_arch.c b/third_party/infineon/psoc6/psoc6_sdk/arch/sys_arch.c similarity index 100% rename from third_party/p6/p6_sdk/arch/sys_arch.c rename to third_party/infineon/psoc6/psoc6_sdk/arch/sys_arch.c diff --git a/third_party/p6/p6_sdk/arch/sys_arch.h b/third_party/infineon/psoc6/psoc6_sdk/arch/sys_arch.h similarity index 100% rename from third_party/p6/p6_sdk/arch/sys_arch.h rename to third_party/infineon/psoc6/psoc6_sdk/arch/sys_arch.h diff --git a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json similarity index 100% rename from third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json rename to third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json diff --git a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json similarity index 100% rename from third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json rename to third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json diff --git a/third_party/p6/p6_sdk/configs/FreeRTOSConfig.h b/third_party/infineon/psoc6/psoc6_sdk/configs/FreeRTOSConfig.h similarity index 100% rename from third_party/p6/p6_sdk/configs/FreeRTOSConfig.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/FreeRTOSConfig.h diff --git a/third_party/p6/p6_sdk/configs/iot_config.h b/third_party/infineon/psoc6/psoc6_sdk/configs/iot_config.h similarity index 100% rename from third_party/p6/p6_sdk/configs/iot_config.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/iot_config.h diff --git a/third_party/p6/p6_sdk/configs/lwipopts.h b/third_party/infineon/psoc6/psoc6_sdk/configs/lwipopts.h similarity index 100% rename from third_party/p6/p6_sdk/configs/lwipopts.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/lwipopts.h diff --git a/third_party/p6/p6_sdk/configs/mbedtls_user_config.h b/third_party/infineon/psoc6/psoc6_sdk/configs/mbedtls_user_config.h similarity index 100% rename from third_party/p6/p6_sdk/configs/mbedtls_user_config.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/mbedtls_user_config.h diff --git a/third_party/p6/p6_sdk/configs/mqtt_client_config.h b/third_party/infineon/psoc6/psoc6_sdk/configs/mqtt_client_config.h similarity index 100% rename from third_party/p6/p6_sdk/configs/mqtt_client_config.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/mqtt_client_config.h diff --git a/third_party/p6/p6_sdk/configs/wifi_config.h b/third_party/infineon/psoc6/psoc6_sdk/configs/wifi_config.h similarity index 100% rename from third_party/p6/p6_sdk/configs/wifi_config.h rename to third_party/infineon/psoc6/psoc6_sdk/configs/wifi_config.h diff --git a/third_party/p6/p6_sdk/libs/TARGET_CY8CKIT-062S2-43012 b/third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 similarity index 100% rename from third_party/p6/p6_sdk/libs/TARGET_CY8CKIT-062S2-43012 rename to third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 diff --git a/third_party/p6/p6_sdk/libs/abstraction-rtos b/third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos similarity index 100% rename from third_party/p6/p6_sdk/libs/abstraction-rtos rename to third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos diff --git a/third_party/p6/p6_sdk/libs/anycloud-ota b/third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota similarity index 100% rename from third_party/p6/p6_sdk/libs/anycloud-ota rename to third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota diff --git a/third_party/p6/p6_sdk/libs/bluetooth-freertos b/third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos similarity index 100% rename from third_party/p6/p6_sdk/libs/bluetooth-freertos rename to third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos diff --git a/third_party/p6/p6_sdk/libs/btstack b/third_party/infineon/psoc6/psoc6_sdk/libs/btstack similarity index 100% rename from third_party/p6/p6_sdk/libs/btstack rename to third_party/infineon/psoc6/psoc6_sdk/libs/btstack diff --git a/third_party/p6/p6_sdk/libs/clib-support b/third_party/infineon/psoc6/psoc6_sdk/libs/clib-support similarity index 100% rename from third_party/p6/p6_sdk/libs/clib-support rename to third_party/infineon/psoc6/psoc6_sdk/libs/clib-support diff --git a/third_party/p6/p6_sdk/libs/connectivity-utilities b/third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities similarity index 100% rename from third_party/p6/p6_sdk/libs/connectivity-utilities rename to third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities diff --git a/third_party/p6/p6_sdk/libs/core-lib b/third_party/infineon/psoc6/psoc6_sdk/libs/core-lib similarity index 100% rename from third_party/p6/p6_sdk/libs/core-lib rename to third_party/infineon/psoc6/psoc6_sdk/libs/core-lib diff --git a/third_party/p6/p6_sdk/libs/core-make b/third_party/infineon/psoc6/psoc6_sdk/libs/core-make similarity index 100% rename from third_party/p6/p6_sdk/libs/core-make rename to third_party/infineon/psoc6/psoc6_sdk/libs/core-make diff --git a/third_party/p6/p6_sdk/libs/freertos b/third_party/infineon/psoc6/psoc6_sdk/libs/freertos similarity index 100% rename from third_party/p6/p6_sdk/libs/freertos rename to third_party/infineon/psoc6/psoc6_sdk/libs/freertos diff --git a/third_party/p6/p6_sdk/libs/kv-store b/third_party/infineon/psoc6/psoc6_sdk/libs/kv-store similarity index 100% rename from third_party/p6/p6_sdk/libs/kv-store rename to third_party/infineon/psoc6/psoc6_sdk/libs/kv-store diff --git a/third_party/p6/p6_sdk/libs/lwip b/third_party/infineon/psoc6/psoc6_sdk/libs/lwip similarity index 100% rename from third_party/p6/p6_sdk/libs/lwip rename to third_party/infineon/psoc6/psoc6_sdk/libs/lwip diff --git a/third_party/p6/p6_sdk/libs/mbedtls b/third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls similarity index 100% rename from third_party/p6/p6_sdk/libs/mbedtls rename to third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls diff --git a/third_party/p6/p6_sdk/libs/mtb-hal-cat1 b/third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 similarity index 100% rename from third_party/p6/p6_sdk/libs/mtb-hal-cat1 rename to third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 diff --git a/third_party/p6/p6_sdk/libs/mtb-pdl-cat1 b/third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 similarity index 100% rename from third_party/p6/p6_sdk/libs/mtb-pdl-cat1 rename to third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 diff --git a/third_party/p6/p6_sdk/libs/psoc6cm0p b/third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p similarity index 100% rename from third_party/p6/p6_sdk/libs/psoc6cm0p rename to third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p diff --git a/third_party/p6/p6_sdk/libs/recipe-make-cat1a b/third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a similarity index 100% rename from third_party/p6/p6_sdk/libs/recipe-make-cat1a rename to third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a diff --git a/third_party/p6/p6_sdk/libs/retarget-io b/third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io similarity index 100% rename from third_party/p6/p6_sdk/libs/retarget-io rename to third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io diff --git a/third_party/p6/p6_sdk/libs/secure-sockets b/third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets similarity index 100% rename from third_party/p6/p6_sdk/libs/secure-sockets rename to third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets diff --git a/third_party/p6/p6_sdk/libs/serial-flash b/third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash similarity index 100% rename from third_party/p6/p6_sdk/libs/serial-flash rename to third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash diff --git a/third_party/p6/p6_sdk/libs/whd-bsp-integration b/third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration similarity index 100% rename from third_party/p6/p6_sdk/libs/whd-bsp-integration rename to third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration diff --git a/third_party/p6/p6_sdk/libs/wifi-connection-manager b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager similarity index 100% rename from third_party/p6/p6_sdk/libs/wifi-connection-manager rename to third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager diff --git a/third_party/p6/p6_sdk/libs/wifi-host-driver b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver similarity index 100% rename from third_party/p6/p6_sdk/libs/wifi-host-driver rename to third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver diff --git a/third_party/p6/p6_sdk/libs/wifi-mw-core b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core similarity index 100% rename from third_party/p6/p6_sdk/libs/wifi-mw-core rename to third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core diff --git a/third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_assert.h b/third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_assert.h similarity index 100% rename from third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_assert.h rename to third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_assert.h diff --git a/third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_config.h b/third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_config.h similarity index 100% rename from third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_config.h rename to third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_config.h diff --git a/third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_logging.h b/third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_logging.h similarity index 100% rename from third_party/p6/p6_sdk/ota/config/mcuboot_config/mcuboot_logging.h rename to third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_config/mcuboot_logging.h diff --git a/third_party/p6/p6_sdk/ota/config/mcuboot_crypto_acc_config.h b/third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_crypto_acc_config.h similarity index 100% rename from third_party/p6/p6_sdk/ota/config/mcuboot_crypto_acc_config.h rename to third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_crypto_acc_config.h diff --git a/third_party/p6/p6_sdk/ota/config/mcuboot_crypto_config.h b/third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_crypto_config.h similarity index 100% rename from third_party/p6/p6_sdk/ota/config/mcuboot_crypto_config.h rename to third_party/infineon/psoc6/psoc6_sdk/ota/config/mcuboot_crypto_config.h diff --git a/third_party/p6/p6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld b/third_party/infineon/psoc6/psoc6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld similarity index 100% rename from third_party/p6/p6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld rename to third_party/infineon/psoc6/psoc6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld diff --git a/third_party/p6/p6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex b/third_party/infineon/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex similarity index 100% rename from third_party/p6/p6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex rename to third_party/infineon/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex diff --git a/third_party/p6/p6_sdk/ota/ota_base_build.sh b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh similarity index 100% rename from third_party/p6/p6_sdk/ota/ota_base_build.sh rename to third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh diff --git a/third_party/p6/p6_sdk/ota/ota_update_build.sh b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh similarity index 100% rename from third_party/p6/p6_sdk/ota/ota_update_build.sh rename to third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh From b1f2fc75001b8dbfc6137806feeb92965bc38c0f Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Thu, 18 Aug 2022 20:51:00 +0530 Subject: [PATCH 069/115] Test added aug18 (#21996) * Added Manual Scripts * Added Auto generated file * Restyled by whitespace * Restyled by clang-format * Added Manual scripts Co-authored-by: Restyled.io --- src/app/tests/suites/certification/PICS.yaml | 65 ++++++ .../suites/certification/Test_TC_ACL_2_3.yaml | 51 ++++- .../certification/Test_TC_BIND_2_1.yaml | 42 +++- .../certification/Test_TC_BIND_2_2.yaml | 59 ++++- .../certification/Test_TC_BIND_2_3.yaml | 67 ++++-- .../certification/Test_TC_BINFO_2_2.yaml | 15 +- .../certification/Test_TC_BOOL_2_2.yaml | 7 +- .../certification/Test_TC_BRBINFO_1_1.yaml | 17 +- .../certification/Test_TC_BRBINFO_2_1.yaml | 91 ++++++-- .../certification/Test_TC_CADMIN_1_1.yaml | 134 +++++++---- .../certification/Test_TC_CADMIN_1_11.yaml | 8 +- .../certification/Test_TC_CADMIN_1_12.yaml | 8 +- .../certification/Test_TC_CADMIN_1_14.yaml | 8 +- .../certification/Test_TC_CADMIN_1_15.yaml | 14 +- .../certification/Test_TC_CADMIN_1_16.yaml | 14 +- .../certification/Test_TC_CADMIN_1_17.yaml | 16 +- .../certification/Test_TC_CADMIN_1_18.yaml | 26 +-- .../certification/Test_TC_CADMIN_1_19.yaml | 2 +- .../certification/Test_TC_CADMIN_1_2.yaml | 101 ++++++++- .../certification/Test_TC_CADMIN_1_20.yaml | 2 +- .../certification/Test_TC_CADMIN_1_21.yaml | 12 +- .../certification/Test_TC_CADMIN_1_22.yaml | 43 +--- .../certification/Test_TC_CADMIN_1_7.yaml | 15 ++ .../certification/Test_TC_CADMIN_1_8.yaml | 48 +++- .../certification/Test_TC_CGEN_2_2.yaml | 3 +- .../suites/certification/Test_TC_DA_1_4.yaml | 15 +- .../suites/certification/Test_TC_DA_1_5.yaml | 38 ++-- .../suites/certification/Test_TC_DA_1_6.yaml | 11 +- .../certification/Test_TC_DGGEN_2_2.yaml | 65 ++---- .../certification/Test_TC_DGSW_3_1.yaml | 48 ++-- .../certification/Test_TC_DRLK_2_6.yaml | 19 +- .../suites/certification/Test_TC_IDM_2_2.yaml | 5 +- .../suites/certification/Test_TC_IDM_3_1.yaml | 118 +++++----- .../suites/certification/Test_TC_IDM_4_1.yaml | 68 +++++- .../suites/certification/Test_TC_MOD_2_1.yaml | 4 +- .../suites/certification/Test_TC_MOD_3_1.yaml | 2 +- .../suites/certification/Test_TC_MOD_3_3.yaml | 23 ++ .../suites/certification/Test_TC_MOD_3_4.yaml | 19 ++ .../suites/certification/Test_TC_OCC_3_2.yaml | 88 -------- .../suites/certification/Test_TC_OO_3_1.yaml | 2 +- .../suites/certification/Test_TC_PCC_3_1.yaml | 137 ++++++----- .../suites/certification/Test_TC_SC_4_1.yaml | 24 +- .../suites/certification/Test_TC_SC_4_10.yaml | 212 +----------------- .../suites/certification/Test_TC_SC_4_3.yaml | 58 +---- .../suites/certification/Test_TC_SC_4_4.yaml | 87 +++++-- .../suites/certification/Test_TC_SC_4_7.yaml | 69 +++--- .../certification/Test_TC_SWTCH_2_2.yaml | 37 ++- .../certification/Test_TC_SWTCH_3_2.yaml | 26 +-- .../tests/suites/certification/ci-pics-values | 12 + src/app/tests/suites/manualTests.json | 3 +- .../chip-tool/zap-generated/test/Commands.h | 58 ----- 51 files changed, 1178 insertions(+), 938 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 1a05e449616317..a953e5b9568b2a 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -5490,3 +5490,68 @@ PICS: "Is the device a Server and capable of generating large data which is greater than 1 MTU(1280 bytes)" id: MCORE.IDM.S.LargeData + + - label: + "Is the device a Client and supports writing an attribute of DataType + Bool" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bool + + - label: + "Is the device a Client and supports writing an attribute of DataType + String" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_String + + - label: + "Is the device a Client and supports writing an attribute of DataType + Unsigned Integer" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_UnsignedInteger + + - label: + "Is the device a Client and supports writing an attribute of DataType + Signed Integer" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_SignedInteger + + - label: + "Is the device a Client and supports writing an attribute of DataType + Struct" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Struct + + - label: + "Is the device a Client and supports writing an attribute of DataType + Floating Point" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_FloatingPoint + + - label: + "Is the device a Client and supports writing an attribute of DataType + List" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_List + + - label: + "Is the device a Client and supports writing an attribute of DataType + Octet String" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_OctetString + + - label: + "Is the device a Client and supports writing an attribute of DataType + Enum" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Enum + + - label: + "Is the device a Client and supports writing an attribute of DataType + Bitmap" + id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bitmap + + - label: + "Is the device a Client and supports subscribing to an attribute of + DataType Bool" + id: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool + + - label: + "Is the device a Client and supports subscribing to an attribute of + DataType String" + id: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_String + + - label: + "Is the device a Client and supports subscribing for multiple + attribute" + id: MCORE.IDM.C.SubscribeRequest.MultipleAttributes diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml index 57e02159a3319b..075cf0de51a9f1 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml @@ -24,9 +24,58 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + Notes + + 1.N1 is the node ID of TH1 + + 2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV: + + - top-level anonymous list (empty) + + 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + + 4.D_OK_FULL:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018" which is an octstr of length 128 containing valid TLV: + + - top-level anonymous list, containing - two elements with profile-specific tag in fully-qualified form + + 5.D_BAD_LENGTH:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018" which is an octstr of length 129 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + + 6 .D_BAD_STRUCT: "1518" which is an octstr of length 2 containing valid TLV: + + - top-level anonymous struct, empty + + 7.D_BAD_LIST:"3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level list with context-specific tag, containing - one element with profile-specific tag in fully-qualified form + + 8.D_BAD_ELEM:"17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with anonymous tag + + 9 .D_BAD_OVERFLOW: "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - but having extra bytes after the top level list end-of-container + + 10.D_BAD_UNDERFLOW:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700" which is an octstr of length 50-100 containing invalid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - but lacking the top-level list end-of-container + + 11.D_BAD_NONE: "" which is an octstr of length 0 + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | - verification step to be updated. + DUT + sudo ./chip-all-clusters-app + + TH1 + ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml index 6f5ddedb6cbbef..497fdbd19eff2f 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml @@ -24,6 +24,28 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + TH2 supports On/Off server on Endpoint 1. + + TH3 supports On/Off server on Endpoint 2. + + DUT supports On/Off client. + disabled: true + + - label: "Note" + verification: | + 1.Need 4 raspi for this test case and use 3 raspi as dut[all-cluster-app] and 1 raspi as chip-tool. + + 2.1st raspi which is used as DUT , which you are going to pair with onnetwork, you need to build shell command on that all clusters app.[build shell on DUT 1 Use - [scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/ out/all-clusters-app chip_inet_config_enable_ipv4=false chip_build_libshell=true ] + + 3.Pair TH2 , TH3 with ble-wifi with different discriminator as mentioned below, using the chip-tool running on 4th raspi. + + 4.using chip-tool (on the 4th raspi) write the ACL entries in both TH2 and TH3 allowing to receive commands for onoff cluster from DUT + + 5.Hit Enter on raspi , you will see shell prompt (>) , enter help, you will command for switch . At the prompt enter switch on ,the on command is sent to both TH2 and TH3. you can see that in the log. to test if the TH2/TH3 are turned on or not, you can read the on-off attribute status. Read the status before sending the switch on command and read after sending the command. you should see the value changing. + disabled: true + - label: "Factory Reset DUT" verification: | Vendor specific action, for chip-tool run @@ -53,7 +75,7 @@ tests: verification: | ./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]" 1 1 - + On TH(Chip-tool), Verify the success response for binding entries [1657797710.456056][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), @@ -81,19 +103,26 @@ tests: verification: | ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]" 2 0 + on TH (Chip-tool), Verify the on command receives success response + [1652330385.328196][3240:3245] CHIP:DMG: StatusIB = [1652330385.328229][3240:3245] CHIP:DMG: { [1652330385.328264][3240:3245] CHIP:DMG: status = 0x00 (SUCCESS), [1652330385.328298][3240:3245] CHIP:DMG: }, - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]" 3 0 + ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 2, "deviceType": null}]}]" 3 0 + + on TH(Chip-tool), Verify the on command receives success response [1650610345.847274][2626:2631] CHIP:DMG: StatusIB = [1650610345.847317][2626:2631] CHIP:DMG: { [1650610345.847383][2626:2631] CHIP:DMG: status = 0x00 (SUCCESS), [1650610345.847429][2626:2631] CHIP:DMG: }, + NOTE: + Every DUT should have their own mechanism to trigger on/off mechanism ,this for raspi platform + DUT sends on command in the shell > switch on @@ -197,11 +226,15 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 + Verify on TH (Chip-tool),the onoff value is set to ON + [1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117 [1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE ./chip-tool onoff read on-off 3 2 + Verify on TH(Chip-tool) ,the onoff value is set to ON + [1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746 [1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE disabled: true @@ -210,6 +243,8 @@ tests: verification: | ./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]" 1 1 + Verify on TH(Chip-tool) ,binding entry receives success response + [1657800844.739833][4000:4006] CHIP:EM: Removed CHIP MessageCounter:244702117 from RetransTable on exchange 12653i [1657800844.739867][4000:4006] CHIP:DMG: WriteClient moving to [ResponseRe] [1657800844.739922][4000:4006] CHIP:DMG: WriteResponseMessage = @@ -312,6 +347,7 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 + Verify on TH (Chip-tool),the onoff value is set to OFF [1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540 @@ -323,6 +359,8 @@ tests: verification: | ./chip-tool onoff read on-off 3 2 + Verify on TH(Chip-tool) ,the onoff value is set to ON + [1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390 [1657803609.731521][4333:4339] CHIP:TOO: OnOff: TRUE diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml index 370adaa9174646..a1be718287b73c 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml @@ -26,6 +26,25 @@ 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: "Pre-Conditions" + verification: | + TH2 supports On/Off server on Endpoint 1. + TH2 supports Groups server on Endpoint 1. + DUT behaves as Group Admin + TH2 should have an ACL entry with the AuthMode as Group by DUT + DUT supports On/Off client + disabled: true + + - label: "Note" + verification: | + Take 2 raspi, 1 as Lighting app and another one as chip-tool. and use [ nRF52840-DK ]Thread device as light-switch-app. + disabled: true + - label: "Factory Reset DUT" verification: | Vendor specific action, for chip-tool run @@ -34,9 +53,9 @@ tests: - label: "Commission DUT to TH1s fabric" verification: | - Run this cmmd in Thread device terminal: + Advertise the [ light-switch-app ] on [ nRF52840-DK ]Thread device and pair the TH using below cmmd. - ./chip-tool pairing ble-thread 73 hex:0e080000000000010000000300000f35060004001fffe0020810101191022022920708fd6587bfe9821353051000112237945966880899aabbccddeeff030f7070656e5468726561644465696f6c010212340410f23d85dd55d9748cc6a1fd5fccbb1da20c0402a0fff8 20202021 3840 + ./chip-tool pairing ble-thread 74 hex:0e080000000000010000000300000f35060004001fffe0020810101191022022920708fd6587bfe9821353051000112237945966880899aabbccddeeff030f7070656e5468726561644465696f6c010212340410f23d85dd55d9748cc6a1fd5fccbb1da20c0402a0fff8 20202021 3840 disabled: true - label: "TH1 enables DUT as Controller" @@ -46,7 +65,9 @@ tests: - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | - ./chip-tool pairing onnetwork 1 20202021 + Advertise the [Lighting-app] on Raspi and pair the TH using below cmmd. + + ./chip-tool pairing onnetwork 2 20202021 On TH(Chip-tool), Verify the success response @@ -68,6 +89,8 @@ tests: Endpoint 0." PICS: GRPKEY.C.C00.Tx verification: | + Run this cmmd for lighting app in chip-tool: + ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": @@ -115,6 +138,8 @@ tests: list on GroupKeyManagement cluster to TH2 on Endpoint 0" PICS: GRPKEY.C.A0000 verification: | + Run this cmmd for lighting app in chip-tool: + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 2 0 On DUT, Verify the success response for GroupKeySetID @@ -130,6 +155,8 @@ tests: Endpoint 1." PICS: G.C.C00.Tx verification: | + Run this cmmd for lighting app in chip-tool: + ./chip-tool groups add-group 0x0001 grp1 2 1 On DUT, Verify the success response for AddGroup @@ -163,7 +190,9 @@ tests: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from DUT to TH2" verification: | - ./chip-tool binding write binding "[{"group" : "0x0001"}]" 73 1 + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + + ./chip-tool binding write binding "[{"group" : "0x0001"}]" 74 1 On TH, Verify the success response for binding entry @@ -179,6 +208,8 @@ tests: entries" PICS: OO.C.C01.Tx verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + ./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 }]" 74 0 On TH(Chip-tool), Verify the success response for Acl: @@ -187,7 +218,9 @@ tests: [1659075680.944052][2687:2692] CHIP:DMG: { [1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS), - ./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 + Run this cmmd for lighting app in chip-tool: + + ./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 }]" 2 0 On TH(Chip-tool), Verify the success response for Acl: @@ -195,13 +228,15 @@ tests: [1659075680.944052][2687:2692] CHIP:DMG: { [1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS), - Press button no.2 on thread board + Press button no.2 on [ nRF52840-DK ]thread board disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff read on-off 1 1 + Run this cmmd for lighting app in chip-tool: + + ./chip-tool onoff read on-off 2 1 On TH (Chip-tool), Verify the value is set to ON @@ -211,7 +246,9 @@ tests: - label: "TH1 removes all the binding entries from DUT" verification: | - ./chip-tool binding write binding "[]" 73 1 + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + + ./chip-tool binding write binding "[]" 74 1 On TH(Chip-tool), Verify the success response for removing binding entry @@ -226,13 +263,15 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - Press button no.2 on thread board + Press button no.2 on [ nRF52840-DK ] thread board disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff read on-off 1 1 + Run this cmmd for lighting app in chip-tool: + + ./chip-tool onoff read on-off 2 1 On TH(Chip-tool), Verify the value is set to ON 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 5422042e31e77c..ead8ff52038077 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 @@ -26,6 +26,25 @@ 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: "Pre-Conditions" + verification: | + TH1 enables DUT to handle group communication + TH2 supports On/Off server on Endpoint 1 + TH2 supports Groups server on Endpoint 1 + TH2 should have an ACL entry with the AuthMode as Group by TH1 + DUT supports On/Off client + disabled: true + + - label: "Note" + verification: | + Take 2 raspi, 1 as Lighting app and another one as chip-tool. and use [ nRF52840-DK ]Thread device as light-switch-app. + disabled: true + - label: "Factory Reset DUT" verification: | Vendor specific action, for chip-tool run @@ -34,7 +53,7 @@ tests: - label: "Commission DUT to TH1s fabric" verification: | - Run this cmmd in Thread device terminal: + Advertise the [ light-switch-app ] on [ nRF52840-DK ]Thread device and pair the TH using below cmmd. ./chip-tool pairing ble-thread 74 hex:0e080000000000010000000300000f35060004001fffe0020810101191022022920708fd6587bfe9821353051000112237945966880899aabbccddeeff030f7070656e5468726561644465696f6c010212340410f23d85dd55d9748cc6a1fd5fccbb1da20c0402a0fff8 20202021 3840 disabled: true @@ -46,7 +65,9 @@ tests: - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | - ./chip-tool pairing onnetwork 1 20202021 + Advertise the [Lighting-app] on Raspi and pair the TH using below cmmd. + + ./chip-tool pairing onnetwork 2 20202021 On TH(Chip-tool), Verify the success response @@ -67,6 +88,9 @@ tests: "TH1 sends KeySetWrite command to GroupKeyManagement cluster to TH2 on Endpoint 0." verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + + ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": @@ -105,13 +129,13 @@ tests: [1657719041.075988][4541:4546] CHIP:DMG: [1657719041.076012][4541:4546] CHIP:DMG: InteractionModelRevision = 1 - + Run this cmmd 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 }" 1 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 2 0 [1657719041.076036][4541:4546] CHIP:DMG: } On TH, Verify the success response for KeySetWrite @@ -123,6 +147,8 @@ tests: "TH1 binds GroupId with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster to TH2 on Endpoint 0" verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 74 0 On TH(Chip-tool), Verify the success response for GroupKeySetID @@ -133,8 +159,8 @@ tests: [1657719130.464298][4557:4562] CHIP:DMG: }, [1657719130.464342][4557:4562] CHIP:DMG: - - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 1 0 + Run this cmmd for lighting app in chip-tool: + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 2 0 On TH(Chip-tool), Verify the success response for GroupKeySetID @@ -150,6 +176,8 @@ tests: "TH1 sends AddGroup( Group Name and Group-ID) Command to TH2 on Endpoint 1." verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + ./chip-tool groups add-group 0x0001 grp1 74 1 On TH(Chip-tool), Verify the success response for AddGroup @@ -161,8 +189,9 @@ tests: [1657719097.788418][4548:4554] CHIP:TOO: } + Run this cmmd for lighting app in chip-tool: - ./chip-tool groups add-group 0x0001 grp1 1 1 + ./chip-tool groups add-group 0x0001 grp1 2 1 On TH(Chip-tool), Verify the success response for AddGroup @@ -195,6 +224,8 @@ tests: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from TH1 to TH2" verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + ./chip-tool binding write binding "[{"group" : "0x0001"}]" 74 1 On TH(Chip-tool), Verify the success response for binding entry @@ -215,7 +246,9 @@ tests: entries" PICS: OO.C.C01.Tx 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 }]" 74 0 + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + + ./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 }]" 74 0 On TH(Chip-tool), Verify the success response for Acl: @@ -223,7 +256,9 @@ tests: [1659075680.944052][2687:2692] CHIP:DMG: { [1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS), - ./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 + Run this cmmd for lighting app in chip-tool: + + ./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 }]" 2 0 On TH(Chip-tool), Verify the success response for Acl: @@ -231,13 +266,15 @@ tests: [1659075680.944052][2687:2692] CHIP:DMG: { [1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS), - Press button no.2 on thread board + Press button no.2 on nrf52840 DK thread board disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff read on-off 1 1 + Run this cmmd for lighting app in chip-tool: + + ./chip-tool onoff read on-off 2 1 On TH(Chip-tool), Verify the onoff value is set to ON @@ -247,6 +284,8 @@ tests: - label: "TH1 removes all the binding entries from DUT" verification: | + Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: + ./chip-tool binding write binding "[]" 74 1 On TH(Chip-tool), Verify the success response for removing binding entry @@ -262,13 +301,15 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - Press button no.2 on thread board + Press button no.2 on nrf52840 DK thread board disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff read on-off 1 1 + Run this cmmd for lighting app in chip-tool: + + ./chip-tool onoff read on-off 2 1 On TH(Chip-tool), Verify the onoff value is set to ON diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index 0ad5188ed749a4..e41fe1c356098f 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT and TH can interact with each other. DUT is commissioned. + + 2. BINFO.S.A0009(SoftwareVersion) - TH reads SoftwareVersion attribute from DUT and saves for future use + + 3. BINFO.S.A0011(Reachable) - TH reads Reachable attribute from DUT and saves for future use(should be true) + + 4. BINFO.S.E00(StartUp) && BINFO.S.E01(ShutDown) && BINFO.S.E02(Leave) - TH subscribes to StartUp, ShutDown, Leave and ReachableChanged events on the Basic Information cluster of the DUT + + 5. TH saves the FabricIndex during commissioning + disabled: true + - label: "Reboot the DUT TH reads the StartUp event from DUT" PICS: BINFO.S.E00 verification: | @@ -63,7 +76,7 @@ tests: 2. run below command in interactive mode shell and Turn down the DUT - verify that ShutDown event as priority set has CRITICAL on TH(chip-tool) + verify that ShutDown event as priority set has CRITICAL on TH(Chip-tool) CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0001 [1653050528.900202][119367:119372] CHIP:TOO: Event number: 5 diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index a9958cd5eed5cb..72b45884c4f604 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -24,9 +24,14 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + 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: "Commission DUT to TH" verification: | - verification step to be updated. + disabled: true - label: "Bring the DUT into a state so StateValue is FALSE" 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 3e19e783a71e9b..f4eebc4d1089df 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 @@ -23,9 +23,24 @@ config: endpoint: 0 tests: + - label: "" + verification: | + Validate these PICS items of attributes which are not allowed in this server cluster implementation - these PICS items should all be FALSE, if any of them is TRUE then FAIL the test + + BRBINFO.S.A0000(DataModelRevision) + + BRBINFO.S.A0004(ProductID) + + BRBINFO.S.A0006(Location) + + BRBINFO.S.A0010(LocalConfigDisabled) + + BRBINFO.S.A0013(CapabilityMinima) + disabled: true + - label: "Commission DUT to TH (if not already done)" verification: | - verification step to be updated. + disabled: true - label: "TH reads the ClusterRevision from DUT" diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml index 8ec428966a1037..9f1e1b56fea93e 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml @@ -26,8 +26,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read vendor-name 1 3 - Verify VendorName is of type string and is less than or equal to 32 bytes on TH(chip-tool) Log: + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495199.434300][2158:2163] CHIP:TOO: VendorName: TEST_VENDOR disabled: true @@ -46,8 +47,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read vendor-name 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495199.434300][2158:2163] CHIP:TOO: VendorName: TEST_VENDOR disabled: true @@ -56,8 +58,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read vendor-id 1 3 - Veify VendorID value is in range of 0x0001 to 0xFFF0 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495322.252171][2177:2182] CHIP:TOO: VendorID: 65521 disabled: true @@ -76,8 +79,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read vendor-id 1 3 - Verify VendorID is not chnged when compared to step 8 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495322.252171][2177:2182] CHIP:TOO: VendorID: 65521 disabled: true @@ -86,8 +90,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-name 1 3 - Verify ProductName has human readable string and is less or equal to 32 bytes on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495708.412745][2200:2205] CHIP:TOO: ProductName: TEST_PRODUCT disabled: true @@ -107,8 +112,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-name 1 3 - Verify ProductName is not chnged when compared to step 11 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495708.412745][2200:2205] CHIP:TOO: ProductName: TEST_PRODUCT disabled: true @@ -117,8 +123,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read node-label 1 3 - Verify the value of node-label is type of string and contains length between 0 and 32 in TH(chip-tool) Log: + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1657696463.081741][15476:15481] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 2577979325 [1657696463.081791][15476:15481] CHIP:TOO: NodeLabel: Light 1 disabled: true @@ -159,8 +166,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read hardware-version 1 3 - Verify HardwareVersion is in range of 0 to 65534 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496175.564718][2302:2307] CHIP:TOO: HardwareVersion: 0 disabled: true @@ -179,8 +187,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read hardware-version 1 3 - Verify HardwareVersion is not chnged when compared to step 21 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496175.564718][2302:2307] CHIP:TOO: HardwareVersion: 0 disabled: true @@ -189,8 +198,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read hardware-version-string 1 3 - Verify HardwareVersionString value is type of string and in range of 1 to 64 bytes + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496257.298675][2315:2320] CHIP:TOO: HardwareVersionString: TEST_VERSION disabled: true @@ -209,8 +219,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read hardware-version-string 1 3 - Verify HardwareVersionString is not chnged when compared to step 24 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496257.298675][2315:2320] CHIP:TOO: HardwareVersionString: TEST_VERSION disabled: true @@ -219,8 +230,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read software-version 1 3 - Verify SoftwareVersion value is in range of 0 to 4294967294 on TH(chip-tol) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496411.609866][2348:2353] CHIP:TOO: SoftwareVersion: 1 disabled: true @@ -239,8 +251,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read software-version 1 3 - Verify SoftwareVersion is not chnged when compared to step 27 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496411.609866][2348:2353] CHIP:TOO: SoftwareVersion: 1 disabled: true @@ -249,8 +262,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read software-version-string 1 3 - Verify the SoftwareVersionString is of type string and has length of 1 to 64 bytes + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496498.568951][2362:2367] CHIP:TOO: SoftwareVersionString: 1.0 disabled: true @@ -270,8 +284,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read software-version-string 1 3 - Verify SoftwareVersionString is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496498.568951][2362:2367] CHIP:TOO: SoftwareVersionString: 1.0 disabled: true @@ -280,8 +295,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read manufacturing-date 1 3 - Verify manufacturing date is of type string and has length of range 8 to 16 bytes on TH() + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496661.777852][2388:2393] CHIP:TOO: ManufacturingDate: 20200101 disabled: true @@ -300,8 +316,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read manufacturing-date 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496661.777852][2388:2393] CHIP:TOO: ManufacturingDate: 20200101 disabled: true @@ -310,6 +327,10 @@ tests: verification: | ./chip-tool bridgeddevicebasic read part-number 1 3 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496800.941788][2405:2410] CHIP:TOO: PartNumber: 1234 disabled: true @@ -328,8 +349,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read part-number 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656496800.941788][2405:2410] CHIP:TOO: PartNumber: 1234 disabled: true @@ -338,6 +360,10 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-url 1 3 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656497181.118653][2436:2441] CHIP:TOO: ProductURL: https://example.com/myproduct disabled: true @@ -356,8 +382,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-url 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656497181.118653][2436:2441] CHIP:TOO: ProductURL: https://example.com/myproduct disabled: true @@ -366,6 +393,10 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-label 1 3 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501313.811305][2602:2607] CHIP:TOO: ProductLabel: ABCD disabled: true @@ -374,8 +405,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic write product-label newproductlabel 1 3 - Verify response has unsupported write on TH(chip-tool) Log: + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) disabled: true @@ -384,8 +416,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read product-label 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656501313.811305][2602:2607] CHIP:TOO: ProductLabel: ABCD disabled: true @@ -394,6 +427,10 @@ tests: verification: | ./chip-tool bridgeddevicebasic read serial-number 1 3 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501452.183890][2624:2630] CHIP:TOO: SerialNumber: 5678 disabled: true @@ -412,8 +449,9 @@ tests: verification: | ./chip-tool bridgeddevicebasic read serial-number 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656501452.183890][2624:2630] CHIP:TOO: SerialNumber: 5678 disabled: true @@ -436,7 +474,7 @@ tests: verification: | ./chip-tool bridgeddevicebasic write-by-id 0x0005 ‘“false”’ 1 0 - Verify response has unsupported write on TH(chip-tool) Log: + On TH verify that, TH receives UNSUPPORTED_WRITE response as status [1656496372.884955][2340:2345] CHIP:DMG: } @@ -461,6 +499,10 @@ tests: verification: | ./chip-tool bridgeddevicebasic read unique-id 1 3 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501734.253827][2673:2679] CHIP:TOO: UniqueID: 30789FE4FCF832C9 disabled: true @@ -479,7 +521,8 @@ tests: verification: | ./chip-tool bridgeddevicebasic read unique-id 1 3 - Verify VendorName is not chnged when compared to step 1 on TH(chip-tool) Log + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + Example Log: [1656501734.253827][2673:2679] CHIP:TOO: UniqueID: 30789FE4FCF832C9 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index b2b7678d366c50..571518d23f43b7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -51,9 +51,11 @@ tests: verification: | On 1st controller using chip tool, open commissioning window using ECM + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - On TH1(chip-tool) Log + Verify Manual pairing code On TH1(all-clusters-app) Log CHIP:IN: Sending encrypted msg 0xaaaad3464d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5805157 msec [1635691999.946536][3822:3827] CHIP:DMG: ICR moving to [CommandSen] @@ -81,8 +83,11 @@ tests: verification: | On 1st controller using chip tool read fabricList + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + Verify 1 entry in the Fabrics list attributeOn TH1(all-clusters-app) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 [1649245801.244173][10091:10096] CHIP:TOO: Fabrics: 1 entries @@ -102,11 +107,12 @@ tests: verification: | On 2nd controller, using chip-tool connect using manual code. - On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + Below is the example when using chip tool as controller (considering 35998938564 as the manual code generated by 1st controller) ./chip-tool pairing code 2 35998938564 --commissioner-name beta - Verify whether you got below message in the log of TH + Verify whether you got below message in the log of TH2 (all-clusters-app) Device commissioning completed with success disabled: true @@ -115,6 +121,8 @@ tests: verification: | On the raspi , Verify if the DUT is broadcasting using + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ubuntu@ubuntu:~/may10_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + eth0 IPv6 E0AF53B23E580769-0000000000000002 _matter._tcp local + eth0 IPv6 7FF84D214A19B581-0000000000000001 _matter._tcp local @@ -137,10 +145,12 @@ tests: verification: | On 2nd controller using chip tool write and read node-label - On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server - Below is the example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + Verify success response On TH2(all-clusters-app) Log + CHIP:DMG: WriteClient moving to [ResponseRe] [1649671460.431199][20958:20963] CHIP:DMG: WriteResponseMessage = [1649671460.431217][20958:20963] CHIP:DMG: { @@ -171,39 +181,16 @@ tests: - Verify read attribute returns the updated value written + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + - On Raspi platform use commissioner-name parameter to commission different TH as server with DUT as commissioner, Pls use equivalent command on the respective TH as server ./chip-tool basic read node-label 2 0 --commissioner-name beta - CHIP:DMG: ReportDataMessage = - [1649671466.310233][20969:20974] CHIP:DMG: { - [1649671466.310241][20969:20974] CHIP:DMG: AttributeReportIBs = - [1649671466.310256][20969:20974] CHIP:DMG: [ - [1649671466.310265][20969:20974] CHIP:DMG: AttributeReportIB = - [1649671466.310281][20969:20974] CHIP:DMG: { - [1649671466.310292][20969:20974] CHIP:DMG: AttributeDataIB = - [1649671466.310304][20969:20974] CHIP:DMG: { - [1649671466.310317][20969:20974] CHIP:DMG: DataVersion = 0xd581a5e8, - [1649671466.310328][20969:20974] CHIP:DMG: AttributePathIB = - [1649671466.310342][20969:20974] CHIP:DMG: { - [1649671466.310355][20969:20974] CHIP:DMG: Endpoint = 0x0, - [1649671466.310367][20969:20974] CHIP:DMG: Cluster = 0x28, - [1649671466.310380][20969:20974] CHIP:DMG: Attribute = 0x0000_0005, - [1649671466.310391][20969:20974] CHIP:DMG: } - [1649671466.310405][20969:20974] CHIP:DMG: - [1649671466.310420][20969:20974] CHIP:DMG: Data = "te8", - [1649671466.310432][20969:20974] CHIP:DMG: }, - [1649671466.310446][20969:20974] CHIP:DMG: - [1649671466.310457][20969:20974] CHIP:DMG: }, - [1649671466.310471][20969:20974] CHIP:DMG: - [1649671466.310481][20969:20974] CHIP:DMG: ], - [1649671466.310497][20969:20974] CHIP:DMG: - [1649671466.310508][20969:20974] CHIP:DMG: SuppressResponse = true, - [1649671466.310518][20969:20974] CHIP:DMG: InteractionModelRevision = 1 - [1649671466.310528][20969:20974] CHIP:DMG: } + Verify read attribute returns the updated value written On TH2(all-clusters-app) Log + + [1649671466.310629][20969:20974] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3582043624 - [1649671466.310646][20969:20974] CHIP:TOO: NodeLabel: te8 + [1649671466.310646][20969:20974] CHIP:TOO: NodeLabel: te5new [1649671466.310704][20969:20974] CHIP:EM: Sending Standalone Ack for MessageCounter:15357338 on exchange 20724i disabled: true @@ -212,12 +199,12 @@ tests: verification: | On 2nd controller using chip tool read fabricList + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. - Below is the example using chip tool as controller ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - + Verify 2 entries in the Fabrics list attribute On TH2(all-clusters-app) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries @@ -246,8 +233,14 @@ tests: verification: | On first controller using chip tool, write attribute and read attribute + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool basic write node-label te8 1 0 + Verify success response On TH1(all-clusters-app) Log + + CHIP:DMG: WriteResponse = CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { @@ -276,9 +269,12 @@ tests: [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - Verify read attribute returns the updated value written + ./chip-tool basic read node-label 1 0 + Verify read attribute returns the updated value written On TH1(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te8 [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -291,10 +287,14 @@ tests: verification: | On 2nd controller using chip-tool read, write attribute and then read attribute to and from TH_CE - Below is an example of using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + On TH2(all-clusters-app) Log + + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -325,6 +325,9 @@ tests: ./chip-tool basic read node-label 2 0 --commissioner-name beta + Verify read attribute returns the updated value written On TH1(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -343,9 +346,13 @@ tests: verification: | On 2nd controller open commissioning window using ECM - Below is an example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool pairing open-commissionig-window 2 1 300 1000 3841 --commissioner-name beta + Verify Manual pairing code On TH2(all-clusters-app) Log + CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] @@ -363,10 +370,13 @@ tests: verification: | On 2nd controller, run revoke command - Below is an example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + Verify success response On TH2(all-clusters-app) Log + + CHIP: [DMG] InvokeResponseMessage = [1648115245106] [6681:3894448] CHIP: [DMG] { @@ -407,9 +417,11 @@ tests: verification: | On 3rd controller using chip-tool connect using manual code generated from 1st controller. This attempt should fail, i.e + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing code 3 34995354639 --commissioner-name gamma - verify you got the following message in the TH log + verify you got the following message in the TH 3(all-clusters-app) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -423,10 +435,13 @@ tests: verification: | On 2nd controller , write attribute and read attribute to and from TH_CE - Below is the example using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + Verify success response On TH1(all-clusters-app) Log + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -453,10 +468,12 @@ tests: [1649245940.790033][10110:10115] CHIP:DMG: } [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - Verify read attribute returns the updated value written + ./chip-tool basic read node-label 2 0 --commissioner-name beta + Verify read attribute returns the updated value written On TH1(all-clusters-app) Log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new @@ -470,9 +487,14 @@ tests: verification: | On 2nd controller open commissioning window using ECM - Below is an example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool pairing open-commissioning-window 2 1 180 1000 3840 --commissioner-name beta + Verify Manual pairing code On TH2(all-clusters-app) Log + + CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] @@ -496,9 +518,14 @@ tests: verification: | On 2nd controller open commissioning window using ECM - Below is an example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool pairing open-commissionig-window 2 1 300 1000 3840 --commissioner-name beta + Verify Manual pairing code On TH2(all-clusters-app) Log + + CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] @@ -516,9 +543,14 @@ tests: verification: | On 1st controller, using chip-tool connect using manual code. - Below is the example when using chip tool as controller (considering 34995354639 as the manual code generated by DUT) + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + (considering 34995354639 as the manual code generated by DUT) ./chip-tool pairing code 2 34995354639 + Trying to add a NOC for a fabric that already exists On TH1(all-clusters-app) Log + + [1651786200275] [36301:315544] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists @@ -526,3 +558,13 @@ tests: Verify that the commissioning process fails as TH_CE was already commissioned by TH_CR1 in step 1 disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index 54083688e066b7..e13c93fc9faf4a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -84,7 +84,7 @@ tests: verification: | On 3rd controller using chip tool connect using manual code - ./chip-tool pairing code 3 35484132896 + ./chip-tool pairing code 3 35484132896 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -115,7 +115,7 @@ tests: On 2nd controller using chip tool connect using manual code - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing code 1 35484132896 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -292,7 +292,7 @@ tests: verification: | On the 3rd controller using chip tool, open commissioning window using BCM before the timer expiry of the above step - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 --commissioner-name gamma CHIP:DMG: InvokeResponseMessage = [1650527565.990404][24618:24623] CHIP:DMG: { @@ -422,7 +422,7 @@ tests: verification: | On 2nd controller using chip tool, open commissioning window using BCM before timer expiry from above step - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta CHIP:DMG: InvokeResponseMessage = [1650527622.373450][15824:15829] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index c08854525cad67..c736e2199f821e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -71,7 +71,7 @@ tests: On 3rd controller using chip tool connect using manual code - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing code 1 35484132896 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -103,7 +103,7 @@ tests: On 2nd controller using chip tool connect using manual code - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing code 2 35484132896 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -321,7 +321,7 @@ tests: verification: | On third controller open commissioning window verify status code 1 - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 --commissioner-name gamma [1658838344.191922][9291:9296] CHIP:DMG: InvokeResponseMessage = [1658838344.191947][9291:9296] CHIP:DMG: { @@ -416,7 +416,7 @@ tests: verification: | On the 2nd controller using chip tool, open commissioning window using BCM before the timer expiry from above step - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index 7622ff87597173..532bdb8ff32e11 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -90,7 +90,7 @@ tests: On 3rd controller, using chip tool connect to the accessory - ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing onnetwork 1 20202021 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -141,7 +141,7 @@ tests: On 2nd controller, using chip tool connect to the accessory - ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing onnetwork 1 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -264,7 +264,7 @@ tests: verification: | On 3rd controller chip tool, open commissioning window using ECM - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + ./chip-tool pairing open-commissioning-window 3 1 180 1000 3840 --commissioner-name gamma [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! @@ -318,7 +318,7 @@ tests: On 2nd controller using chip tool connect to the accessory using ECM - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta disabled: true - label: 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 e8b060d2034eb3..f35cffd5ed79ca 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 @@ -66,7 +66,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing code 2 36217551633 + ./chip-tool pairing code 2 36217551633 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -101,7 +101,7 @@ tests: - ./chip-tool pairing code 3 36217551633 + ./chip-tool pairing code 3 36217551633 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -112,7 +112,7 @@ tests: verification: | On 2nd controller using chip tool, read fabrics list - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 CHIP:TOO: Fabrics: 3 entries @@ -148,7 +148,7 @@ tests: verification: | on 2nd controller using chip tool, remove fabric with FabricIndex=2 - ./chip-tool operationalcredentials remove-fabric 2 2 0 + ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -167,13 +167,13 @@ tests: Using your 2nd controller, write attribute and read attribute Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 @@ -258,7 +258,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing code 2 36217551633 + ./chip-tool pairing code 2 36217551633 --commissioner-name beta Verify you got below message Device commissioning completed with success diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 8d80ea0b08a370..28492fc2debf5d 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -86,7 +86,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -140,7 +140,7 @@ tests: - ./chip-tool pairing onnetwork 3 20202021 + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -151,7 +151,7 @@ tests: verification: | On 2nd controller using chip tool, read fabrics list - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 CHIP:TOO: Fabrics: 3 entries @@ -187,7 +187,7 @@ tests: verification: | on 2nd controller using chip tool, remove fabric with FabricIndex=2 - ./chip-tool operationalcredentials remove-fabric 2 2 0 + ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -206,13 +206,13 @@ tests: Using your 2nd controller, write attribute and read attribute Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 @@ -319,7 +319,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success 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 6ca89bc6035b65..a6d2ae56fa9342 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 @@ -89,7 +89,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing code 1 35484132896 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -140,7 +140,7 @@ tests: On 3rd controller using chip tool connect to the accessory - ./chip-tool pairing code 1 35484132896 + ./chip-tool pairing code 1 35484132896 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -151,7 +151,7 @@ tests: verification: | On 2nd controller using chip tool, read fabrics list - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 CHIP:TOO: Fabrics: 3 entries @@ -187,7 +187,7 @@ tests: verification: | on 2nd controller using chip tool, remove fabric with FabricIndex=2 - ./chip-tool operationalcredentials remove-fabric 2 1 0 + ./chip-tool operationalcredentials remove-fabric 2 1 0 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -206,13 +206,13 @@ tests: Using your 2nd controller, write attribute and read attribute to and from TH_CE Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 @@ -300,7 +300,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing code 1 36217551633 + ./chip-tool pairing code 1 36217551633 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -314,7 +314,7 @@ tests: Below is the command using chip tool controller - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries 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 cbc714bc930b67..dce6d020f8c141 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 @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 4.1.18. [TC-CADMIN-1.18] Removing Fabrics from DUT and Fabric index - enumeration using BCM [DUT - Commissioner] + 30.1.18. [TC-CADMIN-1.18] Removing Fabrics from DUT and Fabric index + enumeration using BCM [DUT - Commissioner] PICS: - CADMIN.C @@ -52,7 +52,7 @@ tests: On your first controller chip tool, open commissioning window using BCM Below is the example when using chip tool as controller - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 CHIP: [DMG] InvokeResponseMessage = @@ -93,7 +93,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -148,7 +148,7 @@ tests: On 3rd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma Verify you got below message Device commissioning completed with success @@ -194,12 +194,12 @@ tests: " disabled: true - - label: "DUT_CR1 sends RemoveFabric with FabricIndex = 2 command to TH_CE" + - label: "DUT_CR1 sends RemoveFabric with FabricIndex = 2command to TH_CE" PICS: OPCREDS.C.C0a.Tx verification: | on 2nd controller using chip tool, remove fabric with FabricIndex=2 - ./chip-tool operationalcredentials remove-fabric 2 1 0 + ./chip-tool operationalcredentials remove-fabric 2 1 0 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -218,13 +218,13 @@ tests: Using your 2nd controller, write attribute and read attribute to and from TH_CE Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - ./chip-tool basic read node-label 2 0 + ./chip-tool basic read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 @@ -261,9 +261,7 @@ tests: [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i disabled: true - - label: - "Verify TH_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + - label: "" verification: | 1. Verify if the DUT is broadcasting using grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp @@ -333,7 +331,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta Verify you got below message Device commissioning completed with success @@ -346,7 +344,7 @@ tests: Below is the command using chip tool controller - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml index 269f9e66c9f9b2..a59932b593d21c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml @@ -90,7 +90,7 @@ tests: On nth controller using chip tool connect to the accessory - ./chip-tool pairing code 6 36217551633 + ./chip-tool pairing code 6 36217551633 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index 844c50fc29f807..2449a35f43ea41 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -50,8 +50,11 @@ tests: verification: | On first controller, usinadministratorcommissioningg chip tool open commissioning window. + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + On TH1(all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = @@ -92,8 +95,12 @@ tests: verification: | On first controller, using chip tool read fabricList + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + On TH1(all-clusters-app) Log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 [1649245801.244173][10091:10096] CHIP:TOO: Fabrics: 1 entries @@ -113,10 +120,12 @@ tests: verification: | On second Controller connect to the accessory. - Below is the example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message On TH2(all-clusters-app) Log Device commissioning completed with success disabled: true @@ -124,6 +133,10 @@ tests: verification: | On the raspi , Verify if the DUT is broadcasting using + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + + ubuntu@ubuntu:~/may10_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + eth0 IPv6 E0AF53B23E580769-0000000000000002 _matter._tcp local + eth0 IPv6 7FF84D214A19B581-0000000000000001 _matter._tcp local @@ -146,9 +159,14 @@ tests: verification: | On the 2nd controller write attribute and read attribute to and from TH_CE - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + On TH2(all-clusters-app) Log + + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -177,7 +195,12 @@ tests: Verify read attribute returns the updated value written + ./chip-tool basic read node-label 1 0 --commissioner-name beta + + On TH2(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -189,9 +212,14 @@ tests: verification: | On second controller controller read fabricList - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta + On TH2(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3229397217 [1650277071.834099][40790:40795] CHIP:TOO: Fabrics: 2 entries [1650277071.834120][40790:40795] CHIP:TOO: [1]: { @@ -220,8 +248,14 @@ tests: verification: | On first controller, using chip-tool write attribute, Verify read attribute returns the updated value written. + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool basic write node-label te8 1 0 + On TH1(all-clusters-app) Log + + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -249,7 +283,12 @@ tests: [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] Verify read attribute returns the updated value written + ./chip-tool basic read node-label 1 0 + + On TH1(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te8 [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -262,11 +301,14 @@ tests: verification: | On second controller read, write attribute and then read attribute to and from TH_CE + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. - Below is the example while using chip tool on second controller, ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + On TH2(all-clusters-app) Log + + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -296,6 +338,10 @@ tests: Verify read attribute returns the updated value written ./chip-tool basic read node-label 2 0 --commissioner-name beta + + On TH2(all-clusters-app) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -314,9 +360,13 @@ tests: verification: | On second controller using chip-tool open commissioning widow using BCM. - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + On TH2(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -358,9 +408,13 @@ tests: verification: | On second controller using chip-tool run revoke command - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + On TH2(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -401,9 +455,13 @@ tests: PICS: CADMIN.C verification: | 1. On third controller, using chip-tool connect to the accessory. Connect attempt should fail, i.e + + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - verify you got the following message in the TH log + verify you got the following message in the TH3 (all-clusters-app) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -417,9 +475,14 @@ tests: verification: | On second controller, write attribute and read attribute to and from TH_CE - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + On TH2(all-clusters-app) Log + + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -447,6 +510,9 @@ tests: [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] Verify read attribute returns the updated value written + + On TH2(all-clusters-app) Log + ./chip-tool basic read node-label 2 0 --commissioner-name beta CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new @@ -460,9 +526,13 @@ tests: verification: | On second controller using chip-tool open commissioning widow using BCM. - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool administratorcommissioning open-basic-commissioning-window 180 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + On TH2(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -510,9 +580,12 @@ tests: verification: | On second controller using chip-tool open commissioning widow using BCM. - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + On TH2(all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -554,9 +627,13 @@ tests: verification: | Using your 1st Controller connect to the accessory. - Below is the example when using chip tool as controller + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing onnetwork 1 20202021 + On TH1(all-clusters-app) Log + + [1651786200275] [36301:315544] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index 50e30a8e4ef88f..0c279f676577c5 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -111,7 +111,7 @@ tests: On nth controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 6 20202021 + ./chip-tool pairing onnetwork 6 20202021 --commissioner-name beta CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index 4119e0fbebea8b..e7bf90a0f87fa8 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -32,7 +32,7 @@ tests: Reset Devices to factory defaults disabled: true - - label: "TH_CR1 starts a commissioning process with DUT_CE using BCM" + - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S.C01.Rsp verification: | "1. Provision the device using 1st controller chip tool(use above instructions) , @@ -40,8 +40,8 @@ tests: disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE with a value of 900 - seconds" + "TH_CR1 opens a commissioning window on DUT_CE using BCM with a value + of 900 seconds" PICS: CADMIN.S.C01.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -85,7 +85,7 @@ tests: [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - - label: "Wait for commissioning Window to 901 seconds" + - label: "Wait 901 seconds for commissioning Window to be closed" verification: | Wait for commissioning Window to Timeout disabled: true @@ -102,8 +102,8 @@ tests: disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE with a value of 901 - seconds" + "TH_CR1 opens a commissioning window on DUT_CE using BCM with a value + of 901 seconds" PICS: CADMIN.S.C01.Rsp verification: | On 1st controller chip tool, open commissioning window diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index 261b804cfc05e6..7b650575ae706f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -31,7 +31,7 @@ tests: Reset Devices to factory defaults disabled: true - - label: "TH_CR1 starts a commissioning process with DUT_CE using ECM" + - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S.C00.Rsp verification: | "1. Provision the device using 1st controller chip tool(use above instructions) , @@ -39,8 +39,8 @@ tests: disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE with a value of 900 - seconds" + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 900 seconds" PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window @@ -64,35 +64,15 @@ tests: [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i disabled: true - - label: "Wait for commissioning Window to 901 seconds" + - label: "Wait 901 seconds for commissioning Window to be closed" verification: | - On 1st controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - - For ECM, - ./chip-tool pairing open-commissioning-window 1 1 900 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + Wait for commissioning Window to Timeout disabled: true - label: "TH_CR1 reads the window status to verify the DUT_CE window is closed" PICS: CADMIN.S.A0000 verification: | - On 1st controller read window status - ./chip-tool administratorcommissioning read window-status 1 0 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 @@ -101,17 +81,14 @@ tests: disabled: true - label: - "TH_CR1 opens a commissioning window on DUT_CE with a value of 901 - seconds" + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 901 seconds" PICS: CADMIN.S.C00.Rsp verification: | On 1st controller chip tool, open commissioning window - Below is the example when using chip tool as controller - - - For ECM, - ./chip-tool pairing open-commissioning-window 1 1 901 1000 3840 + For BCM, + ./chip-tool administratorcommissioning open-basic-commissioning-window 901 2 0 --timedInteractionTimeoutMs 1000 CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x85 [1652860801.225084][9512:9517] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) @@ -123,7 +100,7 @@ tests: "TH_CR1 reads the window status to verify the DUT_CE window is closed" PICS: CADMIN.S.A0000 verification: | - On first controller, read window status + On 1st controller read window status ./chip-tool administratorcommissioning read window-status 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index c8371b511790e7..c71b2bbee02a5d 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -326,3 +326,18 @@ tests: CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index eea76fb7b1cb0f..963add49c1e061 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -50,10 +50,12 @@ tests: verification: | On your 1st controller open commissioning widow using BCM. - Below is the example while using chip tool as controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH1(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, @@ -116,9 +118,12 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - verify you got the following message in the TH log + verify you got the following message in the TH2 (all-clusters-app) log + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout @@ -132,10 +137,11 @@ tests: verification: | On your first controller open commissioning widow using BCM. - Below is the example while using chip tool as controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH1(all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -175,9 +181,12 @@ tests: verification: | On your DUT controller revoke commissioning - Below is the example while using chip tool as controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + /chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH1(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, @@ -216,9 +225,12 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - verify you got the following message in the TH log + verify you got the following message in the TH2(all-clusters-app) log + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout @@ -229,10 +241,12 @@ tests: verification: | On your 1st controller revoke commissioning - Below is the example while using chip tool as controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. /chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH1(all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650524034.111241][15422:15427] CHIP:DMG: { [1650524034.111316][15422:15427] CHIP:DMG: suppressResponse = false, @@ -274,9 +288,12 @@ tests: verification: | Using 1st controller, write attribute and read attribute to and from TH_CE - Below is the example while using chip tool on second controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool basic write node-label te5new 2 0 + Verify success response On TH1(all-clusters-app) Log + CHIP:DMG: WriteResponseMessage = [1649245940.788522][10110:10115] CHIP:DMG: { [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = @@ -303,8 +320,11 @@ tests: [1649245940.790033][10110:10115] CHIP:DMG: } [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - Verify read attribute returns the updated value written + ./chip-tool basic read node-label 2 0 + + Verify read attribute returns the updated value written On TH1(all-clusters-app) Log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i @@ -318,11 +338,11 @@ tests: verification: | On 1st controller open commissioning widow using BCM. - Below is the example while using chip tool as controller, + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - + Verify success response On TH1(all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -362,9 +382,11 @@ tests: verification: | On the 2nd controller using chip-tool , connect to the accessory + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message on TH2(all-clusters-app) log Device commissioning completed with success disabled: true @@ -373,9 +395,11 @@ tests: verification: | On the 3rd controller using chip-tool , connect to the accessory + Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - verify you got the following message in the TH log + verify you got the following message in the TH3(all-clusters-app) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml index 2a051a0531c254..3598f9811bc510 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml @@ -100,8 +100,9 @@ tests: Once build completes 3. cd out/debug 4. ./chip-cert gen-cert --type r --subject-chip-id CACACACA00000001 --valid-from "2020-10-15 14:23:43" --lifetime 7305 --out-key Chip-Root-Key.txt --out Chip-Root-Cert.txt --out-format chip-hex - 5. cat Chip-Root-Key.txt + 5. cat Chip-Root-Cert.txt + While adding new add-trusted-root-certificate please use the above generated new root key ./chip-tool operationalcredentials add-trusted-root-certificate hex:1530010828c376ebc17f21512402013703271401000000cacacaca182604ef171b2726056eb5b94c3706271401000000cacacaca182407012408013009410452c19fd9d329a738fd65722a8309fa68bcaa9ffe87d8114b802c922e5066d0b2f0573b89b38bf98fc9c424ab8ffdabcb18d42e623d82a02d0ca0c062ccadb4bc370a350129011824026030041457934de5405e9a40eacb86ee647e583141ae78f430051457934de5405e9a40eacb86ee647e583141ae78f418300b40a0b0d57bddbc7bcf44480a8b7bd0231d54ccacd68d90efb67b7aa3206adbd268725092992a0388c8e934504178613c5b932d422eed7463f38fd82aaa429b574a18 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml index 056047d867594d..914a15ac8d93f5 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml @@ -28,7 +28,14 @@ config: tests: - label: "Note" verification: | - 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. + 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: "Pre-Conditions" + verification: | + 1. PAA, PAI, DAC certificates are obtained and validated + 2. Operations happen within the Fail-Safe Context + 3. TH1 should be known about Commissioner based error condition/warning disabled: true - label: "Start the commissioning process of TH1 on DUT" @@ -207,7 +214,7 @@ tests: Product ID (PID) the DAC is not present in the product_id_array field in the Certification Declaration" verification: | - To Execute ths step for error condition 1 follow the following + To Execute ths step for error condition 1 follow the following steps 1. To generate the CD use the below command ./out/debug/chip-cert gen-cd -I -E dac-origin-vid-present -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out cd_vid_present_pid_missing.txt -o 0x8000 -r 0xFFF1 -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 @@ -244,4 +251,8 @@ tests: [1658320561.366481][4126:4132] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" -> "Cleanup" [1658320561.366524][4126:4132] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" [1658320561.366554][4126:4132] CHIP:CTL: Expiring failsafe on proxy 0xffff84000b60 + + Similary for 2nd error condition follow the below steps + + 1. 1. To generate the CD use the below command disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_5.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_5.yaml index 1ab2e84c96a65e..717ee8f06dc1d0 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_5.yaml @@ -38,7 +38,7 @@ tests: "TH1 establishes a CASE session to the DUT and saves the attestation challenge as attestation_challenge" verification: | - Verify in TH log: + Verify case session is established on TH(chip-tool) log: [1657081321.112631][2354:2359] CHIP:CTL: Operational credentials provisioned on device 0xffff68000b60 [1657081321.112706][2354:2359] CHIP:TOO: Secure Pairing Success @@ -51,7 +51,7 @@ tests: verification: | ./chip-tool operationalcredentials certificate-chain-request 1 1 0 - Verify CertificateChainResponse in TH log: + Verify CertificateChainResponse on TH(chip-tool) log: [1658393690.991117][3329:3334] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003 [1658393690.991168][3329:3334] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0003 @@ -67,7 +67,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 900 0 1 0 - Verify ArmFailSafeResponse in TH log : + Verify ArmFailSafeResponse on TH(chip-tool) log : [1658393763.804225][3345:3350] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658393763.804288][3345:3350] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 [1658393763.804376][3345:3350] CHIP:TOO: ArmFailSafeResponse: { @@ -86,7 +86,7 @@ tests: ./chip-tool operationalcredentials csrrequest hex:AFB3070A828B7A9CABEE888688F867683C084E6E4B3F13CDEDF17EEF05A9F352 1 0 - Verify CSRResponse in TH log: + Verify CSRResponse on TH(chip-tool) log: [1658393935.238621][3359:3364] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 [1658393935.238726][3359:3364] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 [1658393935.238839][3359:3364] CHIP:TOO: CSRResponse: { @@ -111,13 +111,18 @@ tests: verification step to be updated. disabled: true + - label: "" + verification: | + verification step to be updated. + disabled: true + - label: "TH1 sends an ArmFailSafe command to the General Commissioning cluster with the ExpiryLengthSeconds field set to 0" verification: | ./chip-tool generalcommissioning arm-fail-safe 0 0 1 0 - Verify ArmFailSafeResponse in TH log : + Verify ArmFailSafeResponse on TH(chip-tool) log : [1658394142.961248][3378:3383] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658394142.961297][3378:3383] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -133,7 +138,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 900 0 1 0 - Verify ArmFailSafeResponse in TH log : + Verify ArmFailSafeResponse on TH(chip-tool) log : [1658393763.804225][3345:3350] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658393763.804288][3345:3350] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -149,7 +154,7 @@ tests: verification: | ./chip-tool operationalcredentials csrrequest hex:AFB3070A828B7A9CABEE888688F867683C084E6E4B3F13CDEDF17EEF05A9 1 0 - Verify General error INVALID_COMMAND in TH log: + Verify General error INVALID_COMMAND in TH(chip-tool) log: [1658394196.798739][3387:3392] CHIP:EM: Removed CHIP MessageCounter:192677922 from RetransTable on exchange 13029i [1658394196.798787][3387:3392] CHIP:DMG: ICR moving to [ResponseRe] [1658394196.798859][3387:3392] CHIP:DMG: InvokeResponseMessage = @@ -191,7 +196,7 @@ tests: verification: | ./chip-tool generalcommissioning arm-fail-safe 0 0 1 0 - Verify ArmFailSafeResponse in TH log : + Verify ArmFailSafeResponse in TH(chip-tool) log : [1658394142.961248][3378:3383] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658394142.961297][3378:3383] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -207,7 +212,7 @@ tests: verification: | ./chip-tool pairing open-commissioning-window 1 1 400 2000 3840 - Verify TH1 open commissiong window + Verify manual pairing code on TH(chip-tool) log [1658394279.082812][3401:3407] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 [1658394279.082900][3401:3407] CHIP:CTL: Successfully opened pairing window on the device @@ -217,9 +222,9 @@ tests: - label: "TH2 fully commissions the DUT" verification: | - ./chip-tool pairing code 2 34941319897 --trace_decode 1 + ./chip-tool pairing code 2 34941319897 --trace_decode 1 --commissioner-name beta - Verify in TH2 is commissioned successfully in log: + Verify TH2 is commissioned successfully on TH2(chip-tool) log: [1658394409.242162][2474:2479] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 [1658394409.242204][2474:2479] CHIP:CTL: Received CommissioningComplete response, errorCode=0 [1658394409.242237][2474:2479] CHIP:CTL: Successfully finished commissioning step "SendComplete" @@ -233,9 +238,9 @@ tests: "TH2 reads the NOCs attribute from the Node Operational Credentials cluster using a non-fabric-scoped read" verification: | - ./chip-tool operationalcredentials read nocs 2 0 + ./chip-tool operationalcredentials read nocs 2 0 --commissioner-name beta - Verify that there are two element in the list in TH2 log: + Verify that there are two element in the list on TH2(chip-tool) log: [1658394451.122862][2491:2496] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 1660110007 [1658394451.126674][2491:2496] CHIP:TOO: NOCs: 1 entries [1658394451.126806][2491:2496] CHIP:TOO: [1]: { @@ -247,13 +252,13 @@ tests: - label: "TH2 extracts the pubic key from noc1 and noc2" verification: | - Verify both public key of noc1 and noc 2 are different + Verify both public key of noc1 and noc 2 are different in TH (all-clusters-app) To extract public key follow the below step 1. Copy the NOCVALUE of TH1 in commissioning log of TH1 2. save it in a file 3. give below command to get public key - ./out/debug/chip-cert print-cert noc_1.txt + ./out/debug/chip-cert print-cert noc_1.txt --commissioner-name beta ---> The extracted public key of noc1 is CHIP Certificate: @@ -280,6 +285,9 @@ tests: BA D5 4F AC 3F F0 81 6E 0B D3 E0 BE C9 7E 8E FE FB 7A 28 67 8E BA 58 8F D9 74 F1 4D C4 82 C5 F4 + + + --->Follow the same steps for noc2 The generated public key for noc2 is CHIP Certificate: diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_6.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_6.yaml index 8881c34f0fba45..16dee77a88b348 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_6.yaml @@ -26,15 +26,14 @@ config: tests: - label: "Note" verification: | - 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. + 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: - "Pre-Conditions 1. Device Attestation is completed 2. PAI, DAC - certificates are obtained and validated against externally obtained - PAA certificate 3. Operations happen within the Fail-Safe Context" + - label: "Pre-Conditions" verification: | - verification step to be updated. + 1. Device Attestation is completed + 2. PAI, DAC certificates are obtained and validated against externally obtained PAA certificate + 3. Operations happen within the Fail-Safe Context disabled: true - label: "DUT completes the attestation procedure" 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 91486a9f19c52f..e9426841124b86 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 @@ -25,9 +25,23 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + "NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux#readme + Events to be executed as following + 1. Compile app using below command in connectedhomeip folder + a. ./scripts/run_in_build_env.sh ""./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build"" + b. ./scripts/run_in_build_env.sh ""./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build"" + 2. Build respective app (all-clusters-app) + 3. Commission DUT to TH + 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT + ps -aef|grep all-clusters-app + 5. Follow the Verification step below to generate the event in 2nd terminal of DUT " + disabled: true + - label: "Commission DUT to TH" verification: | - verification step to be updated. + disabled: true - label: @@ -133,52 +147,3 @@ tests: [1659530352.583789][4993:4998] CHIP:TOO: BootReason: 0 [1659530352.583813][4993:4998] CHIP:TOO: } disabled: true - - - label: "TH initiates the subscription of NetworkFault event from DUT." - PICS: DGGEN.S.E02 - verification: | - On Raspi platform the event is triggered with below command, Pls use equivalent command on the respective DUT - - "echo "{"Name":"NetworkFaultChange"}" > /tmp/chip_all_clusters_fifo- (PID of all-clusters-app)" - - - sudo ./chip-tool generaldiagnostics subscribe-event network-fault-change 100 1000 1 0 - On TH(chip-tool) verify that subscription response of NetworkFault event shows subscrition ID - - [1653659901.757441][242605:242610] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:11933575 on exchange 20223i - [1653659901.757513][242605:242610] CHIP:EM: Found matching exchange: 20223i, Delegate: 0x7fd058003950 - [1653659901.757544][242605:242610] CHIP:EM: Rxd Ack; Removing MessageCounter:3369789 from Retrans Table on exchange 20223i - [1653659901.757564][242605:242610] CHIP:EM: Removed CHIP MessageCounter:3369789 from RetransTable on exchange 20223i - [1653659901.757618][242605:242610] CHIP:DMG: SubscribeResponseMessage = - [1653659901.757638][242605:242610] CHIP:DMG: { - [1653659901.757658][242605:242610] CHIP:DMG: SubscriptionId = 0x17dc072d1130a3bd, - [1653659901.757676][242605:242610] CHIP:DMG: MinIntervalFloorSeconds = 0x64, - [1653659901.757690][242605:242610] CHIP:DMG: MaxIntervalCeilingSeconds = 0x3e8, - [1653659901.757708][242605:242610] CHIP:DMG: InteractionModelRevision = 1 - [1653659901.757721][242605:242610] CHIP:DMG: } - [1653659901.757746][242605:242610] CHIP:DMG: Subscription established with SubscriptionID = 0x17DC072D1130A3BD MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000002 - disabled: true - - - label: - "Reboot DUT with a normal reboot process. Rejoin DUT back to previous - TH fabric." - PICS: DGGEN.S.E03 - verification: | - On Raspi platform the event is triggered with below command, Pls use equivalent command on the respective DUT - - "echo "{"Name":""}" > /tmp/chip_all_clusters_fifo- (PID of all-clusters-app)" - - - 1. Reboot DUT with a normal reboot process - 2. ./chip-tool generaldiagnostics read-event boot-reason 1 0 - On TH(chip-tool) verify that the event data of BootReason specified by Table 103 BootReason ENUM table. - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Event 0x0000_0003 - [1651562139.644134][7873:7878] CHIP:TOO: Event number: 1 - [1651562139.644157][7873:7878] CHIP:TOO: Priority: Critical - [1651562139.644179][7873:7878] CHIP:TOO: Timestamp: 8347991 - [1651562139.644273][7873:7878] CHIP:TOO: BootReason: { - [1651562139.644317][7873:7878] CHIP:TOO: BootReason: 0 - [1651562139.644343][7873:7878] CHIP:TOO: } - [1651562139.644431][7873:7878] CHIP:EM: Sending Standalone Ack for MessageCounter:9685408 on exchange 6383i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_3_1.yaml index a30e6eafd57456..9771f051c5759c 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_3_1.yaml @@ -26,12 +26,12 @@ config: tests: - label: "Note" verification: | - 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. + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true - label: "Commission TH to DUT" verification: | - verification step to be updated. + disabled: true - label: "DUT reads a list of ThreadMetrics struct attribute from TH." @@ -107,19 +107,19 @@ tests: [1659972063.411625][3458:3458] CHIP:IM: Received Read request [1659972063.411702][3458:3458] CHIP:DMG: ReadRequestMessage = [1659972063.411740][3458:3458] CHIP:DMG: { - [1659972063.411763][3458:3458] CHIP:DMG: AttributePathIBs = - [1659972063.411789][3458:3458] CHIP:DMG: [ - [1659972063.411822][3458:3458] CHIP:DMG: AttributePathIB = - [1659972063.411852][3458:3458] CHIP:DMG: { - [1659972063.411892][3458:3458] CHIP:DMG: Endpoint = 0x0, - [1659972063.411932][3458:3458] CHIP:DMG: Cluster = 0x34, - [1659972063.411964][3458:3458] CHIP:DMG: Attribute = 0x0000_0002, - [1659972063.412003][3458:3458] CHIP:DMG: } + [1659972063.411763][3458:3458] CHIP:DMG: AttributePathIBs = + [1659972063.411789][3458:3458] CHIP:DMG: [ + [1659972063.411822][3458:3458] CHIP:DMG: AttributePathIB = + [1659972063.411852][3458:3458] CHIP:DMG: { + [1659972063.411892][3458:3458] CHIP:DMG: Endpoint = 0x0, + [1659972063.411932][3458:3458] CHIP:DMG: Cluster = 0x34, + [1659972063.411964][3458:3458] CHIP:DMG: Attribute = 0x0000_0002, + [1659972063.412003][3458:3458] CHIP:DMG: } [1659972063.412032][3458:3458] CHIP:DMG: - [1659972063.412069][3458:3458] CHIP:DMG: ], + [1659972063.412069][3458:3458] CHIP:DMG: ], [1659972063.412106][3458:3458] CHIP:DMG: - [1659972063.412133][3458:3458] CHIP:DMG: isFabricFiltered = true, - [1659972063.412165][3458:3458] CHIP:DMG: InteractionModelRevision = 1 + [1659972063.412133][3458:3458] CHIP:DMG: isFabricFiltered = true, + [1659972063.412165][3458:3458] CHIP:DMG: InteractionModelRevision = 1 [1659972063.412191][3458:3458] CHIP:DMG: }, [1659972063.412273][3458:3458] CHIP:DMG: IM RH moving to [GeneratingReports] [1659972063.412375][3458:3458] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 @@ -139,19 +139,19 @@ tests: [1659972088.497642][3458:3458] CHIP:IM: Received Read request [1659972088.497747][3458:3458] CHIP:DMG: ReadRequestMessage = [1659972088.497787][3458:3458] CHIP:DMG: { - [1659972088.497816][3458:3458] CHIP:DMG: AttributePathIBs = - [1659972088.497854][3458:3458] CHIP:DMG: [ - [1659972088.497889][3458:3458] CHIP:DMG: AttributePathIB = - [1659972088.497928][3458:3458] CHIP:DMG: { - [1659972088.497970][3458:3458] CHIP:DMG: Endpoint = 0x0, - [1659972088.498016][3458:3458] CHIP:DMG: Cluster = 0x34, - [1659972088.498061][3458:3458] CHIP:DMG: Attribute = 0x0000_0003, - [1659972088.498103][3458:3458] CHIP:DMG: } + [1659972088.497816][3458:3458] CHIP:DMG: AttributePathIBs = + [1659972088.497854][3458:3458] CHIP:DMG: [ + [1659972088.497889][3458:3458] CHIP:DMG: AttributePathIB = + [1659972088.497928][3458:3458] CHIP:DMG: { + [1659972088.497970][3458:3458] CHIP:DMG: Endpoint = 0x0, + [1659972088.498016][3458:3458] CHIP:DMG: Cluster = 0x34, + [1659972088.498061][3458:3458] CHIP:DMG: Attribute = 0x0000_0003, + [1659972088.498103][3458:3458] CHIP:DMG: } [1659972088.498144][3458:3458] CHIP:DMG: - [1659972088.498180][3458:3458] CHIP:DMG: ], + [1659972088.498180][3458:3458] CHIP:DMG: ], [1659972088.498219][3458:3458] CHIP:DMG: - [1659972088.498257][3458:3458] CHIP:DMG: isFabricFiltered = true, - [1659972088.498294][3458:3458] CHIP:DMG: InteractionModelRevision = 1 + [1659972088.498257][3458:3458] CHIP:DMG: isFabricFiltered = true, + [1659972088.498294][3458:3458] CHIP:DMG: InteractionModelRevision = 1 [1659972088.498328][3458:3458] CHIP:DMG: }, [1659972088.498431][3458:3458] CHIP:DMG: IM RH moving to [GeneratingReports] [1659972088.498545][3458:3458] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml index caa3ac7574991a..30977190efa2a7 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml @@ -27,9 +27,14 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + DUT as server + disabled: true + - label: "TH reads NumberOfHoliday SchedulesSupported and saves for future use." - PICS: DRLK.S.F04 && DRLK.S.A0016 + PICS: DRLK.S.F11 && DRLK.S.A0016 verification: | ./chip-tool doorlock read number-of-holiday-schedules-supported 1 1 Verify " NumberOfHoliDay SchedulesSuppored" on the TH(Chip-tool) Log: @@ -46,7 +51,7 @@ tests: "TH sends Set Holiday Schedule Command to DUT with the following values: HolidayIndex as 1 LocalStartTime as 20 Seconds LocalEndTime as 30 Seconds OperatingMode as 0" - PICS: DRLK.S.F04 && DRLK.S.C11.Rsp + PICS: DRLK.S.F11 && DRLK.S.C11.Rsp verification: | ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 Verify " DUT send SUCCESS response." on the TH(Chip-tool) Log: @@ -68,7 +73,7 @@ tests: - label: "TH sends Get Holiday Schedule Command to DUT with HolidayIndex as 1" - PICS: DRLK.S.F04 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx + PICS: DRLK.S.F11 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 1 1 1 Verify " DUT responds with Get Holiday Schedule Response" on the TH(Chip-tool) Log: @@ -126,7 +131,7 @@ tests: - label: "TH sends Get Holiday Schedule Command to DUT with Invalid HolidayIndex as 15." - PICS: DRLK.S.F04 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx + PICS: DRLK.S.F11 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 15 1 1 Verify " DUT sends INVALID_COMMAND response" on the TH(Chip-tool) Log: @@ -148,7 +153,7 @@ tests: "TH sends Get Holiday Schedule Command to DUT with the HolidayIndex as 10 (value is in the the range of step 1 but Holiday Schedule entry not available)" - PICS: DRLK.S.F04 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx + PICS: DRLK.S.F11 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 10 1 1 Verify " DUT sends a NOT_FOUND status" on the TH(Chip-tool) Log: @@ -164,7 +169,7 @@ tests: - label: "TH send Clear Holiday Schedule Command to DUT with HolidayIndex as 1" - PICS: DRLK.S.F04 && DRLK.S.C13.Rsp + PICS: DRLK.S.F11 && DRLK.S.C13.Rsp verification: | ./chip-tool doorlock clear-holiday-schedule 1 1 1 Verify " DUT sends SUCCESS response" on the TH(Chip-tool) Log: @@ -186,7 +191,7 @@ tests: - label: "TH sends Get Holiday Schedule Command to DUT with HolidayIndex as 1." - PICS: DRLK.S.F04 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx + PICS: DRLK.S.F11 && DRLK.S.C12.Rsp && DRLK.S.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 1 1 1 Verify " DUT sends a NOT_FOUND status" on the TH(Chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml index f5dedc2c4d6f11..398e1590e5bbaf 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml @@ -1197,7 +1197,8 @@ tests: from the DUT." verification: | In case of chip tool, here is an example command to use - sudo ./chip-tool any read-all 1 0xFFFF --timeout 50 - Verify on TH , DUT is responds right attributes and events for above command + ./chip-tool any read-all 0xFFFFFFFF,0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF,0xFFFF + + on TH verify that DUT sends back data of all attributes and events that the TH has access to disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml index 8109e78a529115..2252e4fa8d01bb 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml @@ -24,11 +24,16 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + 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: "DUT sends the WriteRequestMessage to the TH to modify one attribute data" verification: | - In case of chip tool, here is an example command to use + 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) sudo ./chip-tool levelcontrol write on-level 2 1 1 @@ -62,7 +67,7 @@ tests: [1655795552.552647][7331:7331] CHIP:DMG: InteractionModelRevision = 1 [1655795552.552686][7331:7331] CHIP:DMG: }, - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs,, verify that TH all-clusters-app sent success response [1657883782.721742][2796:2801] CHIP:DMG: WriteResponseMessage = [1657883782.721783][2796:2801] CHIP:DMG: { [1657883782.721819][2796:2801] CHIP:DMG: AttributeStatusIBs = @@ -112,7 +117,7 @@ tests: [1657883808.063295][2457:2457] CHIP:DMG: }, [1657883808.063369][2457:2457] CHIP:DMG: IM RH moving to [GeneratingReports] - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs,, verify that TH all-clusters-app sent success response [1655795604.755214][6880:6885] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 737039636 [1655795604.755363][6880:6885] CHIP:TOO: on level: 2 [1655795604.755460][6880:6885] CHIP:EM: Sending Standalone Ack for MessageCounter:83198098 on exchange 53763i @@ -127,10 +132,11 @@ tests: disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type bool." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type bool." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bool verification: | - In case of chip tool, here is an example command to use + 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) ./chip-tool basic write local-config-disabled 1 1 0 @@ -166,7 +172,7 @@ tests: - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657883938.394965][2822:2827] CHIP:DMG: WriteResponseMessage = [1657883938.394995][2822:2827] CHIP:DMG: { @@ -218,23 +224,21 @@ tests: [1657884119.523280][2748:2748] CHIP:DMG: }, - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1655795843.336042][6902:6907] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 1263909562 [1655795843.336093][6902:6907] CHIP:TOO: LocalConfigDisabled: TRUE [1655795843.336251][6902:6907] CHIP:EM: Sending Standalone Ack for MessageCounter:108030495 on exchange 43207i disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type string." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type string." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_String verification: | - In case of chip tool, here is an example command to use - + 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) ./chip-tool basic write node-label node 1 0 - verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796035.022296][7331:7331] CHIP:EM: Handling via exchange: 64908r, Delegate: 0xaaaad9aed418 @@ -265,8 +269,7 @@ tests: [1655796035.023656][7331:7331] CHIP:DMG: }, [1655796035.023791][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=m [1655796035.023851][7331:7331] CHIP:DMG: AccessControl: allowed - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657884155.221193][2865:2870] CHIP:DMG: WriteResponseMessage = [1657884155.221246][2865:2870] CHIP:DMG: { [1657884155.221292][2865:2870] CHIP:DMG: AttributeStatusIBs = @@ -315,8 +318,7 @@ tests: [1657884173.739288][2748:2748] CHIP:DMG: }, - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1655796082.079468][6918:6923] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 1263909563 [1655796082.079509][6918:6923] CHIP:TOO: NodeLabel: node @@ -324,11 +326,11 @@ tests: disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type unsigned integer." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type unsigned integer." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_UnsignedInteger verification: | - In case of chip tool, here is an example command to use - + 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) ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 @@ -362,7 +364,8 @@ tests: [1655796141.168253][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o [1655796141.168313][7331:7331] CHIP:DMG: AccessControl: allowed - On DUT as a client side, verify that TH all-clusters-app sent success response + + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657884204.951658][2878:2883] CHIP:DMG: WriteResponseMessage = [1657884204.951700][2878:2883] CHIP:DMG: { [1657884204.951736][2878:2883] CHIP:DMG: AttributeStatusIBs = @@ -413,53 +416,58 @@ tests: [1657884227.860339][2748:2748] CHIP:DMG: }, [1657884227.860413][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1655796192.032715][6931:6936] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 737039637 [1655796192.032807][6931:6936] CHIP:TOO: on off transition time: 1 [1655796192.032908][6931:6936] CHIP:EM: Sending Standalone Ack for MessageCounter:249349258 on exchange 7433i disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type signed integer." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type signed integer." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_SignedInteger verification: | DUT implementation required to verify write an attribute of data type signed integer. disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type floating point." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type floating point." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_FloatingPoint verification: | DUT implementation required to verify write an attribute of data type float disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type Octet String." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type Octet String." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_OctetString verification: | DUT implementation required to verify write an attribute of data type Octet String disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type Struct." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type Struct." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_Struct verification: | DUT implementation required to verify write an attribute ofdata type Struct disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type List." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type List." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_List verification: | DUT implementation required to verify write an attribute of data type List disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type enum." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type enum." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_Enum verification: | - In case of chip tool, here is an example command to use + 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) ./chip-tool any write-by-id 0x0204 0 1 1 1 @@ -494,7 +502,7 @@ tests: [1655796297.609342][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o [1655796297.609403][7331:7331] CHIP:DMG: AccessControl: allowed - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657884258.383116][2892:2897] CHIP:DMG: WriteResponseMessage = [1657884258.383157][2892:2897] CHIP:DMG: { [1657884258.383192][2892:2897] CHIP:DMG: AttributeStatusIBs = @@ -530,19 +538,18 @@ tests: [1657884282.303778][2898:2903] CHIP:TOO: temperature display mode: 1 [1657884282.303862][2898:2903] CHIP:EM: Sending Standalone Ack for MessageCounter:147756485 on exchange 42871i - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs,, verify that TH all-clusters-app sent success response [1655796341.132655][6946:6951] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945391 [1655796341.132864][6946:6951] CHIP:TOO: temperature display mode: 1 [1655796341.132973][6946:6951] CHIP:EM: Sending Standalone Ack for MessageCounter:245498041 on exchange 51992i disabled: true - label: - "[Optional] DUT sends the WriteRequestMessage to the TH to write an - attribute of data type bitmap." + "DUT sends the WriteRequestMessage to the TH to write an attribute of + data type bitmap." + PICS: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bitmap verification: | - In case of chip tool, here is an example command to use - - + 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) ./chip-tool colorcontrol write-by-id 0x000f 1 1 1 @@ -577,7 +584,7 @@ tests: [1655796429.698446][7331:7331] CHIP:DMG: AccessControl: allowed - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657884309.994598][2907:2912] CHIP:DMG: WriteResponseMessage = [1657884309.994627][2907:2912] CHIP:DMG: { @@ -630,8 +637,7 @@ tests: [1657884334.614053][2748:2748] CHIP:DMG: }, [1657884334.614128][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1655796493.233673][6961:6966] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_000F DataVersion: 2788050502 [1655796493.233761][6961:6966] CHIP:TOO: Options: 1 [1655796493.233865][6961:6966] CHIP:EM: Sending Standalone Ack for MessageCounter:185730221 on exchange 37136i @@ -639,7 +645,8 @@ tests: - label: "DUT sends a WriteRequestMessage to the TH with a large list of - attribute data which has to be sent in multiple messages." + attribute data, which is larger than 1 MTU(1280 bytes), that has to be + sent in multiple messages." verification: | DUT implementation required to verify write an attribute which is is larger than 1 MTU(1280 bytes) Here is an example command to verify the write functionality. User must choose an attribute which has large list of attribute data. @@ -650,7 +657,7 @@ tests: "DUT sends the WriteRequestMessage to the TH to write one attribute on a given cluster and endpoint. Repeat the above steps 3 times." verification: | - In case of chip tool, here is an example command to use + 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) ./chip-tool any write-by-id 0x0204 0 1 1 1 @@ -685,7 +692,7 @@ tests: [1655796724.512195][7331:7331] CHIP:DMG: }, [1655796724.512344][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1657884369.932192][2923:2928] CHIP:DMG: WriteResponseMessage = [1657884369.932226][2923:2928] CHIP:DMG: { [1657884369.932255][2923:2928] CHIP:DMG: AttributeStatusIBs = @@ -737,8 +744,7 @@ tests: [1657884399.502907][2748:2748] CHIP:DMG: }, [1657884399.502989][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] - - On DUT as a client side, verify that TH all-clusters-app sent success response + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent success response [1655796786.513406][6976:6981] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945392 [1655796786.513496][6976:6981] CHIP:TOO: temperature display mode: 1 [1655796786.513593][6976:6981] CHIP:EM: Sending Standalone Ack for MessageCounter:190446058 on exchange 28240i @@ -749,9 +755,9 @@ tests: disabled: true - label: - "[Optional] DUT sends a ReadRequest message to the TH to read any - attribute on two clusters. TH returns with a report data action with - the attribute values and the dataversions of the clusters. DUT sends a + "DUT sends a ReadRequest message to the TH to read any attribute on + two clusters. TH returns with a report data action with the attribute + values and the dataversions of the clusters. DUT sends a WriteRequestMessage to the DUT to both the clusters with the appropriate dataversions(received in the previous step) to modify the value of an attribute" diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml index f22a140b6cf067..a27bf4593c59d0 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml @@ -26,11 +26,26 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + + - label: "Note" + verification: | + 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: "DUT sends a subscription request message to the target node/reference device for a single attribute of any data type supported." + PICS: MCORE.IDM.C.SubscribeRequest verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start onoff subscribe on-off 10 80 1 1 @@ -60,7 +75,7 @@ tests: [1657446108.598559][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent Subscription report with unic subscriptionID [1657884469.617473][2938:2943] CHIP:DMG: ReportDataMessage = [1657884469.617508][2938:2943] CHIP:DMG: { [1657884469.617538][2938:2943] CHIP:DMG: SubscriptionId = 0x2d030a2b, @@ -109,8 +124,12 @@ tests: - label: "DUT sends the subscription request message to TH TH sends a report data DUT sends the status response back to TH" + PICS: MCORE.IDM.C.SubscribeRequest verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start onoff subscribe on-off 10 80 1 1 @@ -126,7 +145,8 @@ tests: [1657446108.604672][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657446108.604755][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 80 seconds - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent Subscription report with unic subscriptionID [1657884569.751004][2938:2943] CHIP:DMG: ReportDataMessage = [1657884569.751034][2938:2943] CHIP:DMG: { [1657884569.751059][2938:2943] CHIP:DMG: SubscriptionId = 0x47cd6fdb, @@ -177,8 +197,13 @@ tests: an attribute of data type boolean. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)." + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start basic subscribe local-config-disabled 10 100 1 0 @@ -206,7 +231,8 @@ tests: - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent Subscription report with unic subscriptionID [1657884643.152038][2938:2943] CHIP:DMG: ReportDataMessage = [1657884643.152141][2938:2943] CHIP:DMG: { [1657884643.152206][2938:2943] CHIP:DMG: SubscriptionId = 0x2e0592e3, @@ -257,8 +283,12 @@ tests: an attribute of data type string. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)." + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_String verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start basic subscribe node-label 30 200 1 0 @@ -290,7 +320,8 @@ tests: [1657446721.226711][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 [1657446721.226773][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent Subscription report with unic subscriptionID [1657884902.175205][2938:2943] CHIP:DMG: ReportDataMessage = [1657884902.175255][2938:2943] CHIP:DMG: { [1657884902.175299][2938:2943] CHIP:DMG: SubscriptionId = 0x6a6457a1, @@ -327,9 +358,12 @@ tests: an attribute of data type unsigned integer. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)." + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_UnsignedInteger verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start any subscribe-by-id 0x0008 0x0010 10 100 1 1 On TH (On the reference app) Verify if DUT is responding with the below status response for the above command @@ -404,7 +438,8 @@ tests: [1657448453.234577][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + + If the DUT has to provision to verify the logs, , verify that TH all-clusters-app sent Subscription report with unic subscriptionID [1657884955.073466][2938:2943] CHIP:DMG: ReportDataMessage = [1657884955.073516][2938:2943] CHIP:DMG: { [1657884955.073562][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, @@ -444,6 +479,7 @@ tests: an attribute of data type signed integer. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)" + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Integer verification: | DUT implementation required to verify subscribe an attribute of data type signed integer disabled: true @@ -453,6 +489,7 @@ tests: an attribute of data type Floating Point. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)" + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_FloatingPoint verification: | DUT implementation required to verify subscribe an attribute of data type floating point disabled: true @@ -462,6 +499,7 @@ tests: an attribute of data type list. Modify that attribute on the TH. TH should send the modified data to the DUT. Modify the attribute multiple times (3 times)" + PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_List verification: | DUT implementation required to verify subscribe and list an attribute of data type list disabled: true @@ -472,6 +510,7 @@ tests: of the maximum interval. After the maximum interval, TH sends a report data with the subscription id created during the subscription activation." + PICS: MCORE.IDM.C.SubscribeRequest verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. disabled: true @@ -479,8 +518,12 @@ tests: - label: "DUT sends a subscription request message to the target node/reference device for multiple attributes(3 attributes)." + PICS: MCORE.IDM.C.SubscribeRequest.MultipleAttributes verification: | - In the case of chip tool as a client, here is an example command the client can subscribe to the TH + 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) + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start any subscribe-by-id "6,8,3" "0,1,0" 10 100 "1" "1,1,1" @@ -534,7 +577,8 @@ tests: [1657449168.674365][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 100 seconds - On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + + If the DUT has to provision to verify the logs, verify that TH all-clusters-app sent Subscription report with unic subscriptionID 884990.165955][2938:2943] CHIP:DMG: }, [1657884990.166021][2938:2943] CHIP:DMG: [1657884990.166072][2938:2943] CHIP:DMG: ], diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml index 28d371377c6821..a4fb3db49bba06 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml @@ -70,7 +70,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - Verify on TH(chip-tool), current modes provides a list of modes + Verify on TH(chip-tool), current modes provides a mode Record for usage in steps 3. [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 @@ -98,7 +98,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - Verify on TH(chip-tool), current modes provides a list ofmodes + Verify on TH(chip-tool), current modes provides integer provided in step 3a, not the integer from step 2 [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml index f94f8507d782c5..3e4d2cc36f7f1f 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml @@ -29,7 +29,7 @@ tests: verification: | ./chip-tool modeselect read on-mode 1 1 - on TH(chip-tool),Verify that the DUT response The attribute is nullable, and null is also acceptable + on TH(chip-tool),Verify that the DUT response is an integer. Record this value for usage in steps 2b. [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml index 1dec78d5a0c0c3..ec53ad0c219e1b 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -24,6 +24,29 @@ config: endpoint: 0 tests: + - label: "Pre-conditions:" + 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: "Note" + verification: | + 1.To run this test case build the OTA Provider app in nRF connectedhomeip Docker . [ + https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-provider-app/linux + + 2. Build all-cluster-app in docker + + west build -b nrf52840dk_nrf52840 -- -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y + + + 3.Flash + west flash --erase + + 4.OTA Image needs to build on docker + + west build -b nrf52840dk_nrf52840 -d build2 -- -DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y + disabled: true + - label: "TH reads the StartUpMode attribute from the DUT" PICS: MOD.S.A0004 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml index 56dc6c9fd5aafa..5a9118852691de 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml @@ -26,6 +26,25 @@ config: endpoint: 0 tests: + - label: "Pre-conditions:" + 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: "Note" + verification: | + To Execute the TC-MOD-3.4 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 sudo ./out/all-clusters-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: "TH reads the StartUpMode attribute from the DUT" PICS: MOD.S.A0004 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml deleted file mode 100644 index 6dd4e4dc92422d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 3.2.6. [TC-OCC-3.2] Primary functionality with client as DUT - -PICS: - - OCC.C - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true - - - label: "DUT reads Occupancy attribute from TH" - PICS: OCC.C.A0000 - verification: | - ./chip-tool occupancysensing read occupancy 1 1 - - verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command - - [1657906910.080564][2361:2361] CHIP:IM: Received Read request - [1657906910.080689][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906910.080758][2361:2361] CHIP:DMG: { - [1657906910.080799][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906910.080846][2361:2361] CHIP:DMG: [ - [1657906910.080907][2361:2361] CHIP:DMG: AttributePathIB = - [1657906910.080965][2361:2361] CHIP:DMG: { - [1657906910.081017][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906910.081092][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906910.081152][2361:2361] CHIP:DMG: Attribute = 0x0000_0000, - [1657906910.081206][2361:2361] CHIP:DMG: } - [1657906910.081279][2361:2361] CHIP:DMG: - [1657906910.081331][2361:2361] CHIP:DMG: ], - [1657906910.081398][2361:2361] CHIP:DMG: - [1657906910.081449][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906910.081496][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906910.081538][2361:2361] CHIP:DMG: }, - disabled: true - - - label: "Operate on TH to change the occupancy status" - PICS: OCC.M.OccupancyChange - verification: | - Logs will be device specific[Manual operation required] - disabled: true - - - label: "after a few seconds, DUT reads Occupancy attribute from TH" - PICS: OCC.C.A0000 - verification: | - ./chip-tool occupancysensing read occupancy 1 1 - - verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command - - [1657906923.314549][2361:2361] CHIP:IM: Received Read request - [1657906923.314735][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906923.314792][2361:2361] CHIP:DMG: { - [1657906923.314838][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906923.314899][2361:2361] CHIP:DMG: [ - [1657906923.314949][2361:2361] CHIP:DMG: AttributePathIB = - [1657906923.315006][2361:2361] CHIP:DMG: { - [1657906923.315064][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906923.315132][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906923.315199][2361:2361] CHIP:DMG: Attribute = 0x0000_0000, - [1657906923.315258][2361:2361] CHIP:DMG: } - [1657906923.315322][2361:2361] CHIP:DMG: - [1657906923.315380][2361:2361] CHIP:DMG: ], - [1657906923.315438][2361:2361] CHIP:DMG: - [1657906923.315497][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906923.315560][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906923.315609][2361:2361] CHIP:DMG: }, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml index d4affdb99c5eb4..da18a036e8512d 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml @@ -81,7 +81,7 @@ tests: ./chip-tool onoff read on-time 1 1 - verify the " on-time-control response" on the TH (all-cluster-app) log: + verify the " on-time response" on the TH (all-cluster-app) log: [...] [1650535552.255428][3678:3678] CHIP:IM: Received Read request diff --git a/src/app/tests/suites/certification/Test_TC_PCC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_3_1.yaml index 1c3774ba792444..7cf72c58584f9b 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" @@ -58,7 +63,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-speed 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148440.471321][2336:2336] CHIP:IM: Received Read request [1651148440.471389][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -82,7 +87,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-flow 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148472.518933][2336:2336] CHIP:IM: Received Read request [1651148472.518993][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -106,7 +111,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read effective-operation-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651570515.206834][9246:9246] CHIP:IM: Received Read request [1651570515.206917][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -128,7 +133,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read effective-control-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651570975.559213][9246:9246] CHIP:IM: Received Read request [1651570975.559268][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -147,7 +152,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read capacity 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571009.295069][9246:9246] CHIP:IM: Received Read request [1651571009.295158][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -166,7 +171,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read operation-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571334.617100][9337:9337] CHIP:IM: Received Read request [1651571334.617155][9337:9337] CHIP:DMG: ReadRequestMessage = @@ -192,7 +197,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-const-pressure 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148507.711384][2336:2336] CHIP:IM: Received Read request [1651148507.711452][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -216,7 +221,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-const-pressure 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148537.336390][2336:2336] CHIP:IM: Received Read request [1651148537.336445][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -240,7 +245,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-comp-pressure 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148566.361843][2336:2336] CHIP:IM: Received Read request [1651148566.361897][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -262,7 +267,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-comp-pressure 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148595.417817][2336:2336] CHIP:IM: Received Read request [1651148595.417901][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -286,7 +291,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-const-speed 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148626.823098][2336:2336] CHIP:IM: Received Read request [1651148626.823201][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -308,7 +313,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-const-speed 1 1 - Verify in TH all-clusters-app log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564124.345958][8748:8748] CHIP:IM: Received Read request [1651564124.346033][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -331,7 +336,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564163.319315][8748:8748] CHIP:IM: Received Read request [1651564163.319399][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -355,7 +360,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564163.319315][8748:8748] CHIP:IM: Received Read request [1651564163.319399][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -378,7 +383,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-const-flow 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564281.857728][8748:8748] CHIP:IM: Received Read request [1651564281.857784][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -400,7 +405,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read min-const-temp 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564317.488333][8748:8748] CHIP:IM: Received Read request [1651564317.488417][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -422,7 +427,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-const-temp 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564350.267434][8748:8748] CHIP:IM: Received Read request [1651564350.267489][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -444,7 +449,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read pump-status 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651564415.272861][8748:8748] CHIP:IM: Received Read request [1651564415.272946][8748:8748] CHIP:DMG: ReadRequestMessage = @@ -466,7 +471,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read speed 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571041.252491][9246:9246] CHIP:IM: Received Read request [1651571041.252548][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -488,7 +493,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read lifetime-running-hours 1 1 - Verify in TH all-clusters-app log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571194.810592][9337:9337] CHIP:IM: Received Read request [1651571194.810647][9337:9337] CHIP:DMG: ReadRequestMessage = @@ -510,7 +515,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read power 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571264.121840][9337:9337] CHIP:IM: Received Read request [1651571264.121896][9337:9337] CHIP:DMG: ReadRequestMessage = @@ -532,7 +537,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read lifetime-energy-consumed 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571293.017448][9337:9337] CHIP:IM: Received Read request [1651571293.017534][9337:9337] CHIP:DMG: ReadRequestMessage = @@ -554,7 +559,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read control-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571369.365807][9337:9337] CHIP:IM: Received Read request [1651571369.365907][9337:9337] CHIP:DMG: ReadRequestMessage = @@ -583,7 +588,7 @@ tests: ./chip-tool pumpconfigurationandcontrol write operation-mode 0 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the Write Request for the data sent in the above command [1652858465.008652][2107:2107] CHIP:IM: Received Write request [1652858465.008695][2107:2107] CHIP:DMG: IM WH moving to [Initialized] @@ -622,7 +627,7 @@ tests: ./chip-tool pumpconfigurationandcontrol write control-mode 0 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the Write Request for the data sent in the above command [1652858653.083434][2107:2107] CHIP:IM: Received Write request [1652858653.083469][2107:2107] CHIP:DMG: IM WH moving to [Initialized] @@ -655,7 +660,8 @@ tests: ./chip-tool pumpconfigurationandcontrol write lifetime-running-hours 1 1 1 - Verify in DUT as client side Log + + verify on TH all-cluster-app receives the Write Request for the data sent in the above command [1652858777.844427][2107:2107] CHIP:IM: Received Write request [1652858777.844450][2107:2107] CHIP:DMG: IM WH moving to [Initialized] @@ -688,7 +694,8 @@ tests: ./chip-tool pumpconfigurationandcontrol write lifetime-energy-consumed 1 1 1 - Verify in DUT as client side Log + + verify on TH all-cluster-app receives the Write Request for the data sent in the above command [1652858844.149759][2107:2107] CHIP:IM: Received Write request [1652858844.149801][2107:2107] CHIP:DMG: IM WH moving to [Initialized] @@ -730,36 +737,62 @@ tests: ./chip-tool pumpconfigurationandcontrol read attribute-list 1 1 - Verify in DUT as client side Log - [1654247307401] [91803:4011207] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFB DataVersion: 3055704159 - [1654247307401] [91803:4011207] CHIP: [TOO] AttributeList: 12 entries - [1654247307401] [91803:4011207] CHIP: [TOO] [1]: 0 - [1654247307401] [91803:4011207] CHIP: [TOO] [2]: 1 - [1654247307401] [91803:4011207] CHIP: [TOO] [3]: 2 - [1654247307401] [91803:4011207] CHIP: [TOO] [4]: 17 - [1654247307401] [91803:4011207] CHIP: [TOO] [5]: 18 - [1654247307401] [91803:4011207] CHIP: [TOO] [6]: 19 - [1654247307401] [91803:4011207] CHIP: [TOO] [7]: 32 - [1654247307401] [91803:4011207] CHIP: [TOO] [8]: 65528 - [1654247307401] [91803:4011207] CHIP: [TOO] [9]: 65529 - [1654247307401] [91803:4011207] CHIP: [TOO] [10]: 65531 - [1654247307401] [91803:4011207] CHIP: [TOO] [11]: 65532 - [1654247307401] [91803:4011207] CHIP: [TOO] [12]: 65533 + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command + [1660745892.540246][3657:3657] CHIP:IM: Received Read request + [1660745892.540323][3657:3657] CHIP:DMG: ReadRequestMessage = + [1660745892.540346][3657:3657] CHIP:DMG: { + [1660745892.540364][3657:3657] CHIP:DMG: AttributePathIBs = + [1660745892.540401][3657:3657] CHIP:DMG: [ + [1660745892.540422][3657:3657] CHIP:DMG: AttributePathIB = + [1660745892.540452][3657:3657] CHIP:DMG: { + [1660745892.540487][3657:3657] CHIP:DMG: Endpoint = 0x1, + [1660745892.540517][3657:3657] CHIP:DMG: Cluster = 0x200, + [1660745892.540556][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFB, + [1660745892.540582][3657:3657] CHIP:DMG: } + [1660745892.540616][3657:3657] CHIP:DMG: + [1660745892.540638][3657:3657] CHIP:DMG: ], + [1660745892.540673][3657:3657] CHIP:DMG: + [1660745892.540696][3657:3657] CHIP:DMG: isFabricFiltered = true, + [1660745892.540726][3657:3657] CHIP:DMG: InteractionModelRevision = 1 + [1660745892.540747][3657:3657] CHIP:DMG: }, + [1660745892.540821][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] + [1660745892.540929][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1660745892.540954][3657:3657] CHIP:DMG: Cluster 200, Attribute fffb is dirty + [1660745892.540982][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) ./chip-tool pumpconfigurationandcontrol read feature-map 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - [1656478569086] [49565:5734437] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFC DataVersion: 1816685251 - [1656478569086] [49565:5734437] CHIP: [TOO] FeatureMap: 0 + [1660745929.334567][3657:3657] CHIP:IM: Received Read request + [1660745929.334641][3657:3657] CHIP:DMG: ReadRequestMessage = + [1660745929.334677][3657:3657] CHIP:DMG: { + [1660745929.334696][3657:3657] CHIP:DMG: AttributePathIBs = + [1660745929.334728][3657:3657] CHIP:DMG: [ + [1660745929.334750][3657:3657] CHIP:DMG: AttributePathIB = + [1660745929.334778][3657:3657] CHIP:DMG: { + [1660745929.334814][3657:3657] CHIP:DMG: Endpoint = 0x1, + [1660745929.334853][3657:3657] CHIP:DMG: Cluster = 0x200, + [1660745929.334884][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFC, + [1660745929.334920][3657:3657] CHIP:DMG: } + [1660745929.334947][3657:3657] CHIP:DMG: + [1660745929.334978][3657:3657] CHIP:DMG: ], + [1660745929.335006][3657:3657] CHIP:DMG: + [1660745929.335037][3657:3657] CHIP:DMG: isFabricFiltered = true, + [1660745929.335059][3657:3657] CHIP:DMG: InteractionModelRevision = 1 + [1660745929.335079][3657:3657] CHIP:DMG: }, + [1660745929.335155][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] + [1660745929.335256][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1660745929.335291][3657:3657] CHIP:DMG: Cluster 200, Attribute fffc is dirty + [1660745929.335311][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) ./chip-tool pumpconfigurationandcontrol read max-pressure 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148412.273866][2336:2336] CHIP:IM: Received Read request [1651148412.273922][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -782,7 +815,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-speed 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148440.471321][2336:2336] CHIP:IM: Received Read request [1651148440.471389][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -806,7 +839,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read max-flow 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651148472.518933][2336:2336] CHIP:IM: Received Read request [1651148472.518993][2336:2336] CHIP:DMG: ReadRequestMessage = @@ -830,7 +863,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read effective-operation-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651570515.206834][9246:9246] CHIP:IM: Received Read request @@ -853,7 +886,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read effective-control-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651570975.559213][9246:9246] CHIP:IM: Received Read request [1651570975.559268][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -872,7 +905,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read capacity 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571009.295069][9246:9246] CHIP:IM: Received Read request [1651571009.295158][9246:9246] CHIP:DMG: ReadRequestMessage = @@ -891,7 +924,7 @@ tests: ./chip-tool pumpconfigurationandcontrol read operation-mode 1 1 - Verify in DUT as client side Log + verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command [1651571334.617100][9337:9337] CHIP:IM: Received Read request [1651571334.617155][9337:9337] CHIP:DMG: ReadRequestMessage = diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_1.yaml index 3888005a6771b2..e92cba67a2088d 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_1.yaml @@ -28,6 +28,7 @@ tests: "DUT is Commissioned and put in Commissioning Mode using Open Basic Commissioning Window command and starts advertising Commissionable Node Discovery service using DNS-SD" + PICS: CADMIN.S.C01.Rsp verification: | ./chip-tool administratorcommissioning open-basic-commissioning-window 200 1 0 --timedInteractionTimeoutMs 1000 @@ -76,6 +77,7 @@ tests: MCORE.SC.DT_KEY&& MCORE.SC.DN_KEY && MCORE.SC.RI_KEY && MCORE.SC.PH_KEY && MCORE.SC.PI_KEY verification: | + Run the below commands within the mentioned time interval used in open-commissioning-window in step-1. Run the below avahi browse command in the TH terminal avahi-browse -rt _matterc._udp @@ -96,7 +98,7 @@ tests: - Service Domain 422F10CDC290A406.local + If we use Thread setup, then the Service Domain will be 422F10CDC290A406.local verify CM flag is 1 to look for subtypes, on the raspi run $ avahi-browse -p _services._dns-sd._udp | grep _matterc @@ -109,9 +111,10 @@ tests: disabled: true - label: - "DUT is rebooted and Commissioned again, then put in Commissioning - Mode using Open Basic Commissioning Window command, starting - advertising Commissionable Node Discovery service using DNS- SD" + "DUT is rebooted, then put in Commissioning Mode using Open Basic + Commissioning Window command, starting advertising Commissionable Node + Discovery service using DNS-SD" + PICS: CADMIN.S.C01.Rsp verification: | Reboot the device and commission the DUT again. Open the commissioning window using the below command in the TH (Chip-tool) terminal @@ -172,7 +175,7 @@ tests: + eth0 IPv6 19DDF06C3B5DD0C8 _matterc._udp local = veth721e1d9 IPv6 19DDF06C3B5DD0C8 _matterc._udp local - hostname = [E45F0149AE290000.local] + hostname = [E45F0149AE290000.local] address = [fe80::28e0:95ff:fed9:3085] port = [5540] txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] @@ -198,9 +201,15 @@ tests: +;eth0;IPv6;_CM;_sub._matterc._udp;local disabled: true + - label: "Wait for OBCW timeout to expire" + verification: | + Wait until open-basic-commissioning-window time to expire. + disabled: true + - label: "DUT is Commissioned and instructed to enter in commissioning mode using Open Commissioning Window command" + PICS: CADMIN.S.C00.Rsp verification: | Run the below open-commissioning-window in TH Terminal @@ -277,7 +286,7 @@ tests: - label: "Wait for OCW timeout to expire" verification: | - Wait until open-commissioning-window time to expire. (In our example above its 200 sec) + Wait until open-commissioning-window time to expire. disabled: true - label: "If (MCORE.SC.EXTENDED_DISCOVERY ) enable Extended Discovery" @@ -289,7 +298,8 @@ tests: Reference Raspberrypi device is not supporting extended discovery. disabled: true - - label: "If (PICS_EXTENDED_DISCOVERY) check DNS-SD subtypes used by DUT" + - label: + "If (MCORE.SC.EXTENDED_DISCOVERY ) check DNS-SD subtypes used by DUT" PICS: MCORE.SC.EXTENDED_DISCOVERY && MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && MCORE.SC.VENDOR_SUBTYPE && MCORE.SC.DEVTYPE_SUBTYPE 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 78cc1e21346212..5398b18c3430ec 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 @@ -28,13 +28,13 @@ config: tests: - label: "DUT is instructed to advertise its service" verification: | - verification step to be updated. + 1. Provision the DUT by TH (Chip-tool) disabled: true - label: "TH scans for DNS-SD advertising" verification: | avahi-browse -rt _matter._tcp - Verify on the TH Log: + Verify on the TH(Chip-tool) Log: + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local = eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local @@ -48,211 +48,3 @@ tests: port = [5540] txt = ["T=0" "SAI=300" "SII=5000"] disabled: true - - - label: "TH writes ACL entry by setting AuthMode as Group to 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 - - Verify success response on the TH Log: - - [1652330385.328196][3240:3245] CHIP:DMG: StatusIB = - [1652330385.328229][3240:3245] CHIP:DMG: { - [1652330385.328264][3240:3245] CHIP:DMG: status = 0x00 (SUCCESS), - [1652330385.328298][3240:3245] CHIP:DMG: }, - disabled: true - - - label: - "Admin generates fabric-unique GroupID, GroupName, random key, - EpochKey0 and GroupKeySetID. Admin sets GroupKeySecurityPolicy = - TrustFirst (1) GroupKeyMulticastPolicy = PerGroupID (0) - EpochStartTime0 = 0" - verification: | - As Admin generates it is not required to verify - disabled: true - - - label: - "Admin sends KeySetWrite command to GroupKeyManagement cluster to DUT - on PIXIT.G.ENDPOINT" - verification: | - ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, - "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 1 0 - - Verify success response on the TH Log: - - [1650610345.847233][2626:2631] CHIP:DMG: - [1650610345.847274][2626:2631] CHIP:DMG: StatusIB = - [1650610345.847317][2626:2631] CHIP:DMG: { - [1650610345.847383][2626:2631] CHIP:DMG: status = 0x00 (SUCCESS), - [1650610345.847429][2626:2631] CHIP:DMG: }, - [1650610345.847477][2626:2631] CHIP:DMG: - disabled: true - - - label: - "Admin binds GroupId with GroupKeySetID in the GroupKeyMap attribute - list on GroupKeyManagement cluster" - verification: | - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 1 0 - - Verify success response on the TH Log: - - [1652352019.875893][2552:2557] CHIP:DMG: WriteResponseMessage = - [1652352019.875922][2552:2557] CHIP:DMG: { - [1652352019.875946][2552:2557] CHIP:DMG: AttributeStatusIBs = - [1652352019.875981][2552:2557] CHIP:DMG: [ - [1652352019.876008][2552:2557] CHIP:DMG: AttributeStatusIB = - [1652352019.876041][2552:2557] CHIP:DMG: { - [1652352019.876070][2552:2557] CHIP:DMG: AttributePathIB = - [1652352019.876104][2552:2557] CHIP:DMG: { - [1652352019.876143][2552:2557] CHIP:DMG: Endpoint = 0x0, - [1652352019.876183][2552:2557] CHIP:DMG: Cluster = 0x3f, - [1652352019.876225][2552:2557] CHIP:DMG: Attribute = 0x0000_0000, - [1652352019.876263][2552:2557] CHIP:DMG: } - [1652352019.876303][2552:2557] CHIP:DMG: - [1652352019.876337][2552:2557] CHIP:DMG: StatusIB = - [1652352019.876375][2552:2557] CHIP:DMG: { - [1652352019.876414][2552:2557] CHIP:DMG: status = 0x00 (SUCCESS), - [1652352019.876450][2552:2557] CHIP:DMG: }, - [1652352019.876489][2552:2557] CHIP:DMG: - [1652352019.876519][2552:2557] CHIP:DMG: }, - [1652352019.876562][2552:2557] CHIP:DMG: - [1652352019.876590][2552:2557] CHIP:DMG: AttributeStatusIB = - [1652352019.876622][2552:2557] CHIP:DMG: { - [1652352019.876652][2552:2557] CHIP:DMG: AttributePathIB = - [1652352019.876690][2552:2557] CHIP:DMG: { - [1652352019.876728][2552:2557] CHIP:DMG: Endpoint = 0x0, - [1652352019.876768][2552:2557] CHIP:DMG: Cluster = 0x3f, - [1652352019.876809][2552:2557] CHIP:DMG: Attribute = 0x0000_0000, - [1652352019.876849][2552:2557] CHIP:DMG: ListIndex = Null, - [1652352019.876885][2552:2557] CHIP:DMG: } - [1652352019.876923][2552:2557] CHIP:DMG: - [1652352019.876961][2552:2557] CHIP:DMG: StatusIB = - [1652352019.876995][2552:2557] CHIP:DMG: { - [1652352019.877029][2552:2557] CHIP:DMG: status = 0x00 (SUCCESS), - [1652352019.877077][2552:2557] CHIP:DMG: }, - [1652352019.877132][2552:2557] CHIP:DMG: - [1652352019.877179][2552:2557] CHIP:DMG: }, - [1652352019.877224][2552:2557] CHIP:DMG: - [1652352019.877262][2552:2557] CHIP:DMG: ], - [1652352019.877339][2552:2557] CHIP:DMG: - [1652352019.877381][2552:2557] CHIP:DMG: InteractionModelRevision = 1 - [1652352019.877419][2552:2557] CHIP:DMG: } - disabled: true - - - label: - "Admin sends AddGroup Command to DUT with the GroupID set by Admin on - PIXIT.SC.ENDPOINT" - verification: | - ./chip-tool groups add-group 0x0001 grp1 1 1 - - Verify AddGroupResponse on the TH Log: - - [1651218084.427102][2526:2531] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 - [1651218084.427203][2526:2531] CHIP:TOO: AddGroupResponse: { - [1651218084.427241][2526:2531] CHIP:TOO: status: 0 - [1651218084.427264][2526:2531] CHIP:TOO: groupId: 1 - [1651218084.427314][2526:2531] CHIP:TOO: } - disabled: true - - - label: - "Admin sends ViewGroup command with the GroupID to the Group cluster - on the DUT on PIXIT.SC.ENDPOINT" - verification: | - ./chip-tool groups view-group 0x0001 1 1 - - Verify ViewGroupResponse on the TH Log: - - [1651218576.149152][2635:2640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 - [1651218576.149231][2635:2640] CHIP:TOO: ViewGroupResponse: { - [1651218576.149265][2635:2640] CHIP:TOO: status: 0 - [1651218576.149289][2635:2640] CHIP:TOO: groupId: 1 - [1651218576.149311][2635:2640] CHIP:TOO: groupName: grp1 - [1651218576.149335][2635:2640] CHIP:TOO: } - disabled: true - - - label: "Admin sends KeySetRead Command to DUT" - verification: | - ./chip-tool groupkeymanagement key-set-read 42 1 0 - - Verify KeySetReadResponse on the TH Log: - - [1650610759.578043][2739:2744] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003F Command=0x0000_0002 - [1650610759.578099][2739:2744] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Command 0x0000_0002 - [1650610759.578220][2739:2744] CHIP:TOO: KeySetReadResponse: { - [1650610759.578251][2739:2744] CHIP:TOO: groupKeySet: { - [1650610759.578291][2739:2744] CHIP:TOO: GroupKeySetID: 42 - [1650610759.578334][2739:2744] CHIP:TOO: GroupKeySecurityPolicy: 0 - [1650610759.578363][2739:2744] CHIP:TOO: EpochKey0: null - [1650610759.578391][2739:2744] CHIP:TOO: EpochStartTime0: 2220000 - [1650610759.578418][2739:2744] CHIP:TOO: EpochKey1: null - [1650610759.578445][2739:2744] CHIP:TOO: EpochStartTime1: 2220001 - [1650610759.578472][2739:2744] CHIP:TOO: EpochKey2: null - [1650610759.578498][2739:2744] CHIP:TOO: EpochStartTime2: 2220002 - [1650610759.578527][2739:2744] CHIP:TOO: } - [1650610759.578553][2739:2744] CHIP:TOO: } - disabled: true - - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster - from DUT" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - Verify GroupKeyMapStruct on the TH Log: - - 1652429573.936605][2883:2888] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 75110822 - [1652429573.936744][2883:2888] CHIP:TOO: GroupKeyMap: 1 entries - [1652429573.936819][2883:2888] CHIP:TOO: [1]: { - [1652429573.936860][2883:2888] CHIP:TOO: GroupId: 1 - [1652429573.936896][2883:2888] CHIP:TOO: GroupKeySetID: 42 - [1652429573.936932][2883:2888] CHIP:TOO: FabricIndex: 1 - [1652429573.936969][2883:2888] CHIP:TOO: } - disabled: true - - - label: - "TH reads GroupTable attribute from GroupKeyManagement cluster on DUT." - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable on the TH Log: - - [1655965817.917300][3012:3017] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1208492408 - [1655965817.917408][3012:3017] CHIP:TOO: GroupTable: 1 entries - [1655965817.917506][3012:3017] CHIP:TOO: [1]: { - [1655965817.917559][3012:3017] CHIP:TOO: GroupId: 1 - [1655965817.917600][3012:3017] CHIP:TOO: Endpoints: 2 entries - [1655965817.917642][3012:3017] CHIP:TOO: [1]: 0 - [1655965817.917680][3012:3017] CHIP:TOO: [2]: 1 - [1655965817.917718][3012:3017] CHIP:TOO: GroupName: grp1 - [1655965817.917752][3012:3017] CHIP:TOO: FabricIndex: 1 - [1655965817.917784][3012:3017] CHIP:TOO: } - disabled: true - - - label: - "Configure the TH for sending Group message Add the group that was - created in step 3 to the client side Add the keysets with the - GroupKeySetID from the step 2 for the client side Bind the - GroupKeySetID with the GroupID created View the GroupID, GroupName and - GroupKeySetID which is binded for sending the Group message" - verification: | - ./chip-tool groupsettings add-group grp1 0x0001 - - ./chip-tool groupsettings add-keysets 0x0042 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf - - ./chip-tool groupsettings bind-keyset 0x0001 0x0042 - - ./chip-tool groupsettings show-groups - - Verify groups on the TH Log: - - +-------------------------------------------------------------------------------------+ - | Available Groups : | - +-------------------------------------------------------------------------------------+ - | Group Id | KeySet Id | Group Name | - | 0x101 0x1a1 Group #1 | - | 0x102 0x1a2 Group #2 | - | 0x1 0x42 grp1 | - +-------------------------------------------------------------------------------------+ - disabled: true 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 e0f8cda7051c3b..887f256cbbc1db 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: 3.4.3. [TC-SC-4.3] Operational Discovery - Node +name: 15.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -24,9 +24,11 @@ config: endpoint: 0 tests: - - label: "TH is instructed to start advertising a service using DNS-SD" + - label: + "DUT is commissioned to TH and DUT is instructed to advertise its + operational service (_matter._tcp)." verification: | - verification step to be updated. + 1. Provision the DUT by TH (Chip-tool) disabled: true - label: "Scan for DNS-SD advertising" @@ -35,9 +37,7 @@ tests: MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.T_KEY verification: | - ubuntu@ubuntu:~$ avahi-browse -rt _matter._tcp - - Verify on the TH Log: + avahi-browse -rt _matter._tcp + veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local = veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local @@ -46,49 +46,3 @@ tests: port = [5540] txt = ["T=1" "SAI=300" "SII=5000"] disabled: true - - - label: - "TH is instructed to start advertising an operational service using - DNS-SD with non-standard TXT record keys" - verification: | - Run the publish service command on TH: - - avahi-publish-service --subtype=_S3._sub._matter._tcp --subtype=_L840._sub._matter._tcp DD200C20D25AE5F7 --subtype=_CM._sub._matter._tcp _matter._tcp 11111 D=840 CM=2 INVALID_TEST=40 - disabled: true - - - label: - "DUT is rebooted and Commissioned again, then put in Commissioning - Mode using Open Basic Commissioning Window command, DUT is instructed - to advertise its service with the modified TXT record." - verification: | - ./chip-tool administratorcommissioning open-basic-commissioning-window 200 1 0 --timedInteractionTimeoutMs 1000 - - verify on TH (Chip-tool) logs: - - [1650873075.234374][7964:7969] CHIP:DMG: EndpointId = 0x0, - [1650873075.234449][7964:7969] CHIP:DMG: ClusterId = 0x3c, - [1650873075.234542][7964:7969] CHIP:DMG: CommandId = 0x1, - [1650873075.234613][7964:7969] CHIP:DMG: }, - [1650873075.234693][7964:7969] CHIP:DMG: - [1650873075.234758][7964:7969] CHIP:DMG: StatusIB = - [1650873075.234829][7964:7969] CHIP:DMG: { - [1650873075.234909][7964:7969] CHIP:DMG: status = 0x00 (SUCCESS), - [1650873075.234984][7964:7969] CHIP:DMG: }, - disabled: true - - - label: "Scan for DNS-SD advertising" - PICS: - MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && - MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && - MCORE.SC.T_KEY - verification: | - ubuntu@ubuntu:~$ avahi-browse -rt _matter._tcp - Verify on the TH Log: - - + eth0 IPv6 B1605B84E886EDCF-0000000000000258 _matter._tcp local - = eth0 IPv6 21F41C9933CAAF62-000000000000003C _matter._tcp local - hostname = [E45F010EBE440000.local] - address = [fe80::e65f:1ff:fe0e:be44] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - disabled: true 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 aa9d9da7d7d8da..0703e6c8f9b512 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: 3.4.4. [TC-SC-4.4] Operational Discovery - Controller [DUT - Controller] +name: 15.4.4. [TC-SC-4.4] Discovery [DUT as Controller] PICS: - PICS_MCORE_ROLE_CONTROLLER @@ -24,28 +24,89 @@ 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: "TH starts commissioning process with DUT" verification: | - verification step to be updated. + 1. Provision the DUT by TH (Chip-tool) disabled: true - - label: "DUT reads nodelabel attribute from TH" - PICS: BINFO.C.A0005 + - label: "DUT reads Vendor Id attribute from TH" + PICS: BINFO.C.A0002 verification: | - verification step to be updated. + On TH, Verify that TH read and shows Vendor Id value + ./chip-tool basic read vendor-id 1 0 + + [1660776352.802689][3357:3357] CHIP:DMG: + [1660776352.802776][3357:3357] CHIP:DMG: ReportDataMessage = + [1660776352.802807][3357:3357] CHIP:DMG: { + [1660776352.802832][3357:3357] CHIP:DMG: AttributeReportIBs = + [1660776352.802868][3357:3357] CHIP:DMG: [ + [1660776352.802896][3357:3357] CHIP:DMG: AttributeReportIB = + [1660776352.802933][3357:3357] CHIP:DMG: { + [1660776352.802963][3357:3357] CHIP:DMG: AttributeDataIB = + [1660776352.802999][3357:3357] CHIP:DMG: { + [1660776352.803040][3357:3357] CHIP:DMG: DataVersion = 0x5c6f4557, + [1660776352.803080][3357:3357] CHIP:DMG: AttributePathIB = + [1660776352.803118][3357:3357] CHIP:DMG: { + [1660776352.803157][3357:3357] CHIP:DMG: Endpoint = 0x0, + [1660776352.803198][3357:3357] CHIP:DMG: Cluster = 0x28, + [1660776352.803241][3357:3357] CHIP:DMG: Attribute = 0x0000_0002, + [1660776352.803279][3357:3357] CHIP:DMG: } + [1660776352.803319][3357:3357] CHIP:DMG: + [1660776352.803360][3357:3357] CHIP:DMG: Data = 65521, + [1660776352.803396][3357:3357] CHIP:DMG: }, + [1660776352.803434][3357:3357] CHIP:DMG: + [1660776352.803468][3357:3357] CHIP:DMG: }, + [1660776352.803503][3357:3357] CHIP:DMG: + [1660776352.803530][3357:3357] CHIP:DMG: ], + [1660776352.803571][3357:3357] CHIP:DMG: + [1660776352.803600][3357:3357] CHIP:DMG: SuppressResponse = true, + [1660776352.803628][3357:3357] CHIP:DMG: InteractionModelRevision = 1 + [1660776352.803655][3357:3357] CHIP:DMG: } + [1660776352.803699][3357:3357] CHIP:DMG: disabled: true - label: "Change the IP address of TH by any means within the same network" verification: | - 1. Take two routers connected to the same ISP as input. - 2. Execute step 1 to step 5 using Router1 Configuration. - 3. Once step 1 to step 5 are executed in Router1 switch TH and DUT to Router2. - 4. Execute step 1 to step 5 using Router2 Configuration. - 5. Check the IP so that the Routers(Router1 and Router2) will have different IPs to Raspi. + Connect the raspi running the TH to another router which is on the same network. Make sure that the DUT and TH are on the same network and can ping to each other. Observe that the TH gets a new IP address. Perform Step 4 disabled: true - - label: "DUT reads nodelabel attribute from TH" - PICS: BINFO.C.A0005 + - label: "DUT reads Vendor Id attribute from TH" + PICS: BINFO.C.A0002 verification: | - verification step to be updated. + On TH, Verify that TH read and shows Vendor Id value + ./chip-tool basic read vendor-id 1 0 + + [1660776352.802689][3357:3357] CHIP:DMG: + [1660776352.802776][3357:3357] CHIP:DMG: ReportDataMessage = + [1660776352.802807][3357:3357] CHIP:DMG: { + [1660776352.802832][3357:3357] CHIP:DMG: AttributeReportIBs = + [1660776352.802868][3357:3357] CHIP:DMG: [ + [1660776352.802896][3357:3357] CHIP:DMG: AttributeReportIB = + [1660776352.802933][3357:3357] CHIP:DMG: { + [1660776352.802963][3357:3357] CHIP:DMG: AttributeDataIB = + [1660776352.802999][3357:3357] CHIP:DMG: { + [1660776352.803040][3357:3357] CHIP:DMG: DataVersion = 0x5c6f4557, + [1660776352.803080][3357:3357] CHIP:DMG: AttributePathIB = + [1660776352.803118][3357:3357] CHIP:DMG: { + [1660776352.803157][3357:3357] CHIP:DMG: Endpoint = 0x0, + [1660776352.803198][3357:3357] CHIP:DMG: Cluster = 0x28, + [1660776352.803241][3357:3357] CHIP:DMG: Attribute = 0x0000_0002, + [1660776352.803279][3357:3357] CHIP:DMG: } + [1660776352.803319][3357:3357] CHIP:DMG: + [1660776352.803360][3357:3357] CHIP:DMG: Data = 65521, + [1660776352.803396][3357:3357] CHIP:DMG: }, + [1660776352.803434][3357:3357] CHIP:DMG: + [1660776352.803468][3357:3357] CHIP:DMG: }, + [1660776352.803503][3357:3357] CHIP:DMG: + [1660776352.803530][3357:3357] CHIP:DMG: ], + [1660776352.803571][3357:3357] CHIP:DMG: + [1660776352.803600][3357:3357] CHIP:DMG: SuppressResponse = true, + [1660776352.803628][3357:3357] CHIP:DMG: InteractionModelRevision = 1 + [1660776352.803655][3357:3357] CHIP:DMG: } + [1660776352.803699][3357:3357] CHIP:DMG: disabled: true 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 f5cf0c10623f3a..9e6781ff6b32a8 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: 3.4.7. [TC-SC-4.7] Commissioner Discovery - Commissionee +name: 15.4.7. [TC-SC-4.7] Commissioner Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -34,7 +34,7 @@ tests: - label: "Scan for DNS-SD commissioner advertisements from TH" PICS: MCORE.SC.DEVTYPE_SUBTYPE && MCORE.SC.VP_KEY && MCORE.SC.DT_KEY && - MCORE.SC.DN_KEY && + MCORE.SC.DN_KEY verification: | if DUT supports discovering UDC, DUT should be able to scan the TV-app @@ -49,20 +49,20 @@ tests: address = [fe80::e65f:1ff:fe49:ae29] port = [5650] txt = ["T=1" "SAI=300" "SII=5000" "DN=Test TV" "DT=35" "VP=65521+32769"] - disabled: true - - label: - "By any means, TH adds an unknown key/value pair in the advertised - data(e.g. AB=12345)" - verification: | - Run the unknown key/value pair on TH Terminal: + to look for subtypes, on the raspi run $ a avahi-browse -p _services._dns-sd._udp | grep _matterd - avahi-publish-service --subtype=_V123._sub._matterd._udp DD200C20D25AE5F7 _matterd._udp 33333 VP=123+456 DT=35 DN="Living Room TV" INVALID_TEST=40 + +;wlan0;IPv6;_T35;_sub._matterd._udp;local + +;wlan0;IPv6;_V65521;_sub._matterd._udp;local + +;wlan0;IPv6;_matterd;_udp;local + +;eth0;IPv6;_T35;_sub._matterd._udp;local + +;eth0;IPv6;_V65521;_sub._matterd._udp;local + +;eth0;IPv6;_matterd;_udp;local disabled: true - label: "Scan for DNS-SD commissioner advertisements from TH" verification: | - Verify the DUT commissioner is able to discover the TH. + Verify the DUT is able to discover the TH. As an example, In the case of chip-tool as commissioner, you can verify with the below command, (Use the equivalent command on the DUT) @@ -73,24 +73,37 @@ tests: [1659544548031] [13752:9267297] CHIP: [DIS] Mdns: OnBrowseAdd name: DD200C20D25AE5F7, type: _matterc._udp., domain: local., interface: 8 [1659544548031] [13752:9267297] CHIP: [DIS] Resolve type=_matterc._udp name=DD200C20D25AE5F7 interface=8 [1659544548032] [13752:9267297] CHIP: [DIS] Mdns : OnNewInterface hostname:ubuntuserverAccessory1.local. fullname:DD200C20D25AE5F7._matterc._udp.local. interface: 8 port: 26411 TXT:D=840CM=2INVALID_TEST=40 [1659544548033] [13752:9267297] CHIP: [DIS] Mdns: OnNewAddress interface: 8 ip:fd5d:9cc0:fc52:0:dea6:32ff:fe8d:7072 [1659544548033] [13752:9267297] CHIP: [DIS] Mdns: Resolve success on interface 8 - [1659544548033] [13752:9267297] CHIP: [DIS] Discovered node: - [1659544548033] [13752:9267297] CHIP: [DIS] Hostname: ubuntuserverAcce [1659544548033] [13752:9267297] CHIP: [DIS] IP Address #1: fd5d:9cc0:fc52:0:dea6:32ff:fe8d:7072 - [1659544548033] [13752:9267297] CHIP: [DIS] Port: 11111 - [1659544548033] [13752:9267297] CHIP: [DIS] Mrp Interval idle: not present - [1659544548033] [13752:9267297] CHIP: [DIS] Mrp Interval active: not present - [1659544548033] [13752:9267297] CHIP: [DIS] TCP Supported: 0 - [1659544548033] [13752:9267297] CHIP: [DIS] Long Discriminator: 840 - [1659544548033] [13752:9267297] CHIP: [DIS] Instance Name: DD200C20D25AE5F7 - [1659544548033] [13752:9267297] CHIP: [DIS] Commissioning Mode: 2 - [1659544548033] [13752:9267297] CHIP: [DIS] Discovered node: - [1659544548033] [13752:9267297] CHIP: [DIS] Hostname: ubuntuserverAcce [1659544548033] [13752:9267297] CHIP: [DIS] IP Address #1: fd5d:9cc0:fc52:0:dea6:32ff:fe8d:7072 - [1659544548033] [13752:9267297] CHIP: [DIS] Port: 11111 - [1659544548033] [13752:9267297] CHIP: [DIS] Mrp Interval idle: not present - [1659544548033] [13752:9267297] CHIP: [DIS] Mrp Interval active: not present - [1659544548033] [13752:9267297] CHIP: [DIS] TCP Supported: 0 - [1659544548033] [13752:9267297] CHIP: [DIS] Long Discriminator: 840 - [1659544548033] [13752:9267297] CHIP: [DIS] Instance Name: DD200C20D25AE5F7 - [1659544548033] [13752:9267297] CHIP: [DIS] Commissioning Mode: 2 + [1660288371.031350][3364:3369] CHIP:DIS: Discovered node: + [1660288371.031374][3364:3369] CHIP:DIS: Hostname: E45F0149AE290000 [1660288371.031402][3364:3369] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe49:ae29 + [1660288371.031427][3364:3369] CHIP:DIS: Port: 5640 + [1660288371.031450][3364:3369] CHIP:DIS: Mrp Interval idle: 5000 ms + [1660288371.031473][3364:3369] CHIP:DIS: Mrp Interval active: 300 ms + [1660288371.031496][3364:3369] CHIP:DIS: TCP Supported: 1 + [1660288371.031521][3364:3369] CHIP:DIS: Rotating ID: 01005FDB39737473FB22B819CEBB1084AFD5 + [1660288371.031544][3364:3369] CHIP:DIS: Device Name: Test TV + [1660288371.031566][3364:3369] CHIP:DIS: Vendor ID: 65521 + [1660288371.031589][3364:3369] CHIP:DIS: Product ID: 32769 + [1660288371.031609][3364:3369] CHIP:DIS: Device Type: 35 + [1660288371.031628][3364:3369] CHIP:DIS: Long Discriminator: 3840 + [1660288371.031647][3364:3369] CHIP:DIS: Pairing Hint: 36 + [1660288371.031669][3364:3369] CHIP:DIS: Instance Name: 35025D5C5DA30C17 + [1660288371.031694][3364:3369] CHIP:DIS: Commissioning Mode: 0 + [1660288371.031722][3364:3369] CHIP:DIS: Discovered node: + [1660288371.031743][3364:3369] CHIP:DIS: Hostname: E45F0149AE290000 [1660288371.031768][3364:3369] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe49:ae29 + [1660288371.031791][3364:3369] CHIP:DIS: Port: 5640 + [1660288371.031814][3364:3369] CHIP:DIS: Mrp Interval idle: 5000 ms + [1660288371.031836][3364:3369] CHIP:DIS: Mrp Interval active: 300 ms + [1660288371.031859][3364:3369] CHIP:DIS: TCP Supported: 1 + [1660288371.031888][3364:3369] CHIP:DIS: Rotating ID: 01005FDB39737473FB22B819CEBB1084AFD5 + [1660288371.031909][3364:3369] CHIP:DIS: Device Name: Test TV + [1660288371.031928][3364:3369] CHIP:DIS: Vendor ID: 65521 + [1660288371.031950][3364:3369] CHIP:DIS: Product ID: 32769 + [1660288371.031973][3364:3369] CHIP:DIS: Device Type: 35 + [1660288371.031995][3364:3369] CHIP:DIS: Long Discriminator: 3840 + [1660288371.032018][3364:3369] CHIP:DIS: Pairing Hint: 36 + [1660288371.032042][3364:3369] CHIP:DIS: Instance Name: 35025D5C5DA30C17 + [1660288371.032064][3364:3369] CHIP:DIS: Commissioning Mode: 0 + [1659544578034] [13752:9267291] CHIP: [CTL] Shutting down the commissioner [1659544578034] [13752:9267291] CHIP: [CTL] Stopping commissioning discovery over DNS-SD [1659544578034] [13752:9267291] CHIP: [CTL] Shutting down the controller diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml index 0a18301fb30716..ac51168f2d9a1e 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -24,30 +24,23 @@ config: endpoint: 0 tests: - - label: "Commission DUT to TH (can be skipped if done in a preceding test)" + - label: "Note" verification: | - + NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux#readme + Events to be executed as following + 1. Compile app using below command in connectedhomeip folder + a. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build + b. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build + 2. Build respective app (all-clusters-app) + 3. Commission DUT to TH + 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT + ps -aef|grep all-clusters-app + 5. Follow the Verification step below to generate the event in 2nd terminal of DUT disabled: true - label: "Commission DUT to TH (can be skipped if done in a preceding test)" verification: | - NOTE: - To Run the event test case we need to build event commands on DUT[All-cluster-ap] terminal.Below I mention the commands for how to build for linux arm64 it depends on the DUT what we use.I provided the link for build events. - - https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux#trigger-switch-events - - - - - Here I provide cmmds for build on linux arm64 - - 1. ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build - - 2../scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build - - 3. ./out/linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang/chip-all-clusters-app-fuzzing - - 4. ./out/linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang/chip-all-clusters-app-fuzzing $(INPUT_FILE) + Commission DUT to TH disabled: true - label: "Set up subscription to SwitchLatched event" @@ -127,7 +120,6 @@ tests: - label: "If NumberOfPositions>2 (see 2c of TC-SWTCH-2.1) : - Operator sets switch to next position - Read CurrentPosition attribute" - PICS: SWTCH.S.F00 verification: | Raspi device doesn"t support more than 2 position ,so this step is not verifiable by using raspi device @@ -877,6 +869,9 @@ tests: [1659696223.568397][3981:3986] CHIP:TOO: } + In Raspi platform to change the switch position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + + echo "{"Name":"MultiPressOngoing","previousPosition":1,"CurrentNumberOfPressesCounted":3}" > /tmp/chip_all_clusters_fifo- (PID of DUT) Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- @@ -888,7 +883,7 @@ tests: [1659695330.923283][3912:3918] CHIP:TOO: Priority: Info [1659695330.923302][3912:3918] CHIP:TOO: Timestamp: 17754336 [1659695330.923326][3912:3918] CHIP:TOO: MultiPressComplete: { - [1659695330.923346][3912:3918] CHIP:TOO: PrevioiusPosition: 1 + [1659695330.923346][3912:3918] CHIP:TOO: PreviousPosition: 1 [1659695330.923366][3912:3918] CHIP:TOO: TotalNumberOfPressesCounted: 3 [1659695330.923385][3912:3918] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml index 57f53c5fb9b412..7a302ef34271d6 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml @@ -31,22 +31,16 @@ tests: - label: "Note" verification: | - To Run the event test case we need to build event commands on DUT[All-cluster-ap] side.Below I mention the commands for how to build for linux arm64 it depends on the DUT what we use.I provided the link for build events. - - https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux#trigger-switch-events - - - - - Here I provide cmmds for build on linux arm64 - - 1. ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build - - 2../scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build - - 3. ./out/linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang/chip-all-clusters-app-fuzzing - - 4. ./out/linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang/chip-all-clusters-app-fuzzing $(INPUT_FILE) + NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux#readme + Events to be executed as following + 1. Compile app using below command in connectedhomeip folder + a. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build + b. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build + 2. Build respective app (all-clusters-app) + 3. Commission DUT to TH + 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT + ps -aef|grep all-clusters-app + 5. Follow the Verification step below to generate the event in 2nd terminal of DUT disabled: true - label: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 67322305f85885..1e7cf4e8e128fa 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1668,3 +1668,15 @@ MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Integer=1 MCORE.IDM.C.SubscribeRequest.Attribute.DataType_FloatingPoint=1 MCORE.IDM.C.SubscribeRequest.Attribute.DataType_List=1 MCORE.IDM.S.LargeData=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_Bool=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_String=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_UnsignedInteger=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_SignedInteger=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_Struct=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_FloatingPoint=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_List=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_OctetString=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_Enum=1 +MCORE.IDM.C.WriteRequest.Attribute.DataType_Bitmap=1 +MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool=1 +MCORE.IDM.C.SubscribeRequest.MultipleAttributes=1 diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index bfa3a7e67cf84e..0dbf826cca2bee 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -245,8 +245,7 @@ "Test_TC_OCC_2_2", "Test_TC_OCC_2_3", "Test_TC_OCC_2_4", - "Test_TC_OCC_3_1", - "Test_TC_OCC_3_2" + "Test_TC_OCC_3_1" ], "PressureMeasurement": ["Test_TC_PRS_3_1"], "PowerSource": ["Test_TC_PS_2_2", "Test_TC_PS_3_1"], diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 93aea4dc646cd1..da80f584197147 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -494,7 +494,6 @@ class ManualTestList : public Command printf("Test_TC_OCC_2_3\n"); printf("Test_TC_OCC_2_4\n"); printf("Test_TC_OCC_3_1\n"); - printf("Test_TC_OCC_3_2\n"); printf("Test_TC_PRS_3_1\n"); printf("Test_TC_PS_2_2\n"); printf("Test_TC_PS_3_1\n"); @@ -89775,62 +89774,6 @@ class Test_TC_OCC_3_1Suite : public TestCommand } }; -class Test_TC_OCC_3_2Suite : public TestCommand -{ -public: - Test_TC_OCC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_PRS_3_1Suite : public TestCommand { public: @@ -100651,7 +100594,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), From c517ba2e70ec0a2f886e83748e4a7414024a6509 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 18 Aug 2022 09:48:09 -0700 Subject: [PATCH 070/115] CertificateAuthority + Manager support in Python (#21981) * CertificateAuthority + Manager support in Python This shifts the logic in the existing FabricAdmin that manages a given Root CA to its own CertificateAuthority class. This now permits a more spec-aligned structure that has a CertificateAuthorityManager that manages a set of CertificateAuthority instances, each associated with a single Root PK. Each of those manages a list of FabricAdmins adminstering a fabric within that CA, which in turn manage a list of ChipDeviceController instances within that fabric. These now permit passing in separate PersistentStorage instances so that it is more flexible/easier to sand-box each CA's storage constructs, which makes it easier to integrate with chip-tool's INI files. The PersistentStorage construct has been updated to permit both storage to file as well as just a 'soft' cache. * Review feedback --- scripts/tools/convert_ini.py | 70 +++-- src/controller/python/BUILD.gn | 1 + .../ChipDeviceController-ScriptBinding.cpp | 44 ++- src/controller/python/OpCredsBinding.cpp | 12 +- .../python/chip/CertificateAuthority.py | 291 ++++++++++++++++++ src/controller/python/chip/ChipDeviceCtrl.py | 8 +- src/controller/python/chip/ChipReplStartup.py | 85 ++--- src/controller/python/chip/ChipStack.py | 4 +- src/controller/python/chip/FabricAdmin.py | 183 ++++------- .../python/chip/storage/__init__.py | 162 +++++++--- .../python/test/test_scripts/base.py | 24 +- src/python_testing/TC_SC_3_6.py | 4 +- src/python_testing/matter_testing_support.py | 49 +-- 13 files changed, 610 insertions(+), 327 deletions(-) create mode 100644 src/controller/python/chip/CertificateAuthority.py diff --git a/scripts/tools/convert_ini.py b/scripts/tools/convert_ini.py index a8c17157ffd802..d1abd22c4498df 100755 --- a/scripts/tools/convert_ini.py +++ b/scripts/tools/convert_ini.py @@ -21,6 +21,8 @@ import click import typing import re +from os.path import exists +import logging def convert_ini_to_json(ini_dir: str, json_path: str): @@ -32,39 +34,55 @@ def convert_ini_to_json(ini_dir: str, json_path: str): """ python_json_store = {} - python_json_store['repl-config'] = { - 'fabricAdmins': { - '1': { - 'fabricId': 1, - 'vendorId': 65521 - }, - '2': { - 'fabricId': 2, - 'vendorId': 65521 - }, - '3': { - 'fabricId': 3, - 'vendorId': 65521 - } - } - } - - python_json_store['sdk-config'] = {} - - load_ini_into_dict(ini_file=ini_dir + '/chip_tool_config.alpha.ini', - json_dict=python_json_store['sdk-config'], replace_suffix='1') - load_ini_into_dict(ini_file=ini_dir + '/chip_tool_config.beta.ini', - json_dict=python_json_store['sdk-config'], replace_suffix='2') - load_ini_into_dict(ini_file=ini_dir + '/chip_tool_config.gamma.ini', - json_dict=python_json_store['sdk-config'], replace_suffix='3') + ini_file_paths = ['/chip_tool_config.alpha.ini', '/chip_tool_config.beta.ini', '/chip_tool_config.gamma.ini'] + counter = 1 + + for path in ini_file_paths: + full_path = ini_dir + path + if (exists(full_path)): + logging.critical(f"Found chip tool INI file at: {full_path} - Converting...") + create_repl_config_from_init(ini_file=full_path, + json_dict=python_json_store, replace_suffix=str(counter)) + counter = counter + 1 json_file = open(json_path, 'w') json.dump(python_json_store, json_file, ensure_ascii=True, indent=4) +def create_repl_config_from_init(ini_file: str, json_dict: typing.Dict, replace_suffix: str): + ''' This updates a provided JSON dictionary to create a REPL compliant configuration store that + contains the correct 'repl-config' and 'sdk-config' keys built from the provided chip-tool + INI file that contains the root public keys. The INI file will typically be named + with the word 'alpha', 'beta' or 'gamma' in the name. + + ini_file: Path to source INI file + json_dict: JSON dictionary to be updated. Multiple passes through this function using + the same dictionary is possible. + replace_suffix: The credentials in the INI file typically have keys that end with 0. This suffix + can be replaced with a different number. + ''' + if ('repl-config' not in json_dict): + json_dict['repl-config'] = {} + + if ('caList' not in json_dict['repl-config']): + json_dict['repl-config']['caList'] = {} + + json_dict['repl-config']['caList'][replace_suffix] = [ + {'fabricId': int(replace_suffix), 'vendorId': 0XFFF1} + ] + + if ('sdk-config' not in json_dict): + json_dict['sdk-config'] = {} + + load_ini_into_dict(ini_file=ini_file, json_dict=json_dict['sdk-config'], replace_suffix=replace_suffix) + + def load_ini_into_dict(ini_file: str, json_dict: typing.Dict, replace_suffix: str): - """ Loads the specific INI file into the provided dictionary. A 'replace_suffix' string + """ Loads the specific INI file containing CA credential information into the provided dictionary. A 'replace_suffix' string has to be provided to convert the existing numerical suffix to a different value. + + NOTE: This does not do any conversion of the keys into a format acceptable by the Python REPL environment. Please see + create_repl_config_from_init above if that is desired. """ config = ConfigParser() diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index ab84ff86c864cf..21897af175f92d 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -185,6 +185,7 @@ chip_python_wheel_action("chip-core") { { src_dir = "." sources = [ + "chip/CertificateAuthority.py", "chip/ChipBleBase.py", "chip/ChipBleUtility.py", "chip/ChipBluezMgr.py", diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 7a4189a52680d2..6e74ded2cd8a32 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -100,7 +100,6 @@ chip::Controller::CommissioningParameters sCommissioningParameters; chip::Controller::ScriptDevicePairingDelegate sPairingDelegate; chip::Controller::ScriptPairingDeviceDiscoveryDelegate sPairingDeviceDiscoveryDelegate; -chip::Controller::Python::StorageAdapter * sStorageAdapter = nullptr; chip::Credentials::GroupDataProviderImpl sGroupDataProvider; chip::Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; @@ -111,7 +110,7 @@ chip::NodeId kDefaultLocalDeviceId = chip::kTestControllerNodeId; chip::NodeId kRemoteDeviceId = chip::kTestDeviceNodeId; extern "C" { -ChipError::StorageType pychip_DeviceController_StackInit(); +ChipError::StorageType pychip_DeviceController_StackInit(Controller::Python::StorageAdapter * storageAdapter); ChipError::StorageType pychip_DeviceController_StackShutdown(); ChipError::StorageType pychip_DeviceController_NewDeviceController(chip::Controller::DeviceCommissioner ** outDevCtrl, @@ -205,43 +204,40 @@ chip::ChipError::StorageType pychip_InteractionModel_ShutdownSubscription(Subscr // // Storage // -void pychip_Storage_InitializeStorageAdapter(chip::Controller::Python::PyObject * context, - chip::Controller::Python::SyncSetKeyValueCb setCb, - chip::Controller::Python::SetGetKeyValueCb getCb, - chip::Controller::Python::SyncDeleteKeyValueCb deleteCb); -void pychip_Storage_ShutdownAdapter(); +void * pychip_Storage_InitializeStorageAdapter(chip::Controller::Python::PyObject * context, + chip::Controller::Python::SyncSetKeyValueCb setCb, + chip::Controller::Python::SetGetKeyValueCb getCb, + chip::Controller::Python::SyncDeleteKeyValueCb deleteCb); +void pychip_Storage_ShutdownAdapter(chip::Controller::Python::StorageAdapter * storageAdapter); } -void pychip_Storage_InitializeStorageAdapter(chip::Controller::Python::PyObject * context, - chip::Controller::Python::SyncSetKeyValueCb setCb, - chip::Controller::Python::SetGetKeyValueCb getCb, - chip::Controller::Python::SyncDeleteKeyValueCb deleteCb) +void * pychip_Storage_InitializeStorageAdapter(chip::Controller::Python::PyObject * context, + chip::Controller::Python::SyncSetKeyValueCb setCb, + chip::Controller::Python::SetGetKeyValueCb getCb, + chip::Controller::Python::SyncDeleteKeyValueCb deleteCb) { - sStorageAdapter = new chip::Controller::Python::StorageAdapter(context, setCb, getCb, deleteCb); + auto ptr = new chip::Controller::Python::StorageAdapter(context, setCb, getCb, deleteCb); + return ptr; } -void pychip_Storage_ShutdownAdapter() +void pychip_Storage_ShutdownAdapter(chip::Controller::Python::StorageAdapter * storageAdapter) { - delete sStorageAdapter; + delete storageAdapter; } -chip::Controller::Python::StorageAdapter * pychip_Storage_GetStorageAdapter() +ChipError::StorageType pychip_DeviceController_StackInit(Controller::Python::StorageAdapter * storageAdapter) { - return sStorageAdapter; -} - -ChipError::StorageType pychip_DeviceController_StackInit() -{ - VerifyOrDie(sStorageAdapter != nullptr); + VerifyOrDie(storageAdapter != nullptr); FactoryInitParams factoryParams; - factoryParams.fabricIndependentStorage = sStorageAdapter; - sGroupDataProvider.SetStorageDelegate(sStorageAdapter); + factoryParams.fabricIndependentStorage = storageAdapter; + + sGroupDataProvider.SetStorageDelegate(storageAdapter); ReturnErrorOnFailure(sGroupDataProvider.Init().AsInteger()); factoryParams.groupDataProvider = &sGroupDataProvider; - ReturnErrorOnFailure(sPersistentStorageOpCertStore.Init(sStorageAdapter).AsInteger()); + ReturnErrorOnFailure(sPersistentStorageOpCertStore.Init(storageAdapter).AsInteger()); factoryParams.opCertStore = &sPersistentStorageOpCertStore; factoryParams.enableServerInteractions = true; diff --git a/src/controller/python/OpCredsBinding.cpp b/src/controller/python/OpCredsBinding.cpp index a17f726a314bc4..fa779e3d383fc0 100644 --- a/src/controller/python/OpCredsBinding.cpp +++ b/src/controller/python/OpCredsBinding.cpp @@ -97,7 +97,6 @@ class OperationalCredentialsAdapter : public OperationalCredentialsDelegate } // namespace Controller } // namespace chip -extern chip::Controller::Python::StorageAdapter * pychip_Storage_GetStorageAdapter(); extern chip::Credentials::GroupDataProviderImpl sGroupDataProvider; extern chip::Controller::ScriptDevicePairingDelegate sPairingDelegate; @@ -291,17 +290,13 @@ struct OpCredsContext void * mPyContext; }; -void * pychip_OpCreds_InitializeDelegate(void * pyContext, uint32_t fabricCredentialsIndex) +void * pychip_OpCreds_InitializeDelegate(void * pyContext, uint32_t fabricCredentialsIndex, + Controller::Python::StorageAdapter * storageAdapter) { auto context = Platform::MakeUnique(); context->mAdapter = Platform::MakeUnique(fabricCredentialsIndex); - if (pychip_Storage_GetStorageAdapter() == nullptr) - { - return nullptr; - } - - if (context->mAdapter->Initialize(*pychip_Storage_GetStorageAdapter()) != CHIP_NO_ERROR) + if (context->mAdapter->Initialize(*storageAdapter) != CHIP_NO_ERROR) { return nullptr; } @@ -339,6 +334,7 @@ ChipError::StorageType pychip_OpCreds_AllocateController(OpCredsContext * contex { paaTrustStorePath = "./credentials/development/paa-root-certs"; } + ChipLogProgress(Support, "Using device attestation PAA trust store path %s.", paaTrustStorePath); // Initialize device attestation verifier diff --git a/src/controller/python/chip/CertificateAuthority.py b/src/controller/python/chip/CertificateAuthority.py new file mode 100644 index 00000000000000..aa9011fb60a250 --- /dev/null +++ b/src/controller/python/chip/CertificateAuthority.py @@ -0,0 +1,291 @@ +# +# 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. +# + +# Needed to use types in type hints before they are fully defined. +from __future__ import annotations + +import ctypes +from dataclasses import dataclass, field +from typing import * +from ctypes import * +from rich.pretty import pprint +import json +import logging +import builtins +import base64 +import chip.exceptions +from chip import ChipDeviceCtrl +from chip import ChipStack +from chip import FabricAdmin +from chip.storage import PersistentStorage + + +class CertificateAuthority: + ''' This represents an operational Root Certificate Authority (CA) with a root key key pair with associated public key (i.e "Root PK") . This manages + a set of FabricAdmin objects, each administering a fabric identified by a unique FabricId scoped to it. + + Each CertificateAuthority instance is tied to a 'CA index' that is used to look-up the list of fabrics already setup previously + in the provided PersistentStorage object. + + >> C++ Binding Details + + Each CertificateAuthority instance is associated with a single instance of the OperationalCredentialsAdapter. This adapter instance implements + the OperationalCredentialsDelegate and is meant to provide a Python adapter to the functions in that delegate. It relies on the in-built + ExampleOperationalCredentialsIssuer to then generate certificate material for the CA. This instance also uses the 'CA index' to + store/look-up the associated credential material from the provided PersistentStorage object. + ''' + @classmethod + def _Handle(cls): + return chip.native.GetLibraryHandle() + + @classmethod + def logger(cls): + return logging.getLogger('CertificateAuthority') + + def __init__(self, chipStack: ChipStack.ChipStack, caIndex: int, persistentStorage: PersistentStorage = None): + ''' Initializes the CertificateAuthority. This will set-up the associated C++ OperationalCredentialsAdapter + as well. + + Arguments: + chipStack: A reference to a chip.ChipStack object. + caIndex: An index used to look-up details about stored credential material and fabrics from persistent storage. + persistentStorage: An optional reference to a PersistentStorage object. If one is provided, it will pick that over + the default PersistentStorage object retrieved from the chipStack. + ''' + self.logger().warning(f"New CertificateAuthority at index {caIndex}") + + self._chipStack = chipStack + self._caIndex = caIndex + + self._Handle().pychip_OpCreds_InitializeDelegate.restype = c_void_p + self._Handle().pychip_OpCreds_InitializeDelegate.argtypes = [ctypes.py_object, ctypes.c_uint32, ctypes.c_void_p] + + if (persistentStorage is None): + persistentStorage = self._chipStack.GetStorageManager() + + self._persistentStorage = persistentStorage + + self._closure = self._chipStack.Call( + lambda: self._Handle().pychip_OpCreds_InitializeDelegate( + ctypes.py_object(self), ctypes.c_uint32(self._caIndex), self._persistentStorage.GetSdkStorageObject()) + ) + + if (self._closure is None): + raise ValueError("Encountered error initializing OpCreds adapter") + + self._isActive = True + self._activeAdmins = [] + + def LoadFabricAdminsFromStorage(self): + ''' If FabricAdmins had been setup previously, this re-creates them using information from persistent storage. + Otherwise, it initializes the REPL keys in persistent storage to sane defaults. This includes a top-level + key identifying the CA (using the associated CA Index) initialized to an empty list. + + This expects a 'caList' key to be present in the REPL config. + + Each FabricAdmin that is added there-after will insert a dictionary item into that list containing + 'fabricId' and 'vendorId' keys. + ''' + if (not(self._isActive)): + raise RuntimeError("Object isn't active") + + self.logger().warning("Loading fabric admins from storage...") + + caList = self._persistentStorage.GetReplKey(key='caList') + if (str(self._caIndex) not in caList): + caList[str(self._caIndex)] = [] + self._persistentStorage.SetReplKey(key='caList', value=caList) + + fabricAdminMetadataList = self._persistentStorage.GetReplKey(key='caList')[str(self._caIndex)] + for adminMetadata in fabricAdminMetadataList: + self.NewFabricAdmin(vendorId=int(adminMetadata['vendorId']), fabricId=int(adminMetadata['fabricId'])) + + def NewFabricAdmin(self, vendorId: int, fabricId: int): + ''' Creates a new FabricAdmin object initialized with the provided vendorId and fabricId values. + + This will update the REPL keys in persistent storage IF a 'caList' key is present. If it isn't, + will avoid making any updates. + ''' + if (not(self._isActive)): + raise RuntimeError( + f"CertificateAuthority object was previously shutdown and is no longer valid!") + + if (vendorId is None or fabricId is None): + raise ValueError(f"Invalid values for fabricId and vendorId") + + for existingAdmin in self._activeAdmins: + if (existingAdmin.fabricId == fabricId): + raise ValueError(f"Provided fabricId of {fabricId} collides with an existing FabricAdmin instance!") + + fabricAdmin = FabricAdmin.FabricAdmin(self, vendorId=vendorId, fabricId=fabricId) + + caList = self._persistentStorage.GetReplKey('caList') + if (caList is not None): + replFabricEntry = {'fabricId': fabricId, 'vendorId': vendorId} + + if (replFabricEntry not in caList[str(self._caIndex)]): + caList[str(self._caIndex)].append(replFabricEntry) + + self._persistentStorage.SetReplKey(key='caList', value=caList) + + self._activeAdmins.append(fabricAdmin) + + return fabricAdmin + + def Shutdown(self): + ''' Shuts down all active FabricAdmin objects managed by this CertificateAuthority before + shutting itself down. + + You cannot interact with this object there-after. + ''' + if (self._isActive): + for admin in self._activeAdmins: + admin.Shutdown() + + self._activeAdmins = [] + self._Handle().pychip_OpCreds_FreeDelegate.argtypes = [ctypes.c_void_p] + self._chipStack.Call( + lambda: self._Handle().pychip_OpCreds_FreeDelegate( + ctypes.c_void_p(self._closure)) + ) + + self._isActive = False + + def GetOpCredsContext(self): + ''' Returns a pointer to the underlying C++ OperationalCredentialsAdapter. + ''' + if (not(self._isActive)): + raise RuntimeError("Object isn't active") + + return self._closure + + @property + def caIndex(self) -> int: + return self._caIndex + + @property + def adminList(self) -> list[FabricAdmin.FabricAdmin]: + return self._activeAdmins + + def __del__(self): + self.Shutdown() + + +class CertificateAuthorityManager: + ''' Manages a set of CertificateAuthority instances. + ''' + @classmethod + def _Handle(cls): + return chip.native.GetLibraryHandle() + + @classmethod + def logger(cls): + return logging.getLogger('CertificateAuthorityManager') + + def __init__(self, chipStack: ChipStack.ChipStack, persistentStorage: PersistentStorage = None): + ''' Initializes the manager. + + chipStack: Reference to a chip.ChipStack object that is used to initialize + CertificateAuthority instances. + + persistentStorage: If provided, over-rides the default instance in the provided chipStack + when initializing CertificateAuthority instances. + ''' + self._activeCaIndexList = [] + self._chipStack = chipStack + + if (persistentStorage is None): + persistentStorage = self._chipStack.GetStorageManager() + + self._persistentStorage = persistentStorage + self._activeCaList = [] + self._isActive = True + + def _AllocateNextCaIndex(self): + ''' Allocate the next un-used CA index. + ''' + nextCaIndex = 1 + for ca in self._activeCaList: + nextCaIndex = ca.caIndex + 1 + return nextCaIndex + + def LoadAuthoritiesFromStorage(self): + ''' Loads any existing CertificateAuthority instances present in persistent storage. + If the 'caList' key is not present in the REPL config, it will create one. + ''' + if (not(self._isActive)): + raise RuntimeError("Object is not active") + + self.logger().warning("Loading certificate authorities from storage...") + + # + # Persist details to storage (read modify write). + # + caList = self._persistentStorage.GetReplKey('caList') + if (caList is None): + caList = {} + + for caIndex in caList: + ca = self.NewCertificateAuthority(int(caIndex)) + ca.LoadFabricAdminsFromStorage() + + def NewCertificateAuthority(self, caIndex: int = None): + ''' Creates a new CertificateAuthority instance with the provided CA Index and the PersistentStorage + instance previously setup in the constructor. + + This will write to the REPL keys in persistent storage to setup an empty list for the 'CA Index' + item. + ''' + if (not(self._isActive)): + raise RuntimeError("Object is not active") + + if (caIndex is None): + caIndex = self._AllocateNextCaIndex() + + # + # Persist details to storage (read modify write). + # + caList = self._persistentStorage.GetReplKey('caList') + if (caList is None): + caList = {} + + if (str(caIndex) not in caList): + caList[str(caIndex)] = [] + self._persistentStorage.SetReplKey(key='caList', value=caList) + + ca = CertificateAuthority(chipStack=self._chipStack, caIndex=caIndex, persistentStorage=self._persistentStorage) + self._activeCaList.append(ca) + + return ca + + def Shutdown(self): + ''' Shuts down all active CertificateAuthority instances tracked by this manager, before shutting itself down. + + You cannot interact with this object there-after. + ''' + for ca in self._activeCaList: + ca.Shutdown() + + self._activeCaList = [] + self._isActive = False + + @property + def activeCaList(self) -> List[CertificateAuthority]: + return self._activeCaList + + def __del__(self): + self.Shutdown() diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 30064a1695ace7..edac6bc8f516dc 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -181,10 +181,10 @@ def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, self._fabricAdmin = fabricAdmin self._fabricId = fabricId self._nodeId = nodeId - self._adminIndex = fabricAdmin.adminIndex + self._caIndex = fabricAdmin.caIndex if name is None: - self._name = "adminIndex(%x)/fabricId(0x%016X)/nodeId(0x%016X)" % (fabricAdmin.adminIndex, fabricId, nodeId) + self._name = "caIndex(%x)/fabricId(0x%016X)/nodeId(0x%016X)" % (fabricAdmin.caIndex, fabricId, nodeId) else: self._name = name @@ -258,8 +258,8 @@ def fabricId(self) -> int: return self._fabricId @property - def adminIndex(self) -> int: - return self._adminIndex + def caIndex(self) -> int: + return self._caIndex @property def name(self) -> str: diff --git a/src/controller/python/chip/ChipReplStartup.py b/src/controller/python/chip/ChipReplStartup.py index cb38cc37032c92..519c292ba9d9d8 100644 --- a/src/controller/python/chip/ChipReplStartup.py +++ b/src/controller/python/chip/ChipReplStartup.py @@ -12,6 +12,7 @@ import argparse import builtins import chip.FabricAdmin +import chip.CertificateAuthority import chip.native from chip.utils import CommissioningBuildingBlocks import atexit @@ -19,60 +20,6 @@ _fabricAdmins = None -def LoadFabricAdmins(): - global _fabricAdmins - - # - # Shutdown any fabric admins we had before as well as active controllers. This ensures we - # relinquish some resources if this is called multiple times (e.g in a Jupyter notebook) - # - chip.FabricAdmin.FabricAdmin.ShutdownAll() - ChipDeviceCtrl.ChipDeviceController.ShutdownAll() - - _fabricAdmins = [] - storageMgr = builtins.chipStack.GetStorageManager() - - console = Console() - - try: - adminList = storageMgr.GetReplKey('fabricAdmins') - except KeyError: - console.print( - "\n[purple]No previous fabric admins discovered in persistent storage - creating a new one...") - - # - # Initialite a FabricAdmin with a VendorID of TestVendor1 (0xfff1) - # - _fabricAdmins.append(chip.FabricAdmin.FabricAdmin(0XFFF1)) - return _fabricAdmins - - console.print('\n') - - for k in adminList: - console.print( - f"[purple]Restoring FabricAdmin from storage to manage FabricId {adminList[k]['fabricId']}, AdminIndex {k}...") - _fabricAdmins.append(chip.FabricAdmin.FabricAdmin(vendorId=int(adminList[k]['vendorId']), - fabricId=adminList[k]['fabricId'], adminIndex=int(k))) - - console.print( - '\n[blue]Fabric Admins have been loaded and are available at [red]fabricAdmins') - return _fabricAdmins - - -def CreateDefaultDeviceController(): - global _fabricAdmins - - if (len(_fabricAdmins) == 0): - raise RuntimeError("Was called before calling LoadFabricAdmins()") - - console = Console() - - console.print('\n') - console.print( - f"[purple]Creating default device controller on fabric {_fabricAdmins[0]._fabricId}...") - return _fabricAdmins[0].NewController() - - def ReplInit(debug): # # Install the pretty printer that rich provides to replace the existing @@ -105,9 +52,11 @@ def ReplInit(debug): logging.getLogger().setLevel(logging.WARN) +certificateAuthorityManager = None + + def StackShutdown(): - chip.FabricAdmin.FabricAdmin.ShutdownAll() - ChipDeviceCtrl.ChipDeviceController.ShutdownAll() + certificateAuthorityManager.Shutdown() builtins.chipStack.Shutdown() @@ -145,12 +94,30 @@ def mattersetdebug(enableDebugMode: bool = True): ReplInit(args.debug) chipStack = ChipStack(persistentStoragePath=args.storagepath) -fabricAdmins = LoadFabricAdmins() -devCtrl = CreateDefaultDeviceController() +certificateAuthorityManager = chip.CertificateAuthority.CertificateAuthorityManager(chipStack, chipStack.GetStorageManager()) +certificateAuthorityManager.LoadAuthoritiesFromStorage() + +if (len(certificateAuthorityManager.activeCaList) == 0): + ca = certificateAuthorityManager.NewCertificateAuthority() + ca.NewFabricAdmin(vendorId=0xFFF1, fabricId=1) +elif (len(certificateAuthorityManager.activeCaList[0].adminList) == 0): + certificateAuthorityManager.activeCaList[0].NewFabricAdmin(vendorId=0xFFF1, fabricId=1) + +caList = certificateAuthorityManager.activeCaList + +devCtrl = caList[0].adminList[0].NewController() builtins.devCtrl = devCtrl atexit.register(StackShutdown) console.print( - '\n\n[blue]Default CHIP Device Controller has been initialized to manage [bold red]fabricAdmins[0][blue], and is available as [bold red]devCtrl') + '\n\n[blue]The following objects have been created:') + +console.print( + '''\t[red]certificateAuthorityManager[blue]:\tManages a list of CertificateAuthority instances. +\t[red]caList[blue]:\t\t\t\tThe list of CertificateAuthority instances. +\t[red]caList\[n]\[m][blue]:\t\t\tA specific FabricAdmin object at index m for the nth CertificateAuthority instance.''') + +console.print( + f'\n\n[blue]Default CHIP Device Controller (NodeId: {devCtrl.nodeId}): has been initialized to manage [bold red]caList[0].adminList[0][blue] (FabricId = {caList[0].adminList[0].fabricId}), and is available as [bold red]devCtrl') diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index 5120e68fb8b3b2..cfdeeaef9a5785 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -266,7 +266,7 @@ def HandleChipThreadRun(callback): self._persistentStorage = PersistentStorage(persistentStoragePath) # Initialize the chip stack. - res = self._ChipStackLib.pychip_DeviceController_StackInit() + res = self._ChipStackLib.pychip_DeviceController_StackInit(self._persistentStorage.GetSdkStorageObject()) if res != 0: raise self.ErrorToException(res) @@ -440,7 +440,7 @@ def _loadLib(self): self._ChipStackLib = chip.native.GetLibraryHandle() self._chipDLLPath = chip.native.FindNativeLibraryPath() - self._ChipStackLib.pychip_DeviceController_StackInit.argtypes = [] + self._ChipStackLib.pychip_DeviceController_StackInit.argtypes = [c_void_p] self._ChipStackLib.pychip_DeviceController_StackInit.restype = c_uint32 self._ChipStackLib.pychip_DeviceController_StackShutdown.argtypes = [] self._ChipStackLib.pychip_DeviceController_StackShutdown.restype = c_uint32 diff --git a/src/controller/python/chip/FabricAdmin.py b/src/controller/python/chip/FabricAdmin.py index d44175819ba16a..216da4ebad7646 100644 --- a/src/controller/python/chip/FabricAdmin.py +++ b/src/controller/python/chip/FabricAdmin.py @@ -30,70 +30,29 @@ import chip.exceptions from chip import ChipDeviceCtrl import copy +from .storage import PersistentStorage +from chip.CertificateAuthority import CertificateAuthority class FabricAdmin: - ''' Administers a specific fabric as identified by the tuple of RCAC subject public key and Fabric ID. - The Fabric ID can be passed into the constructor while the RCAC and ICAC are generated. - The Fabric ID *does not* have to be unique across multiple FabricAdmin instances as - it is scoped to the key pair used by the root CA and whose public key is in the RCAC. - - Each admin is identified by an 'admin index' that is unique to the running - process. This is used to store credential information to disk so that - it can be easily loaded later if neccessary (see 'Persistence' below for more details) - - When vending ChipDeviceController instances on a given fabric, each controller instance - is associated with a unique fabric index. In the underlying FabricTable, each FabricInfo - instance can be treated as unique identities that can collide on the same logical fabric. - - >> C++ Binding Details - - Each instance of the fabric admin is associated with a single instance - of the OperationalCredentialsAdapter. This adapter instance implements - the OperationalCredentialsDelegate and is meant to provide a Python - adapter to the functions in that delegate so that the fabric admin - can in turn, provide users the ability to generate their own NOCs for devices - on the network (not implemented yet). For now, it relies on the in-built - ExampleOperationalCredentialsIssuer to do that. - - TODO: Add support for FabricAdmin to permit callers to hook up their own GenerateNOC - logic. - - >> Persistence - - Specifically, each instance persists its fabric ID and admin - index to storage. This is in addition to the persistence built into the ExampleOperationalCredentialsIssuer that persists details - about the RCAC/ICAC and associated keys as well. This facilitates re-construction of a fabric admin on subsequent - boot for a given fabric and ensuring it automatically picks up the right ICAC/RCAC details as well. + ''' Administers a fabric associated with a unique FabricID under a given CertificateAuthority + instance. ''' - - activeAdminIndexList = set() - activeAdmins = set() - @classmethod def _Handle(cls): return chip.native.GetLibraryHandle() - def AllocateNextAdminIndex(self): - ''' Allocate the next un-used admin index. - ''' - nextAdminIndex = 1 - while nextAdminIndex in FabricAdmin.activeAdminIndexList: - nextAdminIndex = nextAdminIndex + 1 - return nextAdminIndex - - def __init__(self, vendorId: int, adminIndex: int = None, fabricId: int = 1): - ''' Creates a valid FabricAdmin object with valid RCAC/ICAC, and registers itself as an OperationalCredentialsDelegate - for other parts of the system (notably, DeviceController) to vend NOCs. - - vendorId: Valid operational Vendor ID associated with this fabric. - adminIndex: Local index to be associated with this fabric. This is NOT the fabric index. Each controller on the fabric - is assigned a unique fabric index. + @classmethod + def logger(cls): + return logging.getLogger('FabricAdmin') - If omitted, one will be automatically assigned. + def __init__(self, certificateAuthority: CertificateAuthority, vendorId: int, fabricId: int = 1): + ''' Initializes the object. - fabricId: Fabric ID to be associated with this fabric. This is scoped to the public key of the resultant - root generated by the underlying ExampleOperationalCredentialsIssuer. + certificateAuthority: CertificateAuthority instance that will be used to vend NOCs for both + DeviceControllers and commissionable nodes on this fabric. + vendorId: Valid operational Vendor ID associated with this fabric. + fabricId: Fabric ID to be associated with this fabric. ''' self._handle = chip.native.GetLibraryHandle() @@ -101,104 +60,68 @@ def __init__(self, vendorId: int, adminIndex: int = None, fabricId: int = 1): raise ValueError( f"Invalid VendorID ({vendorId}) provided!") + if (fabricId is None or fabricId == 0): + raise ValueError( + f"Invalid FabricId ({fabricId}) provided!") + self._vendorId = vendorId self._fabricId = fabricId + self._certificateAuthority = certificateAuthority - if (adminIndex is None): - self._adminIndex = self.AllocateNextAdminIndex() - else: - if (adminIndex in FabricAdmin.activeAdminIndexList): - raise ValueError( - f"AdminIndex {adminIndex} is already being managed by an existing FabricAdmin object!") - - self._adminIndex = adminIndex - - FabricAdmin.activeAdminIndexList.add(self._adminIndex) - - print( - f"New FabricAdmin: FabricId: 0x{self._fabricId:016X}, AdminIndex: {self._adminIndex}, VendorId = 0x{self.vendorId:04X}") - self._Handle().pychip_OpCreds_InitializeDelegate.restype = c_void_p + self.logger().warning(f"New FabricAdmin: FabricId: 0x{self._fabricId:016X}, VendorId = 0x{self.vendorId:04X}") - self.closure = builtins.chipStack.Call( - lambda: self._Handle().pychip_OpCreds_InitializeDelegate( - ctypes.py_object(self), ctypes.c_uint32(self._adminIndex)) - ) - - if (self.closure is None): - raise ValueError("Encountered error initializing OpCreds adapter") - - # - # Persist details to storage (read modify write). - # - try: - adminList = builtins.chipStack.GetStorageManager().GetReplKey('fabricAdmins') - except KeyError: - adminList = {str(self._adminIndex): {'fabricId': self._fabricId}} - builtins.chipStack.GetStorageManager().SetReplKey('fabricAdmins', adminList) + self._isActive = True + self._activeControllers = [] - adminList[str(self._adminIndex)] = {'fabricId': self._fabricId, 'vendorId': self.vendorId} - builtins.chipStack.GetStorageManager().SetReplKey('fabricAdmins', adminList) + def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTestCommissioner: bool = False): + ''' Create a new chip.ChipDeviceCtrl.ChipDeviceController instance on this fabric. - self._isActive = True - self.nextControllerId = 112233 + When vending ChipDeviceController instances on a given fabric, each controller instance + is associated with a unique fabric index local to the running process. In the underlying FabricTable, each FabricInfo + instance can be treated as unique identities that can collide on the same logical fabric. - FabricAdmin.activeAdmins.add(self) + nodeId: NodeID to be assigned to the controller. Automatically allocates one starting from 112233 if one + is not provided. - def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTestCommissioner: bool = False): - ''' Vend a new controller on this fabric seeded with the right fabric details. + paaTrustStorePath: Path to the PAA trust store. If one isn't provided, a suitable default is selected. + useTestCommissioner: If a test commmisioner is to be created. ''' if (not(self._isActive)): raise RuntimeError( f"FabricAdmin object was previously shutdown and is no longer valid!") + nodeIdList = [controller.nodeId for controller in self._activeControllers] if (nodeId is None): - nodeId = self.nextControllerId - self.nextControllerId = self.nextControllerId + 1 + if (len(nodeIdList) != 0): + nodeId = max(nodeIdList) + 1 + else: + nodeId = 112233 + else: + if (nodeId in nodeIdList): + raise RuntimeError(f"Provided NodeId {nodeId} collides with an existing controller instance!") - print( - f"Allocating new controller with FabricId: 0x{self._fabricId:016X}, NodeId: 0x{nodeId:016X}") + self.logger().warning( + f"Allocating new controller with CaIndex: {self._certificateAuthority.caIndex}, FabricId: 0x{self._fabricId:016X}, NodeId: 0x{nodeId:016X}") controller = ChipDeviceCtrl.ChipDeviceController( - self.closure, self._fabricId, nodeId, self.vendorId, paaTrustStorePath, useTestCommissioner, fabricAdmin=self) - return controller - - def ShutdownAll(): - ''' Shuts down all active fabrics, but without deleting them from storage. - ''' - activeAdmins = copy.copy(FabricAdmin.activeAdmins) + self._certificateAuthority.GetOpCredsContext(), self._fabricId, nodeId, self._vendorId, paaTrustStorePath, useTestCommissioner, fabricAdmin=self) - for admin in activeAdmins: - admin.Shutdown(False) - - FabricAdmin.activeAdmins.clear() + self._activeControllers.append(controller) + return controller - def Shutdown(self, deleteFromStorage: bool = True): - ''' Shutdown this fabric and free up its resources. This is important since relying - solely on the destructor will not guarantee relishining of C++-side resources. + def Shutdown(self): + ''' Shutdown all active controllers on the fabric before shutting down the fabric itself. - deleteFromStorage: Whether to delete this fabric's details from persistent storage. + You cannot interact with this object there-after. ''' if (self._isActive): - builtins.chipStack.Call( - lambda: self._Handle().pychip_OpCreds_FreeDelegate( - ctypes.c_void_p(self.closure)) - ) - - FabricAdmin.activeAdminIndexList.remove(self._adminIndex) - - if (deleteFromStorage): - adminList = builtins.chipStack.GetStorageManager().GetReplKey('fabricAdmins') - del(adminList[str(self._adminIndex)]) - if (len(adminList) == 0): - adminList = None + for controller in self._activeControllers: + controller.Shutdown() - builtins.chipStack.GetStorageManager().SetReplKey('fabricAdmins', adminList) - - FabricAdmin.activeAdmins.remove(self) self._isActive = False def __del__(self): - self.Shutdown(False) + self.Shutdown() @property def vendorId(self) -> int: @@ -209,5 +132,9 @@ def fabricId(self) -> int: return self._fabricId @property - def adminIndex(self) -> int: - return self._adminIndex + def caIndex(self) -> int: + return self._certificateAuthority.caIndex + + @property + def certificateAuthority(self) -> CertificateAuthority: + return self._certificateAuthority diff --git a/src/controller/python/chip/storage/__init__.py b/src/controller/python/chip/storage/__init__.py index 362abda084075c..ad51c75754f9f4 100644 --- a/src/controller/python/chip/storage/__init__.py +++ b/src/controller/python/chip/storage/__init__.py @@ -51,11 +51,7 @@ def _OnSyncGetKeyValueCb(storageObj, key: str, value, size, is_found): this method to the requirements of PersistentStorageDelegate::SyncGetKeyValue. ''' - try: - keyValue = storageObj.GetSdkKey(key.decode("utf-8")) - except Exception as ex: - keyValue = None - + keyValue = storageObj.GetSdkKey(key.decode("utf-8")) if (keyValue is not None): sizeOfValue = size[0] sizeToCopy = min(sizeOfValue, len(keyValue)) @@ -85,37 +81,94 @@ def _OnSyncDeleteKeyValueCb(storageObj, key): class PersistentStorage: + ''' Class that provided persistent storage to back both native Python and + SDK configuration key/value pairs. + + Configuration native to the Python libraries is organized under the top-level + 'repl-config' key while configuration native to the SDK and owned by the various + C++ logic is organized under the top-level 'sdk-config' key. + + This interfaces with a C++ adapter that implements the PersistentStorageDelegate interface + and can be passed into C++ logic that needs an instance of that interface. + ''' + @classmethod + def logger(cls): + return logging.getLogger('PersistentStorage') + + def __init__(self, path: str = None, jsonData: Dict = None): + ''' Initializes the object with either a path to a JSON file that contains the configuration OR + a JSON dictionary that contains an in-memory representation of the configuration. + + In either case, if there are no valid configurations that already exist, empty Python + and SDK configuration records will be created upon construction. + ''' + if (path is None and jsonData is None): + raise ValueError("Need to provide at least one of path or jsonData") + + if (path is not None and jsonData is not None): + raise ValueError("Can't provide both a valid path and jsonData") + + if (path is not None): + self.logger().warn(f"Initializing persistent storage from file: {path}") + else: + self.logger().warn(f"Initializing persistent storage from dict") - def __init__(self, path: str): - self._path = path self._handle = chip.native.GetLibraryHandle() self._isActive = True + self._path = path - try: - self._file = open(path, 'r') - self._file.seek(0, 2) - size = self._file.tell() - self._file.seek(0) + if (self._path): + try: + self._file = open(path, 'r') + self._file.seek(0, 2) + size = self._file.tell() + self._file.seek(0) - if (size != 0): - logging.critical(f"Loading configuration from {path}...") - self.jsonData = json.load(self._file) - else: - logging.warn( - f"No valid configuration present at {path} - clearing out configuration") - self.jsonData = {'repl-config': {}, 'sdk-config': {}} + if (size != 0): + self.logger().warn(f"Loading configuration from {path}...") + self._jsonData = json.load(self._file) + else: + self._jsonData = {} - except Exception as ex: - logging.error(ex) - logging.warn( - f"Could not load configuration from {path} - resetting configuration...") - self.jsonData = {'repl-config': {}, 'sdk-config': {}} + except Exception as ex: + logging.error(ex) + logging.critical(f"Could not load configuration from {path} - resetting configuration...") + self._jsonData = {} + else: + self._jsonData = jsonData + + if ('sdk-config' not in self._jsonData): + logging.warn(f"No valid SDK configuration present - clearing out configuration") + self._jsonData['sdk-config'] = {} + + if ('repl-config' not in self._jsonData): + logging.warn(f"No valid REPL configuration present - clearing out configuration") + self._jsonData['repl-config'] = {} + # Clear out the file so that calling 'Commit' will re-open the file at that time in write mode. self._file = None - self._handle.pychip_Storage_InitializeStorageAdapter(ctypes.py_object( + + self._handle.pychip_Storage_InitializeStorageAdapter.restype = c_void_p + self._handle.pychip_Storage_InitializeStorageAdapter.argtypes = [ctypes.py_object, + _SyncSetKeyValueCbFunct, _SyncGetKeyValueCbFunct, _SyncDeleteKeyValueCbFunct] + + self._closure = self._handle.pychip_Storage_InitializeStorageAdapter(ctypes.py_object( self), _OnSyncSetKeyValueCb, _OnSyncGetKeyValueCb, _OnSyncDeleteKeyValueCb) - def Sync(self): + def GetSdkStorageObject(self): + ''' Returns a ctypes c_void_p reference to the SDK-side adapter instance. + ''' + return self._closure + + def Commit(self): + ''' Commits the cached JSON configuration to file (if one was provided in the constructor). + Otherwise, this is a no-op. + ''' + self.logger().info("Committing...") + + if (self._path is None): + return + if (self._file is None): try: self._file = open(self._path, 'w') @@ -126,28 +179,38 @@ def Sync(self): return self._file.seek(0) - json.dump(self.jsonData, self._file, ensure_ascii=True, indent=4) + json.dump(self._jsonData, self._file, ensure_ascii=True, indent=4) self._file.truncate() self._file.flush() def SetReplKey(self, key: str, value): - logging.info(f"SetReplKey: {key} = {value}") + ''' Set a REPL key to a specific value. Creates the key if one doesn't exist already. + ''' + self.logger().info(f"SetReplKey: {key} = {value}") if (key is None or key == ''): raise ValueError("Invalid Key") if (value is None): - del(self.jsonData['repl-config'][key]) + del(self._jsonData['repl-config'][key]) else: - self.jsonData['repl-config'][key] = value + self._jsonData['repl-config'][key] = value - self.Sync() + self.Commit() def GetReplKey(self, key: str): - return copy.deepcopy(self.jsonData['repl-config'][key]) + ''' Retrieves the value of a REPL key. Returns 'None' if the key + doesn't exist. + ''' + if (key not in self._jsonData['repl-config']): + return None + + return copy.deepcopy(self._jsonData['repl-config'][key]) def SetSdkKey(self, key: str, value: bytes): - logging.info(f"SetSdkKey: {key} = {value}") + ''' Set an SDK key to a specific value. Creates the key if one doesn't exist already. + ''' + self.logger().info(f"SetSdkKey: {key} = {value}") if (key is None or key == ''): raise ValueError("Invalid Key") @@ -155,28 +218,45 @@ def SetSdkKey(self, key: str, value: bytes): if (value is None): raise ValueError('value is not expected to be None') else: - self.jsonData['sdk-config'][key] = base64.b64encode( + self._jsonData['sdk-config'][key] = base64.b64encode( value).decode("utf-8") - self.Sync() + self.Commit() def GetSdkKey(self, key: str): - return base64.b64decode(self.jsonData['sdk-config'][key]) + ''' Returns the SDK key if one exist. Otherwise, returns 'None'. + ''' + if (key not in self._jsonData['sdk-config']): + return None + + return base64.b64decode(self._jsonData['sdk-config'][key]) def DeleteSdkKey(self, key: str): - del(self.jsonData['sdk-config'][key]) - self.Sync() + ''' Deletes an SDK key if one exists. + ''' + self.logger().info(f"DeleteSdkKey: {key}") - def GetUnderlyingStorageAdapter(self): - return self._storageAdapterObj + del(self._jsonData['sdk-config'][key]) + self.Commit() def Shutdown(self): + ''' Shuts down the object by free'ing up the associated adapter instance. + + You cannot interact with this object there-after. + ''' + self._handle.pychip_Storage_ShutdownAdapter.argtypes = [c_void_p] builtins.chipStack.Call( - lambda: self._handle.pychip_Storage_ShutdownAdapter() + lambda: self._handle.pychip_Storage_ShutdownAdapter(self._closure) ) self._isActive = False + @property + def jsonData(self) -> Dict: + ''' Returns a copy of the internal cached JSON data. + ''' + return copy.deepcopy(self._jsonData) + def __del__(self): if (self._isActive): builtins.chipStack.Call( diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 90bc43cb064781..3b9f3d9288a7ba 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -36,6 +36,7 @@ from chip.ChipStack import * import chip.native import chip.FabricAdmin +import chip.CertificateAuthority import copy import secrets import faulthandler @@ -193,8 +194,9 @@ def __init__(self, nodeid: int, paaTrustStorePath: str, testCommissioner: bool = chip.native.Init() self.chipStack = ChipStack('/tmp/repl_storage.json') - self.fabricAdmin = chip.FabricAdmin.FabricAdmin(vendorId=0XFFF1, - fabricId=1, adminIndex=1) + self.certificateAuthorityManager = chip.CertificateAuthority.CertificateAuthorityManager(chipStack=self.chipStack) + self.certificateAuthority = self.certificateAuthorityManager.NewCertificateAuthority() + self.fabricAdmin = self.certificateAuthority.NewFabricAdmin(vendorId=0xFFF1, fabricId=1) self.devCtrl = self.fabricAdmin.NewController( nodeid, paaTrustStorePath, testCommissioner) self.controllerNodeId = nodeid @@ -463,7 +465,8 @@ async def TestAddUpdateRemoveFabric(self, nodeid: int): self.logger.info("Waiting for attribute read for CommissionedFabrics") startOfTestFabricCount = await self._GetCommissonedFabricCount(nodeid) - tempFabric = chip.FabricAdmin.FabricAdmin(vendorId=0xFFF1) + tempCertificateAuthority = self.certificateAuthorityManager.NewCertificateAuthority() + tempFabric = tempCertificateAuthority.NewFabricAdmin(vendorId=0xFFF1, fabricId=1) tempDevCtrl = tempFabric.NewController(self.controllerNodeId, self.paaTrustStorePath) self.logger.info("Starting AddNOC using same node ID") @@ -628,8 +631,7 @@ async def TestMultiFabric(self, ip: str, setuppin: int, nodeid: int): await self.devCtrl.SendCommand(nodeid, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(180), timedRequestTimeoutMs=10000) self.logger.info("Creating 2nd Fabric Admin") - self.fabricAdmin2 = chip.FabricAdmin.FabricAdmin(vendorId=0xFFF1, - fabricId=2, adminIndex=2) + self.fabricAdmin2 = self.certificateAuthority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) self.logger.info("Creating Device Controller on 2nd Fabric") self.devCtrl2 = self.fabricAdmin2.NewController( @@ -646,15 +648,15 @@ async def TestMultiFabric(self, ip: str, setuppin: int, nodeid: int): self.logger.info( "Shutting down controllers & fabrics and re-initing stack...") - ChipDeviceCtrl.ChipDeviceController.ShutdownAll() - chip.FabricAdmin.FabricAdmin.ShutdownAll() + self.certificateAuthorityManager.Shutdown() self.logger.info("Shutdown completed, starting new controllers...") - self.fabricAdmin = chip.FabricAdmin.FabricAdmin(vendorId=0XFFF1, - fabricId=1, adminIndex=1) - fabricAdmin2 = chip.FabricAdmin.FabricAdmin(vendorId=0xFFF1, - fabricId=2, adminIndex=2) + self.certificateAuthorityManager = chip.CertificateAuthority.CertificateAuthorityManager(chipStack=self.chipStack) + self.certificateAuthority = self.certificateAuthorityManager.NewCertificateAuthority() + self.fabricAdmin = self.certificateAuthority.NewFabricAdmin(vendorId=0xFFF1, fabricId=1) + + fabricAdmin2 = self.certificateAuthority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) self.devCtrl = self.fabricAdmin.NewController( self.controllerNodeId, self.paaTrustStorePath) diff --git a/src/python_testing/TC_SC_3_6.py b/src/python_testing/TC_SC_3_6.py index ede817f8de4628..2c258c620d86a1 100644 --- a/src/python_testing/TC_SC_3_6.py +++ b/src/python_testing/TC_SC_3_6.py @@ -18,6 +18,7 @@ from matter_testing_support import MatterBaseTest, default_matter_test_main, async_test_body import chip.clusters as Clusters import chip.FabricAdmin +import chip.CertificateAuthority import logging from mobly import asserts from chip.utils import CommissioningBuildingBlocks @@ -137,7 +138,8 @@ async def test_TC_SC_3_6(self): for i in range(num_fabrics_to_commission - 1): admin_index = 2 + i logging.info("Commissioning fabric %d/%d" % (admin_index, num_fabrics_to_commission)) - new_fabric_admin = chip.FabricAdmin.FabricAdmin(vendorId=0xFFF1, adminIndex=admin_index) + new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=1) new_admin_ctrl = new_fabric_admin.NewController(nodeId=dev_ctrl.nodeId) new_admin_ctrl.name = all_names.pop(0) client_list.append(new_admin_ctrl) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 6064d46fda0dcd..607f24a057b9c3 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -25,6 +25,7 @@ import chip.logging import chip.native import chip.FabricAdmin +import chip.CertificateAuthority from chip.utils import CommissioningBuildingBlocks import builtins from typing import Optional, List, Tuple @@ -45,7 +46,6 @@ from mobly import utils from mobly.test_runner import TestRunner - # TODO: Add utility to commission a device if needed # TODO: Add utilities to keep track of controllers/fabrics @@ -157,7 +157,6 @@ class MatterStackState: def __init__(self, config: MatterTestConfig): self._logger = logger self._config = config - self._fabric_admins = [] if not hasattr(builtins, "chipStack"): chip.native.Init(bluetoothAdapter=config.ble_interface_id) @@ -180,22 +179,17 @@ def _init_stack(self, already_initialized: bool, **kwargs): builtins.chipStack = self._chip_stack self._storage = self._chip_stack.GetStorageManager() + self._certificate_authority_manager = chip.CertificateAuthority.CertificateAuthorityManager(chipStack=self._chip_stack) + self._certificate_authority_manager.LoadAuthoritiesFromStorage() - try: - admin_list = self._storage.GetReplKey('fabricAdmins') - found_admin_list = True - except KeyError: - found_admin_list = False - - if not found_admin_list: - self._logger.warn("No previous fabric administrative data found in persistent data: initializing a new one") - self._fabric_admins.append(chip.FabricAdmin.FabricAdmin(self._config.admin_vendor_id)) - else: - for admin_idx in admin_list: - self._logger.info( - f"Restoring FabricAdmin from storage to manage FabricId {admin_list[admin_idx]['fabricId']}, AdminIndex {admin_idx}") - self._fabric_admins.append(chip.FabricAdmin.FabricAdmin(vendorId=int(admin_list[admin_idx]['vendorId']), - fabricId=admin_list[admin_idx]['fabricId'], adminIndex=int(admin_idx))) + if (len(self._certificate_authority_manager.activeCaList) == 0): + self._logger.warn( + "Didn't find any CertificateAuthorities in storage -- creating a new CertificateAuthority + FabricAdmin...") + ca = self._certificate_authority_manager.NewCertificateAuthority() + ca.NewFabricAdmin(vendorId=0xFFF1, fabricId=0xFFF1) + elif (len(self._certificate_authority_manager.activeCaList[0].adminList) == 0): + self._logger.warn("Didn't find any FabricAdmins in storage -- creating a new one...") + self._certificate_authority_manager.activeCaList[0].NewFabricAdmin(vendorId=0xFFF1, fabricId=0xFFF1) # TODO: support getting access to chip-tool credentials issuer's data @@ -204,14 +198,17 @@ def Shutdown(self): # Unfortunately, all the below are singleton and possibly # managed elsewhere so we have to be careful not to touch unless # we initialized ourselves. - ChipDeviceCtrl.ChipDeviceController.ShutdownAll() - chip.FabricAdmin.FabricAdmin.ShutdownAll() + self._certificate_authority_manager.Shutdown() global_chip_stack = builtins.chipStack global_chip_stack.Shutdown() @property - def fabric_admins(self): - return self._fabric_admins + def certificate_authorities(self): + return self._certificate_authority_manager.activeCaList + + @property + def certificate_authority_manager(self): + return self._certificate_authority_manager @property def storage(self) -> PersistentStorage: @@ -251,6 +248,10 @@ def default_controller(self) -> ChipDeviceCtrl: def matter_stack(self) -> MatterStackState: return unstash_globally(self.user_params.get("matter_stack")) + @property + def certificate_authority_manager(self) -> chip.CertificateAuthority.CertificateAuthorityManager: + return unstash_globally(self.user_params.get("certificate_authority_manager")) + @property def dut_node_id(self) -> int: return self.matter_test_config.dut_node_id @@ -684,12 +685,14 @@ def default_matter_test_main(argv=None): test_config.user_params["matter_stack"] = stash_globally(stack) # TODO: Steer to right FabricAdmin! - default_controller = stack.fabric_admins[0].NewController(nodeId=matter_test_config.controller_node_id, - paaTrustStorePath=str(matter_test_config.paa_trust_store_path)) + default_controller = stack.certificate_authorities[0].adminList[0].NewController(nodeId=matter_test_config.controller_node_id, + paaTrustStorePath=str(matter_test_config.paa_trust_store_path)) test_config.user_params["default_controller"] = stash_globally(default_controller) test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) + test_config.user_params["certificate_authority_manager"] = stash_globally(stack.certificate_authority_manager) + # Execute the test class with the config ok = True From 51d2c959175b4dd0de7fdd174f9b44e4cd840628 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 18 Aug 2022 12:49:39 -0400 Subject: [PATCH 071/115] Update gecko sdk to 4.1.1 (#22002) --- third_party/silabs/gecko_sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk index 310814a9016b60..799200bb678893 160000 --- a/third_party/silabs/gecko_sdk +++ b/third_party/silabs/gecko_sdk @@ -1 +1 @@ -Subproject commit 310814a9016b60a8012d50c62cc168a783ac102b +Subproject commit 799200bb6788939aa0fef97d7fc4ee9aca57148d From 507bb7011fe6c7f55d45b6da2d78db292543c5a2 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Thu, 18 Aug 2022 23:21:56 +0530 Subject: [PATCH 072/115] Modified scripts Aug 18 (#22000) * Added new scripts TC-CADMIN-1.11 TC-CADMIN-1.15 TC-CADMIN-1.16 TC-CADMIN-1.21 TC-CADMIN-1.22 Modified scripts TC-CC-1.1 TC-CHANNEL-1.6 TC-CONTENTLAUNCHER-1.1 TC-DGGEN-1.1 TC-DGTHREAD-1.1 TC-DGWIFI-1.1 TC-DRLK-1.1 TC-KEYPADINPUT-1.2 TC-LVL-1.1 TC-LVL-3.1 TC-LVL-4.1 TC-LVL-5.1 TC-LVL-6.1 TC-MEDIAPLAYBACK-1.7 TC-PS-1.1 TC-STCH-1.1 TC-TGNAV-1.1 TC-TSTAT-1.1 * Added auto generated files * Modified PS-1.1 script * Auto generated files * Auto generated files --- .../suites/certification/Test_TC_ACT_1_1.yaml | 4 +- .../certification/Test_TC_CADMIN_1_11.yaml | 618 ++-- .../certification/Test_TC_CADMIN_1_13.yaml | 1 - .../certification/Test_TC_CADMIN_1_15.yaml | 472 ++- .../certification/Test_TC_CADMIN_1_16.yaml | 510 ++- .../certification/Test_TC_CADMIN_1_21.yaml | 161 +- .../certification/Test_TC_CADMIN_1_22.yaml | 155 +- .../certification/Test_TC_CADMIN_1_23.yaml | 4 +- .../certification/Test_TC_CADMIN_1_24.yaml | 4 +- .../certification/Test_TC_CADMIN_1_6.yaml | 2 +- .../suites/certification/Test_TC_CC_1_1.yaml | 11 +- .../certification/Test_TC_CHANNEL_1_6.yaml | 11 +- .../Test_TC_CONTENTLAUNCHER_1_11.yaml | 11 +- .../certification/Test_TC_DGGEN_1_1.yaml | 2 +- .../certification/Test_TC_DGTHREAD_1_1.yaml | 1 - .../certification/Test_TC_DGWIFI_1_1.yaml | 11 +- .../certification/Test_TC_DRLK_1_1.yaml | 14 +- .../Test_TC_KEYPADINPUT_1_2.yaml | 11 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 13 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 54 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 9 + .../suites/certification/Test_TC_LVL_5_1.yaml | 9 + .../suites/certification/Test_TC_LVL_6_1.yaml | 9 + .../Test_TC_MEDIAPLAYBACK_1_7.yaml | 11 +- .../suites/certification/Test_TC_PS_1_1.yaml | 1 - .../certification/Test_TC_SWTCH_1_1.yaml | 15 +- .../certification/Test_TC_TGTNAV_8_1.yaml | 9 +- .../certification/Test_TC_TSTAT_1_1.yaml | 11 + .../chip-tool/zap-generated/test/Commands.h | 2958 ++++++++++++----- .../zap-generated/test/Commands.h | 2487 ++++++++------ 30 files changed, 4620 insertions(+), 2969 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml index ef12fae26a6a2a..8c6429ee483a14 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml @@ -53,7 +53,7 @@ tests: response: constraints: type: list - contains: [0, 1] + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: "Read the optional attribute(SetupURL) in AttributeList" PICS: ACT.S.A0002 @@ -62,7 +62,7 @@ tests: response: constraints: type: list - contains: [0, 1, 2] + contains: [2] # Checking only type check all attributes are optional - label: "Read the global attribute: AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index e13c93fc9faf4a..9f820a377fbfea 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -11,10 +11,9 @@ # 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: - 4.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM + 30.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM then BCM [DUT - Commissionee] PICS: @@ -23,437 +22,284 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 400 + nodeId2: + type: node_id + defaultValue: 0xCAFE + nodeId3: + type: node_id + defaultValue: 0xC00FEE endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | - Reset Devices to factory defaults - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S - verification: | - "1. Provision the device using 1st controller chip tool on the raspi (use above instructions) , - " - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" PICS: CADMIN.S.C00.Rsp - verification: | - On the 1st controller using chip tool, open commissioning window using ECM - - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - disabled: true - - - label: "DNS-SD records shows DUT_CE advertising" - verification: | - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp - + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] - = wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true - - - label: "TH_CR3 Commissions with DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "TH_CR3 starts a commissioning process with DUT_CE" PICS: CADMIN.S - verification: | - On 3rd controller using chip tool connect using manual code - - ./chip-tool pairing code 3 35484132896 --commissioner-name gamma - - Verify you got below message - Device commissioning completed with success - disabled: true + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3" + identity: "gamma" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId3 - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM and TH_CR2 - Commissions with DUT_CE" + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller using chip tool, open commissioning window using ECM - - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - - - On 2nd controller using chip tool connect using manual code - - ./chip-tool pairing code 1 35484132896 --commissioner-name beta - - Verify you got below message - Device commissioning completed with success - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload --commissioner-name beta + + - label: "DUT_CE is commissioned to TH_CR2" + PICS: CADMIN.S + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 + + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller using chip tool, open commissioning window using ECM - - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - [1635874557.409509][4549:4554] CHIP:SC: Success status report received. Session was established - [1635874557.409553][4549:4554] CHIP:IN: New secure session created for device 0x0000000000000001, key 76!! - [1635874557.409649][4549:4554] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635874557.416929][4549:4554] CHIP:DMG: ICR moving to [AddingComm] - [1635874557.417092][4549:4554] CHIP:DMG: ICR moving to [AddedComma] - [1635874557.417215][4549:4554] CHIP:IN: Prepared encrypted message 0xaaaac5947d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 5541i with MessageCounter:0. - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds which was set in step 5, TH_CR1 opens a 2nd commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - verification: | - Before the timer expiry, on the 1st controller using chip tool, open commissioning window using ECM. Verify the General code return error 1 - - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - CHIP:DMG: InvokeResponseMessage = - [1650527291.952055][8566:8571] CHIP:DMG: { - [1650527291.952074][8566:8571] CHIP:DMG: suppressResponse = false, - [1650527291.952091][8566:8571] CHIP:DMG: InvokeResponseIBs = - [1650527291.952116][8566:8571] CHIP:DMG: [ - [1650527291.952134][8566:8571] CHIP:DMG: InvokeResponseIB = - [1650527291.952172][8566:8571] CHIP:DMG: { - [1650527291.952195][8566:8571] CHIP:DMG: CommandStatusIB = - [1650527291.952220][8566:8571] CHIP:DMG: { - [1650527291.952245][8566:8571] CHIP:DMG: CommandPathIB = - [1650527291.952276][8566:8571] CHIP:DMG: { - [1650527291.952303][8566:8571] CHIP:DMG: EndpointId = 0x0, - [1650527291.952334][8566:8571] CHIP:DMG: ClusterId = 0x3c, - [1650527291.952369][8566:8571] CHIP:DMG: CommandId = 0x0, - [1650527291.952394][8566:8571] CHIP:DMG: }, - [1650527291.952431][8566:8571] CHIP:DMG: - [1650527291.952458][8566:8571] CHIP:DMG: StatusIB = - [1650527291.952488][8566:8571] CHIP:DMG: { - [1650527291.952519][8566:8571] CHIP:DMG: status = 0x01 (FAILURE), - [1650527291.952555][8566:8571] CHIP:DMG: cluster-status = 0x1, - [1650527291.952578][8566:8571] CHIP:DMG: }, - [1650527291.952612][8566:8571] CHIP:DMG: - [1650527291.952634][8566:8571] CHIP:DMG: }, - [1650527291.952671][8566:8571] CHIP:DMG: - [1650527291.952694][8566:8571] CHIP:DMG: }, - [1650527291.952731][8566:8571] CHIP:DMG: - [1650527291.952751][8566:8571] CHIP:DMG: ], - [1650527291.952781][8566:8571] CHIP:DMG: - [1650527291.952795][8566:8571] CHIP:DMG: InteractionModelRevision = 1 - [1650527291.952807][8566:8571] CHIP:DMG: }, - [1650527291.952886][8566:8571] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x1 - [1650527291.952931][8566:8571] CHIP:CTL: Failed to open pairing window on the device. Status IM Error 0x00000601: Cluster-specific error: 0x01 - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + response: + error: FAILURE - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller using chip tool, read fabrics list - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries - [1650527361.426777][15792:15797] CHIP:TOO: [1]: { - [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 - [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 - [1650527361.427088][15792:15797] CHIP:TOO: Label: - [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 - [1650527361.427376][15792:15797] CHIP:TOO: } - [1650527361.427464][15792:15797] CHIP:TOO: [2]: { - [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 - [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 - [1650527361.427756][15792:15797] CHIP:TOO: Label: - [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 - [1650527361.427868][15792:15797] CHIP:TOO: } - [1650527361.427943][15792:15797] CHIP:TOO: [3]: { - [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD - [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 - [1650527361.428229][15792:15797] CHIP:TOO: Label: - [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 - [1650527361.428335][15792:15797] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", nodeId: nodeId }, + { Label: "", nodeId: nodeId3 }, + { Label: "", nodeID: nodeId2 }, + ] + constraints: + type: list - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6" - verification: | - verification step to be updated. - disabled: true + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 180000 - label: "TH_CR1 re-opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - verification: | - On the 1st controller using chip tool, open commissioning window using BCM - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: "DNS-SD records shows DUT_CE advertising" - verification: | - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp - + eth0 IPv6 2664ED6939FC373C _matterc._udp local - = eth0 IPv6 2664ED6939FC373C _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 10, TH_CR3 opens a 2nd commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - verification: | - On the 3rd controller using chip tool, open commissioning window using BCM before the timer expiry of the above step - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 --commissioner-name gamma - - CHIP:DMG: InvokeResponseMessage = - [1650527565.990404][24618:24623] CHIP:DMG: { - [1650527565.990476][24618:24623] CHIP:DMG: suppressResponse = false, - [1650527565.990528][24618:24623] CHIP:DMG: InvokeResponseIBs = - [1650527565.990615][24618:24623] CHIP:DMG: [ - [1650527565.990667][24618:24623] CHIP:DMG: InvokeResponseIB = - [1650527565.990755][24618:24623] CHIP:DMG: { - [1650527565.990816][24618:24623] CHIP:DMG: CommandStatusIB = - [1650527565.990900][24618:24623] CHIP:DMG: { - [1650527565.990967][24618:24623] CHIP:DMG: CommandPathIB = - [1650527565.991042][24618:24623] CHIP:DMG: { - [1650527565.991112][24618:24623] CHIP:DMG: EndpointId = 0x0, - [1650527565.991186][24618:24623] CHIP:DMG: ClusterId = 0x3c, - [1650527565.991257][24618:24623] CHIP:DMG: CommandId = 0x1, - [1650527565.991332][24618:24623] CHIP:DMG: }, - [1650527565.991441][24618:24623] CHIP:DMG: - [1650527565.991505][24618:24623] CHIP:DMG: StatusIB = - [1650527565.991574][24618:24623] CHIP:DMG: { - [1650527565.991645][24618:24623] CHIP:DMG: status = 0x01 (FAILURE), - [1650527565.991743][24618:24623] CHIP:DMG: cluster-status = 0x1, - [1650527565.991830][24618:24623] CHIP:DMG: }, - [1650527565.991918][24618:24623] CHIP:DMG: - [1650527565.991976][24618:24623] CHIP:DMG: }, - [1650527565.992061][24618:24623] CHIP:DMG: - [1650527565.992116][24618:24623] CHIP:DMG: }, - [1650527565.992202][24618:24623] CHIP:DMG: - [1650527565.992253][24618:24623] CHIP:DMG: ], - [1650527565.992316][24618:24623] CHIP:DMG: - [1650527565.992365][24618:24623] CHIP:DMG: InteractionModelRevision = 1 - [1650527565.992414][24618:24623] CHIP:DMG: }, - [1650527565.992535][24618:24623] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 - [1650527565.992601][24618:24623] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 - disabled: true + identity: "gamma" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator + response: + error: FAILURE - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 11" - verification: | - verification step to be updated. - disabled: true + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 180000 - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller using chip tool, read fabrics list - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries - [1650527361.426777][15792:15797] CHIP:TOO: [1]: { - [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 - [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 - [1650527361.427088][15792:15797] CHIP:TOO: Label: - [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 - [1650527361.427376][15792:15797] CHIP:TOO: } - [1650527361.427464][15792:15797] CHIP:TOO: [2]: { - [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 - [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 - [1650527361.427756][15792:15797] CHIP:TOO: Label: - [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 - [1650527361.427868][15792:15797] CHIP:TOO: } - [1650527361.427943][15792:15797] CHIP:TOO: [3]: { - [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD - [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 - [1650527361.428229][15792:15797] CHIP:TOO: Label: - [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 - [1650527361.428335][15792:15797] CHIP:TOO: } - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", nodeId: nodeId }, + { Label: "", nodeId: nodeId3 }, + { Label: "", nodeID: nodeId2 }, + ] + constraints: + type: list + + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller using chip tool, open commissioning window using BCM - - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 14, TH_CR2 opens a second commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - verification: | - On 2nd controller using chip tool, open commissioning window using BCM before timer expiry from above step - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - - CHIP:DMG: InvokeResponseMessage = - [1650527622.373450][15824:15829] CHIP:DMG: { - [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, - [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = - [1650527622.373734][15824:15829] CHIP:DMG: [ - [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = - [1650527622.373913][15824:15829] CHIP:DMG: { - [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = - [1650527622.374087][15824:15829] CHIP:DMG: { - [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = - [1650527622.374296][15824:15829] CHIP:DMG: { - [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, - [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, - [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, - [1650527622.374682][15824:15829] CHIP:DMG: }, - [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, - [1650527622.375320][15824:15829] CHIP:DMG: }, - [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, - [1650527622.375616][15824:15829] CHIP:DMG: - [1650527622.375704][15824:15829] CHIP:DMG: }, - [1650527622.375786][15824:15829] CHIP:DMG: - [1650527622.375864][15824:15829] CHIP:DMG: ], - [1650527622.375940][15824:15829] CHIP:DMG: - [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 - [1650527622.376058][15824:15829] CHIP:DMG: }, - [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 - [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 - disabled: true + identity: "beta" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator + response: + error: FAILURE 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 22d1c1654cf2dd..79c0171de6bf29 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 @@ -104,7 +104,6 @@ tests: constraints: notValue: null - #Issue https://github.com/CHIP-Specifications/chip-test-plans/issues/1972 - label: "TH_CR1 reads AdminVendorId attribute from DUT_CE" cluster: "AdministratorCommissioning" command: "readAttribute" 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 f35cffd5ed79ca..17191702192c60 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 @@ -11,293 +11,279 @@ # 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: - 4.1.15. [TC-CADMIN-1.15] Removing Fabrics from DUT and Fabric index - enumeration using ECM [DUT - Commissionee] + 30.1.15. [TC-CADMIN-1.15] Removing Fabrics from DUT and Fabric index + enumeration using ECM [DUT - Commissionee] PICS: - CADMIN.S config: nodeId: 0x12344321 - cluster: "Basic" + nodeId2: + type: node_id + defaultValue: 0xCAFE + nodeId3: + type: node_id + defaultValue: 0xC00FEE endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | - Reset Devices to factory defaults - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 starts a commissioning process with DUT_CE" + identity: "alpha" PICS: CADMIN.S - verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , - " - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + identity: "alpha" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller chip tool, open commissioning window using ECM - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" - label: "TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - On 2nd controller using chip tool connect to the accessory - - - ./chip-tool pairing code 2 36217551633 --commissioner-name beta - - Verify you got below message - Device commissioning completed with success - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR2" + identity: "beta" + PICS: CADMIN.S + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 + + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + identity: "alpha" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller chip tool, open commissioning window using ECM - - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true - - - label: "TH_CR3 starts a commissioning process with DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "TH_CR3 Commissions with DUT_CE" PICS: CADMIN.S - verification: | - On 3rd controller using chip tool connect to the accessory - - - - ./chip-tool pairing code 3 36217551633 --commissioner-name gamma - - Verify you got below message - Device commissioning completed with success - disabled: true + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR3" + PICS: CADMIN.S + identity: "gamma" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId3 - label: "TH_CR2 reads the list of Fabrics on DUT_CE" + identity: "beta" + cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - verification: | - On 2nd controller using chip tool, read fabrics list - - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 - CHIP:TOO: Fabrics: 3 entries - CHIP:TOO: [1]: { - CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 1 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 1 - CHIP:TOO: } - CHIP:TOO: [2]: { - CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 2 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 2 - CHIP:TOO: } - CHIP:TOO: [3]: { - CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 3 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 3 - CHIP:TOO: } - CHIP:EM: Sending Standalone Ack for MessageCounter:9143157 on exchange 1147i - disabled: true + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 2, nodeId: nodeId2 }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE" PICS: OPCREDS.S.C0a.Rsp - verification: | - on 2nd controller using chip tool, remove fabric with FabricIndex=2 - - ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - CHIP:TOO: NOCResponse: { - CHIP:TOO: statusCode: 0 - CHIP:TOO: fabricIndex: 2 - CHIP:TOO: } - CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: 2 - label: - "TH_CR2 writes and reads the Basic Information Clusters NodeLabel - mandatory attribute of DUT_CE" + "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory + attribute of DUT_CE" PICS: BINFO.S.A0005 + identity: "beta" + command: "writeAttribute" + cluster: "Basic" + attribute: "NodeLabel" + arguments: + value: "chiptest" + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/21999 + - label: + "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory + attribute of DUT_CE" + PICS: BINFO.S.A0005 && PICS_USER_PROMPT verification: | - Using your 2nd controller, write attribute and read attribute + Using your 2nd controller read attribute Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - - Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter - [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 - [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - - ./chip-tool basic read node-label 2 0 --commissioner-name beta + ./chip-tool basic read node-label 2 0 Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + identity: "alpha" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller using chip tool, read fabrics list - - Below is the command using chip tool controller - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 - [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries - [1647863260.286908][9294:9299] CHIP:TOO: [1]: { - [1647863260.286947][9294:9299] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - [1647863260.286995][9294:9299] CHIP:TOO: VendorId: 65521 - [1647863260.287026][9294:9299] CHIP:TOO: FabricId: 1 - [1647863260.287055][9294:9299] CHIP:TOO: NodeId: 1 - [1647863260.287084][9294:9299] CHIP:TOO: Label: - [1647863260.287113][9294:9299] CHIP:TOO: FabricIndex: 1 - [1647863260.287144][9294:9299] CHIP:TOO: } - [1647863260.287185][9294:9299] CHIP:TOO: [2]: { - [1647863260.287221][9294:9299] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863260.287253][9294:9299] CHIP:TOO: VendorId: 65521 - [1647863260.287282][9294:9299] CHIP:TOO: FabricId: 1 - [1647863260.287310][9294:9299] CHIP:TOO: NodeId: 3 - [1647863260.287339][9294:9299] CHIP:TOO: Label: - [1647863260.287368][9294:9299] CHIP:TOO: FabricIndex: 3 - [1647863260.287396][9294:9299] CHIP:TOO: } - [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" - disabled: true - - - label: - "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)" - verification: | - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp - + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local - + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local - = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - = wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list + + - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + identity: "alpha" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller chip tool, open commissioning window using ECM - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" - label: "TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - On 2nd controller using chip tool connect to the accessory - - - ./chip-tool pairing code 2 36217551633 --commissioner-name beta - - Verify you got below message - Device commissioning completed with success - disabled: true + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR2" + PICS: CADMIN.S + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + identity: "alpha" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller, read fabrics list - - Below is the command using chip tool controller - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 - [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries - [1647863342.981158][9309:9314] CHIP:TOO: [1]: { - [1647863342.981231][9309:9314] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - [1647863342.981322][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.981380][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.981434][9309:9314] CHIP:TOO: NodeId: 1 - [1647863342.981486][9309:9314] CHIP:TOO: Label: - [1647863342.981539][9309:9314] CHIP:TOO: FabricIndex: 1 - [1647863342.981594][9309:9314] CHIP:TOO: } - [1647863342.981671][9309:9314] CHIP:TOO: [2]: { - [1647863342.981737][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863342.981796][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.981849][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.981901][9309:9314] CHIP:TOO: NodeId: 3 - [1647863342.981952][9309:9314] CHIP:TOO: Label: - [1647863342.982005][9309:9314] CHIP:TOO: FabricIndex: 3 - [1647863342.982057][9309:9314] CHIP:TOO: } - [1647863342.982131][9309:9314] CHIP:TOO: [3]: { - [1647863342.982195][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863342.982252][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.982305][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.982357][9309:9314] CHIP:TOO: NodeId: 2 - [1647863342.982409][9309:9314] CHIP:TOO: Label: - [1647863342.982460][9309:9314] CHIP:TOO: FabricIndex: 4 - [1647863342.982512][9309:9314] CHIP:TOO: } - [1647863342.982738][9309:9314] CHIP:EM: Sending Standalone Ack for MessageCounter:5772016 on exchange 3310i - disabled: true + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 4, nodeId: nodeId2 }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 28492fc2debf5d..ba7744562b2518 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -11,11 +11,10 @@ # 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: - 4.1.16. [TC-CADMIN-1.16] Removing Fabrics from DUT and Fabric index - enumeration using BCM [DUT - Commissionee] + 30.1.16. [TC-CADMIN-1.16] Removing Fabrics from DUT and Fabric index + enumeration using BCM [DUT - Commissionee] PICS: - CADMIN.S @@ -23,342 +22,247 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + nodeId2: + type: node_id + defaultValue: 0xCAFE + nodeId3: + type: node_id + defaultValue: 0xC00FEE endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | - Reset Devices to factory defaults - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 starts a commissioning process with DUT_CE" + identity: "alpha" + cluster: "DelayCommands" + command: "WaitForCommissionee" PICS: CADMIN.S - verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , - " - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + identity: "alpha" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller chip tool, open commissioning window using BCM - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - On 2nd controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - - Verify you got below message - Device commissioning completed with success - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR2" + PICS: CADMIN.S + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + identity: "alpha" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller chip tool, open commissioning window using BCM - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: "TH_CR3 starts a commissioning process with DUT_CE" + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator + + - label: "TH_CR3 Commissions with DUT_CE" PICS: CADMIN.S - verification: | - On 3rd controller using chip tool connect to the accessory - - - - ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - - Verify you got below message - Device commissioning completed with success - disabled: true + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR3" + PICS: CADMIN.S + identity: "gamma" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId3 - label: "TH_CR2 reads the list of Fabrics on DUT_CE" + identity: "beta" + cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - verification: | - On 2nd controller using chip tool, read fabrics list - - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 - CHIP:TOO: Fabrics: 3 entries - CHIP:TOO: [1]: { - CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 1 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 1 - CHIP:TOO: } - CHIP:TOO: [2]: { - CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 2 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 2 - CHIP:TOO: } - CHIP:TOO: [3]: { - CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - CHIP:TOO: VendorId: 65521 - CHIP:TOO: FabricId: 1 - CHIP:TOO: NodeId: 3 - CHIP:TOO: Label: - CHIP:TOO: FabricIndex: 3 - CHIP:TOO: } - CHIP:EM: Sending Standalone Ack for MessageCounter:9143157 on exchange 1147i - disabled: true + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 2, nodeId: nodeId2 }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE" PICS: OPCREDS.S.C0a.Rsp - verification: | - on 2nd controller using chip tool, remove fabric with FabricIndex=2 - - ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - CHIP:TOO: NOCResponse: { - CHIP:TOO: statusCode: 0 - CHIP:TOO: fabricIndex: 2 - CHIP:TOO: } - CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: 2 - label: - "TH_CR2 writes and reads the Basic Information Clusters NodeLabel - mandatory attribute of DUT_CE" + "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory + attribute of DUT_CE" PICS: BINFO.S.A0005 + identity: "beta" + command: "writeAttribute" + cluster: "Basic" + attribute: "NodeLabel" + arguments: + value: "chiptest" + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/21999 + - label: + "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory + attribute of DUT_CE" + PICS: BINFO.S.A0005 && PICS_USER_PROMPT verification: | - Using your 2nd controller, write attribute and read attribute + Using your 2nd controller read attribute Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + ./chip-tool basic read node-label 2 0 Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - - ./chip-tool basic read node-label 2 0 --commissioner-name beta - - Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter - [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 - [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + identity: "alpha" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller using chip tool, read fabrics list - - - Below is the command using chip tool controller - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 - [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries - [1647863260.286908][9294:9299] CHIP:TOO: [1]: { - [1647863260.286947][9294:9299] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - [1647863260.286995][9294:9299] CHIP:TOO: VendorId: 65521 - [1647863260.287026][9294:9299] CHIP:TOO: FabricId: 1 - [1647863260.287055][9294:9299] CHIP:TOO: NodeId: 1 - [1647863260.287084][9294:9299] CHIP:TOO: Label: - [1647863260.287113][9294:9299] CHIP:TOO: FabricIndex: 1 - [1647863260.287144][9294:9299] CHIP:TOO: } - [1647863260.287185][9294:9299] CHIP:TOO: [2]: { - [1647863260.287221][9294:9299] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863260.287253][9294:9299] CHIP:TOO: VendorId: 65521 - [1647863260.287282][9294:9299] CHIP:TOO: FabricId: 1 - [1647863260.287310][9294:9299] CHIP:TOO: NodeId: 3 - [1647863260.287339][9294:9299] CHIP:TOO: Label: - [1647863260.287368][9294:9299] CHIP:TOO: FabricIndex: 3 - [1647863260.287396][9294:9299] CHIP:TOO: } - [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" - disabled: true - - - label: - "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." - verification: | - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp - + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local - + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local - = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - = wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT.CADMIN.CwDuration seconds using BCM" + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list + + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" + identity: "alpha" PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller chip tool, open commissioning window using BCM - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - On 2nd controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - - Verify you got below message - Device commissioning completed with success - disabled: true + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT_CE is commissioned to TH_CR2" + PICS: CADMIN.S + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: "TH_CR1 reads the list of Fabrics on DUT_CE" + identity: "alpha" PICS: OPCREDS.S.A0001 - verification: | - On 1st controller, read fabrics list - - Below is the command using chip tool controller - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 - [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries - [1647863342.981158][9309:9314] CHIP:TOO: [1]: { - [1647863342.981231][9309:9314] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F - [1647863342.981322][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.981380][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.981434][9309:9314] CHIP:TOO: NodeId: 1 - [1647863342.981486][9309:9314] CHIP:TOO: Label: - [1647863342.981539][9309:9314] CHIP:TOO: FabricIndex: 1 - [1647863342.981594][9309:9314] CHIP:TOO: } - [1647863342.981671][9309:9314] CHIP:TOO: [2]: { - [1647863342.981737][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863342.981796][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.981849][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.981901][9309:9314] CHIP:TOO: NodeId: 3 - [1647863342.981952][9309:9314] CHIP:TOO: Label: - [1647863342.982005][9309:9314] CHIP:TOO: FabricIndex: 3 - [1647863342.982057][9309:9314] CHIP:TOO: } - [1647863342.982131][9309:9314] CHIP:TOO: [3]: { - [1647863342.982195][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 - [1647863342.982252][9309:9314] CHIP:TOO: VendorId: 65521 - [1647863342.982305][9309:9314] CHIP:TOO: FabricId: 1 - [1647863342.982357][9309:9314] CHIP:TOO: NodeId: 2 - [1647863342.982409][9309:9314] CHIP:TOO: Label: - [1647863342.982460][9309:9314] CHIP:TOO: FabricIndex: 4 - [1647863342.982512][9309:9314] CHIP:TOO: } - [1647863342.982738][9309:9314] CHIP:EM: Sending Standalone Ack for MessageCounter:5772016 on exchange 3310i - disabled: true + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { Label: "", FabricIndex: 1, nodeId: nodeId }, + { Label: "", FabricIndex: 4, nodeId: nodeId2 }, + { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + ] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index e7bf90a0f87fa8..3b49df915b30db 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 4.1.21. [TC-CADMIN-1.21] Open commissioning window - durations max and max+1 - [BCM] [DUT - Commissionee] + 30.1.21. [TC-CADMIN-1.21] Open commissioning window - durations max and + max+1 [BCM] [DUT - Commissionee] PICS: - CADMIN.S @@ -23,109 +23,88 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 950 endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 tests: - - label: "Precondition" - verification: | - Reset Devices to factory defaults - disabled: true + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" - - label: "TH_CR1 starts a commissioning process with DUT_CE" - PICS: CADMIN.S.C01.Rsp + - label: "Precondition: Reset Devices to factory defaults" verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , - " - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: - "TH_CR1 opens a commissioning window on DUT_CE using BCM with a value - of 900 seconds" + - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller chip tool, open commissioning window - - For BCM, - - - ./chip-tool administratorcommissioning open-basic-commissioning-window 900 2 0 --timedInteractionTimeoutMs 1000 - - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: "Wait 901 seconds for commissioning Window to be closed" - verification: | - Wait for commissioning Window to Timeout - disabled: true + arguments: + values: + - name: "CommissioningTimeout" + value: 900 + - name: "discriminator" + value: discriminator + + - label: "Wait for commissioning Window to 901 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 901000 - label: "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" PICS: CADMIN.S.A0000 - verification: | - ./chip-tool administratorcommissioning read window-status 1 0 + response: + value: 0 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 - [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 - [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using BCM with a value - of 901 seconds" + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" PICS: CADMIN.S.C01.Rsp - verification: | - On 1st controller chip tool, open commissioning window - - For BCM, - ./chip-tool administratorcommissioning open-basic-commissioning-window 901 2 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x85 - [1652860801.225084][9512:9517] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) - [1652860801.225173][9512:9517] CHIP:DMG: ICR moving to [AwaitingDe] - [1652860801.225294][9512:9517] CHIP:EM: Sending Standalone Ack for MessageCounter:4191961 on exchange 37827i - disabled: true + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 901 + - name: "discriminator" + value: discriminator + response: + error: INVALID_COMMAND - label: "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" PICS: CADMIN.S.A0000 - verification: | - On 1st controller read window status - - ./chip-tool administratorcommissioning read window-status 1 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 - [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 - [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i - disabled: true + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index 7b650575ae706f..52864032e07829 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -14,97 +14,112 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 4.1.22. [TC-CADMIN-1.22] Open commissioning window - durations max and max+1 - [ECM] [DUT - Commissionee] + 30.1.22. [TC-CADMIN-1.22] Open commissioning window - durations max and + max+1 [ECM] [DUT - Commissionee] PICS: - CADMIN.S config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 950 endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | - Reset Devices to factory defaults - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" PICS: CADMIN.S.C00.Rsp - verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , - " - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value - of 900 seconds" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - - For ECM, - ./chip-tool pairing open-commissioning-window 1 1 900 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true - - - label: "Wait 901 seconds for commissioning Window to be closed" - verification: | - Wait for commissioning Window to Timeout - disabled: true + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 900 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "Wait for commissioning Window to 901 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 901000 - label: "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" PICS: CADMIN.S.A0000 - verification: | - ./chip-tool administratorcommissioning read window-status 1 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 - [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 - [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i - disabled: true + response: + value: 0 - - label: - "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value - of 901 seconds" + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp - verification: | - On 1st controller chip tool, open commissioning window - - For BCM, - ./chip-tool administratorcommissioning open-basic-commissioning-window 901 2 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x85 - [1652860801.225084][9512:9517] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) - [1652860801.225173][9512:9517] CHIP:DMG: ICR moving to [AwaitingDe] - [1652860801.225294][9512:9517] CHIP:EM: Sending Standalone Ack for MessageCounter:4191961 on exchange 37827i - disabled: true + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 901 + - name: "PAKEVerifier" + value: PakeVerifier + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + response: + error: INVALID_COMMAND - label: "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" PICS: CADMIN.S.A0000 - verification: | - On 1st controller read window status - - ./chip-tool administratorcommissioning read window-status 1 0 - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 - [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 - [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i - disabled: true + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 5ba018a444cd38..f014b0272aabe3 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -23,7 +23,7 @@ PICS: config: nodeId: 0x12344321 - timeout: 330 + timeout: 200 endpoint: 0 discriminator: type: int16u @@ -69,7 +69,7 @@ tests: - name: "discriminator" value: discriminator - - label: "Wait for commissioning Window to 301 seconds" + - label: "Wait for commissioning Window to 181 seconds" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 736adc1aad733b..d589e09a309ac1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -22,7 +22,7 @@ PICS: config: nodeId: 0x12344321 - timeout: 330 + timeout: 200 endpoint: 0 discriminator: type: int16u @@ -78,7 +78,7 @@ tests: - name: "salt" value: "SPAKE2P Key Salt" - - label: "Wait for commissioning Window to 301 seconds" + - label: "Wait for commissioning Window to 181 seconds" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 3b2066c0c6d8a1..fc2ef27ac21f25 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -87,7 +87,7 @@ tests: - name: "ms" value: 190000 - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 5477760c2ef1bf..f14af7b4d5c81e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -36,6 +36,15 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: ( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 ) + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: ( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 ) command: "readAttribute" @@ -43,7 +52,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 31 - label: "Read the global attribute: AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml index fa5005b3600bba..a988c23d18dc14 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml @@ -40,6 +40,15 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: ( !CHANNEL.S.CL && !CHANNEL.S.LI ) + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: CHANNEL.S.CL || CHANNEL.S.LI command: "readAttribute" @@ -47,7 +56,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 3 - label: "Read the global attribute: AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index 09e8cf190ec511..b24690a2ab0d75 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -41,6 +41,15 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: ( !CONTENTLAUNCHER.S.CS && !CONTENTLAUNCHER.S.UP ) + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP command: "readAttribute" @@ -48,7 +57,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 3 - label: "Read the global attribute: AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml index 95de56495d2c2a..44ea9c363205c6 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -54,7 +54,7 @@ tests: response: constraints: type: list - contains: [0, 1, 8, 65528, 65529, 65531, 65533] + contains: [0, 1, 8, 65528, 65529, 65531, 65532, 65533] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml index 5f8fee8d8262a9..a48e928599b156 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml @@ -41,7 +41,6 @@ tests: type: int16u - label: "TH reads the FeatureMap from DUT" - PICS: DGTHREAD.S.F00 || DGTHREAD.S.F01 || DGTHREAD.S.F02 || DGTHREAD.S.F03 command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml index b370a0337bbf94..5e1e29e4de2037 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml @@ -39,6 +39,15 @@ tests: constraints: type: int16u + - label: "TH reads the FeatureMap from DUT" + PICS: ( !DGWIFI.S.F00 && !DGWIFI.S.F01 ) + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "TH reads the FeatureMap from DUT" PICS: DGWIFI.S.F00 || DGWIFI.S.F01 command: "readAttribute" @@ -46,7 +55,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 3 - label: "TH reads AttributeList from DUT" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml index 4789c9736d130d..e83ad337d61a7e 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml @@ -40,6 +40,18 @@ tests: constraints: type: int16u + - label: "TH reads the FeatureMap from DUT" + PICS: + " !DRLK.S.F00 && !DRLK.S.F01 && !DRLK.S.F02 && !DRLK.S.F04 && + !DRLK.S.F05 && !DRLK.S.F06 && !DRLK.S.F07 && !DRLK.S.F08 && + !DRLK.S.F10 && !DRLK.S.F11 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "TH reads the FeatureMap from DUT" PICS: DRLK.S.F00 || DRLK.S.F01 || DRLK.S.F02 || DRLK.S.F04 || DRLK.S.F05 || @@ -49,7 +61,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 4095 - label: "TH reads AttributeList from DUT" diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml index 35e800441f7824..913ad1cc5aaa00 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml @@ -41,6 +41,15 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: " !KEYPADINPUT.S.NV && KEYPADINPUT.S.LK && !KEYPADINPUT.S.NK " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK command: "readAttribute" @@ -48,7 +57,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 7 - label: "Read the global attribute: AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 5fc10aabb21232..1b3f3a04c45b3b 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -46,16 +46,25 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 7 + - label: "Read the global attribute: FeatureMap" + PICS: " !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 15, 17] + contains: [0, 15, 17, 65528, 65529, 65531, 65532, 65533] - label: "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 23743e71284c1a..507813609a736f 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -44,6 +44,15 @@ tests: response: value: 1 + #Adding below step resolve the issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/499 + - label: + "Precondition: write default value of OnOffTransitionTime attribute" + PICS: LVL.S.A0010 + command: "writeAttribute" + attribute: "OnOffTransitionTime" + arguments: + value: 0 + - label: "TH writes 0 to the Options attribute" PICS: LVL.S.A000f command: "writeAttribute" @@ -229,9 +238,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 100 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 @@ -255,9 +264,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 120 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 @@ -276,9 +285,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 140 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 1 @@ -297,9 +306,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 160 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 1 @@ -337,9 +346,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 100 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 @@ -363,9 +372,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 120 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 @@ -384,9 +393,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 140 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 1 @@ -405,9 +414,9 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 160 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 1 @@ -420,16 +429,3 @@ tests: attribute: "CurrentLevel" response: value: 160 - - - label: "Precondition send Off Command" - cluster: "On/Off" - PICS: OO.S.C00.Rsp - command: "Off" - - - label: "Check on/off attribute value is false after off command" - cluster: "On/Off" - PICS: OO.S.A0000 - command: "readAttribute" - attribute: "OnOff" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index 671a275aeca385..386a7447f264d6 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -44,6 +44,15 @@ tests: response: value: 1 + #Adding below step resolve the issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/499 + - label: + "Precondition: write default value of OnOffTransitionTime attribute" + PICS: LVL.S.A0013 + command: "writeAttribute" + attribute: "OnOffTransitionTime" + arguments: + value: 0 + - label: "TH writes 0 to the Options attribute" PICS: LVL.S.A000f command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index f3f1bc7583f706..4febf9ad1e5248 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -44,6 +44,15 @@ tests: response: value: 1 + #Adding below step resolve the issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/499 + - label: + "Precondition: write default value of OnOffTransitionTime attribute" + PICS: LVL.S.A0013 + command: "writeAttribute" + attribute: "OnOffTransitionTime" + arguments: + value: 0 + - label: "TH writes 0 to the Options attribute" PICS: LVL.S.A000f command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index 2b87fb422a8f05..e9793c96a37ea0 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -44,6 +44,15 @@ tests: response: value: 1 + #Adding below step resolve the issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/499 + - label: + "Precondition: write default value of OnOffTransitionTime attribute" + PICS: LVL.S.A0013 + command: "writeAttribute" + attribute: "OnOffTransitionTime" + arguments: + value: 0 + - label: "TH writes 0 to the Options attribute" PICS: LVL.S.A000f command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml index 79f2db2d730064..a155ab61cc3493 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml @@ -41,6 +41,15 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: " !MEDIAPLAYBACK.S.AS && !MEDIAPLAYBACK.S.VS " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS command: "readAttribute" @@ -48,7 +57,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 3 - label: "Read the global attribute: AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index a034e954f914ec..0f419310c547c4 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -40,7 +40,6 @@ tests: type: int16u - label: "Read the global attribute: FeatureMap" - PICS: PS.S.F00 || PS.S.F01 || PS.S.F02 || PS.S.F03 command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index 33ab17b54a9b02..066cca0924ef3f 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -31,6 +31,19 @@ tests: - name: "nodeId" value: nodeId + - label: + "Read FeatureMap attribute and Check values of flags in this + FeatureMap" + PICS: + "!SWTCH.S.F00 && SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && + !SWTCH.S.F04" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read FeatureMap attribute and Check values of flags in this FeatureMap" @@ -42,7 +55,7 @@ tests: response: constraints: type: bitmap32 - minValue: 0 + minValue: 1 maxValue: 31 - label: "read the global attribute: ClusterRevision" diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml index 3a11538f19f7b2..d28d8404bf0a1d 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml @@ -21,12 +21,9 @@ config: nodeId: 0x12344321 cluster: "Target Navigator" endpoint: 1 - targetvalue1: + targetvalue: type: int8u defaultValue: 1 - targetvalue2: - type: int8u - defaultValue: 2 tests: - label: "Wait for the commissioned device to be retrieved" @@ -62,11 +59,11 @@ tests: arguments: values: - name: "Target" - value: targetvalue1 + value: targetvalue - label: "Reads the CurrentTarget attribute" PICS: TGTNAV.S.A0001 && TGTNAV.S.C00.Rsp command: "readAttribute" attribute: "CurrentTarget" response: - value: targetvalue1 + value: targetvalue diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 82c8acae87f9e8..31d769b3f5f9be 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -39,6 +39,17 @@ tests: constraints: type: int16u + - label: "Read the global attribute: FeatureMap" + PICS: + "!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && + !TSTAT.S.F04 && !TSTAT.S.F05" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + - label: "Read the global attribute: FeatureMap" PICS: TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index da80f584197147..1179318cf4ecb9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -2537,6 +2537,11 @@ class Test_TC_ACT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 4: @@ -2545,8 +2550,6 @@ class Test_TC_ACT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -2780,7 +2783,7 @@ class Test_TC_BIND_1_1Suite : public TestCommand class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 42, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 43, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2831,12 +2834,21 @@ class Test_TC_CC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2853,7 +2865,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2862,7 +2874,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2871,7 +2883,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2880,7 +2892,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2889,7 +2901,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2898,7 +2910,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2907,7 +2919,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2916,7 +2928,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2925,7 +2937,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2934,7 +2946,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2943,7 +2955,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2952,7 +2964,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2961,7 +2973,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2970,7 +2982,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2979,7 +2991,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2988,7 +3000,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2997,7 +3009,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3006,7 +3018,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3015,7 +3027,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3024,7 +3036,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3033,7 +3045,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3042,7 +3054,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3051,7 +3063,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3060,7 +3072,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3069,7 +3081,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3078,7 +3090,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3087,7 +3099,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3096,7 +3108,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3105,7 +3117,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3114,7 +3126,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3123,7 +3135,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3132,7 +3144,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3141,7 +3153,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3150,7 +3162,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3159,7 +3171,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3168,7 +3180,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3177,7 +3189,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3186,7 +3198,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -3227,240 +3239,247 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )"), + VerifyOrDo(!ShouldSkip("( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the optional attribute(CurrentHue) in AttributeList"); + case 5: { + LogStep(5, "Read the optional attribute(CurrentHue) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the optional attribute(CurrentSaturation) in AttributeList"); + case 6: { + LogStep(6, "Read the optional attribute(CurrentSaturation) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the optional attribute(RemainingTime) in AttributeList"); + case 7: { + LogStep(7, "Read the optional attribute(RemainingTime) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read the optional attribute(CurrentX) in AttributeList"); + case 8: { + LogStep(8, "Read the optional attribute(CurrentX) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the optional attribute(CurrentY) in AttributeList"); + case 9: { + LogStep(9, "Read the optional attribute(CurrentY) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the optional attribute(DriftCompensation) in AttributeList"); + case 10: { + LogStep(10, "Read the optional attribute(DriftCompensation) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the optional attribute(CompensationText) in AttributeList"); + case 11: { + LogStep(11, "Read the optional attribute(CompensationText) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read the optional attribute(ColorTemperatureMireds) in AttributeList"); + case 12: { + LogStep(12, "Read the optional attribute(ColorTemperatureMireds) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read the optional attribute(EnhancedCurrentHue) in AttributeList"); + case 13: { + LogStep(13, "Read the optional attribute(EnhancedCurrentHue) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read the optional attribute(ColorLoopActive) in AttributeList"); + case 14: { + LogStep(14, "Read the optional attribute(ColorLoopActive) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read the optional attribute(ColorLoopDirection) in AttributeList"); + case 15: { + LogStep(15, "Read the optional attribute(ColorLoopDirection) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read the optional attribute(ColorLoopTime) in AttributeList"); + case 16: { + LogStep(16, "Read the optional attribute(ColorLoopTime) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); + case 17: { + LogStep(17, "Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); + case 18: { + LogStep(18, "Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); + case 19: { + LogStep(19, "Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); + case 20: { + LogStep(20, "Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); + case 21: { + LogStep(21, "Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); + case 22: { + LogStep(22, "Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Read the optional command(MoveToHue) in AcceptedCommandList"); + case 23: { + LogStep(23, "Read the optional command(MoveToHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read the optional command(MoveHue) in AcceptedCommandList"); + case 24: { + LogStep(24, "Read the optional command(MoveHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read the optional command(StepHue) in AcceptedCommandList"); + case 25: { + LogStep(25, "Read the optional command(StepHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Read the optional command(MoveToSaturation) in AcceptedCommandList"); + case 26: { + LogStep(26, "Read the optional command(MoveToSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read the optional command(MoveSaturation) in AcceptedCommandList"); + case 27: { + LogStep(27, "Read the optional command(MoveSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read the optional command(StepSaturation) in AcceptedCommandList"); + case 28: { + LogStep(28, "Read the optional command(StepSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); + case 29: { + LogStep(29, "Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read the optional command(MoveToColor) in AcceptedCommandList"); + case 30: { + LogStep(30, "Read the optional command(MoveToColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Read the optional command(MoveColor) in AcceptedCommandList"); + case 31: { + LogStep(31, "Read the optional command(MoveColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Read the optional command(StepColor) in AcceptedCommandList"); + case 32: { + LogStep(32, "Read the optional command(StepColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); + case 33: { + LogStep(33, "Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); + case 34: { + LogStep(34, "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); + case 35: { + LogStep(35, "Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read the optional command(EnhancedStepHue) in AcceptedCommandList"); + case 36: { + LogStep(36, "Read the optional command(EnhancedStepHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); + case 37: { + LogStep(37, "Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read the optional command(ColorLoopSet) in AcceptedCommandList"); + case 38: { + LogStep(38, "Read the optional command(ColorLoopSet) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read the optional command(StopMoveStep) in AcceptedCommandList"); + case 39: { + LogStep(39, "Read the optional command(StopMoveStep) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Read the optional command(MoveColorTemperature) in AcceptedCommandList"); + case 40: { + LogStep(40, "Read the optional command(MoveColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "Read the optional command(StepColorTemperature) in AcceptedCommandList"); + case 41: { + LogStep(41, "Read the optional command(StepColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Read the global attribute: GeneratedCommandList"); + case 42: { + LogStep(42, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -15457,6 +15476,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; @@ -17236,7 +17256,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand class Test_TC_LVL_1_1Suite : public TestCommand { public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) + Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17288,11 +17308,20 @@ class Test_TC_LVL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17301,9 +17330,14 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17313,7 +17347,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17324,7 +17358,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17333,7 +17367,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17342,7 +17376,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17351,7 +17385,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17360,7 +17394,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17369,7 +17403,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17378,7 +17412,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17394,7 +17428,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17403,7 +17437,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17449,71 +17483,77 @@ class Test_TC_LVL_1_1Suite : public TestCommand chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip(" !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); + case 5: { + LogStep(5, "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); + case 6: { + LogStep(6, "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the optional attribute(MinLevel) in AttributeList"); + case 7: { + LogStep(7, "Read the optional attribute(MinLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read the optional attribute(MaxLevel) in AttributeList"); + case 8: { + LogStep(8, "Read the optional attribute(MaxLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the optional attribute(OnOffTransitionTime) in AttributeList"); + case 9: { + LogStep(9, "Read the optional attribute(OnOffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the optional attribute(OnTransitionTime) in AttributeList"); + case 10: { + LogStep(10, "Read the optional attribute(OnTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the optional attribute(OffTransitionTime) in AttributeList"); + case 11: { + LogStep(11, "Read the optional attribute(OffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read the optional attribute(DefaultMoveRate) in AttributeList"); + case 12: { + LogStep(12, "Read the optional attribute(DefaultMoveRate) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read the global attribute: AcceptedCommandList"); + case 13: { + LogStep(13, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList"); + case 14: { + LogStep(14, "Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read the global attribute: GeneratedCommandList"); + case 15: { + LogStep(15, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -18311,7 +18351,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 47, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 46, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18369,6 +18409,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand 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)); { bool value; @@ -18376,7 +18419,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18385,13 +18428,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } 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)); { chip::app::DataModel::Nullable value; @@ -18400,14 +18443,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18416,11 +18459,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18429,11 +18472,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18442,11 +18485,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18455,7 +18498,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18464,10 +18507,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -18475,13 +18518,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("options", value, 0U)); } break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18490,13 +18533,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18505,10 +18548,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18517,10 +18560,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18529,10 +18572,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -18540,13 +18583,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("options", value, 1U)); } break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18555,13 +18598,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18570,10 +18613,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18582,10 +18625,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -18594,17 +18637,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); } break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18642,7 +18674,16 @@ class Test_TC_LVL_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); + LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint16_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -18650,8 +18691,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends Off command to DUT"); + case 5: { + LogStep(5, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -18659,8 +18700,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 6: { + LogStep(6, "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -18674,19 +18715,19 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH reads OnOff attribute (On/Off cluster) from DUT"); + case 7: { + LogStep(7, "TH reads OnOff attribute (On/Off cluster) from DUT"); VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH reads CurrentLevel attribute from DUT"); + case 8: { + LogStep(8, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH sends On command to DUT"); + case 9: { + LogStep(9, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -18694,8 +18735,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 10: { + LogStep(10, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18709,14 +18750,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This means the " "level should increase by 150 units in 30s, so 5 units/s"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -18732,71 +18773,71 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 10000ms"); + case 13: { + LogStep(13, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 10000ms"); + case 15: { + LogStep(15, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads CurrentLevel attribute from DUT"); + case 16: { + LogStep(16, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 10000ms"); + case 17: { + LogStep(17, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads CurrentLevel attribute from DUT"); + case 18: { + LogStep(18, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 5000ms"); + case 19: { + LogStep(19, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "TH reads CurrentLevel attribute from DUT"); + case 20: { + LogStep(20, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH reads CurrentLevel attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH writes 0 to the Options attribute"); + case 22: { + LogStep(22, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -18804,14 +18845,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "TH reads Options attribute"); + case 23: { + LogStep(23, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH sends On command to DUT"); + case 24: { + LogStep(24, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -18819,8 +18860,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 24: { - LogStep(24, "TH sends a MoveToLevel command to the DUT with"); + case 25: { + LogStep(25, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18834,14 +18875,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 25: { - LogStep(25, "TH reads CurrentLevel attribute from DUT"); + case 26: { + LogStep(26, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends Off command to DUT"); + case 27: { + LogStep(27, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -18849,8 +18890,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "TH sends a MoveToLevel command to the DUT with"); + case 28: { + LogStep(28, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18864,14 +18905,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "TH reads CurrentLevel attribute from DUT"); + case 29: { + LogStep(29, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "TH sends a MoveToLevel command to the DUT with"); + case 30: { + LogStep(30, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18885,14 +18926,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 30: { - LogStep(30, "TH reads CurrentLevel attribute from DUT"); + case 31: { + LogStep(31, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "TH sends a MoveToLevel command to the DUT with"); + case 32: { + LogStep(32, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18906,14 +18947,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 32: { - LogStep(32, "TH reads CurrentLevel attribute from DUT"); + case 33: { + LogStep(33, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "TH writes 1 to the Options attribute"); + case 34: { + LogStep(34, "TH writes 1 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -18921,14 +18962,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 34: { - LogStep(34, "TH reads Options attribute"); + case 35: { + LogStep(35, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "TH sends On command to DUT"); + case 36: { + LogStep(36, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -18936,8 +18977,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 36: { - LogStep(36, "TH sends a MoveToLevel command to the DUT with"); + case 37: { + LogStep(37, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18951,14 +18992,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 37: { - LogStep(37, "TH reads CurrentLevel attribute from DUT"); + case 38: { + LogStep(38, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "TH sends Off command to DUT"); + case 39: { + LogStep(39, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -18966,8 +19007,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 39: { - LogStep(39, "TH sends a MoveToLevel command to the DUT with"); + case 40: { + LogStep(40, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -18981,14 +19022,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "TH reads CurrentLevel attribute from DUT"); + case 41: { + LogStep(41, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "TH sends a MoveToLevel command to the DUT with"); + case 42: { + LogStep(42, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -19002,14 +19043,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 42: { - LogStep(42, "TH reads CurrentLevel attribute from DUT"); + case 43: { + LogStep(43, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "TH sends a MoveToLevel command to the DUT with"); + case 44: { + LogStep(44, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -19023,26 +19064,12 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 44: { - LogStep(44, "TH reads CurrentLevel attribute from DUT"); + case 45: { + LogStep(45, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Precondition send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } @@ -19051,7 +19078,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand class Test_TC_LVL_4_1Suite : public TestCommand { public: - Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 25, credsIssuerConfig) + Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -19105,6 +19132,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand 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)); { uint8_t value; @@ -19114,13 +19144,13 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } 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)); { bool value; @@ -19128,7 +19158,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19137,11 +19167,11 @@ class Test_TC_LVL_4_1Suite : public TestCommand CurrentLevelValue = value; } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19150,13 +19180,13 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19165,14 +19195,14 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19181,11 +19211,11 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19194,11 +19224,11 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19207,11 +19237,11 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19220,10 +19250,10 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 254U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -19268,7 +19298,16 @@ class Test_TC_LVL_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); + LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint16_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -19276,14 +19315,14 @@ class Test_TC_LVL_4_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads the MaxLevel attribute from the DUT"); + case 5: { + LogStep(5, "TH reads the MaxLevel attribute from the DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends Off command to DUT"); + case 6: { + LogStep(6, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -19291,8 +19330,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)"); + case 7: { + LogStep(7, "TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type value; @@ -19306,32 +19345,32 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH reads OnOff attribute (On/Off cluster) from DUT"); + case 8: { + LogStep(8, "TH reads OnOff attribute (On/Off cluster) from DUT"); VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads CurrentLevel attribute from DUT"); + case 9: { + LogStep(9, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 5000ms"); + case 10: { + LogStep(10, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends On command to DUT"); + case 12: { + LogStep(12, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -19339,8 +19378,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 13: { + LogStep(13, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -19354,14 +19393,14 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)"); + case 15: { + LogStep(15, "TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -19375,60 +19414,60 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Wait 10s"); + case 16: { + LogStep(16, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads CurrentLevel attribute from DUT"); + case 17: { + LogStep(17, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 10s"); + case 18: { + LogStep(18, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads CurrentLevel attribute from DUT"); + case 19: { + LogStep(19, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait 10s"); + case 20: { + LogStep(20, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads CurrentLevel attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 13s"); + case 22: { + LogStep(22, "Wait 13s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 13000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH reads CurrentLevel attribute from DUT"); + case 23: { + LogStep(23, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Precondition send Off Command"); + case 24: { + LogStep(24, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -19436,8 +19475,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 24: { - LogStep(24, "Check on/off attribute value is false after off command"); + case 25: { + LogStep(25, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -19449,7 +19488,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand class Test_TC_LVL_5_1Suite : public TestCommand { public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 22, credsIssuerConfig) + Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -19507,6 +19546,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand 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)); { bool value; @@ -19514,13 +19556,13 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } 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)); { chip::app::DataModel::Nullable value; @@ -19529,14 +19571,14 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19545,11 +19587,11 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19558,11 +19600,11 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19571,11 +19613,11 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19584,7 +19626,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19593,10 +19635,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -19641,7 +19683,16 @@ class Test_TC_LVL_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); + LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint16_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -19649,8 +19700,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends Off command to DUT"); + case 5: { + LogStep(5, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -19658,8 +19709,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and TransitionTime =0 " "(immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -19676,13 +19727,13 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH reads OnOff attribute (On/Off cluster) from DUT"); + case 7: { + LogStep(7, "TH reads OnOff attribute (On/Off cluster) from DUT"); VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends On command to DUT"); + case 8: { + LogStep(8, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -19690,8 +19741,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 9: { + LogStep(9, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -19705,14 +19756,14 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Reads current level attribute from DUT"); + case 10: { + LogStep(10, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime =300"); + case 11: { + LogStep(11, "TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime =300"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; @@ -19727,71 +19778,71 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "Wait 10s"); + case 12: { + LogStep(12, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH reads CurrentLevel attribute from DUT"); + case 13: { + LogStep(13, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait 10s"); + case 14: { + LogStep(14, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads CurrentLevel attribute from DUT"); + case 15: { + LogStep(15, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait 10s"); + case 16: { + LogStep(16, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads CurrentLevel attribute from DUT"); + case 17: { + LogStep(17, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 5000ms"); + case 18: { + LogStep(18, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads CurrentLevel attribute from DUT"); + case 19: { + LogStep(19, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)"); + case 20: { + LogStep(20, "TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Precondition send Off Command"); + case 21: { + LogStep(21, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -19799,8 +19850,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -19812,7 +19863,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 19, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -19870,6 +19921,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand 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)); { chip::app::DataModel::Nullable value; @@ -19878,21 +19932,21 @@ class Test_TC_LVL_6_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19901,21 +19955,21 @@ class Test_TC_LVL_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 86U)); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -19924,10 +19978,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -19972,7 +20026,16 @@ class Test_TC_LVL_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); + LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint16_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -19980,8 +20043,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends On command to DUT"); + case 5: { + LogStep(5, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -19989,8 +20052,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 6: { + LogStep(6, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -20004,14 +20067,14 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH reads CurrentLevel attribute from DUT"); + case 7: { + LogStep(7, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field set to " "0x05 (5 units/s)"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -20027,15 +20090,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 5000ms"); + case 9: { + LogStep(9, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Sends stop command to DUT"); + case 10: { + LogStep(10, "Sends stop command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; @@ -20046,8 +20109,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Physically verify that the device has stopped transitioning"); + case 11: { + LogStep(11, "Physically verify that the device has stopped transitioning"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -20056,15 +20119,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 11: { - LogStep(11, "TH reads CurrentLevel attribute from DUT"); + case 12: { + LogStep(12, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, + case 13: { + LogStep(13, "TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field set to " "0x05 (5 units/s)"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -20080,15 +20143,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 5000ms"); + case 14: { + LogStep(14, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH sends a StopWithOnOff command to the DUT"); + case 15: { + LogStep(15, "TH sends a StopWithOnOff command to the DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type value; @@ -20099,8 +20162,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Physically verify that the device has stopped transitioning"); + case 16: { + LogStep(16, "Physically verify that the device has stopped transitioning"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -20109,15 +20172,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Reads CurrentLevel attribute from DUT"); + case 17: { + LogStep(17, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Precondition send Off Command"); + case 18: { + LogStep(18, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -20125,8 +20188,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 18: { - LogStep(18, "Check on/off attribute value is false after off command"); + case 19: { + LogStep(19, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -20559,7 +20622,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { public: Test_TC_KEYPADINPUT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_1_2", 6, credsIssuerConfig) + TestCommand("Test_TC_KEYPADINPUT_1_2", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -20610,12 +20673,21 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -20628,7 +20700,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -20637,7 +20709,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -20675,23 +20747,30 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK"), + VerifyOrDo(!ShouldSkip(" !KEYPADINPUT.S.NV && KEYPADINPUT.S.LK && !KEYPADINPUT.S.NK "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -21236,7 +21315,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { public: Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 11, credsIssuerConfig) + TestCommand("Test_TC_CHANNEL_1_6", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -21287,12 +21366,21 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21305,7 +21393,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21314,7 +21402,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21323,7 +21411,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21332,7 +21420,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21341,7 +21429,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21350,7 +21438,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21359,7 +21447,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21397,53 +21485,59 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( !CHANNEL.S.CL && !CHANNEL.S.LI )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the optional attribute(ChannelList): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Reading optional attribute(Lineup) in AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Read the optional attribute(ChannelList): AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the optional attribute(CurrentChannel): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Reading optional attribute(Lineup) in AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optional command(ChangeChannel) in AcceptedCommandList"); + LogStep(7, "Read the optional attribute(CurrentChannel): AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Read the optional command(ChangeChannel) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the optional command(ChangeChannelByNumber) in AcceptedCommandList"); + case 9: { + LogStep(9, "Read the optional command(ChangeChannelByNumber) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the optional command(SkipChannel) in AcceptedCommandList"); + case 10: { + LogStep(10, "Read the optional command(SkipChannel) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -21457,7 +21551,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { public: Test_TC_MEDIAPLAYBACK_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 20, credsIssuerConfig) + TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -21508,12 +21602,21 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21527,7 +21630,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21536,7 +21639,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21545,7 +21648,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21554,7 +21657,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21563,7 +21666,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21572,7 +21675,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21581,7 +21684,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21592,7 +21695,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21601,7 +21704,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21610,7 +21713,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21619,7 +21722,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21628,7 +21731,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21637,7 +21740,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21646,7 +21749,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21655,7 +21758,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21664,7 +21767,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -21702,106 +21805,112 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip(" !MEDIAPLAYBACK.S.AS && !MEDIAPLAYBACK.S.VS "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the optional attribute(StartTime) in AttributeList"); + case 5: { + LogStep(5, "Read the optional attribute(StartTime) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the optional attribute(Duration) in AttributeList"); + case 6: { + LogStep(6, "Read the optional attribute(Duration) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the optional attribute(SampledPosition) in AttributeList"); + case 7: { + LogStep(7, "Read the optional attribute(SampledPosition) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read the optional attribute(PlaybackSpeed) in AttributeList"); + case 8: { + LogStep(8, "Read the optional attribute(PlaybackSpeed) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the optional attribute(SeekRangeEnd) in AttributeList"); + case 9: { + LogStep(9, "Read the optional attribute(SeekRangeEnd) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the optional attribute(SeekRangeStart) in AttributeList"); + case 10: { + LogStep(10, "Read the optional attribute(SeekRangeStart) in AttributeList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: AcceptedCommandList"); + case 11: { + LogStep(11, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read the optional command(StartOver) in AcceptedCommandList"); + case 12: { + LogStep(12, "Read the optional command(StartOver) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read the optional command(Previous) in AcceptedCommandList"); + case 13: { + LogStep(13, "Read the optional command(Previous) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read the optional command(Next) in AcceptedCommandList"); + case 14: { + LogStep(14, "Read the optional command(Next) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read the optional command(Rewind) in AcceptedCommandList"); + case 15: { + LogStep(15, "Read the optional command(Rewind) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read the optional command(FastForward) in AcceptedCommandList"); + case 16: { + LogStep(16, "Read the optional command(FastForward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read the optional command(SkipForward) in AcceptedCommandList"); + case 17: { + LogStep(17, "Read the optional command(SkipForward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read the optional command(SkipBackward) in AcceptedCommandList"); + case 18: { + LogStep(18, "Read the optional command(SkipBackward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read the optional command(Seek) in AcceptedCommandList"); + case 19: { + LogStep(19, "Read the optional command(Seek) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Read the global attribute: GeneratedCommandList"); + case 20: { + LogStep(20, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -22393,7 +22502,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { public: Test_TC_CONTENTLAUNCHER_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 9, credsIssuerConfig) + TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22444,12 +22553,21 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22462,7 +22580,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22471,7 +22589,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22480,7 +22598,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22489,7 +22607,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22498,7 +22616,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22536,41 +22654,48 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( !CONTENTLAUNCHER.S.CS && !CONTENTLAUNCHER.S.UP )"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the optional attribute(AcceptHeader): AttributeList"); + case 5: { + LogStep(5, "Read the optional attribute(AcceptHeader): AttributeList"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the optional attribute(SupportedStreamingProtocols): AttributeList"); + case 6: { + LogStep(6, "Read the optional attribute(SupportedStreamingProtocols): AttributeList"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the optional command(LaunchContent) in AcceptedCommandList attribute"); + case 7: { + LogStep(7, "Read the optional command(LaunchContent) in AcceptedCommandList attribute"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read the optional command(LaunchURL) in AcceptedCommandList attribute"); + case 8: { + LogStep(8, "Read the optional command(LaunchURL) in AcceptedCommandList attribute"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); + case 9: { + LogStep(9, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -25826,8 +25951,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); - AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); + AddArgument("targetvalue", 0, UINT8_MAX, &mTargetvalue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -25842,8 +25966,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; + chip::Optional mTargetvalue; chip::Optional mTimeout; chip::app::DataModel::DecodableList TargetListValues; @@ -25895,7 +26018,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U)); } break; default: @@ -25937,7 +26060,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("TGTNAV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U; + value.target = mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, value, chip::NullOptional @@ -28399,7 +28522,6 @@ class Test_TC_PS_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("PS.S.F00 || PS.S.F01 || PS.S.F02 || PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, chip::NullOptional); } @@ -32462,7 +32584,7 @@ class Test_TC_SC_4_2Suite : public TestCommand class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 7, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -32504,12 +32626,21 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -32517,7 +32648,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32533,7 +32664,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32548,7 +32679,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32556,7 +32687,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32592,35 +32723,42 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand } case 1: { LogStep(1, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)"), + VerifyOrDo(!ShouldSkip("!SWTCH.S.F00 && SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, + LogStep(2, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, + LogStep(3, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + LogStep(5, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + LogStep(6, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -33044,7 +33182,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 16, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -33091,6 +33229,15 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -33100,7 +33247,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 63UL)); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33116,7 +33263,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33125,7 +33272,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33134,7 +33281,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33143,7 +33290,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33152,7 +33299,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33161,7 +33308,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33172,7 +33319,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33183,7 +33330,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33194,7 +33341,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33205,7 +33352,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33214,7 +33361,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33226,7 +33373,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33263,83 +33410,90 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05"), + VerifyOrDo(!ShouldSkip("!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && !TSTAT.S.F04 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + LogStep(3, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Read the global attribute: AcceptedCommandList"); + LogStep(13, "Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); + case 15: { + LogStep(15, "Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read the global attribute: GeneratedCommandList"); + case 16: { + LogStep(16, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -36580,8 +36734,6 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand } case 2: { LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F00 || DGTHREAD.S.F01 || DGTHREAD.S.F02 || DGTHREAD.S.F03"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } @@ -38592,7 +38744,7 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand class Test_TC_DGWIFI_1_1Suite : public TestCommand { public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 10, credsIssuerConfig) + Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -38643,12 +38795,21 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38666,7 +38827,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38679,7 +38840,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38689,7 +38850,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38698,7 +38859,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38710,7 +38871,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38719,7 +38880,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38760,47 +38921,53 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand } case 2: { LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( !DGWIFI.S.F00 && !DGWIFI.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads AttributeList from DUT"); + LogStep(3, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "TH reads AttributeList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "TH reads AcceptedCommandList from DUT"); + LogStep(7, "TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); + case 9: { + LogStep(9, "TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH reads GeneratedCommandList from DUT"); + case 10: { + LogStep(10, "TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -68571,7 +68738,7 @@ class DL_SchedulesSuite : public TestCommand class Test_TC_DRLK_1_1Suite : public TestCommand { public: - Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 32, credsIssuerConfig) + Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 33, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -68622,12 +68789,21 @@ class Test_TC_DRLK_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4095UL)); } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4095UL)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68645,7 +68821,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68656,7 +68832,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68667,7 +68843,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68678,7 +68854,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68687,7 +68863,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68696,7 +68872,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68705,7 +68881,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68715,7 +68891,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68724,7 +68900,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68733,7 +68909,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68742,7 +68918,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68751,7 +68927,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68760,7 +68936,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68769,7 +68945,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68778,7 +68954,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68787,7 +68963,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68796,7 +68972,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68805,7 +68981,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68814,7 +68990,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68824,7 +69000,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68835,7 +69011,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68846,7 +69022,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68857,7 +69033,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68871,7 +69047,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68880,7 +69056,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68889,7 +69065,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68898,7 +69074,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68907,7 +69083,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -68946,180 +69122,188 @@ class Test_TC_DRLK_1_1Suite : public TestCommand } case 2: { LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !DRLK.S.F00 && !DRLK.S.F01 && !DRLK.S.F02 && !DRLK.S.F04 && !DRLK.S.F05 && !DRLK.S.F06 && " + "!DRLK.S.F07 && !DRLK.S.F08 && !DRLK.S.F10 && !DRLK.S.F11 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads the FeatureMap from DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01 || DRLK.S.F02 || DRLK.S.F04 || DRLK.S.F05 || DRLK.S.F06 || DRLK.S.F07 " "|| DRLK.S.F08 || DRLK.S.F10 || DRLK.S.F11"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "TH reads AttributeList from DUT"); + case 4: { + LogStep(4, "TH reads AttributeList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); + case 5: { + LogStep(5, "TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); + case 6: { + LogStep(6, "TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); + case 7: { + LogStep(7, "TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); + case 8: { + LogStep(8, "TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads Feature dependent(DRLK.S.F10) attribute in AttributeList"); + case 9: { + LogStep(9, "TH reads Feature dependent(DRLK.S.F10) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F10"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH reads Feature dependent(DRLK.S.F11) attribute in AttributeList"); + case 10: { + LogStep(10, "TH reads Feature dependent(DRLK.S.F11) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F11"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); + case 11: { + LogStep(11, "TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); + case 12: { + LogStep(12, "TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH reads optional attribute(Language) in AttributeList"); + case 13: { + LogStep(13, "TH reads optional attribute(Language) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH reads optional attribute(LEDSettings) in AttributeList"); + case 14: { + LogStep(14, "TH reads optional attribute(LEDSettings) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH reads optional attribute(AutoRelockTime) in AttributeList"); + case 15: { + LogStep(15, "TH reads optional attribute(AutoRelockTime) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH reads optional attribute(SoundVolume) in AttributeList"); + case 16: { + LogStep(16, "TH reads optional attribute(SoundVolume) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); + case 17: { + LogStep(17, "TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "TH reads optional attribute(EnableLocalProgramming) in AttributeList"); + case 18: { + LogStep(18, "TH reads optional attribute(EnableLocalProgramming) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); + case 19: { + LogStep(19, "TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); + case 20: { + LogStep(20, "TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); + case 21: { + LogStep(21, "TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); + case 22: { + LogStep(22, "TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH reads AcceptedCommandList from DUT"); + case 23: { + LogStep(23, "TH reads AcceptedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); + case 24: { + LogStep(24, "TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH reads Feature dependent commands(DRLK.S.F10) in AcceptedCommandList"); + case 25: { + LogStep(25, "TH reads Feature dependent commands(DRLK.S.F10) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F10"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "TH reads Feature dependent commands(DRLK.S.F11) in AcceptedCommandList"); + case 26: { + LogStep(26, "TH reads Feature dependent commands(DRLK.S.F11) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F11"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); + case 27: { + LogStep(27, "TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); + case 28: { + LogStep(28, "TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); + case 29: { + LogStep(29, "TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "TH reads Feature dependent command(DRLK.S.F10) in GeneratedCommandList"); + case 30: { + LogStep(30, "TH reads Feature dependent command(DRLK.S.F10) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F10"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "TH reads Feature dependent command(DRLK.S.F11) in GeneratedCommandList"); + case 31: { + LogStep(31, "TH reads Feature dependent command(DRLK.S.F11) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F11"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); + case 32: { + LogStep(32, "TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -82401,26 +82585,31 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand { public: Test_TC_CADMIN_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_11", 0, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_11", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); } ~Test_TC_CADMIN_1_11Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } private: chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82434,6 +82623,106 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82449,6 +82738,240 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 4: { + LogStep(4, "TH_CR3 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); + } + case 5: { + LogStep(5, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = chip::Span("payload --commissioner-name betagarbage: not in length on purpose", 33); + return PairWithCode(kIdentityBeta, value); + } + case 8: { + LogStep(8, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 9: { + LogStep(9, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 10: { + LogStep(10, + "Before the expiration of PIXIT.CADMIN.CwDuration seconds which was set in step 5, TH_CR1 opens a 2nd " + "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 11: { + LogStep(11, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 12: { + LogStep(12, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, + "TH_CR1 re-opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration " + "seconds using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 14: { + LogStep(14, + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 10, TH_CR3 opens a 2nd " + "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 11"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 17: { + LogStep(17, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 18: { + LogStep(18, + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 14, TH_CR2 opens a second " + "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } @@ -82572,11 +83095,15 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { public: Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_15", 0, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_15", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -82589,8 +83116,12 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mCluster; + chip::Optional mNodeId2; + chip::Optional mNodeId3; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mPakeVerifier; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82605,6 +83136,131 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82620,6 +83276,201 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 4: { + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 5: { + LogStep(5, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH_CR3 Commissions with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); + } + case 8: { + LogStep(8, "DUT_CE is commissioned to TH_CR3"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); + } + case 9: { + LogStep(9, "TH_CR2 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 10: { + LogStep(10, "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = 2U; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 12: { + LogStep(12, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 14: { + LogStep(14, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 16: { + LogStep(16, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 17: { + LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -82629,11 +83480,14 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand { public: Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_16", 0, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_16", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -82646,8 +83500,11 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mCluster; + chip::Optional mNodeId2; + chip::Optional mNodeId3; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82662,6 +83519,131 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82677,6 +83659,168 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 4: { + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 5: { + LogStep(5, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH_CR3 Commissions with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); + } + case 8: { + LogStep(8, "DUT_CE is commissioned to TH_CR3"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); + } + case 9: { + LogStep(9, "TH_CR2 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 10: { + LogStep(10, "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = 2U; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 12: { + LogStep(12, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 14: { + LogStep(14, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 16: { + LogStep(16, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 17: { + LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -82914,26 +84058,23 @@ class Test_TC_CADMIN_1_21Suite : public TestCommand { public: Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_21", 0, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_21", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); } ~Test_TC_CADMIN_1_21Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } private: chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82947,6 +84088,44 @@ class Test_TC_CADMIN_1_21Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82962,6 +84141,75 @@ class Test_TC_CADMIN_1_21Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 900U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Wait for commissioning Window to 901 seconds"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 901000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 901U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -82971,26 +84219,25 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand { public: Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_22", 0, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_22", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("PakeVerifier", &mPakeVerifier); } ~Test_TC_CADMIN_1_22Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } private: chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -83004,6 +84251,44 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -83019,6 +84304,97 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 900U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Wait for commissioning Window to 901 seconds"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 901000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 901U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221(10000), chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -84260,7 +85636,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Commission from beta"); + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -85923,7 +87299,7 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand ~Test_TC_CADMIN_1_23Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } private: chip::Optional mNodeId; @@ -86035,7 +87411,7 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand ); } case 4: { - LogStep(4, "Wait for commissioning Window to 301 seconds"); + LogStep(4, "Wait for commissioning Window to 181 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 181000UL; @@ -86085,7 +87461,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand ~Test_TC_CADMIN_1_24Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } private: chip::Optional mNodeId; @@ -86209,7 +87585,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand ); } case 4: { - LogStep(4, "Wait for commissioning Window to 301 seconds"); + LogStep(4, "Wait for commissioning Window to 181 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 181000UL; 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 7f5059b72519be..3e6b294d6b85c1 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -3239,6 +3239,11 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { 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(); }]; @@ -3258,8 +3263,6 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { 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, 2UL)); NextTest(); @@ -3595,328 +3598,336 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )")) { + if (ShouldSkip("( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 )")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentHue) in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(CurrentHue) in AttributeList\n"); if (ShouldSkip("CC.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentHueInAttributeList_4(); + err = TestReadTheOptionalAttributeCurrentHueInAttributeList_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(CurrentSaturation) in AttributeList\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentSaturation) in AttributeList\n"); if (ShouldSkip("CC.S.A0001")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentSaturationInAttributeList_5(); + err = TestReadTheOptionalAttributeCurrentSaturationInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(RemainingTime) in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(RemainingTime) in AttributeList\n"); if (ShouldSkip("CC.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeRemainingTimeInAttributeList_6(); + err = TestReadTheOptionalAttributeRemainingTimeInAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(CurrentX) in AttributeList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(CurrentX) in AttributeList\n"); if (ShouldSkip("CC.S.A0003")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentXInAttributeList_7(); + err = TestReadTheOptionalAttributeCurrentXInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(CurrentY) in AttributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(CurrentY) in AttributeList\n"); if (ShouldSkip("CC.S.A0004")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentYInAttributeList_8(); + err = TestReadTheOptionalAttributeCurrentYInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(DriftCompensation) in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(DriftCompensation) in AttributeList\n"); if (ShouldSkip("CC.S.A0005")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDriftCompensationInAttributeList_9(); + err = TestReadTheOptionalAttributeDriftCompensationInAttributeList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(CompensationText) in AttributeList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(CompensationText) in AttributeList\n"); if (ShouldSkip("CC.S.A0006")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCompensationTextInAttributeList_10(); + err = TestReadTheOptionalAttributeCompensationTextInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the optional attribute(ColorTemperatureMireds) in AttributeList\n"); + chipTool, " ***** Test Step 12 : Read the optional attribute(ColorTemperatureMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A0007")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_11(); + err = TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute(EnhancedCurrentHue) in AttributeList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute(EnhancedCurrentHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_12(); + err = TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute(ColorLoopActive) in AttributeList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute(ColorLoopActive) in AttributeList\n"); if (ShouldSkip("CC.S.A4002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorLoopActiveInAttributeList_13(); + err = TestReadTheOptionalAttributeColorLoopActiveInAttributeList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute(ColorLoopDirection) in AttributeList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute(ColorLoopDirection) in AttributeList\n"); if (ShouldSkip("CC.S.A4003")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_14(); + err = TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute(ColorLoopTime) in AttributeList\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional attribute(ColorLoopTime) in AttributeList\n"); if (ShouldSkip("CC.S.A4004")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorLoopTimeInAttributeList_15(); + err = TestReadTheOptionalAttributeColorLoopTimeInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 16 : Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList\n"); + chipTool, " ***** Test Step 17 : Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4005")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_16(); + err = TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress( - chipTool, " ***** Test Step 17 : Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList\n"); + chipTool, " ***** Test Step 18 : Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4006")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_17(); + err = TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress( - chipTool, " ***** Test Step 18 : Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList\n"); + chipTool, " ***** Test Step 19 : Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400b")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_18(); + err = TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_19(); break; - case 19: + case 20: ChipLogProgress( - chipTool, " ***** Test Step 19 : Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList\n"); + chipTool, " ***** Test Step 20 : Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400c")) { NextTest(); return; } - err = TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_19(); + err = TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress( - chipTool, " ***** Test Step 20 : Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList\n"); + chipTool, " ***** Test Step 21 : Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400d")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_20(); + err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_21(); break; - case 21: + case 22: ChipLogProgress( - chipTool, " ***** Test Step 21 : Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList\n"); + chipTool, " ***** Test Step 22 : Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A4010")) { NextTest(); return; } - err = TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_21(); + err = TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_22(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read the optional command(MoveToHue) in AcceptedCommandList\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Read the optional command(MoveToHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C00.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_22(); + err = TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_23(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read the optional command(MoveHue) in AcceptedCommandList\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read the optional command(MoveHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C01.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveHueInAcceptedCommandList_23(); + err = TestReadTheOptionalCommandMoveHueInAcceptedCommandList_24(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read the optional command(StepHue) in AcceptedCommandList\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Read the optional command(StepHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C02.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStepHueInAcceptedCommandList_24(); + err = TestReadTheOptionalCommandStepHueInAcceptedCommandList_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the optional command(MoveToSaturation) in AcceptedCommandList\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read the optional command(MoveToSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_25(); + err = TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_26(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the optional command(MoveSaturation) in AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Read the optional command(MoveSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C04.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_26(); + err = TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read the optional command(StepSaturation) in AcceptedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read the optional command(StepSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C05.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_27(); + err = TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_28(); break; - case 28: + case 29: ChipLogProgress( - chipTool, " ***** Test Step 28 : Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 29 : Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C06.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_28(); + err = TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_29(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read the optional command(MoveToColor) in AcceptedCommandList\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read the optional command(MoveToColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C07.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_29(); + err = TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_30(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read the optional command(MoveColor) in AcceptedCommandList\n"); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Read the optional command(MoveColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C08.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveColorInAcceptedCommandList_30(); + err = TestReadTheOptionalCommandMoveColorInAcceptedCommandList_31(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read the optional command(StepColor) in AcceptedCommandList\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read the optional command(StepColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C09.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStepColorInAcceptedCommandList_31(); + err = TestReadTheOptionalCommandStepColorInAcceptedCommandList_32(); break; - case 32: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 32 : Read the optional command(MoveToColorTemperature) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 33 : Read the optional command(MoveToColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C0a.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_32(); + err = TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_33(); break; - case 33: + case 34: ChipLogProgress( - chipTool, " ***** Test Step 33 : Read the optional command(EnhancedMoveToHue) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 34 : Read the optional command(EnhancedMoveToHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C40.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_33(); + err = TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_34(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read the optional command(EnhancedMoveHue) in AcceptedCommandList\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Read the optional command(EnhancedMoveHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C41.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_34(); + err = TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_35(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read the optional command(EnhancedStepHue) in AcceptedCommandList\n"); + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read the optional command(EnhancedStepHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C42.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_35(); + err = TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_36(); break; - case 36: + case 37: ChipLogProgress(chipTool, - " ***** Test Step 36 : Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList\n"); + " ***** Test Step 37 : Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C43.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_36(); + err = TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_37(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read the optional command(ColorLoopSet) in AcceptedCommandList\n"); + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read the optional command(ColorLoopSet) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C44.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_37(); + err = TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_38(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read the optional command(StopMoveStep) in AcceptedCommandList\n"); + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Read the optional command(StopMoveStep) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C47.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_38(); + err = TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_39(); break; - case 39: + case 40: ChipLogProgress( - chipTool, " ***** Test Step 39 : Read the optional command(MoveColorTemperature) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 40 : Read the optional command(MoveColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_39(); + err = TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_40(); break; - case 40: + case 41: ChipLogProgress( - chipTool, " ***** Test Step 40 : Read the optional command(StepColorTemperature) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 41 : Read the optional command(StepColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C4c.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_40(); + err = TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_41(); break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_41(); + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_42(); break; } @@ -4055,6 +4066,9 @@ class Test_TC_CC_1_1 : public TestCommandBridge { case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -4068,7 +4082,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 42; + const uint16_t mTestCount = 43; chip::Optional mNodeId; chip::Optional mCluster; @@ -4120,8 +4134,33 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); NextTest(); @@ -4130,7 +4169,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4160,7 +4199,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentHueInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeCurrentHueInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4182,7 +4221,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentSaturationInAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeCurrentSaturationInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4204,7 +4243,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeRemainingTimeInAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeRemainingTimeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4226,7 +4265,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentXInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeCurrentXInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4248,7 +4287,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentYInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeCurrentYInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4270,7 +4309,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDriftCompensationInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeDriftCompensationInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4292,7 +4331,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCompensationTextInAttributeList_10() + CHIP_ERROR TestReadTheOptionalAttributeCompensationTextInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4314,7 +4353,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_11() + CHIP_ERROR TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4336,7 +4375,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_12() + CHIP_ERROR TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4358,7 +4397,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorLoopActiveInAttributeList_13() + CHIP_ERROR TestReadTheOptionalAttributeColorLoopActiveInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4380,7 +4419,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_14() + CHIP_ERROR TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4402,7 +4441,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorLoopTimeInAttributeList_15() + CHIP_ERROR TestReadTheOptionalAttributeColorLoopTimeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4424,7 +4463,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_16() + CHIP_ERROR TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4446,7 +4485,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_17() + CHIP_ERROR TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4468,7 +4507,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_18() + CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4490,7 +4529,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_19() + CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4512,7 +4551,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_20() + CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4534,7 +4573,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_21() + CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4556,7 +4595,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_22() + CHIP_ERROR TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4578,7 +4617,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveHueInAcceptedCommandList_23() + CHIP_ERROR TestReadTheOptionalCommandMoveHueInAcceptedCommandList_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4600,7 +4639,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStepHueInAcceptedCommandList_24() + CHIP_ERROR TestReadTheOptionalCommandStepHueInAcceptedCommandList_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4622,7 +4661,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_25() + CHIP_ERROR TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4644,7 +4683,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_26() + CHIP_ERROR TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4666,7 +4705,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_27() + CHIP_ERROR TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4688,7 +4727,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_28() + CHIP_ERROR TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4710,7 +4749,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_29() + CHIP_ERROR TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4732,7 +4771,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveColorInAcceptedCommandList_30() + CHIP_ERROR TestReadTheOptionalCommandMoveColorInAcceptedCommandList_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4754,7 +4793,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStepColorInAcceptedCommandList_31() + CHIP_ERROR TestReadTheOptionalCommandStepColorInAcceptedCommandList_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4776,7 +4815,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_32() + CHIP_ERROR TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4798,7 +4837,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_33() + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4820,7 +4859,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_34() + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4842,7 +4881,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_35() + CHIP_ERROR TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4864,7 +4903,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_36() + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4886,7 +4925,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_37() + CHIP_ERROR TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4908,7 +4947,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_38() + CHIP_ERROR TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4930,7 +4969,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_39() + CHIP_ERROR TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4952,7 +4991,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_40() + CHIP_ERROR TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -4974,7 +5013,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_41() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -21305,6 +21344,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { 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(); @@ -24279,92 +24319,100 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 ")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); + " ***** Test Step 5 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); if (ShouldSkip("LVL.S.F01")) { NextTest(); return; } - err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4(); + err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " + " ***** Test Step 6 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " "AttributeList\n"); if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5(); + err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(MinLevel) in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MinLevel) in AttributeList\n"); if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMinLevelInAttributeList_6(); + err = TestReadTheOptionalAttributeMinLevelInAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MaxLevel) in AttributeList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(MaxLevel) in AttributeList\n"); if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestReadTheOptionalAttributeMaxLevelInAttributeList_7(); + err = TestReadTheOptionalAttributeMaxLevelInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8(); + err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9(); + err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10(); + err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_12(); break; case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_13(); + break; + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); + err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_14(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -24422,6 +24470,9 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -24435,7 +24486,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -24488,7 +24539,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); NextTest(); @@ -24497,7 +24548,32 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"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 TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24514,6 +24590,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + 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(); }]; @@ -24521,7 +24602,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24544,7 +24625,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24568,7 +24649,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24590,7 +24671,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24612,7 +24693,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24634,7 +24715,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24656,7 +24737,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10() + CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24678,7 +24759,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11() + CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24700,7 +24781,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24729,7 +24810,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13() + CHIP_ERROR TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24751,7 +24832,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_14() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26499,345 +26580,337 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends Off command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " + " ***** Test Step 6 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " "(immediate)\n"); if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_5(); + err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_6(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentLevel attribute from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_7(); + err = TestThReadsCurrentLevelAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends On command to DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends On command to DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_8(); + err = TestThSendsOnCommandToDut_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + " ***** Test Step 10 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentLevel attribute from DUT\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_10(); + err = TestThReadsCurrentLevelAttributeFromDut_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " + " ***** Test Step 12 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " "This means the level should increase by 150 units in 30s, so 5 units/s\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10000ms\n"); - err = TestWait10000ms_12(); + err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10000ms\n"); + err = TestWait10000ms_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); - err = TestWait10000ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_15(); + err = TestThReadsCurrentLevelAttributeFromDut_14(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); - err = TestWait10000ms_16(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10000ms\n"); + err = TestWait10000ms_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_17(); + err = TestThReadsCurrentLevelAttributeFromDut_16(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); - err = TestWait5000ms_18(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10000ms\n"); + err = TestWait10000ms_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_19(); + err = TestThReadsCurrentLevelAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 5000ms\n"); + err = TestWait5000ms_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } err = TestThReadsCurrentLevelAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_21(); + err = TestThReadsCurrentLevelAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads Options attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : TH writes 0 to the Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_22(); + err = TestThWrites0ToTheOptionsAttribute_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_23(); + err = TestThReadsOptionsAttribute_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_24(); + err = TestThSendsOnCommandToDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_25(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_26(); + err = TestThReadsCurrentLevelAttributeFromDut_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_27(); + err = TestThSendsOffCommandToDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_28(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_29(); + err = TestThReadsCurrentLevelAttributeFromDut_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_30(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_31(); + err = TestThReadsCurrentLevelAttributeFromDut_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 32 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_32(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH writes 1 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThWrites1ToTheOptionsAttribute_33(); + err = TestThReadsCurrentLevelAttributeFromDut_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads Options attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 34 : TH writes 1 to the Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_34(); + err = TestThWrites1ToTheOptionsAttribute_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_35(); + err = TestThReadsOptionsAttribute_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 36 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_36(); + err = TestThSendsOnCommandToDut_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_37(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_38(); + err = TestThReadsCurrentLevelAttributeFromDut_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 39 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_39(); + err = TestThSendsOffCommandToDut_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 40 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_40(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 41 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_41(); + err = TestThReadsCurrentLevelAttributeFromDut_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 42 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_42(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 43 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_43(); + err = TestThReadsCurrentLevelAttributeFromDut_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 44 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_44(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOffCommand_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 45 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_46(); + err = TestThReadsCurrentLevelAttributeFromDut_45(); break; } @@ -26988,9 +27061,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -27004,7 +27074,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 47; + const uint16_t mTestCount = 46; chip::Optional mNodeId; chip::Optional mCluster; @@ -27057,7 +27127,30 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27079,7 +27172,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_4() + CHIP_ERROR TestThSendsOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27096,7 +27189,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_5() + CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27123,7 +27216,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_6() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27145,7 +27238,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27170,7 +27263,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_8() + CHIP_ERROR TestThSendsOnCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27187,7 +27280,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27213,7 +27306,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27239,7 +27332,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } CHIP_ERROR - TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_11() + TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27266,14 +27359,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_12() + CHIP_ERROR TestWait10000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27298,14 +27391,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_14() + CHIP_ERROR TestWait10000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27330,14 +27423,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_16() + CHIP_ERROR TestWait10000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27362,14 +27455,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_18() + CHIP_ERROR TestWait5000ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27394,7 +27487,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27419,7 +27512,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_21() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27441,7 +27534,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_22() + CHIP_ERROR TestThReadsOptionsAttribute_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27465,7 +27558,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_23() + CHIP_ERROR TestThSendsOnCommandToDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27482,7 +27575,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_24() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27507,7 +27600,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_25() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27532,7 +27625,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_26() + CHIP_ERROR TestThSendsOffCommandToDut_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27549,7 +27642,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_27() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27574,7 +27667,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_28() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27599,7 +27692,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_29() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27624,7 +27717,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_30() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27649,7 +27742,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_31() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27674,7 +27767,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_32() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27699,7 +27792,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1ToTheOptionsAttribute_33() + CHIP_ERROR TestThWrites1ToTheOptionsAttribute_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27721,7 +27814,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_34() + CHIP_ERROR TestThReadsOptionsAttribute_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27745,7 +27838,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_35() + CHIP_ERROR TestThSendsOnCommandToDut_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27762,7 +27855,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_36() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27787,7 +27880,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_37() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27812,7 +27905,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_38() + CHIP_ERROR TestThSendsOffCommandToDut_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27829,7 +27922,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_39() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27854,7 +27947,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_40() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27879,7 +27972,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_41() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27904,7 +27997,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_42() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27929,7 +28022,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_43() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27954,7 +28047,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_44() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -27978,45 +28071,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestPreconditionSendOffCommand_45() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_46() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_LVL_4_1 : public TestCommandBridge { @@ -28078,163 +28132,171 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the MaxLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsTheMaxLevelAttributeFromTheDut_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the MaxLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_5(); + err = TestThReadsTheMaxLevelAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)\n"); - if (ShouldSkip("LVL.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_6(); + err = TestThSendsOffCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)\n"); + if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); + err = TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_8(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); - err = TestWait5000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_10(); + err = TestThReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends On command to DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends On command to DUT\n"); if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_11(); + err = TestThSendsOnCommandToDut_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + " ***** Test Step 13 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_12(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_13(); + err = TestThReadsCurrentLevelAttributeFromDut_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)\n"); + " ***** Test Step 15 : TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)\n"); if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10s\n"); - err = TestWait10s_15(); + err = TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10s\n"); - err = TestWait10s_17(); + err = TestThReadsCurrentLevelAttributeFromDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 10s\n"); - err = TestWait10s_19(); + err = TestThReadsCurrentLevelAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 13s\n"); - err = TestWait13s_21(); + err = TestThReadsCurrentLevelAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 13s\n"); + err = TestWait13s_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_22(); + err = TestThReadsCurrentLevelAttributeFromDut_23(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Precondition send Off Command\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_23(); + err = TestPreconditionSendOffCommand_24(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Check on/off attribute value is false after off command\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_24(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25(); break; } @@ -28322,6 +28384,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -28335,7 +28400,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -28388,7 +28453,30 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28410,7 +28498,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheMaxLevelAttributeFromTheDut_4() + CHIP_ERROR TestThReadsTheMaxLevelAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28433,7 +28521,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_5() + CHIP_ERROR TestThSendsOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28450,7 +28538,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_6() + CHIP_ERROR TestThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28477,7 +28565,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28500,7 +28588,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28527,14 +28615,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_9() + CHIP_ERROR TestWait5000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28559,7 +28647,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_11() + CHIP_ERROR TestThSendsOnCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28576,7 +28664,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_12() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28602,7 +28690,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28627,7 +28715,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_14() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28652,14 +28740,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_15() + CHIP_ERROR TestWait10s_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_16() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28684,14 +28772,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_17() + CHIP_ERROR TestWait10s_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_18() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28716,14 +28804,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_19() + CHIP_ERROR TestWait10s_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28748,14 +28836,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait13s_21() + CHIP_ERROR TestWait13s_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 13000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_22() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28780,7 +28868,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_23() + CHIP_ERROR TestPreconditionSendOffCommand_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28797,7 +28885,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_24() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28879,146 +28967,154 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " + " ***** Test Step 6 : TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " "TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_5(); + err = TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); if (ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_6(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends On command to DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends On command to DUT\n"); if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_7(); + err = TestThSendsOnCommandToDut_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + " ***** Test Step 9 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_8(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads current level attribute from DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_9(); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " + " ***** Test Step 11 : TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " "TransitionTime =300\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 10s\n"); - err = TestWait10s_11(); + err = TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); + err = TestWait10s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10s\n"); - err = TestWait10s_13(); + err = TestThReadsCurrentLevelAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); + err = TestWait10s_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10s\n"); - err = TestWait10s_15(); + err = TestThReadsCurrentLevelAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 5000ms\n"); - err = TestWait5000ms_17(); + err = TestThReadsCurrentLevelAttributeFromDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); + err = TestWait5000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_18(); + err = TestThReadsCurrentLevelAttributeFromDut_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)\n"); + " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)\n"); if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_19(); + err = TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Precondition send Off Command\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_20(); + err = TestPreconditionSendOffCommand_21(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -29097,6 +29193,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -29110,7 +29209,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -29163,7 +29262,30 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29185,7 +29307,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_4() + CHIP_ERROR TestThSendsOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29202,7 +29324,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_5() + CHIP_ERROR TestThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29230,7 +29352,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_6() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29252,7 +29374,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_7() + CHIP_ERROR TestThSendsOnCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29269,7 +29391,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_8() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29295,7 +29417,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29320,7 +29442,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_10() + CHIP_ERROR TestThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29349,14 +29471,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_11() + CHIP_ERROR TestWait10s_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_12() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29381,14 +29503,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_13() + CHIP_ERROR TestWait10s_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29413,14 +29535,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_15() + CHIP_ERROR TestWait10s_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_16() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29445,14 +29567,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_17() + CHIP_ERROR TestWait5000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_18() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29477,7 +29599,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_19() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29502,7 +29624,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_20() + CHIP_ERROR TestPreconditionSendOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29519,7 +29641,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29601,129 +29723,137 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_4(); + err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + " ***** Test Step 6 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_5(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentLevel attribute from DUT\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_6(); + err = TestThReadsCurrentLevelAttributeFromDut_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " + " ***** Test Step 8 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " "Rate field set to 0x05 (5 units/s)\n"); if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 5000ms\n"); - err = TestWait5000ms_8(); + err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); + err = TestWait5000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Sends stop command to DUT\n"); if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_9(); + err = TestSendsStopCommandToDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Physically verify that the device has stopped transitioning\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_11(); + err = TestThReadsCurrentLevelAttributeFromDut_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " + " ***** Test Step 13 : TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " "Rate field set to 0x05 (5 units/s)\n"); if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); - err = TestWait5000ms_13(); + err = TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends a StopWithOnOff command to the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 5000ms\n"); + err = TestWait5000ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends a StopWithOnOff command to the DUT\n"); if (ShouldSkip("LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsAStopWithOnOffCommandToTheDut_14(); + err = TestThSendsAStopWithOnOffCommandToTheDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Physically verify that the device has stopped transitioning\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Physically verify that the device has stopped transitioning\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentLevel attribute from DUT\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_16(); + err = TestReadsCurrentLevelAttributeFromDut_17(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Precondition send Off Command\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_17(); + err = TestPreconditionSendOffCommand_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is false after off command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); break; } @@ -29793,6 +29923,9 @@ class Test_TC_LVL_6_1 : 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. @@ -29806,7 +29939,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -29859,7 +29992,30 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29881,7 +30037,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_4() + CHIP_ERROR TestThSendsOnCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29898,7 +30054,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_5() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29924,7 +30080,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29949,7 +30105,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_7() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -29976,14 +30132,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_8() + CHIP_ERROR TestWait5000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_9() + CHIP_ERROR TestSendsStopCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -30006,7 +30162,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_11() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30015,7 +30171,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -30040,7 +30196,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_12() + CHIP_ERROR TestThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -30067,14 +30223,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_13() + CHIP_ERROR TestWait5000ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThSendsAStopWithOnOffCommandToTheDut_14() + CHIP_ERROR TestThSendsAStopWithOnOffCommandToTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -30097,7 +30253,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30106,7 +30262,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_16() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -30131,7 +30287,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_17() + CHIP_ERROR TestPreconditionSendOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30148,7 +30304,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30841,23 +30997,31 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { + if (ShouldSkip(" !KEYPADINPUT.S.NV && KEYPADINPUT.S.LK && !KEYPADINPUT.S.NK ")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -30888,6 +31052,9 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30901,7 +31068,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -30953,8 +31120,33 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); NextTest(); @@ -30963,7 +31155,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -30989,7 +31181,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -31011,7 +31203,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -32004,72 +32196,80 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI")) { + if (ShouldSkip("( !CHANNEL.S.CL && !CHANNEL.S.LI )")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(ChannelList): AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(ChannelList): AttributeList\n"); if (ShouldSkip("CHANNEL.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeChannelListAttributeList_4(); + err = TestReadTheOptionalAttributeChannelListAttributeList_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reading optional attribute(Lineup) in AttributeList\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reading optional attribute(Lineup) in AttributeList\n"); if (ShouldSkip("CHANNEL.S.A0001")) { NextTest(); return; } - err = TestReadingOptionalAttributeLineupInAttributeList_5(); + err = TestReadingOptionalAttributeLineupInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(CurrentChannel): AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(CurrentChannel): AttributeList\n"); if (ShouldSkip("CHANNEL.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeCurrentChannelAttributeList_6(); + err = TestReadTheOptionalAttributeCurrentChannelAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional command(ChangeChannel) in AcceptedCommandList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional command(ChangeChannel) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_7(); + err = TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 9 : Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_8(); + err = TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional command(SkipChannel) in AcceptedCommandList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional command(SkipChannel) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_9(); + err = TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("CHANNEL.S.CL || CHANNEL.S.LI")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_10(); + err = TestReadTheGlobalAttributeGeneratedCommandList_11(); break; } @@ -32115,6 +32315,9 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { 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. @@ -32128,7 +32331,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -32171,13 +32374,36 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"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 TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); NextTest(); @@ -32186,7 +32412,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32210,7 +32436,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeChannelListAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeChannelListAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32230,7 +32456,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadingOptionalAttributeLineupInAttributeList_5() + CHIP_ERROR TestReadingOptionalAttributeLineupInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32250,7 +32476,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCurrentChannelAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeCurrentChannelAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32270,7 +32496,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_7() + CHIP_ERROR TestReadTheOptionalCommandChangeChannelInAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32290,7 +32516,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_8() + CHIP_ERROR TestReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32310,7 +32536,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_9() + CHIP_ERROR TestReadTheOptionalCommandSkipChannelInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32330,7 +32556,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32399,135 +32625,143 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS")) { + if (ShouldSkip(" !MEDIAPLAYBACK.S.AS && !MEDIAPLAYBACK.S.VS ")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(StartTime) in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(StartTime) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0001")) { NextTest(); return; } - err = TestReadTheOptionalAttributeStartTimeInAttributeList_4(); + err = TestReadTheOptionalAttributeStartTimeInAttributeList_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(Duration) in AttributeList\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(Duration) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0002")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDurationInAttributeList_5(); + err = TestReadTheOptionalAttributeDurationInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(SampledPosition) in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(SampledPosition) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSampledPositionInAttributeList_6(); + err = TestReadTheOptionalAttributeSampledPositionInAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(PlaybackSpeed) in AttributeList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(PlaybackSpeed) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { NextTest(); return; } - err = TestReadTheOptionalAttributePlaybackSpeedInAttributeList_7(); + err = TestReadTheOptionalAttributePlaybackSpeedInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(SeekRangeEnd) in AttributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(SeekRangeEnd) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0005")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSeekRangeEndInAttributeList_8(); + err = TestReadTheOptionalAttributeSeekRangeEndInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(SeekRangeStart) in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(SeekRangeStart) in AttributeList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.A0006")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSeekRangeStartInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_10(); + err = TestReadTheOptionalAttributeSeekRangeStartInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional command(StartOver) in AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional command(StartOver) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandStartOverInAcceptedCommandList_11(); + err = TestReadTheOptionalCommandStartOverInAcceptedCommandList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional command(Previous) in AcceptedCommandList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional command(Previous) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandPreviousInAcceptedCommandList_12(); + err = TestReadTheOptionalCommandPreviousInAcceptedCommandList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional command(Next) in AcceptedCommandList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional command(Next) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandNextInAcceptedCommandList_13(); + err = TestReadTheOptionalCommandNextInAcceptedCommandList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional command(Rewind) in AcceptedCommandList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command(Rewind) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandRewindInAcceptedCommandList_14(); + err = TestReadTheOptionalCommandRewindInAcceptedCommandList_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional command(FastForward) in AcceptedCommandList\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional command(FastForward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandFastForwardInAcceptedCommandList_15(); + err = TestReadTheOptionalCommandFastForwardInAcceptedCommandList_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read the optional command(SkipForward) in AcceptedCommandList\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read the optional command(SkipForward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_16(); + err = TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_17(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read the optional command(SkipBackward) in AcceptedCommandList\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional command(SkipBackward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_17(); + err = TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the optional command(Seek) in AcceptedCommandList\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the optional command(Seek) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } - err = TestReadTheOptionalCommandSeekInAcceptedCommandList_18(); + err = TestReadTheOptionalCommandSeekInAcceptedCommandList_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_19(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_20(); break; } @@ -32600,6 +32834,9 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32613,7 +32850,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -32665,8 +32902,33 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); NextTest(); @@ -32675,7 +32937,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32702,7 +32964,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeStartTimeInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeStartTimeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32724,7 +32986,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDurationInAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeDurationInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32746,7 +33008,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSampledPositionInAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeSampledPositionInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32768,7 +33030,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributePlaybackSpeedInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributePlaybackSpeedInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32790,7 +33052,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSeekRangeEndInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeSeekRangeEndInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32812,7 +33074,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSeekRangeStartInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeSeekRangeStartInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32834,7 +33096,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32858,7 +33120,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_11() + CHIP_ERROR TestReadTheOptionalCommandStartOverInAcceptedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32880,7 +33142,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandPreviousInAcceptedCommandList_12() + CHIP_ERROR TestReadTheOptionalCommandPreviousInAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32902,7 +33164,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_13() + CHIP_ERROR TestReadTheOptionalCommandNextInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32924,7 +33186,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_14() + CHIP_ERROR TestReadTheOptionalCommandRewindInAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32946,7 +33208,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_15() + CHIP_ERROR TestReadTheOptionalCommandFastForwardInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32968,7 +33230,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_16() + CHIP_ERROR TestReadTheOptionalCommandSkipForwardInAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -32990,7 +33252,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_17() + CHIP_ERROR TestReadTheOptionalCommandSkipBackwardInAcceptedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -33012,7 +33274,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_18() + CHIP_ERROR TestReadTheOptionalCommandSeekInAcceptedCommandList_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -33034,7 +33296,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_19() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -34080,54 +34342,62 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP")) { + if (ShouldSkip("( !CONTENTLAUNCHER.S.CS && !CONTENTLAUNCHER.S.UP )")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(AcceptHeader): AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(AcceptHeader): AttributeList\n"); if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { NextTest(); return; } - err = TestReadTheOptionalAttributeAcceptHeaderAttributeList_4(); + err = TestReadTheOptionalAttributeAcceptHeaderAttributeList_5(); break; - case 5: + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); + chipTool, " ***** Test Step 6 : Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { NextTest(); return; } - err = TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_5(); + err = TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); + chipTool, " ***** Test Step 7 : Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); if (ShouldSkip("CONTENTLAUNCHER.C.C0000")) { NextTest(); return; } - err = TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_6(); + err = TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_7(); break; - case 7: + case 8: ChipLogProgress( - chipTool, " ***** Test Step 7 : Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); + chipTool, " ***** Test Step 8 : Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); if (ShouldSkip("CONTENTLAUNCHER.C.C0001")) { NextTest(); return; } - err = TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_7(); + err = TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_9(); break; } @@ -34167,6 +34437,9 @@ class Test_TC_CONTENTLAUNCHER_1_11 : 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; } // Go on to the next test. @@ -34180,7 +34453,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -34232,8 +34505,33 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); NextTest(); @@ -34242,7 +34540,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -34268,7 +34566,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeAcceptHeaderAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeAcceptHeaderAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -34290,7 +34588,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -34312,7 +34610,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_6() + CHIP_ERROR TestReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -34334,7 +34632,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_7() + CHIP_ERROR TestReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -34356,7 +34654,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -39202,8 +39500,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); - AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); + AddArgument("targetvalue", 0, UINT8_MAX, &mTargetvalue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -39312,8 +39609,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; + chip::Optional mTargetvalue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -39380,8 +39676,8 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] - : [NSNumber numberWithUnsignedChar:1U]; + params.target = mTargetvalue.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue.Value()] + : [NSNumber numberWithUnsignedChar:1U]; [cluster navigateTargetWithParams:params completionHandler:^( MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { @@ -39410,7 +39706,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U)); } NextTest(); @@ -43461,10 +43757,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("PS.S.F00 || PS.S.F01 || PS.S.F02 || PS.S.F03")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: @@ -49987,39 +50279,48 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); - if (ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)")) { + if (ShouldSkip("!SWTCH.S.F00 && SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("SWTCH.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 2 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); + if (ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("!SWTCH.S.F04")) { + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_7(); break; } @@ -50053,6 +50354,9 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { 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. @@ -50066,7 +50370,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -50091,8 +50395,31 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); NextTest(); @@ -50101,7 +50428,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50123,7 +50450,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50150,7 +50477,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50176,7 +50503,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50194,7 +50521,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50766,116 +51093,124 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05")) { + if (ShouldSkip("!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && !TSTAT.S.F04 && !TSTAT.S.F05")) { NextTest(); return; } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01 || TSTAT.S.F02 || TSTAT.S.F03 || TSTAT.S.F04 || TSTAT.S.F05")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_4(); + break; + case 5: ChipLogProgress( - chipTool, " ***** Test Step 4 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4(); + err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_5(); break; - case 5: + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5(); + err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6(); + err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7(); + err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 9 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8(); + err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9(); + err = TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10(); + err = TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + chipTool, " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11(); + err = TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 13 : Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_13(); + err = TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_13(); break; case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_14(); + break; + case 15: ChipLogProgress( - chipTool, " ***** Test Step 14 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); + chipTool, " ***** Test Step 15 : Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_14(); + err = TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_15(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_16(); break; } @@ -50936,6 +51271,9 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -50949,7 +51287,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -50996,6 +51334,31 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"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 TestReadTheGlobalAttributeFeatureMap_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); @@ -51011,7 +51374,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51040,7 +51403,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51062,7 +51425,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51084,7 +51447,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51106,7 +51469,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51128,7 +51491,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51150,7 +51513,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_9() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51174,7 +51537,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_10() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51198,7 +51561,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_11() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51222,7 +51585,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_12() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51246,7 +51609,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51268,7 +51631,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_14() + CHIP_ERROR TestReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -51293,7 +51656,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_15() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -58542,10 +58905,6 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("DGTHREAD.S.F00 || DGTHREAD.S.F01 || DGTHREAD.S.F02 || DGTHREAD.S.F03")) { - NextTest(); - return; - } err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: @@ -59730,63 +60089,71 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01")) { + if (ShouldSkip("( !DGWIFI.S.F00 && !DGWIFI.S.F01 )")) { NextTest(); return; } err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress( - chipTool, " ***** Test Step 4 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); + chipTool, " ***** Test Step 5 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.F00")) { NextTest(); return; } - err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4(); + err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_5(); break; - case 5: + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); + chipTool, " ***** Test Step 6 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5(); + err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); + chipTool, " ***** Test Step 7 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.A000b")) { NextTest(); return; } - err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6(); + err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGWIFI.S.F01 ")) { NextTest(); return; } - err = TestThReadsAcceptedCommandListFromDut_7(); + err = TestThReadsAcceptedCommandListFromDut_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); + " ***** Test Step 9 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8(); + err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_9(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_10(); break; } @@ -59829,6 +60196,9 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -59842,7 +60212,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -59892,8 +60262,32 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); NextTest(); @@ -59902,7 +60296,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -59932,7 +60326,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -59957,7 +60351,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -59979,7 +60373,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6() + CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -60000,7 +60394,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -60024,7 +60418,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8() + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -60045,7 +60439,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWiFiNetworkDiagnostics * cluster = @@ -116851,252 +117245,261 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("DRLK.S.F00 || DRLK.S.F01 || DRLK.S.F02 || DRLK.S.F04 || DRLK.S.F05 || DRLK.S.F06 || DRLK.S.F07 || " - "DRLK.S.F08 || DRLK.S.F10 || DRLK.S.F11")) { + if (ShouldSkip(" !DRLK.S.F00 && !DRLK.S.F01 && !DRLK.S.F02 && !DRLK.S.F04 && !DRLK.S.F05 && !DRLK.S.F06 && !DRLK.S.F07 " + "&& !DRLK.S.F08 && !DRLK.S.F10 && !DRLK.S.F11 ")) { NextTest(); return; } err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("DRLK.S.F00 || DRLK.S.F01 || DRLK.S.F02 || DRLK.S.F04 || DRLK.S.F05 || DRLK.S.F06 || DRLK.S.F07 || " + "DRLK.S.F08 || DRLK.S.F10 || DRLK.S.F11")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_4(); + err = TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F00")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_5(); + err = TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_6(); + err = TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_7(); + err = TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads Feature dependent(DRLK.S.F10) attribute in AttributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads Feature dependent(DRLK.S.F10) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F10")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF10AttributeInAttributeList_8(); + err = TestThReadsFeatureDependentDRLKSF10AttributeInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads Feature dependent(DRLK.S.F11) attribute in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads Feature dependent(DRLK.S.F11) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F11")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF11AttributeInAttributeList_9(); + err = TestThReadsFeatureDependentDRLKSF11AttributeInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList\n"); + " ***** Test Step 11 : TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F00 || DRLK.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_10(); + err = TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); + " ***** Test Step 12 : TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F07 || DRLK.S.F00")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_11(); + err = TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads optional attribute(Language) in AttributeList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(Language) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0021")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLanguageInAttributeList_12(); + err = TestThReadsOptionalAttributeLanguageInAttributeList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(LEDSettings) in AttributeList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(LEDSettings) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0022")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLEDSettingsInAttributeList_13(); + err = TestThReadsOptionalAttributeLEDSettingsInAttributeList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(AutoRelockTime) in AttributeList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads optional attribute(AutoRelockTime) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0023")) { NextTest(); return; } - err = TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_14(); + err = TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads optional attribute(SoundVolume) in AttributeList\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads optional attribute(SoundVolume) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0024")) { NextTest(); return; } - err = TestThReadsOptionalAttributeSoundVolumeInAttributeList_15(); + err = TestThReadsOptionalAttributeSoundVolumeInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 16 : TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); + chipTool, " ***** Test Step 17 : TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0027")) { NextTest(); return; } - err = TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_16(); + err = TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress( - chipTool, " ***** Test Step 17 : TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); + chipTool, " ***** Test Step 18 : TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0028")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_17(); + err = TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress( - chipTool, " ***** Test Step 18 : TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); + chipTool, " ***** Test Step 19 : TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0029")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_18(); + err = TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_19(); break; - case 19: + case 20: ChipLogProgress( - chipTool, " ***** Test Step 19 : TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); + chipTool, " ***** Test Step 20 : TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002a")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_19(); + err = TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress( - chipTool, " ***** Test Step 20 : TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); + chipTool, " ***** Test Step 21 : TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002b")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_20(); + err = TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_21(); break; - case 21: + case 22: ChipLogProgress( - chipTool, " ***** Test Step 21 : TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); + chipTool, " ***** Test Step 22 : TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002c")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_22(); + err = TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_22(); break; case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_23(); + break; + case 24: ChipLogProgress( - chipTool, " ***** Test Step 23 : TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 24 : TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_23(); + err = TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_24(); break; - case 24: + case 25: ChipLogProgress( - chipTool, " ***** Test Step 24 : TH reads Feature dependent commands(DRLK.S.F10) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 25 : TH reads Feature dependent commands(DRLK.S.F10) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F10")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF10InAcceptedCommandList_24(); + err = TestThReadsFeatureDependentCommandsDRLKSF10InAcceptedCommandList_25(); break; - case 25: + case 26: ChipLogProgress( - chipTool, " ***** Test Step 25 : TH reads Feature dependent commands(DRLK.S.F11) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 26 : TH reads Feature dependent commands(DRLK.S.F11) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F11")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF11InAcceptedCommandList_25(); + err = TestThReadsFeatureDependentCommandsDRLKSF11InAcceptedCommandList_26(); break; - case 26: + case 27: ChipLogProgress( - chipTool, " ***** Test Step 26 : TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 27 : TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_26(); + err = TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_27(); + err = TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_28(); break; - case 28: + case 29: ChipLogProgress( - chipTool, " ***** Test Step 28 : TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 29 : TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_28(); + err = TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_29(); break; - case 29: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 29 : TH reads Feature dependent command(DRLK.S.F10) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 30 : TH reads Feature dependent command(DRLK.S.F10) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F10")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF10InGeneratedCommandList_29(); + err = TestThReadsFeatureDependentCommandDRLKSF10InGeneratedCommandList_30(); break; - case 30: + case 31: ChipLogProgress( - chipTool, " ***** Test Step 30 : TH reads Feature dependent command(DRLK.S.F11) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 31 : TH reads Feature dependent command(DRLK.S.F11) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F11")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF11InGeneratedCommandList_30(); + err = TestThReadsFeatureDependentCommandDRLKSF11InGeneratedCommandList_31(); break; - case 31: + case 32: ChipLogProgress( - chipTool, " ***** Test Step 31 : TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 32 : TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_31(); + err = TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_32(); break; } @@ -117205,6 +117608,9 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -117218,7 +117624,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 33; chip::Optional mNodeId; chip::Optional mCluster; @@ -117266,8 +117672,31 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 4095UL)); NextTest(); @@ -117276,7 +117705,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_3() + CHIP_ERROR TestThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117305,7 +117734,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_4() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117327,7 +117756,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_5() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117349,7 +117778,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_6() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117371,7 +117800,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_7() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117391,7 +117820,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF10AttributeInAttributeList_8() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF10AttributeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117411,7 +117840,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF11AttributeInAttributeList_9() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF11AttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117431,7 +117860,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_10() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117452,7 +117881,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_11() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117472,7 +117901,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLanguageInAttributeList_12() + CHIP_ERROR TestThReadsOptionalAttributeLanguageInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117492,7 +117921,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLEDSettingsInAttributeList_13() + CHIP_ERROR TestThReadsOptionalAttributeLEDSettingsInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117512,7 +117941,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_14() + CHIP_ERROR TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117532,7 +117961,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeSoundVolumeInAttributeList_15() + CHIP_ERROR TestThReadsOptionalAttributeSoundVolumeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117552,7 +117981,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_16() + CHIP_ERROR TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117572,7 +118001,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_17() + CHIP_ERROR TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117592,7 +118021,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_18() + CHIP_ERROR TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117612,7 +118041,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_19() + CHIP_ERROR TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117632,7 +118061,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_20() + CHIP_ERROR TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117652,7 +118081,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_21() + CHIP_ERROR TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117672,7 +118101,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_22() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117693,7 +118122,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_23() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117715,7 +118144,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF10InAcceptedCommandList_24() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF10InAcceptedCommandList_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117737,7 +118166,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF11InAcceptedCommandList_25() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF11InAcceptedCommandList_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117759,7 +118188,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_26() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117784,7 +118213,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_27() + CHIP_ERROR TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117804,7 +118233,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_28() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117824,7 +118253,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF10InGeneratedCommandList_29() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF10InGeneratedCommandList_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117844,7 +118273,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF11InGeneratedCommandList_30() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF11InGeneratedCommandList_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -117864,7 +118293,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_31() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; From 3acafb12b9e6bbfadcc00fdb37f4d0262b923cef Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Thu, 18 Aug 2022 19:54:43 +0200 Subject: [PATCH 073/115] [EFR32] Fix resource leak on volatile keys (#22006) * [EFR32] Fix a resource leak on volatile key destruction * [EFR32] Fix key lifetime not always being attributed correctly --- src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp index add77c1be63e51..b1c32dc028471d 100644 --- a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp +++ b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp @@ -118,9 +118,15 @@ EFR32OpaqueKeypair::EFR32OpaqueKeypair() EFR32OpaqueKeypair::~EFR32OpaqueKeypair() { - // Free dynamic resource + // Free key resources if (mContext != nullptr) { + // Delete volatile keys, since nobody else can after we drop the key ID. + if (!mIsPersistent) + { + Delete(); + } + MemoryFree(mContext); mContext = nullptr; } @@ -244,7 +250,7 @@ CHIP_ERROR EFR32OpaqueKeypair::Create(EFR32OpaqueKeyId opaque_id, EFR32OpaqueKey // Store the key ID and mark the key as valid mHasKey = true; - mIsPersistent = key_id != kEFR32OpaqueKeyIdVolatile; + mIsPersistent = opaque_id != kEFR32OpaqueKeyIdVolatile; exit: psa_reset_key_attributes(&attr); From d502f304ba47a3158e202a3873270749b0178a4c Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 19 Aug 2022 00:18:12 +0530 Subject: [PATCH 074/115] [ota-r] API to rekick the periodic query timer (#21991) * [ota-r] API to rekick the periodic query timer * [ESP32]: cli option to set the periodic ota query timer --- examples/platform/esp32/ota/OTAHelper.cpp | 11 +++++++++++ .../ota-requestor/DefaultOTARequestorDriver.cpp | 7 +++++++ .../ota-requestor/DefaultOTARequestorDriver.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/examples/platform/esp32/ota/OTAHelper.cpp b/examples/platform/esp32/ota/OTAHelper.cpp index 83b65776928104..b2be750db337c9 100644 --- a/examples/platform/esp32/ota/OTAHelper.cpp +++ b/examples/platform/esp32/ota/OTAHelper.cpp @@ -118,6 +118,14 @@ CHIP_ERROR RequestorCanConsentHandler(int argc, char ** argv) return CHIP_NO_ERROR; } +CHIP_ERROR SetPeriodicQueryTimeoutHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 1, CHIP_ERROR_INVALID_ARGUMENT); + gRequestorUser.SetPeriodicQueryTimeout(strtoul(argv[0], NULL, 0)); + gRequestorUser.RekickPeriodicQueryTimer(); + return CHIP_NO_ERROR; +} + CHIP_ERROR OTARequestorHandler(int argc, char ** argv) { if (argc == 0) @@ -147,6 +155,9 @@ void OTARequestorCommands::Register() { &RequestorCanConsentHandler, "requestorCanConsent", "Set requestorCanConsent for QueryImageCommand\n" "Usage: OTARequestor requestorCanConsent " }, + { &SetPeriodicQueryTimeoutHandler, "PeriodicQueryTimeout", + "Set timeout for querying the OTA provider for an update\n" + "Usage: OTARequestor PeriodicQueryTimeout " }, }; diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp index 5183026932c927..f2e4f6870c4db4 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp @@ -388,6 +388,13 @@ void DefaultOTARequestorDriver::StopPeriodicQueryTimer() CancelDelayedAction(PeriodicQueryTimerHandler, this); } +void DefaultOTARequestorDriver::RekickPeriodicQueryTimer(void) +{ + ChipLogProgress(SoftwareUpdate, "Rekicking the Periodic Query timer"); + StopPeriodicQueryTimer(); + StartPeriodicQueryTimer(); +} + void DefaultOTARequestorDriver::WatchdogTimerHandler(System::Layer * systemLayer, void * appState) { DefaultOTARequestorDriver * driver = ToDriver(appState); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.h b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.h index 0d76af626d6dc6..4a643da36e1251 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.h @@ -52,6 +52,9 @@ class DefaultOTARequestorDriver : public OTARequestorDriver } } + // Restart the periodic query timer + void RekickPeriodicQueryTimer(void); + // Set the timeout (in seconds) for the watchdog timer; must be non-zero void SetWatchdogTimeout(uint32_t timeout) { From a8679f03b5c743f14b8dd0eefd69644af92b39d7 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 18 Aug 2022 14:21:03 -0700 Subject: [PATCH 075/115] Fixing assign -> copy (#22017) --- src/darwin/Framework/CHIP/MTRSetupPayload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index 73fd981bde4265..926e344fa06f90 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -61,7 +61,7 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { * * Otherwise its value is made up of the MTRDiscoveryCapabilities flags. */ -@property (nonatomic, assign, nullable) NSNumber * rendezvousInformation; +@property (nonatomic, copy, nullable) NSNumber * rendezvousInformation; @property (nonatomic, copy) NSNumber * discriminator; @property (nonatomic, assign) BOOL hasShortDiscriminator; @property (nonatomic, copy) NSNumber * setUpPINCode; From c9d21481eafc861969f47416e133d8c977ed54a7 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 18 Aug 2022 15:51:42 -0700 Subject: [PATCH 076/115] Add FailRandomlyAtFault command to Fault Injection cluster (#22008) * Add FailRandomlyAtFault command to Fault Injection cluster * Run codegen * Address review comments --- .../all-clusters-app.matter | 7 ++ .../all-clusters-common/all-clusters-app.zap | 8 ++ .../fault-injection-server.cpp | 82 ++++++++++--- .../chip/fault-injection-cluster.xml | 7 ++ .../python/chip/clusters/Objects.py | 19 +++ .../CHIP/zap-generated/MTRBaseClusters.h | 2 + .../CHIP/zap-generated/MTRBaseClusters.mm | 30 +++++ .../CHIP/zap-generated/MTRClusterConstants.h | 1 + .../CHIP/zap-generated/MTRClusters.h | 4 + .../CHIP/zap-generated/MTRClusters.mm | 35 ++++++ .../zap-generated/MTRCommandPayloadsObjc.h | 26 +++++ .../zap-generated/MTRCommandPayloadsObjc.mm | 35 ++++++ .../zap-generated/IMClusterCommandHandler.cpp | 9 ++ .../all-clusters-app/zap-generated/access.h | 3 + .../zap-generated/endpoint_config.h | 109 +++++++++--------- .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-objects.cpp | 45 ++++++++ .../zap-generated/cluster-objects.h | 43 +++++++ .../app-common/zap-generated/command-id.h | 1 + .../app-common/zap-generated/ids/Commands.h | 4 + .../zap-generated/cluster/Commands.h | 39 ++++++- .../zap-generated/cluster/Commands.h | 52 +++++++++ 22 files changed, 498 insertions(+), 69 deletions(-) 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 ba13b42667e261..18d7c48c099ad3 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 @@ -3850,7 +3850,14 @@ server cluster FaultInjection = 4294048774 { BOOLEAN takeMutex = 4; } + request struct FailRandomlyAtFaultRequest { + FaultType type = 0; + INT32U id = 1; + INT8U percentage = 2; + } + command access(invoke: manage) FailAtFault(FailAtFaultRequest): DefaultSuccess = 0; + command access(invoke: manage) FailRandomlyAtFault(FailRandomlyAtFaultRequest): DefaultSuccess = 1; } endpoint 0 { 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 baefdc4cf4a07c..a77c6e149bdbb6 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 @@ -8461,6 +8461,14 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "FailRandomlyAtFault", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ diff --git a/src/app/clusters/fault-injection-server/fault-injection-server.cpp b/src/app/clusters/fault-injection-server/fault-injection-server.cpp index 83e1e678f8e8e2..925640c8ce8d00 100644 --- a/src/app/clusters/fault-injection-server/fault-injection-server.cpp +++ b/src/app/clusters/fault-injection-server/fault-injection-server.cpp @@ -36,21 +36,14 @@ using namespace chip::app; using namespace chip::app::Clusters::FaultInjection; using chip::Protocols::InteractionModel::Status; -bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, - const Commands::FailAtFault::DecodableType & commandData) -{ - if (commandPath.mClusterId != Clusters::FaultInjection::Id) - { - // We shouldn't have been called at all. - commandObj->AddStatus(commandPath, Status::UnsupportedCluster); - return true; - } +namespace { #if CHIP_WITH_NLFAULTINJECTION - Status returnStatus = Status::Success; +nl::FaultInjection::Manager * GetFaultInjectionManager(FaultType type) +{ nl::FaultInjection::Manager * faultInjectionMgr = nullptr; - switch (commandData.type) + switch (type) { case FaultType::kSystemFault: faultInjectionMgr = &chip::System::FaultInjection::GetManager(); @@ -62,11 +55,29 @@ bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj faultInjectionMgr = &chip::FaultInjection::GetManager(); break; default: - ChipLogError(Zcl, "FaultInjection: Unsupported Fault type received"); - returnStatus = Status::InvalidCommand; break; } + return faultInjectionMgr; +} +#endif + +} // anonymous namespace + +bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::FailAtFault::DecodableType & commandData) +{ + if (commandPath.mClusterId != Clusters::FaultInjection::Id) + { + // We shouldn't have been called at all. + commandObj->AddStatus(commandPath, Status::UnsupportedCluster); + return true; + } + +#if CHIP_WITH_NLFAULTINJECTION + Status returnStatus = Status::Success; + nl::FaultInjection::Manager * faultInjectionMgr = GetFaultInjectionManager(commandData.type); + if (faultInjectionMgr != nullptr) { ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %d and Id: %d to be triggered deterministically", @@ -93,4 +104,49 @@ bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj return true; } +bool emberAfFaultInjectionClusterFailRandomlyAtFaultCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::FailRandomlyAtFault::DecodableType & commandData) +{ + if (commandPath.mClusterId != Clusters::FaultInjection::Id) + { + // We shouldn't have been called at all. + commandObj->AddStatus(commandPath, Status::UnsupportedCluster); + return true; + } + + if (commandData.percentage > 100) + { + commandObj->AddStatus(commandPath, Status::InvalidCommand); + return true; + } + +#if CHIP_WITH_NLFAULTINJECTION + Status returnStatus = Status::Success; + nl::FaultInjection::Manager * faultInjectionMgr = GetFaultInjectionManager(commandData.type); + + if (faultInjectionMgr != nullptr) + { + ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %d and Id: %d to be triggered randomly", + static_cast(commandData.type), commandData.id); + int32_t err = faultInjectionMgr->FailRandomlyAtFault(commandData.id, commandData.percentage); + + if (err != 0) + { + ChipLogError(Zcl, "FaultInjection: Pass invalid inputs to FailAtFault"); + returnStatus = Status::InvalidCommand; + } + } + else + { + ChipLogError(Zcl, "FaultInjection: Failed to get Fault Injection manager"); + returnStatus = Status::Failure; + } +#else + Status returnStatus = Status::UnsupportedCommand; +#endif // CHIP_WITH_NLFAULTINJECTION + + commandObj->AddStatus(commandPath, returnStatus); + return true; +} + void MatterFaultInjectionPluginServerInitCallback() {} diff --git a/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml index f8c764d8e139c6..e4e92aee68ea0c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml @@ -39,5 +39,12 @@ limitations under the License. + + Configure a fault to be triggered randomly, with a given probability defined as a percentage + + + + + diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 4397258fed9dcb..d8032d8f508063 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -29040,6 +29040,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: numCallsToFail: 'uint' = 0 takeMutex: 'bool' = False + @dataclass + class FailRandomlyAtFault(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0xFFF1FC06 + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=FaultInjection.Enums.FaultType), + ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="percentage", Tag=2, Type=uint), + ]) + + type: 'FaultInjection.Enums.FaultType' = 0 + id: 'uint' = 0 + percentage: 'uint' = 0 + class Attributes: @dataclass diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 43e1ddc4bf0516..201b0844d66305 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -21998,6 +21998,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index e043a252d51acc..1d1c90e8e4359c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -93615,6 +93615,36 @@ new MTRCommandSuccessCallbackBridge( }); } +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + FaultInjection::Commands::FailRandomlyAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.percentage = params.percentage.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index dbcc34b4f7e45f..869f034e3b2b92 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -1702,6 +1702,7 @@ typedef NS_ENUM(uint32_t, MTRClusterCommandIDType) { // Cluster FaultInjection commands MTRClusterFaultInjectionCommandFailAtFaultID = 0x00000000, + MTRClusterFaultInjectionCommandFailRandomlyAtFaultID = 0x00000001, }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 38664c17e71687..bd815031aa0bc2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -5297,6 +5297,10 @@ NS_ASSUME_NONNULL_BEGIN expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(StatusCompletion)completionHandler; +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(StatusCompletion)completionHandler; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 26f39666023990..32d77c731b7dc3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -22088,6 +22088,41 @@ new MTRCommandSuccessCallbackBridge( [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; } +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(StatusCompletion)completionHandler +{ + // Make a copy of params before we go async. + params = [params copy]; + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, baseDevice, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + FaultInjection::Commands::FailRandomlyAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.percentage = params.percentage.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FaultInjectionCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); + + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; +} + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index bfdc4a5aecdfb3..bdd49c7c83214c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -6075,6 +6075,32 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRFaultInjectionClusterFailRandomlyAtFaultParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull type; + +@property (nonatomic, copy) NSNumber * _Nonnull id; + +@property (nonatomic, copy) NSNumber * _Nonnull percentage; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; - (id)copyWithZone:(nullable NSZone *)zone; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 004f2f29070299..9ea1ae5cf02d39 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -8157,6 +8157,41 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRFaultInjectionClusterFailRandomlyAtFaultParams +- (instancetype)init +{ + if (self = [super init]) { + + _type = @(0); + + _id = @(0); + + _percentage = @(0); + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRFaultInjectionClusterFailRandomlyAtFaultParams alloc] init]; + + other.type = self.type; + other.id = self.id; + other.percentage = self.percentage; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString + stringWithFormat:@"<%@: type:%@; id:%@; percentage:%@; >", NSStringFromClass([self class]), _type, _id, _percentage]; + return descriptionString; +} + @end NS_ASSUME_NONNULL_END diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 411c19ff34c510..5d65d8f8775339 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -591,6 +591,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::FailRandomlyAtFault::Id: { + Commands::FailRandomlyAtFault::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfFaultInjectionClusterFailRandomlyAtFaultCallback(apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); diff --git a/zzz_generated/all-clusters-app/zap-generated/access.h b/zzz_generated/all-clusters-app/zap-generated/access.h index 5c5f1df7633748..5c6aba484890ac 100644 --- a/zzz_generated/all-clusters-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-app/zap-generated/access.h @@ -431,6 +431,7 @@ 257, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ 4294048774, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ + 4294048774, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } // Parallel array data (cluster, *command*, privilege) for invoke command @@ -482,6 +483,7 @@ 36, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 38, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ 0, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ + 1, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } // Parallel array data (cluster, command, *privilege*) for invoke command @@ -533,6 +535,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 2ec296db48ed69..64446dd4aec170 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1675,14 +1675,15 @@ /* Endpoint: 0, Cluster: Fault Injection (server) */\ /* AcceptedCommandList (index=76) */ \ 0x00000000 /* FailAtFault */, \ + 0x00000001 /* FailRandomlyAtFault */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=78) */ \ + /* AcceptedCommandList (index=79) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=81) */ \ + /* AcceptedCommandList (index=82) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1690,14 +1691,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=88)*/ \ + /* GeneratedCommandList (index=89)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=93) */ \ + /* AcceptedCommandList (index=94) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1706,7 +1707,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=101)*/ \ + /* GeneratedCommandList (index=102)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1715,7 +1716,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=108) */ \ + /* AcceptedCommandList (index=109) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1724,7 +1725,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=115) */ \ + /* AcceptedCommandList (index=116) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1735,11 +1736,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=124) */ \ + /* AcceptedCommandList (index=125) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=126) */ \ + /* AcceptedCommandList (index=127) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1755,7 +1756,7 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=141)*/ \ + /* GeneratedCommandList (index=142)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ @@ -1763,7 +1764,7 @@ 0x00000025 /* GetCredentialStatusResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=147) */ \ + /* AcceptedCommandList (index=148) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1773,16 +1774,16 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=155) */ \ + /* AcceptedCommandList (index=156) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=158) */ \ + /* AcceptedCommandList (index=159) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=160) */ \ + /* AcceptedCommandList (index=161) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1804,32 +1805,32 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=180) */ \ + /* AcceptedCommandList (index=181) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=182)*/ \ + /* GeneratedCommandList (index=183)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=184) */ \ + /* AcceptedCommandList (index=185) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=189) */ \ + /* AcceptedCommandList (index=190) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=191) */ \ + /* AcceptedCommandList (index=192) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=193)*/ \ + /* GeneratedCommandList (index=194)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* AcceptedCommandList (index=195) */ \ + /* AcceptedCommandList (index=196) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1849,7 +1850,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=214)*/ \ + /* GeneratedCommandList (index=215)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1861,7 +1862,7 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=224) */ \ + /* AcceptedCommandList (index=225) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1869,20 +1870,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=231)*/ \ + /* GeneratedCommandList (index=232)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=236) */ \ + /* AcceptedCommandList (index=237) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=240) */ \ + /* AcceptedCommandList (index=241) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1890,7 +1891,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=247)*/ \ + /* GeneratedCommandList (index=248)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -2220,7 +2221,7 @@ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2231,8 +2232,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 88 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -2242,8 +2243,8 @@ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 93 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -2253,7 +2254,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 108 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2275,7 +2276,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2385,7 +2386,7 @@ .clusterSize = 45, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2396,8 +2397,8 @@ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 142 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ @@ -2407,7 +2408,7 @@ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 147 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 148 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2418,7 +2419,7 @@ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 155 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2440,7 +2441,7 @@ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 158 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 159 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2473,7 +2474,7 @@ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 161 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2572,8 +2573,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 180 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 181 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 183 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ @@ -2594,7 +2595,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 184 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2605,7 +2606,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 189 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2616,8 +2617,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ @@ -2693,8 +2694,8 @@ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 195 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 214 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ) ,\ },\ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ @@ -2704,8 +2705,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 224 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 231 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 232 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ @@ -2715,7 +2716,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 236 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 237 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2759,8 +2760,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 247 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ) ,\ },\ } diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 26c16148347095..8a674cd17d6c30 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -8919,6 +8919,12 @@ bool emberAfTestClusterClusterTestEmitTestFabricScopedEventRequestCallback( bool emberAfFaultInjectionClusterFailAtFaultCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::FaultInjection::Commands::FailAtFault::DecodableType & commandData); +/** + * @brief Fault Injection Cluster FailRandomlyAtFault Command callback (from client) + */ +bool emberAfFaultInjectionClusterFailRandomlyAtFaultCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::DecodableType & commandData); /** @brief Add To Current App Tasks * diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index ec0eb5147c7f97..1c0bf9098cda3e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -20939,6 +20939,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } } // namespace FailAtFault. +namespace FailRandomlyAtFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kId)), id)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPercentage)), percentage)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kType): + ReturnErrorOnFailure(DataModel::Decode(reader, type)); + break; + case to_underlying(Fields::kId): + ReturnErrorOnFailure(DataModel::Decode(reader, id)); + break; + case to_underlying(Fields::kPercentage): + ReturnErrorOnFailure(DataModel::Decode(reader, percentage)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace FailRandomlyAtFault. } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 17019d9d8b12a5..5500c0d3c8ce28 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -28095,6 +28095,11 @@ struct Type; struct DecodableType; } // namespace FailAtFault +namespace FailRandomlyAtFault { +struct Type; +struct DecodableType; +} // namespace FailRandomlyAtFault + } // namespace Commands namespace Commands { @@ -28142,6 +28147,44 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace FailAtFault +namespace FailRandomlyAtFault { +enum class Fields +{ + kType = 0, + kId = 1, + kPercentage = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::FailRandomlyAtFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } + + FaultType type = static_cast(0); + uint32_t id = static_cast(0); + uint8_t percentage = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::FailRandomlyAtFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; } + + FaultType type = static_cast(0); + uint32_t id = static_cast(0); + uint8_t percentage = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace FailRandomlyAtFault } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 95b03a5e717fa4..9dea02553be7cb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -355,3 +355,4 @@ // Commands for cluster: Fault Injection #define ZCL_FAIL_AT_FAULT_COMMAND_ID (0x00) +#define ZCL_FAIL_RANDOMLY_AT_FAULT_COMMAND_ID (0x01) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index cf911dedc35e02..41c5ed62ddb1f0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1240,6 +1240,10 @@ namespace FailAtFault { static constexpr CommandId Id = 0x00000000; } // namespace FailAtFault +namespace FailRandomlyAtFault { +static constexpr CommandId Id = 0x00000001; +} // namespace FailRandomlyAtFault + } // namespace Commands } // namespace FaultInjection diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 5c25721dfc3bdd..897d45dff7d486 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8149,6 +8149,7 @@ class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand |------------------------------------------------------------------------------| | Commands: | | | * FailAtFault | 0x00 | +| * FailRandomlyAtFault | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | | * GeneratedCommandList | 0xFFF8 | @@ -8194,6 +8195,39 @@ class FaultInjectionFailAtFault : public ClusterCommand chip::app::Clusters::FaultInjection::Commands::FailAtFault::Type mRequest; }; +/* + * Command FailRandomlyAtFault + */ +class FaultInjectionFailRandomlyAtFault : public ClusterCommand +{ +public: + FaultInjectionFailRandomlyAtFault(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("fail-randomly-at-fault", credsIssuerConfig) + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("Percentage", 0, UINT8_MAX, &mRequest.percentage); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC06, 0x00000001, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC06, 0x00000001, mRequest); + } + +private: + chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Register all Clusters commands | \*----------------------------------------------------------------------------*/ @@ -13266,8 +13300,9 @@ void registerClusterFaultInjection(Commands & commands, CredentialIssuerCommands // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index b29a4a8455674d..59a1a11c980eb2 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -93054,6 +93054,7 @@ class SubscribeAttributeTestClusterClusterRevision : public SubscribeAttribute { |------------------------------------------------------------------------------| | Commands: | | | * FailAtFault | 0x00 | +| * FailRandomlyAtFault | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | | * GeneratedCommandList | 0xFFF8 | @@ -93119,6 +93120,56 @@ class FaultInjectionFailAtFault : public ClusterCommand { chip::app::Clusters::FaultInjection::Commands::FailAtFault::Type mRequest; }; +/* + * Command FailRandomlyAtFault + */ +class FaultInjectionFailRandomlyAtFault : public ClusterCommand { +public: + FaultInjectionFailRandomlyAtFault() + : ClusterCommand("fail-randomly-at-fault") + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("Percentage", 0, UINT8_MAX, &mRequest.percentage); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + MTRBaseClusterFaultInjection * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + __auto_type * params = [[MTRFaultInjectionClusterFailRandomlyAtFaultParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.type)]; + params.id = [NSNumber numberWithUnsignedInt:mRequest.id]; + params.percentage = [NSNumber numberWithUnsignedChar:mRequest.percentage]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster failRandomlyAtFaultWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Type mRequest; +}; + /* * Attribute GeneratedCommandList */ @@ -97018,6 +97069,7 @@ void registerClusterFaultInjection(Commands & commands) commands_list clusterCommands = { make_unique(Id), // make_unique(), // + make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // From 2a5f7fe21521014507377a8a216b9bf5e07f045c Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Thu, 18 Aug 2022 16:50:33 -0700 Subject: [PATCH 077/115] Check the onboarding payload code type in MTROnboardingPayloadParser (#22024) --- .../payload/SetupPayloadParseCommand.mm | 7 +- .../CHIP/MTROnboardingPayloadParser.h | 1 - .../CHIP/MTROnboardingPayloadParser.m | 6 +- .../CHIPTests/MTRSetupPayloadParserTests.m | 71 +------------------ 4 files changed, 5 insertions(+), 80 deletions(-) diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index 9cb8aba4fdde80..5b98ddf03840b6 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -62,12 +62,7 @@ NSError * error; MTRSetupPayload * payload; MTROnboardingPayloadType codeType; - if (IsQRCode(codeString)) { - codeType = MTROnboardingPayloadTypeQRCode; - } else { - codeType = MTROnboardingPayloadTypeManualCode; - } - payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:codeString ofType:codeType error:&error]; + payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:codeString error:&error]; if (error) { LogNSError("Error: ", error); return CHIP_ERROR_INTERNAL; diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index cb812ddc41e67a..a2509e233bee3f 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -31,7 +31,6 @@ typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { @interface MTROnboardingPayloadParser : NSObject + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - ofType:(MTROnboardingPayloadType)type error:(NSError * __autoreleasing *)error; @end diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m index 3af4fe1a38bb9c..2a81d81b5f5539 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m @@ -23,17 +23,17 @@ @implementation MTROnboardingPayloadParser + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload - ofType:(MTROnboardingPayloadType)type error:(NSError * __autoreleasing *)error { MTRSetupPayload * payload; + // MTROnboardingPayloadTypeNFC is of type QR code and handled same as QR code + MTROnboardingPayloadType type + = isQRCode(onboardingPayload) ? MTROnboardingPayloadTypeQRCode : MTROnboardingPayloadTypeManualCode; switch (type) { case MTROnboardingPayloadTypeManualCode: - case MTROnboardingPayloadTypeAdmin: payload = [self setupPayloadForManualCodeOnboardingPayload:onboardingPayload error:error]; break; case MTROnboardingPayloadTypeQRCode: - case MTROnboardingPayloadTypeNFC: payload = [self setupPayloadForQRCodeOnboardingPayload:onboardingPayload error:error]; break; default: diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index aae5f60ead6575..67b6a9caad9c6a 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -38,40 +38,7 @@ @implementation MTRSetupPayloadParserTests - (void)testOnboardingPayloadParser_Manual_NoError { NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" - ofType:MTROnboardingPayloadTypeManualCode - error:&error]; - - XCTAssertNotNil(payload); - XCTAssertNil(error); - - XCTAssertTrue(payload.hasShortDiscriminator); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); - XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); - XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); - XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); - XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowCustom); - XCTAssertEqual(payload.version.unsignedIntegerValue, 0); - XCTAssertNil(payload.rendezvousInformation); -} - -- (void)testOnboardingPayloadParser_Manual_WrongType -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" - ofType:MTROnboardingPayloadTypeQRCode - error:&error]; - - XCTAssertNil(payload); - XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); -} - -- (void)testOnboardingPayloadParser_Admin_NoError -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" - ofType:MTROnboardingPayloadTypeAdmin - error:&error]; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" error:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); @@ -86,22 +53,10 @@ - (void)testOnboardingPayloadParser_Admin_NoError XCTAssertNil(payload.rendezvousInformation); } -- (void)testOnboardingPayloadParser_Admin_WrongType -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" - ofType:MTROnboardingPayloadTypeQRCode - error:&error]; - - XCTAssertNil(payload); - XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); -} - - (void)testOnboardingPayloadParser_QRCode_NoError { NSError * error; MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" - ofType:MTROnboardingPayloadTypeQRCode error:&error]; XCTAssertNotNil(payload); @@ -118,23 +73,11 @@ - (void)testOnboardingPayloadParser_QRCode_NoError XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } -- (void)testOnboardingPayloadParser_QRCode_WrongType -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" - ofType:MTROnboardingPayloadTypeAdmin - error:&error]; - - XCTAssertNil(payload); - XCTAssertEqual(error.code, MTRErrorCodeIntegrityCheckFailed); -} - - (void)testOnboardingPayloadParser_NFC_NoError { NSError * error; MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" - ofType:MTROnboardingPayloadTypeNFC error:&error]; XCTAssertNotNil(payload); @@ -151,18 +94,6 @@ - (void)testOnboardingPayloadParser_NFC_NoError XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } -- (void)testOnboardingPayloadParser_NFC_WrongType -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser - setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" - ofType:MTROnboardingPayloadTypeManualCode - error:&error]; - - XCTAssertNil(payload); - XCTAssertEqual(error.code, MTRErrorCodeIntegrityCheckFailed); -} - - (void)testManualParser { NSError * error; From b506a86efb67efffa3533f6bc66df8d34e93628a Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 18 Aug 2022 18:34:20 -0700 Subject: [PATCH 078/115] Revert "Check the onboarding payload code type in MTROnboardingPayloadParser (#22024)" (#22026) This reverts commit 2a5f7fe21521014507377a8a216b9bf5e07f045c. --- .../payload/SetupPayloadParseCommand.mm | 7 +- .../CHIP/MTROnboardingPayloadParser.h | 1 + .../CHIP/MTROnboardingPayloadParser.m | 6 +- .../CHIPTests/MTRSetupPayloadParserTests.m | 71 ++++++++++++++++++- 4 files changed, 80 insertions(+), 5 deletions(-) diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index 5b98ddf03840b6..9cb8aba4fdde80 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -62,7 +62,12 @@ NSError * error; MTRSetupPayload * payload; MTROnboardingPayloadType codeType; - payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:codeString error:&error]; + if (IsQRCode(codeString)) { + codeType = MTROnboardingPayloadTypeQRCode; + } else { + codeType = MTROnboardingPayloadTypeManualCode; + } + payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:codeString ofType:codeType error:&error]; if (error) { LogNSError("Error: ", error); return CHIP_ERROR_INTERNAL; diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index a2509e233bee3f..cb812ddc41e67a 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -31,6 +31,7 @@ typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { @interface MTROnboardingPayloadParser : NSObject + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + ofType:(MTROnboardingPayloadType)type error:(NSError * __autoreleasing *)error; @end diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m index 2a81d81b5f5539..3af4fe1a38bb9c 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m @@ -23,17 +23,17 @@ @implementation MTROnboardingPayloadParser + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboardingPayload + ofType:(MTROnboardingPayloadType)type error:(NSError * __autoreleasing *)error { MTRSetupPayload * payload; - // MTROnboardingPayloadTypeNFC is of type QR code and handled same as QR code - MTROnboardingPayloadType type - = isQRCode(onboardingPayload) ? MTROnboardingPayloadTypeQRCode : MTROnboardingPayloadTypeManualCode; switch (type) { case MTROnboardingPayloadTypeManualCode: + case MTROnboardingPayloadTypeAdmin: payload = [self setupPayloadForManualCodeOnboardingPayload:onboardingPayload error:error]; break; case MTROnboardingPayloadTypeQRCode: + case MTROnboardingPayloadTypeNFC: payload = [self setupPayloadForQRCodeOnboardingPayload:onboardingPayload error:error]; break; default: diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index 67b6a9caad9c6a..aae5f60ead6575 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -38,7 +38,40 @@ @implementation MTRSetupPayloadParserTests - (void)testOnboardingPayloadParser_Manual_NoError { NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" error:&error]; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" + ofType:MTROnboardingPayloadTypeManualCode + error:&error]; + + XCTAssertNotNil(payload); + XCTAssertNil(error); + + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); + XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); + XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); + XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); + XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowCustom); + XCTAssertEqual(payload.version.unsignedIntegerValue, 0); + XCTAssertNil(payload.rendezvousInformation); +} + +- (void)testOnboardingPayloadParser_Manual_WrongType +{ + NSError * error; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" + ofType:MTROnboardingPayloadTypeQRCode + error:&error]; + + XCTAssertNil(payload); + XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); +} + +- (void)testOnboardingPayloadParser_Admin_NoError +{ + NSError * error; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" + ofType:MTROnboardingPayloadTypeAdmin + error:&error]; XCTAssertNotNil(payload); XCTAssertNil(error); @@ -53,10 +86,22 @@ - (void)testOnboardingPayloadParser_Manual_NoError XCTAssertNil(payload.rendezvousInformation); } +- (void)testOnboardingPayloadParser_Admin_WrongType +{ + NSError * error; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" + ofType:MTROnboardingPayloadTypeQRCode + error:&error]; + + XCTAssertNil(payload); + XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); +} + - (void)testOnboardingPayloadParser_QRCode_NoError { NSError * error; MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" + ofType:MTROnboardingPayloadTypeQRCode error:&error]; XCTAssertNotNil(payload); @@ -73,11 +118,23 @@ - (void)testOnboardingPayloadParser_QRCode_NoError XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } +- (void)testOnboardingPayloadParser_QRCode_WrongType +{ + NSError * error; + MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" + ofType:MTROnboardingPayloadTypeAdmin + error:&error]; + + XCTAssertNil(payload); + XCTAssertEqual(error.code, MTRErrorCodeIntegrityCheckFailed); +} + - (void)testOnboardingPayloadParser_NFC_NoError { NSError * error; MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" + ofType:MTROnboardingPayloadTypeNFC error:&error]; XCTAssertNotNil(payload); @@ -94,6 +151,18 @@ - (void)testOnboardingPayloadParser_NFC_NoError XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } +- (void)testOnboardingPayloadParser_NFC_WrongType +{ + NSError * error; + MTRSetupPayload * payload = [MTROnboardingPayloadParser + setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J0A33P0SET70.QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0" + ofType:MTROnboardingPayloadTypeManualCode + error:&error]; + + XCTAssertNil(payload); + XCTAssertEqual(error.code, MTRErrorCodeIntegrityCheckFailed); +} + - (void)testManualParser { NSError * error; From 18247f49e9016e0170eeda30001465a752fc6698 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 18 Aug 2022 18:35:26 -0700 Subject: [PATCH 079/115] Removing invalid type (#22023) --- .../CHIP/MTROnboardingPayloadParser.h | 3 +- .../CHIP/MTROnboardingPayloadParser.m | 1 - .../CHIPTests/MTRSetupPayloadParserTests.m | 31 ------------------- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h index cb812ddc41e67a..ce59ff7922bdec 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.h @@ -24,8 +24,7 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, MTROnboardingPayloadType) { MTROnboardingPayloadTypeQRCode = 0, MTROnboardingPayloadTypeManualCode, - MTROnboardingPayloadTypeNFC, - MTROnboardingPayloadTypeAdmin, + MTROnboardingPayloadTypeNFC }; @interface MTROnboardingPayloadParser : NSObject diff --git a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m index 3af4fe1a38bb9c..df68311d700914 100644 --- a/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m +++ b/src/darwin/Framework/CHIP/MTROnboardingPayloadParser.m @@ -29,7 +29,6 @@ + (nullable MTRSetupPayload *)setupPayloadForOnboardingPayload:(NSString *)onboa MTRSetupPayload * payload; switch (type) { case MTROnboardingPayloadTypeManualCode: - case MTROnboardingPayloadTypeAdmin: payload = [self setupPayloadForManualCodeOnboardingPayload:onboardingPayload error:error]; break; case MTROnboardingPayloadTypeQRCode: diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index aae5f60ead6575..beb638f777528c 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -66,26 +66,6 @@ - (void)testOnboardingPayloadParser_Manual_WrongType XCTAssertEqual(error.code, MTRErrorCodeInvalidArgument); } -- (void)testOnboardingPayloadParser_Admin_NoError -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"636108753500001000015" - ofType:MTROnboardingPayloadTypeAdmin - error:&error]; - - XCTAssertNotNil(payload); - XCTAssertNil(error); - - XCTAssertTrue(payload.hasShortDiscriminator); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); - XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); - XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); - XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); - XCTAssertEqual(payload.commissioningFlow, MTRCommissioningFlowCustom); - XCTAssertEqual(payload.version.unsignedIntegerValue, 0); - XCTAssertNil(payload.rendezvousInformation); -} - - (void)testOnboardingPayloadParser_Admin_WrongType { NSError * error; @@ -118,17 +98,6 @@ - (void)testOnboardingPayloadParser_QRCode_NoError XCTAssertEqual([payload.rendezvousInformation unsignedLongValue], MTRDiscoveryCapabilitiesSoftAP); } -- (void)testOnboardingPayloadParser_QRCode_WrongType -{ - NSError * error; - MTRSetupPayload * payload = [MTROnboardingPayloadParser setupPayloadForOnboardingPayload:@"MT:R5L90MP500K64J00000" - ofType:MTROnboardingPayloadTypeAdmin - error:&error]; - - XCTAssertNil(payload); - XCTAssertEqual(error.code, MTRErrorCodeIntegrityCheckFailed); -} - - (void)testOnboardingPayloadParser_NFC_NoError { NSError * error; From 3f69587863e92405c0c9d99667be0b4ab200ed70 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 18 Aug 2022 20:25:15 -0700 Subject: [PATCH 080/115] Python CAT Value support for Controllers (#22019) * Python CAT Value support for Controllers * Review feedback --- src/controller/python/OpCredsBinding.cpp | 16 ++++++++-- src/controller/python/chip/ChipDeviceCtrl.py | 29 +++++++++++------ src/controller/python/chip/FabricAdmin.py | 9 +++--- .../python/test/test_scripts/base.py | 31 +++++++++++++++++++ .../test/test_scripts/mobile-device-test.py | 3 ++ 5 files changed, 72 insertions(+), 16 deletions(-) diff --git a/src/controller/python/OpCredsBinding.cpp b/src/controller/python/OpCredsBinding.cpp index fa779e3d383fc0..e6ed27a6da1db3 100644 --- a/src/controller/python/OpCredsBinding.cpp +++ b/src/controller/python/OpCredsBinding.cpp @@ -321,7 +321,8 @@ void pychip_OnCommissioningStatusUpdate(chip::PeerId peerId, chip::Controller::C ChipError::StorageType pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Controller::DeviceCommissioner ** outDevCtrl, FabricId fabricId, chip::NodeId nodeId, chip::VendorId adminVendorId, - const char * paaTrustStorePath, bool useTestCommissioner) + const char * paaTrustStorePath, bool useTestCommissioner, + CASEAuthTag * caseAuthTags, uint32_t caseAuthTagLen) { ChipLogDetail(Controller, "Creating New Device Controller"); @@ -357,8 +358,17 @@ ChipError::StorageType pychip_OpCreds_AllocateController(OpCredsContext * contex ReturnErrorCodeIf(!rcac.Alloc(Controller::kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY.AsInteger()); MutableByteSpan rcacSpan(rcac.Get(), Controller::kMaxCHIPDERCertLength); - err = context->mAdapter->GenerateNOCChain(nodeId, fabricId, chip::kUndefinedCATs, ephemeralKey.Pubkey(), rcacSpan, icacSpan, - nocSpan); + CATValues catValues; + + if ((caseAuthTagLen + 1) > kMaxSubjectCATAttributeCount) + { + ChipLogError(Controller, "# of CASE Tags exceeds kMaxSubjectCATAttributeCount"); + return CHIP_ERROR_INVALID_ARGUMENT.AsInteger(); + } + + memcpy(catValues.values.data(), caseAuthTags, caseAuthTagLen * sizeof(CASEAuthTag)); + + err = context->mAdapter->GenerateNOCChain(nodeId, fabricId, catValues, ephemeralKey.Pubkey(), rcacSpan, icacSpan, nocSpan); VerifyOrReturnError(err == CHIP_NO_ERROR, err.AsInteger()); Controller::SetupParams initParams; diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index edac6bc8f516dc..8e11f27a953b16 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -157,7 +157,7 @@ class DiscoveryFilterType(enum.IntEnum): class ChipDeviceController(): activeList = set() - def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, adminVendorId: int, paaTrustStorePath: str = "", useTestCommissioner: bool = False, fabricAdmin: FabricAdmin = None, name: str = None): + def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, adminVendorId: int, catTags: typing.List[int] = [], paaTrustStorePath: str = "", useTestCommissioner: bool = False, fabricAdmin: FabricAdmin = None, name: str = None): self.state = DCState.NOT_INITIALIZED self.devCtrl = None self._ChipStack = builtins.chipStack @@ -169,9 +169,18 @@ def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, devCtrl = c_void_p(None) + c_catTags = (c_uint32 * len(catTags))() + + for i, item in enumerate(catTags): + c_catTags[i] = item + + self._dmLib.pychip_OpCreds_AllocateController.argtypes = [c_void_p, POINTER( + c_void_p), c_uint64, c_uint64, c_uint16, c_char_p, c_bool, POINTER(c_uint32), c_uint32] + self._dmLib.pychip_OpCreds_AllocateController.restype = c_uint32 + res = self._ChipStack.Call( - lambda: self._dmLib.pychip_OpCreds_AllocateController(ctypes.c_void_p( - opCredsContext), pointer(devCtrl), fabricId, nodeId, adminVendorId, ctypes.c_char_p(None if len(paaTrustStorePath) == 0 else str.encode(paaTrustStorePath)), useTestCommissioner) + lambda: self._dmLib.pychip_OpCreds_AllocateController(c_void_p( + opCredsContext), pointer(devCtrl), fabricId, nodeId, adminVendorId, c_char_p(None if len(paaTrustStorePath) == 0 else str.encode(paaTrustStorePath)), useTestCommissioner, c_catTags, len(catTags)) ) if res != 0: @@ -233,7 +242,7 @@ def HandlePASEEstablishmentComplete(err): self.devCtrl, self.cbHandleCommissioningCompleteFunct) self.state = DCState.IDLE - self.isActive = True + self._isActive = True # Validate FabricID/NodeID followed from NOC Chain self._fabricId = self.GetFabricIdInternal() @@ -249,12 +258,10 @@ def fabricAdmin(self) -> FabricAdmin: @property def nodeId(self) -> int: - self.CheckIsActive() return self._nodeId @property def fabricId(self) -> int: - self.CheckIsActive() return self._fabricId @property @@ -269,11 +276,15 @@ def name(self) -> str: def name(self, new_name: str): self._name = new_name + @property + def isActive(self) -> bool: + return self._isActive + def Shutdown(self): ''' Shuts down this controller and reclaims any used resources, including the bound C++ constructor instance in the SDK. ''' - if (self.isActive): + if (self._isActive): if self.devCtrl != None: self._ChipStack.Call( lambda: self._dmLib.pychip_DeviceController_DeleteDeviceController( @@ -282,7 +293,7 @@ def Shutdown(self): self.devCtrl = None ChipDeviceController.activeList.remove(self) - self.isActive = False + self._isActive = False def ShutdownAll(): ''' Shut down all active controllers and reclaim any used resources. @@ -304,7 +315,7 @@ def ShutdownAll(): ChipDeviceController.activeList.clear() def CheckIsActive(self): - if (not self.isActive): + if (not self._isActive): raise RuntimeError( "DeviceCtrl instance was already shutdown previously!") diff --git a/src/controller/python/chip/FabricAdmin.py b/src/controller/python/chip/FabricAdmin.py index 216da4ebad7646..3cfe03ffdb7e95 100644 --- a/src/controller/python/chip/FabricAdmin.py +++ b/src/controller/python/chip/FabricAdmin.py @@ -73,7 +73,7 @@ def __init__(self, certificateAuthority: CertificateAuthority, vendorId: int, fa self._isActive = True self._activeControllers = [] - def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTestCommissioner: bool = False): + def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTestCommissioner: bool = False, catTags: List[int] = []): ''' Create a new chip.ChipDeviceCtrl.ChipDeviceController instance on this fabric. When vending ChipDeviceController instances on a given fabric, each controller instance @@ -85,12 +85,13 @@ def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTest paaTrustStorePath: Path to the PAA trust store. If one isn't provided, a suitable default is selected. useTestCommissioner: If a test commmisioner is to be created. + catTags: A list of 32-bit CAT tags that will added to the NOC generated for this controller. ''' if (not(self._isActive)): raise RuntimeError( f"FabricAdmin object was previously shutdown and is no longer valid!") - nodeIdList = [controller.nodeId for controller in self._activeControllers] + nodeIdList = [controller.nodeId for controller in self._activeControllers if controller.isActive] if (nodeId is None): if (len(nodeIdList) != 0): nodeId = max(nodeIdList) + 1 @@ -103,8 +104,8 @@ def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTest self.logger().warning( f"Allocating new controller with CaIndex: {self._certificateAuthority.caIndex}, FabricId: 0x{self._fabricId:016X}, NodeId: 0x{nodeId:016X}") - controller = ChipDeviceCtrl.ChipDeviceController( - self._certificateAuthority.GetOpCredsContext(), self._fabricId, nodeId, self._vendorId, paaTrustStorePath, useTestCommissioner, fabricAdmin=self) + controller = ChipDeviceCtrl.ChipDeviceController(opCredsContext=self._certificateAuthority.GetOpCredsContext(), fabricId=self._fabricId, nodeId=nodeId, + adminVendorId=self._vendorId, paaTrustStorePath=paaTrustStorePath, useTestCommissioner=useTestCommissioner, fabricAdmin=self, catTags=catTags) self._activeControllers.append(controller) return controller diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 3b9f3d9288a7ba..8488b2e80b6ce6 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -386,6 +386,37 @@ def TestFailsafe(self, nodeid: int): return True return False + async def TestControllerCATValues(self, nodeid: int): + ''' This tests controllers using CAT Values + ''' + + # Allocate a new controller instance with a CAT tag. + newController = self.fabricAdmin.NewController(nodeId=300, catTags=[0x00010001]) + + # Read out an attribute using the new controller. It has no privileges, so this should fail with an UnsupportedAccess error. + res = await newController.ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) + if(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl].Reason.status != IM.Status.UnsupportedAccess): + self.logger.error(f"1: Received data instead of an error:{res}") + return False + + # Do a read-modify-write operation on the ACL list to add the CAT tag to the ACL list. + aclList = (await self.devCtrl.ReadAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl)]))[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl] + origAclList = copy.deepcopy(aclList) + aclList[0].subjects.append(0xFFFFFFFD00010001) + await self.devCtrl.WriteAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl(aclList))]) + + # Read out the attribute again - this time, it should succeed. + res = await newController.ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) + if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): + self.logger.error(f"2: Received something other than data:{res}") + return False + + # Write back the old entry to reset ACL list back. + await self.devCtrl.WriteAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl(origAclList))]) + newController.Shutdown() + + return True + async def TestMultiControllerFabric(self, nodeid: int): ''' This tests having multiple controller instances on the same fabric. ''' diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index ffea217fa526c9..99f17aabe27363 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -77,6 +77,9 @@ def ethernet_commissioning(test: BaseTestHelper, discriminator: int, setup_pin: logger.info("Testing multi-controller setup on the same fabric") FailIfNot(asyncio.run(test.TestMultiControllerFabric(nodeid=device_nodeid)), "Failed the multi-controller test") + logger.info("Testing CATs used on controllers") + FailIfNot(asyncio.run(test.TestControllerCATValues(nodeid=device_nodeid)), "Failed the controller CAT test") + ok = asyncio.run(test.TestMultiFabric(ip=address, setuppin=20202021, nodeid=1)) From 67d6821e887701c6794ca790461699e5fcdc02de Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 Aug 2022 09:10:12 -0400 Subject: [PATCH 081/115] Add a recursive submodule checkout for cloudbuild builds (#22015) * Add a recursive submodule checkout for cloudbuild builds * Restyle --- integrations/cloudbuild/build-all.yaml | 9 +++++++++ integrations/cloudbuild/smoke-test.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 3326bb4ac1ce16..c8c09ad722319f 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,4 +1,11 @@ steps: + - name: gcr.io/cloud-builders/git + args: + - submodule + - update + - "--init" + - "--recursive" + id: Submodules - name: "connectedhomeip/chip-build-vscode:0.5.91" env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -6,6 +13,8 @@ steps: - "-c" - source ./scripts/bootstrap.sh id: Bootstrap + waitFor: + - Submodules entrypoint: /usr/bin/bash volumes: - name: pwenv diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 72dc9aa5678706..b0333fab36f327 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,4 +1,11 @@ steps: + - name: gcr.io/cloud-builders/git + args: + - submodule + - update + - "--init" + - "--recursive" + id: Submodules - name: "connectedhomeip/chip-build-vscode:0.5.91" env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -6,6 +13,8 @@ steps: - "-c" - source ./scripts/bootstrap.sh id: Bootstrap + waitFor: + - Submodules entrypoint: /usr/bin/bash volumes: - name: pwenv From b191211ebc3192501073d5d1159e52df4c7a3ef5 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Fri, 19 Aug 2022 09:43:59 -0700 Subject: [PATCH 082/115] Removed Unused Third Party Android Dependency (#22025) --- src/inet/BUILD.gn | 8 - .../include/LocalArray.h | 75 ------ .../include/ScopedFd.h | 46 ---- .../luni/src/main/native/ifaddrs-android.h | 233 ------------------ 4 files changed, 362 deletions(-) delete mode 100644 third_party/android/platform-libcore/android-platform-libcore/include/LocalArray.h delete mode 100644 third_party/android/platform-libcore/android-platform-libcore/include/ScopedFd.h delete mode 100644 third_party/android/platform-libcore/android-platform-libcore/luni/src/main/native/ifaddrs-android.h diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index 5a85beb667c25b..10852750646742 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -137,12 +137,4 @@ static_library("inet") { } cflags = [ "-Wconversion" ] - - include_dirs = [] - if (current_os == "android") { - include_dirs += [ - "${chip_root}/third_party/android/platform-libcore/android-platform-libcore/luni/src/main/native", - "${chip_root}/third_party/android/platform-libcore/android-platform-libcore/include", - ] - } } diff --git a/third_party/android/platform-libcore/android-platform-libcore/include/LocalArray.h b/third_party/android/platform-libcore/android-platform-libcore/include/LocalArray.h deleted file mode 100644 index 2ab708affc69af..00000000000000 --- a/third_party/android/platform-libcore/android-platform-libcore/include/LocalArray.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * 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. - */ - -#ifndef LOCAL_ARRAY_H_included -#define LOCAL_ARRAY_H_included - -#include -#include - -/** - * A fixed-size array with a size hint. That number of bytes will be allocated - * on the stack, and used if possible, but if more bytes are requested at - * construction time, a buffer will be allocated on the heap (and deallocated - * by the destructor). - * - * The API is intended to be a compatible subset of C++0x's std::array. - */ -template -class LocalArray { -public: - /** - * Allocates a new fixed-size array of the given size. If this size is - * less than or equal to the template parameter STACK_BYTE_COUNT, an - * internal on-stack buffer will be used. Otherwise a heap buffer will - * be allocated. - */ - LocalArray(size_t desiredByteCount) : mSize(desiredByteCount) { - if (desiredByteCount > STACK_BYTE_COUNT) { - mPtr = new char[mSize]; - } else { - mPtr = &mOnStackBuffer[0]; - } - } - - /** - * Frees the heap-allocated buffer, if there was one. - */ - ~LocalArray() { - if (mPtr != &mOnStackBuffer[0]) { - delete[] mPtr; - } - } - - // Capacity. - size_t size() { return mSize; } - bool empty() { return mSize == 0; } - - // Element access. - char& operator[](size_t n) { return mPtr[n]; } - const char& operator[](size_t n) const { return mPtr[n]; } - -private: - char mOnStackBuffer[STACK_BYTE_COUNT]; - char* mPtr; - size_t mSize; - - // Disallow copy and assignment. - LocalArray(const LocalArray&); - void operator=(const LocalArray&); -}; - -#endif // LOCAL_ARRAY_H_included diff --git a/third_party/android/platform-libcore/android-platform-libcore/include/ScopedFd.h b/third_party/android/platform-libcore/android-platform-libcore/include/ScopedFd.h deleted file mode 100644 index d2b7935fab55dd..00000000000000 --- a/third_party/android/platform-libcore/android-platform-libcore/include/ScopedFd.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * 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. - */ - -#ifndef SCOPED_FD_H_included -#define SCOPED_FD_H_included - -#include - -// A smart pointer that closes the given fd on going out of scope. -// Use this when the fd is incidental to the purpose of your function, -// but needs to be cleaned up on exit. -class ScopedFd { -public: - explicit ScopedFd(int fd) : fd(fd) { - } - - ~ScopedFd() { - close(fd); - } - - int get() const { - return fd; - } - -private: - int fd; - - // Disallow copy and assignment. - ScopedFd(const ScopedFd&); - void operator=(const ScopedFd&); -}; - -#endif // SCOPED_FD_H_included diff --git a/third_party/android/platform-libcore/android-platform-libcore/luni/src/main/native/ifaddrs-android.h b/third_party/android/platform-libcore/android-platform-libcore/luni/src/main/native/ifaddrs-android.h deleted file mode 100644 index a993c9ea2a66fd..00000000000000 --- a/third_party/android/platform-libcore/android-platform-libcore/luni/src/main/native/ifaddrs-android.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * 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. - */ - -#ifndef IFADDRS_ANDROID_H_included -#define IFADDRS_ANDROID_H_included - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "LocalArray.h" -#include "ScopedFd.h" - -// Android (bionic) doesn't have getifaddrs(3)/freeifaddrs(3). -// We fake it here, so java_net_NetworkInterface.cpp can use that API -// with all the non-portable code being in this file. - -// Source-compatible subset of the BSD struct. -struct ifaddrs { - // Pointer to next struct in list, or NULL at end. - ifaddrs* ifa_next; - - // Interface name. - char* ifa_name; - - // Interface flags. - unsigned int ifa_flags; - - // Interface network address. - sockaddr* ifa_addr; - - // Interface netmask. - sockaddr* ifa_netmask; - - ifaddrs(ifaddrs* next) - : ifa_next(next), ifa_name(NULL), ifa_flags(0), ifa_addr(NULL), ifa_netmask(NULL) - { - } - - ~ifaddrs() { - delete ifa_next; - delete[] ifa_name; - delete ifa_addr; - delete ifa_netmask; - } - - // Sadly, we can't keep the interface index for portability with BSD. - // We'll have to keep the name instead, and re-query the index when - // we need it later. - bool setNameAndFlagsByIndex(unsigned int interfaceIndex) { - // Get the name. - char buf[IFNAMSIZ]; - char* name = if_indextoname(interfaceIndex, buf); - if (name == NULL) { - return false; - } - ifa_name = new char[strlen(name) + 1]; - strcpy(ifa_name, name); - - // Get the flags. - ScopedFd fd(socket(AF_INET, SOCK_DGRAM, 0)); - if (fd.get() == -1) { - return false; - } - ifreq ifr; - memset(&ifr, 0, sizeof(ifr)); - strcpy(ifr.ifr_name, name); - int rc = ioctl(fd.get(), SIOCGIFFLAGS, &ifr); - if (rc == -1) { - return false; - } - // ifr_flags is a bitmask, so really should be unsigned short. But it's - // a short, and we're assigning into an unsigned member here, so make - // the casting explicit. - ifa_flags = (unsigned int)ifr.ifr_flags; - return true; - } - - // Netlink gives us the address family in the header, and the - // sockaddr_in or sockaddr_in6 bytes as the payload. We need to - // stitch the two bits together into the sockaddr that's part of - // our portable interface. - void setAddress(unsigned char family, void* data, size_t byteCount) { - // Set the address proper... - sockaddr_storage* ss = new sockaddr_storage; - memset(ss, 0, sizeof(*ss)); - ifa_addr = reinterpret_cast(ss); - ss->ss_family = family; - uint8_t* dst = sockaddrBytes(family, ss); - memcpy(dst, data, byteCount); - } - - // Netlink gives us the prefix length as a bit count. We need to turn - // that into a BSD-compatible netmask represented by a sockaddr*. - void setNetmask(unsigned char family, size_t prefixLength) { - // ...and work out the netmask from the prefix length. - sockaddr_storage* ss = new sockaddr_storage; - memset(ss, 0, sizeof(*ss)); - ifa_netmask = reinterpret_cast(ss); - ss->ss_family = family; - uint8_t* dst = sockaddrBytes(family, ss); - memset(dst, 0xff, prefixLength / 8); - if ((prefixLength % 8) != 0) { - // We're explicitly dropping any bits left after we bitshift that - // don't fit into a uint8_t. - dst[prefixLength/8] = (uint8_t)(0xffu << (8 - (prefixLength % 8))); - } - } - - // Returns a pointer to the first byte in the address data (which is - // stored in network byte order). - uint8_t* sockaddrBytes(int family, sockaddr_storage* ss) { - if (family == AF_INET) { - sockaddr_in* ss4 = reinterpret_cast(ss); - return reinterpret_cast(&ss4->sin_addr); - } else if (family == AF_INET6) { - sockaddr_in6* ss6 = reinterpret_cast(ss); - return reinterpret_cast(&ss6->sin6_addr); - } - return NULL; - } - -private: - // Disallow copy and assignment. - ifaddrs(const ifaddrs&); - void operator=(const ifaddrs&); -}; - -// FIXME: use iovec instead. -struct addrReq_struct { - nlmsghdr netlinkHeader; - ifaddrmsg msg; -}; - -inline bool sendNetlinkMessage(int fd, const void* data, size_t byteCount) { - ssize_t sentByteCount = TEMP_FAILURE_RETRY(send(fd, data, byteCount, 0)); - return (sentByteCount == static_cast(byteCount)); -} - -inline ssize_t recvNetlinkMessage(int fd, char* buf, size_t byteCount) { - return TEMP_FAILURE_RETRY(recv(fd, buf, byteCount, 0)); -} - -// Source-compatible with the BSD function. -inline int getifaddrs(ifaddrs** result) { - // Simplify cleanup for callers. - *result = NULL; - - // Create a netlink socket. - ScopedFd fd(socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)); - if (fd.get() < 0) { - return -1; - } - - // Ask for the address information. - addrReq_struct addrRequest; - memset(&addrRequest, 0, sizeof(addrRequest)); - addrRequest.netlinkHeader.nlmsg_flags = NLM_F_REQUEST | NLM_F_MATCH; - addrRequest.netlinkHeader.nlmsg_type = RTM_GETADDR; - addrRequest.netlinkHeader.nlmsg_len = NLMSG_ALIGN(NLMSG_LENGTH(sizeof(addrRequest))); - addrRequest.msg.ifa_family = AF_UNSPEC; // All families. - addrRequest.msg.ifa_index = 0; // All interfaces. - if (!sendNetlinkMessage(fd.get(), &addrRequest, addrRequest.netlinkHeader.nlmsg_len)) { - return -1; - } - - // Read the responses. - LocalArray<0> buf(65536); // We don't necessarily have std::vector. - ssize_t bytesRead; - while ((bytesRead = recvNetlinkMessage(fd.get(), &buf[0], buf.size())) > 0) { - nlmsghdr* hdr = reinterpret_cast(&buf[0]); - for (; NLMSG_OK(hdr, (size_t)bytesRead); hdr = NLMSG_NEXT(hdr, bytesRead)) { - switch (hdr->nlmsg_type) { - case NLMSG_DONE: - return 0; - case NLMSG_ERROR: - return -1; - case RTM_NEWADDR: - { - ifaddrmsg* address = reinterpret_cast(NLMSG_DATA(hdr)); - rtattr* rta = IFA_RTA(address); - size_t ifaPayloadLength = IFA_PAYLOAD(hdr); - while (RTA_OK(rta, ifaPayloadLength)) { - if (rta->rta_type == IFA_LOCAL) { - unsigned char family = address->ifa_family; - if (family == AF_INET || family == AF_INET6) { - *result = new ifaddrs(*result); - if (!(*result)->setNameAndFlagsByIndex(address->ifa_index)) { - return -1; - } - (*result)->setAddress(family, RTA_DATA(rta), RTA_PAYLOAD(rta)); - (*result)->setNetmask(family, address->ifa_prefixlen); - } - } - rta = RTA_NEXT(rta, ifaPayloadLength); - } - } - break; - } - } - } - // We only get here if recv fails before we see a NLMSG_DONE. - return -1; -} - -// Source-compatible with the BSD function. -inline void freeifaddrs(ifaddrs* addresses) { - delete addresses; -} - -#endif // IFADDRS_ANDROID_H_included From 6ca1f85f284e4545c55ab45d21e619d2e6573e5a Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Fri, 19 Aug 2022 22:54:03 +0530 Subject: [PATCH 083/115] Increasing the heap size for wifi] (#21992) --- examples/platform/efr32/FreeRTOSConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform/efr32/FreeRTOSConfig.h b/examples/platform/efr32/FreeRTOSConfig.h index 3408b5667aa9bc..f42179230d6bb0 100644 --- a/examples/platform/efr32/FreeRTOSConfig.h +++ b/examples/platform/efr32/FreeRTOSConfig.h @@ -198,7 +198,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #ifndef configTOTAL_HEAP_SIZE #ifdef SL_WIFI -#define configTOTAL_HEAP_SIZE ((size_t)(30 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024)) #else #define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) #endif From b94c8edc7f898ac55917f8128ef736351cbf0ab8 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:42:43 -0400 Subject: [PATCH 084/115] [EFR32] Upgrade LCD (#22016) * Upgrade LCD EFR32 * fix CI --- .github/workflows/examples-efr32.yaml | 2 +- examples/chef/efr32/BUILD.gn | 6 +- examples/light-switch-app/efr32/BUILD.gn | 11 +- .../light-switch-app/efr32/src/AppTask.cpp | 21 +- examples/lighting-app/efr32/BUILD.gn | 12 +- examples/lighting-app/efr32/src/AppTask.cpp | 27 +- examples/lock-app/efr32/BUILD.gn | 11 +- examples/lock-app/efr32/src/AppTask.cpp | 20 +- examples/platform/efr32/BaseApplication.cpp | 17 +- examples/platform/efr32/BaseApplication.h | 18 +- .../platform/efr32/display/demo-ui-bitmaps.h | 326 ++++++++++++++++++ examples/platform/efr32/display/demo-ui.c | 136 ++++++++ examples/platform/efr32/display/demo-ui.h | 139 ++++++++ .../platform/efr32/display/{lcd.c => lcd.cpp} | 90 ++++- examples/platform/efr32/display/lcd.h | 71 ++++ examples/platform/efr32/init_efrPlatform.cpp | 8 - examples/platform/efr32/lcd.h | 38 -- examples/window-app/efr32/BUILD.gn | 4 +- .../window-app/efr32/include/LcdPainter.h | 4 +- examples/window-app/efr32/src/LcdPainter.cpp | 11 +- .../window-app/efr32/src/WindowAppImpl.cpp | 13 +- 21 files changed, 877 insertions(+), 108 deletions(-) create mode 100644 examples/platform/efr32/display/demo-ui-bitmaps.h create mode 100644 examples/platform/efr32/display/demo-ui.c create mode 100644 examples/platform/efr32/display/demo-ui.h rename examples/platform/efr32/display/{lcd.c => lcd.cpp} (62%) create mode 100644 examples/platform/efr32/display/lcd.h delete mode 100644 examples/platform/efr32/lcd.h diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 320dad29dadd31..acb4e6b18e96b3 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -94,7 +94,7 @@ jobs: - name: Build example EFR32 Lighting App for BRD4161A with RPCs timeout-minutes: 15 run: | - scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A \ + scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \ 'import("//with_pw_rpc.gni")' .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \ out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ diff --git a/examples/chef/efr32/BUILD.gn b/examples/chef/efr32/BUILD.gn index efaace05910a0b..662933081bc331 100644 --- a/examples/chef/efr32/BUILD.gn +++ b/examples/chef/efr32/BUILD.gn @@ -246,7 +246,11 @@ efr32_executable("chef_app") { } if (!disable_lcd) { - sources += [ "${examples_plat_dir}/display/lcd.c" ] + sources += [ + "${examples_plat_dir}/display/demo-ui.c", + "${examples_plat_dir}/display/lcd.cpp", + ] + include_dirs += [ "${examples_plat_dir}/display" ] defines += [ "DISPLAY_ENABLED" ] if (show_qr_code) { defines += [ "QR_CODE_ENABLED" ] diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index 026dc46d13195c..3118b7a6dadc18 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -253,8 +253,15 @@ efr32_executable("light_switch_app") { } if (!disable_lcd) { - sources += [ "${examples_plat_dir}/display/lcd.c" ] - defines += [ "DISPLAY_ENABLED" ] + sources += [ + "${examples_plat_dir}/display/demo-ui.c", + "${examples_plat_dir}/display/lcd.cpp", + ] + include_dirs += [ "${examples_plat_dir}/display" ] + defines += [ + "DISPLAY_ENABLED", + "IS_DEMO_SWITCH=1", + ] if (show_qr_code) { defines += [ "QR_CODE_ENABLED" ] deps += [ "${chip_root}/examples/common/QRCode" ] diff --git a/examples/light-switch-app/efr32/src/AppTask.cpp b/examples/light-switch-app/efr32/src/AppTask.cpp index 29d9e6527ea8e9..83ac3ac8c94ec7 100644 --- a/examples/light-switch-app/efr32/src/AppTask.cpp +++ b/examples/light-switch-app/efr32/src/AppTask.cpp @@ -70,6 +70,8 @@ namespace { EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +bool mCurrentButtonState = false; + /********************************************************** * Identify Callbacks *********************************************************/ @@ -146,6 +148,9 @@ AppTask AppTask::sAppTask; CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Light Switch"); +#endif err = BaseApplication::Init(&gIdentify); if (err != CHIP_NO_ERROR) @@ -221,9 +226,23 @@ void AppTask::SwitchActionEventHandler(AppEvent * aEvent) if (aEvent->Type == AppEvent::kEventType_Button) { BindingCommandData * data = Platform::New(); - data->commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; data->clusterId = chip::app::Clusters::OnOff::Id; + if (mCurrentButtonState) + { + mCurrentButtonState = false; + data->commandId = chip::app::Clusters::OnOff::Commands::Off::Id; + } + else + { + data->commandId = chip::app::Clusters::OnOff::Commands::On::Id; + mCurrentButtonState = true; + } + +#ifdef DISPLAY_ENABLED + sAppTask.GetLCD().WriteDemoUI(mCurrentButtonState); +#endif + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); } } diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 81a25554eb9ba2..76430e8586e8d3 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -253,8 +253,16 @@ efr32_executable("lighting_app") { } if (!disable_lcd) { - sources += [ "${examples_plat_dir}/display/lcd.c" ] - defines += [ "DISPLAY_ENABLED" ] + sources += [ + "${examples_plat_dir}/display/demo-ui.c", + "${examples_plat_dir}/display/lcd.cpp", + ] + + include_dirs += [ "${examples_plat_dir}/display" ] + defines += [ + "DISPLAY_ENABLED", + "IS_DEMO_LIGHT=1", + ] if (show_qr_code) { defines += [ "QR_CODE_ENABLED" ] diff --git a/examples/lighting-app/efr32/src/AppTask.cpp b/examples/lighting-app/efr32/src/AppTask.cpp index d8fe8940ce3434..89963785b8f02b 100644 --- a/examples/lighting-app/efr32/src/AppTask.cpp +++ b/examples/lighting-app/efr32/src/AppTask.cpp @@ -21,12 +21,7 @@ #include "AppConfig.h" #include "AppEvent.h" #include "LEDWidget.h" -#ifdef DISPLAY_ENABLED -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED + #include "sl_simple_led_instances.h" #include #include @@ -132,6 +127,9 @@ AppTask AppTask::sAppTask; CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Lighting-App"); +#endif err = BaseApplication::Init(&gIdentify); if (err != CHIP_NO_ERROR) @@ -266,16 +264,13 @@ void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAc void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) { // Action initiated, update the light led - if (aAction == LightingManager::ON_ACTION) - { - EFR32_LOG("Turning light ON") - sLightLED.Set(true); - } - else if (aAction == LightingManager::OFF_ACTION) - { - EFR32_LOG("Turning light OFF") - sLightLED.Set(false); - } + bool lightOn = aAction == LightingManager::ON_ACTION; + EFR32_LOG("Turning light %s", (lightOn) ? "On" : "Off") + sLightLED.Set(lightOn); + +#ifdef DISPLAY_ENABLED + sAppTask.GetLCD().WriteDemoUI(lightOn); +#endif if (aActor == AppEvent::kEventType_Button) { diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index c98bebfed6d942..bb6530f56e5313 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -250,8 +250,15 @@ efr32_executable("lock_app") { } if (!disable_lcd) { - sources += [ "${examples_plat_dir}/display/lcd.c" ] - defines += [ "DISPLAY_ENABLED" ] + sources += [ + "${examples_plat_dir}/display/demo-ui.c", + "${examples_plat_dir}/display/lcd.cpp", + ] + include_dirs += [ "${examples_plat_dir}/display" ] + defines += [ + "DISPLAY_ENABLED", + "IS_DEMO_LOCK=1", + ] if (show_qr_code) { defines += [ "QR_CODE_ENABLED" ] deps += [ "${chip_root}/examples/common/QRCode" ] diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp index 8b72c5aac4a28f..33a331c752920b 100644 --- a/examples/lock-app/efr32/src/AppTask.cpp +++ b/examples/lock-app/efr32/src/AppTask.cpp @@ -142,6 +142,10 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Lock-App", true); +#endif + err = BaseApplication::Init(&gIdentify); if (err != CHIP_NO_ERROR) { @@ -354,16 +358,14 @@ void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAc void AppTask::ActionInitiated(LockManager::Action_t aAction, int32_t aActor) { - // Action initiated, update the light led - if (aAction == LockManager::LOCK_ACTION) + if (aAction == LockManager::UNLOCK_ACTION || aAction == LockManager::LOCK_ACTION) { - EFR32_LOG("Lock Action has been initiated") - sLockLED.Set(false); - } - else if (aAction == LockManager::UNLOCK_ACTION) - { - EFR32_LOG("Unlock Action has been initiated") - sLockLED.Set(true); + bool locked = (aAction == LockManager::LOCK_ACTION); + EFR32_LOG("%s Action has been initiated", (locked) ? "Lock" : "Unlock"); + sLockLED.Set(!locked); +#ifdef DISPLAY_ENABLED + sAppTask.GetLCD().WriteDemoUI(locked); +#endif } if (aActor == AppEvent::kEventType_Button) diff --git a/examples/platform/efr32/BaseApplication.cpp b/examples/platform/efr32/BaseApplication.cpp index 47dbb9c001361d..2cdc4753ef572b 100644 --- a/examples/platform/efr32/BaseApplication.cpp +++ b/examples/platform/efr32/BaseApplication.cpp @@ -120,6 +120,10 @@ bool mFunctionTimerActive; Identify * gIdentifyptr = nullptr; +#ifdef DISPLAY_ENABLED +SilabsLCD slLCD; +#endif + } // namespace /********************************************************** @@ -214,7 +218,8 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) if (GetQRCode(QRCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)) == CHIP_NO_ERROR) { - LCDWriteQRCode((uint8_t *) QRCode.data()); + slLCD.SetQRCode((uint8_t *) QRCode.data(), QRCode.size()); + slLCD.ShowQRCode(true, true); } else { @@ -386,6 +391,9 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) CancelFunctionTimer(); mFunction = kFunction_NoneSelected; + // TOGGLE QRCode/LCD demo UI + slLCD.ToggleQRCode(); + #ifdef SL_WIFI if (!ConnectivityMgr().IsWiFiStationProvisioned()) #else @@ -469,6 +477,13 @@ void BaseApplication::LightTimerEventHandler(TimerHandle_t xTimer) LightEventHandler(); } +#ifdef DISPLAY_ENABLED +SilabsLCD & BaseApplication::GetLCD(void) +{ + return slLCD; +} +#endif + void BaseApplication::PostEvent(const AppEvent * aEvent) { if (sAppEventQueue != NULL) diff --git a/examples/platform/efr32/BaseApplication.h b/examples/platform/efr32/BaseApplication.h index 41e2c1dbe64ffd..9c7ef22d8fe7d6 100644 --- a/examples/platform/efr32/BaseApplication.h +++ b/examples/platform/efr32/BaseApplication.h @@ -35,6 +35,14 @@ #include #include +#ifdef DISPLAY_ENABLED +#include "demo-ui.h" +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + /********************************************************** * Defines *********************************************************/ @@ -73,6 +81,13 @@ class BaseApplication */ static void PostEvent(const AppEvent * event); +#ifdef DISPLAY_ENABLED + /** + * @brief Return LCD object + */ + static SilabsLCD & GetLCD(void); +#endif + /** * @brief Event handler when a button is pressed * Function posts an event for button processing @@ -165,8 +180,7 @@ class BaseApplication static void LightEventHandler(); /********************************************************** - * Private Attributes declaration + * Protected Attributes declaration *********************************************************/ - bool mSyncClusterToButtonAction; }; diff --git a/examples/platform/efr32/display/demo-ui-bitmaps.h b/examples/platform/efr32/display/demo-ui-bitmaps.h new file mode 100644 index 00000000000000..6f77ce4b733139 --- /dev/null +++ b/examples/platform/efr32/display/demo-ui-bitmaps.h @@ -0,0 +1,326 @@ +/***************************************************************************/ /** + * @file + * @brief User Interface bitmaps for demo. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. + *www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon + *Laboratories Inc. Your use of this software is + *governed by the terms of Silicon Labs Master + *Software License Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. + *This software is distributed to you in Source Code + *format and is governed by the sections of the MSLA + *applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SILABS_DEMO_UI_BITMAPS_H +#define SILABS_DEMO_UI_BITMAPS_H + +#define SILICONLABS_BITMAP_WIDTH 128 +#define SILICONLABS_BITMAP_HEIGHT 45 + +#define ZIGBEE_BITMAP_WIDTH 16 +#define ZIGBEE_BITMAP_HEIGHT 16 + +#define RAIL_BITMAP_WIDTH 16 +#define RAIL_BITMAP_HEIGHT 16 + +#define CONNECT_BITMAP_WIDTH 16 +#define CONNECT_BITMAP_HEIGHT 16 + +#define BLUETOOTH_BITMAP_WIDTH 16 +#define BLUETOOTH_BITMAP_HEIGHT 18 + +#define SILABS_BITMAP \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xfd, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xff, 0xff, 0x3f, 0x00, \ + 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfe, \ + 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0xf0, 0xff, \ + 0xff, 0xff, 0x1f, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0xff, 0xc3, 0xff, \ + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, \ + 0xff, 0x01, 0xc0, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x80, 0xff, \ + 0xff, 0x01, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x80, 0xff, 0x7f, 0x00, 0xff, 0xff, \ + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf0, \ + 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x80, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, \ + 0x00, 0x00, 0xc0, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, \ + 0x01, 0xc0, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0xc0, 0xff, 0xff, \ + 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x7f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8, 0x3f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, \ + 0x0f, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xfe, 0x0f, \ + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x1f, 0x80, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0x3f, 0xf8, 0xff, 0xff, 0x1f, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, \ + 0x0f, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0x03, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x3f, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x83, 0xff, 0xff, 0x01, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0xfc, 0xff, 0xff, 0xe1, 0xff, 0xff, 0x03, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, \ + 0xf8, 0xff, 0xff, 0x03, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x03, \ + 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x01, \ + 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, \ + 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, \ + 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + +#define THREAD_BITMAP_WIDTH 16 +#define THREAD_BITMAP_HEIGHT 18 + +#define THREAD_BITMAP \ + 0x1F, 0xF8, 0x07, 0xE0, 0x03, 0xCE, 0x01, 0x9F, 0x01, 0xB3, 0x00, 0x33, 0xF0, 0x3F, 0xF8, 0x1F, 0x0C, 0x03, 0x0C, 0x03, 0x18, \ + 0x03, 0x11, 0x83, 0x01, 0x83, 0x03, 0xC3, 0x07, 0xE3, 0x1F, 0xFB, 0x7f, 0xff, 0xff, 0xff + +#define WIFI_BITMAP_WIDTH 18 +#define WIFI_BITMAP_HEIGHT 18 + +#define WIFI_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0x01, 0xE0, 0x03, 0x00, 0xC7, 0xFF, 0xB8, 0xFF, 0xF7, 0x07, 0xF8, 0x0F, 0xC0, 0x3F, \ + 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xF8, 0xFF, 0xE1, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F + +#define MATTER_LOGO_WIDTH 18 +#define MATTER_LOGO_HEIGHT 17 + +#define MATTER_LOGO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xF3, 0xFF, 0xCF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0x12, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0xF3, 0x3F, 0x8F, \ + 0x7F, 0xFC, 0xFC, 0xFC, 0xE3, 0xF1, 0x87, 0x87, 0xC7, 0xDE, 0x88, 0x33, 0xC7, 0xCF, 0xFC, 0xFF, 0xFF, 0x03 + +// APP Logo, boolean only. must be 64x64 +#if IS_DEMO_SWITCH +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0xC0, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0xC0, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define OFF_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, \ + 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0x00, \ + 0x3C, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, \ + 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +#elif IS_DEMO_LIGHT +#define ON_DEMO_BITMAP \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, \ + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x1f, 0xfe, 0x07, 0xe0, \ + 0x7f, 0xf8, 0xff, 0xff, 0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0xff, 0xff, 0x7f, 0x3c, 0xe0, 0x07, 0x3c, 0xfe, 0xff, 0xff, \ + 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0x0f, 0x38, 0xfe, 0xff, 0xff, 0x7f, 0x1c, 0xf0, 0x0f, 0x38, 0xfe, 0x03, 0xc0, 0x7f, 0x1c, 0xf0, 0x0f, \ + 0x38, 0xfe, 0x27, 0xe9, 0x7f, 0x1c, 0xf0, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xe7, 0xe7, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfe, 0xef, 0xf7, 0x7f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xef, 0xf7, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xef, 0xf3, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xcf, 0xf3, \ + 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xdf, 0xfb, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xdf, 0xfb, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xe3, 0x9f, 0xf9, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x9f, 0xf9, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x9f, 0xfd, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xbf, 0xfd, 0xf1, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x3f, 0xfc, 0xf8, 0xff, 0xff, 0xff, \ + 0xff, 0x3f, 0x3e, 0x7c, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, \ + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x8f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + +#define OFF_DEMO_BITMAP \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xe0, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0x07, 0xfc, 0xff, 0xff, 0xff, \ + 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, \ + 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, \ + 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, \ + 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, \ + 0xff, 0xe3, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, \ + 0xe3, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, \ + 0xff, 0x3f, 0xfe, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc, 0x3f, \ + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x8f, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff +#elif IS_DEMO_LOCK +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, \ + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xE0, 0x07, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0xFC, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x7F, \ + 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x80, 0x01, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xFC, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0xFC, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x80, 0x01, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define OFF_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, \ + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xE0, 0x07, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0xFC, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x7F, \ + 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x80, 0x01, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xFC, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0xFC, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x1F, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0xE0, 0x07, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x80, 0x01, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +#else // Unknown demo.... +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, \ + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0x0F, \ + 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0xF8, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x0F, 0xF0, \ + 0x0F, 0xFF, 0xFF, 0xFF, 0x7F, 0xE0, 0x07, 0xE0, 0x07, 0xFE, 0xFF, 0xFF, 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0xFE, 0xFF, 0xFF, \ + 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0xFE, 0xFF, 0xFF, 0x3F, 0xC0, 0x03, 0xC0, 0x03, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, \ + 0x8F, 0x01, 0x80, 0x01, 0x80, 0xF1, 0xFF, 0xFF, 0xCF, 0x03, 0xC0, 0x03, 0xC0, 0xF3, 0xFF, 0xFF, 0xEF, 0x07, 0xE0, 0x07, \ + 0xE0, 0xF7, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x3F, 0xFC, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0x7F, 0x7E, 0x7E, 0x7E, 0x7E, 0xFE, 0xFF, 0xFF, 0x3F, 0xFC, 0x3F, 0xFC, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF, 0x1F, 0xF0, 0x0F, 0xF0, 0x0F, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0xE0, 0x07, 0xE0, 0x07, 0xF8, 0xFF, 0xFF, 0x3F, 0xC0, 0x03, 0xC0, 0x03, 0xFC, 0xFF, 0xFF, 0x3F, 0x80, 0x01, 0x80, \ + 0x01, 0xFC, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, \ + 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define OFF_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, \ + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, \ + 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, \ + 0x00, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, \ + 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, \ + 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, \ + 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, \ + 0x00, 0xF0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, \ + 0x00, 0xFC, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, \ + 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, \ + 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#endif + +#endif // SILABS_DEMO_UI_BITMAPS_H diff --git a/examples/platform/efr32/display/demo-ui.c b/examples/platform/efr32/display/demo-ui.c new file mode 100644 index 00000000000000..73a8d52ea71090 --- /dev/null +++ b/examples/platform/efr32/display/demo-ui.c @@ -0,0 +1,136 @@ +/** + * @file + * @brief User Interface core logic for demo. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. + *www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon + *Laboratories Inc. Your use of this software is + *governed by the terms of Silicon Labs Master + *Software License Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. + *This software is distributed to you in Source Code + *format and is governed by the sections of the MSLA + *applicable to Source Code. + * + ******************************************************************************/ + +#include "demo-ui.h" +#include "demo-ui-bitmaps.h" +#include "dmd/dmd.h" +#include "em_types.h" +#include "glib.h" +#include +#include + +// Main Logo and App image +#define SILICONLABS_X_POSITION ((glibContext.pDisplayGeometry->xSize - SILICONLABS_BITMAP_WIDTH) / 2) +#define SILICONLABS_Y_POSITION 0 +#define APP_BITMAP_WIDTH 64 +#define APP_BITMAP_HEIGHT 64 +#define APP_X_POSITION ((glibContext.pDisplayGeometry->xSize - APP_BITMAP_WIDTH) / 2) +#define APP_Y_POSITION (glibContext.pDisplayGeometry->ySize - APP_BITMAP_HEIGHT - 5) +#define PROT1_ID_X_POSITION 1 +#define PROT2_ID_X_POSITION 79 + +// Matter Logo +#define PROT2_BITMAP_WIDTH MATTER_LOGO_WIDTH +#define PROT2_BITMAP_HEIGHT MATTER_LOGO_HEIGHT +#define PROT2_X_POSITION 104 +#define PROT2_Y_POSITION (APP_Y_POSITION + (APP_Y_POSITION / 2)) +#define PROT2_BITMAP (matterLogoBitmap) +#define PROT2_BITMAP_CONN (matterLogoBitmap) + +// Networking Protocol Logo +#ifdef SL_WIFI +#define PROT1_BITMAP_WIDTH WIFI_BITMAP_WIDTH +#define PROT1_BITMAP_HEIGHT WIFI_BITMAP_HEIGHT +#define PROT1_X_POSITION 8 +#define PROT1_Y_POSITION (APP_Y_POSITION + (APP_Y_POSITION / 2)) +#define PROT1_BITMAP (networkBitMap) +#define PROT1_BITMAP_CONN (networkBitMap) +#else +#define PROT1_BITMAP_WIDTH THREAD_BITMAP_WIDTH +#define PROT1_BITMAP_HEIGHT THREAD_BITMAP_HEIGHT +#define PROT1_X_POSITION 8 +#define PROT1_Y_POSITION (APP_Y_POSITION + (APP_Y_POSITION / 2)) +#define PROT1_BITMAP (networkBitMap) +#define PROT1_BITMAP_CONN (networkBitMap) +#endif + +/******************************************************************************* + *************************** LOCAL VARIABLES ******************************** + ******************************************************************************/ +static GLIB_Context_t glibContext; /* Global glib context */ + +static const uint8_t siliconlabsBitmap[] = { SILABS_BITMAP }; +static const uint8_t matterLogoBitmap[] = { MATTER_LOGO_BITMAP }; + +static const uint8_t OnStateBitMap[] = { ON_DEMO_BITMAP }; +static const uint8_t OffStateBitMap[] = { OFF_DEMO_BITMAP }; + +#ifdef SL_WIFI +static const uint8_t networkBitMap[] = { WIFI_BITMAP }; +#else +static const uint8_t networkBitMap[] = { THREAD_BITMAP }; +#endif + +// Future usage +// static const uint8_t unconnectedBitMap[] = { QUESTION_MARK_BITMAP }; + +/******************************************************************************* + ************************** LOCAL FUNCTIONS ******************************** + ******************************************************************************/ +static void demoUIDisplayLogo(void) +{ + GLIB_drawBitmap(&glibContext, SILICONLABS_X_POSITION, SILICONLABS_Y_POSITION, SILICONLABS_BITMAP_WIDTH, + SILICONLABS_BITMAP_HEIGHT, siliconlabsBitmap); +} + +/******************************************************************************* + ************************** GLOBAL FUNCTIONS ******************************* + ******************************************************************************/ +void demoUIInit(GLIB_Context_t * context) +{ + memcpy(&glibContext, context, sizeof(GLIB_Context_t)); +} + +void demoUIDisplayHeader(char * name) +{ + demoUIDisplayLogo(); + if (APP_NAME_MAX_LENGTH >= strlen(name)) + { + GLIB_drawStringOnLine(&glibContext, name, 5, GLIB_ALIGN_CENTER, 0, 0, true); + } + DMD_updateDisplay(); +} + +void demoUIDisplayApp(bool on) +{ + GLIB_drawBitmap(&glibContext, APP_X_POSITION, APP_Y_POSITION, APP_BITMAP_WIDTH, APP_BITMAP_HEIGHT, + (on ? OnStateBitMap : OffStateBitMap)); + DMD_updateDisplay(); +} + +void demoUIDisplayProtocol(demoUIProtocol protocol, bool isConnected) +{ + GLIB_drawBitmap(&glibContext, (protocol == DEMO_UI_PROTOCOL1 ? PROT1_X_POSITION : PROT2_X_POSITION), + (protocol == DEMO_UI_PROTOCOL1 ? PROT1_Y_POSITION : PROT2_Y_POSITION), + (protocol == DEMO_UI_PROTOCOL1 ? PROT1_BITMAP_WIDTH : PROT2_BITMAP_WIDTH), + (protocol == DEMO_UI_PROTOCOL1 ? PROT1_BITMAP_HEIGHT : PROT2_BITMAP_HEIGHT), + (protocol == DEMO_UI_PROTOCOL1 ? (isConnected ? PROT1_BITMAP_CONN : PROT1_BITMAP) + : (isConnected ? PROT2_BITMAP_CONN : PROT2_BITMAP))); + DMD_updateDisplay(); +} + +void demoUIClearMainScreen(uint8_t * name) +{ + GLIB_clear(&glibContext); + demoUIDisplayHeader((char *) name); + demoUIDisplayApp(false); + demoUIDisplayProtocol(DEMO_UI_PROTOCOL1, false); + demoUIDisplayProtocol(DEMO_UI_PROTOCOL2, false); +} diff --git a/examples/platform/efr32/display/demo-ui.h b/examples/platform/efr32/display/demo-ui.h new file mode 100644 index 00000000000000..6197a4e73c71ef --- /dev/null +++ b/examples/platform/efr32/display/demo-ui.h @@ -0,0 +1,139 @@ +/***************************************************************************/ /** + * @file + * @brief User Interface for demo. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. + *www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon + *Laboratories Inc. Your use of this software is + *governed by the terms of Silicon Labs Master + *Software License Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. + *This software is distributed to you in Source Code + *format and is governed by the sections of the MSLA + *applicable to Source Code. + * + ******************************************************************************/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "glib.h" +/**************************************************************************/ /** + * DEMO UI uses the underlying DMD interface and the + *GLIB and exposes several wrapper functions to + *application. These functions are used to display + * different bitmaps for the demo. + * + ******************************************************************************/ + +#define APP_NAME_MAX_LENGTH 20 + +/******************************************************************************* + ******************************** ENUMS ************************************ + ******************************************************************************/ + +typedef enum +{ + DEMO_UI_PROTOCOL1, + DEMO_UI_PROTOCOL2 +} demoUIProtocol; + +typedef enum +{ + DEMO_UI_LIGHT_OFF, + DEMO_UI_LIGHT_ON +} demoUILightState_t; + +typedef enum +{ + DEMO_UI_DIRECTION_PROT1, + DEMO_UI_DIRECTION_PROT2, + DEMO_UI_DIRECTION_SWITCH, + DEMO_UI_DIRECTION_INVALID +} demoUILightDirection_t; + +typedef enum +{ + DEMO_UI_NO_NETWORK, + DEMO_UI_SCANNING, + DEMO_UI_JOINING, + DEMO_UI_FORMING, + DEMO_UI_NETWORK_UP, + DEMO_UI_STATE_UNKNOWN +} demoUIZigBeeNetworkState_t; + +/******************************************************************************* + ****************************** PROTOTYPES ********************************* + ******************************************************************************/ + +/**************************************************************************/ /** + * @brief + * Initilize the GLIB and DMD interfaces. + * + * @param[in] void + * + * @return + * void + *****************************************************************************/ +void demoUIInit(GLIB_Context_t * context); + +/**************************************************************************/ /** + * @brief + * Update the display with Silicon Labs logo and + *application name. + * + * @param[in] name name of the current application. + * + * @return + * void + *****************************************************************************/ +void demoUIDisplayHeader(char * name); + +/**************************************************************************/ /** + * @brief + * Update the display with App image. Bool state only + *for now. + * + * @param[in] on status of App + * + * @return + * void + *****************************************************************************/ +void demoUIDisplayApp(bool on); + +/**************************************************************************/ /** + * @brief + * Update the display to show if the bluetooth is + *connected to the mobile device. + * + * @param[in] bool, true if the Light is connected to + *mobile device, false otherwise. + * + * @return + * void + *****************************************************************************/ +void demoUIDisplayProtocol(demoUIProtocol protocol, bool isConnected); + +/**************************************************************************/ /** + * @brief + * Clear the Lcd screen and display the main screen. + * + * @param[in] name - application name + * @param[in] showPROT1 - show protocol 1 related icon. + * @param[in] showPROT2 - show protocol 2 related icon. + * + * @return + * void + *****************************************************************************/ +void demoUIClearMainScreen(uint8_t * name); + +#ifdef __cplusplus +} +#endif diff --git a/examples/platform/efr32/display/lcd.c b/examples/platform/efr32/display/lcd.cpp similarity index 62% rename from examples/platform/efr32/display/lcd.c rename to examples/platform/efr32/display/lcd.cpp index a62f89c8ba25ab..9b66cfe1f024cc 100644 --- a/examples/platform/efr32/display/lcd.c +++ b/examples/platform/efr32/display/lcd.cpp @@ -19,6 +19,7 @@ #include #include +#include "demo-ui.h" #include "lcd.h" #include "dmd.h" @@ -35,25 +36,36 @@ #define QR_CODE_MODULE_SIZE 3 #define QR_CODE_BORDER_SIZE 0 -static GLIB_Context_t glibContext; #ifdef QR_CODE_ENABLED static uint8_t qrCode[qrcodegen_BUFFER_LEN_FOR_VERSION(QR_CODE_VERSION)]; static uint8_t workBuffer[qrcodegen_BUFFER_LEN_FOR_VERSION(QR_CODE_VERSION)]; #endif // QR_CODE_ENABLED -#ifdef QR_CODE_ENABLED -static void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h); -#endif // QR_CODE_ENABLED - -void initLCD(void) +CHIP_ERROR SilabsLCD::Init(uint8_t * name, bool initialState) { EMSTATUS status; + CHIP_ERROR err = CHIP_NO_ERROR; + + // Check if Name is to long + if (name != nullptr) + { + if (APP_NAME_MAX_LENGTH < strlen((char *) name)) + { + EFR32_LOG("App Name too long"); + return CHIP_ERROR_INVALID_ARGUMENT; + } + else + { + strcpy((char *) mName, (char *) name); + } + } /* Enable the memory lcd */ status = sl_board_enable_display(); - if (status == SL_STATUS_OK) + if (status != SL_STATUS_OK) { EFR32_LOG("Board Display enable fail %d", status); + err = CHIP_ERROR_INTERNAL; } /* Initialize the DMD module for the DISPLAY device driver. */ @@ -61,6 +73,7 @@ void initLCD(void) if (DMD_OK != status) { EFR32_LOG("DMD init failed %d", status); + err = CHIP_ERROR_INTERNAL; } /* Initialize the glib context */ @@ -68,6 +81,7 @@ void initLCD(void) if (GLIB_OK != status) { EFR32_LOG("Glib context init failed %d", status); + err = CHIP_ERROR_INTERNAL; } glibContext.backgroundColor = White; @@ -76,34 +90,57 @@ void initLCD(void) if (GLIB_OK != status) { EFR32_LOG("Glib clear failed %d", status); + err = CHIP_ERROR_INTERNAL; } + demoUIInit(&glibContext); + + dState.mainState = initialState; + + return err; } /* This function is necessary because currently glib.h cannot be used within a C++ context. */ -void * LCDContext() +void * SilabsLCD::Context() { return (void *) &glibContext; } -int LCD_clear(void * pContext) +int SilabsLCD::Clear() { - return GLIB_clear((GLIB_Context_t *) pContext); + return GLIB_clear(&glibContext); } -int LCD_drawPixel(void * pContext, int32_t x, int32_t y) +int SilabsLCD::DrawPixel(void * pContext, int32_t x, int32_t y) { return GLIB_drawPixel((GLIB_Context_t *) pContext, x, y); } -int LCD_update(void) +int SilabsLCD::Update(void) { return DMD_updateDisplay(); } +void SilabsLCD::WriteDemoUI(bool state) +{ + if (mShowQRCode) + { + mShowQRCode = false; + } + dState.mainState = state; + WriteDemoUI(); +} + +void SilabsLCD::WriteDemoUI() +{ + Clear(); + demoUIClearMainScreen(mName); + demoUIDisplayApp(dState.mainState); +} + #ifdef QR_CODE_ENABLED -void LCDWriteQRCode(uint8_t * str) +void SilabsLCD::WriteQRCode() { - if (!qrcodegen_encodeText((const char *) str, workBuffer, qrCode, qrcodegen_Ecc_LOW, QR_CODE_VERSION, QR_CODE_VERSION, + if (!qrcodegen_encodeText((const char *) mQRCodeBuffer, workBuffer, qrCode, qrcodegen_Ecc_LOW, QR_CODE_VERSION, QR_CODE_VERSION, qrcodegen_Mask_AUTO, true)) { EFR32_LOG("qrcodegen_encodeText() failed"); @@ -133,7 +170,30 @@ void LCDWriteQRCode(uint8_t * str) DMD_updateDisplay(); } -void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h) +void SilabsLCD::SetQRCode(uint8_t * str, uint32_t size) +{ + if (size < chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1) + { + memcpy(mQRCodeBuffer, str, size); + } +} + +void SilabsLCD::ShowQRCode(bool show, bool forceRefresh) +{ + if (show != mShowQRCode || forceRefresh) + { + (show) ? WriteQRCode() : WriteDemoUI(); + mShowQRCode = show; + } +} + +void SilabsLCD::ToggleQRCode(void) +{ + (mShowQRCode) ? WriteDemoUI() : WriteQRCode(); + mShowQRCode = !mShowQRCode; +} + +void SilabsLCD::LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h) { for (int i = 0; i < h; i++) { diff --git a/examples/platform/efr32/display/lcd.h b/examples/platform/efr32/display/lcd.h new file mode 100644 index 00000000000000..c9729e15d05de4 --- /dev/null +++ b/examples/platform/efr32/display/lcd.h @@ -0,0 +1,71 @@ +/* + * + * 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. + */ + +#pragma once + +#include "AppConfig.h" +#include "glib.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#include +#endif // QR_CODE_ENABLED + +#include "demo-ui.h" + +#define MAX_STR_LEN 48 + +class SilabsLCD +{ + +public: + CHIP_ERROR Init(uint8_t * name = nullptr, bool initialState = false); + void * Context(); + int Clear(void); + int DrawPixel(void * pContext, int32_t x, int32_t y); + int Update(void); + void WriteDemoUI(bool state); +#ifdef QR_CODE_ENABLED + void SetQRCode(uint8_t * str, uint32_t size); + void ShowQRCode(bool show, bool forceRefresh = false); + void ToggleQRCode(void); +#endif + +private: + typedef struct demoState + { + bool mainState = false; + bool protocol1 = false; /* data */ + } DemoState_t; + + void WriteQRCode(); + void WriteDemoUI(); +#ifdef QR_CODE_ENABLED + void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h); + char mQRCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; + bool mShowQRCode = true; +#endif + GLIB_Context_t glibContext; + +#ifdef SL_DEMO_NAME + uint8_t mName[] = SL_DEMO_NAME +#else + uint8_t mName[APP_NAME_MAX_LENGTH + 1]; +#endif + + DemoState_t dState; +}; diff --git a/examples/platform/efr32/init_efrPlatform.cpp b/examples/platform/efr32/init_efrPlatform.cpp index d0fb913165c469..a0e33702b40e68 100644 --- a/examples/platform/efr32/init_efrPlatform.cpp +++ b/examples/platform/efr32/init_efrPlatform.cpp @@ -56,10 +56,6 @@ extern "C" { #include "sl_mbedtls.h" #include "sl_system_init.h" -#if DISPLAY_ENABLED -#include "lcd.h" -#endif - void initAntenna(void); void init_efrPlatform(void) @@ -67,10 +63,6 @@ void init_efrPlatform(void) sl_system_init(); sl_mbedtls_init(); -#if DISPLAY_ENABLED - initLCD(); -#endif - #if EFR32_LOG_ENABLED efr32InitLog(); #endif diff --git a/examples/platform/efr32/lcd.h b/examples/platform/efr32/lcd.h deleted file mode 100644 index b3702305d40f69..00000000000000 --- a/examples/platform/efr32/lcd.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ - -#pragma once - -#include "AppConfig.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_STR_LEN 48 - -void initLCD(void); -void * LCDContext(); -int LCD_clear(void * pContext); -int LCD_drawPixel(void * pContext, int32_t x, int32_t y); -int LCD_update(void); -void LCDWriteQRCode(uint8_t * str); - -#ifdef __cplusplus -} -#endif diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index bcd17e3b6dddcf..7d2bfbec6dca1f 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -237,9 +237,11 @@ efr32_executable("window_app") { if (!disable_lcd) { sources += [ - "${examples_plat_dir}/display/lcd.c", + "${examples_plat_dir}/display/demo-ui.c", + "${examples_plat_dir}/display/lcd.cpp", "src/LcdPainter.cpp", ] + include_dirs += [ "${examples_plat_dir}/display" ] defines += [ "DISPLAY_ENABLED" ] if (show_qr_code) { diff --git a/examples/window-app/efr32/include/LcdPainter.h b/examples/window-app/efr32/include/LcdPainter.h index 448c750e166613..4a30bdede2c3ea 100644 --- a/examples/window-app/efr32/include/LcdPainter.h +++ b/examples/window-app/efr32/include/LcdPainter.h @@ -23,6 +23,8 @@ #include "app-common/app-common/zap-generated/cluster-enums.h" // clang-format on +#include + #include enum class LcdIcon @@ -104,7 +106,7 @@ class VerticalBlindPainter : public PixelPainter class LcdPainter { public: - static void Paint(chip::app::Clusters::WindowCovering::Type type, uint16_t lift, uint16_t tilt, LcdIcon icon); + static void Paint(SilabsLCD & lcd, chip::app::Clusters::WindowCovering::Type type, uint16_t lift, uint16_t tilt, LcdIcon icon); private: static PixelPainter * GetCoverPainter(chip::app::Clusters::WindowCovering::Type type, uint16_t lift, uint16_t tilt); diff --git a/examples/window-app/efr32/src/LcdPainter.cpp b/examples/window-app/efr32/src/LcdPainter.cpp index 6ff452cf197eee..e1a8041f075c79 100644 --- a/examples/window-app/efr32/src/LcdPainter.cpp +++ b/examples/window-app/efr32/src/LcdPainter.cpp @@ -18,7 +18,6 @@ */ #include -#include using namespace chip::app::Clusters::WindowCovering; @@ -202,15 +201,15 @@ PixelPainter * LcdPainter::GetCoverPainter(Type type, uint16_t lift, uint16_t ti return nullptr; } -void LcdPainter::Paint(Type type, uint16_t lift, uint16_t tilt, LcdIcon icon) +void LcdPainter::Paint(SilabsLCD & lcd, Type type, uint16_t lift, uint16_t tilt, LcdIcon icon) { FramePainter framePaint = FramePainter(lift, tilt); IconPainter iconPaint = IconPainter(lift, tilt, icon); PixelPainter * coverPaint = GetCoverPainter(type, lift, tilt); CompositePainter compositePaint = CompositePainter(lift, tilt, &framePaint, &iconPaint, coverPaint); - void * context = LCDContext(); + void * context = lcd.Context(); - LCD_clear(context); + lcd.Clear(); for (int i = 0; i < LCD_SIZE; i++) { @@ -218,10 +217,10 @@ void LcdPainter::Paint(Type type, uint16_t lift, uint16_t tilt, LcdIcon icon) { if (compositePaint.Color(i, j)) { - LCD_drawPixel(context, i, j); + lcd.DrawPixel(context, i, j); } } } - LCD_update(); + lcd.Update(); delete coverPaint; } diff --git a/examples/window-app/efr32/src/WindowAppImpl.cpp b/examples/window-app/efr32/src/WindowAppImpl.cpp index 2330bade5d2506..8ccfa97ea098a7 100644 --- a/examples/window-app/efr32/src/WindowAppImpl.cpp +++ b/examples/window-app/efr32/src/WindowAppImpl.cpp @@ -129,6 +129,10 @@ StaticQueue_t sAppEventQueueStruct; WindowAppImpl WindowAppImpl::sInstance; +#ifdef DISPLAY_ENABLED +SilabsLCD slLCD; +#endif + WindowApp & WindowApp::Instance() { return WindowAppImpl::sInstance; @@ -184,6 +188,10 @@ CHIP_ERROR WindowAppImpl::Init() mStatusLED.Init(APP_STATE_LED); mActionLED.Init(APP_ACTION_LED); +#ifdef DISPLAY_ENABLED + slLCD.Init(); +#endif + return CHIP_NO_ERROR; } @@ -427,7 +435,7 @@ void WindowAppImpl::UpdateLCD() if (!tilt.IsNull() && !lift.IsNull()) { - LcdPainter::Paint(type, lift.Value(), tilt.Value(), mIcon); + LcdPainter::Paint(slLCD, type, lift.Value(), tilt.Value(), mIcon); } } #ifdef QR_CODE_ENABLED @@ -436,7 +444,8 @@ void WindowAppImpl::UpdateLCD() chip::MutableCharSpan qrCode(mQRCodeBuffer); if (GetQRCode(qrCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)) == CHIP_NO_ERROR) { - LCDWriteQRCode((uint8_t *) qrCode.data()); + slLCD.SetQRCode((uint8_t *) qrCode.data(), qrCode.size()); + slLCD.ShowQRCode(true, true); } } #endif // QR_CODE_ENABLED From 1f83af040a4a04b605c863757082e475a922c5e3 Mon Sep 17 00:00:00 2001 From: davidgoogle <49926720+davidgoogle@users.noreply.github.com> Date: Fri, 19 Aug 2022 12:34:34 -0700 Subject: [PATCH 085/115] chip-cert-bins: Adds python bindings for test harness use. (#22033) --- integrations/docker/images/chip-cert-bins/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 7cb52537acbcff..2aa6f10e767fb0 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -254,12 +254,14 @@ RUN case ${TARGETPLATFORM} in \ RUN npm --prefix third_party/zap/repo/ ci RUN scripts/examples/gn_build_test_example.sh app1 +RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no + # Stage 3: Copy relevant cert bins to a minimal image to reduce size. FROM ubuntu:22.04 ENV TZ=Etc/UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update -y -RUN apt-get install -y libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev avahi-utils iproute2 +RUN apt-get install -y libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev avahi-utils iproute2 libcairo2-dev libgirepository1.0-dev python3-pip WORKDIR /root/ COPY --from=chip-build-cert-bins /root/.sdk-sha-version .sdk-sha-version COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-tool chip-tool @@ -276,3 +278,8 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-provider-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-requestor-app chip-ota-requestor-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lock-app chip-lock-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/app1/chip-app1 chip-app1 + +# Stage 3.1 Setup the Matter Python environment +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_lib python_lib +COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing python_testing +RUN pip install --no-cache-dir python_lib/controller/python/chip*.whl From c5f7c91650e0b949f0ec220e3f83306ace271c7a Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Sat, 20 Aug 2022 02:47:04 +0530 Subject: [PATCH 086/115] Added fix for WF200 ap not found issue (#22039) --- third_party/silabs/matter_support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index c9d65e0111fb77..16c1ed8eca039b 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit c9d65e0111fb7708d41f86bc999bb22de43b5915 +Subproject commit 16c1ed8eca039bb9527421411bd605de8ce21442 From 056f0164ad6e18377fd27e8d83399a8f78eec9a0 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Sat, 20 Aug 2022 03:02:49 +0530 Subject: [PATCH 087/115] Install ccache to chip-build docker image (#21994) --- integrations/docker/images/chip-build/Dockerfile | 1 + integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/docker/images/chip-build/Dockerfile b/integrations/docker/images/chip-build/Dockerfile index b09c9c9dd43fbd..bfcfea5e40e755 100644 --- a/integrations/docker/images/chip-build/Dockerfile +++ b/integrations/docker/images/chip-build/Dockerfile @@ -11,6 +11,7 @@ RUN set -x \ automake \ bison \ bridge-utils \ + ccache \ clang \ clang-format \ clang-tidy \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 6b92033b6525c6..0791656d59351a 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.93 Version bump reason: [ESP32] Update ESP-IDF to release v4.4.2 +0.5.94 Version bump reason: Install ccache to the chip-build image From 932bf7eb56ac8dab892d6f18cde7e18a7c6a8c91 Mon Sep 17 00:00:00 2001 From: Daniel Nicoara Date: Fri, 19 Aug 2022 17:56:27 -0400 Subject: [PATCH 088/115] Fix include-what-you-use type errors (#22020) Allows files to be compiled in isolation. --- src/lib/support/PersistedCounter.h | 1 + src/transport/SessionUpdateDelegate.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/support/PersistedCounter.h b/src/lib/support/PersistedCounter.h index f17434aab40305..9261da6ac9faff 100644 --- a/src/lib/support/PersistedCounter.h +++ b/src/lib/support/PersistedCounter.h @@ -30,6 +30,7 @@ #include #include #include +#include #include namespace chip { diff --git a/src/transport/SessionUpdateDelegate.h b/src/transport/SessionUpdateDelegate.h index 3dc01f88632ab5..741245d04c84fc 100644 --- a/src/transport/SessionUpdateDelegate.h +++ b/src/transport/SessionUpdateDelegate.h @@ -17,6 +17,7 @@ #pragma once #include +#include namespace chip { From dfc1a7096b90d718bb821f84333ce4f64fb144c1 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Fri, 19 Aug 2022 18:20:12 -0400 Subject: [PATCH 089/115] Introduce initial TC-RR-1.1 (#22032) * Introduce initial TC-RR-1.1 - TC-RR-1.1 is a critical test to validate multi-fabric behavior is stable and actually works. The test, broadly, validates most of the minimas of the core elements of the spec, including ACL entries, certificate sizes, number of CASE sessions and subscriptions, number of paths, etc. Issue #21736 - This PR introduces the core test and all associated minor changes to infrastructure to make it work. - Still TODO: - More extensive cert size maximization (closer to 400 TLV bytes) - Add controller and commissionee CAT tags (test is 95% equivalent to test plan, but a couple ACL fields differ because of this, in ways that don't detract from proving what needs proving - Validation that local/peer session IDs have not changed. This is not technically needed with the SDK as-is based on the methodology but it would future-proof the test against some future optimizations that may change subscription behavior in a way that the test would not validate CASE sessions remain. - Clean-up more after the test, so that a factory reset before/after is not needed. Testing done: - Passes on Linux against all-clusters, all-clusters-minimal and lighting app, with both minimal mdns and Avahi. - Passes on some other platforms (not named here) To run within SDK (from scratch: the build steps can be skipped thereafter): - In one terminal: - Build chip-lighting-app linux - `clear && rm -f kvs1 && out/debug/standalone/chip-lighting-app --discriminator 1234 --KVS kvs1 --trace_decode 1` - In another terminal: - Build - `rm -rf out/python*` - `scripts/build_python.sh -m platform -i separate` - Run - `source ./out/python_env/bin/activate` - `python3 src/python_testing/TC_RR_1_1.py --commissioning-method on-network --long-discriminator 1234 --passcode 20202021` - Add `--bool-arg skip_user_label_cluster_steps:true` to the end of the command line if your DUT has broken UserLabel clusters (but if you have those, fix them :) * More work towards CAT tags * Address review comments * Fixed CAT tag testing * Update src/controller/python/chip/utils/CommissioningBuildingBlocks.py Co-authored-by: Jerry Johns --- .../chip-tool/commands/common/CHIPCommand.cpp | 6 + .../chip-tool/commands/common/CHIPCommand.h | 4 + .../common/CredentialIssuerCommands.h | 19 + .../example/ExampleCredentialIssuerCommands.h | 27 ++ .../ExampleOperationalCredentialsIssuer.cpp | 168 ++++++- .../ExampleOperationalCredentialsIssuer.h | 7 +- src/controller/python/OpCredsBinding.cpp | 16 +- .../python/chip/CertificateAuthority.py | 24 +- src/controller/python/chip/FabricAdmin.py | 2 +- .../chip/utils/CommissioningBuildingBlocks.py | 36 +- .../python/test/test_scripts/base.py | 22 +- src/python_testing/TC_RR_1_1.py | 424 ++++++++++++++++++ src/python_testing/matter_testing_support.py | 38 +- 13 files changed, 744 insertions(+), 49 deletions(-) create mode 100644 src/python_testing/TC_RR_1_1.py diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index 663ebee8257d61..89dd1d536e4550 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -358,6 +358,12 @@ CHIP_ERROR CHIPCommand::InitializeCommissioner(std::string key, chip::FabricId f // store the credentials in persistent storage, and // generate when not available in the storage. ReturnLogErrorOnFailure(mCommissionerStorage.Init(key.c_str())); + if (mUseMaxSizedCerts.HasValue()) + { + auto option = CredentialIssuerCommands::CredentialIssuerOptions::kMaximizeCertificateSizes; + mCredIssuerCmds->SetCredentialIssuerOption(option, mUseMaxSizedCerts.Value()); + } + ReturnLogErrorOnFailure(mCredIssuerCmds->InitializeCredentialsIssuer(mCommissionerStorage)); chip::MutableByteSpan nocSpan(noc.Get(), chip::Controller::kMaxCHIPDERCertLength); diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 1714928ea1096c..7dd36a7c7d6214 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -70,6 +70,9 @@ class CHIPCommand : public Command "4. The default if not specified is \"alpha\"."); AddArgument("commissioner-nodeid", 0, UINT64_MAX, &mCommissionerNodeId, "The node id to use for chip-tool. If not provided, kTestControllerNodeId (112233, 0x1B669) will be used."); + AddArgument("use-max-sized-certs", 0, 1, &mUseMaxSizedCerts, + "Maximize the size of operational certificates. If not provided or 0 (\"false\"), normally sized operational " + "certificates are generated."); #if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED AddArgument("trace_file", &mTraceFile); AddArgument("trace_log", 0, 1, &mTraceLog); @@ -153,6 +156,7 @@ class CHIPCommand : public Command chip::Optional mCommissionerNodeId; chip::Optional mBleAdapterId; chip::Optional mPaaTrustStorePath; + chip::Optional mUseMaxSizedCerts; // Cached trust store so commands other than the original startup command // can spin up commissioners as needed. diff --git a/examples/chip-tool/commands/common/CredentialIssuerCommands.h b/examples/chip-tool/commands/common/CredentialIssuerCommands.h index 951ef86efceb40..cc04863ee2f8b6 100644 --- a/examples/chip-tool/commands/common/CredentialIssuerCommands.h +++ b/examples/chip-tool/commands/common/CredentialIssuerCommands.h @@ -74,4 +74,23 @@ class CredentialIssuerCommands virtual CHIP_ERROR GenerateControllerNOCChain(chip::NodeId nodeId, chip::FabricId fabricId, const chip::CATValues & cats, chip::Crypto::P256Keypair & keypair, chip::MutableByteSpan & rcac, chip::MutableByteSpan & icac, chip::MutableByteSpan & noc) = 0; + + // All options must start false + enum CredentialIssuerOptions : uint8_t + { + kMaximizeCertificateSizes = 0, // If set, certificate chains will be maximized for testing via padding + }; + + virtual void SetCredentialIssuerOption(CredentialIssuerOptions option, bool isEnabled) + { + // Do nothing + (void) option; + (void) isEnabled; + } + + virtual bool GetCredentialIssuerOption(CredentialIssuerOptions option) + { + // All options always start false + return false; + } }; diff --git a/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h b/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h index 74646c8b5f10ba..40a2871b19437b 100644 --- a/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h +++ b/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h @@ -49,6 +49,33 @@ class ExampleCredentialIssuerCommands : public CredentialIssuerCommands return mOpCredsIssuer.GenerateNOCChainAfterValidation(nodeId, fabricId, cats, keypair.Pubkey(), rcac, icac, noc); } + void SetCredentialIssuerOption(CredentialIssuerOptions option, bool isEnabled) override + { + switch (option) + { + case CredentialIssuerOptions::kMaximizeCertificateSizes: + mUsesMaxSizedCerts = isEnabled; + mOpCredsIssuer.SetMaximallyLargeCertsUsed(mUsesMaxSizedCerts); + break; + default: + break; + } + } + + bool GetCredentialIssuerOption(CredentialIssuerOptions option) override + { + switch (option) + { + case CredentialIssuerOptions::kMaximizeCertificateSizes: + return mUsesMaxSizedCerts; + default: + return false; + } + } + +protected: + bool mUsesMaxSizedCerts = false; + private: chip::Controller::ExampleOperationalCredentialsIssuer mOpCredsIssuer; }; diff --git a/src/controller/ExampleOperationalCredentialsIssuer.cpp b/src/controller/ExampleOperationalCredentialsIssuer.cpp index cc8cd8fbcdb404..9c0b376b13716c 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.cpp +++ b/src/controller/ExampleOperationalCredentialsIssuer.cpp @@ -39,6 +39,127 @@ using namespace Credentials; using namespace Crypto; using namespace TLV; +namespace { + +enum CertType : uint8_t +{ + kRcac = 0, + kIcac = 1, + kNoc = 2 +}; + +CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipDN desiredDn, CertType certType, bool maximizeSize, + const Crypto::P256PublicKey & subjectPublicKey, Crypto::P256Keypair & issuerKeypair, + MutableByteSpan & outX509Cert) +{ + constexpr size_t kDERCertDnEncodingOverhead = 11; + constexpr size_t kTLVCertDnEncodingOverhead = 3; + constexpr size_t kMaxCertPaddingLength = 150; + constexpr size_t kTLVDesiredSize = kMaxCHIPCertLength - 50; + + Platform::ScopedMemoryBuffer derBuf; + ReturnErrorCodeIf(!derBuf.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan derSpan{ derBuf.Get(), kMaxDERCertLength }; + + int64_t serialNumber = 1; + + switch (certType) + { + case CertType::kRcac: { + X509CertRequestParams rcacRequest = { serialNumber, now, now + validity, desiredDn, desiredDn }; + ReturnErrorOnFailure(NewRootX509Cert(rcacRequest, issuerKeypair, derSpan)); + break; + } + case CertType::kIcac: { + X509CertRequestParams icacRequest = { serialNumber, now, now + validity, desiredDn, issuerDn }; + ReturnErrorOnFailure(NewICAX509Cert(icacRequest, subjectPublicKey, issuerKeypair, derSpan)); + break; + } + case CertType::kNoc: { + X509CertRequestParams nocRequest = { serialNumber, now, now + validity, desiredDn, issuerDn }; + ReturnErrorOnFailure(NewNodeOperationalX509Cert(nocRequest, subjectPublicKey, issuerKeypair, derSpan)); + break; + } + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (maximizeSize && (desiredDn.RDNCount() < CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES)) + { + Platform::ScopedMemoryBuffer paddedTlvBuf; + ReturnErrorCodeIf(!paddedTlvBuf.Alloc(kMaxCHIPCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan paddedTlvSpan{ paddedTlvBuf.Get(), kMaxCHIPCertLength + kMaxCertPaddingLength }; + ReturnErrorOnFailure(ConvertX509CertToChipCert(derSpan, paddedTlvSpan)); + + Platform::ScopedMemoryBuffer paddedDerBuf; + ReturnErrorCodeIf(!paddedDerBuf.Alloc(kMaxDERCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan paddedDerSpan{ paddedDerBuf.Get(), kMaxDERCertLength + kMaxCertPaddingLength }; + + Platform::ScopedMemoryBuffer fillerBuf; + ReturnErrorCodeIf(!fillerBuf.Alloc(kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + memset(fillerBuf.Get(), 'A', kMaxCertPaddingLength); + + int derPaddingLen = static_cast(kMaxDERCertLength - kDERCertDnEncodingOverhead - derSpan.size()); + int tlvPaddingLen = static_cast(kTLVDesiredSize - kTLVCertDnEncodingOverhead - paddedTlvSpan.size()); + if (certType == CertType::kRcac) + { + // For RCAC the issuer/subject DN are the same so padding will be present in both + derPaddingLen = (derPaddingLen - static_cast(kDERCertDnEncodingOverhead)) / 2; + tlvPaddingLen = (tlvPaddingLen - static_cast(kTLVCertDnEncodingOverhead)) / 2; + } + + size_t paddingLen = 0; + if (derPaddingLen >= 1 && tlvPaddingLen >= 1) + { + paddingLen = std::min(static_cast(std::min(derPaddingLen, tlvPaddingLen)), kMaxCertPaddingLength); + } + + for (; paddingLen > 0; paddingLen--) + { + paddedDerSpan = MutableByteSpan{ paddedDerBuf.Get(), kMaxDERCertLength + kMaxCertPaddingLength }; + paddedTlvSpan = MutableByteSpan{ paddedTlvBuf.Get(), kMaxCHIPCertLength + kMaxCertPaddingLength }; + + ChipDN certDn = desiredDn; + // Fill the padding in the DomainNameQualifier DN + certDn.AddAttribute_DNQualifier(CharSpan(fillerBuf.Get(), paddingLen), false); + + switch (certType) + { + case CertType::kRcac: { + X509CertRequestParams rcacRequest = { serialNumber, now, now + validity, certDn, certDn }; + ReturnErrorOnFailure(NewRootX509Cert(rcacRequest, issuerKeypair, paddedDerSpan)); + break; + } + case CertType::kIcac: { + X509CertRequestParams icacRequest = { serialNumber, now, now + validity, certDn, issuerDn }; + ReturnErrorOnFailure(NewICAX509Cert(icacRequest, subjectPublicKey, issuerKeypair, paddedDerSpan)); + break; + } + case CertType::kNoc: { + X509CertRequestParams nocRequest = { serialNumber, now, now + validity, certDn, issuerDn }; + ReturnErrorOnFailure(NewNodeOperationalX509Cert(nocRequest, subjectPublicKey, issuerKeypair, paddedDerSpan)); + break; + } + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ReturnErrorOnFailure(ConvertX509CertToChipCert(paddedDerSpan, paddedTlvSpan)); + + ChipLogProgress(Controller, "Generated maximized certificate with %u DER bytes, %u TLV bytes", + static_cast(paddedDerSpan.size()), static_cast(paddedTlvSpan.size())); + if (paddedDerSpan.size() <= kMaxDERCertLength && paddedTlvSpan.size() <= kMaxCHIPCertLength) + { + return CopySpanToMutableSpan(paddedDerSpan, outX509Cert); + } + } + } + + return CopySpanToMutableSpan(derSpan, outX509Cert); +} + +} // namespace + CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDelegate & storage) { using namespace ASN1; @@ -122,6 +243,12 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChainAfterValidation( uint16_t rcacBufLen = static_cast(std::min(rcac.size(), static_cast(UINT16_MAX))); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsRootCertificateStorage, key, err = mStorage->SyncGetKeyValue(key, rcac.data(), rcacBufLen)); + // Always regenerate RCAC on maximally sized certs. The keys remain the same, so everything is fine. + if (mUseMaximallySizedCerts) + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + if (err == CHIP_NO_ERROR) { uint64_t rcacId; @@ -137,10 +264,14 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChainAfterValidation( ReturnErrorOnFailure(rcac_dn.AddAttribute_MatterRCACId(mIssuerId)); ChipLogProgress(Controller, "Generating RCAC"); - X509CertRequestParams rcac_request = { 0, mNow, mNow + mValidity, rcac_dn, rcac_dn }; - ReturnErrorOnFailure(NewRootX509Cert(rcac_request, mIssuer, rcac)); - + ReturnErrorOnFailure(IssueX509Cert(mNow, mValidity, rcac_dn, rcac_dn, CertType::kRcac, mUseMaximallySizedCerts, + mIssuer.Pubkey(), mIssuer, rcac)); VerifyOrReturnError(CanCastTo(rcac.size()), CHIP_ERROR_INTERNAL); + + // Re-extract DN based on final generated cert + rcac_dn = ChipDN{}; + ReturnErrorOnFailure(ExtractSubjectDNFromX509Cert(rcac, rcac_dn)); + PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsRootCertificateStorage, key, ReturnErrorOnFailure(mStorage->SyncSetKeyValue(key, rcac.data(), static_cast(rcac.size())))); } @@ -149,6 +280,11 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChainAfterValidation( uint16_t icacBufLen = static_cast(std::min(icac.size(), static_cast(UINT16_MAX))); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateCertificateStorage, key, err = mStorage->SyncGetKeyValue(key, icac.data(), icacBufLen)); + // Always regenerate ICAC on maximally sized certs. The keys remain the same, so everything is fine. + if (mUseMaximallySizedCerts) + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } if (err == CHIP_NO_ERROR) { uint64_t icacId; @@ -164,10 +300,14 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChainAfterValidation( ReturnErrorOnFailure(icac_dn.AddAttribute_MatterICACId(mIntermediateIssuerId)); ChipLogProgress(Controller, "Generating ICAC"); - X509CertRequestParams icac_request = { 0, mNow, mNow + mValidity, icac_dn, rcac_dn }; - ReturnErrorOnFailure(NewICAX509Cert(icac_request, mIntermediateIssuer.Pubkey(), mIssuer, icac)); - + ReturnErrorOnFailure(IssueX509Cert(mNow, mValidity, rcac_dn, icac_dn, CertType::kIcac, mUseMaximallySizedCerts, + mIntermediateIssuer.Pubkey(), mIssuer, icac)); VerifyOrReturnError(CanCastTo(icac.size()), CHIP_ERROR_INTERNAL); + + // Re-extract DN based on final generated cert + icac_dn = ChipDN{}; + ReturnErrorOnFailure(ExtractSubjectDNFromX509Cert(icac, icac_dn)); + PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateCertificateStorage, key, ReturnErrorOnFailure(mStorage->SyncSetKeyValue(key, icac.data(), static_cast(icac.size())))); } @@ -178,8 +318,8 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChainAfterValidation( ReturnErrorOnFailure(noc_dn.AddCATs(cats)); ChipLogProgress(Controller, "Generating NOC"); - X509CertRequestParams noc_request = { 1, mNow, mNow + mValidity, noc_dn, icac_dn }; - return NewNodeOperationalX509Cert(noc_request, pubkey, mIntermediateIssuer, noc); + return IssueX509Cert(mNow, mValidity, icac_dn, noc_dn, CertType::kNoc, mUseMaximallySizedCerts, pubkey, mIntermediateIssuer, + noc); } CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan & csrElements, const ByteSpan & csrNonce, @@ -227,16 +367,16 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan ReturnErrorOnFailure(VerifyCertificateSigningRequest(csr.data(), csr.size(), pubkey)); chip::Platform::ScopedMemoryBuffer noc; - ReturnErrorCodeIf(!noc.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); - MutableByteSpan nocSpan(noc.Get(), kMaxCHIPDERCertLength); + ReturnErrorCodeIf(!noc.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan nocSpan(noc.Get(), kMaxDERCertLength); chip::Platform::ScopedMemoryBuffer icac; - ReturnErrorCodeIf(!icac.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); - MutableByteSpan icacSpan(icac.Get(), kMaxCHIPDERCertLength); + ReturnErrorCodeIf(!icac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan icacSpan(icac.Get(), kMaxDERCertLength); chip::Platform::ScopedMemoryBuffer rcac; - ReturnErrorCodeIf(!rcac.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); - MutableByteSpan rcacSpan(rcac.Get(), kMaxCHIPDERCertLength); + ReturnErrorCodeIf(!rcac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + MutableByteSpan rcacSpan(rcac.Get(), kMaxDERCertLength); ReturnErrorOnFailure( GenerateNOCChainAfterValidation(assignedId, mNextFabricId, chip::kUndefinedCATs, pubkey, rcacSpan, icacSpan, nocSpan)); diff --git a/src/controller/ExampleOperationalCredentialsIssuer.h b/src/controller/ExampleOperationalCredentialsIssuer.h index a85684cf6957e2..6e3b1e554d4288 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.h +++ b/src/controller/ExampleOperationalCredentialsIssuer.h @@ -65,6 +65,8 @@ class DLL_EXPORT ExampleOperationalCredentialsIssuer : public OperationalCredent mNodeIdRequested = true; } + void SetMaximallyLargeCertsUsed(bool areMaximallyLargeCertsUsed) { mUseMaximallySizedCerts = areMaximallyLargeCertsUsed; } + void SetFabricIdForNextNOCRequest(FabricId fabricId) override { mNextFabricId = fabricId; } /** @@ -108,8 +110,8 @@ class DLL_EXPORT ExampleOperationalCredentialsIssuer : public OperationalCredent Crypto::P256Keypair mIssuer; Crypto::P256Keypair mIntermediateIssuer; bool mInitialized = false; - uint32_t mIssuerId = 0; - uint32_t mIntermediateIssuerId = 1; + uint32_t mIssuerId = 1; + uint32_t mIntermediateIssuerId = 2; uint32_t mNow = 0; // By default, let's set validity to 10 years @@ -117,6 +119,7 @@ class DLL_EXPORT ExampleOperationalCredentialsIssuer : public OperationalCredent NodeId mNextAvailableNodeId = 1; PersistentStorageDelegate * mStorage = nullptr; + bool mUseMaximallySizedCerts = false; NodeId mNextRequestedNodeId = 1; FabricId mNextFabricId = 1; diff --git a/src/controller/python/OpCredsBinding.cpp b/src/controller/python/OpCredsBinding.cpp index e6ed27a6da1db3..cb714ae7385fc3 100644 --- a/src/controller/python/OpCredsBinding.cpp +++ b/src/controller/python/OpCredsBinding.cpp @@ -77,6 +77,8 @@ class OperationalCredentialsAdapter : public OperationalCredentialsDelegate return mExampleOpCredsIssuer.GenerateNOCChainAfterValidation(nodeId, fabricId, cats, pubKey, rcac, icac, noc); } + void SetMaximallyLargeCertsUsed(bool enabled) { mExampleOpCredsIssuer.SetMaximallyLargeCertsUsed(enabled); } + private: CHIP_ERROR GenerateNOCChain(const ByteSpan & csrElements, const ByteSpan & csrNonce, const ByteSpan & attestationSignature, const ByteSpan & attestationChallenge, const ByteSpan & DAC, const ByteSpan & PAI, @@ -360,9 +362,10 @@ ChipError::StorageType pychip_OpCreds_AllocateController(OpCredsContext * contex CATValues catValues; - if ((caseAuthTagLen + 1) > kMaxSubjectCATAttributeCount) + if (caseAuthTagLen > kMaxSubjectCATAttributeCount) { - ChipLogError(Controller, "# of CASE Tags exceeds kMaxSubjectCATAttributeCount"); + ChipLogError(Controller, "Too many of CASE Tags (%u) exceeds kMaxSubjectCATAttributeCount", + static_cast(caseAuthTagLen)); return CHIP_ERROR_INVALID_ARGUMENT.AsInteger(); } @@ -414,6 +417,15 @@ ChipError::StorageType pychip_OpCreds_AllocateController(OpCredsContext * contex return CHIP_NO_ERROR.AsInteger(); } +ChipError::StorageType pychip_OpCreds_SetMaximallyLargeCertsUsed(OpCredsContext * context, bool enabled) +{ + VerifyOrReturnError(context != nullptr && context->mAdapter != nullptr, CHIP_ERROR_INCORRECT_STATE.AsInteger()); + + context->mAdapter->SetMaximallyLargeCertsUsed(enabled); + + return CHIP_NO_ERROR.AsInteger(); +} + void pychip_OpCreds_FreeDelegate(OpCredsContext * context) { Platform::Delete(context); diff --git a/src/controller/python/chip/CertificateAuthority.py b/src/controller/python/chip/CertificateAuthority.py index aa9011fb60a250..7f40f0cd016100 100644 --- a/src/controller/python/chip/CertificateAuthority.py +++ b/src/controller/python/chip/CertificateAuthority.py @@ -45,7 +45,7 @@ class CertificateAuthority: Each CertificateAuthority instance is associated with a single instance of the OperationalCredentialsAdapter. This adapter instance implements the OperationalCredentialsDelegate and is meant to provide a Python adapter to the functions in that delegate. It relies on the in-built - ExampleOperationalCredentialsIssuer to then generate certificate material for the CA. This instance also uses the 'CA index' to + ExampleOperationalCredentialsIssuer to then generate certificate material for the CA. This instance also uses the 'CA index' to store/look-up the associated credential material from the provided PersistentStorage object. ''' @classmethod @@ -74,10 +74,14 @@ def __init__(self, chipStack: ChipStack.ChipStack, caIndex: int, persistentStora self._Handle().pychip_OpCreds_InitializeDelegate.restype = c_void_p self._Handle().pychip_OpCreds_InitializeDelegate.argtypes = [ctypes.py_object, ctypes.c_uint32, ctypes.c_void_p] + self._Handle().pychip_OpCreds_SetMaximallyLargeCertsUsed.restype = c_uint32 + self._Handle().pychip_OpCreds_SetMaximallyLargeCertsUsed.argtypes = [ctypes.c_void_p, ctypes.c_bool] + if (persistentStorage is None): persistentStorage = self._chipStack.GetStorageManager() self._persistentStorage = persistentStorage + self._maximizeCertChains = False self._closure = self._chipStack.Call( lambda: self._Handle().pychip_OpCreds_InitializeDelegate( @@ -181,6 +185,21 @@ def caIndex(self) -> int: def adminList(self) -> list[FabricAdmin.FabricAdmin]: return self._activeAdmins + @property + def maximizeCertChains(self) -> bool: + return self._maximizeCertChains + + @maximizeCertChains.setter + def maximizeCertChains(self, enabled: bool): + res = self._chipStack.Call( + lambda: self._Handle().pychip_OpCreds_SetMaximallyLargeCertsUsed(ctypes.c_void_p(self._closure), ctypes.c_bool(enabled)) + ) + + if res != 0: + raise self._chipStack.ErrorToException(res) + + self._maximizeCertChains = enabled + def __del__(self): self.Shutdown() @@ -243,7 +262,7 @@ def LoadAuthoritiesFromStorage(self): ca = self.NewCertificateAuthority(int(caIndex)) ca.LoadFabricAdminsFromStorage() - def NewCertificateAuthority(self, caIndex: int = None): + def NewCertificateAuthority(self, caIndex: int = None, maximizeCertChains: bool = False): ''' Creates a new CertificateAuthority instance with the provided CA Index and the PersistentStorage instance previously setup in the constructor. @@ -268,6 +287,7 @@ def NewCertificateAuthority(self, caIndex: int = None): self._persistentStorage.SetReplKey(key='caList', value=caList) ca = CertificateAuthority(chipStack=self._chipStack, caIndex=caIndex, persistentStorage=self._persistentStorage) + ca.maximizeCertChains = maximizeCertChains self._activeCaList.append(ca) return ca diff --git a/src/controller/python/chip/FabricAdmin.py b/src/controller/python/chip/FabricAdmin.py index 3cfe03ffdb7e95..97a729035f811e 100644 --- a/src/controller/python/chip/FabricAdmin.py +++ b/src/controller/python/chip/FabricAdmin.py @@ -102,7 +102,7 @@ def NewController(self, nodeId: int = None, paaTrustStorePath: str = "", useTest raise RuntimeError(f"Provided NodeId {nodeId} collides with an existing controller instance!") self.logger().warning( - f"Allocating new controller with CaIndex: {self._certificateAuthority.caIndex}, FabricId: 0x{self._fabricId:016X}, NodeId: 0x{nodeId:016X}") + f"Allocating new controller with CaIndex: {self._certificateAuthority.caIndex}, FabricId: 0x{self._fabricId:016X}, NodeId: 0x{nodeId:016X}, CatTags: {catTags}") controller = ChipDeviceCtrl.ChipDeviceController(opCredsContext=self._certificateAuthority.GetOpCredsContext(), fabricId=self._fabricId, nodeId=nodeId, adminVendorId=self._vendorId, paaTrustStorePath=paaTrustStorePath, useTestCommissioner=useTestCommissioner, fabricAdmin=self, catTags=catTags) diff --git a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py index ae4da4a4ee1fa8..20dbcd6441a746 100644 --- a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py +++ b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py @@ -30,7 +30,7 @@ _UINT16_MAX = 65535 -logger = logging.getLogger() +logger = logging.getLogger('CommissioningBuildingBlocks') async def _IsNodeInFabricList(devCtrl, nodeId): @@ -43,7 +43,7 @@ async def _IsNodeInFabricList(devCtrl, nodeId): return False -async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDeviceController, privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int): +async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDeviceController, privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int, targetCatTags: typing.List[int] = []): ''' Given an existing controller with admin privileges over a target node, grants the specified privilege to the new ChipDeviceController instance to the entire Node. This is achieved by updating the ACL entries on the target. @@ -53,20 +53,29 @@ async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDevic Args: adminCtrl: ChipDeviceController instance with admin privileges over the target node grantedCtrl: ChipDeviceController instance that is being granted the new privilege. - privilege: Privilege to grant to the granted controller + privilege: Privilege to grant to the granted controller. If None, no privilege is granted. targetNodeId: Target node to which the controller is granted privilege. + targetCatTag: Target 32-bit CAT tag that is granted privilege. If provided, this will be used in the subject list instead of the nodeid of that of grantedCtrl. ''' - data = await adminCtrl.ReadAttribute(targetNodeId, [(Clusters.AccessControl.Attributes.Acl)]) if 0 not in data: raise ValueError("Did not get back any data (possible cause: controller has no access..") currentAcls = data[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl] + if len(targetCatTags) != 0: + # Convert to an ACL subject format in CAT range + targetSubjects = [tag | 0xFFFF_FFFD_0000_0000 for tag in targetCatTags] + else: + targetSubjects = [grantedCtrl.nodeId] + + if (len(targetSubjects) > 4): + raise ValueError(f"List of target subjects of len {len(targetSubjects)} exceeeded the minima of 4!") + # Step 1: Wipe the subject from all existing ACLs. for acl in currentAcls: if (acl.subjects != NullValue): - acl.subjects = [subject for subject in acl.subjects if subject != grantedCtrl.nodeId] + acl.subjects = [subject for subject in acl.subjects if subject not in targetSubjects] if (privilege): addedPrivilege = False @@ -75,9 +84,11 @@ async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDevic # the existing privilege in that entry matches our desired privilege. for acl in currentAcls: if acl.privilege == privilege: - if grantedCtrl.nodeId not in acl.subjects: - acl.subjects.append(grantedCtrl.nodeId) + subjectSet = set(acl.subjects) + subjectSet.update(targetSubjects) + acl.subjects = list(subjectSet) addedPrivilege = True + break # Step 3: If there isn't an existing entry to add to, make a new one. if (not(addedPrivilege)): @@ -86,14 +97,16 @@ async def GrantPrivilege(adminCtrl: ChipDeviceController, grantedCtrl: ChipDevic f"Cannot add another ACL entry to grant privilege to existing count of {currentAcls} ACLs -- will exceed minimas!") currentAcls.append(Clusters.AccessControl.Structs.AccessControlEntry(privilege=privilege, authMode=Clusters.AccessControl.Enums.AuthMode.kCase, - subjects=[grantedCtrl.nodeId])) + subjects=targetSubjects)) # Step 4: Prune ACLs which have empty subjects. currentAcls = [acl for acl in currentAcls if acl.subjects != NullValue and len(acl.subjects) != 0] + + logger.info(f'GrantPrivilege: Writing acls: {currentAcls}') await adminCtrl.WriteAttribute(targetNodeId, [(0, Clusters.AccessControl.Attributes.Acl(currentAcls))]) -async def CreateControllersOnFabric(fabricAdmin: FabricAdmin, adminDevCtrl: ChipDeviceController, controllerNodeIds: typing.List[int], privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int) -> typing.List[ChipDeviceController]: +async def CreateControllersOnFabric(fabricAdmin: FabricAdmin, adminDevCtrl: ChipDeviceController, controllerNodeIds: typing.List[int], privilege: Clusters.AccessControl.Enums.Privilege, targetNodeId: int, catTags: typing.List[int] = []) -> typing.List[ChipDeviceController]: ''' Create new ChipDeviceController instances on a given fabric with a specific privilege on a target node. Args: @@ -102,13 +115,14 @@ async def CreateControllersOnFabric(fabricAdmin: FabricAdmin, adminDevCtrl: Chip controllerNodeIds: List of desired nodeIds for the controllers. privilege: The specific ACL privilege to grant to the newly minted controllers. targetNodeId: The Node ID of the target. + catTags: CAT Tags to include in the NOC of controller, as well as when setting up the ACLs on the target. ''' controllerList = [] for nodeId in controllerNodeIds: - newController = fabricAdmin.NewController(nodeId=nodeId) - await GrantPrivilege(adminDevCtrl, newController, privilege, targetNodeId) + newController = fabricAdmin.NewController(nodeId=nodeId, catTags=catTags) + await GrantPrivilege(adminDevCtrl, newController, privilege, targetNodeId, catTags) controllerList.append(newController) return controllerList diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 8488b2e80b6ce6..8665c288276603 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -40,6 +40,7 @@ import copy import secrets import faulthandler +import ipdb logger = logging.getLogger('PythonMatterControllerTEST') logger.setLevel(logging.INFO) @@ -389,31 +390,28 @@ def TestFailsafe(self, nodeid: int): async def TestControllerCATValues(self, nodeid: int): ''' This tests controllers using CAT Values ''' - # Allocate a new controller instance with a CAT tag. - newController = self.fabricAdmin.NewController(nodeId=300, catTags=[0x00010001]) + newControllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=self.fabricAdmin, adminDevCtrl=self.devCtrl, controllerNodeIds=[300], targetNodeId=nodeid, privilege=None, catTags=[0x0001_0001]) # Read out an attribute using the new controller. It has no privileges, so this should fail with an UnsupportedAccess error. - res = await newController.ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) + res = await newControllers[0].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) if(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl].Reason.status != IM.Status.UnsupportedAccess): self.logger.error(f"1: Received data instead of an error:{res}") return False - # Do a read-modify-write operation on the ACL list to add the CAT tag to the ACL list. - aclList = (await self.devCtrl.ReadAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl)]))[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl] - origAclList = copy.deepcopy(aclList) - aclList[0].subjects.append(0xFFFFFFFD00010001) - await self.devCtrl.WriteAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl(aclList))]) + # Grant the new controller privilege by adding the CAT tag to the subject. + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=nodeid, targetCatTags=[0x0001_0001]) # Read out the attribute again - this time, it should succeed. - res = await newController.ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) + res = await newControllers[0].ReadAttribute(nodeid=nodeid, attributes=[(0, Clusters.AccessControl.Attributes.Acl)]) if (type(res[0][Clusters.AccessControl][Clusters.AccessControl.Attributes.Acl][0]) != Clusters.AccessControl.Structs.AccessControlEntry): self.logger.error(f"2: Received something other than data:{res}") return False - # Write back the old entry to reset ACL list back. - await self.devCtrl.WriteAttribute(nodeid, [(0, Clusters.AccessControl.Attributes.Acl(origAclList))]) - newController.Shutdown() + # Reset the privilege back to pre-test. + await CommissioningBuildingBlocks.GrantPrivilege(adminCtrl=self.devCtrl, grantedCtrl=newControllers[0], privilege=None, targetNodeId=nodeid) + + newControllers[0].Shutdown() return True diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py new file mode 100644 index 00000000000000..00dd9a111b8308 --- /dev/null +++ b/src/python_testing/TC_RR_1_1.py @@ -0,0 +1,424 @@ +# +# 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. +# + +from matter_testing_support import MatterBaseTest, default_matter_test_main, async_test_body +import chip.clusters as Clusters +import chip.FabricAdmin +import chip.CertificateAuthority +import logging +from mobly import asserts +from chip.utils import CommissioningBuildingBlocks +from chip.clusters.Attribute import TypedAttributePath, SubscriptionTransaction, AttributeStatus +from chip.interaction_model import Status as StatusEnum +import queue +import asyncio +from binascii import hexlify +from threading import Event +import time +import random + +from TC_SC_3_6 import AttributeChangeAccumulator, ResubscriptionCatcher + +# TODO: Overall, we need to add validation that session IDs have not changed throughout to be agnostic +# to some internal behavior assumptions of the SDK we are making relative to the write to +# the trigger the subscriptions not re-opening a new CASE session +# + + +class TC_RR_1_1(MatterBaseTest): + def setup_class(self): + self._pseudo_random_generator = random.Random(1234) + self._subscriptions = [] + + def teardown_class(self): + logging.info("Teardown: shutting down all subscription to avoid racy callbacks") + for subscription in self._subscriptions: + subscription.Shutdown() + + @async_test_body + async def test_TC_RR_1_1(self): + dev_ctrl = self.default_controller + + # Debug/test arguments + + # Get overrides for debugging the test + num_fabrics_to_commission = self.user_params.get("num_fabrics_to_commission", 5) + num_controllers_per_fabric = self.user_params.get("num_controllers_per_fabric", 3) + # Immediate reporting + min_report_interval_sec = self.user_params.get("min_report_interval_sec", 0) + # 10 minutes max reporting interval --> We don't care about keep-alives per-se and + # want to avoid resubscriptions + max_report_interval_sec = self.user_params.get("max_report_interval_sec", 10 * 60) + # Time to wait after changing NodeLabel for subscriptions to all hit. This is dependant + # on MRP params of subscriber and on actual min_report_interval. + # TODO: Determine the correct max value depending on target. Test plan doesn't say! + timeout_delay_sec = self.user_params.get("timeout_delay_sec", max_report_interval_sec * 2) + # Whether to skip filling the UserLabel clusters + skip_user_label_cluster_steps = self.user_params.get("skip_user_label_cluster_steps", False) + + BEFORE_LABEL = "Before Subscriptions 12345678912" + AFTER_LABEL = "After Subscriptions 123456789123" + + # Pre-conditions + + # Make sure all certificates are installed with maximal size + dev_ctrl.fabricAdmin.certificateAuthority.maximizeCertChains = True + + # TODO: Do from PICS list. The reflection approach here what a real client would do, + # and it respects what the test says: "TH writes 4 entries per endpoint where LabelList is supported" + logging.info("Pre-condition: determine whether any endpoints have UserLabel cluster (ULABEL.S.A0000(LabelList))") + endpoints_with_user_label_list = await dev_ctrl.ReadAttribute(self.dut_node_id, [Clusters.UserLabel.Attributes.LabelList]) + has_user_labels = len(endpoints_with_user_label_list) > 0 + if has_user_labels: + logging.info("--> User label cluster present on endpoints %s" % + ", ".join(["%d" % ep for ep in endpoints_with_user_label_list.keys()])) + else: + logging.info("--> User label cluster not present on any endpoitns") + + # Generate list of all clients names + all_names = [] + for fabric_idx in range(num_fabrics_to_commission): + for controller_idx in range(num_controllers_per_fabric): + all_names.append("RD%d%s" % (fabric_idx + 1, chr(ord('A') + controller_idx))) + logging.info(f"Client names that will be used: {all_names}") + client_list = [] + + # TODO: Shall we also verify SupportedFabrics attribute, and the CapabilityMinima attribute? + logging.info("Pre-conditions: validate CapabilityMinima.CaseSessionsPerFabric >= 3") + + capability_minima = await self.read_single_attribute(dev_ctrl, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.Basic.Attributes.CapabilityMinima) + asserts.assert_greater_equal(capability_minima.caseSessionsPerFabric, 3) + + # Step 1: Commission 5 fabrics with maximized NOC chains + logging.info(f"Step 1: use existing fabric to configure new fabrics so that total is {num_fabrics_to_commission} fabrics") + + # Generate Node IDs for subsequent controllers start at 200, follow 200, 300, ... + node_ids = [200 + (i * 100) for i in range(num_controllers_per_fabric - 1)] + + # Prepare clients for first fabric, that includes the default controller + dev_ctrl.name = all_names.pop(0) + client_list.append(dev_ctrl) + + if num_controllers_per_fabric > 1: + new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=dev_ctrl.fabricAdmin, adminDevCtrl=dev_ctrl, controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) + for controller in new_controllers: + controller.name = all_names.pop(0) + client_list.extend(new_controllers) + + # Prepare clients for subsequent fabrics + for i in range(num_fabrics_to_commission - 1): + admin_index = 2 + i + logging.info("Commissioning fabric %d/%d" % (admin_index, num_fabrics_to_commission)) + new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=admin_index) + + new_admin_ctrl = new_fabric_admin.NewController(nodeId=dev_ctrl.nodeId, catTags=[0x0001_0001]) + new_admin_ctrl.name = all_names.pop(0) + client_list.append(new_admin_ctrl) + await CommissioningBuildingBlocks.AddNOCForNewFabricFromExisting(commissionerDevCtrl=dev_ctrl, newFabricDevCtrl=new_admin_ctrl, existingNodeId=self.dut_node_id, newNodeId=self.dut_node_id) + + if num_controllers_per_fabric > 1: + new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric(fabricAdmin=new_fabric_admin, adminDevCtrl=new_admin_ctrl, + controllerNodeIds=node_ids, privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001]) + for controller in new_controllers: + controller.name = all_names.pop(0) + + client_list.extend(new_controllers) + + asserts.assert_equal(len(client_list), num_fabrics_to_commission * + num_controllers_per_fabric, "Must have the right number of clients") + + client_by_name = {client.name: client for client in client_list} + + # Step 2: Set the Label field for each fabric and BasicInformation.NodeLabel to 32 characters + logging.info("Step 2: Setting the Label field for each fabric and BasicInformation.NodeLabel to 32 characters") + + for idx in range(num_fabrics_to_commission): + fabric_number = idx + 1 + # Client is client A for each fabric to set the Label field + client_name = "RD%dA" % fabric_number + client = client_by_name[client_name] + + # Send the UpdateLabel command + label = ("%d" % fabric_number) * 32 + logging.info("Step 2a: Setting fabric label on fabric %d to '%s' using client %s" % (fabric_number, label, client_name)) + await client.SendCommand(self.dut_node_id, 0, Clusters.OperationalCredentials.Commands.UpdateFabricLabel(label)) + + # Read back + fabric_metadata = await self.read_single_attribute(client, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.OperationalCredentials.Attributes.Fabrics) + print(fabric_metadata) + asserts.assert_equal(fabric_metadata[0].label, label, "Fabrics[x].label must match what was written") + + # Before subscribing, set the NodeLabel to "Before Subscriptions" + logging.info(f"Step 2b: Set BasicInformation.NodeLabel to {BEFORE_LABEL}") + await client_list[0].WriteAttribute(self.dut_node_id, [(0, Clusters.Basic.Attributes.NodeLabel(value=BEFORE_LABEL))]) + + node_label = await self.read_single_attribute(client, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.Basic.Attributes.NodeLabel) + asserts.assert_equal(node_label, BEFORE_LABEL, "NodeLabel must match what was written") + + # Step 3: Add 3 Access Control entries on DUT with a list of 4 Subjects and 3 Targets with the following parameters (...) + logging.info("Step 3: Fill ACL table so that all minimas are reached") + + for idx in range(num_fabrics_to_commission): + fabric_number = idx + 1 + # Client is client A for each fabric + client_name = "RD%dA" % fabric_number + client = client_by_name[client_name] + + acl = self.build_acl(fabric_number, client_by_name, num_controllers_per_fabric) + + logging.info(f"Step 3a: Writing ACL entry for fabric {fabric_number}") + await client.WriteAttribute(self.dut_node_id, [(0, Clusters.AccessControl.Attributes.Acl(acl))]) + + logging.info(f"Step 3b: Validating ACL entry for fabric {fabric_number}") + acl_readback = await self.read_single_attribute(client, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.AccessControl.Attributes.Acl) + fabric_index = 9999 + for entry in acl_readback: + asserts.assert_equal(entry.fabricIndex, fabric_number, "Fabric Index of response entries must match") + fabric_index = entry.fabricIndex + + for entry in acl: + # Fix-up the original ACL list items (that all had fabricIndex of 0 on write, since ignored) + # so that they match incoming fabric index. Allows checking by equality of the structs + entry.fabricIndex = fabric_index + asserts.assert_equal(acl_readback, acl, "ACL must match what was written") + + # Step 4 and 5 (the operations cannot be separated): establish all CASE sessions and subscriptions + + # Subscribe with all clients to NodeLabel attribute and 2 more paths + sub_handlers = [] + resub_catchers = [] + output_queue = queue.Queue() + subscription_contents = [ + (0, Clusters.Basic.Attributes.NodeLabel), # Single attribute + (0, Clusters.OperationalCredentials), # Wildcard all of opcreds attributes on EP0 + Clusters.Descriptor # All descriptors on all endpoints + ] + + logging.info("Step 4 and 5 (first part): Establish subscription with all %d clients" % len(client_list)) + for sub_idx, client in enumerate(client_list): + logging.info("Establishing subscription %d/%d from controller node %s" % (sub_idx + 1, len(client_list), client.name)) + + sub = await client.ReadAttribute(nodeid=self.dut_node_id, attributes=subscription_contents, + reportInterval=(min_report_interval_sec, max_report_interval_sec), keepSubscriptions=False) + self._subscriptions.append(sub) + + attribute_handler = AttributeChangeAccumulator( + name=client.name, expected_attribute=Clusters.Basic.Attributes.NodeLabel, output=output_queue) + sub.SetAttributeUpdateCallback(attribute_handler) + sub_handlers.append(attribute_handler) + + # TODO: Replace resubscription catcher with API to disable re-subscription on failure + resub_catcher = ResubscriptionCatcher(name=client.name) + sub.SetResubscriptionAttemptedCallback(resub_catcher) + resub_catchers.append(resub_catcher) + + asserts.assert_equal(len(self._subscriptions), len(client_list), "Must have the right number of subscriptions") + + # Step 6: Read 9 paths and validate success + logging.info("Step 6: Read 9 paths (first 9 attributes of Basic Information cluster) and validate success") + + large_read_contents = [ + Clusters.Basic.Attributes.DataModelRevision, + Clusters.Basic.Attributes.VendorName, + Clusters.Basic.Attributes.VendorID, + Clusters.Basic.Attributes.ProductName, + Clusters.Basic.Attributes.ProductID, + Clusters.Basic.Attributes.NodeLabel, + Clusters.Basic.Attributes.Location, + Clusters.Basic.Attributes.HardwareVersion, + Clusters.Basic.Attributes.HardwareVersionString, + ] + large_read_paths = [(0, attrib) for attrib in large_read_contents] + basic_info = await dev_ctrl.ReadAttribute(self.dut_node_id, large_read_paths) + + # Make sure everything came back from the read that we expected + asserts.assert_true(0 in basic_info.keys(), "Must have read endpoint 0 data") + asserts.assert_true(Clusters.Basic in basic_info[0].keys(), "Must have read Basic Information cluster data") + for attribute in large_read_contents: + asserts.assert_true(attribute in basic_info[0][Clusters.Basic], + "Must have read back attribute %s" % (attribute.__name__)) + + # Step 7: Trigger a change on NodeLabel + logging.info( + "Step 7: Change attribute with one client, await all attributes changed successfully without loss of subscriptions") + await asyncio.sleep(1) + await client_list[0].WriteAttribute(self.dut_node_id, [(0, Clusters.Basic.Attributes.NodeLabel(value=AFTER_LABEL))]) + + all_changes = {client.name: False for client in client_list} + + # Await a stabilization delay in increments to let the event loops run + start_time = time.time() + elapsed = 0 + time_remaining = timeout_delay_sec + + while time_remaining > 0: + try: + item = output_queue.get(block=True, timeout=time_remaining) + client_name, endpoint, attribute, value = item['name'], item['endpoint'], item['attribute'], item['value'] + + # Record arrival of an expected subscription change when seen + if endpoint == 0 and attribute == Clusters.Basic.Attributes.NodeLabel and value == AFTER_LABEL: + if not all_changes[client_name]: + logging.info("Got expected attribute change for client %s" % client_name) + all_changes[client_name] = True + + # We are done waiting when we have accumulated all results + if all(all_changes.values()): + logging.info("All clients have reported, done waiting.") + break + except queue.Empty: + # No error, we update timeouts and keep going + pass + + elapsed = time.time() - start_time + time_remaining = timeout_delay_sec - elapsed + + logging.info("Step 7: Validation of results") + sub_test_failed = False + + for catcher in resub_catchers: + if catcher.caught_resubscription: + logging.error("Client %s saw a resubscription" % catcher.name) + sub_test_failed = True + else: + logging.info("Client %s correctly did not see a resubscription" % catcher.name) + + all_reports_gotten = all(all_changes.values()) + if not all_reports_gotten: + logging.error("Missing reports from the following clients: %s" % + ", ".join([name for name, value in all_changes.items() if value is False])) + sub_test_failed = True + else: + logging.info("Got successful reports from all clients, meaning all concurrent CASE sessions worked") + + # Determine result of Step 7 + if sub_test_failed: + asserts.fail("Failed step 7 !") + + # Step 8: Validate sessions have not changed by doing a read on NodeLabel from all clients + logging.info("Step 8: Read back NodeLabel directly from all clients") + for sub_idx, client in enumerate(client_list): + logging.info("Reading NodeLabel (%d/%d) from controller node %s" % (sub_idx + 1, len(client_list), client.name)) + + label_readback = await self.read_single_attribute(client, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.Basic.Attributes.NodeLabel) + asserts.assert_equal(label_readback, AFTER_LABEL) + + # TODO: Compare before/after session IDs. Requires more native changes, and the + # subcription method above is actually good enough we think. + + # Step 9: Fill user label list + if has_user_labels and not skip_user_label_cluster_steps: + await self.fill_user_label_list(dev_ctrl, self.dut_node_id) + else: + logging.info("Step 9: Skipped due to no UserLabel cluster instances") + + def random_string(self, length) -> str: + rnd = self._pseudo_random_generator + return "".join([rnd.choice("abcdef0123456789") for _ in range(length)])[:length] + + async def fill_user_label_list(self, dev_ctrl, target_node_id): + logging.info("Step 9: Fill UserLabel clusters on each endpoint") + user_labels = await dev_ctrl.ReadAttribute(target_node_id, [Clusters.UserLabel]) + + # Build 4 sets of maximized labels + random_label = self.random_string(16) + random_value = self.random_string(16) + labels = [Clusters.UserLabel.Structs.LabelStruct(label=random_label, value=random_value) for _ in range(4)] + + for endpoint_id in user_labels: + clusters = user_labels[endpoint_id] + for cluster in clusters: + if cluster == Clusters.UserLabel: + logging.info("Step 9a: Filling UserLabel cluster on endpoint %d" % endpoint_id) + statuses = await dev_ctrl.WriteAttribute(target_node_id, [(endpoint_id, Clusters.UserLabel.Attributes.LabelList(labels))]) + asserts.assert_equal(statuses[0].Status, StatusEnum.Success, "Label write must succeed") + + logging.info("Step 9b: Validate UserLabel cluster contents after write on endpoint %d" % endpoint_id) + read_back_labels = await self.read_single_attribute(dev_ctrl, node_id=target_node_id, endpoint=endpoint_id, attribute=Clusters.UserLabel.Attributes.LabelList) + print(read_back_labels) + + asserts.assert_equal(read_back_labels, labels, "LabelList attribute must match what was written") + + def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): + acl = [] + + # Test says: + # + # . struct + # - Privilege field: Administer (5) + # - AuthMode field: CASE (2) + # - Subjects field: [0xFFFF_FFFD_0001_0001, 0x2000_0000_0000_0001, 0x2000_0000_0000_0002, 0x2000_0000_0000_0003] + # - Targets field: [{Endpoint: 0}, {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC30}, {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC31}] + # . struct + # - Privilege field: Manage (4) + # - AuthMode field: CASE (2) + # - Subjects field: [0x1000_0000_0000_0001, 0x1000_0000_0000_0002, 0x1000_0000_0000_0003, 0x1000_0000_0000_0004] + # - Targets field: [{Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC20}, {Cluster: 0xFFF1_FC01, DeviceType: 0xFFF1_FC21}, {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_FC22}] + # . struct + # - Privilege field: Operate (3) + # - AuthMode field: CASE (2) + # - Subjects field: [0x3000_0000_0000_0001, 0x3000_0000_0000_0002, 0x3000_0000_0000_0003, 0x3000_0000_0000_0004] + # - Targets field: [{Cluster: 0xFFF1_FC40, DeviceType: 0xFFF1_FC20}, {Cluster: 0xFFF1_FC41, DeviceType: 0xFFF1_FC21}, {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_FC42}] + + # Administer ACL entry + admin_subjects = [0xFFFF_FFFD_0001_0001, 0x2000_0000_0000_0001, 0x2000_0000_0000_0002, 0x2000_0000_0000_0003] + + admin_targets = [ + Clusters.AccessControl.Structs.Target(endpoint=0), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC00, deviceType=0xFFF1_BC30), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC01, deviceType=0xFFF1_BC31) + ] + admin_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kAdminister, + authMode=Clusters.AccessControl.Enums.AuthMode.kCase, + subjects=admin_subjects, + targets=admin_targets) + acl.append(admin_acl_entry) + + # Manage ACL entry + manage_subjects = [0x1000_0000_0000_0001, 0x1000_0000_0000_0002, 0x1000_0000_0000_0003, 0x1000_0000_0000_0004] + manage_targets = [ + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC00, deviceType=0xFFF1_BC20), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC01, deviceType=0xFFF1_BC21), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC02, deviceType=0xFFF1_BC22) + ] + + manage_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kManage, + authMode=Clusters.AccessControl.Enums.AuthMode.kCase, + subjects=manage_subjects, + targets=manage_targets) + acl.append(manage_acl_entry) + + # Operate ACL entry + operate_subjects = [0x3000_0000_0000_0001, 0x3000_0000_0000_0002, 0x3000_0000_0000_0003, 0x3000_0000_0000_0004] + operate_targets = [ + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC40, deviceType=0xFFF1_BC20), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC41, deviceType=0xFFF1_BC21), + Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC42, deviceType=0xFFF1_BC42) + ] + + operate_acl_entry = Clusters.AccessControl.Structs.AccessControlEntry(privilege=Clusters.AccessControl.Enums.Privilege.kOperate, + authMode=Clusters.AccessControl.Enums.AuthMode.kCase, + subjects=operate_subjects, + targets=operate_targets) + acl.append(operate_acl_entry) + + return acl + + +if __name__ == "__main__": + default_matter_test_main(maximize_cert_chains=True, controller_cat_tags=[0x0001_0001]) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 607f24a057b9c3..7c21f0b6471ce8 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -124,6 +124,7 @@ class MatterTestConfig: ble_interface_id: int = None admin_vendor_id: int = _DEFAULT_ADMIN_VENDOR_ID + case_admin_subject: int = None global_test_params: dict = field(default_factory=dict) # List of explicit tests to run by name. If empty, all tests will run tests: List[str] = field(default_factory=list) @@ -132,6 +133,7 @@ class MatterTestConfig: discriminator: int = None setup_passcode: int = None commissionee_ip_address_just_for_testing: str = None + maximize_cert_chains: bool = False qr_code_content: str = None manual_code: str = None @@ -144,6 +146,9 @@ class MatterTestConfig: dut_node_id: int = _DEFAULT_DUT_NODE_ID # Node ID to use for controller/commissioner controller_node_id: int = _DEFAULT_CONTROLLER_NODE_ID + # CAT Tags for default controller/commissioner + controller_cat_tags: List[int] = None + # Fabric ID which to use fabric_id: int = None # "Alpha" by default @@ -185,11 +190,12 @@ def _init_stack(self, already_initialized: bool, **kwargs): if (len(self._certificate_authority_manager.activeCaList) == 0): self._logger.warn( "Didn't find any CertificateAuthorities in storage -- creating a new CertificateAuthority + FabricAdmin...") - ca = self._certificate_authority_manager.NewCertificateAuthority() - ca.NewFabricAdmin(vendorId=0xFFF1, fabricId=0xFFF1) + ca = self._certificate_authority_manager.NewCertificateAuthority(caIndex=self._config.root_of_trust_index) + ca.maximizeCertChains = self._config.maximize_cert_chains + ca.NewFabricAdmin(vendorId=0xFFF1, fabricId=self._config.fabric_id) elif (len(self._certificate_authority_manager.activeCaList[0].adminList) == 0): self._logger.warn("Didn't find any FabricAdmins in storage -- creating a new one...") - self._certificate_authority_manager.activeCaList[0].NewFabricAdmin(vendorId=0xFFF1, fabricId=0xFFF1) + self._certificate_authority_manager.activeCaList[0].NewFabricAdmin(vendorId=0xFFF1, fabricId=self._config.fabric_id) # TODO: support getting access to chip-tool credentials issuer's data @@ -477,6 +483,13 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf return False config.commissionee_ip_address_just_for_testing = args.ip_addr + if args.case_admin_subject is None: + # Use controller node ID as CASE admin subject during commissioning if nothing provided + config.case_admin_subject = config.controller_node_id + else: + # If a CASE admin subject is provided, then use that + config.case_admin_subject = args.case_admin_subject + return True @@ -569,6 +582,8 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig: commission_group.add_argument('--admin-vendor-id', action="store", type=int_decimal_or_hex, default=_DEFAULT_ADMIN_VENDOR_ID, metavar="VENDOR_ID", help="VendorID to use during commissioning (default 0x%04X)" % _DEFAULT_ADMIN_VENDOR_ID) + commission_group.add_argument('--case-admin-subject', action="store", type=int_decimal_or_hex, + metavar="CASE_ADMIN_SUBJECT", help="Set the CASE admin subject to an explicit value (default to commissioner Node ID)") code_group = parser.add_mutually_exclusive_group(required=False) @@ -655,7 +670,7 @@ def _commission_device(self) -> bool: raise ValueError("Invalid commissioning method %s!" % conf.commissioning_method) -def default_matter_test_main(argv=None): +def default_matter_test_main(argv=None, **kwargs): """Execute the test class in a test module. This is the default entry point for running a test script file directly. In this case, only one test class in a test script is allowed. @@ -670,6 +685,10 @@ def default_matter_test_main(argv=None): """ matter_test_config = parse_matter_test_args(argv) + # Allow override of command line from optional arguments + if matter_test_config.controller_cat_tags is None and "controller_cat_tags" in kwargs: + matter_test_config.controller_cat_tags = kwargs["controller_cat_tags"] + # Find the test class in the test script. test_class = _find_test_class() @@ -681,12 +700,21 @@ def default_matter_test_main(argv=None): if len(matter_test_config.tests) > 0: tests = matter_test_config.tests + # This is required in case we need any testing with maximized certificate chains. + # We need *all* issuers from the start, even for default controller, to use + # maximized chains, before MatterStackState init, others some stale certs + # may not chain properly. + if "maximize_cert_chains" in kwargs: + matter_test_config.maximize_cert_chains = kwargs["maximize_cert_chains"] + stack = MatterStackState(matter_test_config) test_config.user_params["matter_stack"] = stash_globally(stack) # TODO: Steer to right FabricAdmin! + # TODO: If CASE Admin Subject is a CAT tag range, then make sure to issue NOC with that CAT tag + default_controller = stack.certificate_authorities[0].adminList[0].NewController(nodeId=matter_test_config.controller_node_id, - paaTrustStorePath=str(matter_test_config.paa_trust_store_path)) + paaTrustStorePath=str(matter_test_config.paa_trust_store_path), catTags=matter_test_config.controller_cat_tags) test_config.user_params["default_controller"] = stash_globally(default_controller) test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) From 74ea252071e40770c8dd3ecc1f6948cf6ff3e7a8 Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Fri, 19 Aug 2022 19:21:47 -0700 Subject: [PATCH 090/115] Adding darwin callbacks for NOC Generation (#21705) * Adding darwin callbacks for NOC Generation * Fixing compiler errors in new dependencies in src/credentials * Addressing feedback from woody-apple@ and bzbarsky-apple@ * Addressing second round of feedback * Address feedback around returning errors and adding comments * Adding comments Co-authored-by: Justin Wood --- src/controller/CHIPDeviceController.h | 5 + .../AndroidOperationalCredentialsIssuer.cpp | 4 +- .../DeviceAttestationConstructor.h | 12 +- .../DeviceAttestationVendorReserved.h | 2 +- .../Framework/CHIP/MTRAttestationInfo.h | 55 ++++++ .../Framework/CHIP/MTRAttestationInfo.m | 48 +++++ src/darwin/Framework/CHIP/MTRCSRInfo.h | 43 +++++ src/darwin/Framework/CHIP/MTRCSRInfo.m | 39 +++++ .../Framework/CHIP/MTRDeviceController.h | 11 ++ .../Framework/CHIP/MTRDeviceController.mm | 14 ++ src/darwin/Framework/CHIP/MTRNOCChainIssuer.h | 52 ++++++ .../CHIP/MTROperationalCredentialsDelegate.h | 49 ++++++ .../CHIP/MTROperationalCredentialsDelegate.mm | 165 ++++++++++++++++++ src/darwin/Framework/CHIP/Matter.h | 3 + .../Matter.xcodeproj/project.pbxproj | 20 +++ 15 files changed, 513 insertions(+), 9 deletions(-) create mode 100644 src/darwin/Framework/CHIP/MTRAttestationInfo.h create mode 100644 src/darwin/Framework/CHIP/MTRAttestationInfo.m create mode 100644 src/darwin/Framework/CHIP/MTRCSRInfo.h create mode 100644 src/darwin/Framework/CHIP/MTRCSRInfo.m create mode 100644 src/darwin/Framework/CHIP/MTRNOCChainIssuer.h diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index f5a4ddf281618a..62f97c0c30e80d 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -656,6 +656,11 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, mDeviceAttestationVerifier = deviceAttestationVerifier; } + Optional GetCommissioningParameters() + { + return mDefaultCommissioner == nullptr ? NullOptional : MakeOptional(mDefaultCommissioner->GetCommissioningParameters()); + } + private: DevicePairingDelegate * mPairingDelegate; diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index 59872b01486b52..e9808409da5d3c 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -378,7 +378,7 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::LocalGenerateNOCChain(const Byte return CHIP_NO_ERROR; } -CHIP_ERROR N2J_CSRInfo(JNIEnv * env, jbyteArray nonce, jbyteArray elements, jbyteArray elementsSignature, jbyteArray csr, +CHIP_ERROR N2J_CSRInfo(JNIEnv * env, jbyteArray nonce, jbyteArray elements, jbyteArray csrElementsSignature, jbyteArray csr, jobject & outCSRInfo) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -393,7 +393,7 @@ CHIP_ERROR N2J_CSRInfo(JNIEnv * env, jbyteArray nonce, jbyteArray elements, jbyt constructor = env->GetMethodID(infoClass, "", "([B[B[B[B)V"); VerifyOrExit(constructor != nullptr, err = CHIP_JNI_ERROR_METHOD_NOT_FOUND); - outCSRInfo = (jobject) env->NewObject(infoClass, constructor, nonce, elements, elementsSignature, csr); + outCSRInfo = (jobject) env->NewObject(infoClass, constructor, nonce, elements, csrElementsSignature, csr); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); exit: diff --git a/src/credentials/DeviceAttestationConstructor.h b/src/credentials/DeviceAttestationConstructor.h index 242171a5c9e9db..87f1095792c0f9 100644 --- a/src/credentials/DeviceAttestationConstructor.h +++ b/src/credentials/DeviceAttestationConstructor.h @@ -31,12 +31,12 @@ constexpr size_t kExpectedAttestationNonceSize = 32; * All output data stays valid while attestationElements buffer is valid. * * @param[in] attestationElements ByteSpan containing source of Attestation Elements data. - * @param[out] certificationDeclaration - * @param[out] attestationNonce - * @param[out] timestamp + * @param[out] certificationDeclaration Valid Certification Declaration data. + * @param[out] attestationNonce Attestation Nonce - 32 octets required. + * @param[out] timestamp Timestamp data in epoch time format. * @param[out] firmwareInfo ByteSpan containing Firmware Information data if present within attestationElements. * Empty ByteSpan if not present in attestationElements. - * @param[out] VendorReserved Placeholder to for client to examine VendorReserved elements later + * @param[out] vendorReserved Placeholder to for client to examine vendorReserved elements later */ CHIP_ERROR DeconstructAttestationElements(const ByteSpan & attestationElements, ByteSpan & certificationDeclaration, ByteSpan & attestationNonce, uint32_t & timestamp, ByteSpan & firmwareInfo, @@ -49,7 +49,7 @@ CHIP_ERROR DeconstructAttestationElements(const ByteSpan & attestationElements, * @param[in] attestationNonce Attestation Nonce - 32 octets required. * @param[in] timestamp Timestamp data in epoch time format. * @param[in] firmwareInfo Optional Firmware Information data - Can be empty. - * @param[in] VendorReserved Prefilled-in vendor reserved elements to be put into DA elements. + * @param[in] vendorReserved Prefilled-in vendor reserved elements to be put into DA elements. * @param[out] attestationElements Buffer used to write all AttestationElements data, formed with all the data fields above. * Provided buffer needs to be capable to handle all data fields + tags. */ @@ -62,7 +62,7 @@ CHIP_ERROR ConstructAttestationElements(const ByteSpan & certificationDeclaratio * @brief Count the number of VendorReservedElements in a DeviceAttestation blob * * @param[in] attestationElements ByeSpan conitaining source of Attestation Elements data - * @param[out] + * @param[out] numElements Count of vendor reserved elements in the DeviceAttestation * @returns CHIP_NO_ERROR on success */ CHIP_ERROR CountVendorReservedElementsInDA(const ByteSpan & attestationElements, size_t & numElements); diff --git a/src/credentials/DeviceAttestationVendorReserved.h b/src/credentials/DeviceAttestationVendorReserved.h index d05bd4d9d25a59..7c77000e5884ce 100644 --- a/src/credentials/DeviceAttestationVendorReserved.h +++ b/src/credentials/DeviceAttestationVendorReserved.h @@ -211,7 +211,7 @@ class DeviceAttestationVendorReservedConstructor // first lowest tagNum for this vendorId/profileNum uint64_t minTagNum = UINT64_MAX; - size_t lowestIndex; + size_t lowestIndex = SIZE_MAX; for (i = starting; i < mNumEntriesUsed; i++) { if (mElements[i].vendorId == minVendor && mElements[i].profileNum == minProfile) diff --git a/src/darwin/Framework/CHIP/MTRAttestationInfo.h b/src/darwin/Framework/CHIP/MTRAttestationInfo.h new file mode 100644 index 00000000000000..a31c181b0daebd --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRAttestationInfo.h @@ -0,0 +1,55 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Represents information relating to product attestation. + * + */ +@interface AttestationInfo : NSObject + +@property (nonatomic, copy) NSData * challenge; + +@property (nonatomic, copy) NSData * nonce; + +@property (nonatomic, copy) NSData * elements; + +@property (nonatomic, copy) NSData * elementsSignature; + +@property (nonatomic, copy) NSData * dac; + +@property (nonatomic, copy) NSData * pai; + +@property (nonatomic, copy) NSData * certificationDeclaration; + +@property (nonatomic, copy) NSData * firmwareInfo; + +- (instancetype)initWithChallenge:(NSData *)challenge + nonce:(NSData *)nonce + elements:(NSData *)elements + elementsSignature:(NSData *)elementsSignature + dac:(NSData *)dac + pai:(NSData *)pai + certificationDeclaration:(NSData *)certificationDeclaration + firmwareInfo:(NSData *)firmwareInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRAttestationInfo.m b/src/darwin/Framework/CHIP/MTRAttestationInfo.m new file mode 100644 index 00000000000000..93b9483cce6fe0 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRAttestationInfo.m @@ -0,0 +1,48 @@ +/** + * + * Copyright (c) 2022 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 "MTRAttestationInfo.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation AttestationInfo : NSObject + +- (instancetype)initWithChallenge:(NSData *)challenge + nonce:(NSData *)nonce + elements:(NSData *)elements + elementsSignature:(NSData *)elementsSignature + dac:(NSData *)dac + pai:(NSData *)pai + certificationDeclaration:(NSData *)certificationDeclaration + firmwareInfo:(NSData *)firmwareInfo +{ + if (self = [super init]) { + _challenge = challenge; + _nonce = nonce; + _elements = elements; + _elementsSignature = elementsSignature; + _dac = dac; + _pai = pai; + _certificationDeclaration = certificationDeclaration; + _firmwareInfo = firmwareInfo; + } + return self; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCSRInfo.h b/src/darwin/Framework/CHIP/MTRCSRInfo.h new file mode 100644 index 00000000000000..8971bfd6fbd294 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRCSRInfo.h @@ -0,0 +1,43 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Represents information relating to NOC CSR. + * + */ +@interface CSRInfo : NSObject + +@property (nonatomic, copy) NSData * nonce; + +@property (nonatomic, copy) NSData * elements; + +@property (nonatomic, copy) NSData * elementsSignature; + +@property (nonatomic, copy) NSData * csr; + +- (instancetype)initWithNonce:(NSData *)nonce + elements:(NSData *)elements + elementsSignature:(NSData *)elementsSignature + csr:(NSData *)csr; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCSRInfo.m b/src/darwin/Framework/CHIP/MTRCSRInfo.m new file mode 100644 index 00000000000000..676aa1ed36e5b4 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRCSRInfo.m @@ -0,0 +1,39 @@ +/** + * + * Copyright (c) 2022 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 "MTRCSRInfo.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation CSRInfo : NSObject + +- (instancetype)initWithNonce:(NSData *)nonce + elements:(NSData *)elements + elementsSignature:(NSData *)elementsSignature + csr:(NSData *)csr +{ + if (self = [super init]) { + _nonce = nonce; + _elements = elements; + _elementsSignature = elementsSignature; + _csr = csr; + } + return self; +} +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 61db4061896d10..faca45ddde863b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -17,6 +17,7 @@ #import +#import #import @class MTRBaseDevice; @@ -119,6 +120,16 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS */ - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; +/** + * Sets this MTRDeviceController to use the given issuer for issuing operational certs. By default, the MTRDeviceController uses an + * internal issuer. + * + * @param[in] nocChainIssuer the NOC Chain issuer to use for issuer operational certs + * + * @param[in] queue The queue on which the callbacks will be delivered + */ +- (void)setNocChainIssuer:(id)nocChainIssuer queue:(dispatch_queue_t)queue; + /** * Shutdown the controller. Calls to shutdown after the first one are NO-OPs. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 425be4e5a1ac26..b170771f77ad0b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -106,6 +106,7 @@ - (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_ if ([self checkForInitError:(_operationalCredentialsDelegate != nullptr) logMsg:kErrorOperationalCredentialsInit]) { return nil; } + _operationalCredentialsDelegate->setChipWorkQueue(_chipWorkQueue); } return self; } @@ -229,6 +230,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams commissionerParams.pairingDelegate = _pairingDelegateBridge; + _operationalCredentialsDelegate->SetDeviceCommissioner(_cppCommissioner); + commissionerParams.operationalCredentialsDelegate = _operationalCredentialsDelegate; commissionerParams.controllerRCAC = _operationalCredentialsDelegate->RootCertSpan(); @@ -654,6 +657,17 @@ - (void)setPairingDelegate:(id)delegate queue:(dispatc }); } +- (void)setNocChainIssuer:(id)nocChainIssuer queue:(dispatch_queue_t)queue +{ + VerifyOrReturn([self checkIsRunning]); + + dispatch_sync(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning]); + + self->_operationalCredentialsDelegate->SetNocChainIssuer(nocChainIssuer, queue); + }); +} + - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { diff --git a/src/darwin/Framework/CHIP/MTRNOCChainIssuer.h b/src/darwin/Framework/CHIP/MTRNOCChainIssuer.h new file mode 100644 index 00000000000000..2ef76670532118 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRNOCChainIssuer.h @@ -0,0 +1,52 @@ +/** + * + * Copyright (c) 2022 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 + +@protocol MTRNOCChainIssuer +@required + +/** + * @brief When a MTRNOCChainIssuer is set for the MTRDeviceController, then onNOCChainGenerationNeeded will be + * called when the NOC CSR needs to be signed. This allows for custom credentials issuer + * implementations, for example, when a proprietary cloud API will perform the CSR signing. + + * The commissioning workflow will stop upon the onNOCChainGenerationNeeded callback and + * resume once onNOCChainGenerationComplete is called + + * The following fields MUST be passed to onNOCChainGenerationComplete with non-nil values: + * rootCertificate, intermediateCertificate, operationalCertificate. + * If ipk and adminSubject are passed, then they will be used in + * the AddNOC command sent to the commissionee. If they are not passed, then the values + * provided in the MTRDeviceController initialization will be used. + * + * All csr and attestation fields are provided to allow for custom attestestation checks. + */ +- (void)onNOCChainGenerationNeeded:(CSRInfo *)csrInfo + attestationInfo:(AttestationInfo *)attestationInfo + onNOCChainGenerationComplete:(void (^)(NSData * operationalCertificate, NSData * intermediateCertificate, + NSData * rootCertificate, NSData * ipk, NSNumber * adminSubject, + NSError * __autoreleasing * error))onNOCChainGenerationComplete; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h index d7580bce7e9e87..803e19eee30eed 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h @@ -22,9 +22,11 @@ #import "MTRError_Internal.h" #import "MTRKeypair.h" +#import "MTRNOCChainIssuer.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" +#include #include #include #include @@ -55,6 +57,24 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr void SetDeviceID(chip::NodeId deviceId) { mDeviceBeingPaired = deviceId; } void ResetDeviceID() { mDeviceBeingPaired = chip::kUndefinedNodeId; } + void SetDeviceCommissioner(chip::Controller::DeviceCommissioner * cppCommissioner) { mCppCommissioner = cppCommissioner; } + + chip::Optional GetCommissioningParameters() + { + return mCppCommissioner == nullptr ? chip::NullOptional : mCppCommissioner->GetCommissioningParameters(); + } + + void setChipWorkQueue(dispatch_queue_t chipWorkQueue) { mChipWorkQueue = chipWorkQueue; } + + void SetNocChainIssuer(id nocChainIssuer, dispatch_queue_t nocChainIssuerQueue) + { + mNocChainIssuer = nocChainIssuer; + mNocChainIssuerQueue = nocChainIssuerQueue; + } + + CHIP_ERROR NOCChainGenerated(CHIP_ERROR status, const chip::ByteSpan & noc, const chip::ByteSpan & icac, + const chip::ByteSpan & rcac, chip::Optional ipk, chip::Optional adminSubject); + CHIP_ERROR GenerateNOC(chip::NodeId nodeId, chip::FabricId fabricId, const chip::CATValues & cats, const chip::Crypto::P256PublicKey & pubkey, chip::MutableByteSpan & noc); @@ -97,6 +117,29 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr chip::FabricId fabricId, const chip::CATValues & cats, const chip::Crypto::P256PublicKey & pubkey, chip::MutableByteSpan & noc); + /** + * When a NOCChainIssuer is set, then onNOCChainGenerationNeeded will be called when the NOC CSR needs to be + * signed. This allows for custom credentials issuer implementations, for example, when a proprietary cloud API will perform the + * CSR signing. The commissioning workflow will stop upon the onNOCChainGenerationNeeded callback and resume once + * onNOCChainGenerationComplete is called. + * + * Caller must pass a non-nil value for the rootCertificate, intermediateCertificate, operationalCertificate + * If ipk and adminSubject are non nil, then they will be used in the AddNOC command sent to the commissionee. If they are not + * populated, then the values provided in the MTRDeviceController initialization will be used. + */ + void onNOCChainGenerationComplete(NSData * operationalCertificate, NSData * intermediateCertificate, NSData * rootCertificate, + NSData * _Nullable ipk, NSNumber * _Nullable adminSubject, NSError * __autoreleasing * error); + + void setNSError(CHIP_ERROR err, NSError * __autoreleasing * outError); + + CHIP_ERROR CallbackGenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, + const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, + const chip::ByteSpan & PAI, chip::Callback::Callback * onCompletion); + + CHIP_ERROR LocalGenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, + const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, + const chip::ByteSpan & PAI, chip::Callback::Callback * onCompletion); + ChipP256KeypairPtr mIssuerKey; chip::Crypto::AesCcm128Key mIPK; @@ -115,6 +158,12 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr // have a root cert, and at that point it gets initialized to nil. NSData * _Nullable mRootCert; NSData * _Nullable mIntermediateCert; + + chip::Controller::DeviceCommissioner * mCppCommissioner = nullptr; + id _Nullable mNocChainIssuer; + dispatch_queue_t _Nullable mNocChainIssuerQueue; + dispatch_queue_t _Nullable mChipWorkQueue; + chip::Callback::Callback * mOnNOCCompletionCallback = nullptr; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 3688c9a08f7433..1113ad18505086 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -27,7 +27,10 @@ #import "MTRLogging.h" #import "NSDataSpanConversion.h" +#include #include +#include +#include #include #include #include @@ -112,9 +115,171 @@ return NewNodeOperationalX509Cert(noc_request, pubkey, signingKeypair, noc); } +CHIP_ERROR MTROperationalCredentialsDelegate::NOCChainGenerated(CHIP_ERROR status, const ByteSpan & noc, const ByteSpan & icac, + const ByteSpan & rcac, Optional ipk, Optional adminSubject) +{ + ReturnErrorCodeIf(mOnNOCCompletionCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); + + Callback::Callback * onCompletion = mOnNOCCompletionCallback; + mOnNOCCompletionCallback = nullptr; + + // Call-back into commissioner with the generated data. + dispatch_sync(mChipWorkQueue, ^{ + onCompletion->mCall(onCompletion->mContext, status, noc, icac, rcac, ipk, adminSubject); + }); + + return CHIP_NO_ERROR; +} + CHIP_ERROR MTROperationalCredentialsDelegate::GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, const chip::ByteSpan & PAI, chip::Callback::Callback * onCompletion) +{ + if (mNocChainIssuer != nil) { + return CallbackGenerateNOCChain(csrElements, csrNonce, attestationSignature, attestationChallenge, DAC, PAI, onCompletion); + } else { + return LocalGenerateNOCChain(csrElements, csrNonce, attestationSignature, attestationChallenge, DAC, PAI, onCompletion); + } +} + +CHIP_ERROR MTROperationalCredentialsDelegate::CallbackGenerateNOCChain(const chip::ByteSpan & csrElements, + const chip::ByteSpan & csrNonce, const chip::ByteSpan & csrElementsSignature, const chip::ByteSpan & attestationChallenge, + const chip::ByteSpan & DAC, const chip::ByteSpan & PAI, + chip::Callback::Callback * onCompletion) +{ + mOnNOCCompletionCallback = onCompletion; + + TLVReader reader; + reader.Init(csrElements); + + if (reader.GetType() == kTLVType_NotSpecified) { + ReturnErrorOnFailure(reader.Next()); + } + + VerifyOrReturnError(reader.GetType() == kTLVType_Structure, CHIP_ERROR_WRONG_TLV_TYPE); + VerifyOrReturnError(reader.GetTag() == AnonymousTag(), CHIP_ERROR_UNEXPECTED_TLV_ELEMENT); + + TLVType containerType; + ReturnErrorOnFailure(reader.EnterContainer(containerType)); + ReturnErrorOnFailure(reader.Next(kTLVType_ByteString, TLV::ContextTag(1))); + + chip::ByteSpan csr; + reader.Get(csr); + reader.ExitContainer(containerType); + + CSRInfo * csrInfo = [[CSRInfo alloc] initWithNonce:AsData(csrNonce) + elements:AsData(csrElements) + elementsSignature:AsData(csrElementsSignature) + csr:AsData(csr)]; + + chip::ByteSpan certificationDeclarationSpan; + chip::ByteSpan attestationNonceSpan; + uint32_t timestampDeconstructed; + chip::ByteSpan firmwareInfoSpan; + chip::Credentials::DeviceAttestationVendorReservedDeconstructor vendorReserved; + + __block chip::Optional commissioningParameters; + // Dereferencing mCppCommissioner as it would be set to point to a valid Cpp commissioner by now, as we are in the middle of + // commissioning + dispatch_sync(mChipWorkQueue, ^{ + commissioningParameters = mCppCommissioner->GetCommissioningParameters(); + }); + VerifyOrReturnError(commissioningParameters.HasValue(), CHIP_ERROR_INCORRECT_STATE); + + // Attestation Elements, nonce and signature will have a value in Commissioning Params as the CSR needs a signature or else we + // cannot trust it + ReturnErrorOnFailure( + chip::Credentials::DeconstructAttestationElements(commissioningParameters.Value().GetAttestationElements().Value(), + certificationDeclarationSpan, attestationNonceSpan, timestampDeconstructed, firmwareInfoSpan, vendorReserved)); + + AttestationInfo * attestationInfo = + [[AttestationInfo alloc] initWithChallenge:AsData(attestationChallenge) + nonce:AsData(commissioningParameters.Value().GetAttestationNonce().Value()) + elements:AsData(commissioningParameters.Value().GetAttestationElements().Value()) + elementsSignature:AsData(commissioningParameters.Value().GetAttestationSignature().Value()) + dac:AsData(DAC) + pai:AsData(PAI) + certificationDeclaration:AsData(certificationDeclarationSpan) + firmwareInfo:AsData(firmwareInfoSpan)]; + + dispatch_sync(mNocChainIssuerQueue, ^{ + [mNocChainIssuer onNOCChainGenerationNeeded:csrInfo + attestationInfo:attestationInfo + onNOCChainGenerationComplete:^void(NSData * operationalCertificate, NSData * intermediateCertificate, + NSData * rootCertificate, NSData * ipk, NSNumber * adminSubject, NSError * __autoreleasing * error) { + onNOCChainGenerationComplete( + operationalCertificate, intermediateCertificate, rootCertificate, ipk, adminSubject, error); + }]; + }); + + return CHIP_NO_ERROR; +} + +void MTROperationalCredentialsDelegate::setNSError(CHIP_ERROR err, NSError * __autoreleasing * outError) +{ + if (outError) { + *outError = [MTRError errorForCHIPErrorCode:err]; + } +} + +void MTROperationalCredentialsDelegate::onNOCChainGenerationComplete(NSData * operationalCertificate, + NSData * intermediateCertificate, NSData * rootCertificate, NSData * _Nullable ipk, NSNumber * _Nullable adminSubject, + NSError * __autoreleasing * error) +{ + if (operationalCertificate == nil || intermediateCertificate == nil || rootCertificate == nil) { + setNSError(CHIP_ERROR_INVALID_ARGUMENT, error); + return; + } + + // use ipk and adminSubject from CommissioningParameters if not passed in. + // Dereferencing mCppCommissioner as it would be set to point to a valid Cpp commissioner by now, as we are in the middle of + // commissioning + __block chip::Optional commissioningParameters; + dispatch_sync(mChipWorkQueue, ^{ + commissioningParameters = mCppCommissioner->GetCommissioningParameters(); + }); + if (!commissioningParameters.HasValue()) { + setNSError(CHIP_ERROR_INCORRECT_STATE, error); + return; + } + + chip::Optional ipkOptional; + uint8_t ipkValue[chip::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES]; + chip::Crypto::AesCcm128KeySpan ipkTempSpan(ipkValue); + if (ipk != nil) { + if ([ipk length] != sizeof(ipkValue)) { + setNSError(CHIP_ERROR_INCORRECT_STATE, error); + return; + } + memcpy(&ipkValue[0], [ipk bytes], [ipk length]); + ipkOptional.SetValue(ipkTempSpan); + } else if (commissioningParameters.Value().GetIpk().HasValue()) { + ipkOptional.SetValue(commissioningParameters.Value().GetIpk().Value()); + } + + chip::Optional adminSubjectOptional; + if (adminSubject != nil) { + adminSubjectOptional.SetValue(adminSubject.unsignedLongLongValue); + } else { + adminSubjectOptional = commissioningParameters.Value().GetAdminSubject(); + } + + // This could potentially be done as an async operation as a future optimization. But it ultimately calls + // DeviceCommissioner::OnDeviceNOCChainGeneration which sends the AddNoc message to the target. The call returns without + // blocking as it is. + CHIP_ERROR err = NOCChainGenerated(CHIP_NO_ERROR, AsByteSpan(operationalCertificate), AsByteSpan(intermediateCertificate), + AsByteSpan(rootCertificate), ipkOptional, adminSubjectOptional); + + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to SetNocChain for the device: %" CHIP_ERROR_FORMAT, err.Format()); + setNSError(CHIP_ERROR_INCORRECT_STATE, error); + } +} + +CHIP_ERROR MTROperationalCredentialsDelegate::LocalGenerateNOCChain(const chip::ByteSpan & csrElements, + const chip::ByteSpan & csrNonce, const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, + const chip::ByteSpan & DAC, const chip::ByteSpan & PAI, + chip::Callback::Callback * onCompletion) { chip::NodeId assignedId; if (mNodeIdRequested) { diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 9c5af0634a904f..d702cb7c4f21fc 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -18,9 +18,11 @@ #import #import +#import #import #import #import +#import #import #import #import @@ -37,6 +39,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 47da9c8ee28e48..7102d13c7be998 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -33,6 +33,11 @@ 2CB7163C252E8A7C0026E2BB /* MTRDevicePairingDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */; }; 2CB7163F252F731E0026E2BB /* MTRDevicePairingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD775542695557E00FF4B12 /* error-mapping.cpp */; }; + 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */; }; + 3CF134AB289D8DF70017A19E /* MTRAttestationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134AA289D8DF70017A19E /* MTRAttestationInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CF134AD289D8E570017A19E /* MTRAttestationInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CF134AC289D8E570017A19E /* MTRAttestationInfo.m */; }; + 3CF134AF289D90FF0017A19E /* MTRNOCChainIssuer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134AE289D90FF0017A19E /* MTRNOCChainIssuer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5112F606287CD2C100B827E7 /* privilege-storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5112F605287CD2C100B827E7 /* privilege-storage.cpp */; }; 5129BCFD26A9EE3300122DDF /* MTRError.h in Headers */ = {isa = PBXBuildFile; fileRef = 5129BCFC26A9EE3300122DDF /* MTRError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5136661328067D550025EDAE /* MTRDeviceController_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */; }; @@ -164,6 +169,11 @@ 2CB71639252E8A7B0026E2BB /* MTRDevicePairingDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDevicePairingDelegateBridge.mm; sourceTree = ""; }; 2CB7163E252F731E0026E2BB /* MTRDevicePairingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDevicePairingDelegate.h; sourceTree = ""; }; 2FD775542695557E00FF4B12 /* error-mapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "error-mapping.cpp"; path = "../../../app/util/error-mapping.cpp"; sourceTree = ""; }; + 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCSRInfo.h; sourceTree = ""; }; + 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRCSRInfo.m; sourceTree = ""; }; + 3CF134AA289D8DF70017A19E /* MTRAttestationInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAttestationInfo.h; sourceTree = ""; }; + 3CF134AC289D8E570017A19E /* MTRAttestationInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRAttestationInfo.m; sourceTree = ""; }; + 3CF134AE289D90FF0017A19E /* MTRNOCChainIssuer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRNOCChainIssuer.h; sourceTree = ""; }; 5112F605287CD2C100B827E7 /* privilege-storage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "privilege-storage.cpp"; path = "../../../app/util/privilege-storage.cpp"; sourceTree = ""; }; 5129BCFC26A9EE3300122DDF /* MTRError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRError.h; sourceTree = ""; }; 5136660F28067D540025EDAE /* MTRDeviceController_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceController_Internal.h; sourceTree = ""; }; @@ -427,6 +437,11 @@ 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.m */, 5A6FEC9427B5976200F25F42 /* MTRDeviceControllerXPCConnection.h */, 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.m */, + 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */, + 3CF134A8289D8D800017A19E /* MTRCSRInfo.m */, + 3CF134AA289D8DF70017A19E /* MTRAttestationInfo.h */, + 3CF134AC289D8E570017A19E /* MTRAttestationInfo.m */, + 3CF134AE289D90FF0017A19E /* MTRNOCChainIssuer.h */, ); path = CHIP; sourceTree = ""; @@ -495,7 +510,10 @@ 991DC0842475F45400C13860 /* MTRDeviceController.h in Headers */, AF1CB86E2874B03B00865A96 /* MTROTAProviderDelegate.h in Headers */, 754F3DF427FBB94B00E60580 /* MTREventTLVValueDecoder_Internal.h in Headers */, + 3CF134AF289D90FF0017A19E /* MTRNOCChainIssuer.h in Headers */, + 3CF134AB289D8DF70017A19E /* MTRAttestationInfo.h in Headers */, B2E0D7B2245B0B5C003C5B48 /* MTRManualSetupPayloadParser.h in Headers */, + 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */, B2E0D7B1245B0B5C003C5B48 /* Matter.h in Headers */, 7596A84428762729004DAE0E /* MTRDevice.h in Headers */, B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */, @@ -666,6 +684,7 @@ 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */, 2C222AD1255C620600E446B9 /* MTRBaseDevice.mm in Sources */, 1EC3238D271999E2002A8BF0 /* cluster-objects.cpp in Sources */, + 3CF134A9289D8D800017A19E /* MTRCSRInfo.m in Sources */, 991DC0892475F47D00C13860 /* MTRDeviceController.mm in Sources */, B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */, 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */, @@ -685,6 +704,7 @@ 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.m in Sources */, B289D4222639C0D300D4E314 /* MTROnboardingPayloadParser.m in Sources */, 5112F606287CD2C100B827E7 /* privilege-storage.cpp in Sources */, + 3CF134AD289D8E570017A19E /* MTRAttestationInfo.m in Sources */, 2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */, 7560FD1C27FBBD3F005E85B3 /* MTREventTLVValueDecoder.mm in Sources */, 7596A84928762783004DAE0E /* MTRAsyncCallbackWorkQueue.mm in Sources */, From c766942bc21addb36ca310941ebcfe3237c45748 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Sat, 20 Aug 2022 19:55:41 +0530 Subject: [PATCH 091/115] Added updated Manual scripts (#22055) * Added updated Manual scripts * Added Auto generated files * Restyled by whitespace * Restyled by clang-format Co-authored-by: Restyled.io --- .../certification/Test_TC_ACL_2_10.yaml | 14 + .../suites/certification/Test_TC_ACL_2_3.yaml | 24 +- .../suites/certification/Test_TC_ACL_2_4.yaml | 88 +- .../suites/certification/Test_TC_ACL_2_5.yaml | 17 + .../suites/certification/Test_TC_ACL_2_6.yaml | 5 + .../suites/certification/Test_TC_ACL_2_7.yaml | 15 + .../suites/certification/Test_TC_ACL_2_8.yaml | 7 + .../suites/certification/Test_TC_ACL_2_9.yaml | 5 + .../suites/certification/Test_TC_ACT_2_1.yaml | 6 +- .../suites/certification/Test_TC_ACT_2_2.yaml | 31 +- .../suites/certification/Test_TC_ACT_3_1.yaml | 15 +- .../suites/certification/Test_TC_ACT_3_2.yaml | 29 +- .../Test_TC_APPLAUNCHER_3_8_1.yaml | 7 +- .../Test_TC_APPLAUNCHER_3_9_1.yaml | 7 +- .../suites/certification/Test_TC_BDX_1_2.yaml | 5 + .../suites/certification/Test_TC_BDX_1_4.yaml | 5 + .../suites/certification/Test_TC_BDX_2_1.yaml | 6 + .../suites/certification/Test_TC_BDX_2_2.yaml | 6 + .../certification/Test_TC_BIND_2_1.yaml | 26 +- .../certification/Test_TC_BIND_2_2.yaml | 10 +- .../certification/Test_TC_BIND_2_3.yaml | 24 +- .../certification/Test_TC_BOOL_2_2.yaml | 16 +- .../certification/Test_TC_BRBINFO_2_1.yaml | 20 +- .../certification/Test_TC_BRBINFO_2_2.yaml | 13 + .../certification/Test_TC_BRBINFO_2_3.yaml | 38 +- .../suites/certification/Test_TC_BR_4.yaml | 2224 ++++++++++++++--- .../certification/Test_TC_CADMIN_1_1.yaml | 473 ++-- .../certification/Test_TC_CADMIN_1_14.yaml | 224 +- .../certification/Test_TC_CADMIN_1_17.yaml | 76 +- .../certification/Test_TC_CADMIN_1_18.yaml | 76 +- .../certification/Test_TC_CADMIN_1_19.yaml | 43 +- .../certification/Test_TC_CADMIN_1_2.yaml | 412 +-- .../certification/Test_TC_CADMIN_1_20.yaml | 44 +- .../certification/Test_TC_CADMIN_1_7.yaml | 275 +- .../certification/Test_TC_CADMIN_1_8.yaml | 303 +-- .../suites/certification/Test_TC_CC_1_1.yaml | 3 + .../suites/certification/Test_TC_CC_3_2.yaml | 3 + .../suites/certification/Test_TC_CC_3_3.yaml | 3 + .../suites/certification/Test_TC_CC_4_1.yaml | 3 + .../suites/certification/Test_TC_CC_4_2.yaml | 3 + .../suites/certification/Test_TC_CC_4_3.yaml | 3 + .../suites/certification/Test_TC_CC_4_4.yaml | 3 + .../certification/Test_TC_CGEN_2_2.yaml | 125 +- .../certification/Test_TC_CNET_4_12.yaml | 17 + .../certification/Test_TC_CNET_4_13.yaml | 71 +- .../certification/Test_TC_CNET_4_14.yaml | 67 + .../certification/Test_TC_CNET_4_15.yaml | 31 +- .../certification/Test_TC_CNET_4_16.yaml | 29 + .../certification/Test_TC_CNET_4_17.yaml | 5 + .../certification/Test_TC_CNET_4_18.yaml | 5 + .../certification/Test_TC_CNET_4_19.yaml | 5 + .../certification/Test_TC_CNET_4_20.yaml | 7 +- .../certification/Test_TC_CNET_4_21.yaml | 5 + .../certification/Test_TC_CNET_4_22.yaml | 24 + .../certification/Test_TC_CNET_4_4.yaml | 54 + .../certification/Test_TC_CNET_4_5.yaml | 23 + .../certification/Test_TC_CNET_4_6.yaml | 23 +- .../certification/Test_TC_CNET_4_9.yaml | 90 + .../suites/certification/Test_TC_DA_1_4.yaml | 234 +- .../suites/certification/Test_TC_DA_1_7.yaml | 365 +-- .../suites/certification/Test_TC_DD_1_12.yaml | 26 +- .../suites/certification/Test_TC_DD_1_13.yaml | 23 +- .../suites/certification/Test_TC_DD_1_14.yaml | 27 +- .../suites/certification/Test_TC_DD_1_15.yaml | 9 + .../suites/certification/Test_TC_DD_1_5.yaml | 71 +- .../suites/certification/Test_TC_DD_1_6.yaml | 18 +- .../suites/certification/Test_TC_DD_1_7.yaml | 7 +- .../suites/certification/Test_TC_DD_1_8.yaml | 68 +- .../suites/certification/Test_TC_DD_2_1.yaml | 31 +- .../suites/certification/Test_TC_DD_2_2.yaml | 79 +- .../suites/certification/Test_TC_DD_3_1.yaml | 59 +- .../suites/certification/Test_TC_DD_3_10.yaml | 39 +- .../suites/certification/Test_TC_DD_3_11.yaml | 47 +- .../suites/certification/Test_TC_DD_3_12.yaml | 100 +- .../suites/certification/Test_TC_DD_3_13.yaml | 115 +- .../suites/certification/Test_TC_DD_3_14.yaml | 53 +- .../suites/certification/Test_TC_DD_3_15.yaml | 39 +- .../suites/certification/Test_TC_DD_3_16.yaml | 55 +- .../suites/certification/Test_TC_DD_3_17.yaml | 73 +- .../suites/certification/Test_TC_DD_3_18.yaml | 25 +- .../suites/certification/Test_TC_DD_3_19.yaml | 20 +- .../suites/certification/Test_TC_DD_3_2.yaml | 31 +- .../suites/certification/Test_TC_DD_3_20.yaml | 24 +- .../suites/certification/Test_TC_DD_3_21.yaml | 21 +- .../suites/certification/Test_TC_DD_3_3.yaml | 45 +- .../suites/certification/Test_TC_DD_3_4.yaml | 127 +- .../suites/certification/Test_TC_DD_3_5.yaml | 82 +- .../suites/certification/Test_TC_DD_3_6.yaml | 42 +- .../suites/certification/Test_TC_DD_3_7.yaml | 11 + .../suites/certification/Test_TC_DD_3_8.yaml | 16 + .../suites/certification/Test_TC_DD_3_9.yaml | 45 +- .../certification/Test_TC_DESC_2_1.yaml | 203 +- .../certification/Test_TC_DRLK_2_10.yaml | 27 +- .../certification/Test_TC_DRLK_2_2.yaml | 3 + .../certification/Test_TC_DRLK_2_3.yaml | 3 + .../certification/Test_TC_DRLK_3_1.yaml | 5 + .../certification/Test_TC_DRLK_3_2.yaml | 37 + .../certification/Test_TC_DRLK_3_3.yaml | 140 +- .../suites/certification/Test_TC_IDM_3_1.yaml | 3 - .../suites/certification/Test_TC_IDM_6_2.yaml | 5 - .../suites/certification/Test_TC_IDM_6_3.yaml | 5 + .../certification/Test_TC_LCFG_2_1.yaml | 2 +- .../certification/Test_TC_LTIME_1_1.yaml | 7 +- .../suites/certification/Test_TC_LVL_2_3.yaml | 15 +- .../suites/certification/Test_TC_MOD_1_3.yaml | 5 + .../suites/certification/Test_TC_MOD_2_2.yaml | 5 + .../suites/certification/Test_TC_MOD_3_3.yaml | 27 +- .../suites/certification/Test_TC_MOD_3_4.yaml | 11 +- .../suites/certification/Test_TC_OCC_2_2.yaml | 9 +- .../suites/certification/Test_TC_OCC_2_4.yaml | 5 + .../suites/certification/Test_TC_OO_3_1.yaml | 5 + .../suites/certification/Test_TC_OO_3_2.yaml | 5 + .../certification/Test_TC_OPCREDS_3_2.yaml | 17 +- .../certification/Test_TC_OPCREDS_3_3.yaml | 22 +- .../suites/certification/Test_TC_PRS_3_1.yaml | 5 + .../certification/Test_TC_PSCFG_2_2.yaml | 23 +- .../suites/certification/Test_TC_RH_3_1.yaml | 5 + .../suites/certification/Test_TC_SC_4_3.yaml | 2 + .../suites/certification/Test_TC_SC_4_6.yaml | 8 +- .../suites/certification/Test_TC_SC_4_8.yaml | 7 +- .../certification/Test_TC_SWTCH_2_2.yaml | 45 +- .../suites/certification/Test_TC_TMP_3_1.yaml | 5 + .../certification/Test_TC_TSTAT_3_1.yaml | 5 + .../certification/Test_TC_TSTAT_3_2.yaml | 5 + .../certification/Test_TC_TSUIC_3_1.yaml | 5 + .../certification/Test_TC_ULABEL_3_1.yaml | 5 + .../certification/Test_TC_WNCV_5_1.yaml | 7 +- .../certification/Test_TC_WNCV_6_1.yaml | 5 + .../certification/Test_TC_WNCV_7_1.yaml | 5 + 129 files changed, 5539 insertions(+), 2382 deletions(-) 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 839480f42307ce..6f1fdcd88a860a 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 @@ -24,6 +24,20 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + 1.N1 is the node ID of TH1 + + 2.N2 is the node ID of TH2 + + 2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV: + + - top-level anonymous list (empty) + 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml index 075cf0de51a9f1..a0ecce5d17f816 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml @@ -112,7 +112,7 @@ tests: struct: Data field: D_OK_EMPTY : 1718" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element @@ -209,7 +209,7 @@ tests: :17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element . @@ -338,7 +338,7 @@ tests: which is an octstr of length 128 containing valid TLV:" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element [1656417544.279572][3888:3893] CHIP:DMG: WriteResponseMessage = @@ -456,7 +456,7 @@ tests: :17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) @@ -485,7 +485,7 @@ tests: struct Data field: D_BAD_STRUCT : 1518" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1518"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1518"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, contains the list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) @@ -512,7 +512,7 @@ tests: :3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element which Returns CONSTRAINT_ERROR (0x87) @@ -539,7 +539,7 @@ tests: :17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) @@ -567,7 +567,7 @@ tests: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element Returns CONSTRAINT_ERROR (0x87) @@ -594,7 +594,7 @@ tests: :17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700"}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) @@ -619,7 +619,7 @@ tests: 1.struct Data field: D_BAD_NOnE" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":""}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":""}]' 1 0 On TH1(Chiptool) , Verify AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element, Returns CONSTRAINT_ERROR (0x87) @@ -649,7 +649,7 @@ tests: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1718"},{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 1 0 On TH1(Chiptool) , Verify Successfully AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 2 elements and CONSTRAINT_ERROR (0x87) for second element path @@ -745,7 +745,7 @@ tests: value is an empty list" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[]" 1 0 + ./chip-tool accesscontrol write extension '[]' 1 0 On TH1(Chiptool) , Verify Successfully,AccessControl cluster Extension attribute, value is an empty list diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 9e74143347d01c..03dba82825bc9b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -26,7 +26,11 @@ config: tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | - verification step to be updated. + DUT + sudo ./chip-all-clusters-app + + TH1 + ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 disabled: true - label: @@ -88,9 +92,9 @@ tests: 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, - { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 + { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 On TH1(Chiptool), Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = @@ -235,7 +239,7 @@ tests: 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]' 1 0 On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = @@ -377,7 +381,7 @@ tests: Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 On TH1(Chiptool), Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = @@ -535,7 +539,7 @@ tests: DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { @@ -686,9 +690,9 @@ tests: Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 + { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]' 1 0 On TH1(Chiptool) , Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { @@ -819,8 +823,8 @@ tests: AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]' 1 0 On TH1(Chiptool) , Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null @@ -866,7 +870,7 @@ tests: [1656507141.631353][3224:3229] CHIP:DMG: AttributePathIB = [1656507141.631426][3224:3229] CHIP:DMG: { [1656507141.631501][3224:3229] CHIP:DMG: Endpoint = 0x0, - [1656507141.631584][3224:3229] CHIP:DMG: Cluster = 0x1f, + [1656507141.631584][3224:3229] CHIP:DMG: Cluster = 0x1f, [1656507141.631664][3224:3229] CHIP:DMG: Attribute = 0x0000_0000, [1656507141.631742][3224:3229] CHIP:DMG: ListIndex = Null, [1656507141.631824][3224:3229] CHIP:DMG: } @@ -925,8 +929,8 @@ tests: (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]' 1 0 On TH1(Chiptool), Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = @@ -1050,7 +1054,7 @@ tests: node IDs (stored as SUBJECTS) Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]' 1 0 On TH1(Chiptool), Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1160,8 +1164,8 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]' 1 0 On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -1289,7 +1293,7 @@ tests: MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 On TH1(Chiptool) , Verify Successfully acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as null @@ -1436,9 +1440,9 @@ tests: field: null subsequent elements same as second element" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, - { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]" 1 0 + { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully that acl attribute value is list of AccessControlEntryStruct containing MAXENTRIES elements @@ -1559,8 +1563,8 @@ tests: AuthMode field: PASE (1) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements and Returns CONSTRAINT_ERROR (0x87) for second element path [1658475475.310438][3113:3119] CHIP:DMG: { @@ -1704,8 +1708,8 @@ tests: (5) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements as Subject null and Target null for second element path Returns CONSTRAINT_ERROR (0x87) [1658475916.602576][3151:3156] CHIP:DMG: WriteResponseMessage = @@ -1780,8 +1784,8 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]' 1 0 @@ -1861,10 +1865,10 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]' 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Authmode for second element path Returns CONSTRAINT_ERROR (0x87) [1658476412.664216][3192:3197] CHIP:DMG: WriteResponseMessage = [1658476412.664247][3192:3197] CHIP:DMG: { @@ -1937,8 +1941,8 @@ tests: AuthMode field: CASE (2) Subjects field: [0] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) [1658476622.665126][3229:3234] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2012,8 +2016,8 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using @@ -2088,7 +2092,7 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 8477037.056167][3264:3269] CHIP:DMG: { @@ -2158,8 +2162,8 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2232,7 +2236,7 @@ tests: AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2308,7 +2312,7 @@ tests: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2383,7 +2387,7 @@ tests: null Targets field: [{Endpoint: 65535}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1657617920.044059][8948:8953] CHIP:DMG: { @@ -2456,7 +2460,7 @@ tests: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2532,7 +2536,7 @@ tests: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477583.616961][3701:3706] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2608,7 +2612,7 @@ tests: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]' 1 0 On TH1(Chiptool) , Verify Successfully AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477662.415412][3710:3715] CHIP:EM: Removed CHIP MessageCounter:35384027 from RetransTable on exchange 6953i @@ -2682,7 +2686,7 @@ tests: is an empty list" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[]" 1 0 + ./chip-tool accesscontrol write acl '[]' 1 0 On TH1(Chiptool) , Verify Successfully to AccessControl cluster ACL attribute value is an empty list since all ACL entries removed. RetransTable on exchange 43997i diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml index a2815f360a1d95..5bef11cd027112 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_5.yaml @@ -24,6 +24,23 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + 1.N1 is the node ID of TH1 + + 2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV: + + - top-level anonymous list (empty) + + 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + + 4 .D_BAD_LENGTH: "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018" which is an octstr of length 129 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml index 7f8e420f6d489c..0723273609cab5 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_6.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + N1 is the node ID of TH1 + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT 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 4cd0beae949f05..1bf38fb69a4ff0 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 @@ -24,6 +24,21 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + 1.N1 is the node ID of TH1 + + 2.N2 is the node ID of TH2 + + 2.D_OK_EMPTY: "1718" which is an octstr of length 2 containing valid TLV: + + - top-level anonymous list (empty) + + 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: + + - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index 37805cdfb0bca0..d2aa037f31964e 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -24,6 +24,13 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + 1.N1 is the node ID of TH1 + + 2 .N2 is the node ID of TH2 + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml index e605cc3c6ba305..ee834c11f4752f 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + N1 is the node ID of TH1 + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT 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 index d1f38dd809f311..068cde853d3751 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml @@ -81,7 +81,7 @@ tests: - label: "Read EndpointLists attribute of Actions server" PICS: ACT.S.A0001 verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs in TH Log: @@ -153,7 +153,7 @@ tests: - label: "Read ActionList attribute of Actions server" PICS: ACT.S.A0000 verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: @@ -340,7 +340,7 @@ tests: - label: "Read SetupURL attribute" PICS: ACT.S.A0002 verification: | - ./chip-tool bridgedactions read setup-url 1 1 + ./chip-tool actions read setup-url 1 1 Verify in TH(chip-tool) log diff --git a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml index cfdb21d3bd883b..659c95c871835d 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml @@ -43,9 +43,8 @@ tests: disabled: true - label: "Read EndpointLists attribute" - PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs in TH Log: [1658426570.716289][16527:16532] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 @@ -79,7 +78,7 @@ tests: - label: "Read EndpointLists attribute again" PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs in below Log: [1658408033.786811][14495:14500] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3742844648 @@ -160,7 +159,7 @@ tests: - label: "Read EndpointLists attribute again" PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs [1658408033.786811][14495:14500] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3742844648 @@ -182,7 +181,7 @@ tests: [1658408033.788278][14495:14500] CHIP:TOO: } disabled: true - - label: "compare result of step 2g to what was read in step 2e" + - label: "compare result of step 2g to what was read in step 2d" PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | compare result of step 2g to what was read in step 2d, Verify one EP (EP 3 in this case) has been moved from one EndpointListStruct to another EndpointListStruct @@ -199,7 +198,7 @@ tests: - label: "Read EndpointLists attribute again" PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs [1658426959.409374][16560:16565] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 @@ -213,7 +212,7 @@ tests: [1658426959.409755][16560:16565] CHIP:TOO: } disabled: true - - label: "compare result of step 2j to what was read in step 2h" + - label: "compare result of step 2j to what was read in step 2g" PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | compare result of step 2j to what was read in step 2g, Verify one EndpointListStruct (the 2nd one in this example) got removed while the other one(s) did not change @@ -231,7 +230,7 @@ tests: - label: "Read EndpointLists attribute again" PICS: ACT.S.A0001 && ACT.S.M.OverlappingEndpointLists verification: | - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-lists 1 1 On TH(chip-tool), verify the EndpointListStructs 1658427088.316681][16578:16583] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 @@ -268,7 +267,7 @@ tests: - label: "Read ActionList attribute" PICS: ACT.S.A0000 && ACT.S.M.FillActionList verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: [1658479958.699434][26130:26135] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 @@ -302,7 +301,7 @@ tests: - label: "Read ActionList attribute again" PICS: ACT.S.A0000 && ACT.S.M.FillActionList verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: [1658480004.064867][26153:26158] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 @@ -384,7 +383,7 @@ tests: - label: "Read ActionList attribute again" PICS: ACT.S.A0000 && ACT.S.M.FillActionList verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: [1658480039.164683][26172:26177] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 @@ -415,7 +414,7 @@ tests: - label: "Read ActionList attribute again" PICS: ACT.S.A0000 && ACT.S.M.FillActionList verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: [1658480059.199268][26178:26183] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 @@ -454,7 +453,7 @@ tests: - label: "Read ActionList attribute" PICS: ACT.S.A0000 verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify ActionStructs in TH(chip-tool) Log: [1658480080.135069][26185:26190] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 @@ -481,7 +480,7 @@ tests: verification: | To subscribe StateChanged event follow below steps 1) ./chip-tool interactive start - 2) bridgedactions subscribe-event action-failed 2 30 1 0 + 2) actions subscribe-event action-failed 2 30 1 0 Verify in TH Log: [1659962630.453221][25381:25386] CHIP:EM: Removed CHIP MessageCounter:65903257 from RetransTable on exchange 50035i [1659962630.453246][25381:25386] CHIP:DMG: ReportDataMessage = @@ -506,7 +505,7 @@ tests: [1659962630.456551][25381:25386] CHIP:DMG: } [1659962630.456563][25381:25386] CHIP:DMG: Subscription established with SubscriptionID = 0x78f0a04c MinInterval = 0s MaxInterval = 100s Peer = 01:0000000000000001 - 3) bridgedactions instant-action 0x1001 1 1 + 3) actions instant-action 0x1001 1 1 Verify in TH Log @@ -524,7 +523,7 @@ tests: verification: | Only InstantActions command is supported - ./chip-tool bridgedactions instant-action 0x1001 1 1 + ./chip-tool actions instant-action 0x1001 1 1 Verify in TH Log diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml index 3c8b4a75a40ad1..89258aeb54ec2b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml @@ -28,11 +28,16 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" verification: | - ./chip-tool bridgedactions read action-list 1 1 + ./chip-tool actions read action-list 1 1 Verify read command is received on TH(all-clusters-app) @@ -59,7 +64,7 @@ tests: - ./chip-tool bridgedactions read endpoint-list 1 1 + ./chip-tool actions read endpoint-list 1 1 Verify read command is received on TH(all-clusters-app ) @@ -91,7 +96,7 @@ tests: verification: | Optional attibute - ./chip-tool bridgedactions read setup-url 1 1 + ./chip-tool actions read setup-url 1 1 Verify read command is received on TH(all-clusters-app) @@ -137,7 +142,7 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH again" verification: | - ./chip-tool bridgedactions read attribute-list 1 1 + ./chip-tool actions read attribute-list 1 1 Verify attribute-list attribute contains 7 entries on TH(all-clusters-minimal-app) [1658393025.602745][13481:13486] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_FFFB DataVersion: 2868144574 @@ -211,7 +216,7 @@ tests: verification: | Optional attibute - ./chip-tool bridgedactions read setup-url 1 1 + ./chip-tool actions read setup-url 1 1 General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_2.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_2.yaml index 14fe1033e00e10..49353e5ffc64c1 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_3_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Preparation: TH as server exposes an Actions server cluster on EP 1, with one action (supporting all possible commands) and corresponding @@ -41,7 +46,7 @@ tests: - label: "DUT issues an InstantAction command to TH" PICS: ACT.C.C00.Tx verification: | - ./chip-tool bridgedactions instant-action 0x1001 1 1 + ./chip-tool actions instant-action 0x1001 1 1 Verify command is successfully sent on TH(all-clusters-app) @@ -84,7 +89,7 @@ tests: - label: "DUT issues an StartAction command to TH" PICS: ACT.C.C02.Tx verification: | - ./chip-tool bridgedactions start-action 0x1001 1 1 + ./chip-tool actions start-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -92,7 +97,7 @@ tests: - label: "DUT issues an StopAction command to TH" PICS: ACT.C.C04.Tx verification: | - ./chip-tool bridgedactions stop-action 0x1001 1 1 + ./chip-tool actions stop-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -100,7 +105,7 @@ tests: - label: "DUT issues an PauseAction command to TH" PICS: ACT.C.C05.Tx verification: | - ./chip-tool bridgedactions pause-action 0x1001 1 1 + ./chip-tool actions pause-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -108,7 +113,7 @@ tests: - label: "DUT issues an ResumeAction command to TH" PICS: ACT.C.C07.Tx verification: | - ./chip-tool bridgedactions resume-action 0x1001 1 1 + ./chip-tool actions resume-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -116,7 +121,7 @@ tests: - label: "DUT issues an EnableAction command to TH" PICS: ACT.C.C08.Tx verification: | - ./chip-tool bridgedactions enable-action 0x1001 1 1 + ./chip-tool actions enable-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -124,7 +129,7 @@ tests: - label: "DUT issues an DisableAction command to TH" PICS: ACT.C.C0a.Tx verification: | - ./chip-tool bridgedactions disable-action 0x1001 1 1 + ./chip-tool actions disable-action 0 1 1 Note: Message log similar as in step 1 disabled: true @@ -132,7 +137,7 @@ tests: - label: "DUT issues an StartActionWithDuration command to TH" PICS: ACT.C.C03.Tx verification: | - ./chip-tool bridgedactions start-action-with-duration 0x1001 1 1 + ./chip-tool actions start-action-with-duration 0x1001 100 1 1 Note: Message log similar as in step 1 disabled: true @@ -140,7 +145,7 @@ tests: - label: "DUT issues an PauseActionWithDuration command to TH" PICS: ACT.C.C06.Tx verification: | - ./chip-tool bridgedactions pause-action-with-duration 0x1001 1 1 + ./chip-tool actions pause-action-with-duration 0x1001 200 1 1 Note: Message log similar as in step 1 disabled: true @@ -148,7 +153,7 @@ tests: - label: "DUT issues an EnableActionWithDuration command to TH" PICS: ACT.C.C09.Tx verification: | - ./chip-tool bridgedactions enable-action-with-duration 0x1001 1 1 + ./chip-tool actions enable-action-with-duration 0x1001 300 1 1 Note: Message log similar as in step 1 disabled: true @@ -156,7 +161,7 @@ tests: - label: "DUT issues an DisableActionWithDuration command to TH" PICS: ACT.C.C0b.Tx verification: | - ./chip-tool bridgedactions disable-action-with-duration 0x1001 1 1 + ./chip-tool actions disable-action-with-duration 0 100 1 1 Note: Message log similar as in step 1 disabled: true @@ -164,7 +169,7 @@ tests: - label: "DUT issues an InstantActionWithTransition command to TH" PICS: ACT.C.C01.Tx verification: | - ./chip-tool bridgedactions instant-action-with-transition 0x1001 1 1 + ./chip-tool actions instant-action-with-transition 0x1001 400 1 1 Note: Message log similar as in step 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8_1.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8_1.yaml index e47b10028fba67..2e8d999ea1b3f2 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8_1.yaml @@ -25,9 +25,12 @@ config: endpoint: 0 tests: - - label: "Preconditions:" + - label: + "Preconditions: Commission TH to DUT, if not done so already. In some + cases, such as with a Casting Video Player, the TH commissions the + DUT." verification: | - Commission TH to DUT, if not done so already. In some cases, such as with a Casting Video Player, the TH commissions the DUT. + disabled: true - label: "DUT sends StopApp command to TH" diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9_1.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9_1.yaml index 24136fc704c78f..ab3748ba234aca 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9_1.yaml @@ -25,9 +25,12 @@ config: endpoint: 0 tests: - - label: "Preconditions:" + - label: + "Preconditions: Commission TH to DUT, if not done so already. In some + cases, such as with a Casting Video Player, the TH commissions the + DUT." verification: | - Commission TH to DUT, if not done so already. In some cases, such as with a Casting Video Player, the TH commissions the DUT. + disabled: true - label: "DUT sends HideApp command to TH" diff --git a/src/app/tests/suites/certification/Test_TC_BDX_1_2.yaml b/src/app/tests/suites/certification/Test_TC_BDX_1_2.yaml index 7f0f8f54599661..3c755cd927f1b2 100644 --- a/src/app/tests/suites/certification/Test_TC_BDX_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BDX_1_2.yaml @@ -25,6 +25,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + This test can be verified using TC-SU-2.3 from the OTA Software Update section. Pls refer to OTA section for steps. + disabled: true + - label: "DUT sends a ReceiveInit message to TH" verification: | 1. Verify that the OTA Reference Provider App logs show ReceiveInit message from DUT diff --git a/src/app/tests/suites/certification/Test_TC_BDX_1_4.yaml b/src/app/tests/suites/certification/Test_TC_BDX_1_4.yaml index 164b89b58c0c6f..992be636e12a7c 100644 --- a/src/app/tests/suites/certification/Test_TC_BDX_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BDX_1_4.yaml @@ -25,6 +25,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + This test can be verified using TC-SU-3.3 from the OTA Software Update section. Pls refer to OTA section for steps. + disabled: true + - label: "TH sends a ReceiveInit message to DUT + DUT sends a ReceiveAccept message back to TH" diff --git a/src/app/tests/suites/certification/Test_TC_BDX_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BDX_2_1.yaml index eb8cd3dede6d48..449215850abb40 100644 --- a/src/app/tests/suites/certification/Test_TC_BDX_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BDX_2_1.yaml @@ -24,6 +24,12 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + This test can be verified using TC-SU-3.3 from the OTA Software Update section. Pls refer to OTA section for steps. + This test can also be verified with TH sending a ReceiveInit message to the DUT. + disabled: true + - label: "DUT sends a SendInit message to TH + TH sends a SendAccept message back to DUT + DUT sends a Block message to TH + TH sends a BlockAck diff --git a/src/app/tests/suites/certification/Test_TC_BDX_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BDX_2_2.yaml index d8ea0b6645e8d5..21a032bf91f87f 100644 --- a/src/app/tests/suites/certification/Test_TC_BDX_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BDX_2_2.yaml @@ -24,6 +24,12 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + This test can be verified using TC-SU-2.3 from the OTA Software Update section. Pls refer to OTA section for steps. + This test can also be verified with DUT sending a ReceiveInit message to the TH. + disabled: true + - label: "TH sends the first Block message to DUT + DUT sends a BlockAck message back to TH." diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml index 497fdbd19eff2f..0be1511b414bf6 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml @@ -35,15 +35,15 @@ tests: - label: "Note" verification: | - 1.Need 4 raspi for this test case and use 3 raspi as dut[all-cluster-app] and 1 raspi as chip-tool. + 1.This test case requires 4 raspi to execute. 1 raspi as Commissioner. and 1 raspi as dut[Controller] 2 raspi as controllee - 2.1st raspi which is used as DUT , which you are going to pair with onnetwork, you need to build shell command on that all clusters app.[build shell on DUT 1 Use - [scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/ out/all-clusters-app chip_inet_config_enable_ipv4=false chip_build_libshell=true ] + 2. In this example, RASP is used as DUT & it requires additional shell access to execute the controller commands. To support the shell, use the following command to build the all-clusters-app . On the DUT device Use - [scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/ out/all-clusters-app chip_inet_config_enable_ipv4=false chip_build_libshell=true ] - (Vendor DUT must have this provision to execute the controller commands. ) - 3.Pair TH2 , TH3 with ble-wifi with different discriminator as mentioned below, using the chip-tool running on 4th raspi. + 3.Pair TH2 , TH3 with ble-wifi with different discriminator as mentioned below test steps , using the chip-tool running as commissioner in one RPI. - 4.using chip-tool (on the 4th raspi) write the ACL entries in both TH2 and TH3 allowing to receive commands for onoff cluster from DUT + 4.using the commissioner write the ACL entries on both TH2 and TH3 for allowing to receive commands for onoff cluster from DUT(Controller) - 5.Hit Enter on raspi , you will see shell prompt (>) , enter help, you will command for switch . At the prompt enter switch on ,the on command is sent to both TH2 and TH3. you can see that in the log. to test if the TH2/TH3 are turned on or not, you can read the on-off attribute status. Read the status before sending the switch on command and read after sending the command. you should see the value changing. + 5.Hit the Enter button on raspi , you will see a shell prompt (>) , enter help, this would list the command for switch . At the prompt enter switch on ,the "on" command is sent to both TH2 and TH3. and the command and corresponding response can be verified in the log. to test if the TH2/TH3 are turned on or not, you can read the on-off attribute status. Read the status before sending the switch on command and read after sending the command. you should see the value changing. disabled: true - label: "Factory Reset DUT" @@ -75,7 +75,7 @@ tests: verification: | ./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]" 1 1 - On TH(Chip-tool), Verify the success response for binding entries + On TH1(Chip-tool), Verify the success response for binding entries [1657797710.456056][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), @@ -103,7 +103,7 @@ tests: verification: | ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]" 2 0 - on TH (Chip-tool), Verify the on command receives success response + on TH1 (Chip-tool), Verify the on command receives success response [1652330385.328196][3240:3245] CHIP:DMG: StatusIB = [1652330385.328229][3240:3245] CHIP:DMG: { @@ -113,7 +113,7 @@ tests: ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 2, "deviceType": null}]}]" 3 0 - on TH(Chip-tool), Verify the on command receives success response + on TH1(Chip-tool), Verify the on command receives success response [1650610345.847274][2626:2631] CHIP:DMG: StatusIB = [1650610345.847317][2626:2631] CHIP:DMG: { @@ -226,14 +226,14 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 - Verify on TH (Chip-tool),the onoff value is set to ON + Verify on TH2 (Chip-tool),the onoff value is set to ON [1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117 [1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE ./chip-tool onoff read on-off 3 2 - Verify on TH(Chip-tool) ,the onoff value is set to ON + Verify on TH3 (Chip-tool) ,the onoff value is set to ON [1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746 [1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE @@ -243,7 +243,7 @@ tests: verification: | ./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]" 1 1 - Verify on TH(Chip-tool) ,binding entry receives success response + Verify on TH1(Chip-tool) ,binding entry receives success response [1657800844.739833][4000:4006] CHIP:EM: Removed CHIP MessageCounter:244702117 from RetransTable on exchange 12653i [1657800844.739867][4000:4006] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -347,7 +347,7 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 - Verify on TH (Chip-tool),the onoff value is set to OFF + Verify on TH2 (Chip-tool),the onoff value is set to OFF [1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540 @@ -359,7 +359,7 @@ tests: verification: | ./chip-tool onoff read on-off 3 2 - Verify on TH(Chip-tool) ,the onoff value is set to ON + Verify on TH3 (Chip-tool) ,the onoff value is set to ON [1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390 diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml index a1be718287b73c..e55907df9aaf6f 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml @@ -212,7 +212,7 @@ tests: ./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 }]" 74 0 - On TH(Chip-tool), Verify the success response for Acl: + On TH1(Chip-tool), Verify the success response for Acl: [1659075680.943991][2687:2692] CHIP:DMG: StatusIB = [1659075680.944052][2687:2692] CHIP:DMG: { @@ -222,7 +222,7 @@ tests: ./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 }]" 2 0 - On TH(Chip-tool), Verify the success response for Acl: + On TH1(Chip-tool), Verify the success response for Acl: [1659075680.943991][2687:2692] CHIP:DMG: StatusIB = [1659075680.944052][2687:2692] CHIP:DMG: { @@ -238,7 +238,7 @@ tests: ./chip-tool onoff read on-off 2 1 - On TH (Chip-tool), Verify the value is set to ON + On TH1 (Chip-tool), Verify the value is set to ON [1657717900.832851][4381:4386] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029216 [1657717900.832890][4381:4386] CHIP:TOO: OnOff: TRUE @@ -250,7 +250,7 @@ tests: ./chip-tool binding write binding "[]" 74 1 - On TH(Chip-tool), Verify the success response for removing binding entry + On TH1(Chip-tool), Verify the success response for removing binding entry [1659362827.431927][2469:2475] CHIP:DMG: StatusIB = [1659362827.431996][2469:2475] CHIP:DMG: { @@ -273,7 +273,7 @@ tests: ./chip-tool onoff read on-off 2 1 - On TH(Chip-tool), Verify the value is set to ON + On TH1(Chip-tool), Verify the value is set to ON [1657718251.169765][4425:4431] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029223 [1657718251.169817][4425:4431] CHIP:TOO: OnOff: TRUE 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 ead8ff52038077..3457cdc91e536e 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 @@ -69,7 +69,7 @@ tests: ./chip-tool pairing onnetwork 2 20202021 - On TH(Chip-tool), Verify the success response + On TH1(Chip-tool), Verify the success response [1659104612.592373][62366:62371] CHIP:DMG: SuppressResponse = true, [1659104612.592399][62366:62371] CHIP:DMG: InteractionModelRevision = 1 @@ -97,7 +97,7 @@ tests: "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 74 0 - On TH(Chip-tool), Verify the success response for KeySetWrite + On TH1(Chip-tool), Verify the success response for KeySetWrite [1657719041.075123][4541:4546] CHIP:DMG: ICR moving to [ResponseRe] [1657719041.075174][4541:4546] CHIP:DMG: InvokeResponseMessage = @@ -138,7 +138,7 @@ tests: "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 2 0 [1657719041.076036][4541:4546] CHIP:DMG: } - On TH, Verify the success response for KeySetWrite + On TH1, Verify the success response for KeySetWrite [1657719041.075743][4541:4546] CHIP:DMG: status = 0x00 (SUCCESS), disabled: true @@ -151,7 +151,7 @@ tests: ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 74 0 - On TH(Chip-tool), Verify the success response for GroupKeySetID + On TH1(Chip-tool), Verify the success response for GroupKeySetID [1657719130.464175][4557:4562] CHIP:DMG: StatusIB = [1657719130.464214][4557:4562] CHIP:DMG: { @@ -163,7 +163,7 @@ tests: ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 2 0 - On TH(Chip-tool), Verify the success response for GroupKeySetID + On TH1(Chip-tool), Verify the success response for GroupKeySetID [1657719130.464175][4557:4562] CHIP:DMG: StatusIB = [1657719130.464214][4557:4562] CHIP:DMG: { @@ -180,7 +180,7 @@ tests: ./chip-tool groups add-group 0x0001 grp1 74 1 - On TH(Chip-tool), Verify the success response for AddGroup + On TH1(Chip-tool), Verify the success response for AddGroup [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { @@ -193,7 +193,7 @@ tests: ./chip-tool groups add-group 0x0001 grp1 2 1 - On TH(Chip-tool), Verify the success response for AddGroup + On TH1(Chip-tool), Verify the success response for AddGroup [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { @@ -228,7 +228,7 @@ tests: ./chip-tool binding write binding "[{"group" : "0x0001"}]" 74 1 - On TH(Chip-tool), Verify the success response for binding entry + On TH1(Chip-tool), Verify the success response for binding entry [1657719251.763323][4597:4602] CHIP:DMG: StatusIB = [1657719251.763360][4597:4602] CHIP:DMG: { @@ -250,7 +250,7 @@ tests: ./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 }]" 74 0 - On TH(Chip-tool), Verify the success response for Acl: + On TH1(Chip-tool), Verify the success response for Acl: [1659075680.943991][2687:2692] CHIP:DMG: StatusIB = [1659075680.944052][2687:2692] CHIP:DMG: { @@ -260,7 +260,7 @@ tests: ./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 }]" 2 0 - On TH(Chip-tool), Verify the success response for Acl: + On TH1(Chip-tool), Verify the success response for Acl: [1659075680.943991][2687:2692] CHIP:DMG: StatusIB = [1659075680.944052][2687:2692] CHIP:DMG: { @@ -288,7 +288,7 @@ tests: ./chip-tool binding write binding "[]" 74 1 - On TH(Chip-tool), Verify the success response for removing binding entry + On TH1(Chip-tool), Verify the success response for removing binding entry [1659362827.431927][2469:2475] CHIP:DMG: StatusIB = [1659362827.431996][2469:2475] CHIP:DMG: { @@ -311,7 +311,7 @@ tests: ./chip-tool onoff read on-off 2 1 - On TH(Chip-tool), Verify the onoff value is set to ON + On TH1(Chip-tool), Verify the onoff value is set to ON [1657719448.858149][4636:4641] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 [1657719448.858183][4636:4641] CHIP:TOO: OnOff: TRUE diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index 72b45884c4f604..27166db07e5fbe 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -85,38 +85,26 @@ tests: PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | On TH(chip-tool), verify the StateValue value as FALSE - - [1646119162.628169][3311:3316] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000DataVersion: 2127727071 - [1646119162.628207][3311:3316] CHIP:TOO: StateValue: FALSE disabled: true - label: "TH reads the StateValue attribute from the DUT" PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - ./chip-tool booleanstate read state-value 1 1 + booleanstate read state-value 1 1 On TH(chip-tool), verify the StateValue value as FALSE - - [1646118838.087500][3279:3284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000DataVersion: 2127727071 - [1646118838.087536][3279:3284] CHIP:TOO: StateValue: FALSE disabled: true - label: "Bring the DUT into a state so StateValue is TRUE" PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | On TH(chip-tool), verify the StateValue value as TRUE - - [1646119162.628169][3311:3316] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000DataVersion: 2127727071 - [1646119162.628207][3311:3316] CHIP:TOO: StateValue: TRUE disabled: true - label: "TH reads the StateValue attribute from the DUT" PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - ./chip-tool booleanstate read state-value 1 1 + booleanstate read state-value 1 1 On TH(chip-tool), verify the StateValue value as TRUE - - [1646118838.087500][3279:3284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000DataVersion: 2127727071 - [1646118838.087536][3279:3284] CHIP:TOO: StateValue: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml index 9f1e1b56fea93e..af032127cea265 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml @@ -139,15 +139,15 @@ tests: NOTE the quotes: single-quote/double-quote/string/double-quote/single-quote - On TH(chip-tool) verify that DUT sends a success response - [1656495932.122094][2236:2241] CHIP:DMG: } - [1656495932.122264][2236:2241] CHIP:DMG: - [1656495932.122332][2236:2241] CHIP:DMG: StatusIB = - [1656495932.122398][2236:2241] CHIP:DMG: { - [1656495932.122466][2236:2241] CHIP:DMG: status = 0x00 (SUCCESS), - [1656495932.122538][2236:2241] CHIP:DMG: }, - [1656495932.122602][2236:2241] CHIP:DMG: - [1656495932.122660][2236:2241] CHIP:DMG: }, + + [1660839701.840432][2444:2449] CHIP:DMG: } + [1660839701.840505][2444:2449] CHIP:DMG: + [1660839701.840578][2444:2449] CHIP:DMG: StatusIB = + [1660839701.840661][2444:2449] CHIP:DMG: { + [1660839701.840742][2444:2449] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), + [1660839701.840827][2444:2449] CHIP:DMG: }, + [1660839701.840905][2444:2449] CHIP:DMG: + [1660839701.840973][2444:2449] CHIP:DMG: }, disabled: true - label: "TH reads NodeLabel" @@ -472,7 +472,7 @@ tests: false." PICS: BRBINFO.S.A0011 verification: | - ./chip-tool bridgeddevicebasic write-by-id 0x0005 ‘“false”’ 1 0 + ./chip-tool bridgeddevicebasic write-by-id 0x0005 false 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_2.yaml index ed625f1badc7e6..8f9c01ccd13edb 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_2.yaml @@ -21,6 +21,19 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT and TH can interact with each other. DUT is commissioned. + + 2. TH reads SoftwareVersion attribute from DUT and saves for future use + + 3. TH reads Reachable attribute from DUT and saves for future use + + 4. TH subscribes to StartUp, ShutDown, ReachableChanged and Leave events on the Basic cluster of the DUT + + 5. TH saves the FabricIndex during commissioning + disabled: true + - label: "Reboot the DUT (i.e. restart by power cycle, not by making it factory new) TH receives the StartUp event from DUT" diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml index ac004b610d315b..343d47dbd49355 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml @@ -23,18 +23,18 @@ config: tests: - label: "Note" verification: | - Note: : For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true - - label: "Note" + - label: "Precondition" verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + 1. Commission TH to DUT disabled: true - label: "DUT reads VendorName from the TH" PICS: BRBINFO.C.A0001 verification: | - ./chip-tool bridgeddevicebasic read vendor-name 1 0 + ./chip-tool bridgeddevicebasic read vendor-name 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -66,7 +66,7 @@ tests: - label: "DUT reads VendorID from the TH" PICS: BRBINFO.C.A0002 verification: | - ./chip-tool bridgeddevicebasic read vendor-id 1 0 + ./chip-tool bridgeddevicebasic read vendor-id 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -120,7 +120,7 @@ tests: - label: "DUT reads ProductName from the TH" PICS: BRBINFO.C.A0003 verification: | - ./chip-tool bridgeddevicebasic read product-name 1 0 + ./chip-tool bridgeddevicebasic read product-name 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -150,7 +150,7 @@ tests: - label: "DUT reads NodeLabel from the TH" PICS: BRBINFO.C.A0005 verification: | - ./chip-tool bridgeddevicebasic read node-label 1 0 + ./chip-tool bridgeddevicebasic read node-label 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -183,7 +183,7 @@ tests: - label: "DUT reads Location from the TH" PICS: BRBINFO.C.A0006 verification: | - ./chip-tool bridgeddevicebasic read location 1 0 + ./chip-tool bridgeddevicebasic read location 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -216,7 +216,7 @@ tests: - label: "DUT reads HardwareVersion from the TH" PICS: BRBINFO.C.A0007 verification: | - ./chip-tool bridgeddevicebasic read hardware-version-string 1 0 + ./chip-tool bridgeddevicebasic read hardware-version 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -249,7 +249,7 @@ tests: - label: "DUT reads HardwareVersionString from the TH" PICS: BRBINFO.C.A0008 verification: | - ./chip-tool bridgeddevicebasic read hardware-version-string 1 0 + ./chip-tool bridgeddevicebasic read hardware-version-string 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -283,7 +283,7 @@ tests: - label: "DUT reads SoftwareVersion from the TH" PICS: BRBINFO.C.A0009 verification: | - ./chip-tool bridgeddevicebasic read software-version 1 0 + ./chip-tool bridgeddevicebasic read software-version 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -317,7 +317,7 @@ tests: - label: "DUT reads SoftwareVersionString from the TH" PICS: BRBINFO.C.A000a verification: | - ./chip-tool bridgeddevicebasic read software-version-string 1 0 + ./chip-tool bridgeddevicebasic read software-version-string 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -351,7 +351,7 @@ tests: - label: "DUT reads ManufacturingDate from the TH" PICS: BRBINFO.C.A000b verification: | - ./chip-tool bridgeddevicebasic read manufacturing-date 1 0 + ./chip-tool bridgeddevicebasic read manufacturing-date 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -385,7 +385,7 @@ tests: - label: "DUT reads PartNumber from the TH" PICS: BRBINFO.C.A000c verification: | - ./chip-tool bridgeddevicebasic read part-number 1 0 + ./chip-tool bridgeddevicebasic read part-number 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -419,7 +419,7 @@ tests: - label: "DUT reads ProductURL from the TH" PICS: BRBINFO.C.A000d verification: | - ./chip-tool bridgeddevicebasic read product-url 1 0 + ./chip-tool bridgeddevicebasic read product-url 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -453,7 +453,7 @@ tests: - label: "DUT reads ProductLabel from the TH" PICS: BRBINFO.C.A000e verification: | - ./chip-tool bridgeddevicebasic read product-label 1 0 + ./chip-tool bridgeddevicebasic read product-label 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -487,7 +487,7 @@ tests: - label: "DUT reads SerialNumber from the TH" PICS: BRBINFO.C.A000f verification: | - ./chip-tool bridgeddevicebasic read serial-number 1 0 + ./chip-tool bridgeddevicebasic read serial-number 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE @@ -521,7 +521,7 @@ tests: - label: "DUT reads Reachable from the TH" PICS: BRBINFO.C.A0011 verification: | - ./chip-tool bridgeddevicebasic read reachable 1 0 + ./chip-tool bridgeddevicebasic read reachable 1 3 Verify ReadRequestMessage is displayed on TH(all-clusters-app) Log [1659966974.431316][3334:3334] CHIP:IM: Received Read request @@ -552,7 +552,7 @@ tests: - label: "DUT reads UniqueID from the TH" PICS: BRBINFO.C.A0012 verification: | - ./chip-tool bridgeddevicebasic read unique-id 1 0 + ./chip-tool bridgeddevicebasic read unique-id 1 3 Optional Attribute - If it is supported, then in TH(all-clusters-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE 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 e836b98ba2ffdf..0effe409a9420b 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_4.yaml @@ -29,6 +29,14 @@ tests: For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true + - label: "Precondition" + verification: | + 1. Test Harness simulating a bridge with some bridged devices; can use the bridge-app for this purpose + + 2.DUT (client and commissioner) + + disabled: true + - label: "Start bridge-app on TH. Commission TH to DUT. Monitor traffic between DUT and TH." @@ -37,173 +45,352 @@ tests: ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 - Verify DeviceTypeList for available EP - ./chip-tool descriptor read device-list 1 1 Verify in TH(all-clusters-app) Log: - [1657002313.871608][3977:3982] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3021853414 - [1657002313.871680][3977:3982] CHIP:TOO: device list: 1 entries - [1657002313.871740][3977:3982] CHIP:TOO: [1]: { - [1657002313.871788][3977:3982] CHIP:TOO: Type: 14 - [1657002313.871821][3977:3982] CHIP:TOO: Revision: 1 - [1657002313.871852][3977:3982] :TOOCHIP: } + [1659972694.732632][3652:3652] CHIP:IM: Received Read request + [1659972694.732712][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972694.732739][3652:3652] CHIP:DMG: { + [1659972694.732761][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972694.732800][3652:3652] CHIP:DMG: [ + [1659972694.732824][3652:3652] CHIP:DMG: AttributePathIB = + [1659972694.732866][3652:3652] CHIP:DMG: { + [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0x1, + [1659972694.732940][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972694.732980][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972694.733009][3652:3652] CHIP:DMG: } + [1659972694.733066][3652:3652] CHIP:DMG: + [1659972694.733092][3652:3652] CHIP:DMG: ], + [1659972694.733128][3652:3652] CHIP:DMG: + [1659972694.733154][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972694.733188][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972694.733211][3652:3652] CHIP:DMG: }, + [1659972694.733292][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972694.733401][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972694.733429][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1659972694.733460][3652:3652] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1659972694.733487][3652:3652] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1659972694.733520][3652:3652] CHIP:DMG: AccessControl: allowed + + + ./chip-tool descriptor read device-list 1 2 + + Verify in TH(all-clusters-app) Log: + [1659972694.732632][3652:3652] CHIP:IM: Received Read request + [1659972694.732712][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972694.732739][3652:3652] CHIP:DMG: { + [1659972694.732761][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972694.732800][3652:3652] CHIP:DMG: [ + [1659972694.732824][3652:3652] CHIP:DMG: AttributePathIB = + [1659972694.732866][3652:3652] CHIP:DMG: { + [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0x2, + [1659972694.732940][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972694.732980][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972694.733009][3652:3652] CHIP:DMG: } + [1659972694.733066][3652:3652] CHIP:DMG: + [1659972694.733092][3652:3652] CHIP:DMG: ], + [1659972694.733128][3652:3652] CHIP:DMG: + [1659972694.733154][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972694.733188][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972694.733211][3652:3652] CHIP:DMG: }, + [1659972694.733292][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972694.733401][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972694.733429][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1659972694.733460][3652:3652] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1659972694.733487][3652:3652] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1659972694.733520][3652:3652] CHIP:DMG: AccessControl: allowed ./chip-tool descriptor read device-list 1 3 Verify in TH(all-clusters-app) Log: - [1657002329.438065][3983:3988] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2452512872 - [1657002329.438135][3983:3988] CHIP:TOO: device list: 2 entries - [1657002329.438193][3983:3988] CHIP:TOO: [1]: { - [1657002329.438238][3983:3988] CHIP:TOO: Type: 256 - [1657002329.438269][3983:3988] CHIP:TOO: Revision: 1 - [1657002329.438298][3983:3988] CHIP:TOO: } - [1657002329.438332][3983:3988] CHIP:TOO: [2]: { - [1657002329.438360][3983:3988] CHIP:TOO: Type: 19 - [1657002329.438389][3983:3988] CHIP:TOO: Revision: 1 - [1657002329.438416][3983:3988] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 4 Verify in TH(all-clusters-app) Log: - [1657002348.693948][3989:3994] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 - [1657002348.694013][3989:3994] CHIP:TOO: device list: 2 entries - [1657002348.694063][3989:3994] CHIP:TOO: [1]: { - [1657002348.694100][3989:3994] CHIP:TOO: Type: 259 - [1657002348.694125][3989:3994] CHIP:TOO: Revision: 1 - [1657002348.694149][3989:3994] CHIP:TOO: } - [1657002348.694176][3989:3994] CHIP:TOO: [2]: { - [1657002348.694199][3989:3994] CHIP:TOO: Type: 19 - [1657002348.694221][3989:3994] CHIP:TOO: Revision: 1 - [1657002348.694242][3989:3994] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 5 Verify in TH(all-clusters-app) Log: - [1657002369.589492][3996:4001] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 - [1657002369.589556][3996:4001] CHIP:TOO: device list: 2 entries - [1657002369.589610][3996:4001] CHIP:TOO: [1]: { - [1657002369.589653][3996:4001] CHIP:TOO: Type: 259 - [1657002369.589682][3996:4001] CHIP:TOO: Revision: 1 - [1657002369.589710][3996:4001] CHIP:TOO: } - [1657002369.589742][3996:4001] CHIP:TOO: [2]: { - [1657002369.589768][3996:4001] CHIP:TOO: Type: 19 - [1657002369.589794][3996:4001] CHIP:TOO: Revision: 1 - [1657002369.589819][3996:4001] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x5, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 6 Verify in TH(all-clusters-app) Log: - [1657002386.484093][4002:4007] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 295450100 - [1657002386.484155][4002:4007] CHIP:TOO: device list: 1 entries - [1657002386.484255][4002:4007] CHIP:TOO: [1]: { - [1657002386.484302][4002:4007] CHIP:TOO: Type: 19 - [1657002386.484332][4002:4007] CHIP:TOO: Revision: 1 - [1657002386.484361][4002:4007] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x6, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 7 Verify in TH(all-clusters-app) Log: - [1657002413.721927][4015:4020] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2117104859 - [1657002413.721981][4015:4020] CHIP:TOO: device list: 1 entries - [1657002413.722028][4015:4020] CHIP:TOO: [1]: { - [1657002413.722065][4015:4020] CHIP:TOO: Type: 259 - [1657002413.722090][4015:4020] CHIP:TOO: Revision: 1 - [1657002413.722113][4015:4020] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x7, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 8 Verify in TH(all-clusters-app) Log: - [1657002436.415904][4034:4039] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2026786918 - [1657002436.415972][4034:4039] CHIP:TOO: device list: 1 entries - [1657002436.416033][4034:4039] CHIP:TOO: [1]: { - [1657002436.416081][4034:4039] CHIP:TOO: Type: 259 - [1657002436.416115][4034:4039] CHIP:TOO: Revision: 1 - [1657002436.416146][4034:4039] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x8, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 9 Verify in TH(all-clusters-app) Log: - [1657002455.445818][4040:4045] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 913116116 - [1657002455.445883][4040:4045] CHIP:TOO: device list: 1 entries - [1657002455.445944][4040:4045] CHIP:TOO: [1]: { - [1657002455.445991][4040:4045] CHIP:TOO: Type: 17 - [1657002455.446025][4040:4045] CHIP:TOO: Revision: 1 - [1657002455.446056][4040:4045] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x9, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 10 Verify in TH(all-clusters-app) Log: - [1657002473.100910][4047:4052] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 259205426 - [1657002473.100967][4047:4052] CHIP:TOO: device list: 2 entries - [1657002473.101013][4047:4052] CHIP:TOO: [1]: { - [1657002473.101051][4047:4052] CHIP:TOO: Type: 256 - [1657002473.101076][4047:4052] CHIP:TOO: Revision: 1 - [1657002473.101098][4047:4052] CHIP:TOO: } - [1657002473.101126][4047:4052] CHIP:TOO: [2]: { - [1657002473.101148][4047:4052] CHIP:TOO: Type: 19 - [1657002473.101170][4047:4052] CHIP:TOO: Revision: 1 - [1657002473.101192][4047:4052] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x10, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 11 Verify in TH(all-clusters-app) Log: - [1657002495.856770][4061:4066] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4248421677 - [1657002495.856836][4061:4066] CHIP:TOO: device list: 2 entries - [1657002495.856893][4061:4066] CHIP:TOO: [1]: { - [1657002495.856938][4061:4066] CHIP:TOO: Type: 256 - [1657002495.856968][4061:4066] CHIP:TOO: Revision: 1 - [1657002495.856996][4061:4066] CHIP:TOO: } - [1657002495.857030][4061:4066] CHIP:TOO: [2]: { - [1657002495.857058][4061:4066] CHIP:TOO: Type: 19 - [1657002495.857085][4061:4066] CHIP:TOO: Revision: 1 - [1657002495.857112][4061:4066] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x11, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 12 Verify in TH(all-clusters-app) Log: - [1657002515.862187][4073:4078] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2731599835 - [1657002515.862249][4073:4078] CHIP:TOO: device list: 2 entries - [1657002515.862302][4073:4078] CHIP:TOO: [1]: { - [1657002515.862343][4073:4078] CHIP:TOO: Type: 256 - [1657002515.862372][4073:4078] CHIP:TOO: Revision: 1 - [1657002515.862398][4073:4078] CHIP:TOO: } - [1657002515.862429][4073:4078] CHIP:TOO: [2]: { - [1657002515.862455][4073:4078] CHIP:TOO: Type: 19 - [1657002515.862480][4073:4078] CHIP:TOO: Revision: 1 - [1657002515.862504][4073:4078] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x12, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + ./chip-tool descriptor read device-list 1 13 Verify in TH(all-clusters-app) Log: - [1657002538.134605][4097:4102] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3449178249 - [1657002538.134700][4097:4102] CHIP:TOO: device list: 2 entries - [1657002538.134784][4097:4102] CHIP:TOO: [1]: { - [1657002538.134869][4097:4102] CHIP:TOO: Type: 256 - [1657002538.134916][4097:4102] CHIP:TOO: Revision: 1 - [1657002538.134973][4097:4102] CHIP:TOO: } - [1657002538.135025][4097:4102] CHIP:TOO: [2]: { - [1657002538.135083][4097:4102] CHIP:TOO: Type: 19 - [1657002538.135126][4097:4102] CHIP:TOO: Revision: 1 - [1657002538.135166][4097:4102] CHIP:TOO: } + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x13, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty @@ -212,160 +399,1343 @@ tests: ./chip-tool descriptor read parts-list 1 0 Verify in TH(all-clusters-app) Log: + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x0, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + ./chip-tool descriptor read parts-list 1 1 + + Verify in TH(all-clusters-app) Log: + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x1, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + ./chip-tool descriptor read parts-list 1 2 + + Verify in TH(all-clusters-app) Log: + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x2, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + ./chip-tool descriptor read parts-list 1 3 + + Verify in TH(all-clusters-app) Log: + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 4 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 5 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x5, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 6 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x6, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 7 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x7, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 8 - [1657002201.045720][3893:3899] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910940 - [1657002201.045841][3893:3899] CHIP:TOO: parts list: 12 entries - [1657002201.045887][3893:3899] CHIP:TOO: [1]: 1 - [1657002201.045925][3893:3899] CHIP:TOO: [2]: 3 - [1657002201.045963][3893:3899] CHIP:TOO: [3]: 4 - [1657002201.046000][3893:3899] CHIP:TOO: [4]: 5 - [1657002201.046037][3893:3899] CHIP:TOO: [5]: 6 - [1657002201.046073][3893:3899] CHIP:TOO: [6]: 7 - [1657002201.046110][3893:3899] CHIP:TOO: [7]: 8 - [1657002201.046147][3893:3899] CHIP:TOO: [8]: 9 - [1657002201.046184][3893:3899] CHIP:TOO: [9]: 10 - [1657002201.046221][3893:3899] CHIP:TOO: [10]: 11 - [1657002201.046259][3893:3899] CHIP:TOO: [11]: 12 - [1657002201.046296][3893:3899] CHIP:TOO: [12]: 13 + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x8, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 9 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x9, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 10 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x10, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + ./chip-tool descriptor read parts-list 1 11 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x11, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 12 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x12, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 13 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x13, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + disabled: true + + - label: "" + PICS: MCORE.DEVLIST.UseDevices + verification: | + Verify DUT contains the (supported) devices from the above list + + ./chip-tool descriptor read device-list 1 1 + + Verify in TH(all-clusters-app) Log: + + [1659972694.732632][3652:3652] CHIP:IM: Received Read request + [1659972694.732712][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972694.732739][3652:3652] CHIP:DMG: { + [1659972694.732761][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972694.732800][3652:3652] CHIP:DMG: [ + [1659972694.732824][3652:3652] CHIP:DMG: AttributePathIB = + [1659972694.732866][3652:3652] CHIP:DMG: { + [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0x1, + [1659972694.732940][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972694.732980][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972694.733009][3652:3652] CHIP:DMG: } + [1659972694.733066][3652:3652] CHIP:DMG: + [1659972694.733092][3652:3652] CHIP:DMG: ], + [1659972694.733128][3652:3652] CHIP:DMG: + [1659972694.733154][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972694.733188][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972694.733211][3652:3652] CHIP:DMG: }, + [1659972694.733292][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972694.733401][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972694.733429][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1659972694.733460][3652:3652] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1659972694.733487][3652:3652] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1659972694.733520][3652:3652] CHIP:DMG: AccessControl: allowed ./chip-tool descriptor read device-list 1 3 Verify in TH(all-clusters-app) Log: - [1657002843.395988][4135:4140] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2452512872 - [1657002843.396058][4135:4140] CHIP:TOO: device list: 2 entries - [1657002843.396112][4135:4140] CHIP:TOO: [1]: { - [1657002843.396154][4135:4140] CHIP:TOO: Type: 256 - [1657002843.396204][4135:4140] CHIP:TOO: Revision: 1 - [1657002843.396232][4135:4140] CHIP:TOO: } - [1657002843.396265][4135:4140] CHIP:TOO: [2]: { - [1657002843.396291][4135:4140] CHIP:TOO: Type: 19 - [1657002843.396317][4135:4140] CHIP:TOO: Revision: 1 - [1657002843.396342][4135:4140] CHIP:TOO: } + + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + ./chip-tool descriptor read device-list 1 4 Verify in TH(all-clusters-app) Log: - [1657002927.992247][4143:4148] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1398882309 - [1657002927.992309][4143:4148] CHIP:TOO: device list: 2 entries - [1657002927.992362][4143:4148] CHIP:TOO: [1]: { - [1657002927.992405][4143:4148] CHIP:TOO: Type: 259 - [1657002927.992434][4143:4148] CHIP:TOO: Revision: 1 - [1657002927.992459][4143:4148] CHIP:TOO: } - [1657002927.992490][4143:4148] CHIP:TOO: [2]: { - [1657002927.992516][4143:4148] CHIP:TOO: Type: 19 - [1657002927.992542][4143:4148] CHIP:TOO: Revision: 1 - [1657002927.992567][4143:4148] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 5 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 5 Verify in TH(all-clusters-app) Log: - [1657002949.332151][4156:4161] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 130458766 - [1657002949.332245][4156:4161] CHIP:TOO: device list: 2 entries - [1657002949.332294][4156:4161] CHIP:TOO: [1]: { - [1657002949.332332][4156:4161] CHIP:TOO: Type: 259 - [1657002949.332356][4156:4161] CHIP:TOO: Revision: 1 - [1657002949.332379][4156:4161] CHIP:TOO: } - [1657002949.332405][4156:4161] CHIP:TOO: [2]: { - [1657002949.332427][4156:4161] CHIP:TOO: Type: 19 - [1657002949.332449][4156:4161] CHIP:TOO: Revision: 1 - [1657002949.332470][4156:4161] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 6 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x5, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 6 Verify in TH(all-clusters-app) Log: - [1657002965.947096][4163:4168] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 295450100 - [1657002965.947150][4163:4168] CHIP:TOO: device list: 1 entries - [1657002965.947196][4163:4168] CHIP:TOO: [1]: { - [1657002965.947231][4163:4168] CHIP:TOO: Type: 19 - [1657002965.947256][4163:4168] CHIP:TOO: Revision: 1 - [1657002965.947278][4163:4168] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 7 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x6, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 7 Verify in TH(all-clusters-app) Log: - [1657002981.963307][4176:4181] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2117104859 - [1657002981.963371][4176:4181] CHIP:TOO: device list: 1 entries - [1657002981.963429][4176:4181] CHIP:TOO: [1]: { - [1657002981.963474][4176:4181] CHIP:TOO: Type: 259 - [1657002981.963505][4176:4181] CHIP:TOO: Revision: 1 - [1657002981.963533][4176:4181] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 8 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x7, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 8 Verify in TH(all-clusters-app) Log: - [1657003007.476575][4183:4188] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2026786918 - [1657003007.476635][4183:4188] CHIP:TOO: device list: 1 entries - [1657003007.476689][4183:4188] CHIP:TOO: [1]: { - [1657003007.476731][4183:4188] CHIP:TOO: Type: 259 - [1657003007.476760][4183:4188] CHIP:TOO: Revision: 1 - [1657003007.476786][4183:4188] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 9 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x8, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 9 Verify in TH(all-clusters-app) Log: - [1657003023.263333][4191:4196] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 913116116 - [1657003023.263391][4191:4196] CHIP:TOO: device list: 1 entries - [1657003023.263443][4191:4196] CHIP:TOO: [1]: { - [1657003023.263484][4191:4196] CHIP:TOO: Type: 17 - [1657003023.263512][4191:4196] CHIP:TOO: Revision: 1 - [1657003023.263538][4191:4196] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 10 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x9, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 10 Verify in TH(all-clusters-app) Log: - [1657003044.071972][4204:4209] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 259205426 - [1657003044.072037][4204:4209] CHIP:TOO: device list: 2 entries - [1657003044.072085][4204:4209] CHIP:TOO: [1]: { - [1657003044.072123][4204:4209] CHIP:TOO: Type: 256 - [1657003044.072149][4204:4209] CHIP:TOO: Revision: 1 - [1657003044.072195][4204:4209] CHIP:TOO: } - [1657003044.072227][4204:4209] CHIP:TOO: [2]: { - [1657003044.072250][4204:4209] CHIP:TOO: Type: 19 - [1657003044.072272][4204:4209] CHIP:TOO: Revision: 1 - [1657003044.072295][4204:4209] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 11 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x10, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + ./chip-tool descriptor read device-list 1 11 Verify in TH(all-clusters-app) Log: - [1657003082.358311][4217:4222] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4248421677 - [1657003082.358379][4217:4222] CHIP:TOO: device list: 2 entries - [1657003082.358432][4217:4222] CHIP:TOO: [1]: { - [1657003082.358471][4217:4222] CHIP:TOO: Type: 256 - [1657003082.358501][4217:4222] CHIP:TOO: Revision: 1 - [1657003082.358529][4217:4222] CHIP:TOO: } - [1657003082.358563][4217:4222] CHIP:TOO: [2]: { - [1657003082.358591][4217:4222] CHIP:TOO: Type: 19 - [1657003082.358619][4217:4222] CHIP:TOO: Revision: 1 - [1657003082.358646][4217:4222] CHIP:TOO: } - ./chip-tool descriptor read device-list 1 12 + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x11, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + + ./chip-tool descriptor read device-list 1 12 Verify in TH(all-clusters-app) Log: - [1657003103.954911][4248:4253] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2731599835 - [1657003103.954986][4248:4253] CHIP:TOO: device list: 2 entries - [1657003103.955050][4248:4253] CHIP:TOO: [1]: { - [1657003103.955095][4248:4253] CHIP:TOO: Type: 256 - [1657003103.955125][4248:4253] CHIP:TOO: Revision: 1 - [1657003103.955153][4248:4253] CHIP:TOO: } - [1657003103.955186][4248:4253] CHIP:TOO: [2]: { - [1657003103.955214][4248:4253] CHIP:TOO: Type: 19 - [1657003103.955242][4248:4253] CHIP:TOO: Revision: 1 - [1657003103.955269][4248:4253] CHIP:TOO: } + + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x12, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + ./chip-tool descriptor read device-list 1 13 Verify in TH(all-clusters-app) Log: - [1657003125.905572][4261:4266] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3449178249 - [1657003125.905638][4261:4266] CHIP:TOO: device list: 2 entries - [1657003125.905687][4261:4266] CHIP:TOO: [1]: { - [1657003125.905723][4261:4266] CHIP:TOO: Type: 256 - [1657003125.905750][4261:4266] CHIP:TOO: Revision: 1 - [1657003125.905773][4261:4266] CHIP:TOO: } - [1657003125.905800][4261:4266] CHIP:TOO: [2]: { - [1657003125.905823][4261:4266] CHIP:TOO: Type: 19 - [1657003125.905845][4261:4266] CHIP:TOO: Revision: 1 - [1657003125.905867][4261:4266] CHIP:TOO: } + + [1659972745.371532][3652:3652] CHIP:IM: Received Read request + [1659972745.371611][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972745.371654][3652:3652] CHIP:DMG: { + [1659972745.371678][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972745.371716][3652:3652] CHIP:DMG: [ + [1659972745.371742][3652:3652] CHIP:DMG: AttributePathIB = + [1659972745.371781][3652:3652] CHIP:DMG: { + [1659972745.371818][3652:3652] CHIP:DMG: Endpoint = 0x13, + [1659972745.371860][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972745.371902][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972745.371933][3652:3652] CHIP:DMG: } + [1659972745.371971][3652:3652] CHIP:DMG: + [1659972745.371997][3652:3652] CHIP:DMG: ], + [1659972745.372036][3652:3652] CHIP:DMG: + [1659972745.372063][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972745.372099][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972745.372124][3652:3652] CHIP:DMG: }, + [1659972745.372217][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972745.372312][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972745.372343][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + + + + Verify PartsList for available EP + + ./chip-tool descriptor read parts-list 1 0 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x0, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 3 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 4 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 5 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x5, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 6 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x6, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 7 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x7, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 8 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x8, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 9 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x9, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 10 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x10, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + ./chip-tool descriptor read parts-list 1 11 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x11, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 12 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x12, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + + + ./chip-tool descriptor read parts-list 1 13 + + Verify in TH(all-clusters-app) Log: + + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x13, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + disabled: true + + - label: "" + PICS: MCORE.DEVLIST.UseDeviceNames + verification: | + NodeLabel is supported for endpoints 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 + + ./chip-tool bridgeddevicebasic read node-label 1 3 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 4 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 5 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x5, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + + ./chip-tool bridgeddevicebasic read node-label 1 6 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x6, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + + ./chip-tool bridgeddevicebasic read node-label 1 7 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x7, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 8 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x8, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 9 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x9, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 10 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x10, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 11 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x11, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 12 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x12, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + + + + ./chip-tool bridgeddevicebasic read node-label 1 13 + + Verify in TH(all-clusters-app) Log: + + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x13, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty + disabled: true + + - label: "" + PICS: MCORE.DEVLIST.UseDeviceState + verification: | + Read onoff attribute from OnOff cluster with applicable EP (refer step 1a ) + + ./chip-tool onoff read on-off 1 3 + + Verify in TH(all-clusters-app) Log: + + [1659973152.263905][3652:3652] CHIP:IM: Received Read request + [1659973152.264002][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973152.264053][3652:3652] CHIP:DMG: { + [1659973152.264083][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973152.264130][3652:3652] CHIP:DMG: [ + [1659973152.264163][3652:3652] CHIP:DMG: AttributePathIB = + [1659973152.264214][3652:3652] CHIP:DMG: { + [1659973152.264255][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973152.264308][3652:3652] CHIP:DMG: Cluster = 0x6, + [1659973152.264350][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659973152.264404][3652:3652] CHIP:DMG: } + [1659973152.264457][3652:3652] CHIP:DMG: + [1659973152.264494][3652:3652] CHIP:DMG: ], + [1659973152.264541][3652:3652] CHIP:DMG: + [1659973152.264577][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973152.264622][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973152.264654][3652:3652] CHIP:DMG: }, + [1659973152.264756][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973152.264871][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973152.264922][3652:3652] CHIP:DMG: Cluster 6, Attribute 0 is dirty disabled: true - label: @@ -373,17 +1743,58 @@ tests: bridged On/Off lights (use key c in the console to bridge-app)" PICS: MCORE.DEVLIST.UseDeviceState verification: | - Verify on DUT(chip-tool) Log - c - [1659089560.774328][12236:12241] CHIP:DL: Device[Light 1b]: ON - [1659089560.774681][12236:12236] CHIP:DMG: Endpoint 3, Cluster 0x0000_0006 update version to 83dcb371 + Verify on TH(all-clusters-app) Log: + ./chip-tool onoff read on-off 1 3 + [1659973152.263905][3652:3652] CHIP:IM: Received Read request + [1659973152.264002][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973152.264053][3652:3652] CHIP:DMG: { + [1659973152.264083][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973152.264130][3652:3652] CHIP:DMG: [ + [1659973152.264163][3652:3652] CHIP:DMG: AttributePathIB = + [1659973152.264214][3652:3652] CHIP:DMG: { + [1659973152.264255][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973152.264308][3652:3652] CHIP:DMG: Cluster = 0x6, + [1659973152.264350][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659973152.264404][3652:3652] CHIP:DMG: } + [1659973152.264457][3652:3652] CHIP:DMG: + [1659973152.264494][3652:3652] CHIP:DMG: ], + [1659973152.264541][3652:3652] CHIP:DMG: + [1659973152.264577][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973152.264622][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973152.264654][3652:3652] CHIP:DMG: }, + [1659973152.264756][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973152.264871][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973152.264922][3652:3652] CHIP:DMG: Cluster 6, Attribute 0 is dirty + disabled: true + + - label: "" + PICS: MCORE.DEVLIST.UseDeviceState + verification: | + ./chip-tool temperaturemeasurement read measured-value 1 4 Verify on TH(all-clusters-app) Log: - ./chip-tool onoff read on-off 1 3 - [1659089585.162599][8769:8774] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2212279153 - [1659089585.162714][8769:8774] CHIP:TOO: OnOff: TRUE + [1659973227.630446][3652:3652] CHIP:IM: Received Read request + [1659973227.630527][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973227.630570][3652:3652] CHIP:DMG: { + [1659973227.630594][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973227.630633][3652:3652] CHIP:DMG: [ + [1659973227.630658][3652:3652] CHIP:DMG: AttributePathIB = + [1659973227.630699][3652:3652] CHIP:DMG: { + [1659973227.630728][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659973227.630779][3652:3652] CHIP:DMG: Cluster = 0x402, + [1659973227.630821][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659973227.630853][3652:3652] CHIP:DMG: } + [1659973227.630892][3652:3652] CHIP:DMG: + [1659973227.630919][3652:3652] CHIP:DMG: ], + [1659973227.630957][3652:3652] CHIP:DMG: + [1659973227.630984][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973227.631020][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973227.631044][3652:3652] CHIP:DMG: }, + [1659973227.631126][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973227.631231][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973227.631262][3652:3652] CHIP:DMG: Cluster 402, Attribute 0 is dirty disabled: true - label: @@ -394,17 +1805,8 @@ tests: verification: | Press a key "tbd" on bridge-app to change the simulated temperature - Verify on DUT(chip-tool) Log - [1659351537.115828][14237:14242] CHIP:DL: TempSensorDevice[TempSensor 1]: New measurement=""200"" - [1659351537.115987][14237:14242] CHIP:DL: TempSensorDevice[TempSensor 2]: New measurement=""200"" - [1659351537.116097][14237:14242] CHIP:DL: TempSensorDevice[Composed TempSensor 1]: New measurement=""200"" - [1659351537.116158][14237:14237] CHIP:DMG: Endpoint 4, Cluster 0x0000_0402 update version to 8f732d69 - [1659351537.116300][14237:14237] CHIP:DMG: Endpoint 5, Cluster 0x0000_0402 update version to 36be37c5 - [1659351537.116393][14237:14237] CHIP:DMG: Endpoint 7, Cluster 0x0000_0402 update version to 2cf2064d - [1659351537.116179][14237:14242] CHIP:DL: TempSensorDevice[Composed TempSensor 2]: New measurement=""200"" - " - "./chip-tool temperaturemeasurement read measured-value 1 4 + ./chip-tool temperaturemeasurement read measured-value 1 4 Verify on TH(all-clusters-app) Log: @@ -414,28 +1816,73 @@ tests: [1659351542.393552][12212:12217] CHIP:EM: Sending Standalone Ack for MessageCounter:120981971 on exchange 25924i disabled: true - - label: - "Use the DUT to change the on/off state of one or more of the bridged - On/Off lights" + - label: "" + PICS: MCORE.DEVLIST.UseBatInfo verification: | - ./chip-tool onoff on 1 3 + ./chip-tool powersource read bat-charge-level 1 9 - Verify on DUT(chip-tool) Log + Verify on TH(all-clusters-app) Log: - [1658501274.507714][14425:14425] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=3 p=o - [1658501274.507760][14425:14425] CHIP:DMG: AccessControl: allowed - [1658501274.507789][14425:14425] CHIP:DMG: Received command for Endpoint=3 Cluster=0x0000_0006 Command=0x0000_0001 - [1658501274.507829][14425:14425] CHIP:ZCL: On/Off set value: 3 1 - [1658501274.507854][14425:14425] CHIP:DL: HandleReadOnOffAttribute: attrId=0, maxReadLength=1 - [1658501274.507886][14425:14425] CHIP:ZCL: On/off already set to new value + [1659973227.630446][3652:3652] CHIP:IM: Received Read request + [1659973227.630527][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973227.630570][3652:3652] CHIP:DMG: { + [1659973227.630594][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973227.630633][3652:3652] CHIP:DMG: [ + [1659973227.630658][3652:3652] CHIP:DMG: AttributePathIB = + [1659973227.630699][3652:3652] CHIP:DMG: { + [1659973227.630728][3652:3652] CHIP:DMG: Endpoint = 0x4, + [1659973227.630779][3652:3652] CHIP:DMG: Cluster = 0x402, + [1659973227.630821][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659973227.630853][3652:3652] CHIP:DMG: } + [1659973227.630892][3652:3652] CHIP:DMG: + [1659973227.630919][3652:3652] CHIP:DMG: ], + [1659973227.630957][3652:3652] CHIP:DMG: + [1659973227.630984][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973227.631020][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973227.631044][3652:3652] CHIP:DMG: }, + [1659973227.631126][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973227.631231][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973227.631262][3652:3652] CHIP:DMG: Cluster 402, Attribute 0 is dirty + disabled: true + - label: "" + verification: | + verification step to be updated. + disabled: true + - label: + "Use the DUT to change the on/off state of one or more of the bridged + On/Off lights" + verification: | ./chip-tool onoff read on-off 1 3 Verify on TH(all-clusters-app) Log: - [1658501339.773125][35583:35588] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3868039507 - [1658501339.773139][35583:35588] CHIP:TOO: OnOff: TRUE + [1659973152.263905][3652:3652] CHIP:IM: Received Read request + [1659973152.264002][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973152.264053][3652:3652] CHIP:DMG: { + [1659973152.264083][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973152.264130][3652:3652] CHIP:DMG: [ + [1659973152.264163][3652:3652] CHIP:DMG: AttributePathIB = + [1659973152.264214][3652:3652] CHIP:DMG: { + [1659973152.264255][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973152.264308][3652:3652] CHIP:DMG: Cluster = 0x6, + [1659973152.264350][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659973152.264404][3652:3652] CHIP:DMG: } + [1659973152.264457][3652:3652] CHIP:DMG: + [1659973152.264494][3652:3652] CHIP:DMG: ], + [1659973152.264541][3652:3652] CHIP:DMG: + [1659973152.264577][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973152.264622][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973152.264654][3652:3652] CHIP:DMG: }, + [1659973152.264756][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973152.264871][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973152.264922][3652:3652] CHIP:DMG: Cluster 6, Attribute 0 is dirty + disabled: true + + - label: "" + verification: | + verification step to be updated. disabled: true - label: @@ -447,8 +1894,26 @@ tests: Verify on TH(all-clusters-app) Log: - [1659089932.160005][8810:8815] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 3178625724 - [1659089932.160111][8810:8815] CHIP:TOO: NodeLabel: Light 1 + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty Verify on DUT(chip-tool) Log @@ -459,86 +1924,157 @@ tests: Verify on TH(all-clusters-app) Log: - [1659352004.560327][12241:12246] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 2321959095 - [1659352004.560365][12241:12246] CHIP:TOO: NodeLabel: Light 1b + [1659973028.616696][3652:3652] CHIP:IM: Received Read request + [1659973028.616774][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659973028.616810][3652:3652] CHIP:DMG: { + [1659973028.616833][3652:3652] CHIP:DMG: AttributePathIBs = + [1659973028.616859][3652:3652] CHIP:DMG: [ + [1659973028.616891][3652:3652] CHIP:DMG: AttributePathIB = + [1659973028.616919][3652:3652] CHIP:DMG: { + [1659973028.616955][3652:3652] CHIP:DMG: Endpoint = 0x3, + [1659973028.617095][3652:3652] CHIP:DMG: Cluster = 0x39, + [1659973028.617138][3652:3652] CHIP:DMG: Attribute = 0x0000_0005, + [1659973028.617166][3652:3652] CHIP:DMG: } + [1659973028.617194][3652:3652] CHIP:DMG: + [1659973028.617228][3652:3652] CHIP:DMG: ], + [1659973028.617256][3652:3652] CHIP:DMG: + [1659973028.617291][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659973028.617317][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659973028.617348][3652:3652] CHIP:DMG: }, + [1659973028.617428][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659973028.617533][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659973028.617572][3652:3652] CHIP:DMG: Cluster 39, Attribute 5 is dirty disabled: true - - label: - "Use TH/bridge-app to add a bridged light (use key 2 in the console to - bridge-app to add Light 2)" + - label: "" + PICS: MCORE.DEVLIST.UseDeviceNames verification: | Verify on DUT(chip-tool) Log - 2 - [1659352274.915018][14237:14242] CHIP:DMG: Endpoint 1, Cluster 0x0000_001D update version to 7e918bae - [1659352274.915107][14237:14242] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 7561f371 - [1659352274.915166][14237:14242] CHIP:DL: Added device Light 2 to dynamic endpoint 14 (index=11) + b + [1659089470.077297][12236:12241] CHIP:DL: Device[Light 1]: New Name="Light 1b" + disabled: true + + - label: + "Use TH/bridge-app to add a bridged light (use key 2 in the console to + bridge-app to add Light 2)" + verification: | + Press "2" on TH(chip-tool) Log ./chip-tool descriptor read parts-list 1 0 Verify the endpoints listed in TH(all-clusters-app) Log - [1659352284.821350][12264:12269] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1969353585 - [1659352284.821433][12264:12269] CHIP:TOO: parts list: 13 entries - [1659352284.821470][12264:12269] CHIP:TOO: [1]: 1 - [1659352284.821500][12264:12269] CHIP:TOO: [2]: 3 - [1659352284.821529][12264:12269] CHIP:TOO: [3]: 4 - [1659352284.821557][12264:12269] CHIP:TOO: [4]: 5 - [1659352284.821586][12264:12269] CHIP:TOO: [5]: 6 - [1659352284.821614][12264:12269] CHIP:TOO: [6]: 7 - [1659352284.821642][12264:12269] CHIP:TOO: [7]: 8 - [1659352284.821670][12264:12269] CHIP:TOO: [8]: 9 - [1659352284.821698][12264:12269] CHIP:TOO: [9]: 10 - [1659352284.821726][12264:12269] CHIP:TOO: [10]: 11 - [1659352284.821755][12264:12269] CHIP:TOO: [11]: 12 - [1659352284.821784][12264:12269] CHIP:TOO: [12]: 13 - [1659352284.821812][12264:12269] CHIP:TOO: [13]: 14 + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x0, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty " ./chip-tool descriptor read parts-list 1 1 Verify the list contains 11 entries in TH(all-clusters-app) Log - [1659352298.310126][12270:12275] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2123467694 - [1659352298.310213][12270:12275] CHIP:TOO: parts list: 12 entries - [1659352298.310248][12270:12275] CHIP:TOO: [1]: 3 - [1659352298.310277][12270:12275] CHIP:TOO: [2]: 4 - [1659352298.310304][12270:12275] CHIP:TOO: [3]: 5 - [1659352298.310330][12270:12275] CHIP:TOO: [4]: 6 - [1659352298.310356][12270:12275] CHIP:TOO: [5]: 7 - [1659352298.310381][12270:12275] CHIP:TOO: [6]: 8 - [1659352298.310407][12270:12275] CHIP:TOO: [7]: 9 - [1659352298.310433][12270:12275] CHIP:TOO: [8]: 10 - [1659352298.310459][12270:12275] CHIP:TOO: [9]: 11 - [1659352298.310485][12270:12275] CHIP:TOO: [10]: 12 - [1659352298.310512][12270:12275] CHIP:TOO: [11]: 13 - [1659352298.310538][12270:12275] CHIP:TOO: [12]: 14 - [1659352298.310687][12270:12275] CHIP:EM: Sending Standalone Ack for MessageCounter:4449538 on exchange 4393i + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x1, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty ./chip-tool descriptor read parts-list 1 14 Verify on TH(all-clusters-app) Log - - [1659352316.442844][12276:12281] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3417142897 - [1659352316.442927][12276:12281] CHIP:TOO: parts list: 0 entries - [1659352316.443042][12276:12281] CHIP:EM: Sending Standalone Ack for MessageCounter:85433161 on exchange 30040i + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x14, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty ./chip-tool descriptor read device-list 1 14 Verify the list contains 11 entries in TH(all-clusters-app) Log - [1659352346.719522][12283:12288] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3417142897 - [1659352346.719601][12283:12288] CHIP:TOO: device list: 2 entries - [1659352346.719645][12283:12288] CHIP:TOO: [1]: { - [1659352346.719675][12283:12288] CHIP:TOO: Type: 256 - [1659352346.719704][12283:12288] CHIP:TOO: Revision: 1 - [1659352346.719732][12283:12288] CHIP:TOO: } - [1659352346.719766][12283:12288] CHIP:TOO: [2]: { - [1659352346.719794][12283:12288] CHIP:TOO: Type: 19 - [1659352346.719822][12283:12288] CHIP:TOO: Revision: 1 - [1659352346.719849][12283:12288] CHIP:TOO: } - [1659352346.719958][12283:12288] CHIP:EM: Sending Standalone Ack fo + [1659972694.732632][3652:3652] CHIP:IM: Received Read request + [1659972694.732712][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972694.732739][3652:3652] CHIP:DMG: { + [1659972694.732761][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972694.732800][3652:3652] CHIP:DMG: [ + [1659972694.732824][3652:3652] CHIP:DMG: AttributePathIB = + [1659972694.732866][3652:3652] CHIP:DMG: { + [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0x14, + [1659972694.732940][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972694.732980][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, + [1659972694.733009][3652:3652] CHIP:DMG: } + [1659972694.733066][3652:3652] CHIP:DMG: + [1659972694.733092][3652:3652] CHIP:DMG: ], + [1659972694.733128][3652:3652] CHIP:DMG: + [1659972694.733154][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972694.733188][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972694.733211][3652:3652] CHIP:DMG: }, + [1659972694.733292][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972694.733401][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972694.733429][3652:3652] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1659972694.733460][3652:3652] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1659972694.733487][3652:3652] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1659972694.733520][3652:3652] CHIP:DMG: AccessControl: allowed + disabled: true + + - label: "" + PICS: MCORE.DEVLIST.UseDevices + verification: | + Verify on DUT(chip-tool) Log + + 2 + [1659352274.915018][14237:14242] CHIP:DMG: Endpoint 1, Cluster 0x0000_001D update version to 7e918bae + [1659352274.915107][14237:14242] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 7561f371 + [1659352274.915166][14237:14242] CHIP:DL: Added device Light 2 to dynamic endpoint 14 (index=11) disabled: true - label: @@ -549,36 +2085,62 @@ tests: Verify on TH(all-clusters-app) Log: - [1659352461.553715][12295:12300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1969353586 - [1659352461.553848][12295:12300] CHIP:TOO: parts list: 12 entries - [1659352461.553882][12295:12300] CHIP:TOO: [1]: 1 - [1659352461.553910][12295:12300] CHIP:TOO: [2]: 4 - [1659352461.553936][12295:12300] CHIP:TOO: [3]: 5 - [1659352461.553961][12295:12300] CHIP:TOO: [4]: 6 - [1659352461.553987][12295:12300] CHIP:TOO: [5]: 7 - [1659352461.554013][12295:12300] CHIP:TOO: [6]: 8 - [1659352461.554038][12295:12300] CHIP:TOO: [7]: 9 - [1659352461.554064][12295:12300] CHIP:TOO: [8]: 10 - [1659352461.554090][12295:12300] CHIP:TOO: [9]: 11 - [1659352461.554116][12295:12300] CHIP:TOO: [10]: 12 - [1659352461.554142][12295:12300] CHIP:TOO: [11]: 13 - [1659352461.554168][12295:12300] CHIP:TOO: [12]: 14 + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x0, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty ./chip-tool descriptor read parts-list 1 1 Verify on TH(all-clusters-app) Log: - [1659352492.227696][12302:12307] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2123467695 - [1659352492.227770][12302:12307] CHIP:TOO: parts list: 11 entries - [1659352492.227804][12302:12307] CHIP:TOO: [1]: 4 - [1659352492.227831][12302:12307] CHIP:TOO: [2]: 5 - [1659352492.227857][12302:12307] CHIP:TOO: [3]: 6 - [1659352492.227883][12302:12307] CHIP:TOO: [4]: 7 - [1659352492.227909][12302:12307] CHIP:TOO: [5]: 8 - [1659352492.227934][12302:12307] CHIP:TOO: [6]: 9 - [1659352492.227960][12302:12307] CHIP:TOO: [7]: 10 - [1659352492.227986][12302:12307] CHIP:TOO: [8]: 11 - [1659352492.228012][12302:12307] CHIP:TOO: [9]: 12 - [1659352492.228038][12302:12307] CHIP:TOO: [10]: 13 - [1659352492.228063][12302:12307] CHIP:TOO: [11]: 14 + [1659972886.385225][3652:3652] CHIP:IM: Received Read request + [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = + [1659972886.385353][3652:3652] CHIP:DMG: { + [1659972886.385377][3652:3652] CHIP:DMG: AttributePathIBs = + [1659972886.385413][3652:3652] CHIP:DMG: [ + [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = + [1659972886.385482][3652:3652] CHIP:DMG: { + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x1, + [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, + [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, + [1659972886.385630][3652:3652] CHIP:DMG: } + [1659972886.385668][3652:3652] CHIP:DMG: + [1659972886.385694][3652:3652] CHIP:DMG: ], + [1659972886.385730][3652:3652] CHIP:DMG: + [1659972886.385757][3652:3652] CHIP:DMG: isFabricFiltered = true, + [1659972886.385793][3652:3652] CHIP:DMG: InteractionModelRevision = 1 + [1659972886.385817][3652:3652] CHIP:DMG: }, + [1659972886.385908][3652:3652] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + disabled: true + + - label: + "Verify DUT no longer contains the removed device in the list of + devices" + PICS: MCORE.DEVLIST.UseDevices + verification: | + Verify on DUT(chip-tool) Log + + 4 + [1659352426.184434][14237:14242] CHIP:DMG: Endpoint 1, Cluster 0x0000_001D update version to 7e918baf + [1659352426.184489][14237:14242] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 7561f372 + [1659352426.184512][14237:14242] CHIP:DL: Removed device Light 1b from dynamic endpoint 3 (index=0) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 571518d23f43b7..6bfdea56d5dde6 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -39,8 +39,7 @@ tests: - label: "TH_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - "1. Provision the device using 1st controller chip-tool on the raspi (use above instructions) - " + "1. Provision the TH_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" disabled: true - label: @@ -49,24 +48,22 @@ tests: (Enhanced Commissioning Method)." PICS: CADMIN.C.C00.Tx verification: | - On 1st controller using chip tool, open commissioning window using ECM + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - Verify Manual pairing code On TH1(all-clusters-app) Log + Verify Manual pairing code On TH_CR1(CHIP-TOOL) Log CHIP:IN: Sending encrypted msg 0xaaaad3464d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5805157 msec [1635691999.946536][3822:3827] CHIP:DMG: ICR moving to [CommandSen] [1635691999.946586][3822:3827] CHIP:CTL: Manual pairing code: [35407541839] [1635691999.946650][3822:3827] CHIP:CTL: SetupQRCode: [MT:00000CQM00G6V851H10] [1635691999.946802][3822:3827] CHIP:EM: Sending Standalone Ack for MessageCounter:3234931243 on exchange 35324i - [1635691999.946850][3822:3827] CHIP:IN: Prepared plaintext message 0xffffaa58a960 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 35324i with MessageCounter:1726016118. - [1635691999.946895][3822:3827] CHIP:IN: Sending plaintext msg 0xffffaa58a960 with MessageCounter:1726016118 to 0x0000000000000000 at monotonic time: 5805158 msec - [1635691999.946983][3822:3827] CHIP:EM: Flushed pending ack for MessageCounter:3234931243 on exchange 35324i - On DUT as server side + + On TH_CE(All-cluster-app) log CHIP minimal mDNS started advertising. [1635687658.683388][3792:3792] CHIP:DIS: Failed to find a valid admin pairing. Node ID unknown @@ -81,13 +78,13 @@ tests: - label: "TH_CR1 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On 1st controller using chip tool read fabricList + Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command with their all-cluster-app and for the second and third commissioners. - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - Verify 1 entry in the Fabrics list attributeOn TH1(all-clusters-app) Log + Verify 1 entry in the Fabrics list attributeOn TH_CR1(CHIP-TOOL) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 [1649245801.244173][10091:10096] CHIP:TOO: Fabrics: 1 entries @@ -105,23 +102,25 @@ tests: - label: "DUT_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 2nd controller, using chip-tool connect using manual code. + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On DUT_CR2 send the below command Below is the example when using chip tool as controller (considering 35998938564 as the manual code generated by 1st controller) ./chip-tool pairing code 2 35998938564 --commissioner-name beta - Verify whether you got below message in the log of TH2 (all-clusters-app) + Verify whether you got below message in the log of DUT_CR2(CHIP-TOOL) Device commissioning completed with success disabled: true - label: "Verify TH_CE is now discoverable over DNS-SD with two SRV Records" verification: | - On the raspi , Verify if the DUT is broadcasting using + 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 + + On the raspi , Verify if the TH_CE(All-cluster-app) is broadcasting - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ubuntu@ubuntu:~/may10_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + eth0 IPv6 E0AF53B23E580769-0000000000000002 _matter._tcp local @@ -143,68 +142,66 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On 2nd controller using chip tool write and read node-label + Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command with their all-cluster-app and for the second and third commissioners. - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On DUT_CR2 send the below command - ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - Verify success response On TH2(all-clusters-app) Log - - CHIP:DMG: WriteClient moving to [ResponseRe] - [1649671460.431199][20958:20963] CHIP:DMG: WriteResponseMessage = - [1649671460.431217][20958:20963] CHIP:DMG: { - [1649671460.431230][20958:20963] CHIP:DMG: AttributeStatusIBs = - [1649671460.431252][20958:20963] CHIP:DMG: [ - [1649671460.431266][20958:20963] CHIP:DMG: AttributeStatusIB = - [1649671460.431282][20958:20963] CHIP:DMG: { - [1649671460.431297][20958:20963] CHIP:DMG: AttributePathIB = - [1649671460.431314][20958:20963] CHIP:DMG: { - [1649671460.431331][20958:20963] CHIP:DMG: Endpoint = 0x0, - [1649671460.431347][20958:20963] CHIP:DMG: Cluster = 0x28, - [1649671460.431364][20958:20963] CHIP:DMG: Attribute = 0x0000_0005, - [1649671460.431380][20958:20963] CHIP:DMG: } - [1649671460.431403][20958:20963] CHIP:DMG: - [1649671460.431422][20958:20963] CHIP:DMG: StatusIB = - [1649671460.431445][20958:20963] CHIP:DMG: { - [1649671460.431467][20958:20963] CHIP:DMG: status = 0x00 (SUCCESS), - [1649671460.431488][20958:20963] CHIP:DMG: }, - [1649671460.431511][20958:20963] CHIP:DMG: - [1649671460.431530][20958:20963] CHIP:DMG: }, - [1649671460.431556][20958:20963] CHIP:DMG: - [1649671460.431570][20958:20963] CHIP:DMG: ], - [1649671460.431593][20958:20963] CHIP:DMG: - [1649671460.431607][20958:20963] CHIP:DMG: InteractionModelRevision = 1 - [1649671460.431620][20958:20963] CHIP:DMG: } - [1649671460.431685][20958:20963] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1649671460.431729][20958:20963] CHIP:EM: Sending Standalone Ack for MessageCounter:11088724 on exchange 41848i - - - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + Verify Write request on TH_CE(all-clusters-app) Log + + [1660894021.901330][2871:2871] CHIP:EM: Handling via exchange: 9616r, Delegate: 0xaaaada21ffc0 + [1660894021.901426][2871:2871] CHIP:IM: Received Write request + [1660894021.901484][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894021.901613][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894021.901676][2871:2871] CHIP:DMG: { + [1660894021.901735][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894021.901802][2871:2871] CHIP:DMG: timedRequest = false, + [1660894021.901864][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894021.901940][2871:2871] CHIP:DMG: [ + [1660894021.902001][2871:2871] CHIP:DMG: AttributeDataIB = + [1660894021.902071][2871:2871] CHIP:DMG: { + [1660894021.902136][2871:2871] CHIP:DMG: AttributePathIB = + [1660894021.902219][2871:2871] CHIP:DMG: { + [1660894021.902302][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894021.902394][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894021.902488][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894021.902574][2871:2871] CHIP:DMG: } + [1660894021.902827][2871:2871] CHIP:DMG: + [1660894021.902912][2871:2871] CHIP:DMG: Data = "te5new" (6 chars), + [1660894021.902985][2871:2871] CHIP:DMG: }, ./chip-tool basic read node-label 2 0 --commissioner-name beta - Verify read attribute returns the updated value written On TH2(all-clusters-app) Log - - - [1649671466.310629][20969:20974] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3582043624 - [1649671466.310646][20969:20974] CHIP:TOO: NodeLabel: te5new - [1649671466.310704][20969:20974] CHIP:EM: Sending Standalone Ack for MessageCounter:15357338 on exchange 20724i + Verify read request on TH_CE(all-clusters-app) Log + + + [1660894142.828718][2871:2871] CHIP:EM: Handling via exchange: 62454r, Delegate: 0xaaaada21ffc0 + [1660894142.828834][2871:2871] CHIP:IM: Received Read request + [1660894142.829023][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894142.829097][2871:2871] CHIP:DMG: { + [1660894142.829153][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894142.829235][2871:2871] CHIP:DMG: [ + [1660894142.829306][2871:2871] CHIP:DMG: AttributePathIB = + [1660894142.829376][2871:2871] CHIP:DMG: { + [1660894142.829449][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894142.829532][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894142.829627][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894142.829703][2871:2871] CHIP:DMG: } + [1660894142.829777][2871:2871] CHIP:DMG: disabled: true - label: "DUT_CR2 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On 2nd controller using chip tool read fabricList - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - Verify 2 entries in the Fabrics list attribute On TH2(all-clusters-app) Log + Verify 2 entries in the Fabrics list attribute On DUT_CR2(chip-tool) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries @@ -231,53 +228,52 @@ tests: Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On first controller using chip tool, write attribute and read attribute - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On TH_CR1 send the below command ./chip-tool basic write node-label te8 1 0 - Verify success response On TH1(all-clusters-app) Log - - - CHIP:DMG: WriteResponse = - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - + Verify the Write request On TH_CE(all-clusters-app) Log + + + [1660894538.804578][2871:2871] CHIP:EM: Handling via exchange: 64932r, Delegate: 0xaaaada21ffc0 + [1660894538.804677][2871:2871] CHIP:IM: Received Write request + [1660894538.804737][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894538.804867][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894538.804933][2871:2871] CHIP:DMG: { + [1660894538.804993][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894538.805059][2871:2871] CHIP:DMG: timedRequest = false, + [1660894538.805120][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894538.805196][2871:2871] CHIP:DMG: [ + [1660894538.805258][2871:2871] CHIP:DMG: AttributeDataIB = + [1660894538.805346][2871:2871] CHIP:DMG: { + [1660894538.805412][2871:2871] CHIP:DMG: AttributePathIB = + [1660894538.805493][2871:2871] CHIP:DMG: { + [1660894538.805575][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894538.805661][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894538.805752][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894538.805840][2871:2871] CHIP:DMG: } + [1660894538.805922][2871:2871] CHIP:DMG: + [1660894538.806010][2871:2871] CHIP:DMG: Data = "te8" (3 chars), + [1660894538.806082][2871:2871] CHIP:DMG: }, ./chip-tool basic read node-label 1 0 - Verify read attribute returns the updated value written On TH1(all-clusters-app) Log - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te8 - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + Verify the Read request On TH_CE(all-clusters-app) Log + + [1660894686.511690][2871:2871] CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and MessageCounter:155836021 on exchange 25703r + [1660894686.511817][2871:2871] CHIP:EM: Handling via exchange: 25703r, Delegate: 0xaaaada21ffc0 + [1660894686.511920][2871:2871] CHIP:IM: Received Read request + [1660894686.512190][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894686.512259][2871:2871] CHIP:DMG: { + [1660894686.512314][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894686.512380][2871:2871] CHIP:DMG: [ + [1660894686.512441][2871:2871] CHIP:DMG: AttributePathIB = + [1660894686.512526][2871:2871] CHIP:DMG: { + [1660894686.512599][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894686.512683][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894686.512772][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, disabled: true - label: @@ -285,48 +281,67 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On 2nd controller using chip-tool read, write attribute and then read attribute to and from TH_CE - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - On TH2(all-clusters-app) Log - - - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } + Verify the Write request On TH_CE(all-clusters-app) Log + + [1660900144.090077][3045:3045] CHIP:EM: Handling via exchange: 23950r, Delegate: 0xaaaaadbeffc0 + [1660900144.090167][3045:3045] CHIP:IM: Received Write request + [1660900144.090226][3045:3045] CHIP:DMG: IM WH moving to [Initialized] + [1660900144.090347][3045:3045] CHIP:DMG: WriteRequestMessage = + [1660900144.090411][3045:3045] CHIP:DMG: { + [1660900144.090470][3045:3045] CHIP:DMG: suppressResponse = false, + [1660900144.090537][3045:3045] CHIP:DMG: timedRequest = false, + [1660900144.090598][3045:3045] CHIP:DMG: AttributeDataIBs = + [1660900144.090677][3045:3045] CHIP:DMG: [ + [1660900144.090739][3045:3045] CHIP:DMG: AttributeDataIB = + [1660900144.090816][3045:3045] CHIP:DMG: { + [1660900144.090887][3045:3045] CHIP:DMG: AttributePathIB = + [1660900144.090976][3045:3045] CHIP:DMG: { + [1660900144.091061][3045:3045] CHIP:DMG: Endpoint = 0x0, + [1660900144.091150][3045:3045] CHIP:DMG: Cluster = 0x28, + [1660900144.091247][3045:3045] CHIP:DMG: Attribute = 0x0000_0005, + [1660900144.091344][3045:3045] CHIP:DMG: } + [1660900144.091432][3045:3045] CHIP:DMG: + [1660900144.091560][3045:3045] CHIP:DMG: Data = "te5new" (6 chars), + [1660900144.091655][3045:3045] CHIP:DMG: }, + + Verify the success response in the DUT_CR2(Chip-tool) log + + [1649245940.789388][10110:10115] CHIP:DMG: [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = [1649245940.789519][10110:10115] CHIP:DMG: { [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] + Verify read attribute returns the updated value written ./chip-tool basic read node-label 2 0 --commissioner-name beta - Verify read attribute returns the updated value written On TH1(all-clusters-app) Log - + Verify the Write request On TH_CE(all-clusters-app) Log + + [1660900360.861128][3045:3045] CHIP:EM: Handling via exchange: 17574r, Delegate: 0xaaaaadbeffc0 + [1660900360.861223][3045:3045] CHIP:IM: Received Read request + [1660900360.861402][3045:3045] CHIP:DMG: ReadRequestMessage = + [1660900360.861471][3045:3045] CHIP:DMG: { + [1660900360.861527][3045:3045] CHIP:DMG: AttributePathIBs = + [1660900360.861591][3045:3045] CHIP:DMG: [ + [1660900360.861651][3045:3045] CHIP:DMG: AttributePathIB = + [1660900360.861727][3045:3045] CHIP:DMG: { + [1660900360.861798][3045:3045] CHIP:DMG: Endpoint = 0x0, + [1660900360.861871][3045:3045] CHIP:DMG: Cluster = 0x28, + [1660900360.861939][3045:3045] CHIP:DMG: Attribute = 0x0000_0005, + [1660900360.862012][3045:3045] CHIP:DMG: } + [1660900360.862088][3045:3045] CHIP:DMG: + [1660900360.862158][3045:3045] CHIP:DMG: ], + + Verify the success response in the DUT_CR2(Chip-tool) log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new @@ -344,23 +359,25 @@ tests: (Enhanced Commissioning Method)" PICS: CADMIN.C.C00.Tx verification: | - On 2nd controller open commissioning window using ECM + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On DUT_CR2 send the below command + ./chip-tool pairing open-commissioning-window 2 1 300 1000 3841 --commissioner-name - ./chip-tool pairing open-commissionig-window 2 1 300 1000 3841 --commissioner-name beta + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log - Verify Manual pairing code On TH2(all-clusters-app) Log + [1660901022.112296][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660901022.112389][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660901022.112474][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] + + Verify the Manual pairing code On DUT_CR2(chip-tool) Log CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] [1635693418549] [30519:4583024] CHIP: [CTL] Manual pairing code: [34995354639] [1635693418550] [30519:4583024] CHIP: [CTL] SetupQRCode: [MT:00000CQM00YND84XX10] - [1635693418550] [30519:4583024] CHIP: [EM] Sending Standalone Ack for MessageCounter:3441918415 on exchange 50828i - [1635693418550] [30519:4583024] CHIP: [IN] Prepared plaintext message 0x16b92d198 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 50828i with MessageCounter:3727034150. - [1635693418550] [30519:4583024] CHIP: [IN] Sending plaintext msg 0x16b92d198 with Mes disabled: true - label: @@ -368,46 +385,26 @@ tests: using the Revoke Commissioning command" PICS: CADMIN.C.C02.Tx verification: | - On 2nd controller, run revoke command + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On DUT_CR2 send the below command ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - Verify success response On TH2(all-clusters-app) Log + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log + [1660901039.590891][3045:3045] CHIP:DMG: AccessControl: allowed + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 + Verify the success response On DUT_CR2(chip-tool) Log - CHIP: [DMG] InvokeResponseMessage = - [1648115245106] [6681:3894448] CHIP: [DMG] { - [1648115245106] [6681:3894448] CHIP: [DMG] suppressResponse = false, - [1648115245106] [6681:3894448] CHIP: [DMG] InvokeResponseIBs = - [1648115245106] [6681:3894448] CHIP: [DMG] [ - [1648115245106] [6681:3894448] CHIP: [DMG] InvokeResponseIB = - [1648115245106] [6681:3894448] CHIP: [DMG] { - [1648115245106] [6681:3894448] CHIP: [DMG] CommandStatusIB = - [1648115245106] [6681:3894448] CHIP: [DMG] { - [1648115245106] [6681:3894448] CHIP: [DMG] CommandPathIB = - [1648115245106] [6681:3894448] CHIP: [DMG] { - [1648115245106] [6681:3894448] CHIP: [DMG] EndpointId = 0x0, - [1648115245106] [6681:3894448] CHIP: [DMG] ClusterId = 0x3c, - [1648115245106] [6681:3894448] CHIP: [DMG] CommandId = 0x2, - [1648115245106] [6681:3894448] CHIP: [DMG] }, - [1648115245106] [6681:3894448] CHIP: [DMG] [1648115245106] [6681:3894448] CHIP: [DMG] StatusIB = [1648115245106] [6681:3894448] CHIP: [DMG] { [1648115245106] [6681:3894448] CHIP: [DMG] status = 0x0, [1648115245106] [6681:3894448] CHIP: [DMG] }, - [1648115245106] [6681:3894448] CHIP: [DMG] - [1648115245106] [6681:3894448] CHIP: [DMG] }, - [1648115245106] [6681:3894448] CHIP: [DMG] - [1648115245106] [6681:3894448] CHIP: [DMG] }, - [1648115245106] [6681:3894448] CHIP: [DMG] - [1648115245106] [6681:3894448] CHIP: [DMG] ], - [1648115245107] [6681:3894448] CHIP: [DMG] - [1648115245107] [6681:3894448] CHIP: [DMG] InteractionModelRevision = 1 - [1648115245107] [6681:3894448] CHIP: [DMG] }, - [1648115245107] [6681:3894448] CHIP: [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x0 disabled: true - label: @@ -415,13 +412,13 @@ tests: with TH_CE" PICS: CADMIN.C verification: | - On 3rd controller using chip-tool connect using manual code generated from 1st controller. This attempt should fail, i.e + Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command with their all-cluster-app and for the second and third commissioners. - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR3 send the below command ./chip-tool pairing code 3 34995354639 --commissioner-name gamma - verify you got the following message in the TH 3(all-clusters-app) log + verify you got the following message in the TH_CR3(chip-tool) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -433,51 +430,54 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On 2nd controller , write attribute and read attribute to and from TH_CE - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - Verify success response On TH1(all-clusters-app) Log - - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - + Verify the Write request On TH_CE(all-clusters-app) Log + + [1660902144.913634][3045:3045] CHIP:EM: Handling via exchange: 22257r, Delegate: 0xaaaaadbeffc0 + [1660902144.913728][3045:3045] CHIP:IM: Received Write request + [1660902144.913785][3045:3045] CHIP:DMG: IM WH moving to [Initialized] + [1660902144.913912][3045:3045] CHIP:DMG: WriteRequestMessage = + [1660902144.913977][3045:3045] CHIP:DMG: { + [1660902144.914038][3045:3045] CHIP:DMG: suppressResponse = false, + [1660902144.914106][3045:3045] CHIP:DMG: timedRequest = false, + [1660902144.914168][3045:3045] CHIP:DMG: AttributeDataIBs = + [1660902144.914244][3045:3045] CHIP:DMG: [ + [1660902144.914305][3045:3045] CHIP:DMG: AttributeDataIB = + [1660902144.914375][3045:3045] CHIP:DMG: { + [1660902144.914440][3045:3045] CHIP:DMG: AttributePathIB = + [1660902144.914522][3045:3045] CHIP:DMG: { + [1660902144.914602][3045:3045] CHIP:DMG: Endpoint = 0x0, + [1660902144.914691][3045:3045] CHIP:DMG: Cluster = 0x28, + [1660902144.914940][3045:3045] CHIP:DMG: Attribute = 0x0000_0005, + [1660902144.915025][3045:3045] CHIP:DMG: } + [1660902144.915109][3045:3045] CHIP:DMG: + [1660902144.915208][3045:3045] CHIP:DMG: Data = "te5new" (6 chars), + [1660902144.915292][3045:3045] CHIP:DMG: }, + [1660902144.915374][3045:3045] CHIP:DMG: ./chip-tool basic read node-label 2 0 --commissioner-name beta - Verify read attribute returns the updated value written On TH1(all-clusters-app) Log - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + Verify the Write request On TH_CE(all-clusters-app) Log + + [1660902253.379018][3045:3045] CHIP:EM: Handling via exchange: 3197r, Delegate: 0xaaaaadbeffc0 + [1660902253.379122][3045:3045] CHIP:IM: Received Read request + [1660902253.379306][3045:3045] CHIP:DMG: ReadRequestMessage = + [1660902253.379373][3045:3045] CHIP:DMG: { + [1660902253.379430][3045:3045] CHIP:DMG: AttributePathIBs = + [1660902253.379496][3045:3045] CHIP:DMG: [ + [1660902253.379557][3045:3045] CHIP:DMG: AttributePathIB = + [1660902253.379634][3045:3045] CHIP:DMG: { + [1660902253.379703][3045:3045] CHIP:DMG: Endpoint = 0x0, + [1660902253.379782][3045:3045] CHIP:DMG: Cluster = 0x28, + [1660902253.379871][3045:3045] CHIP:DMG: Attribute = 0x0000_0005, + [1660902253.379935][3045:3045] CHIP:DMG: } + [1660902253.380141][3045:3045] CHIP:DMG: + [1660902253.380208][3045:3045] CHIP:DMG: ], disabled: true - label: @@ -485,24 +485,25 @@ tests: ECM" PICS: CADMIN.C.C00.Tx verification: | - On 2nd controller open commissioning window using ECM - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool pairing open-commissioning-window 2 1 180 1000 3840 --commissioner-name beta - Verify Manual pairing code On TH2(all-clusters-app) Log + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log + [1660902413.357922][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660902413.358025][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660902413.358116][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] + + Verify Manual pairing code On DUT_CR2(chip-tool) Log - CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] [1635693418549] [30519:4583024] CHIP: [CTL] Manual pairing code: [34995354639] [1635693418550] [30519:4583024] CHIP: [CTL] SetupQRCode: [MT:00000CQM00YND84XX10] - [1635693418550] [30519:4583024] CHIP: [EM] Sending Standalone Ack for MessageCounter:3441918415 on exchange 50828i - [1635693418550] [30519:4583024] CHIP: [IN] Prepared plaintext message 0x16b92d198 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 50828i with MessageCounter:3727034150. - [1635693418550] [30519:4583024] CHIP: [IN] Sending plaintext msg 0x16b92d198 with Mes + [1635693418550] [30519:4583024] CHIP: [EM] Sending Standalone Ack for MessageCounter:3441918415 on exchange disabled: true - label: @@ -516,18 +517,20 @@ tests: ECM" PICS: CADMIN.C.C00.Tx verification: | - On 2nd controller open commissioning window using ECM + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On DUT_CR2 send the below command + ./chip-tool pairing open-commissioning-window 2 1 300 1000 3840 --commissioner-name beta - ./chip-tool pairing open-commissionig-window 2 1 300 1000 3840 --commissioner-name beta + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log - Verify Manual pairing code On TH2(all-clusters-app) Log + [1660902623.744448][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660902623.744550][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660902623.744634][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] + Verify Manual pairing code On DUT_CR2(chip-tool) Log - CHIP: [IN] Prepared encrypted message 0x124012e80 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 50829i with MessageCounter:0. - [1635693418549] [30519:4583024] CHIP: [IN] Sending encrypted msg 0x124012e80 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5995099243 msec [1635693418549] [30519:4583024] CHIP: [DMG] ICR moving to [CommandSen] [1635693418549] [30519:4583024] CHIP: [CTL] Manual pairing code: [34995354639] [1635693418550] [30519:4583024] CHIP: [CTL] SetupQRCode: [MT:00000CQM00YND84XX10] @@ -541,30 +544,26 @@ tests: from step 15" PICS: CADMIN.C verification: | - On 1st controller, using chip-tool connect using manual code. + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command (considering 34995354639 as the manual code generated by DUT) ./chip-tool pairing code 2 34995354639 - Trying to add a NOC for a fabric that already exists On TH1(all-clusters-app) Log + Verify the OperationalCert error 9 in TH_CE(all-clusters-app) Log + [1660902716.613196][3045:3045] CHIP:DMG: Command handler moving to [AddedComma] + [1660902716.613274][3045:3045] CHIP:ZCL: OpCreds: Failed AddNOC request (err=../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/credentials/FabricTable.cpp:1692: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists) with OperationalCert error 9 + [1660902716.613394][3045:3045] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 + [1660902716.613497][3045:3045] CHIP:EM: Piggybacking Ack for MessageCounter:176866087 on exchange: 56605r + + Verify that the commissioning process fails as TH_CE was already commissioned by TH_CR1 in step 1 + + Trying to add a NOC for a fabric that already exists On TH_CR1(chip-tool) Log [1651786200275] [36301:315544] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists [1651786200275] [36301:315544] CHIP: [CTL] Error on commissioning step "SendNOC": "../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists" - - Verify that the commissioning process fails as TH_CE was already commissioned by TH_CR1 in step 1 - disabled: true - - - label: "" - verification: | - verification step to be updated. - disabled: true - - - label: "" - verification: | - verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index 532bdb8ff32e11..621aa56f0f62f9 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -41,7 +41,7 @@ tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - "1. Provision the device using your DUT controller (use above instructions) , + "1. Provision TH_CE using DUT_CR1 (Chip-tool as DUT controller) " disabled: true @@ -51,9 +51,14 @@ tests: TH_CR3 Commissions with TH_CE" PICS: CADMIN.C.C01.Tx verification: | - On first controller, open commissioning window using BCM + On DUT_CR1 , open commissioning window using BCM + + 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 + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CE(all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -89,10 +94,10 @@ tests: - On 3rd controller, using chip tool connect to the accessory + On DUT_CR2, using chip tool connect to the accessory ./chip-tool pairing onnetwork 1 20202021 --commissioner-name gamma - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log Device commissioning completed with success disabled: true @@ -102,9 +107,14 @@ tests: TH_CR2 Commissions with TH_CE" PICS: CADMIN.C.C01.Tx verification: | - On first controller, open commissioning window using BCM + On DUT_CR1 , open commissioning window using BCM + + 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 + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CE (all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -140,10 +150,15 @@ tests: - On 2nd controller, using chip tool connect to the accessory + On TH_CR2 , using chip tool connect to the accessory + + 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 + + ./chip-tool pairing onnetwork 1 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log + Device commissioning completed with success disabled: true @@ -152,9 +167,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.C.C01.Tx verification: | - On first controller, open commissioning window using BCM + On DUT_CR1 , open commissioning window using BCM + + 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 + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CE (all-clusters-app) Log CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { @@ -195,10 +215,17 @@ tests: attribute" PICS: CADMIN.C.A0000 verification: | - On first controller, read WindowStatus + On DUT_CR1 , read WindowStatus + 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 ./chip-tool administratorcommissioning read window-status 1 0 + + Verify on TH_CE (all-clusters-app) log successfully reads the WindowStatus + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 + [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 + [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i" disabled: true - label: @@ -208,16 +235,55 @@ tests: using ECM" PICS: CADMIN.C.C00.Tx verification: | - On 1st controller chip tool, open commissioning window using ECM + On DUT_CR1 chip tool, open commissioning window using ECM - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + 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 + + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 + + Verify that the TH_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CE Log + + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01" disabled: true - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 4" verification: | - verification step to be updated. + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 4 disabled: true - label: @@ -226,10 +292,14 @@ tests: ECM" PICS: CADMIN.C.C00.Tx verification: | - On 1st controller chip tool, open commissioning window using ECM + On DUT_CR1 chip tool, open commissioning window using ECM + + 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 ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + Verify Manual pairing code on TH_CE (all-clusters-app) Log + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -249,10 +319,17 @@ tests: attribute" PICS: CADMIN.C.A0000 verification: | - On first controller, read WindowStatus + On DUT_CR1 , read WindowStatus + 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 ./chip-tool administratorcommissioning read window-status 1 0 + + Verify on TH_CE (all-clusters-app) log successfully reads the WindowStatus + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 + [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 + [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i" disabled: true - label: @@ -262,28 +339,55 @@ tests: using ECM" PICS: CADMIN.C.C00.Tx verification: | - On 3rd controller chip tool, open commissioning window using ECM + On TH_CR3 chip tool, open commissioning window using ECM - ./chip-tool pairing open-commissioning-window 3 1 180 1000 3840 --commissioner-name gamma + 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 - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 --commissioner-name beta + + Verify that the TH_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CE Log + + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01" disabled: true - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 8" verification: | - verification step to be updated. + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 8 disabled: true - label: @@ -291,10 +395,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On 1st controller chip tool, open commissioning window using ECM + On DUT_CR1 chip tool, open commissioning window using ECM + + 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 ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + Verify Manual pairing code on TH_CE (all-clusters-app) Log + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -315,27 +423,67 @@ tests: PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On 2nd controller using chip tool connect to the accessory using ECM + On TH_CR2 using chip tool connect to the accessory using ECM + + 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 ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta + + Verify that the TH_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CE Log + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x1, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01" disabled: true - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 12" verification: | - verification step to be updated. + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 12 disabled: true - label: "DUT_CR1 sends command to TH_CE to read WindowStatus attribute" PICS: CADMIN.C.A0000 verification: | - On first controller, read WindowStatus + On DUT_CR1 , read WindowStatus + 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 ./chip-tool administratorcommissioning read window-status 1 0 + Verify on TH_CE(all-clusters-app) log successfully reads the WindowStatus + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i" @@ -344,10 +492,14 @@ tests: - label: "DUT_CR1 sends command to TH_CE to read AdminFabricIndex attribute" PICS: CADMIN.C.A0001 verification: | - On first controller, read AdminFabricIndex + On DUT_CR1 , read AdminFabricIndex + + 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 ./chip-tool administratorcommissioning read admin-fabric-index 1 0 + Verify on TH_CE(all-clusters-app) log successfully reads the AdminFabricIndex + [1659097193.389295][11728:11733] CHIP:DMG: } [1659097193.389588][11728:11733] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 1299585105 [1659097193.389731][11728:11733] CHIP:TOO: AdminFabricIndex: 0 @@ -357,10 +509,14 @@ tests: - label: "DUT_CR1 sends command to TH_CE to read AdminVendorId attribute" PICS: CADMIN.C.A0002 verification: | - On first controller, read AdminVendorId + On DUT_CR1 , read AdminVendorId + + 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 ./chip-tool administratorcommissioning read admin-vendor-id 1 0 + Verify on TH_CE(all-clusters-app) log successfully reads the AdminVendorId + [1658838521.588942][9317:9322] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 2423106591 [1658838521.589005][9317:9322] CHIP:TOO: AdminVendorId: 0 [1658838521.589079][9317:9322] CHIP:EM: Sending Standalone Ack for MessageCounter:217165763 on exchange 55683i 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 a6d2ae56fa9342..fecdf6fc80af4d 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 @@ -40,7 +40,7 @@ tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - "1. Provision the device using DUT controller chip tool(use above instructions) , + "1. Provision the device using DUT_CR1 (Chip-tool as DUT controller) " disabled: true @@ -49,13 +49,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On your first controller, open commissioning window using ECM - - Below is the example when using chip tool as controller + On DUT_CR1 , open commissioning window using ECM + 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 ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Verify Manual pairing code on TH_CE (all-clusters-app) Log + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -86,12 +87,14 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 2nd controller using chip tool connect to the accessory + On TH_CR2 using chip tool connect to the accessory + + 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 ./chip-tool pairing code 1 35484132896 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CE(all-clusters-app) log Device commissioning completed with success disabled: true @@ -100,13 +103,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On your first controller chip tool, open commissioning window using ECM - - Below is the example when using chip tool as controller + On TH_CR1 (chip tool), open commissioning window using ECM + 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 ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Verify Manual pairing code on TH_CE(all-clusters-app) Log + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -137,19 +141,24 @@ tests: - label: "TH_CR3 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 3rd controller using chip tool connect to the accessory + On TH_CR3 using chip tool connect to the accessory + 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 ./chip-tool pairing code 1 35484132896 --commissioner-name gamma - Verify you got below message + Verify you got below message on TH_CE(all-clusters-app) log Device commissioning completed with success disabled: true - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On 2nd controller using chip tool, read fabrics list + On DUT_CR1 using chip tool, read fabrics list + + 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 + + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta @@ -185,10 +194,14 @@ tests: - label: "DUT_CR1 sends RemoveFabric with FabricIndex = 2 command to TH_CE" PICS: OPCREDS.C.C0a.Tx verification: | - on 2nd controller using chip tool, remove fabric with FabricIndex=2 + on DUT_CR1 using chip tool, remove fabric with FabricIndex=2 + + 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 ./chip-tool operationalcredentials remove-fabric 2 1 0 --commissioner-name beta + Verify TH_CE responses with NOCResponse with a StatusCode OK on TH_CE (all-clusters-app) log + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 CHIP:TOO: NOCResponse: { @@ -203,9 +216,12 @@ tests: Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - Using your 2nd controller, write attribute and read attribute to and from TH_CE + Using TH_CR2 , write attribute and read attribute to and from TH_CE + + 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 + + Verify read/write commands fail as expected since the TH_CR2 is no longer on the network on TH_CE (all-clusters-app) log - Below is the example while using chip tool on second controller, ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter @@ -214,6 +230,9 @@ tests: ./chip-tool basic read node-label 2 0 --commissioner-name beta + 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 + + Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 @@ -223,12 +242,14 @@ tests: "DUT_CR1 sends command to TH_CE to read the list of Fabrics on TH_CE" PICS: OPCREDS.C.A0001 verification: | - On first controller, read fabrics list + On DUT_CR1 , read fabrics list - Below is the command using chip tool controller + 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 ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries [1647863260.286908][9294:9299] CHIP:TOO: [1]: { @@ -254,7 +275,11 @@ tests: "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 + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + + + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local @@ -277,10 +302,13 @@ tests: verification: | On first controller chip tool, open commissioning window using ECM - Below is the example when using chip tool as controller + 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 ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Verify Manual pairing code on TH1(all-clusters-app) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -297,12 +325,14 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 2nd controller using chip tool connect to the accessory + On TH_CR2 using chip tool connect to the accessory + + 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 ./chip-tool pairing code 1 36217551633 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log Device commissioning completed with success disabled: true @@ -310,12 +340,14 @@ tests: "TH_CR2 sends command to TH_CE to read the list of Fabrics on TH_CE" PICS: OPCREDS.C.A0001 verification: | - On second controller, read fabrics list + On TH_CR2 , read fabrics list - Below is the command using chip tool controller + 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 ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries [1647863342.981158][9309:9314] CHIP:TOO: [1]: { 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 dce6d020f8c141..a3acd649a11040 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 @@ -40,7 +40,7 @@ tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - "1. Provision the device using DUT controller chip tool(use above instructions) , + "1. Provision the device using DUT_CR1 (Chip-tool as DUT controller) " disabled: true @@ -49,11 +49,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.C.C01.Tx verification: | - On your first controller chip tool, open commissioning window using BCM + On DUT_CR1 (chip tool), open commissioning window using BCM + + 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 + - Below is the example when using chip tool as controller ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH-CE(all-clusters-app) Log CHIP: [DMG] InvokeResponseMessage = [1648116114630] [6871:3898916] CHIP: [DMG] { @@ -90,12 +93,14 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 2nd controller using chip tool connect to the accessory + On TH_CR2 using chip tool connect to the accessory + + 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 ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log Device commissioning completed with success disabled: true @@ -104,11 +109,14 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.C.C01.Tx verification: | - On your first controller chip tool, open commissioning window using BCM + On DUT_CR1 (chip tool), open commissioning window using BCM + + 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 + - Below is the example when using chip tool as controller ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CE (all-clusters-app) Log CHIP: [DMG] InvokeResponseMessage = [1648116114630] [6871:3898916] CHIP: [DMG] { @@ -145,12 +153,14 @@ tests: - label: "TH_CR3 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 3rd controller using chip tool connect to the accessory + On TH_CR3 using chip tool connect to the accessory + + 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 ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log Device commissioning completed with success disabled: true @@ -158,11 +168,13 @@ tests: "DUT_CR1 sends command to TH_CE to read the list of Fabrics on TH_CE" PICS: OPCREDS.C.A0001 verification: | - On first controller, read fabrics list + On DUT_CR1 , read fabrics list - ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + 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 + ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 CHIP:TOO: Fabrics: 3 entries @@ -197,7 +209,11 @@ tests: - label: "DUT_CR1 sends RemoveFabric with FabricIndex = 2command to TH_CE" PICS: OPCREDS.C.C0a.Tx verification: | - on 2nd controller using chip tool, remove fabric with FabricIndex=2 + on DUT_CR1 ( using chip tool), remove fabric with FabricIndex=2 + + 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 + + Verify TH_CE responses with NOCResponse with a StatusCode OK on TH_CE (all-clusters-app) log ./chip-tool operationalcredentials remove-fabric 2 1 0 --commissioner-name beta @@ -215,9 +231,12 @@ tests: Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - Using your 2nd controller, write attribute and read attribute to and from TH_CE + Using TH_CR2 , write attribute and read attribute to and from TH_CE + + 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 + + Verify read/write commands fail as expected since the TH_CR2 is no longer on the network on TH_CE (all-clusters-app) - Below is the example while using chip tool on second controller, ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter @@ -234,9 +253,11 @@ tests: - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On first controller, read fabrics list + On DUT_CR1 , read fabrics list - Below is the command using chip tool controller + 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 + + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 @@ -263,7 +284,10 @@ tests: - label: "" verification: | - 1. Verify if the DUT is broadcasting using + 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 + + Execute the below avahi-browse command in any LInux machine or in TH_CR2. + grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local @@ -285,13 +309,15 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.C.C01.Tx verification: | - On first controller chip tool, open commissioning window using BCM + On DUT_CR1 chip tool, open commissioning window using BCM - Below is the example when using chip tool as controller + 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 For BCM, ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CE (all-clusters-app) Log + CHIP:DMG: InvokeResponseMessage = [1650278416.248379][11064:11069] CHIP:DMG: { [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, @@ -328,24 +354,28 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On 2nd controller using chip tool connect to the accessory + On TH_CR2 using chip tool connect to the accessory + + 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 ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CE (all-clusters-app) log Device commissioning completed with success disabled: true - label: "TH_CR2 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On second controller, read fabrics list + On TH_CR2 , read fabrics list - Below is the command using chip tool controller + 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 ./chip-tool operationalcredentials read fabrics 1234 0 --fabric-filtered 0 --commissioner-name beta + Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries [1647863342.981158][9309:9314] CHIP:TOO: [1]: { diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml index a59932b593d21c..83891c653b5b23 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml @@ -34,7 +34,7 @@ tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , + "1. Provision the device using TH_CR1 -chip tool(use above instructions) , " disabled: true @@ -43,12 +43,12 @@ tests: timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp verification: | - On 1st controller chip tool, open commissioning window using ECM - - Below is the example when using chip tool as controller + On TH_CR1 (chip tool), open commissioning window using ECM ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + Verify Manual pairing code on TH_CR1 (chip-tool) Log + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 @@ -65,12 +65,12 @@ tests: - label: "THn starts a commissioning process with DUT_CE" PICS: CADMIN.S verification: | - On nth controller using chip tool connect to the accessory + On TH_CR1+1 controller using chip tool connect to the accessory - ./chip-tool pairing code 2 36217551633 + ./chip-tool pairing code 2 36217551633 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CR1+1(chip-tool) log Device commissioning completed with success disabled: true @@ -79,7 +79,13 @@ tests: to reach an index value of SupportedFabrics on DUT_CE" PICS: CADMIN.S.C00.Rsp verification: | - Repeat step 3 until CommissionedFabrics=SupportedFabrics + Repeat step 3 until CommissionedFabrics=SupportedFabrics (Supported fabrics value obtained in the precondition) + + Use the following command to verify the currentcommissioned fabric (Output number may vary depends on the number successful commissioning ) + + ./chip-tool operationalcredentials read commissioned-fabrics 1 0 + + [1660907933.677983][33780:33785] CHIP:TOO: CommissionedFabrics: 16 disabled: true - label: @@ -87,10 +93,11 @@ tests: with DUT_CE" PICS: CADMIN.S verification: | - On nth controller using chip tool connect to the accessory + On THnth controller using chip tool connect to the accessory + ./chip-tool pairing code 6 36217551633 --commissioner-name 4 - ./chip-tool pairing code 6 36217551633 --commissioner-name beta + Verify DUT_CE responds with NOCResponse with a StatusCode of 0x05 on THn (chip-tool) log CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC @@ -101,7 +108,21 @@ tests: - label: "TH_CR1 removes FabricIndex1" PICS: OPCREDS.S.C0a.Rsp verification: | - on 1st controller using chip tool, remove fabric with FabricIndex=1 + on TH_CR1 using chip tool, remove fabric with FabricIndex=1 ./chip-tool operationalcredentials remove-fabric 1 1 0 + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + CHIP:TOO: NOCResponse: { + CHIP:TOO: statusCode: 0 + CHIP:TOO: fabricIndex: 1 + CHIP:TOO: } + CHIP:DMG: ICR moving to [AwaitingDe] + + Verify CommissionedFabrics=SupportedFabrics-1 on TH_CR1(chip-tool) log + + ./chip-tool operationalcredentials read commissioned-fabrics 1 0 + + [1660907933.677983][33780:33785] CHIP:TOO: CommissionedFabrics: 15 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index 2449a35f43ea41..7696714ea2df48 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -39,7 +39,7 @@ tests: - label: "TH_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - Provision the device using chip tool on first controller + "1. Provision the TH_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" disabled: true - label: @@ -48,13 +48,13 @@ tests: (Basic Commissioning Method)" PICS: CADMIN.C.C01.Tx verification: | - On first controller, usinadministratorcommissioningg chip tool open commissioning window. + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - On TH1(all-clusters-app) Log + Verify Success response On TH_CR1(CHIP-TOOL) Log CHIP:DMG: InvokeResponseMessage = @@ -93,14 +93,15 @@ tests: - label: "TH_CR1 sends command to TH_CE to read the list of Fabrics" PICS: OPCREDS.C.A0001 verification: | - On first controller, using chip tool read fabricList + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 On TH1(all-clusters-app) Log + Verify 1 entry in the Fabrics list attributeOn TH_CR1(CHIP-TOOL) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507058 [1649245801.244173][10091:10096] CHIP:TOO: Fabrics: 1 entries @@ -118,24 +119,25 @@ tests: - label: "DUT_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On second Controller connect to the accessory. - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message On TH2(all-clusters-app) Log + Verify whether you got below message in the log of DUT_CR2(CHIP-TOOL) + Device commissioning completed with success disabled: true - label: "Verify TH_CE is now discoverable over DNS-SD with two SRV Records" verification: | - On the raspi , Verify if the DUT is broadcasting using + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On the raspi , Verify if the TH_CE(All-cluster-app) is broadcasting + On TH_CR1 send the below command ubuntu@ubuntu:~/may10_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + eth0 IPv6 E0AF53B23E580769-0000000000000002 _matter._tcp local @@ -157,67 +159,61 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On the 2nd controller write attribute and read attribute to and from TH_CE - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta On TH2(all-clusters-app) Log + Verify Write request on TH_CE(all-clusters-app) Log - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - + [1660894021.901330][2871:2871] CHIP:EM: Handling via exchange: 9616r, Delegate: 0xaaaada21ffc0 + [1660894021.901426][2871:2871] CHIP:IM: Received Write request + [1660894021.901484][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894021.901613][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894021.901676][2871:2871] CHIP:DMG: { + [1660894021.901735][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894021.901802][2871:2871] CHIP:DMG: timedRequest = false, + [1660894021.901864][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894021.901940][2871:2871] CHIP:DMG: [ + [1660894021.902001][2871:2871] CHIP:DMG: AttributeDataIB = + [1660894021.902071][2871:2871] CHIP:DMG: { + [1660894021.902136][2871:2871] CHIP:DMG: AttributePathIB = + [1660894021.902219][2871:2871] CHIP:DMG: { + [1660894021.902302][2871:2871] CHIP:DMG: Endpoint = 0x0, - Verify read attribute returns the updated value written - ./chip-tool basic read node-label 1 0 --commissioner-name beta + ./chip-tool basic read node-label 2 0 --commissioner-name beta - On TH2(all-clusters-app) Log + Verify read request on TH_CE(all-clusters-app) Log - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + [1660894142.828718][2871:2871] CHIP:EM: Handling via exchange: 62454r, Delegate: 0xaaaada21ffc0 + [1660894142.828834][2871:2871] CHIP:IM: Received Read request + [1660894142.829023][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894142.829097][2871:2871] CHIP:DMG: { + [1660894142.829153][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894142.829235][2871:2871] CHIP:DMG: [ + [1660894142.829306][2871:2871] CHIP:DMG: AttributePathIB = + [1660894142.829376][2871:2871] CHIP:DMG: { + [1660894142.829449][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894142.829532][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894142.829627][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, disabled: true - label: "DUT_CR2 sends command to TH_CE to read the list of Fabrics on TH_CE" PICS: OPCREDS.C.A0001 verification: | - On second controller controller read fabricList - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - On TH2(all-clusters-app) Log + Verify 2 entries in the Fabrics list attribute On DUT_CR2(chip-tool) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3229397217 @@ -246,52 +242,43 @@ tests: Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On first controller, using chip-tool write attribute, Verify read attribute returns the updated value written. - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool basic write node-label te8 1 0 - On TH1(all-clusters-app) Log + Verify the Write request On TH_CE(all-clusters-app) Log - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1660894538.804578][2871:2871] CHIP:EM: Handling via exchange: 64932r, Delegate: 0xaaaada21ffc0 + [1660894538.804677][2871:2871] CHIP:IM: Received Write request + [1660894538.804737][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894538.804867][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894538.804933][2871:2871] CHIP:DMG: { + [1660894538.804993][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894538.805059][2871:2871] CHIP:DMG: timedRequest = false, + [1660894538.805120][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894538.805196][2871:2871] CHIP:DMG: [ - Verify read attribute returns the updated value written ./chip-tool basic read node-label 1 0 - On TH1(all-clusters-app) Log - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te8 - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + Verify the Read request On TH_CE(all-clusters-app) Log + + [1660894686.511690][2871:2871] CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and MessageCounter:155836021 on exchange 25703r + [1660894686.511817][2871:2871] CHIP:EM: Handling via exchange: 25703r, Delegate: 0xaaaada21ffc0 + [1660894686.511920][2871:2871] CHIP:IM: Received Read request + [1660894686.512190][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894686.512259][2871:2871] CHIP:DMG: { + [1660894686.512314][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894686.512380][2871:2871] CHIP:DMG: [ + [1660894686.512441][2871:2871] CHIP:DMG: AttributePathIB = + [1660894686.512526][2871:2871] CHIP:DMG: { + [1660894686.512599][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894686.512683][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894686.512772][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894142.829703][2871:2871] CHIP:DMG: } + [1660894142.829777][2871:2871] CHIP:DMG: disabled: true - label: @@ -301,7 +288,7 @@ tests: verification: | On second controller read, write attribute and then read attribute to and from TH_CE - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta @@ -358,47 +345,17 @@ tests: (Basic Commissioning Method)" PICS: CADMIN.C.C01.Tx verification: | - On second controller using chip-tool open commissioning widow using BCM. - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - On TH2(all-clusters-app) Log - + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + [1660901022.112296][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660901022.112389][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660901022.112474][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] disabled: true - label: @@ -406,47 +363,18 @@ tests: using the Revoke Commissioning command" PICS: CADMIN.C.C02.Tx verification: | - On second controller using chip-tool run revoke command - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool administratorcommissioning revoke-commissioning 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - On TH2(all-clusters-app) Log - + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 disabled: true - label: @@ -454,14 +382,13 @@ tests: with TH_CE" PICS: CADMIN.C verification: | - 1. On third controller, using chip-tool connect to the accessory. Connect attempt should fail, i.e - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On TH_CR3 send the below command ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - verify you got the following message in the TH3 (all-clusters-app) log + verify you got the following message in the TH_CR3(chip-tool) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -473,50 +400,38 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - On second controller, write attribute and read attribute to and from TH_CE - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - On TH2(all-clusters-app) Log + Verify the Write request On TH_CE(all-clusters-app) Log + [1660902144.913634][3045:3045] CHIP:EM: Handling via exchange: 22257r, Delegate: 0xaaaaadbeffc0 + [1660902144.913728][3045:3045] CHIP:IM: Received Write request + [1660902144.913785][3045:3045] CHIP:DMG: IM WH moving to [Initialized] + [1660902144.913912][3045:3045] CHIP:DMG: WriteRequestMessage = + [1660902144.913977][3045:3045] CHIP:DMG: { + [1660902144.914038][3045:3045] CHIP:DMG: suppressResponse = false, + [1660902144.914106][3045:3045] CHIP:DMG: timedRequest = false, + [1660902144.914168][3045:3045] CHIP:DMG: AttributeDataIBs = - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - Verify read attribute returns the updated value written - - On TH2(all-clusters-app) Log + [1660902144.915374][3045:3045] CHIP:DMG: ./chip-tool basic read node-label 2 0 --commissioner-name beta - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + + Verify the Write request On TH_CE(all-clusters-app) Log + + [1660902253.379018][3045:3045] CHIP:EM: Handling via exchange: 3197r, Delegate: 0xaaaaadbeffc0 + [1660902253.379122][3045:3045] CHIP:IM: Received Read request + [1660902253.379306][3045:3045] CHIP:DMG: ReadRequestMessage = + [1660902253.379373][3045:3045] CHIP:DMG: { + [1660902253.379430][3045:3045] CHIP:DMG: AttributePathIBs = + [1660902253.379496][3045:3045] CHIP:DMG: [ + [1660902253.379557][3045:3045] CHIP:DMG: AttributePathIB = + [1660902253.379634][3045:3045] CHIP:DMG: { + [1660902253.379703][3045:3045] CHIP:DMG: Endpoint = 0x0, disabled: true - label: @@ -524,47 +439,17 @@ tests: BCM" PICS: CADMIN.C.C01.Tx verification: | - On second controller using chip-tool open commissioning widow using BCM. - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool administratorcommissioning open-basic-commissioning-window 180 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - On TH2(all-clusters-app) Log + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log - - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + [1660902413.357922][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660902413.358025][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660902413.358116][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] disabled: true - label: @@ -578,46 +463,17 @@ tests: BCM" PICS: CADMIN.C.C01.Tx verification: | - On second controller using chip-tool open commissioning widow using BCM. - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 + On DUT_CR2 send the below command ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - On TH2(all-clusters-app) Log + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + [1660902623.744448][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660902623.744550][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660902623.744634][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] disabled: true - label: @@ -625,19 +481,23 @@ tests: from step 15" PICS: CADMIN.C verification: | - Using your 1st Controller connect to the accessory. + 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 - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + On TH_CR1 send the below command ./chip-tool pairing onnetwork 1 20202021 - On TH1(all-clusters-app) Log + Verify the OperationalCert error 9 in TH_CE(all-clusters-app) Log + + [1660902716.613196][3045:3045] CHIP:DMG: Command handler moving to [AddedComma] + [1660902716.613274][3045:3045] CHIP:ZCL: OpCreds: Failed AddNOC request (err=../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/credentials/FabricTable.cpp:1692: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists) with OperationalCert error 9 + [1660902716.613394][3045:3045] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 + [1660902716.613497][3045:3045] CHIP:EM: Piggybacking Ack for MessageCounter:176866087 on exchange: 56605r + Trying to add a NOC for a fabric that already exists On TH_CR1(chip-tool) Log [1651786200275] [36301:315544] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists [1651786200275] [36301:315544] CHIP: [CTL] Error on commissioning step "SendNOC": "../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists" - - Verify that the commissioning process fails as TH_CE was already commissioned by TH_CR1 in step 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index 0c279f676577c5..18672ffa5ddad4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -35,7 +35,7 @@ tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S verification: | - "1. Provision the device using 1st controller chip tool(use above instructions) , + "1. Provision the device using TH_CR1 - chip tool(use above instructions) , " disabled: true @@ -44,12 +44,12 @@ tests: timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp verification: | - On 1st controller chip tool, open commissioning window using BCM - - Below is the example when using chip tool as controller + On TH_CR1 (chip tool), open commissioning window using BCM ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify success response On TH_CR1(chip-tool) Log + CHIP:DMG: InvokeResponseMessage = [1649756654.928453][3385:3390] CHIP:DMG: { [1649756654.928511][3385:3390] CHIP:DMG: suppressResponse = false, @@ -86,12 +86,11 @@ tests: - label: "THn starts a commissioning process with DUT_CE" PICS: CADMIN.S verification: | - On nth controller using chip tool connect to the accessory - + On TH_CR1+1 controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message + Verify you got below message on TH_CR1+1(chip-tool) log Device commissioning completed with success disabled: true @@ -100,7 +99,13 @@ tests: to reach an index value of SupportedFabrics on DUT_CE" PICS: CADMIN.S.C01.Rsp verification: | - Repeat step 3 until CommissionedFabrics=SupportedFabrics + Repeat step 3 until CommissionedFabrics=SupportedFabrics (Supported fabrics value obtained in the precondition) + + Use the following command to verify the currentcommissioned fabric (Output number may vary depends on the number successful commissioning ) + + ./chip-tool operationalcredentials read commissioned-fabrics 1 0 + + [1660907933.677983][33780:33785] CHIP:TOO: CommissionedFabrics: 16 disabled: true - label: @@ -108,10 +113,11 @@ tests: with DUT_CE" PICS: CADMIN.S.C01.Rsp verification: | - On nth controller using chip tool connect to the accessory + On THnth controller using chip tool connect to the accessory + ./chip-tool pairing onnetwork 6 20202021 --commissioner-name 4 - ./chip-tool pairing onnetwork 6 20202021 --commissioner-name beta + Verify DUT_CE responds with NOCResponse with a StatusCode of 0x05 on THn (chip-tool) log CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC @@ -122,7 +128,21 @@ tests: - label: "TH_CR1 removes FabricIndex1" PICS: OPCREDS.S.C0a.Rsp verification: | - on 1st controller using chip tool, remove fabric with FabricIndex=1 + on TH_CR1 using chip tool, remove fabric with FabricIndex=1 ./chip-tool operationalcredentials remove-fabric 1 1 0 + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + CHIP:TOO: NOCResponse: { + CHIP:TOO: statusCode: 0 + CHIP:TOO: fabricIndex: 1 + CHIP:TOO: } + CHIP:DMG: ICR moving to [AwaitingDe] + + Verify CommissionedFabrics=SupportedFabrics-1 on TH_CR1(chip-tool) log + + ./chip-tool operationalcredentials read commissioned-fabrics 1 0 + + [1660907933.677983][33780:33785] CHIP:TOO: CommissionedFabrics: 15 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index c71b2bbee02a5d..51584addb07c21 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -40,7 +40,7 @@ tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - 1. Provision the device using DUT_CR1 controller on the raspi. + "1. Provision the TH_CE (all-cluster-app) device using DUT_CR1 (chip-tool ) on the raspi" " disabled: true - label: @@ -48,19 +48,21 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On 1st controller open commissioning widow using ECM. + On DUT_CR1 send the below command - Below is the example while using chip tool as controller, + Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command with their all-cluster-app and for the second and third commissioners. + + Verify the Open commisioning window on the TH_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - [1635871058.908790][4273:4278] CHIP:SC: Success status report received. Session was established - [1635871058.908827][4273:4278] CHIP:IN: New secure session created for device 0x0000000000000001, key 47!! - [1635871058.908924][4273:4278] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635871058.916166][4273:4278] CHIP:DMG: ICR moving to [AddingComm] - [1635871058.916223][4273:4278] CHIP:DMG: ICR moving to [AddedComma] - [1635871058.916362][4273:4278] CHIP:IN: Prepared encrypted message 0xaaaac41dfd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 21937i with MessageCounter:0. - [1635871058.916421][4273:4278] CHIP:IN: Sending encrypted msg 0xaaaac41dfd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 12630575 msec + Verify the Manual pairing code on the DUT_CR1(chip-tool) Log: + + 0x0000000000000001 at monotonic time: 12630575 msec [1635871058.916549][4273:4278] CHIP:DMG: ICR moving to [CommandSen] [1635871058.916607][4273:4278] CHIP:CTL: Manual pairing code: [36366524220] [1635871058.916679][4273:4278] CHIP:CTL: SetupQRCode: [MT:00000CQM0088GL3XV00] @@ -94,13 +96,15 @@ tests: PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller + On TH_CR2 send the below command + 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 - Below is the example when using chip tool as controller (considering 36366524220 as the manual code generated by DUT controller) + (considering 36366524220 as the manual code generated by DUT controller) ./chip-tool pairing code 2 36366524220 --commissioner-name beta - verify you got the following message in the TH log + Verify the below message in the TH_CR2(chip-tool) Log: + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout @@ -112,19 +116,21 @@ tests: ECM" PICS: CADMIN.C.C00.Tx verification: | - On your second controller open commissioning widow using ECM. + On DUT_CR1 send the below command - Below is the example while using chip tool as controller, + 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 ./chip-tool pairing open-commissioning-window 2 1 300 1000 3840 --commissioner-name beta - [1635871058.908790][4273:4278] CHIP:SC: Success status report received. Session was established - [1635871058.908827][4273:4278] CHIP:IN: New secure session created for device 0x0000000000000001, key 47!! - [1635871058.908924][4273:4278] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635871058.916166][4273:4278] CHIP:DMG: ICR moving to [AddingComm] - [1635871058.916223][4273:4278] CHIP:DMG: ICR moving to [AddedComma] - [1635871058.916362][4273:4278] CHIP:IN: Prepared encrypted message 0xaaaac41dfd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 21937i with MessageCounter:0. - [1635871058.916421][4273:4278] CHIP:IN: Sending encrypted msg 0xaaaac41dfd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 12630575 msec + Verify the Open commisioning window on the TH_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the DUT_CR1(chip-tool) Log: + + 0x0000000000000001 at monotonic time: 12630575 msec [1635871058.916549][4273:4278] CHIP:DMG: ICR moving to [CommandSen] [1635871058.916607][4273:4278] CHIP:CTL: Manual pairing code: [36366524220] [1635871058.916679][4273:4278] CHIP:CTL: SetupQRCode: [MT:00000CQM0088GL3XV00] @@ -134,55 +140,43 @@ tests: - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" PICS: CADMIN.C.C02.Tx verification: | - On First controller send revoke commissioning + On DUT_CR1 send the below command - Below is the example while using chip tool as controller, + 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 ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + Verify success response On DUT_CR1(CHIP-TOOL) Log + + [1650278416.249347][11064:11069] CHIP:DMG: }, [1650278416.249430][11064:11069] CHIP:DMG: [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = [1650278416.249581][11064:11069] CHIP:DMG: { [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log + + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller + On TH_CR2 send the below command + 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 - Below is the example when using chip tool as controller (considering 34921141778 as the manual code generated by DUT controller) + (considering 34921141778 as the manual code generated by DUT controller) ./chip-tool pairing code 2 34921141778 --commissioner-name beta - verify you got the following message in the TH log + verify you got the following message in the TH_CR2(chip-tool) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout @@ -191,26 +185,22 @@ tests: - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" PICS: CADMIN.C.C02.Tx verification: | - On your first controller revoke commissioning - - Below is the example while using chip tool as controller, - - /chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - - CHIP:DMG: InvokeResponseMessage = - [1650524034.111241][15422:15427] CHIP:DMG: { - [1650524034.111316][15422:15427] CHIP:DMG: suppressResponse = false, - [1650524034.111383][15422:15427] CHIP:DMG: InvokeResponseIBs = - [1650524034.111464][15422:15427] CHIP:DMG: [ - [1650524034.111531][15422:15427] CHIP:DMG: InvokeResponseIB = - [1650524034.111643][15422:15427] CHIP:DMG: { - [1650524034.111714][15422:15427] CHIP:DMG: CommandStatusIB = - [1650524034.111803][15422:15427] CHIP:DMG: { - [1650524034.111886][15422:15427] CHIP:DMG: CommandPathIB = - [1650524034.111979][15422:15427] CHIP:DMG: { - [1650524034.112072][15422:15427] CHIP:DMG: EndpointId = 0x0, - [1650524034.112167][15422:15427] CHIP:DMG: ClusterId = 0x3c, - [1650524034.112257][15422:15427] CHIP:DMG: CommandId = 0x2, + On DUT_CR1 send the below command + + 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 + + ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log + + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 + + Verify cluster-status code 3 On DUT_CR1(chip-tool) Log + + [1650524034.112345][15422:15427] CHIP:DMG: }, [1650524034.112456][15422:15427] CHIP:DMG: [1650524034.112543][15422:15427] CHIP:DMG: StatusIB = @@ -219,16 +209,6 @@ tests: [1650524034.112825][15422:15427] CHIP:DMG: cluster-status = 0x3, [1650524034.112914][15422:15427] CHIP:DMG: }, [1650524034.113005][15422:15427] CHIP:DMG: - [1650524034.113084][15422:15427] CHIP:DMG: }, - [1650524034.113176][15422:15427] CHIP:DMG: - [1650524034.113245][15422:15427] CHIP:DMG: }, - [1650524034.113328][15422:15427] CHIP:DMG: - [1650524034.113392][15422:15427] CHIP:DMG: ], - [1650524034.113477][15422:15427] CHIP:DMG: - [1650524034.113545][15422:15427] CHIP:DMG: InteractionModelRevision = 1 - [1650524034.113610][15422:15427] CHIP:DMG: }, - [1650524034.113780][15422:15427] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x1 - [1650524034.113892][15422:15427] CHIP:TOO: Error: IM Error 0x00000603: Cluster-specific error: 0x03 disabled: true - label: @@ -236,43 +216,52 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - Using your DUT controller, write attribute and read attribute to and from TH_CE - - Below is the example while using chip tool on second controller, - ./chip-tool basic write node-label te5new 1 0 - - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - - Verify read attribute returns the updated value written - ./chip-tool basic read node-label 2 0 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + On DUT_CR1 send the below command + + 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 + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + + Verify Write request on TH_CE(all-clusters-app) Log + + [1660894021.901330][2871:2871] CHIP:EM: Handling via exchange: 9616r, Delegate: 0xaaaada21ffc0 + [1660894021.901426][2871:2871] CHIP:IM: Received Write request + [1660894021.901484][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894021.901613][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894021.901676][2871:2871] CHIP:DMG: { + [1660894021.901735][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894021.901802][2871:2871] CHIP:DMG: timedRequest = false, + [1660894021.901864][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894021.901940][2871:2871] CHIP:DMG: [ + [1660894021.902001][2871:2871] CHIP:DMG: AttributeDataIB = + [1660894021.902071][2871:2871] CHIP:DMG: { + [1660894021.902136][2871:2871] CHIP:DMG: AttributePathIB = + [1660894021.902219][2871:2871] CHIP:DMG: { + [1660894021.902302][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894021.902394][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894021.902488][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894021.902574][2871:2871] CHIP:DMG: } + [1660894021.902827][2871:2871] CHIP:DMG: + [1660894021.902912][2871:2871] CHIP:DMG: Data = "te5new" (6 chars), + [1660894021.902985][2871:2871] CHIP:DMG: }, + + ./chip-tool basic read node-label 2 0 --commissioner-name beta + + Verify read request on TH_CE(all-clusters-app) Log + + + [1660894142.828718][2871:2871] CHIP:EM: Handling via exchange: 62454r, Delegate: 0xaaaada21ffc0 + [1660894142.828834][2871:2871] CHIP:IM: Received Read request + [1660894142.829023][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894142.829097][2871:2871] CHIP:DMG: { + [1660894142.829153][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894142.829235][2871:2871] CHIP:DMG: [ + [1660894142.829306][2871:2871] CHIP:DMG: AttributePathIB = + [1660894142.829376][2871:2871] CHIP:DMG: { + [1660894142.829449][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894142.829532][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894142.829627][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894142.829703][2871:2871] CHIP:DMG: } + [1660894142.829777][2871:2871] CHIP:DMG: disabled: true - label: @@ -280,19 +269,21 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.C.C00.Tx verification: | - On your first controller open commissioning widow using ECM. + On DUT_CR1 send the below command - Below is the example while using chip tool as controller, + 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 ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - [1635871373.773447][4322:4328] CHIP:SC: Success status report received. Session was established - [1635871373.773517][4322:4328] CHIP:IN: New secure session created for device 0x0000000000000001, key 54!! - [1635871373.773611][4322:4328] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635871373.780891][4322:4328] CHIP:DMG: ICR moving to [AddingComm] - [1635871373.780942][4322:4328] CHIP:DMG: ICR moving to [AddedComma] - [1635871373.781067][4322:4328] CHIP:IN: Prepared encrypted message 0xaaaae2653d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 62089i with MessageCounter:0. - [1635871373.781124][4322:4328] CHIP:IN: Sending encrypted msg 0xaaaae2653d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 12945439 msec + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log + + [1660901022.112296][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660901022.112389][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660901022.112474][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] + + Verify Manual pairing code on DUT_CR1(chip-tool) Log + + [1635871373.781269][4322:4328] CHIP:DMG: ICR moving to [CommandSen] [1635871373.781329][4322:4328] CHIP:CTL: Manual pairing code: [35256543344] [1635871373.781482][4322:4328] CHIP:CTL: SetupQRCode: [MT:00000CQM00CIWV01J10] @@ -302,42 +293,30 @@ tests: - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect using manual code generated by DUT Controller + On TH_CR2 send the below command + 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 - Below is the example when using chip tool as controller (considering 35256543344 as the manual code generated by DUT controller) + (considering 35256543344 as the manual code generated by DUT controller) ./chip-tool pairing code 2 35256543344 --commissioner-name beta - Verify you got below message + Verify whether you got below message in the log of TH_CR2(CHIP-TOOL) Device commissioning completed with success disabled: true - label: "TH_CR3 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 3rd controller using chip-tool , connect using manual code generated by DUT Controller + On TH_CR3 send the below command + Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command with their all-cluster-app and for the second and third commissioners. - Below is the example when using chip tool as controller (considering 35256543344 as the manual code generated by DUT controller) + (considering 35256543344 as the manual code generated by DUT controller) ./chip-tool pairing code 3 35256543344 --commissioner-name gamma - verify you got the following message in the TH log + verify you got the following message in the TH_CR3(chip-tool) log + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout disabled: true - - - label: "" - verification: | - verification step to be updated. - disabled: true - - - label: "" - verification: | - verification step to be updated. - disabled: true - - - label: "" - verification: | - verification step to be updated. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index 963add49c1e061..b5bec5f1454f45 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -40,7 +40,7 @@ tests: - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - 1. Provision the device using DUT_CR1 controller on the raspi. + "1. Provision the TH_CE (all-cluster-app) device using DUT_CR1 (chip-tool ) on the raspi" " disabled: true - label: @@ -48,45 +48,28 @@ tests: commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.C.C01.Tx verification: | - On your 1st controller open commissioning widow using BCM. + On DUT_CR1 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - Verify success response On TH1(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, + Verify the Open commisioning window on the TH_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify success response On DUT_CR1(chip-tool) Log + + [1650278416.249430][11064:11069] CHIP:DMG: [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = [1650278416.249581][11064:11069] CHIP:DMG: { [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), [1650278416.249738][11064:11069] CHIP:DMG: }, [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: @@ -116,13 +99,13 @@ tests: PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect to the accessory + On TH_CR2 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - verify you got the following message in the TH2 (all-clusters-app) log + Verify the below message in the TH_CR2(chip-tool) Log: CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -135,28 +118,20 @@ tests: BCM" PICS: CADMIN.C.C01.Tx verification: | - On your first controller open commissioning widow using BCM. + On DUT_CR1 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + Verify the Open commisioning window on the TH_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + Verify success response On TH1(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, [1650278416.249347][11064:11069] CHIP:DMG: }, [1650278416.249430][11064:11069] CHIP:DMG: [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = @@ -164,72 +139,44 @@ tests: [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), [1650278416.249738][11064:11069] CHIP:DMG: }, [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" PICS: CADMIN.C.C02.Tx verification: | - On your DUT controller revoke commissioning + On DUT_CR1 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 /chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - Verify success response On TH1(all-clusters-app) Log + Verify success response On DUT_CR1(CHIP-TOOL) Log - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, [1650278416.249347][11064:11069] CHIP:DMG: }, [1650278416.249430][11064:11069] CHIP:DMG: [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = [1650278416.249581][11064:11069] CHIP:DMG: { [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log + + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect to the accessory + On TH_CR2 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - verify you got the following message in the TH2(all-clusters-app) log + verify you got the following message in the TH_CR2(CHIP-TOOL) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed @@ -239,28 +186,25 @@ tests: - label: "DUT_CR1 sends command to TH_CE to revoke the commissioning window" PICS: CADMIN.C.C02.Tx verification: | - On your 1st controller revoke commissioning + On DUT_CR1 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 /chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 Verify success response On TH1(all-clusters-app) Log - CHIP:DMG: InvokeResponseMessage = - [1650524034.111241][15422:15427] CHIP:DMG: { - [1650524034.111316][15422:15427] CHIP:DMG: suppressResponse = false, - [1650524034.111383][15422:15427] CHIP:DMG: InvokeResponseIBs = - [1650524034.111464][15422:15427] CHIP:DMG: [ - [1650524034.111531][15422:15427] CHIP:DMG: InvokeResponseIB = - [1650524034.111643][15422:15427] CHIP:DMG: { - [1650524034.111714][15422:15427] CHIP:DMG: CommandStatusIB = - [1650524034.111803][15422:15427] CHIP:DMG: { - [1650524034.111886][15422:15427] CHIP:DMG: CommandPathIB = - [1650524034.111979][15422:15427] CHIP:DMG: { - [1650524034.112072][15422:15427] CHIP:DMG: EndpointId = 0x0, - [1650524034.112167][15422:15427] CHIP:DMG: ClusterId = 0x3c, - [1650524034.112257][15422:15427] CHIP:DMG: CommandId = 0x2, + + Verify the Commissioning window is closed in TH_CE(all-clusters-app) Log + + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 + + Verify cluster-status code 3 On DUT_CR1(CHIP-TOOL) Log + + [1650524034.112345][15422:15427] CHIP:DMG: }, [1650524034.112456][15422:15427] CHIP:DMG: [1650524034.112543][15422:15427] CHIP:DMG: StatusIB = @@ -269,16 +213,6 @@ tests: [1650524034.112825][15422:15427] CHIP:DMG: cluster-status = 0x3, [1650524034.112914][15422:15427] CHIP:DMG: }, [1650524034.113005][15422:15427] CHIP:DMG: - [1650524034.113084][15422:15427] CHIP:DMG: }, - [1650524034.113176][15422:15427] CHIP:DMG: - [1650524034.113245][15422:15427] CHIP:DMG: }, - [1650524034.113328][15422:15427] CHIP:DMG: - [1650524034.113392][15422:15427] CHIP:DMG: ], - [1650524034.113477][15422:15427] CHIP:DMG: - [1650524034.113545][15422:15427] CHIP:DMG: InteractionModelRevision = 1 - [1650524034.113610][15422:15427] CHIP:DMG: }, - [1650524034.113780][15422:15427] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x1 - [1650524034.113892][15422:15427] CHIP:TOO: Error: IM Error 0x00000603: Cluster-specific error: 0x03 disabled: true - label: @@ -286,48 +220,53 @@ tests: Information Clusters NodeLabel mandatory attribute" PICS: BINFO.C.A0005 verification: | - Using 1st controller, write attribute and read attribute to and from TH_CE - - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. - - ./chip-tool basic write node-label te5new 2 0 - - Verify success response On TH1(all-clusters-app) Log - - CHIP:DMG: WriteResponseMessage = - [1649245940.788522][10110:10115] CHIP:DMG: { - [1649245940.788577][10110:10115] CHIP:DMG: AttributeStatusIBs = - [1649245940.788653][10110:10115] CHIP:DMG: [ - [1649245940.788713][10110:10115] CHIP:DMG: AttributeStatusIB = - [1649245940.788787][10110:10115] CHIP:DMG: { - [1649245940.788852][10110:10115] CHIP:DMG: AttributePathIB = - [1649245940.788931][10110:10115] CHIP:DMG: { - [1649245940.789009][10110:10115] CHIP:DMG: Endpoint = 0x0, - [1649245940.789143][10110:10115] CHIP:DMG: Cluster = 0x28, - [1649245940.789228][10110:10115] CHIP:DMG: Attribute = 0x0000_0005, - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - - ./chip-tool basic read node-label 2 0 - - Verify read attribute returns the updated value written On TH1(all-clusters-app) Log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + On DUT_CR1 send the below command + + 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 + + ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta + + Verify Write request on TH_CE(all-clusters-app) Log + + [1660894021.901330][2871:2871] CHIP:EM: Handling via exchange: 9616r, Delegate: 0xaaaada21ffc0 + [1660894021.901426][2871:2871] CHIP:IM: Received Write request + [1660894021.901484][2871:2871] CHIP:DMG: IM WH moving to [Initialized] + [1660894021.901613][2871:2871] CHIP:DMG: WriteRequestMessage = + [1660894021.901676][2871:2871] CHIP:DMG: { + [1660894021.901735][2871:2871] CHIP:DMG: suppressResponse = false, + [1660894021.901802][2871:2871] CHIP:DMG: timedRequest = false, + [1660894021.901864][2871:2871] CHIP:DMG: AttributeDataIBs = + [1660894021.901940][2871:2871] CHIP:DMG: [ + [1660894021.902001][2871:2871] CHIP:DMG: AttributeDataIB = + [1660894021.902071][2871:2871] CHIP:DMG: { + [1660894021.902136][2871:2871] CHIP:DMG: AttributePathIB = + [1660894021.902219][2871:2871] CHIP:DMG: { + [1660894021.902302][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894021.902394][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894021.902488][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894021.902574][2871:2871] CHIP:DMG: } + [1660894021.902827][2871:2871] CHIP:DMG: + [1660894021.902912][2871:2871] CHIP:DMG: Data = "te5new" (6 chars), + [1660894021.902985][2871:2871] CHIP:DMG: }, + + ./chip-tool basic read node-label 2 0 --commissioner-name beta + + Verify read request on TH_CE(all-clusters-app) Log + + + [1660894142.828718][2871:2871] CHIP:EM: Handling via exchange: 62454r, Delegate: 0xaaaada21ffc0 + [1660894142.828834][2871:2871] CHIP:IM: Received Read request + [1660894142.829023][2871:2871] CHIP:DMG: ReadRequestMessage = + [1660894142.829097][2871:2871] CHIP:DMG: { + [1660894142.829153][2871:2871] CHIP:DMG: AttributePathIBs = + [1660894142.829235][2871:2871] CHIP:DMG: [ + [1660894142.829306][2871:2871] CHIP:DMG: AttributePathIB = + [1660894142.829376][2871:2871] CHIP:DMG: { + [1660894142.829449][2871:2871] CHIP:DMG: Endpoint = 0x0, + [1660894142.829532][2871:2871] CHIP:DMG: Cluster = 0x28, + [1660894142.829627][2871:2871] CHIP:DMG: Attribute = 0x0000_0005, + [1660894142.829703][2871:2871] CHIP:DMG: } + [1660894142.829777][2871:2871] CHIP:DMG: disabled: true - label: @@ -336,28 +275,21 @@ tests: BCM" PICS: CADMIN.C.C01.Tx verification: | - On 1st controller open commissioning widow using BCM. + On DUT_CR1 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - Verify success response On TH1(all-clusters-app) Log + Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log + + [1660901022.112296][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp + [1660901022.112389][3045:3045] CHIP:ZCL: Commissioning window is now open + [1660901022.112474][3045:3045] CHIP:DMG: Command handler moving to [ Preparing] + + Verify Manual pairing code on DUT_CR1(chip-tool) Log + - CHIP:DMG: InvokeResponseMessage = - [1650278416.248379][11064:11069] CHIP:DMG: { - [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, - [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = - [1650278416.248570][11064:11069] CHIP:DMG: [ - [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = - [1650278416.248718][11064:11069] CHIP:DMG: { - [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = - [1650278416.248860][11064:11069] CHIP:DMG: { - [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = - [1650278416.249011][11064:11069] CHIP:DMG: { - [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, - [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, [1650278416.249347][11064:11069] CHIP:DMG: }, [1650278416.249430][11064:11069] CHIP:DMG: [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = @@ -365,41 +297,32 @@ tests: [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), [1650278416.249738][11064:11069] CHIP:DMG: }, [1650278416.249823][11064:11069] CHIP:DMG: - [1650278416.249889][11064:11069] CHIP:DMG: }, - [1650278416.249969][11064:11069] CHIP:DMG: - [1650278416.250035][11064:11069] CHIP:DMG: }, - [1650278416.250113][11064:11069] CHIP:DMG: - [1650278416.250169][11064:11069] CHIP:DMG: ], - [1650278416.250241][11064:11069] CHIP:DMG: - [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 - [1650278416.250355][11064:11069] CHIP:DMG: }, - [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: "TH_CR2 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 2nd controller using chip-tool , connect to the accessory + On TH_CR2 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta - Verify you got below message on TH2(all-clusters-app) log + Verify whether you got below message in the log of TH_CR2(CHIP-TOOL) Device commissioning completed with success disabled: true - label: "TH_CR3 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | - On the 3rd controller using chip-tool , connect to the accessory + On TH_CR3 send the below command - Below are the example command using chip-tool with single RPI. Vendor should have the provision to use the equivalent command with their DUT and for the second and third commissioners. + 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 ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma - verify you got the following message in the TH3(all-clusters-app) log + verify you got the following message in the TH_CR3(all-clusters-app) log + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index f14af7b4d5c81e..1cc684a78110d2 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -14,6 +14,9 @@ name: 25.1.1. [TC-CC-1.1] Global attributes with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index 5ec62e14fd1454..a629614f4b3795 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -14,6 +14,9 @@ name: 25.3.2. [TC-CC-3.2] Hue Move functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml index f34c9bf733dc81..c3e2ad14f2714e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -14,6 +14,9 @@ name: 25.3.3. [TC-CC-3.3] Hue Step functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index 861d16be0b72aa..2f4fe4a27f5e9b 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -14,6 +14,9 @@ name: 25.3.5. [TC-CC-4.1] Saturation MoveTo functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml index 4f275574c0f43f..f338768af6aa88 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -14,6 +14,9 @@ name: 25.3.6. [TC-CC-4.2] Saturation Move functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index e7b72f1ef8184b..f66cfa2afa84bc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -14,6 +14,9 @@ name: 25.3.7. [TC-CC-4.3] Saturation Step functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml index f855351c446655..5de1f4e59a1f19 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -15,6 +15,9 @@ name: 25.3.8. [TC-CC-4.4] MoveToHueAndSaturation functionality with server as DUT +PICS: + - CC.S + config: nodeId: 0x12344321 cluster: "Color Control" diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml index 3598f9811bc510..1660f93e10be43 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_2_2.yaml @@ -30,7 +30,7 @@ tests: numTrustedRootsOriginal" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TH reads TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658482014.176273][26852:26857] CHIP:DMG: } [1658482014.176359][26852:26857] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687668 @@ -45,7 +45,7 @@ tests: PICS: CGEN.S.A0001 verification: | ./chip-tool generalcommissioning read basic-commissioning-info 1 0 - On TH1 verify that TH reads BasicCommissioningInfo attribute from DUT + On TH1 verify the BasicCommissioningInfo attribute from DUT [1658482413.950617][27013:27018] CHIP:DMG: } [1658482413.950753][27013:27018] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0001 DataVersion: 2195123768 @@ -63,7 +63,7 @@ tests: PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx verification: | ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658482454.092676][27036:27041] CHIP:DMG: }, [1658482454.092739][27036:27041] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 @@ -81,7 +81,7 @@ tests: verification: | ./chip-tool generalcommissioning read breadcrumb 1 0 - On TH1 Verify that the breadcrumb attribute value + On TH1 Verify the breadcrumb attribute value [1658482504.991161][27058:27064] CHIP:DMG: } [1658482504.991205][27058:27064] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2195123769 [1658482504.991215][27058:27064] CHIP:TOO: Breadcrumb: 1 @@ -121,7 +121,7 @@ tests: Operational Credentials cluster" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658482718.809139][27144:27149] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687668 [1658482718.809271][27144:27149] CHIP:TOO: TrustedRootCertificates: 2 entries [1658482718.809327][27144:27149] CHIP:TOO: [1]: 1530010100240201370324140018260480228127260580254D3A370624140018240701240801300941045B7F0549925832A9A1294607ADC4695EA3477D3DC9E584431F53A60FC57629C6A616814389C479D3E059D931600F62CA328087462582A350AD015B32756DDC69370A3501290118240260300414A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF3300514A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF318300B40E878725378AEA74A5F6CB6267CB9F7ACD0DACF26741FB24356379D850DD5F23A746281C845FD76D89E97AB188E9BF8A98047B43E3E868A5A8B8E50BAE62F116F18 @@ -134,7 +134,7 @@ tests: "TH1 waits for PIXIT.CGEN.FailsafeExpiryLengthSeconds to ensure the failsafe timer has expired" verification: | - The expiry length is mentioned in above step as 900 secs so wait till 60secs and proced for next step + The expiry length is mentioned in above step as 900 secs so wait till 900secs and proced for next step disabled: true - label: @@ -142,7 +142,7 @@ tests: Operational Credentials cluster" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658483361.121153][27343:27348] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687668 [1658483361.121212][27343:27348] CHIP:TOO: TrustedRootCertificates: 1 entries [1658483361.121257][27343:27348] CHIP:TOO: [1]: 1530010100240201370324140018260480228127260580254D3A370624140018240701240801300941045B7F0549925832A9A1294607ADC4695EA3477D3DC9E584431F53A60FC57629C6A616814389C479D3E059D931600F62CA328087462582A350AD015B32756DDC69370A3501290118240260300414A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF3300514A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF318300B40E878725378AEA74A5F6CB6267CB9F7ACD0DACF26741FB24356379D850DD5F23A746281C845FD76D89E97AB188E9BF8A98047B43E3E868A5A8B8E50BAE62F116F18 @@ -154,7 +154,7 @@ tests: verification: | ./chip-tool generalcommissioning read breadcrumb 1 0 - On TH1 Verify that the breadcrumb attribute value + On TH1 Verify the breadcrumb attribute value [1658483428.627422][27375:27380] CHIP:DMG: } [1658483428.627566][27375:27380] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2195123770 [1658483428.627610][27375:27380] CHIP:TOO: Breadcrumb: 0 @@ -164,6 +164,51 @@ tests: - label: "TH1 repeats steps 3 through 5" verification: | TH1 repeats steps 3 through 5 + + To repeat Step 3 please send below mentioned command + ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 + On TH1 verify that TH reads ArmFailSafe command from DUT + + [1658482454.092676][27036:27041] CHIP:DMG: }, + [1658482454.092739][27036:27041] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 + [1658482454.092777][27036:27041] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 + [1658482454.092821][27036:27041] CHIP:TOO: ArmFailSafeResponse: { + [1658482454.092853][27036:27041] CHIP:TOO: errorCode: 0 + [1658482454.092866][27036:27041] CHIP:TOO: debugText: + [1658482454.092878][27036:27041] CHIP:TOO: } + [1658482454.092910][27036:27041] CHIP:DMG: ICR moving to [AwaitingDe] + [1658482454.092955][27036:27041] CHIP:EM: Sending Standalone Ack for MessageCounter:147679912 on exchange 8754i + + To repeat Step 4 please send below mentioned command + ./chip-tool generalcommissioning read breadcrumb 1 0 + + On TH1 Verify that the breadcrumb attribute value + [1658482504.991161][27058:27064] CHIP:DMG: } + [1658482504.991205][27058:27064] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2195123769 + [1658482504.991215][27058:27064] CHIP:TOO: Breadcrumb: 1 + [1658482504.991243][27058:27064] CHIP:EM: Sending Standalone Ack for MessageCounter:52534281 on exchange 8370i + + To repeat Step 5 please send below mentioned command + To generate TrustedRootCertificate, need to buld chip-cert in connectedhomeip by giving below mentioned commands + 1. gn gen --check out/debug + 2. ninja -v -C out/debug chip-cert + Once build completes + 3. cd out/debug + 4. ./chip-cert gen-cert --type r --subject-chip-id CACACACA00000001 --valid-from ""2020-10-15 14:23:43"" --lifetime 7305 --out-key Chip-Root-Key.txt --out Chip-Root-Cert.txt --out-format chip-hex + 5. cat Chip-Root-Cert.txt + + While adding new add-trusted-root-certificate please use the above generated new root key + + ./chip-tool operationalcredentials add-trusted-root-certificate hex:1530010828c376ebc17f21512402013703271401000000cacacaca182604ef171b2726056eb5b94c3706271401000000cacacaca182407012408013009410452c19fd9d329a738fd65722a8309fa68bcaa9ffe87d8114b802c922e5066d0b2f0573b89b38bf98fc9c424ab8ffdabcb18d42e623d82a02d0ca0c062ccadb4bc370a350129011824026030041457934de5405e9a40eacb86ee647e583141ae78f430051457934de5405e9a40eacb86ee647e583141ae78f418300b40a0b0d57bddbc7bcf44480a8b7bd0231d54ccacd68d90efb67b7aa3206adbd268725092992a0388c8e934504178613c5b932d422eed7463f38fd82aaa429b574a18 1 0 + + + on TH1, Verify that the DUT responds with SUCCESS + + + [1658482609.069728][27095:27100] CHIP:DMG: InteractionModelRevision = 1 + [1658482609.069733][27095:27100] CHIP:DMG: }, + [1658482609.069760][27095:27100] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003E Command=0x0000_000B Status=0x0 + [1658482609.069779][27095:27100] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: @@ -172,7 +217,7 @@ tests: PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx verification: | ./chip-tool generalcommissioning arm-fail-safe 0 1 1 0 - On TH1 verify that ArmFailSafe command from DUT + On TH1 verify the ArmFailSafeResponse with ErrorCode as "OK"(0) and DebugText argument is of type string with max length 512 or empty from DUT [1658483503.637026][27397:27402] CHIP:DMG: }, [1658483503.637054][27397:27402] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658483503.637074][27397:27402] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -187,6 +232,21 @@ tests: - label: "Repeat steps 8 through 9" verification: | Repeat steps 8 through 9 + To repeat Step 8 please send below mentioned command + ./chip-tool operationalcredentials read trusted-root-certificates 1 0 + On TH1 verify the TrustedRootCertificates entries from DUT + [1658483361.121153][27343:27348] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687668 + [1658483361.121212][27343:27348] CHIP:TOO: TrustedRootCertificates: 1 entries + [1658483361.121257][27343:27348] CHIP:TOO: [1]: 1530010100240201370324140018260480228127260580254D3A370624140018240701240801300941045B7F0549925832A9A1294607ADC4695EA3477D3DC9E584431F53A60FC57629C6A616814389C479D3E059D931600F62CA328087462582A350AD015B32756DDC69370A3501290118240260300414A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF3300514A1BBCB2500D57101023ACB4AFD7EBD4FC0487AF318300B40E878725378AEA74A5F6CB6267CB9F7ACD0DACF26741FB24356379D850DD5F23A746281C845FD76D89E97AB188E9BF8A98047B43E3E868A5A8B8E50BAE62F116F18 + [1658483361.121342][27343:27348] CHIP:EM: Sending Standalone Ack for MessageCounter:8407614 on exchange 22615i + + To repeat Step 9 please send below mentioned command + ./chip-tool generalcommissioning read breadcrumb 1 0 + On TH1 Verify the breadcrumb attribute value + [1658483428.627422][27375:27380] CHIP:DMG: } + [1658483428.627566][27375:27380] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0000 DataVersion: 2195123770 + [1658483428.627610][27375:27380] CHIP:TOO: Breadcrumb: 0 + [1658483428.627696][27375:27380] CHIP:EM: Sending Standalone Ack for MessageCounter:242324966 on exchange 46358i disabled: true - label: @@ -223,8 +283,8 @@ tests: - label: "TH2 opens a PASE session with the DUT" verification: | - ./chip-tool pairing code 1 36116400648 - On TH2 verify that the PASE established successfully + ./chip-tool pairing code 2 36116400648 --commissioner-name beta + while pairing On TH2 verify that the PASE established successfully [1658483765.114083][8082:8087] CHIP:CTL: Stopping commissioning discovery over DNS-SD [1658483765.114107][8082:8087] CHIP:TOO: Pairing Success [1658483765.114130][8082:8087] CHIP:TOO: PASE establishment successful @@ -263,7 +323,7 @@ tests: as nocs" verification: | ./chip-tool operationalcredentials read nocs 1 0 --fabric-filtered 0 - On TH1 verify that TH reads nocs entries from DUT + On TH1 verify the nocs entries from DUT [1658484050.459056][27576:27582] CHIP:DMG: } [1658484050.459316][27576:27582] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 527687672 [1658484050.459362][27576:27582] CHIP:TOO: NOCs: 2 entries @@ -358,7 +418,7 @@ tests: cluster using a non-fabric-filtered read" verification: | ./chip-tool operationalcredentials read nocs 1 0 - On TH1 verify that TH reads nocs entries from DUT + On TH1 verify the nocs entries from DUT [1658484226.587652][27658:27663] CHIP:DMG: } [1658484226.587884][27658:27663] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687672 [1658484226.587936][27658:27663] CHIP:TOO: TrustedRootCertificates: 2 entries @@ -372,7 +432,7 @@ tests: cluster using a non-fabric-filtered read" verification: | ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - On TH1 verify that TH reads fabrics list from DUT + On TH1 verify the fabrics list from DUT [1658484405.562192][27710:27716] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 527687672 [1658484405.562321][27710:27716] CHIP:TOO: Fabrics: 2 entries [1658484405.562395][27710:27716] CHIP:TOO: [1]: { @@ -399,7 +459,7 @@ tests: Operational Credentials cluster" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TH reads TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658484601.144043][28501:28506] CHIP:DMG: InteractionModelRevision = 1 [1658484601.144050][28501:28506] CHIP:DMG: } [1658484601.144213][28501:28506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687672 @@ -414,7 +474,12 @@ tests: - label: "TH2 fully commissions the DUT" verification: | - verification step to be updated. + While pairing between DUT and TH2, On TH2 verify that commissioning completes successfully + [1660748637.271112][21572:21577] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1660748637.271128][21572:21577] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1660748637.271139][21572:21577] CHIP:CTL: Successfully finished commissioning step "SendComplete" + [1660748637.271146][21572:21577] CHIP:CTL: Commissioning stage next step: "SendComplete" -> "Cleanup" + [1660748637.271156][21572:21577] CHIP:CTL: Performing next commissioning step "Cleanup" disabled: true - label: @@ -429,10 +494,10 @@ tests: Once build completes 3. cd out/debug 4. ./chip-cert gen-cert --type r --subject-chip-id CACACACA00000001 --valid-from "2020-10-15 14:23:43" --lifetime 7305 --out-key Chip-Root-Key.txt --out Chip-Root-Cert.txt --out-format chip-hex - 5. cat Chip-Root-Key.txt + 5. cat Chip-Root-Cert.txt - ./chip-tool operationalcredentials add-trusted-root-certificate 04614D01D2897082D7F85832CE00AC787A5A221A6F7B19C4202C069E3D70DDC615E5B9436919266360AC847F2FAB3EAEE3902B43812A13D18C061CC5028EADB775583DCB1008E4CEBFF810EEB2BC60FF7A3CF954C57101798443DA39E75F5FFDEA 2 0 + ./chip-tool operationalcredentials add-trusted-root-certificate 04614D01D2897082D7F85832CE00AC787A5A221A6F7B19C4202C069E3D70DDC615E5B9436919266360AC847F2FAB3EAEE3902B43812A13D18C061CC5028EADB775583DCB1008E4CEBFF810EEB2BC60FF7A3CF954C57101798443DA39E75F5FFDEA 2 0 --commissioner-name beta On TH2 verify that DUT responds with FAILSAFE_REQUIRED [1658484766.785916][8132:8137] CHIP:DMG: [1658484766.785961][8132:8137] CHIP:DMG: InteractionModelRevision = 1 @@ -447,7 +512,7 @@ tests: cluster using a non-fabric-filtered read" verification: | ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - On TH1 verify that TH reads fabrics list from DUT + On TH1 verify the fabrics list from DUT [1658484969.071455][28631:28636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 527687672 [1658484969.071527][28631:28636] CHIP:TOO: NOCs: 2 entries [1658484969.071587][28631:28636] CHIP:TOO: [1]: { @@ -470,7 +535,7 @@ tests: PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx verification: | ./chip-tool generalcommissioning arm-fail-safe 60 1 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658485224.066397][28732:28737] CHIP:DMG: InteractionModelRevision = 1 [1658485224.066407][28732:28737] CHIP:DMG: }, [1658485224.066441][28732:28737] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 @@ -505,7 +570,7 @@ tests: verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TH reads TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658485696.739931][28920:28925] CHIP:DMG: InteractionModelRevision = 1 [1658485696.739936][28920:28925] CHIP:DMG: } [1658485696.740122][28920:28925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687672 @@ -522,7 +587,7 @@ tests: PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx verification: | ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658486181.080260][29218:29223] CHIP:DMG: }, [1658486181.080289][29218:29223] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658486181.080319][29218:29223] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 @@ -558,8 +623,8 @@ tests: value as 1" PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx verification: | - ./chip-tool generalcommissioning arm-fail-safe 900 1 2 0 - On TH2 verify that TH reads ArmFailSafe command from DUT + ./chip-tool generalcommissioning arm-fail-safe 900 1 2 0 --commissioner-name beta + On TH2 verify the ArmFailSafe command from DUT [1658486289.473526][8200:8205] CHIP:DMG: InteractionModelRevision = 1 [1658486289.473563][8200:8205] CHIP:DMG: }, [1658486289.473639][8200:8205] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 @@ -578,7 +643,7 @@ tests: PICS: CGEN.S.C00.Rsp verification: | ./chip-tool generalcommissioning arm-fail-safe 0 1 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658486510.232274][29388:29393] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1658486510.232302][29388:29393] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 [1658486510.232334][29388:29393] CHIP:TOO: ArmFailSafeResponse: { @@ -595,7 +660,7 @@ tests: PICS: CGEN.S.C00.Rsp verification: | ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658486418.024554][29343:29348] CHIP:DMG: InteractionModelRevision = 1 [1658486418.024559][29343:29348] CHIP:DMG: }, [1658486418.024588][29343:29348] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 @@ -625,7 +690,7 @@ tests: Once build completes 3. cd out/debug 4. ./chip-cert gen-cert --type r --subject-chip-id CACACACA00000001 --valid-from "2020-10-15 14:23:43" --lifetime 7305 --out-key Chip-Root-Key.txt --out Chip-Root-Cert.txt --out-format chip-hex - 5. cat Chip-Root-Key.txt + 5. cat Chip-Root-Cert.txt @@ -643,7 +708,7 @@ tests: Operational Credentials cluster" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TH reads TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658487613.357548][30232:30237] CHIP:DMG: } [1658487613.358000][30232:30237] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687672 @@ -669,7 +734,7 @@ tests: PICS: CGEN.S.C00.Rsp verification: | ./chip-tool generalcommissioning arm-fail-safe 900 0 1 0 - On TH1 verify that TH reads ArmFailSafe command from DUT + On TH1 verify the ArmFailSafe command from DUT [1658487663.593485][30268:30273] CHIP:DMG: InteractionModelRevision = 1 [1658487663.593506][30268:30273] CHIP:DMG: }, @@ -697,7 +762,7 @@ tests: Operational Credentials cluster" verification: | ./chip-tool operationalcredentials read trusted-root-certificates 1 0 - On TH1 verify that TH reads TrustedRootCertificates entries from DUT + On TH1 verify the TrustedRootCertificates entries from DUT [1658489869.278413][31188:31193] CHIP:DMG: } [1658489869.278997][31188:31193] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 527687672 [1658489869.279090][31188:31193] CHIP:TOO: TrustedRootCertificates: 2 entries diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml index 0d282af563100f..63861455bce4fd 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml @@ -26,6 +26,23 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT on Thread setup" + verification: | + verification step to be updated. + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + verification step to be updated. + disabled: true + + - label: "The FeatureMap attribute value is 2" + verification: | + verification step to be updated. + disabled: true + - label: "During the commissioning process, TH and DUT, TH sends ArmFailSafe command to the DUT" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml index ee7443197417c5..68bbd8f20f9910 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml @@ -26,6 +26,73 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + ./chip-tool descriptor read server-list 1 0 + + Verify the "server-list" on the TH(Chip-tool) log + + [1653474860.462391][29901:29906] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1237231415 + [1653474860.462487][29901:29906] CHIP:TOO: server list: 25 entries + [1653474860.462524][29901:29906] CHIP:TOO: [1]: 3 + [1653474860.462549][29901:29906] CHIP:TOO: [2]: 4 + [1653474860.462574][29901:29906] CHIP:TOO: [3]: 29 + [1653474860.462598][29901:29906] CHIP:TOO: [4]: 30 + [1653474860.462622][29901:29906] CHIP:TOO: [5]: 31 + [1653474860.462646][29901:29906] CHIP:TOO: [6]: 40 + [1653474860.462670][29901:29906] CHIP:TOO: [7]: 42 + [1653474860.462693][29901:29906] CHIP:TOO: [8]: 43 + [1653474860.462717][29901:29906] CHIP:TOO: [9]: 44 + [1653474860.462741][29901:29906] CHIP:TOO: [10]: 45 + [1653474860.462765][29901:29906] CHIP:TOO: [11]: 46 + [1653474860.462788][29901:29906] CHIP:TOO: [12]: 48 + [1653474860.462812][29901:29906] CHIP:TOO: [13]: 49 + [1653474860.462836][29901:29906] CHIP:TOO: [14]: 50 + [1653474860.462859][29901:29906] CHIP:TOO: [15]: 51 + [1653474860.462883][29901:29906] CHIP:TOO: [16]: 52 + [1653474860.462906][29901:29906] CHIP:TOO: [17]: 53 + [1653474860.462930][29901:29906] CHIP:TOO: [18]: 54 + [1653474860.462954][29901:29906] CHIP:TOO: [19]: 55 + [1653474860.462977][29901:29906] CHIP:TOO: [20]: 60 + [1653474860.463001][29901:29906] CHIP:TOO: [21]: 62 + [1653474860.463024][29901:29906] CHIP:TOO: [22]: 63 + [1653474860.463048][29901:29906] CHIP:TOO: [23]: 64 + [1653474860.463071][29901:29906] CHIP:TOO: [24]: 65 + [1653474860.463095][29901:29906] CHIP:TOO: [25]: 1029 + [1653474860.463296][29901:29906] CHIP:EM: Sending Standalone Ack for MessageCounter:10703464 on exchange 2435i + disabled: true + + - label: "The FeatureMap attribute value is 1" + verification: | + ./chip-tool networkcommissioning read feature-map 1 0 + + Verify the "feature-map" on the TH(Chip-tool) log + + [1653474932.055513][29920:29925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167 + [1653474932.055578][29920:29925] CHIP:TOO: FeatureMap: 1 + [1653474932.055675][29920:29925] CHIP:EM: Sending Standalone Ack for MessageCounter:1494059 on exchange 5482i + disabled: true + + - label: + "MaxNetworks attribute value is at least 4 which is saved as + MaxNetworksValue for future use" + verification: | + The test case is not verifiable. As MaxNetworks value is 1 but expected is 4 + + ./chip-tool networkcommissioning read max-networks 1 0 + + [1653476960.303444][30164:30169] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000 DataVersion: 1600858167 + [1653476960.303531][30164:30169] CHIP:TOO: MaxNetworks: 1 + [1653476960.303641][30164:30169] CHIP:EM: Sending Standalone Ack for MessageCounter:2083922 on exchange 45120i + disabled: true + - label: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 900" @@ -68,8 +135,8 @@ tests: disabled: true - label: - "TH calculates the midpoint of the network list - as floor((MaxNetwor ksValue + 1)/2) and saves as Midpoint" + "TH calculates the midpoint of the network list as floor((MaxNetwor + ksValue + 1)/2) and saves as Midpoint" verification: | The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml index 637f12813fa436..db445de96a72be 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml @@ -26,6 +26,73 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT on Thread setup" + verification: | + + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + ./chip-tool descriptor read server-list 1 0 + + Verify the "server-list" on the TH(Chip-tool) log + + [1653474860.462391][29901:29906] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1237231415 + [1653474860.462487][29901:29906] CHIP:TOO: server list: 25 entries + [1653474860.462524][29901:29906] CHIP:TOO: [1]: 3 + [1653474860.462549][29901:29906] CHIP:TOO: [2]: 4 + [1653474860.462574][29901:29906] CHIP:TOO: [3]: 29 + [1653474860.462598][29901:29906] CHIP:TOO: [4]: 30 + [1653474860.462622][29901:29906] CHIP:TOO: [5]: 31 + [1653474860.462646][29901:29906] CHIP:TOO: [6]: 40 + [1653474860.462670][29901:29906] CHIP:TOO: [7]: 42 + [1653474860.462693][29901:29906] CHIP:TOO: [8]: 43 + [1653474860.462717][29901:29906] CHIP:TOO: [9]: 44 + [1653474860.462741][29901:29906] CHIP:TOO: [10]: 45 + [1653474860.462765][29901:29906] CHIP:TOO: [11]: 46 + [1653474860.462788][29901:29906] CHIP:TOO: [12]: 48 + [1653474860.462812][29901:29906] CHIP:TOO: [13]: 49 + [1653474860.462836][29901:29906] CHIP:TOO: [14]: 50 + [1653474860.462859][29901:29906] CHIP:TOO: [15]: 51 + [1653474860.462883][29901:29906] CHIP:TOO: [16]: 52 + [1653474860.462906][29901:29906] CHIP:TOO: [17]: 53 + [1653474860.462930][29901:29906] CHIP:TOO: [18]: 54 + [1653474860.462954][29901:29906] CHIP:TOO: [19]: 55 + [1653474860.462977][29901:29906] CHIP:TOO: [20]: 60 + [1653474860.463001][29901:29906] CHIP:TOO: [21]: 62 + [1653474860.463024][29901:29906] CHIP:TOO: [22]: 63 + [1653474860.463048][29901:29906] CHIP:TOO: [23]: 64 + [1653474860.463071][29901:29906] CHIP:TOO: [24]: 65 + [1653474860.463095][29901:29906] CHIP:TOO: [25]: 1029 + [1653474860.463296][29901:29906] CHIP:EM: Sending Standalone Ack for MessageCounter:10703464 on exchange 2435i + disabled: true + + - label: "The FeatureMap attribute value is 2" + verification: | + ./chip-tool networkcommissioning read feature-map 1 0 + + Verify the "feature-map" on the TH(Chip-tool) log + + [1653474932.055513][29920:29925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167 + [1653474932.055578][29920:29925] CHIP:TOO: FeatureMap: 1 + [1653474932.055675][29920:29925] CHIP:EM: Sending Standalone Ack for MessageCounter:1494059 on exchange 5482i + disabled: true + + - label: + "MaxNetworks attribute value is at least 4 which is saved as + MaxNetworksValue for future use" + verification: | + The test case is not verifiable. As MaxNetworks value is 1 but expected is 4 + + ./chip-tool networkcommissioning read max-networks 1 0 + + [1653476960.303444][30164:30169] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000 DataVersion: 1600858167 + [1653476960.303531][30164:30169] CHIP:TOO: MaxNetworks: 1 + [1653476960.303641][30164:30169] CHIP:EM: Sending Standalone Ack for MessageCounter:2083922 on exchange 45120i + disabled: true + - label: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 900" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml index 3519c474b73ec3..4c97f68359c397 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml @@ -26,6 +26,35 @@ config: endpoint: 0 tests: + - label: "Factory Reset the DUT" + verification: | + verification step to be updated. + disabled: true + + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + verification step to be updated. + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + verification step to be updated. + disabled: true + + - label: "The FeatureMap attribute value is 1" + verification: | + verification step to be updated. + disabled: true + + - label: + "MaxNetworks attribute value is at least 1 which is saved as + MaxNetworksValue for future use" + verification: | + verification step to be updated. + disabled: true + - label: "TH sends ArmFailSafe command to the DUT with the ExpiryLengthSeco nds field set to 900" @@ -48,7 +77,7 @@ tests: "TH sends RemoveNetwork Command to the DUT with NetworkID field set to PIXIT.CNET.WIFI_ 2ND_ACCESSPOIN T_SSID, which does not match the provisioned network, and Breadcrumb field set to 1" - PICS: CNET.S.C06.Rsp && CNET.S.C07.Tx + PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx verification: | ./chip-tool networkcommissioning remove-network hex: 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml index 7963d5e3a75fca..c8de75528e18e3 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml @@ -26,6 +26,35 @@ config: endpoint: 0 tests: + - label: "Factory Reset the DUT" + verification: | + verification step to be updated. + disabled: true + + - label: "Commission TH and DUT to setup the Thread" + verification: | + verification step to be updated. + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + verification step to be updated. + disabled: true + + - label: "The FeatureMap attribute value is 2" + verification: | + verification step to be updated. + disabled: true + + - label: + "MaxNetworks attribute value is at least 1 which is saved as + MaxNetworksValue for future use" + verification: | + verification step to be updated. + disabled: true + - label: "TH sends ArmFailSafe command to the DUT" verification: | ./chip-tool generalcommissioning arm-fail-safe 900 0 54 0 diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml index 5e70a7db0f11b4..ea25d1506d0157 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml @@ -31,6 +31,11 @@ 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: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + verification step to be updated. + disabled: true + - label: "DUT reads the MaxNetworks attribute from the TH" PICS: CNET.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml index b21221f902dba5..e43c2b5422c02b 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml @@ -31,6 +31,11 @@ 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: "Commission TH and DUT on Thread setup" + verification: | + verification step to be updated. + disabled: true + - label: "DUT reads the MaxNetworks attribute from the TH" PICS: CNET.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml index 6ccf90ff45fb6a..c6986de08c4b45 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml @@ -31,6 +31,11 @@ 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: "Commission TH and DUT on Ethernet setup" + verification: | + verification step to be updated. + disabled: true + - label: "DUT reads the MaxNetworks attribute from the TH" PICS: CNET.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml index c1bcc524516814..286ad3a2b050a4 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml @@ -30,6 +30,11 @@ 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: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + verification step to be updated. + disabled: true + - label: "DUT sends the ScanNetwork command to the TH" PICS: CNET.C.C00.Tx verification: | @@ -60,7 +65,7 @@ tests: disabled: true - label: "DUT sends the AddOrUpdateWiFiNetwork command to the TH" - PICS: CNET.C.C03.Tx + PICS: CNET.C.C02.Tx verification: | ./chip-tool networkcommissioning add-or-update-wi-fi-network-network hex: 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml index fd1cabf5b3bb18..8bb383b44f2388 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml @@ -31,6 +31,11 @@ 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: "Commission TH and DUT on Thread setup" + verification: | + verification step to be updated. + disabled: true + - label: "DUT sends the ScanNetwork command to the TH" PICS: CNET.C.C00.Tx verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml index 6fa3d6745f312b..0d5946a130707a 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml @@ -26,6 +26,30 @@ config: endpoint: 0 tests: + - label: "DUT supports CNET.S.F01(TH)" + verification: | + verification step to be updated. + disabled: true + + - label: + "DUT has a Network Commissioning cluster on endpoint + PIXIT.CNET.ENDPOINT_THREAD with FeatureMap attribute of 2" + verification: | + verification step to be updated. + disabled: true + + - label: "DUT is commissioned on PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET" + verification: | + verification step to be updated. + disabled: true + + - label: + "TH can communicate with the DUT on + PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET" + verification: | + verification step to be updated. + disabled: true + - label: "TH sends ScanNetworks command to the DUT with the SSID field omitted and the Breadcrumb field set to 1" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml index 8fa6d52855988d..ae7d031e7e0eaa 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml @@ -26,6 +26,60 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) in present in the ServerList + attribute" + verification: | + ./chip-tool descriptor read server-list 1 0 + + Verify tthe "descriptor" on the TH(Chip-tool) Log: + + [1653474860.462391][29901:29906] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1237231415 + [1653474860.462487][29901:29906] CHIP:TOO: server list: 25 entries + [1653474860.462524][29901:29906] CHIP:TOO: [1]: 3 + [1653474860.462549][29901:29906] CHIP:TOO: [2]: 4 + [1653474860.462574][29901:29906] CHIP:TOO: [3]: 29 + [1653474860.462598][29901:29906] CHIP:TOO: [4]: 30 + [1653474860.462622][29901:29906] CHIP:TOO: [5]: 31 + [1653474860.462646][29901:29906] CHIP:TOO: [6]: 40 + [1653474860.462670][29901:29906] CHIP:TOO: [7]: 42 + [1653474860.462693][29901:29906] CHIP:TOO: [8]: 43 + [1653474860.462717][29901:29906] CHIP:TOO: [9]: 44 + [1653474860.462741][29901:29906] CHIP:TOO: [10]: 45 + [1653474860.462765][29901:29906] CHIP:TOO: [11]: 46 + [1653474860.462788][29901:29906] CHIP:TOO: [12]: 48 + [1653474860.462812][29901:29906] CHIP:TOO: [13]: 49 + [1653474860.462836][29901:29906] CHIP:TOO: [14]: 50 + [1653474860.462859][29901:29906] CHIP:TOO: [15]: 51 + [1653474860.462883][29901:29906] CHIP:TOO: [16]: 52 + [1653474860.462906][29901:29906] CHIP:TOO: [17]: 53 + [1653474860.462930][29901:29906] CHIP:TOO: [18]: 54 + [1653474860.462954][29901:29906] CHIP:TOO: [19]: 55 + [1653474860.462977][29901:29906] CHIP:TOO: [20]: 60 + [1653474860.463001][29901:29906] CHIP:TOO: [21]: 62 + [1653474860.463024][29901:29906] CHIP:TOO: [22]: 63 + [1653474860.463048][29901:29906] CHIP:TOO: [23]: 64 + [1653474860.463071][29901:29906] CHIP:TOO: [24]: 65 + [1653474860.463095][29901:29906] CHIP:TOO: [25]: 1029 + [1653474860.463296][29901:29906] CHIP:EM: Sending Standalone Ack for MessageCounter:10703464 on exchange 2435i + disabled: true + + - label: "The FeatureMap attribute value is 1" + verification: | + ./chip-tool networkcommissioning read feature-map 1 0 + + Verify the "feature-map" on the TH(Chip-tool) Log: + + [1653474932.055513][29920:29925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167 + [1653474932.055578][29920:29925] CHIP:TOO: FeatureMap: 1 + [1653474932.055675][29920:29925] CHIP:EM: Sending Standalone Ack for MessageCounter:1494059 on exchange 5482i + disabled: true + - label: "TH sends ScanNetworks command to the DUT with the SSID field set to null and Breadcrumb field set to 1" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml index 8de8180dd2332c..5ca63fec18f1fc 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml @@ -26,6 +26,29 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + verification step to be updated. + disabled: true + + - label: "The FeatureMap attribute value is 1" + verification: | + "./chip-tool networkcommissioning read feature-map 1 0 + + Verify the "feature-map" on the TH(Chip-tool) Log: + + [1653474932.055513][29920:29925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167 + [1653474932.055578][29920:29925] CHIP:TOO: FeatureMap: 1 + [1653474932.055675][29920:29925] CHIP:EM: Sending Standalone Ack for MessageCounter:1494059 on exchange 5482i" + disabled: true + - label: "TH sends the AddOrUpdateWiFiNetwork command to the DUT with the following argument: SSID argument value as Userwifi_ssid Credentials diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml index 0f38ac33930338..5a5a0d81c960d6 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml @@ -26,6 +26,23 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT on Thread setup" + verification: | + verification step to be updated. + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + verification step to be updated. + disabled: true + + - label: "The FeatureMap attribute value is 2" + verification: | + verification step to be updated. + disabled: true + - label: "TH sends the AddOrUpdateThreadNetwork command to the DUT with the following argument: OperationalDataset argument value as Userth_op @@ -36,7 +53,7 @@ tests: Below is an example: - ./chip-tool networkcommissioning add-or-update-thread-network hex:1232034768527434274 51 0 + ./chip-tool networkcommissioning add-or-update-thread-network hex:1011101122222229 51 0 Verify "FAILSAFE_REQUIRED status code" on the TH(Chip-tool) Log: @@ -54,7 +71,7 @@ tests: Below is an example: - /chip-tool networkcommissioning remove-network hex:1232034768527434274 51 0 + ./chip-tool networkcommissioning remove-network hex:1011101122222229 51 0 Verify "FAILSAFE_REQUIRED status code" on the TH(Chip-tool) Log: @@ -72,7 +89,7 @@ tests: Below is an example: - ./chip-tool networkcommissioning connect-network hex:1232034768527434274 51 0 + ./chip-tool networkcommissioning connect-network hex:1011101122222229 51 0 Verify "FAILSAFE_REQUIRED status code" on the TH(chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index 8bbc9c3b5801fe..4a1dfefa8cd73e 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -26,6 +26,88 @@ config: endpoint: 0 tests: + - label: "Commission TH and DUT over BLE to setup the Wi-Fi" + verification: | + + disabled: true + + - label: + "The cluster Identifier 49 (0x0031) is present in the ServerList + attribute" + verification: | + ./chip-tool descriptor read server-list 1 0 + + Verify the "descriptor" on the TH(Chip-tool) log + + [1653474860.462391][29901:29906] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1237231415 + [1653474860.462487][29901:29906] CHIP:TOO: server list: 25 entries + [1653474860.462524][29901:29906] CHIP:TOO: [1]: 3 + [1653474860.462549][29901:29906] CHIP:TOO: [2]: 4 + [1653474860.462574][29901:29906] CHIP:TOO: [3]: 29 + [1653474860.462598][29901:29906] CHIP:TOO: [4]: 30 + [1653474860.462622][29901:29906] CHIP:TOO: [5]: 31 + [1653474860.462646][29901:29906] CHIP:TOO: [6]: 40 + [1653474860.462670][29901:29906] CHIP:TOO: [7]: 42 + [1653474860.462693][29901:29906] CHIP:TOO: [8]: 43 + [1653474860.462717][29901:29906] CHIP:TOO: [9]: 44 + [1653474860.462741][29901:29906] CHIP:TOO: [10]: 45 + [1653474860.462765][29901:29906] CHIP:TOO: [11]: 46 + [1653474860.462788][29901:29906] CHIP:TOO: [12]: 48 + [1653474860.462812][29901:29906] CHIP:TOO: [13]: 49 + [1653474860.462836][29901:29906] CHIP:TOO: [14]: 50 + [1653474860.462859][29901:29906] CHIP:TOO: [15]: 51 + [1653474860.462883][29901:29906] CHIP:TOO: [16]: 52 + [1653474860.462906][29901:29906] CHIP:TOO: [17]: 53 + [1653474860.462930][29901:29906] CHIP:TOO: [18]: 54 + [1653474860.462954][29901:29906] CHIP:TOO: [19]: 55 + [1653474860.462977][29901:29906] CHIP:TOO: [20]: 60 + [1653474860.463001][29901:29906] CHIP:TOO: [21]: 62 + [1653474860.463024][29901:29906] CHIP:TOO: [22]: 63 + [1653474860.463048][29901:29906] CHIP:TOO: [23]: 64 + [1653474860.463071][29901:29906] CHIP:TOO: [24]: 65 + [1653474860.463095][29901:29906] CHIP:TOO: [25]: 1029 + [1653474860.463296][29901:29906] CHIP:EM: Sending Standalone Ack for MessageCounter:10703464 on exchange 2435i + disabled: true + + - label: "The FeatureMap attribute value is 1" + verification: | + ./chip-tool networkcommissioning read feature-map 1 0 + + Verify the "feature-map" on the TH(Chip-tool) log + + [1653474932.055513][29920:29925] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167 + [1653474932.055578][29920:29925] CHIP:TOO: FeatureMap: 1 + [1653474932.055675][29920:29925] CHIP:EM: Sending Standalone Ack for MessageCounter:1494059 on exchange 5482i + disabled: true + + - label: "The Networks attribute value is 1 entries" + verification: | + ./chip-tool networkcommissioning read networks 1 0 + + Verify the "networks" on the TH(Chip-tool) log + + [1653478044.910989][30351:30356] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 1600858167 + [1653478044.911109][30351:30356] CHIP:TOO: Networks: 1 entries + [1653478044.911192][30351:30356] CHIP:TOO: [1]: { + [1653478044.911238][30351:30356] CHIP:TOO: NetworkID: 47524C50726976617465 + [1653478044.911280][30351:30356] CHIP:TOO: Connected: FALSE + [1653478044.911322][30351:30356] CHIP:TOO: } + [1653478044.911474][30351:30356] CHIP:EM: Sending Standalone Ack for MessageCounter:3575760 on exchange 51774i + disabled: true + + - label: + "MaxNetworks attribute value is at least 1 which is saved as + MaxNetworksValue for future use" + verification: | + ./chip-tool networkcommissioning read max-networks 1 0 + + Verify the "max-networks" on the TH(Chip-tool) log + + [1653476960.303444][30164:30169] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000 DataVersion: 1600858167 + [1653476960.303531][30164:30169] CHIP:TOO: MaxNetworks: 1 + [1653476960.303641][30164:30169] CHIP:EM: Sending Standalone Ack for MessageCounter:2083922 on exchange 45120i + disabled: true + - label: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 900" @@ -181,6 +263,8 @@ tests: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 0" verification: | + Mark as not applicable and proceed to next step + ./chip-tool generalcommissioning arm-fail-safe 0 0 1 0 Verify "ArmFailSafeResponse" on the TH(Chip-tool) Log: @@ -196,6 +280,8 @@ tests: - label: "TH reads Networks attribute from the DUT" PICS: CNET.S.A0001 verification: | + Mark as not applicable and proceed to next step + ./chip-tool networkcommissioning read networks 1 0 Verify "Networks entiries and its status" on the TH(Chip-tool) Log: @@ -208,6 +294,8 @@ tests: "TH sends ArmFailSafe command to the DUT with ExpiryLengthSeco nds set to 90" verification: | + Mark as not applicable and proceed to next step + ./chip-tool generalcommissioning arm-fail-safe 90 1 1 0 Verify "ArmFailSafeResponse" on the TH(Chip-tool) Log: @@ -225,6 +313,8 @@ tests: PIXIT.CNET.WIFI_ 1ST_ACCESSPOINT _SSID and Breadcrumb field set to 1" PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx verification: | + Mark as not applicable and proceed to next step + ./chip-tool networkcommissioning remove-network hex: 1 0 Below is an example: diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml index 914a15ac8d93f5..a4606fa7781765 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml @@ -49,11 +49,20 @@ tests: - label: "DUT generates 32-byte AttestationNonce" verification: | - To generate the Attestation Nonce give below command - - echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) - - The generated Attestation Nonce is hex:F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F834 + DUT generates 32-byte AttestationNonce on TH(all-clusters-app) log + + [1660832898.375011][2480:2485] CHIP:DMG: } + [1660832898.375071][2480:2485] CHIP:DMG: Device Type Id = 22 + [1660832898.375136][2480:2485] CHIP:DMG: Certificate Id (19) = ZIG20142ZB330003-24 + [1660832898.375198][2480:2485] CHIP:DMG: Security Level = 0 + [1660832898.375257][2480:2485] CHIP:DMG: Security Information = 0 + [1660832898.375315][2480:2485] CHIP:DMG: Version Number = 9876 + [1660832898.375374][2480:2485] CHIP:DMG: Certification Type = 0 + [1660832898.375431][2480:2485] CHIP:DMG: } + [1660832898.375496][2480:2485] CHIP:DMG: Attestation Nonce (32) = 79C7156A8580C653945226CD5B5994EF4EC3D79CEAE6D32325CA2EA24B5201CB + [1660832898.375552][2480:2485] CHIP:DMG: Timestamp = 0 + [1660832898.375605][2480:2485] CHIP:DMG: } + [1660832898.375655][2480:2485] CHIP:DMG: disabled: true - label: @@ -62,16 +71,16 @@ tests: verification: | DUT sends AttestationRequest Command with AttestationNonce as field to the TH1, verify attestation response is received on TH(all-clusters-app) log - ./chip-tool operationalcredentials attestation-request hex:F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F834 1 0 + ./chip-tool operationalcredentials attestation-request hex:79C7156A8580C653945226CD5B5994EF4EC3D79CEAE6D32325CA2EA24B5201CB 1 0 - [1659514429.238042][3458:3464] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 - [1659514429.238161][3458:3464] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001 - [1659514429.238282][3458:3464] CHIP:TOO: AttestationResponse: { - [1659514429.238447][3458:3464] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794 - [1659514429.238593][3458:3464] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C300220F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F83424030018 - [1659514429.238672][3458:3464] CHIP:TOO: signature: 1644376FEC5DE29C92AD9CDF43E0051EA2C46DA93429BEEADDA5C7B74A6EF8ACFB47D8AAD77EBEEDEEFE987639ECCA596E1BBDBD39BF0ED5EE7BACAA7A899CA0 - [1659514429.238756][3458:3464] CHIP:TOO: } + Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 + [1660833399.901252][2506:2511] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001 + [1660833399.901498][2506:2511] CHIP:TOO: AttestationResponse: { + [1660833399.901607][2506:2511] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794 + [1660833399.901733][2506:2511] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C30022079C7156A8580C653945226CD5B5994EF4EC3D79CEAE6D32325CA2EA24B5201CB24030018 + [1660833399.901816][2506:2511] CHIP:TOO: signature: 920E22FE88765058D28A248636828BDBD612D24FFA4B27A06FFFB5D76061E0D0EE7FBCED7030026624A012B32F11596FB87CE147323B13F55A3654F27ED59FB3 + [1660833399.901881][2506:2511] CHIP:TOO: } disabled: true - label: @@ -79,7 +88,7 @@ tests: by setting the following error condition: Commissionee is not yet certified" verification: | - To Execute ths step follow the following + To Execute this step follow the following 1. To generate the CD use the below command ./out/debug/chip-cert gen-cd -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out dec_message.txt -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 @@ -113,12 +122,7 @@ tests: [1658320787.292739][4152:4157] CHIP:CTL: Expiring failsafe on proxy 0xffff7c000b60 disabled: true - - label: - "Verify that DUT notifies a warning stating that Commissionee is not a - fully trusted device,Verify that the warning contains the information - about the reason for error condition,If the warning message indicates - that Commissioning is allowed then confirm that CSRRequest Command is - sent from DUT to TH1" + - label: "" PICS: MCORE.DA.ATTEST_WARNING verification: | ------>sudo ./chip-all-clusters-app --dac_provide /dec_message.json @@ -166,13 +170,10 @@ tests: 1. To generate the CD use the below command ./out/debug/chip-cert gen-cd -C credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Cert.pem -K credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Key.pem --out dec_message_3 -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 - - 2. Use the below command to see the generated CD xxd -p -c 1024 dec_message_3 3082021806092a864886f70d010702a082020930820205020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317c307a02010380146f4b2077c703a3d97e2c7d0f7c309c9db12abbb3300b0609608648016503040201300a06082a8648ce3d04030204463044022065ce44afabe7ad98eba7f382825be984fd4da28a5b00904acaf9f904e12bfd93022037b92fc4343578c5305d0ef0fb85dd2105f8b665bfe97687e24834d7a27c5096 - 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app 4. Commission TH to DUT using the above generated CD by using dac_provider parameter @@ -187,8 +188,6 @@ tests: [1658320256.356675][4486:4486] CHIP:IN: SecureSession[0xaaaaf9556b00]: Released - Type:1 LSID:62352 [1658320256.356758][4486:4486] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:71: CHIP Error 0x00000032: Timeout - - --->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1 [1658320256.309769][4098:4103] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" @@ -202,6 +201,80 @@ tests: [1658320256.315610][4098:4103] CHIP:CTL: Expiring failsafe on proxy 0xffff6c000b60 [1658320256.315707][4098:4103] CHIP:DMG: ICR moving to [AddingComm] [1658320256.315748][4098:4103] CHIP:DMG: ICR moving to [AddedComma] + + + Similarly for condition 2 follow below steps + + 1. To generate the CD use the below command + ./out/debug/chip-cert gen-cd -E vid-mismatch -C credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Cert.der -K credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Key.der --out dec_message_6.txt -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 + + 2. Use the below command to see the generated CD + xxd -p -c 1024 dec_message_6.txt + 3082021906092a864886f70d010702a082020a30820206020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317d307b02010380146f4b2077c703a3d97e2c7d0f7c309c9db12abbb3300b0609608648016503040201300a06082a8648ce3d040302044730450221009bc4c8759ff98a68fb1b42f2d7b2300a856f7830982a4876ff54855dcc25e773022060c17079368bc8e33171c52d9c73a09d690614c28303c119d1bdc1f9b4be869e + + 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app + + 4. Commission TH to DUT using the above generated CD by using dac_provider parameter + + sudo rm -rf /tmp/chip_* + ./all-cluster-app --wifi --dac_provider /dec_3.json + + [1660836160.681814][4884:4884] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 + [1660836160.681873][4884:4884] CHIP:SVR: Failsafe timer expired + [1660836160.681923][4884:4884] CHIP:IN: SecureSession[0xaaaad5440e10]: MarkForEviction Type:1 LSID:22448 + [1660836160.681975][4884:4884] CHIP:SC: SecureSession[0xaaaad5440e10]: Moving from state "kActive" --> "kPendingEviction" + [1660836160.682126][4884:4884] CHIP:IN: SecureSession[0xaaaad5440e10]: Released - Type:1 LSID:22448 + [1660836160.682202][4884:4884] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:73: CHIP Error 0x00000032: Timeout + + + + --->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1 + + [1660836160.627772][2653:2658] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1660836160.627826][2653:2658] CHIP:CTL: Verifying attestation + [1660836160.686379][2653:2658] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors + [1660836160.686579][2653:2658] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660836160.686648][2653:2658] CHIP:CTL: Failed to perform commissioning step 8 + [1660836160.686714][2653:2658] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1660836160.686806][2653:2658] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660836160.686869][2653:2658] CHIP:CTL: Expiring failsafe on proxy 0xffffa4032330 + + + + Similarly for condition 3 follow below steps + + 1. To generate the CD use the below command + ./out/debug/chip-cert gen-att-cert --type a --subject-cn "Matter Development PAA 01" --valid-from "2020-10-15 14:23:43" --lifetime 7305 --out-key Chip-PAA-Key.pem --out Chip-PAA-Cert.pem + + 2. Use the below command to see the generated CD + xxd -p -c 1024 Chip-PAA-Cert.pem + 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d49494270444343415571674177494241674949636769574a6f6e394f653477436759494b6f5a497a6a3045417749774a4445694d434147413155454177775a0a54574630644756794945526c646d5673623342745a57353049464242515341774d544165467730794d4445774d5455784e44497a4e444e61467730304d4445770a4d5455784e44497a4e444a614d435178496a416742674e5642414d4d475531686448526c636942455a585a6c624739776257567564434251515545674d4445770a5754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e4341415461314478507a5873473870372f6d755231686f5631783042797072516a0a58672b77536e742b5a6c45542b78424745373252624b4c6c474f2f54694d427776354972633534664d316e697067483546435078536258736f3259775a4441530a42674e5648524d4241663845434441474151482f416745424d41344741315564447745422f77514541774942426a416442674e564851344546675155307551580a4a6b4c73533667487174717875384a6e5a69487946343077487759445652306a42426777466f4155307551584a6b4c73533667487174717875384a6e5a6948790a46343077436759494b6f5a497a6a30454177494453414177525149674a703546485a545739617958334e575777774870543933677434614f7679424c555937500a74423875397038434951446c4e38375755324c6b6c68313339377a63517942565351345833634e6d4d426f336b5a4853584f475843673d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0 + + 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app + + 4. Commission TH to DUT using the above generated CD by using dac_provider parameter + + sudo rm -rf /tmp/chip_* + ./all-cluster-app --wifi --dac_provider /dec_7.json + + [1660894197.335249][5005:5005] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 + [1660894197.335308][5005:5005] CHIP:SVR: Failsafe timer expired + [1660894197.335357][5005:5005] CHIP:IN: SecureSession[0xaaaae7002e10]: MarkForEviction Type:1 LSID:31514 + [1660894197.335430][5005:5005] CHIP:SC: SecureSession[0xaaaae7002e10]: Moving from state "kActive" --> "kPendingEviction" + [1660894197.335607][5005:5005] CHIP:IN: SecureSession[0xaaaae7002e10]: Released - Type:1 LSID:31514 + [1660894197.335686][5005:5005] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:73: CHIP Error 0x00000032: Timeout + + + --->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1 + + [1660894197.296303][4561:4566] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1660894197.296356][4561:4566] CHIP:CTL: Verifying attestation + [1660894197.350259][4561:4566] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 600. Look at AttestationVerificationResult enum to understand the errors + [1660894197.350444][4561:4566] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660894197.350508][4561:4566] CHIP:CTL: Failed to perform commissioning step 8 + [1660894197.350574][4561:4566] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1660894197.350659][4561:4566] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660894197.350718][4561:4566] CHIP:CTL: Expiring failsafe on proxy 0xffff6c032330 disabled: true - label: @@ -219,8 +292,6 @@ tests: 1. To generate the CD use the below command ./out/debug/chip-cert gen-cd -I -E dac-origin-vid-present -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out cd_vid_present_pid_missing.txt -o 0x8000 -r 0xFFF1 -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 - - 2. Use the below command to see the generated CD xxd -p -c 1024 cd_vid_present_pid_missing.txt 3082010506092a864886f70d010702a081f73081f4020103310d300b0609608648016503040201306106092a864886f70d010701a0540452152000012501f1ff3602050080182403162c04135a494732303134325a423333303030332d32342405002406002507942624080025090080360b10140b44cabbc5016577aa8b44ffb90fcca140fe66201818317d307b020103801462fa823359acfaa9963e1cfa140addf504f37160300b0609608648016503040201300a06082a8648ce3d0403020447304502205adea20956fcdce1213f2878da4a5f4a35907eaafa70efe367edc9cec23eb2f80221009b2482360c8713ccd2738150874f9b811ec2149c3ec1f579357219985ecc765a @@ -232,7 +303,6 @@ tests: sudo rm -rf /tmp/chip_* sudo ./chip-all-clusters-app --dac_provider /cd.json - [1658320561.405436][4521:4521] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 [1658320561.405489][4521:4521] CHIP:SVR: Failsafe timer expired [1658320561.405546][4521:4521] CHIP:IN: SecureSession[0xaaaaec7c9e10]: MarkForEviction Type:1 LSID:27478 @@ -242,7 +312,6 @@ tests: [1658320561.405815][4521:4521] CHIP:IN: Clearing BLE pending packets. - --->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1 [1658320561.366298][4126:4132] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors @@ -252,7 +321,110 @@ tests: [1658320561.366524][4126:4132] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" [1658320561.366554][4126:4132] CHIP:CTL: Expiring failsafe on proxy 0xffff84000b60 - Similary for 2nd error condition follow the below steps - 1. 1. To generate the CD use the below command + Similarly for 2nd error condition follow the below steps + + 1. To generate the CD use the below command + ./out/debug/chip-cert gen-cd -E vid-mismatch -C credentials/development/commissioner_dut/struct_cd_vid_mismatch/dac-Cert.der -K credentials/development/commissioner_dut/struct_cd_vid_mismatch/dac-Key.der --out dec_message_3.txt -f 1 -V FFF5 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 + + + 2. Use the below command to see the generated CD + xxd -p -c 1024 dec_message_3.txt + 3082021906092a864886f70d010702a082020a30820206020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f5ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317d307b02010380140b36c601086c7232d905bd8b1eb2ce75d9aa8eee300b0609608648016503040201300a06082a8648ce3d04030204473045022100afdf19ccdf9ebb227554c11b066d70d648d030cf49c9b16bfbb82f922af325da02201ea59fcb3fb51b99f40283b736486c141f4f136fec63983d72811b5804221d9f + + 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app + + 4. Commission TH to DUT using the above generated CD by using dac_provider parameter + + ./chip-all-clusters-app --dac_provider dec.json + + [1660834197.222084][4765:4765] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 + [1660834197.222142][4765:4765] CHIP:SVR: Failsafe timer expired + [1660834197.222191][4765:4765] CHIP:IN: SecureSession[0xaaaad7a03e10]: MarkForEviction Type:1 LSID:52084 + [1660834197.222242][4765:4765] CHIP:SC: SecureSession[0xaaaad7a03e10]: Moving from state "kActive" --> "kPendingEviction" + [1660834197.222392][4765:4765] CHIP:IN: SecureSession[0xaaaad7a03e10]: Released - Type:1 LSID:52084 + [1660834197.222468][4765:4765] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:73: CHIP Error 0x00000032: Timeout + + ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 --trace_decode 1 + + [1660834197.161864][2546:2551] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1660834197.161918][2546:2551] CHIP:CTL: Verifying attestation + [1660834197.217691][2546:2551] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors + [1660834197.218073][2546:2551] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834197.218139][2546:2551] CHIP:CTL: Failed to perform commissioning step 8 + [1660834197.218207][2546:2551] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1660834197.218295][2546:2551] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834197.218358][2546:2551] CHIP:CTL: Expiring failsafe on proxy 0xffff80032330 + + + Similary for 3rd error condition follow the below steps + + 1. To generate the CD use the below command + ./out/debug/chip-cert gen-cd -E vid-mismatch -C credentials/development/commissioner_dut/struct_cd_vid_mismatch/dac-Cert.der -K credentials/development/commissioner_dut/struct_cd_vid_mismatch/dac-Key.der --out dec_message_3.txt -f 1 -V FFF5 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 + + + 2. Use the below command to see the generated CD + xxd -p -c 1024 dec_message_3.txt + 3082021906092a864886f70d010702a082020a30820206020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f5ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317d307b02010380140b36c601086c7232d905bd8b1eb2ce75d9aa8eee300b0609608648016503040201300a06082a8648ce3d04030204473045022100afdf19ccdf9ebb227554c11b066d70d648d030cf49c9b16bfbb82f922af325da02201ea59fcb3fb51b99f40283b736486c141f4f136fec63983d72811b5804221d9f + + 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app + + 4. Commission TH to DUT using the above generated CD by using dac_provider parameter + + ./chip-all-clusters-app --dac_provider dec.json + + [1660834197.222084][4765:4765] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 + [1660834197.222142][4765:4765] CHIP:SVR: Failsafe timer expired + [1660834197.222191][4765:4765] CHIP:IN: SecureSession[0xaaaad7a03e10]: MarkForEviction Type:1 LSID:52084 + [1660834197.222242][4765:4765] CHIP:SC: SecureSession[0xaaaad7a03e10]: Moving from state "kActive" --> "kPendingEviction" + [1660834197.222392][4765:4765] CHIP:IN: SecureSession[0xaaaad7a03e10]: Released - Type:1 LSID:52084 + [1660834197.222468][4765:4765] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:73: CHIP Error 0x00000032: Timeout + + ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 --trace_decode 1 + + [1660834197.161864][2546:2551] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1660834197.161918][2546:2551] CHIP:CTL: Verifying attestation + [1660834197.217691][2546:2551] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors + [1660834197.218073][2546:2551] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834197.218139][2546:2551] CHIP:CTL: Failed to perform commissioning step 8 + [1660834197.218207][2546:2551] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1660834197.218295][2546:2551] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834197.218358][2546:2551] CHIP:CTL: Expiring failsafe on proxy 0xffff80032330 + + + Similary for 4th error condition follow the below steps + + 1. To generate the CD use the below command + ./out/debug/chip-cert gen-cd -E vid-mismatch -C credentials/development/commissioner_dut/struct_cd_pid_array_missing/dac-Cert.der -K credentials/development/commissioner_dut/struct_cd_pid_array_missing/dac-Key.der --out dec_message_5.txt -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0 + + + 2. Use the below command to see the generated CD + xxd -p -c 1024 dec_message_5.txt + 3082021906092a864886f70d010702a082020a30820206020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317d307b0201038014e84b969e3104277c0a25ec2fd2e014cf6cabbc50300b0609608648016503040201300a06082a8648ce3d04030204473045022005a46eb5d9ba996c44abcad5498a65898a8a7711bc91b25b24949b154949b046022100873aaac936ef14cf795c59629603d6d9ffa193f3e6d13082b47b0d018b21d60f + + 3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app + + 4. Commission TH to DUT using the above generated CD by using dac_provider parameter + + ./chip-all-clusters-app --dac_provider dec_1.json + + [1660834938.999182][4811:4811] CHIP:DL: HandlePlatformSpecificBLEEvent 32782 + [1660834938.999232][4811:4811] CHIP:SVR: Failsafe timer expired + [1660834938.999276][4811:4811] CHIP:IN: SecureSession[0xaaaae51efe10]: MarkForEviction Type:1 LSID:59289 + [1660834938.999321][4811:4811] CHIP:SC: SecureSession[0xaaaae51efe10]: Moving from state "kActive" --> "kPendingEviction" + [1660834938.999452][4811:4811] CHIP:IN: SecureSession[0xaaaae51efe10]: Released - Type:1 LSID:59289 + [1660834938.999519][4811:4811] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:73: CHIP Error 0x00000032: Timeout + + + ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 --trace_decode 1 + + [1660834938.937220][2589:2594] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" + [1660834938.937294][2589:2594] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1660834938.937346][2589:2594] CHIP:CTL: Verifying attestation + [1660834938.995809][2589:2594] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors + [1660834938.996010][2589:2594] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834938.996077][2589:2594] CHIP:CTL: Failed to perform commissioning step 8 + [1660834938.996145][2589:2594] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1660834938.996234][2589:2594] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../src/controller/CHIPDeviceController.cpp:1018: CHIP Error 0x000000AC: Internal error" + [1660834938.996293][2589:2594] CHIP:CTL: Expiring failsafe on proxy 0xffff84032330 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_7.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_7.yaml index 471121b5640352..f0e874045bb00b 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_7.yaml @@ -57,6 +57,31 @@ tests: [1657774756.281289][7964:7969] CHIP:TOO: certificate: 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C [1657774756.281357][7964:7969] CHIP:TOO: ...........: B88FACE529368D12054C0C0220655DC92B86BD909882A6C62177B825D7D05EDBE7C22F9FEA71220E7EA703F891 [1657774756.281388][7964:7969] CHIP:TOO: } + + The log has certificate details (starting with ---BEGIN CERTIFICATE and ending with ---END CERTIFICATE ) as highlighted below , save the certificate in .pem file format. Open editor on your TH , save that in file, example: pai.pem + + [1660952198157] [17290:5268348] CHIP: [DMG] Encrypted Payload (531 bytes) = + [1660952198157] [17290:5268348] CHIP: [DMG] { + [1660952198157] [17290:5268348] CHIP: [DMG] data = 001c39000820730541fea9f0e9b148d6c50bdd30d20acef8a0ee67b0458c5fe377d9793092b83e0670ad46770ce44154de4d131731f7065b8329d08be8a280db77f8c12b48300c5fb009c0d3f4b0b1b0a8f4523e319db11ee5d8eb679325c2982248aa5c75b474c50f3bbb0f617ab06a04df403557a564bac4cf08c56fd2eb951d4be875f290dd7b9da01e558fc85ad7b4922d804029410735cae9910a6df282145059b3228e9349467ddc917a268638fa7882a3f7b278355ec848c2ac3f466d3cca746ca416733b85dc6bd8e99ecd35bfc0d3b85f28db6e897636bec89fc41ee2eba78bc7ca11fe959a913ec37901b30a193e6665672e8159e194ca133831251205bca75c00dd8b10160a5b6b814e0cc4fc52f48cc2b68819212bcf71ba11785d2c4628363718e9943216a3f4a3f28adcb988997af982a48d793cd9bd0b62648aa2ffed8f373cd7d5ca86ae703415016adf45a1e8ee26a62d023a6a09accca619ca28e3db15cd4ee5b850608c8319e166dc540877683d960d4b9fde0ae4042096ce696532e9d6b8c96f030def011e59a8762753fc0d50ecf30842377249f78c9b3ee164f5f7988a777a4a1ca407f40923737480eca5e0181977b6048d8835b3d3cedd0d36b9c39098e49048c31db9b48decd744f3121b0260e07b9afe9a8a71d9c14a230e48a1b56894c0453b9779bc8fe269e072ee842aa17821ee09b83cfab5e852918a37bbc1414b7f62cd5dc4c254bfa4 + [1660952198157] [17290:5268348] CHIP: [DMG] buffer_ptr = 140233457951312 + [1660952198157] [17290:5268348] CHIP: [DMG] } + [1660952198157] [17290:5268348] CHIP: [DMG] + [1660952198157] [17290:5268348] CHIP: [DMG] DAC/PAI (463) = + [1660952198157] [17290:5268348] CHIP: [DMG] { + -----BEGIN CERTIFICATE----- + MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP + TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw + MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ + QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO + PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU + xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E + CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk + YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI + zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl + Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== + -----END CERTIFICATE----- + [1660952198157] [17290:5268348] CHIP: [DMG] } + [1660952198157] [17290:5268348] CHIP: [DMG] disabled: true - label: @@ -77,153 +102,49 @@ tests: [1657774717.722181][7956:7961] CHIP:TOO: certificate: 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302 [1657774717.722269][7956:7961] CHIP:TOO: ...........: 034700304402200127A27B4B44610EE2FCDC4D2B7885563660BC0F76F17219ED6A08DFB2B3C1CD02206B59E0AF45F3EB2A85B919D35731528C6028C415239545E108E4E54E70971353 [1657774717.722297][7956:7961] CHIP:TOO: } - disabled: true - - label: "TH extracts the Authority Key Identifier from the PAI certificate" - verification: | - During commissioning we will get PAI certificate, see on TH(chip-tool) log: - [1659415376.883870][2666:2671] CHIP:CTL: Performing next commissioning step "SendPAICertificateRequest" - [1659415376.883925][2666:2671] CHIP:CTL: Sending request for PAI certificate - [1659415376.884015][2666:2671] CHIP:CTL: Sending Certificate Chain request to 0xffffa0000b60 device - [1659415376.884167][2666:2671] CHIP:DMG: ICR moving to [AddingComm] - [1659415376.884302][2666:2671] CHIP:DMG: ICR moving to [AddedComma] - [1659415376.884867][2666:2671] CHIP:IN: Prepared secure message 0xffffb37ec8d8 to 0xFFFFFFFB00000000 (0) of type 0x8 and protocolId (0, 1) on exchange 61632i with MessageCounter:72933899. - [1659415376.884965][2666:2671] CHIP:IN: Sending encrypted msg 0xffffb37ec8d8 with MessageCounter:72933899 to 0xFFFFFFFB00000000 (0) at monotonic time: 0000000000161D55 msec - [1659415376.885796][2666:2671] CHIP:DMG: >> to BLE | 72933899 | [Interaction Model (1) / InvokeCommandRequest (0x08) / Session = 384 / Exchange = 61632] - [1659415376.885890][2666:2671] CHIP:DMG: Header Flags = - [1659415376.885944][2666:2671] CHIP:DMG: { - [1659415376.886028][2666:2671] CHIP:DMG: Exchange (0x01) = - [1659415376.886081][2666:2671] CHIP:DMG: { - [1659415376.886154][2666:2671] CHIP:DMG: Initiator = true - [1659415376.886206][2666:2671] CHIP:DMG: } - [1659415376.886296][2666:2671] CHIP:DMG: } - [1659415376.886350][2666:2671] CHIP:DMG: - [1659415376.886438][2666:2671] CHIP:DMG: Encrypted Payload (62 bytes) = - [1659415376.886492][2666:2671] CHIP:DMG: { - [1659415376.886542][2666:2671] CHIP:DMG: data = 008001000be258046e751fb56b97dabcc7ee6b6611ede33a66461e188834bb1fe5b6332edb4a3896d32bce2eb59dee722e070c4426af77c82dfca14619bb - [1659415376.886616][2666:2671] CHIP:DMG: buffer_ptr = 281473366182720 - [1659415376.886666][2666:2671] CHIP:DMG: } - [1659415376.886714][2666:2671] CHIP:DMG: - [1659415376.886900][2666:2671] CHIP:DMG: InvokeRequestMessage = - [1659415376.886962][2666:2671] CHIP:DMG: { - [1659415376.887039][2666:2671] CHIP:DMG: suppressResponse = false, - [1659415376.887103][2666:2671] CHIP:DMG: timedRequest = false, - [1659415376.887162][2666:2671] CHIP:DMG: InvokeRequests = - [1659415376.887234][2666:2671] CHIP:DMG: [ - [1659415376.887312][2666:2671] CHIP:DMG: CommandDataIB = - [1659415376.887380][2666:2671] CHIP:DMG: { - [1659415376.887442][2666:2671] CHIP:DMG: CommandPathIB = - [1659415376.887538][2666:2671] CHIP:DMG: { - [1659415376.887633][2666:2671] CHIP:DMG: EndpointId = 0x0, - [1659415376.887874][2666:2671] CHIP:DMG: ClusterId = 0x3e, - [1659415376.888039][2666:2671] CHIP:DMG: CommandId = 0x2, - [1659415376.888125][2666:2671] CHIP:DMG: }, - [1659415376.888225][2666:2671] CHIP:DMG: - [1659415376.888289][2666:2671] CHIP:DMG: CommandFields = - [1659415376.888384][2666:2671] CHIP:DMG: { - [1659415376.888478][2666:2671] CHIP:DMG: 0x0 = 2, - [1659415376.888560][2666:2671] CHIP:DMG: }, - [1659415376.888655][2666:2671] CHIP:DMG: }, - [1659415376.888728][2666:2671] CHIP:DMG: - [1659415376.888806][2666:2671] CHIP:DMG: ], - [1659415376.888877][2666:2671] CHIP:DMG: - [1659415376.888955][2666:2671] CHIP:DMG: InteractionModelRevision = 1 - [1659415376.889012][2666:2671] CHIP:DMG: }, - [1659415376.889086][2666:2671] CHIP:DMG: - [1659415376.889368][2666:2671] CHIP:DMG: ICR moving to [CommandSen] - [1659415376.889523][2666:2671] CHIP:DMG: ICR moving to [AwaitingDe] - [1659415376.972895][2666:2671] CHIP:DL: HandlePlatformSpecificBLEEvent 16387 - [1659415377.021227][2666:2669] CHIP:DL: Indication received, conn = 0xffffa803b9b0 - [1659415377.021488][2666:2671] CHIP:DL: HandlePlatformSpecificBLEEvent 16389 - [1659415377.122119][2666:2669] CHIP:DL: Indication received, conn = 0xffffa803b9b0 - [1659415377.122505][2666:2671] CHIP:DL: HandlePlatformSpecificBLEEvent 16389 - [1659415377.217641][2666:2669] CHIP:DL: Indication received, conn = 0xffffa803b9b0 - [1659415377.217905][2666:2671] CHIP:DL: HandlePlatformSpecificBLEEvent 16389 - [1659415377.219135][2666:2671] CHIP:DMG: << from BLE | 199585160 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 46479 / Exchange = 61632] - [1659415377.219238][2666:2671] CHIP:DMG: Header Flags = - [1659415377.219295][2666:2671] CHIP:DMG: { - [1659415377.219391][2666:2671] CHIP:DMG: } - [1659415377.219446][2666:2671] CHIP:DMG: - [1659415377.219518][2666:2671] CHIP:DMG: Encrypted Payload (527 bytes) = - [1659415377.219573][2666:2671] CHIP:DMG: { - [1659415377.219626][2666:2671] CHIP:DMG: data = 008fb500886de50b9dd1c80f8f48187dc9457d6066ed57c1f15550aefb6a675573c3fcff99cc266b26bdbd97c5ac460ff50e513fd8ef02f39294c2e79b507b0d7b6342caea806048b1c64804aae7bb9d4cdb04d4c7c4d345788e332256c05e7ea38eddd7693e4a39cdfe625688f0101cf16af6f5281049b25e47e6931b06c832d9a014a8248d7cfe31d8b75ebb7805b511293591caa108030939b43b951ad2a164692b051201f9c777e769b9632f05b94bc1990718ec3d2e0fa0161da28ec39bc51017c519e994e9fbbc68693e86ae9fa72618a5a0bc9a133e919bf61ca0805a90a09807c5c4b88329bd1d99149788c5464650dc3b7223e11f4d5a487c0b589453f725b035b543b0159801bee756dcd835832af45402931d73f4977371c90a3fd406905b278fefccf607e0699cac0b082d062b563f17d6e9438720a885f6b5d0dd035d652fd9b88790b1e79995030977f4423139eff3d2e36915065474ea1996705bd63b40395344e402c191e54c1c136c4daa31040ea09cc39c5804dd4203763d05e30d2cfd50ed84e12fd01ecf9c49a4bf7fe73c13416af1cc8bed4f5f2e8919f5724d698990115f97c08f43f9dd463883b53d09e6f888ac8a8d8ba91bd65b242ae049cccd4af6fdcfa402877ba10fb560008d07054deb1e9f1a39fd9110930e1e620fc64f999255a52f8064dc1c83fe6aa35de56c44850e932c82919c1f1af174afa75f3ef77c8b08fcace33883 - [1659415377.219729][2666:2671] CHIP:DMG: buffer_ptr = 281473366176768 - [1659415377.219780][2666:2671] CHIP:DMG: } - [1659415377.219830][2666:2671] CHIP:DMG: - [1659415377.220104][2666:2671] CHIP:DMG: DAC/PAI (463) = - [1659415377.220220][2666:2671] CHIP:DMG: { + The log has certificate details (starting with ---BEGIN CERTIFICATE and ending with ---END CERTIFICATE ) as highlighted below , save the certificate in .pem file format. Open editor on your TH , save that in file , example: dac.pem + + 1660951953700] [17233:5262446] CHIP: [DMG] data = 0068e9001f1f110e4f813e5e997100f2b1c69eb72b23bd4e69002a0485ecc741a33706d82f20c8ea99d6b830b2f60ed69c07cecba48142c7f3c8ded67e9ed878b5d68fe28facaf111ee3ce4510fc9b00ad13d57c2a7bd8bdcf868ca8e0aa0bb96c873862f32f12a32207a22e33fe3d8124435207df4f5747414a21b9674685a486f0d3c0aae5d96ba2f02067be2221b98415244522a221f570b62c21a83d88a9ee1a085c5a8c8f5d598f7cb168b4b36ca2306a4554a062e058dba25e7058a4e2f9f976fc71e3d6fcdafb40346d74600e033100243c0837f30f2e6fb337582f6a7d122ffc8943bbc17ba447f80fbac538609c9822d0ab95f6c831071a68ccc9cb1e5180f4daf0a1ae16a33ee3ac7d4754d5f6dca657e44f5a1f9405e668ce848132bb62b1fab6f5cd9aa2d4357fd14e516f18f5c158373f21479aef4c290477141e6d1894901a1c88db870fc1fc005be219dce3f708868ba532c657cf98b8d154d569d6f3de7639cdf72cc43af330ddbac0b910a839416e38a8b305a7eb1b069d274c8c31868363615adb08bfe99a4353f34927785acdb8c1619e1d4f8574491a3e77a46e6c5b47bdd722adfcb00937be7f9ba8c53a8188d42795439a435e6f6a26288c9278981dcac442d480ee40397e2a808d4ae55139562111120bd69411ef301d1b6caf3a4793d143c57092d4944ca93e848f553a19145dc6c02a0b68a67ea83b66afd10988737a753ea8d1f49ca534d12590bf7c3fddd0d7d00baf0121c883a743fcd289dab3d2a8e5131bd987 + [1660951953700] [17233:5262446] CHIP: [DMG] buffer_ptr = 140355398986080 + [1660951953700] [17233:5262446] CHIP: [DMG] } + [1660951953700] [17233:5262446] CHIP: [DMG] + [1660951953700] [17233:5262446] CHIP: [DMG] DAC/PAI (491) = + [1660951953700] [17233:5262446] CHIP: [DMG] { -----BEGIN CERTIFICATE----- - MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP - TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw - MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ - QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO - PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU - xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E - CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk - YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI - zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl - Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== + MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwc + TWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZG + RjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMM + HE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARG + RkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYL + gpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/ + BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAW + gBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0Rh + DuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUj + lUXhCOTlTnCXE1M= -----END CERTIFICATE----- - [1659415377.220439][2666:2671] CHIP:DMG: } - [1659415377.220490][2666:2671] CHIP:DMG: - [1659415377.220553][2666:2671] CHIP:DMG: - [1659415377.220635][2666:2671] CHIP:DMG: Additional Fields = - [1659415377.220689][2666:2671] CHIP:DMG: { - [1659415377.220748][2666:2671] CHIP:DMG: peer_address = BLE - [1659415377.220801][2666:2671] CHIP:DMG: } - [1659415377.220850][2666:2671] CHIP:DMG: - [1659415377.220914][2666:2671] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:199585160 on exchange 61632i - [1659415377.220977][2666:2671] CHIP:EM: Found matching exchange: 61632i, Delegate: 0xffffa803c898 - [1659415377.221071][2666:2671] CHIP:DMG: ICR moving to [ResponseRe] - [1659415377.221162][2666:2671] CHIP:DMG: InvokeResponseMessage = - [1659415377.221222][2666:2671] CHIP:DMG: { - [1659415377.221279][2666:2671] CHIP:DMG: suppressResponse = false, - [1659415377.221339][2666:2671] CHIP:DMG: InvokeResponseIBs = - [1659415377.221413][2666:2671] CHIP:DMG: [ - [1659415377.221473][2666:2671] CHIP:DMG: InvokeResponseIB = - [1659415377.221551][2666:2671] CHIP:DMG: { - [1659415377.221615][2666:2671] CHIP:DMG: CommandDataIB = - [1659415377.221691][2666:2671] CHIP:DMG: { - [1659415377.221764][2666:2671] CHIP:DMG: CommandPathIB = - [1659415377.221855][2666:2671] CHIP:DMG: { - [1659415377.221949][2666:2671] CHIP:DMG: EndpointId = 0x0, - [1659415377.222037][2666:2671] CHIP:DMG: ClusterId = 0x3e, - [1659415377.222125][2666:2671] CHIP:DMG: CommandId = 0x3, - [1659415377.222216][2666:2671] CHIP:DMG: }, - [1659415377.222303][2666:2671] CHIP:DMG: - [1659415377.222377][2666:2671] CHIP:DMG: CommandFields = - [1659415377.222476][2666:2671] CHIP:DMG: { - [1659415377.222570][2666:2671] CHIP:DMG: 0x0 = [ - [1659415377.222896][2666:2671] CHIP:DMG: 0x30, 0x82, 0x1, 0xcb, 0x30, 0x82, 0x1, 0x71, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x8, 0x56, 0xad, 0x82, 0x22, 0xad, 0x94, 0x5b, 0x64, 0x30, 0xa, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x4, 0x3, 0x2, 0x30, 0x30, 0x31, 0x18, 0x30, 0x16, 0x6, 0x3, 0x55, 0x4, 0x3, 0xc, 0xf, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x6, 0xa, 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0xa2, 0x7c, 0x2, 0x1, 0xc, 0x4, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, 0x17, 0xd, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x3d, 0x31, 0x25, 0x30, 0x23, 0x6, 0x3, 0x55, 0x4, 0x3, 0xc, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x50, 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, 0x6, 0xa, 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0xa2, 0x7c, 0x2, 0x1, 0xc, 0x4, 0x46, 0x46, 0x46, 0x31, 0x30, 0x59, 0x30, 0x13, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x3, 0x1, 0x7, 0x3, 0x42, 0x0, 0x4, 0x41, 0x9a, 0x93, 0x15, 0xc2, 0x17, 0x3e, 0xc, 0x8c, 0x87, 0x6d, 0x3, 0xcc, 0xfc, 0x94, 0x48, 0x52, 0x64, 0x7f, 0x7f, 0xec, 0x5e, 0x50, 0x82, 0xf4, 0x5, 0x99, 0x28, 0xec, 0xa8, 0x94, 0xc5, 0x94, 0x15, 0x13, 0x9, 0xac, 0x63, 0x1e, 0x4c, 0xb0, 0x33, 0x92, 0xaf, 0x68, 0x4b, 0xb, 0xaf, 0xb7, 0xe6, 0x5b, 0x3b, 0x81, 0x62, 0xc2, 0xf5, 0x2b, 0xf9, 0x31, 0xb8, 0xe7, 0x7a, 0xaa, 0x82, 0xa3, 0x66, 0x30, 0x64, 0x30, 0x12, 0x6, 0x3, 0x55, 0x1d, 0x13, 0x1, 0x1, 0xff, 0x4, 0x8, 0x30, 0x6, 0x1, 0x1, 0xff, 0x2, 0x1, - [1659415377.223073][2666:2671] CHIP:DMG: ] (463 bytes) - [1659415377.223156][2666:2671] CHIP:DMG: }, - [1659415377.223230][2666:2671] CHIP:DMG: }, - [1659415377.223312][2666:2671] CHIP:DMG: - [1659415377.223374][2666:2671] CHIP:DMG: }, - [1659415377.223448][2666:2671] CHIP:DMG: - [1659415377.223505][2666:2671] CHIP:DMG: ], - [1659415377.223579][2666:2671] CHIP:DMG: - [1659415377.223637][2666:2671] CHIP:DMG: InteractionModelRevision = 1 - [1659415377.223694][2666:2671] CHIP:DMG: }, - [1659415377.223832][2666:2671] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003 - [1659415377.223908][2666:2671] CHIP:CTL: Received certificate chain from the device - [1659415377.224018][2666:2671] CHIP:CTL: Successfully finished commissioning step "SendPAICertificateRequest" - + [1660951953700] [17233:5262446] CHIP: [DMG] } + disabled: true - 1. Save the PAI value from commissioning log of TH in the file as below - vi pai_6.pem + - label: "TH extracts the Authority Key Identifier from the PAI certificate" + verification: | + 1. Print the PAI value saved in the step above using "openssl x509 -in pai.pem -text" as shown below - 2. Give the below command to extract the Authority key ID - openssl x509 -in pai_6.pem -text + Get the Authority Key Identifier from the console. - Verify that below extracted authority key is not same as the SDK"s test PAA + Verify that below extracted authority key is not the same as the SDK"s test PAA 1. 78:5C:E7:05:B8:6B:8F:4E:6F:C7:93:AA:60:CB:43:EA:69:68:82:D5 2. 6A:FD:22:77:1F:51:1F:EC:BF:16:41:97:67:10:DC:DC:31:A1:71:7E - Below certificate has been extracted using the sample DUT, hence the Authority key ID is same as SDK"s test PAA + On the reference platform implementation, this authority key id matches. But in real DUT it should not match. - grl@grl-ThinkPad-L480:~/jul14_2ndcntrl/connectedhomeip$ openssl x509 -in pai_6.pem -text + Below certificate has been extracted using the sample DUT, hence the Authority key ID is the same as SDK"s test PAA + + Verify the below authority key identifier (AKID) is signed by a PAA. Extract each cert in the TH PAA trust store using the below command and look for AKID is present in those certificates. + + grl@grl-ThinkPad-L480:~/jul14_2ndcntrl/connectedhomeip$ openssl x509 -in pai.pem -text Certificate: Data: Version: 3 (0x2) @@ -278,163 +199,9 @@ tests: verification: | During commissioning we will get DAC certificate, see on TH(chip-tool) log: - [1659509320.714103][3165:3170] CHIP:CTL: Performing next commissioning step "SendDACCertificateRequest" - [1659509320.714155][3165:3170] CHIP:CTL: Sending request for DAC certificate - [1659509320.714225][3165:3170] CHIP:CTL: Sending Certificate Chain request to 0xffff74000b60 device - [1659509320.714397][3165:3170] CHIP:DMG: ICR moving to [AddingComm] - [1659509320.714470][3165:3170] CHIP:DMG: ICR moving to [AddedComma] - [1659509320.715027][3165:3170] CHIP:IN: Prepared secure message 0xffff74001d38 to 0xFFFFFFFB00000000 (0) of type 0x8 and protocolId (0, 1) on exchange 17089i with MessageCounter:86888459. - [1659509320.715128][3165:3170] CHIP:IN: Sending encrypted msg 0xffff74001d38 with MessageCounter:86888459 to 0xFFFFFFFB00000000 (0) at monotonic time: 0000000000ADAD48 msec - [1659509320.715804][3165:3170] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%eth0]:5540 | 86888459 | [Interaction Model (1) / InvokeCommandRequest (0x08) / Session = 29587 / Exchange = 17089] - [1659509320.715898][3165:3170] CHIP:DMG: Header Flags = - [1659509320.715952][3165:3170] CHIP:DMG: { - [1659509320.716035][3165:3170] CHIP:DMG: Exchange (0x05) = - [1659509320.716089][3165:3170] CHIP:DMG: { - [1659509320.716158][3165:3170] CHIP:DMG: Initiator = true - [1659509320.716212][3165:3170] CHIP:DMG: NeedsAck = true - [1659509320.716264][3165:3170] CHIP:DMG: } - [1659509320.716353][3165:3170] CHIP:DMG: } - [1659509320.716405][3165:3170] CHIP:DMG: - [1659509320.716491][3165:3170] CHIP:DMG: Encrypted Payload (62 bytes) = - [1659509320.716544][3165:3170] CHIP:DMG: { - [1659509320.716616][3165:3170] CHIP:DMG: data = 009373000bd02d05c296dbc864194390f3d020eb61ee335c0d61263dd0d5f4849a5c6a601f73c80e6775d2b422e816cf8e3ae224d59c01f53783a657bd0d - [1659509320.716672][3165:3170] CHIP:DMG: buffer_ptr = 281472627949680 - [1659509320.716742][3165:3170] CHIP:DMG: } - [1659509320.716793][3165:3170] CHIP:DMG: - [1659509320.716965][3165:3170] CHIP:DMG: InvokeRequestMessage = - [1659509320.717029][3165:3170] CHIP:DMG: { - [1659509320.717084][3165:3170] CHIP:DMG: suppressResponse = false, - [1659509320.717148][3165:3170] CHIP:DMG: timedRequest = false, - [1659509320.717206][3165:3170] CHIP:DMG: InvokeRequests = - [1659509320.717276][3165:3170] CHIP:DMG: [ - [1659509320.717335][3165:3170] CHIP:DMG: CommandDataIB = - [1659509320.717399][3165:3170] CHIP:DMG: { - [1659509320.717461][3165:3170] CHIP:DMG: CommandPathIB = - [1659509320.717535][3165:3170] CHIP:DMG: { - [1659509320.717788][3165:3170] CHIP:DMG: EndpointId = 0x0, - [1659509320.717870][3165:3170] CHIP:DMG: ClusterId = 0x3e, - [1659509320.717947][3165:3170] CHIP:DMG: CommandId = 0x2, - [1659509320.718019][3165:3170] CHIP:DMG: }, - [1659509320.718116][3165:3170] CHIP:DMG: - [1659509320.718181][3165:3170] CHIP:DMG: CommandFields = - [1659509320.718273][3165:3170] CHIP:DMG: { - [1659509320.718436][3165:3170] CHIP:DMG: 0x0 = 1, - [1659509320.718521][3165:3170] CHIP:DMG: }, - [1659509320.718609][3165:3170] CHIP:DMG: }, - [1659509320.718706][3165:3170] CHIP:DMG: - [1659509320.718766][3165:3170] CHIP:DMG: ], - [1659509320.718855][3165:3170] CHIP:DMG: - [1659509320.718915][3165:3170] CHIP:DMG: InteractionModelRevision = 1 - [1659509320.718971][3165:3170] CHIP:DMG: }, - [1659509320.719024][3165:3170] CHIP:DMG: - [1659509320.719407][3165:3170] CHIP:DMG: ICR moving to [CommandSen] - [1659509320.719536][3165:3170] CHIP:DMG: ICR moving to [AwaitingDe] - [1659509320.719608][3165:3170] CHIP:EM: Sending Standalone Ack for MessageCounter:148943591 on exchange 17088i - [1659509320.720332][3165:3170] CHIP:IN: Prepared secure message 0xffff88e5c9e8 to 0xFFFFFFFB00000000 (0) of type 0x10 and protocolId (0, 0) on exchange 17088i with MessageCounter:86888460. - [1659509320.720493][3165:3170] CHIP:IN: Sending encrypted msg 0xffff88e5c9e8 with MessageCounter:86888460 to 0xFFFFFFFB00000000 (0) at monotonic time: 0000000000ADAD4E msec - [1659509320.721152][3165:3170] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%eth0]:5540 | 86888460 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 29587 / Exchange = 17088] - [1659509320.721242][3165:3170] CHIP:DMG: Header Flags = - [1659509320.721298][3165:3170] CHIP:DMG: { - [1659509320.721381][3165:3170] CHIP:DMG: Exchange (0x03) = - [1659509320.721434][3165:3170] CHIP:DMG: { - [1659509320.721505][3165:3170] CHIP:DMG: Initiator = true - [1659509320.721562][3165:3170] CHIP:DMG: AckMsg = 148943591 - [1659509320.721634][3165:3170] CHIP:DMG: } - [1659509320.721706][3165:3170] CHIP:DMG: } - [1659509320.721759][3165:3170] CHIP:DMG: - [1659509320.721846][3165:3170] CHIP:DMG: Encrypted Payload (34 bytes) = - [1659509320.721901][3165:3170] CHIP:DMG: { - [1659509320.721972][3165:3170] CHIP:DMG: data = 009373000cd02d05ff4214e467b1c7a3664b8d8c5628c4e291f833b9f2f35d953235 - [1659509320.722027][3165:3170] CHIP:DMG: buffer_ptr = 281472627939824 - [1659509320.722077][3165:3170] CHIP:DMG: } - [1659509320.722125][3165:3170] CHIP:DMG: - [1659509320.722485][3165:3170] CHIP:EM: Flushed pending ack for MessageCounter:148943591 on exchange 17088i - [1659509320.724260][3165:3170] CHIP:DMG: << from UDP:[fe80::e65f:1ff:fe0f:2753%eth0]:5540 | 148943592 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 49327 / Exchange = 17089] - [1659509320.724362][3165:3170] CHIP:DMG: Header Flags = - [1659509320.724417][3165:3170] CHIP:DMG: { - [1659509320.724503][3165:3170] CHIP:DMG: Exchange (0x06) = - [1659509320.724558][3165:3170] CHIP:DMG: { - [1659509320.724647][3165:3170] CHIP:DMG: AckMsg = 86888459 - [1659509320.724704][3165:3170] CHIP:DMG: NeedsAck = true - [1659509320.724756][3165:3170] CHIP:DMG: } - [1659509320.724827][3165:3170] CHIP:DMG: } - [1659509320.724879][3165:3170] CHIP:DMG: - [1659509320.724950][3165:3170] CHIP:DMG: Encrypted Payload (559 bytes) = - [1659509320.725003][3165:3170] CHIP:DMG: { - [1659509320.725056][3165:3170] CHIP:DMG: data = 00afc000e8b2e008b40e7ea031654ba52d0e71f9a877ec233377ef9eef00611412271b31992e30753df53f0bfac6b5f9a30217f67d03a17653c5ee991a0266f3ef286188e3f977d3dd94fbbb60323a74c2b685309d607af14c0b4c7214c7579cf43e9ed90d4256382e5d40bc46796e06fdb6b220bbc5e7b6fc812f2c5bc357fcbda79d6dcb464f42d04ab1708fdfb5ea8b90c3720257e9da78ba877b24b99d7f104c4ee199923c876d8c07903beab5f93a784f226d1e82f8d5f001f23457965c9ddbcc8661d00b7202a9932b1ae92ff36d80b8e5ac2d18d65e8a3957486ef86ca4f056218677958f9be17ab6c54d3dedb7e88a144ef607f692d3131276dbb2803e6e93dc5d330ef13b0e00289e6a9186e1f1c0e5b9615ace2c1d544f4b6bc58f700b47a11fc2278977b2a1595c96532daefe44db899e3f75f473ffbf4ac1e93ba76033dfa562beedf4b9a5fe9b985e6a0227efdcf5ced1b966bd78addb1ad5950c6378dc149a6372888683a8539a4d59958c7460b1968b0d8dcfa2d3660dc07c4e0e44095ef14c4cdd249727caad086e8630f9df296d8fa426f01f58f532ac1a91cb1da874055711edd4f13c722a0e66f850d0f455c09fbc2c049852ec936545b2bf2798f9c614e4488707a1f38fee8c08fe3c886fd89d9e3578fad68077133c7e086d5ba7df2a7323d10f03602d46c1e172e993fd3b6d5d468b7da8dc315711d53ded3ab7f38f7517f23394c7c9438ce5726449cca510956add995f76140fe3bd0a63ea024058898635373e68e9e3 - [1659509320.725163][3165:3170] CHIP:DMG: buffer_ptr = 281472627931376 - [1659509320.725214][3165:3170] CHIP:DMG: } - [1659509320.725263][3165:3170] CHIP:DMG: - [1659509320.725501][3165:3170] CHIP:DMG: DAC/PAI (491) = - [1659509320.725616][3165:3170] CHIP:DMG: { - -----BEGIN CERTIFICATE----- - MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwc - TWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZG - RjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMM - HE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARG - RkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEH - A0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYL - gpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/ - BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAW - gBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0Rh - DuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUj - lUXhCOTlTnCXE1M= - -----END CERTIFICATE----- - [1659509320.725847][3165:3170] CHIP:DMG: } - [1659509320.725898][3165:3170] CHIP:DMG: - [1659509320.725961][3165:3170] CHIP:DMG: - [1659509320.726043][3165:3170] CHIP:DMG: Additional Fields = - [1659509320.726099][3165:3170] CHIP:DMG: { - [1659509320.726158][3165:3170] CHIP:DMG: peer_address = UDP:[fe80::e65f:1ff:fe0f:2753%eth0]:5540 - [1659509320.726215][3165:3170] CHIP:DMG: } - [1659509320.726265][3165:3170] CHIP:DMG: - [1659509320.726334][3165:3170] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:148943592 on exchange 17089i - [1659509320.726446][3165:3170] CHIP:EM: Found matching exchange: 17089i, Delegate: 0xffff74009c78 - [1659509320.726534][3165:3170] CHIP:EM: Rxd Ack; Removing MessageCounter:86888459 from Retrans Table on exchange 17089i - [1659509320.726594][3165:3170] CHIP:EM: Removed CHIP MessageCounter:86888459 from RetransTable on exchange 17089i - [1659509320.726669][3165:3170] CHIP:DMG: ICR moving to [ResponseRe] - [1659509320.726761][3165:3170] CHIP:DMG: InvokeResponseMessage = - [1659509320.726818][3165:3170] CHIP:DMG: { - [1659509320.726876][3165:3170] CHIP:DMG: suppressResponse = false, - [1659509320.726934][3165:3170] CHIP:DMG: InvokeResponseIBs = - [1659509320.727010][3165:3170] CHIP:DMG: [ - [1659509320.727068][3165:3170] CHIP:DMG: InvokeResponseIB = - [1659509320.727154][3165:3170] CHIP:DMG: { - [1659509320.727217][3165:3170] CHIP:DMG: CommandDataIB = - [1659509320.727291][3165:3170] CHIP:DMG: { - [1659509320.727362][3165:3170] CHIP:DMG: CommandPathIB = - [1659509320.727442][3165:3170] CHIP:DMG: { - [1659509320.727523][3165:3170] CHIP:DMG: EndpointId = 0x0, - [1659509320.727607][3165:3170] CHIP:DMG: ClusterId = 0x3e, - [1659509320.727698][3165:3170] CHIP:DMG: CommandId = 0x3, - [1659509320.727777][3165:3170] CHIP:DMG: }, - [1659509320.727857][3165:3170] CHIP:DMG: - [1659509320.727928][3165:3170] CHIP:DMG: CommandFields = - [1659509320.728004][3165:3170] CHIP:DMG: { - [1659509320.728081][3165:3170] CHIP:DMG: 0x0 = [ - [1659509320.728404][3165:3170] CHIP:DMG: 0x30, 0x82, 0x1, 0xe7, 0x30, 0x82, 0x1, 0x8e, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x8, 0x69, 0xcd, 0xf1, 0xd, 0xe9, 0xe5, 0x4e, 0xd1, 0x30, 0xa, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x4, 0x3, 0x2, 0x30, 0x3d, 0x31, 0x25, 0x30, 0x23, 0x6, 0x3, 0x55, 0x4, 0x3, 0xc, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x50, 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, 0x6, 0xa, 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0xa2, 0x7c, 0x2, 0x1, 0xc, 0x4, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, 0x17, 0xd, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x53, 0x31, 0x25, 0x30, 0x23, 0x6, 0x3, 0x55, 0x4, 0x3, 0xc, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x44, 0x41, 0x43, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x2f, 0x30, 0x78, 0x38, 0x30, 0x30, 0x31, 0x31, 0x14, 0x30, 0x12, 0x6, 0xa, 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0xa2, 0x7c, 0x2, 0x1, 0xc, 0x4, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x6, 0xa, 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0xa2, 0x7c, 0x2, 0x2, 0xc, 0x4, 0x38, 0x30, 0x30, 0x31, 0x30, 0x59, 0x30, 0x13, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x3, 0x1, 0x7, 0x3, 0x42, 0x0, 0x4, 0x46, 0x3a, 0xc6, 0x93, 0x42, 0x91, 0xa, 0xe, 0x55, 0x88, 0xfc, 0x6f, 0xf5, 0x6b, 0xb6, 0x3e, 0x62, 0xec, 0xce, 0xcb, 0x14, 0x8f, 0x7d, 0x4e, 0xb0, 0x3e, 0xe5, 0x52, 0x60, 0x14, 0x15, 0x76, 0x7d, 0x16, 0xa5, 0xc6, 0x63, 0xf7, 0x93, 0xe4, 0x91, 0x23, 0x26, 0xb, 0x82, 0x97, 0xa7, 0xcd, 0x7e, 0x7c, 0xfc, 0x - [1659509320.728579][3165:3170] CHIP:DMG: ] (491 bytes) - [1659509320.728664][3165:3170] CHIP:DMG: }, - [1659509320.728738][3165:3170] CHIP:DMG: }, - [1659509320.728818][3165:3170] CHIP:DMG: - [1659509320.728879][3165:3170] CHIP:DMG: }, - [1659509320.728952][3165:3170] CHIP:DMG: - [1659509320.729010][3165:3170] CHIP:DMG: ], - [1659509320.729082][3165:3170] CHIP:DMG: - [1659509320.729140][3165:3170] CHIP:DMG: InteractionModelRevision = 1 - [1659509320.729197][3165:3170] CHIP:DMG: }, - [1659509320.729335][3165:3170] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003 - [1659509320.729409][3165:3170] CHIP:CTL: Received certificate chain from the device - [1659509320.729476][3165:3170] CHIP:CTL: Successfully finished commissioning step "SendDACCertificateRequest" - - - - - - "1. Save the DAC value from commissioning log of TH in the file as below - vi dac.pem + 1. From the dac.pem file saved above step, print the contents on the console using "openssl x509 -in dac.pem -text" as shown below. - 2. Give the below command to extract the Authority key ID + 2. extract the Authority key ID and save the public key as pk1 openssl x509 -in dac.pem -text Below certificate has been extracted using the sample DUT, hence the Authority key ID is same as SDK"s test PAA @@ -656,6 +423,7 @@ tests: [1659415377.223908][2666:2671] CHIP:CTL: Received certificate chain from the device [1659415377.224018][2666:2671] CHIP:CTL: Successfully finished commissioning step "SendPAICertificateRequest" + To extract public key follow the below procedure and save the public key as pk2, make sure the pk2 doesn"t match pk1 in step 5 "1. Save the PAI value from commissioning log of TH in the file as below vi pai_6.pem @@ -663,7 +431,11 @@ tests: 2. Give the below command to extract the Authority key ID openssl x509 -in pai_6.pem -text - Below certificate has been extracted using the sample DUT, hence the Authority key ID is same as SDK"s test PAA + Below certificate has been extracted using the sample DUT, hence the Authority key ID is same as in SDK"s test PAA certs + + 3. Extract the public key Public-Key: (256 bit) from the below cert + + 4. Verify that pk_1 does not match with the pk_2 grl@grl-ThinkPad-L480:~/jul14_2ndcntrl/connectedhomeip$ openssl x509 -in pai_6.pem -text Certificate: @@ -715,10 +487,3 @@ tests: i+oDPOUDAiAlVJQ75X1T1sR199I+v8/CA2zSm6Y5PsfvrYcUq3GCGQ== -----END CERTIFICATE----- disabled: true - - - label: - "Repeat Step 1 to 4 with DUT2, saving the PAI, DAC and public key as - pk_2" - verification: | - verification step to be updated. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml index 78dfc1daa202ef..a71ae7c5d1d491 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_12.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1.3 - QR code/ Manual Pairing Code is printed on the device or in additional provided materials (ex: manual) + disabled: true + - label: "Scan the DUTs QR code using the TH." verification: | 1. Run DUT. Example for DUT=all-clusters-app @@ -47,6 +52,9 @@ tests: 2. Parse onboarding payload using TH=chip-tool $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + + Verify in TH as commissioner side: + [1657214153060] [29000:16610528] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1657214153060] [29000:16610528] CHIP: [SPL] Version: 0 [1657214153060] [29000:16610528] CHIP: [SPL] VendorID: 65521 @@ -57,25 +65,17 @@ tests: [1657214153060] [29000:16610528] CHIP: [SPL] Passcode: 20202021 disabled: true - - label: - "Verify that the TH presents the user with a pairing hint in the - CommissioningModeInitialStepsHint field of the DCL. Verify that the - CommissioningCustomFlow field is set to a value = 0" - verification: | - 1. Verify CommissioningCustomFlow=0 - 2. Verify CommissioningModeInitialStepsHint contains a valid, non-zero integer = 1 for Standard Commissioning flow - disabled: true - - - label: - "If CommissioningCustomFlow field in Step 2 = 0 (Standard - Commissioning Flow), reboot the DUT device" + - label: "Reboot the DUT device." verification: | 1. Verify DUT is advertising in commissioning mode. On DUT, verify through commissioning + Verify in TH as commissioner side: + $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 ... [1657214364908] [29006:16612760] CHIP: [CTL] Starting commissioning discovery over DNS-SD - [1657214364908] [29006:16612760] CHIP: [DL] Browsing for: _matterc._udp,_L3840 [1657214365080] [29006:16612761] CHIP: [DL] Mdns: OnBrowseAdd name: E5EFE5FB9DC494B9, type: _matterc._udp., domain: local., interface: 7 [1657214365080] [29006:16612761] CHIP: [DL] Resolve type=_matterc._udp name=E5EFE5FB9DC494B9 interface=7 + [1657214364908] [29006:16612760] CHIP: [DL] Browsing for: _matterc._udp,_L3840 + [1657214365080] [29006:16612761] CHIP: [DL] Mdns: OnBrowseAdd name: E5EFE5FB9DC494B9, type: _matterc._udp., domain: local., interface: 7 [1657214365080] [29006:16612761] CHIP: [DL] Resolve type=_matterc._udp name=E5EFE5FB9DC494B9 interface=7 [1657214365080] [29006:16612761] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:E5EFE5FB9DC494B9._matterc._udp.local. interface: 7 [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 [1657214365082] [29006:16612761] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml index ad93647feb9eb4..f0422326fb99a3 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_13.yaml @@ -28,11 +28,17 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1.3 - QR code/ Manual Pairing Code is printed on the device or in additional provided materials (ex: manual) + disabled: true + - label: "Power on the DUT device." verification: | 1. Verify DUT is NOT advertising in commissioning mode. On DUT, the DUT should not show up $ ./chip-tool discover commissionables + TH Commissioner should not discover the DUT here disabled: true - label: "Scan the DUTs QR code from the previous step using the TH." @@ -42,6 +48,8 @@ tests: 2. Parse onboarding payload using TH=chip-tool $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + + Verify in TH as commissioner side: [1651193251086] [15494:447566] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651193251087] [15494:447566] CHIP: [SPL] CommissioningFlow: 1 [1651193251087] [15494:447566] CHIP: [SPL] VendorID: 65521 @@ -53,23 +61,16 @@ tests: disabled: true - label: - "Verify that the TH presents the user with a pairing hint in the - CommissioningModeInitialStepsHint field of the DCL. Verify that the - CommissioningCustomFlow field is set to a value = 1" - verification: | - 1. Verify CommissioningCustomFlow=1 - 2. Verify CommissioningModeInitialStepsHint contains a valid, non-zero integer - disabled: true - - - label: - "Follow any steps from the resources provided by the pairing hint for - putting the DUT Commissionee into commissioning mode" + "Follow any DUT-specific steps for putting the DUT Commissionee into + commissioning mode" verification: | 1. Follow vendor-specific steps from the pairing hint to put DUT into commissioning mode 2. Verify DUT is advertising in commissioning mode. On DUT, $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml index 5635299f36e5ac..37dea4cf954852 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_14.yaml @@ -28,11 +28,17 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1.3 - QR code/ Manual Pairing Code is printed on the device or in additional provided materials (ex: manual) + disabled: true + - label: "Power on the DUT device." verification: | 1. Verify DUT is NOT advertising in commissioning mode. On DUT, the DUT should not show up $ ./chip-tool discover commissionables + TH Commissioner should not discover the DUT here disabled: true - label: "Scan the DUTs QR code from the previous step using the TH." @@ -42,6 +48,8 @@ tests: 2. Parse onboarding payload using TH=chip-tool $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + Verify in TH as commissioner side: + [1651193251086] [15494:447566] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651193251087] [15494:447566] CHIP: [SPL] CommissioningFlow: 2 [1651193251087] [15494:447566] CHIP: [SPL] VendorID: 65521 @@ -53,24 +61,17 @@ tests: disabled: true - label: - "Verify that the TH presents User with a URL in the - CommissioningCustomFlowUrl field of the DCL. Verify that the - CommissioningCustomFlow field is set to a value = 2" + "Follow any DUT-specific steps, guided by a service provided by the + DUTs manufacturer for initial device setup, then place the DUT + Commissionee into commissioning mode." verification: | - 1. Verify CommissioningCustomFlow=2 - 2. Verify CommissioningModeInitialStepsHint has bit 0 (Power Cycle) set to 0 and bit 1 (Device Manufacturer URL) set to 1 - 3. Verify CommissioningModeInitialStepsHint contains a valid, non-zero integer - disabled: true - - - label: - "Follow any steps from the URL provided by the pairing hint in the DCL - for putting the DUT Commissionee into commissioning mode" - verification: | - 1. Follow vendor-specific steps from the pairing hint to put DUT into commissioning mode + 1. Follow DUT vendor-specific steps to put DUT into commissioning mode 2. Verify DUT is advertising in commissioning mode. On DUT, $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml index 7733f987ba9128..35e8f4f6d594e2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_15.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1 - Onboarding payload is printed on the device or in additional provided materials (ex: manual) through a QR Code, a manually entered code or as content in an NFC tag. + disabled: true + - label: "Using the TH Onboarding payload reader, scan or read the Onboarding payload from DUT1" @@ -33,6 +38,8 @@ tests: 1. Parse payload for DUT1 $ ./chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00 + Verify in TH as commissioner side: + [1651194471211] [16050:465158] CHIP: [SPL] Parsing base38Representation: MT:-24J0AFN00KA0648G00 [1651194471211] [16050:465158] CHIP: [SPL] CommissioningFlow: 0 [1651194471211] [16050:465158] CHIP: [SPL] VendorID: 65521 @@ -58,6 +65,8 @@ tests: 1. Parse payload for DUT2 $ ./chip-tool payload parse-setup-payload MT:-24J0IRV01WCCN68G00 + Verify in TH as commissioner side: + [1651194577916] [16053:466154] CHIP: [SPL] Parsing base38Representation: MT:-24J0IRV01WCCN68G00 [1651194577916] [16053:466154] CHIP: [SPL] CommissioningFlow: 0 [1651194577916] [16053:466154] CHIP: [SPL] VendorID: 65521 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml index f2b6606fc1ce17..ef616a60cd51e5 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml @@ -27,11 +27,23 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1.7 - NFC Spec Requirements: NFC tags SHALL use the NFC Data Exchange Format (NDEF) as defined by NFC ForumTM in [NDEF 1.0 NFCForum-TS-NDEF 1.0] + + An NDEF message is defined as a group of individual NDEF records as defined by NFC ForumTM in NFC Record Type Definition (RTD) RTD 1.0 [NFCForum-TS-RTD 1.0] + + Onboarding Payload for NFC tags SHALL use NDEF URI Record Type Definition as defined by NFC ForumTM in URI Record Type Definition RTD-URI 1.0 [NFCForum-TS-RTD URI 1.0]. The URI for defined in section 3.3 Format + disabled: true + - label: "Keep the DUT in packaging and bring in TH NFC scanner close to the DUT packaging." verification: | - Vendor specific field verification + 1. Using an NFC Scanner, physically bring the scanner close to the DUT in it"s packaging. + 2. NFC Scanner should not be able to read the Onboarding Payload from the DUT"s NFC tag. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: @@ -39,7 +51,10 @@ tests: not put the DUT in pairing mode. Bring in TH NFC scanner close to the DUTs NFC tag" verification: | - Vendor specific field verification + 1. Using an NFC Scanner, physically bring the scanner close to the DUT that is out of it"s packaging. + 2. NFC Scanner should not be able to read the Onboarding Payload from the DUT"s NFC tag. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: @@ -47,13 +62,19 @@ tests: scanner close to the DUTs NFC tag" PICS: MCORE.DD.PHYSICAL_TAMPERING verification: | - Vendor specific field verification + 1. Power on the DUT. + 2. Using an NFC Scanner, physically bring the scanner close to the DUT. + 3. NFC Scanner should not be able to read the Onboarding Payload from the DUT"s NFC tag. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "DUT must have an explicit trigger of the the NFC pairing mode" PICS: MCORE.DD.PHYSICAL_TAMPERING verification: | - Vendor specific field verification + 1. Manually verify that the DUT has an explicit trigger (a physical action that enables the NFC pairing flow). + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: @@ -61,40 +82,68 @@ tests: close to NFC tag" PICS: MCORE.DD.PHYSICAL_TAMPERING verification: | - Vendor specific field verification + 1. Power on the DUT. + 2. Put the DUT into pairing mode. + 2. Using an NFC Scanner, physically bring the scanner close to the DUT + 3. NFC Scanner should be able to read the Onboarding Payload from the DUT"s NFC tag. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "Power on DUT. Bring in NFC scanner close to NFC tag" PICS: MCORE.DD.PHYSICAL_TAMPERING verification: | - Vendor specific field verification + 1. Power on the DUT. + 2. Using an NFC Scanner, physically bring the scanner close to the DUT. + 3. NFC Scanner should be able to read the Onboarding Payload from the DUT"s NFC tag. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "Wait for the pairing mode to expire on device" verification: | - Vendor specific field verification + 1. After pairing mode expires on the DUT, verify that the NFC Scanner cannot read advertisements from the DUT. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "For Read only Tags, try to write using NFC tool a payload to DUT" verification: | - Vendor specific field verification + 1. Using an NFC-programmer tool, attempt to write a payload to the DUT"s NFC tag + 2. DUT should reject the attempt and the NFC tag should not have been written to. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "For Programmable Tag, NFC tag must be read only OTA. Try to write a payload to DUT using NFC tool" verification: | - Vendor specific field verification + 1. Using an NFC-programmer tool, attempt to write a payload to the DUT"s NFC tag + 2. DUT should reject the attempt and the NFC tag should not have been written to. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "Optional For Programmable Tag, NFC tag may be reconfigured using wired means" verification: | - Vendor specific field verification + 1. This is vendor-specific, attempt to write a payload to the DUT"s NFC tag by way of a physical wired connection. + 2. DUT"s NFC tag should have been written to. + + Note: chip-tool does not support physically scanning an NFC tag disabled: true - label: "Using TH NFC scanner - read NFC tag Reader type" verification: | - Vendor specific field verification + 1. Using an NFC Scanner, physically bring the scanner close to the DUT + 2. DUT"s NFC tag should have a Reader type equal to 2 or greater + + Note: chip-tool does not support physically scanning an NFC tag + disabled: true + + - label: "" + verification: | + verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_6.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_6.yaml index b1de25771fb85c..721c334cf07c80 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_6.yaml @@ -25,12 +25,26 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + Final label of DUT is ready to be scanned + disabled: true + - label: "Scan the DUTs QR code using the TH QR code reader" verification: | - Vendor specific field testcase + 1. Scan the QR code with a QR Code scanning device. + 2. Vendor specific field testcase that should be manually verified using the requirements in the Expected Outcome. disabled: true - label: "Verify QR code version" verification: | - Vendor specific field verification + 1. Manually verify the QR code version by referring to section 5.1.3.2 "QR Code Format" of the spec document to ensure it follows the ISO/IEC 18004:2015 (https://www.iso.org/standard/62021.html) specifications with accurate: + - Module size + - ECC Level + - Alphanumeric capacity + - Total available payload, excluding prefix (bits) + - Available payload for TLV data (bits) + 2. Vendor specific field test case that should be manually verified using the requirements in the Expected Outcome. + + Note: chip-tool is not used to verify this test step disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml index 6bfb9187288b34..9f2689fe3b10bb 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml @@ -25,7 +25,12 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.1.4.2 - Manual Pairing Code is printed on the device or in additional provided materials (ex: manual)" + disabled: true + - label: "Verify using instruments" verification: | - Vendor specific field testcase + Vendor specific field testcase that should be manually verified using the requirements in the Expected Outcome. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml index 26a0b7563571df..7f8cc8a2de63d2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_8.yaml @@ -27,11 +27,41 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.1.3 - QR code is printed on the device or in additional provided materials (ex: manual). Device also has additional TLV data with a non-zero length appended to the end of the QR code. + + An example onboarding QR code could be "MT:-24J029Q00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40" (following 5.1.3 "QR Code", Table 34 "Packed Binary Data Structure for Onboarding Payload") which includes: + + - 3-bit Version String=000 + + - 16-bit Vendor ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier") + + - 16-bit Product ID=0x8001 (as defined in section 2.5.3. "Product Identifier") + + - 2-bit Custom Flow=10 (Custom Commissioning Flow = 2) + + - 8-bit Discovery Capabilities Bitmask=00000100 (OnNetwork) + + - 12-bit Discriminator=0xF00 + + - 27-bit Passcode=20202021 + + - 4-bit Padding=0000 + + - TLV Data=0x152C000A3132333435363738393018 included (as defined in section 5.1.3.1. "Payload", subsection "TLV Data") + disabled: true + - label: "Scan the TH Devices QR code using DUT" PICS: MCORE.DD.SCAN_QR_CODE verification: | 1. Get the QR code from the TH - ubuntu@matter-7:~/Apr18_dut/connectedhomeip/examples/all-clusters-app/linux/out/all-clusters-app$ sudo ./chip-all-clusters-app --wifi + $ sudo ./chip-all-clusters-app --wifi [13293:13293] CHIP:DL: Device Configuration: [1653306603.740569][13293:13293] CHIP:DL: Serial Number: TEST_SN @@ -67,9 +97,9 @@ tests: 2. Parse the DUT"s QR Code using the TH commissioner: chip-tool - ubuntu@matter-7:~/Apr18_cntrl/connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool payload parse-setup-payload MT:-24J048N01KA0648G00 + $ ./chip-tool payload parse-setup-payload MT:-24J048N01KA0648G00 - Verify in DUT as client side: + Verify in DUT as commissioner side: [1650266365.939678][10146:10146] CHIP:SPL: CommissioningFlow: 2 [1650266365.939704][10146:10146] CHIP:SPL: VendorID: 65521 [1650266365.939724][10146:10146] CHIP:SPL: Version: 0 @@ -84,8 +114,8 @@ tests: the Matter network." verification: | ./chip-tool pairing code 1 MT:-24J042C00KA0648G00 - - Verify in DUT as client side: + No applicable TH logs. + Verify in DUT as commissioner side: CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 CHIP:CTL: Received CommissioningComplete response, errorCode=0 CHIP:CTL: Successfully finished commissioning step "SendComplete" @@ -102,14 +132,16 @@ tests: MT:-24J029Q00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Get QR code from TH as server side: + 1. Launch the TH commissionee app and get QR code from TH side + Verify in TH as commissionee side: + $ ./out/all-clusters-app/chip-all-clusters-app ... [1657211128.302755][365927:365927] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] [1657211128.302783][365927:365927] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: [1657211128.302804][365927:365927] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 - 2. Build TLV Data into TH"s QR code + 2. Build TLV Data into TH"s QR code using chip-tool"s generate-qrcode command $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --tlvBytes hex:152C000A3132333435363738393018 [1657211213125] [28612:16578643] CHIP: [TOO] QR Code: MT:-24J029Q00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40 disabled: true @@ -120,7 +152,7 @@ tests: verification: | ./chip-tool pairing code 1 MT:-24J0AFN00KA064IJ3P0IXZB0DK5N1K8SQ1RYCU1-A40 - Verify in DUT as client side: + Verify in DUT as commissioner side: [1657210956708] [28601:16575811] CHIP: [CTL] Received CommissioningComplete response, errorCode=0 [1657210956708] [28601:16575811] CHIP: [CTL] Successfully finished commissioning step "SendComplete" [1657210956708] [28601:16575811] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" @@ -139,9 +171,13 @@ tests: tag 0x82, length 0x03e8)" PICS: MCORE.DD.SCAN_QR_CODE verification: | + No applicable TH logs. + + 1. Launch the TH commissionee app and get QR code from TH side $ ./out/all-clusters-app/chip-all-clusters-app - 1. To generate the QR code containing the 1000-byte TLV data, use the following command and piece together the 2 log lines of output. NOTE: The finished QR code is in the Test step already. + 2. Build TLV Data into TH"s QR code using chip-tool"s generate-qrcode command. To generate the QR code containing the 1000-byte TLV data, use the following command and piece together the 2 log lines of output. + NOTE: The finished QR code is in the verification step already. ./chip-tool payload generate-qrcode --existing-payload MT:-24J0AFN00KA0648G00 --tlvBytes hex:152d82e8033132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393018 [1659491902.799305][3965:3965] CHIP:TOO: QR Code: MT:-24J0AFN00KA064IJ3P0JFQB7TZZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1Z @@ -155,10 +191,20 @@ tests: verification: | ./chip-tool pairing code 1 MT:-24J0AFN00KA064IJ3P0JFQB7TZZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T1VFSK1S3DO1ZTZR1UNMJ1DK5N1K8SQ1RYCU1--ZL15PKP1CD5T11UXS0 - Verify in TH as server side: + Verify in TH as commissionee side: [1659491845.473705][3953:3953] CHIP:SVR: Commissioning completed successfully - Verify on the DUT as client side: + Verify in DUT as commissioner side: [1659491845308] [14021:5374393] CHIP: [TOO] Device commissioning completed with success disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml index be9a358ee1bb8f..389197ac1e2d81 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml @@ -25,12 +25,18 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - The DUT is switched on and the DUT is transport-connected (BLE, Wi-Fi or Ethernet) + disabled: true + - label: "If TH knows the DUTs Discovery Capability Bitmask, it starts the commissioning process in any order of priority on all of the networking technologies that are supported by both the TH and the DUT" verification: | TH selects the DUT"s capability bitmask and start the commissiong process accordingly + No applicable TH or DUT logs. disabled: true - label: @@ -42,6 +48,7 @@ tests: verification: | If (PICS_CHIP_DEV) BLE discovery tool should discover the DUT else it should not If !(PICS_CHIP_DEV) instruct DUT to start Advertising and scan again for commissionale devices using the BLE discovery tool + No applicable TH or DUT logs. 1. Discover commissionables over BLE using a BLE discovery tool of choice. Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) @@ -52,12 +59,16 @@ tests: - label: "TH does not respond to DUT and DUT keeps sending ADVs" PICS: MCORE.COM.BLE verification: | + Verify in DUT as commissionee side: + [5855][P][DIS]Advertise commission parameter vendorID=65521 productID=32773 discriminator=3840/15 disabled: true - label: "TH does not respond to DUT and DUT keeps sending ADVs" PICS: MCORE.COM.BLE verification: | + No applicable TH or DUT logs. + This step can be verified using a BLE discovery tool of choice. Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) OR @@ -67,9 +78,10 @@ tests: - label: "TH does not respond to DUT and DUT keeps sending ADVs" PICS: MCORE.COM.BLE verification: | - This step can be verified using BLE discovery tool of choice (Try NRF Connect OR HCIDump) + This BLE advertisements can be verified using BLE discovery tool of choice (Try NRF Connect OR HCIDump) ->For T0 and 30s we have to get advertisement range between 20ms to 60ms ->For 30s and 15mins we have to get advertisement range between 150ms to 1200ms + Verify in DUT as commissionee side: I: 3242 [DL]CHIPoBLE advertising started I: 3279 [DL]NFC Tag emulation started @@ -86,6 +98,7 @@ tests: After 900s (that is 15min) advertisement stops + Verify in DUT as commissionee side: D: 903154 [DIS]Scheduling extended discovery timeout in 900s E: 903160 [DIS]Failed to finalize service update: Error CHIP:0x0000001C @@ -97,6 +110,8 @@ tests: - label: "TH does not respond to DUT. User power cycles the DUT" PICS: MCORE.COM.BLE verification: | + 1. Reboot the DUT commissionee + sudo reboot disabled: true @@ -106,6 +121,7 @@ tests: PICS: MCORE.COM.BLE verification: | Check timestamp, ADV stop after 15 mins + Verify in DUT as commissionee side: D: 903154 [DIS]Scheduling extended discovery timeout in 900s E: 903160 [DIS]Failed to finalize service update: Error CHIP:0x0000001C @@ -140,6 +156,7 @@ tests: mandatory Commissionable Node Discovery service records over DNS-SD." verification: | $ ./chip-tool discover commissionables + Verify in TH as commissioner side: Example output using all-clusters-app"s advertisements: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 @@ -166,8 +183,9 @@ tests: MCORE.DD.TXT_KEY_RI && MCORE.DD.TXT_KEY_PH && MCORE.DD.TXT_KEY_PI verification: | $ ./chip-tool discover commissionables + Verify in TH as commissioner side: - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app"s advertisements found on the TH commissioner: [1657218902314] [29617:16663220] CHIP: [DL] Browsing for: _matterc._udp [1657218902488] [29617:16663220] CHIP: [DL] Mdns: OnBrowseAdd name: 5B4185091B6CAD28, type: _matterc._udp., domain: local., interface: 7 [1657218902488] [29617:16663220] CHIP: [DL] Resolve type=_matterc._udp name=5B4185091B6CAD28 interface=7 [1657218902489] [29617:16663220] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:5B4185091B6CAD28._matterc._udp.local. interface: 7 [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 @@ -217,8 +235,9 @@ tests: Commissionable Node Discovery service record over DNS-SD." verification: | $ ./chip-tool discover commissionables + Verify in TH as commissioner side: - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app"s advertisements found on the TH commissioner: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -258,15 +277,16 @@ tests: verification: | $ dns-sd -B _services._dns-sd._udp - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app"s advertisements found on the TH commissioner: 11:56:29.770 Add 3 7 . _sub.local. _V65521 disabled: true - label: "Place the DUT device into Commissioning mode" verification: | $ ./chip-tool discover commissionables + Verify in TH as commissioner side: - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app"s advertisements found on the TH commissioner: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -289,6 +309,7 @@ tests: _matterc._udp -r)" verification: | $ ./chip-tool discover commissionables + Verify in TH as commissioner side: [1657220492275] [29906:16679893] CHIP: [DL] Browsing for: _matterc._udp [1657220492275] [29906:16679893] CHIP: [DL] Mdns: OnBrowseAdd name: 74AFA51731B2E373, type: _matterc._udp., domain: local., interface: 7 [1657220492275] [29906:16679893] CHIP: [DL] Resolve type=_matterc._udp name=74AFA51731B2E373 interface=7 diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml index f81a32a10543fd..c02101c86ed49e 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml @@ -26,10 +26,23 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.4.3. Discovery by Commissioner - DUT supports BLE (central role), Wi-Fi and IP connectivity - Wi-Fi certified n client + + 2 - Test Harness must support all discovery transport technologies as the DUT (i.e. BLE, Wi-Fi and IP connectivity) + disabled: true + - label: "TH starts matter announcement procedure using BLE transport" PICS: MCORE.DD.DISCOVERY_BLE verification: | $ ./out/ble/chip-all-clusters-app --ble-device 1 --discriminator 3841 + Verify in TH as commissionee side: [1657221603.350406][368108:368108] CHIP:DL: Device Configuration: [1657221603.350445][368108:368108] CHIP:DL: Serial Number: TEST_SN @@ -56,14 +69,14 @@ tests: verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing - Verify in TH as server side + Verify in TH as commissionee side: $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - Verify in DUT as client side + Verify in DUT as commissioner side: [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -114,14 +127,14 @@ tests: verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing command - Verify in TH as server side + Verify in TH as commissionee side: $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - Verify in DUT as client side + Verify in DUT as commissioner side: [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -172,7 +185,7 @@ tests: verification: | $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 - Verify in TH as server side + Verify in TH as commissionee side [1653087913.247229][8083:8083] CHIP:SVR: Server Listening... [1653087913.247636][8083:8083] CHIP:DL: Device Configuration: [1653087913.248094][8083:8083] CHIP:DL: Serial Number: TEST_SN @@ -190,19 +203,19 @@ tests: [1653087913.254268][8083:8083] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 29f72814 disabled: true - - label: "DUT must find TH and provide onboarding data for validation." + - label: "" PICS: MCORE.DD.DISCOVERY_BLE verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing command - Verify in TH as server side + Verify in TH as commissionee side: $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - Verify in DUT as client side + Verify in DUT as commissioner side: [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -291,22 +304,40 @@ tests: "With DUT and TH connected to the same network over IP, DUT performs service discovery using DNS-SD" verification: | - 1. TH is in commissioning mode and discoverable by DUT over IP through DNS-SD advertisements + 1. TH is in commissioning mode and discoverable by DUT over IP through DNS-SD advertisements. This can also be verified using through the DUT"s pairing command over IP. + + Verify in TH as commissionee side: + $ ./out/all-clusters-app/chip-all-clusters-app + [1660154789.496930][7968:7968] CHIP:DIS: CHIP minimal mDNS started advertising. + [1660154789.499623][7968:7968] CHIP:DL: Using wifi MAC for hostname + [1660154789.499743][7968:7968] CHIP:DIS: Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1 + [1660154789.501718][7968:7968] CHIP:DIS: Responding with _matterc._udp.local + [1660154789.501757][7968:7968] CHIP:DIS: Responding with 092C5C8AE5285458._matterc._udp.local + [1660154789.501780][7968:7968] CHIP:DIS: Responding with DCA632A849EA0000.local + [1660154789.501802][7968:7968] CHIP:DIS: Responding with DCA632A849EA0000.local + [1660154789.501830][7968:7968] CHIP:DIS: Responding with _V65521._sub._matterc._udp.local + [1660154789.501858][7968:7968] CHIP:DIS: Responding with _S15._sub._matterc._udp.local + [1660154789.501882][7968:7968] CHIP:DIS: Responding with _L3840._sub._matterc._udp.local + [1660154789.501907][7968:7968] CHIP:DIS: Responding with _CM._sub._matterc._udp.local + [1660154789.501945][7968:7968] CHIP:DIS: Responding with 092C5C8AE5285458._matterc._udp.local + [1660154789.501966][7968:7968] CHIP:DIS: CHIP minimal mDNS configured as "Commissionable node device". + - Verify in DUT as client side + Verify in DUT as commissioner side: $ ./chip-tool discover commissionables - [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 - [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 - [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 - [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 - [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 - [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 - [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 - [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 - [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms - [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + OR + $ ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 + [1660155158954] [99591:10441026] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::e5d0:7f0d:7aad:d736 + [1660155158954] [99591:10441026] CHIP: [DIS] Hostname: DCA632A849EA0000 [1660155158954] [99591:10441026] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:1fac:42fd:dd74:dcc5 + [1660155158954] [99591:10441026] CHIP: [DIS] IP Address #2: 2603:8001:7e00:e001:d669:2a30:7e9e:7121 + [1660155158954] [99591:10441026] CHIP: [DIS] IP Address #3: fe80::e5d0:7f0d:7aad:d736 + [1660155158954] [99591:10441026] CHIP: [DIS] Port: 5540 + [1660155158954] [99591:10441026] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1660155158954] [99591:10441026] CHIP: [DIS] Mrp Interval active: 300 ms + [1660155158954] [99591:10441026] CHIP: [DIS] Vendor ID: 65521 + [1660155158954] [99591:10441026] CHIP: [DIS] Product ID: 32769 + [1660155158954] [99591:10441026] CHIP: [DIS] Long Discriminator: 3840 + [1660155158954] [99591:10441026] CHIP: [DIS] Pairing Hint: 33 + [1660155158954] [99591:10441026] CHIP: [DIS] Instance Name: 8BA2031BFBF2BCDE + [1660155158954] [99591:10441026] CHIP: [DIS] Commissioning Mode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml index 7d21c8276e1f1e..a745aae5ad4ba0 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_1.yaml @@ -24,11 +24,16 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be IP-based(Ethernet or WiFi) or Thread. Commissioner can either be a Matter device which is already on a network or the test harness connected to the network. + disabled: true + - label: "Commissioner and Commissionee discover each other and connect via the discovery mode applicable for the DUT." verification: | - Verify in TH as server side: sudo ./chip-all-clusters-app --wifi --discriminator 3841 + Verify in DUT as commissionee side: sudo ./chip-all-clusters-app --wifi --discriminator 3841 [1653471956.966855][10713:10713] CHIP:SPT: PASE PBKDF iterations set to 1000 [1653471956.966887][10713:10713] CHIP:SPT: LinuxCommissionableDataProvider didn"t get a PASE salt, generating one. @@ -52,7 +57,7 @@ tests: [1653471956.972769][10713:10713] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 [1653471956.972803][10713:10713] CHIP:SVR: Manual pairing code: [749701123365521327694] - + Verify on TH as commissioner side: connectedhomeip/examples/chip-tool/out/debug$ ./chip-tool discover commissionables Waiting for device responses... CHIP:CTL: Generating ICAC @@ -202,7 +207,7 @@ tests: verification: | Verify that the responder receives the PBKDFParamRequest message - Verify in TH as server side + Verify in DUT as commissionee side CHIP:SC: Received PBKDF param request CHIP:SC: Peer assigned session ID 18450 CHIP:SC: Found MRP parameters in the message @@ -212,7 +217,7 @@ tests: CHIP:IN: Sending unauthenticated msg 0xaaaaad340560 with MessageCounter:1341084110 to 0x0000000000000000 at monotonic time: 0000000000FBA380 msec CHIP:SC: Sent PBKDF param response - Verify in DUT as client side + Verify in TH as commissioner side Sent PBKDF param request [1653471961.364996][30157:30162] CHIP:CTL: Setting wifi credentials from parameters [1653471961.365051][30157:30162] CHIP:CTL: Setting attestation nonce to random value @@ -230,11 +235,11 @@ tests: "Commissioner SHALL re-arm Fail-safe timer on Commissionee within 60s (the autonomously Fail-safe timer length set by Commissionee)" verification: | - Verify in TH as server side + Verify in DUT as commissionee side CHIP:DL: NVS set: chip-config/fail-safe-armed = true - Verify in DUT as client side + Verify in TH as commissioner side : Performing next commissioning step "ArmFailSafe" [1653471968.064493][30157:30162] CHIP:CTL: Arming failsafe (60 seconds) @@ -245,13 +250,13 @@ tests: Commissionee." PICS: MCORE.COM.WIRELESS verification: | - Verify in DUT as client side + Verify in TH as commissioner side Performing next commissioning step "ConfigRegulatory" [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) - Verify in TH as server side + Verify in DUT as commissionee side NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true @@ -259,13 +264,13 @@ tests: "Commissioner requests operational CSR from Commissionee with OperationalCSRRequest command" verification: | - Verify in DUT as client side after commissioning + Verify in TH as commissioner side after commissioning [1646909537.102263][3145:3150] CHIP:CTL: Received Attestation Information from the device [1646909537.102418][3145:3150] CHIP:CTL: Verifying attestation [1646909537.115081][3145:3150] CHIP:CTL: Successfully validated "Attestation Information" command received from the device. - Verify in TH as server side + Verify in DUT as commissionee side OpCreds: Received a CSRRequest command CHIP:ZCL: OpCreds: NewCertificateSigningRequest succeeded disabled: true @@ -274,11 +279,11 @@ tests: "Commissioner configures operational credentials on DUT if not previously installed" verification: | - Verify in TH as server side + Verify in DUT as commissionee side OpCreds: Received an AddTrustedRootCertificate command - Verify in DUT as client side + Verify in TH as commissioner side Sending root certificate to the device CHIP:DMG: ICR moving to [AddingComm] @@ -293,7 +298,7 @@ tests: "Commissioner configures itself as administrator in ACL on DUT if needed" verification: | - Verify in DUT as client side after commissioning + Verify in TH as commissioner side after commissioning CHIP:CTL: Commissioning stage next step: "SendTrustedRootCert" -> "SendNOC" [1653471969.812357][30157:30162] CHIP:CTL: Performing next commissioning step "SendNOC" @@ -347,7 +352,7 @@ tests: [1653471970.347439][30157:30162] CHIP:TOO: Secure Pairing Success [1653471970.347485][30157:30162] CHIP:CTL: Successfully finished commissioning step "SendNOC" - Verify in TH as server side + Verify in DUT as commissionee side OpCreds: Received an AddNOC command disabled: true @@ -356,7 +361,7 @@ tests: "Commissioner configures operational network on DUT if DUT both supports and requires" verification: | - Verify in DUT as client side after commissioning + Verify in TH as commissioner side after commissioning [1646909537.345068][3145:3150] CHIP:CTL: Received certificate signing request from the device disabled: true @@ -365,7 +370,7 @@ tests: "Commissioner instructs Commissionee to connect to operational network if not already connected" verification: | - Verify in DUT as client side after commissioning + Verify in TH as commissioner side after commissioning [1646909537.976592][3145:3150] CHIP:CTL: Operational credentials provisioned on device 0xffffac001730 [1646909537.976664][3145:3150] CHIP:TOO: Secure Pairing Success @@ -373,7 +378,7 @@ tests: - label: "Commissioner starts discovery of DUT using Operational Discovery" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Commissioning stage next step: "SendNOC" -> "FindOperational" [1653471976.344532][30157:30162] CHIP:CTL: Performing next commissioning step "FindOperational" @@ -395,18 +400,22 @@ tests: - label: "Commissioner opens a CASE session with DUT over operational network" verification: | - Verify in TH as server side + Verify in DUT as commissionee side + + [1660154789.690124][7968:7968] CHIP:IN: CASE Server enabling CASE session setups + [1660154789.690208][7968:7968] CHIP:IN: SecureSession[0xaaaab75fae10]: Allocated Type:2 LSID:55651 + [1660154789.690248][7968:7968] CHIP:SC: Allocated SecureSession (0xaaaab75fae10) - waiting for Sigma1 msg + [1660154789.690276][7968:7968] CHIP:SVR: Joining Multicast groups + [1660154789.690304][7968:7968] CHIP:ZCL: Emitting StartUp event + [1660154789.690395][7968:7968] CHIP:EVL: LogEvent event number: 0x0000000000000002 priority: 2, endpoint id: 0x0 cluster id: 0x0000_0028 event id: 0x0 Sys timestamp: 0x00000000001D1D86 - CASE Server enabling CASE session setups - [1653471957.713139][10713:10713] CHIP:SVR: Joining Multicast groups - [1653471957.713654][10713:10713] CHIP:ZCL: Emitting StartUp event - [1653471957.714762][10713:10713] CHIP:EVL: LogEvent event number: 0x0000000000000000 priority: 2, endpoint id: 0x0 cluster id: 0x0000_0028 event id: 0x0 Sys timestamp: 0x000000000059AC88 - [1653471957.715456][10713:10713] CHIP:ZCL: GeneralDiagnosticsDelegate: OnDeviceRebooted + Verify in TH as commissioner side + [1660154794132] [99576:10438621] CHIP: [TOO] CASE establishment successful disabled: true - label: "Commissioner sends CommissioningComplete command" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Received CommissioningComplete response disabled: true @@ -415,7 +424,7 @@ tests: "Commissioning channel between the Commissioner and Commissionee is terminated." verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Successfully finished commissioning step "SendComplete" CHIP:CTL: Commissioning stage next step: "SendComplete" -> "Cleanup" diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml index fd3cd615e01ac3..b81143cb4ce851 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_10.yaml @@ -27,6 +27,16 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 -DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + disabled: true + - label: "DUT receives Onboarding Payload from the TH with Custom Flow field set to value 2" @@ -48,26 +58,25 @@ tests: disabled: true - label: - "DUT fetches commissioning data from DCL using VID and PID from - Onboarding Payload" - PICS: MCORE.DD.FETCH_DCL + "User follows any TH-specific steps to place the TH Commissionee into + commissioning mode." verification: | - 1. Observe the TH"s DCL on the DUT - disabled: true - - - label: - "Using the instructions located at the CommissioningCustomFlowURL from - the DCL, DUT guides the user in next steps to prepare the commissionee - (TH) for commissioning" - PICS: MCORE.DD.FETCH_DCL - verification: | - 1. Follow instructions for commissioning using the URL contained in the DCL + 1. Launch the TH commissionee all-clusters-app: + $ ./chip-all-clusters-app + Verifiy on TH as commissionee side: + [1660152729.426029][648909:648909] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== + [1660152729.426076][648909:648909] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1660152729.426103][648909:648909] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1660152729.426123][648909:648909] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 disabled: true - label: "DUT commissions TH" verification: | $ ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 - [1657578523795] [9610:351965] CHIP: [CTL] Successfully finished commissioning step "Cleanup" - [1657578523795] [9610:351965] CHIP: [TOO] Device commissioning completed with success + Verify in DUT as commissioner side: + CHIP:CTL: Received CommissioningComplete response + + Verifiy on TH as commissionee side: + [1660154248.898113][7143:7143] CHIP:SVR: Commissioning completed successfully disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml index a2f62b1675d2bf..82ab752313d6d3 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml @@ -28,6 +28,38 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.3 - QR code is printed on the device or in additional provided materials (ex: manual). + + An example onboarding QR code could be "MT:-24J029Q00KA0648G00" (following 5.1.3 "QR Code", Table 34 "Packed Binary Data Structure for Onboarding Payload") which includes: + + - 3-bit Version String=000 + + - 16-bit Vendor ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier") + + - 16-bit Product ID=0x8001 (as defined in section 2.5.3. "Product Identifier") + + - 2-bit Custom Flow=10 (Custom Commissioning Flow = 2) + + - 8-bit Discovery Capabilities Bitmask=00000100 (OnNetwork) + + - 12-bit Discriminator=0xF00 + + - 27-bit Passcode=20202021 + + - 4-bit Padding=0000 + + - no variable-length TLV Data included (as defined in section 5.1.3.1. "Payload", subsection "TLV Data") + disabled: true + - label: "Standard Commissioning Flow: Use a Commissionee with a QR code that has the Custom Flow field set to 0 and supports BLE for its Discovery @@ -35,6 +67,8 @@ tests: spec. documentation." PICS: MCORE.DD.DISCOVERY_BLE verification: | + Verify on the TH as commissionee side: + $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 --ble-device 1 ... [1657232267.387816][370320:370320] CHIP:DL: Device Configuration: @@ -65,13 +99,13 @@ tests: using BLE" PICS: MCORE.DD.DISCOVERY_BLE verification: | - TH Commissionee: + Verify on the TH as commissionee side: [1657232374.956508][370357:370357] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 [1657232374.956534][370357:370357] CHIP:SVR: Commissioning completed successfully [1657232374.956577][370357:370357] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 [1657232374820] [31379:16804218] CHIP: [CTL] Received CommissioningComplete response, errorCode=0 @@ -92,6 +126,7 @@ tests: verification: | $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 0 --capabilities 4 + Verify on the TH as commissionee side: [1651105420.610637][27312:27312] CHIP:DL: Device Configuration: [1651105420.610695][27312:27312] CHIP:DL: Serial Number: TEST_SN [1651105420.610727][27312:27312] CHIP:DL: Vendor Id: 65521 (0xFFF1) @@ -108,7 +143,9 @@ tests: - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | - 1. Verify the QR code is scanned by DUT, chip-tool does not support physically scanning QR codes + 1. Verify the QR code is scanned by DUT + + Note: chip-tool does not support physically scanning QR codes disabled: true - label: @@ -117,12 +154,12 @@ tests: using IP Network" PICS: MCORE.DD.DISCOVERY_IP verification: | - TH Commissionee: + Verify on the TH Commissionee side: [1651105530.973166][27371:27371] CHIP:SVR: Commissioning completed successfully [1651105530.973215][27371:27371] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on the DUT Commissioner: $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651105530854] [95067:65607294] CHIP: [CTL] Received CommissioningComplete response diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml index c4d4b2ed7e5fed..9adbd5d30f2adf 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml @@ -28,6 +28,38 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.3 - QR code is printed on the device or in additional provided materials (ex: manual). + + An example onboarding QR code could be "MT:-24J029Q00KA0648G00" (following 5.1.3 "QR Code", Table 34 "Packed Binary Data Structure for Onboarding Payload") which includes: + + - 3-bit Version String=000 + + - 16-bit Vendor ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier") + + - 16-bit Product ID=0x8001 (as defined in section 2.5.3. "Product Identifier") + + - 2-bit Custom Flow=10 (Custom Commissioning Flow = 2) + + - 8-bit Discovery Capabilities Bitmask=00000100 (OnNetwork) + + - 12-bit Discriminator=0xF00 + + - 27-bit Passcode=20202021 + + - 4-bit Padding=0000 + + - no variable-length TLV Data included (as defined in section 5.1.3.1. "Payload", subsection "TLV Data") + disabled: true + - label: "User-Intent Commissioning Flow: Use a Commissionee with a QR code that has the Custom Flow field set to 1 and supports BLE for its @@ -36,9 +68,10 @@ tests: documentation." PICS: MCORE.DD.DISCOVERY_BLE verification: | + Verify on the TH as commissionee side: + $ ./out/ble/all-clusters-app/chip-all-clusters-app --capabilities 2 --custom-flow 1 --ble-device 1 ... - [1657234110.765139][370717:370717] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== [1657234110.765249][370717:370717] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00] [1657234110.765314][370717:370717] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: [1657234110.765364][370717:370717] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00 @@ -48,36 +81,32 @@ tests: PICS: MCORE.DD.SCAN_QR_CODE verification: | 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: "DUT parses QR code." PICS: MCORE.DD.DISCOVERY_BLE verification: | - 1. Follow the steps given in the TH"s pairing hint to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + 1. Parse the payload of the TH commissionee - On DUT=chip-tool: - ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 - [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step "SendComplete" - [1657234147237] [31454:16822562] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" - [1657234147237] [31454:16822562] CHIP: [CTL] Performing next commissioning step "Cleanup" - [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step "Cleanup" - [1657234147237] [31454:16822562] CHIP: [TOO] Device commissioning completed with success + Verify on the DUT Commissioner side: + $ ./chip-tool payload parse-setup-payload MT:-24J0YXE00KA0648G00 + + 2. Verify that TH logs do not show the commissionee being commissioned by the DUT. disabled: true - label: - "Follow any steps from the resources provided by the pairing hint or - by the THs manufacturer for putting the TH Commissionee device into - commissioning mode and to complete the commissioning process using - BLE." + "User should follow any TH-specific steps for putting the TH + Commissionee device into commissioning mode and to complete the + commissioning process using BLE." PICS: MCORE.DD.DISCOVERY_BLE verification: | - TH Commissionee: + Verify on the TH Commissionee side: [1651101988.943015][23212:23212] CHIP:SVR: Commissioning completed successfully [1651101988.943058][23212:23212] CHIP:DIS: Updating services using commissioning mode 0 - - On DUT Commissioner=chip-tool: + Verify on the DUT Commissioner side: ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 [1657234147237] [31454:16822562] CHIP: [CTL] Successfully finished commissioning step "SendComplete" [1657234147237] [31454:16822562] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" @@ -94,47 +123,43 @@ tests: documentation." PICS: MCORE.DD.DISCOVERY_IP verification: | + Verify on the TH Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 1 --capabilities 4 - [1657234233.898170][370755:370755] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== - [1657234233.898195][370755:370755] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] - [1657234233.898227][370755:370755] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1657234233.898248][370755:370755] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 + [1660353382.200125][249074:249074] CHIP:SVR: SetupQRCode: [MT:-24J029Q00KA0648G00] + [1660353382.200152][249074:249074] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1660353382.200173][249074:249074] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J029Q00KA0648G00 disabled: true - label: "Scan the QR code from the previous step using the DUT." PICS: MCORE.DD.SCAN_QR_CODE verification: | 1. Verify the QR code is scanned by DUT + Note: chip-tool does not support physically scanning QR codes disabled: true - label: "DUT parses QR code." PICS: MCORE.DD.DISCOVERY_IP verification: | - 1. Follow the steps given in the TH"s pairing hint to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network + 1. Parse the payload of the TH commissionee + Verify on the DUT Commissioner side: + $ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 - On DUT=chip-tool: - ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 - [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step "SendComplete" - [1657234324847] [31475:16824564] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" - [1657234324847] [31475:16824564] CHIP: [CTL] Performing next commissioning step "Cleanup" - [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step "Cleanup" - [1657234324847] [31475:16824564] CHIP: [TOO] Device commissioning completed with success + 2. Verify that TH logs do not show the commissionee being commissioned by the DUT. disabled: true - label: - "Follow any steps from the resources provided by the pairing hint or - by the THs manufacturer for putting the TH Commissionee device into - commissioning mode and to complete the commissioning process using IP - Network." + "User should follow any TH-specific steps for putting the TH + Commissionee device into commissioning mode and to complete the + commissioning process using IP Network." PICS: MCORE.DD.DISCOVERY_IP verification: | - TH all-clusters-app: + Verify on the TH Commissionee side: [1657234324.992098][370755:370755] CHIP:SVR: Commissioning completed successfully [1657234324.992146][370755:370755] CHIP:DIS: Updating services using commissioning mode 0 - On DUT=chip-tool: + Verify on the DUT Commissioner side: ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 [1657234324847] [31475:16824564] CHIP: [CTL] Successfully finished commissioning step "SendComplete" [1657234324847] [31475:16824564] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" @@ -170,10 +195,9 @@ tests: disabled: true - label: - "Follow any steps from the resources provided by the pairing hint or - by the THs manufacturer for putting the TH Commissionee device into - commissioning mode and to complete the commissioning process using - SoftAP." + "User should follow any TH-specific steps for putting the TH + Commissionee device into commissioning mode and to complete the + commissioning process using SoftAP." PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | Out of Scope for V1.0 diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml index ce576dad278dd9..462dce0ec17513 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml @@ -28,6 +28,38 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.3 - QR code is printed on the device or in additional provided materials (ex: manual). + + An example onboarding QR code could be "MT:-24J029Q00KA0648G00" (following 5.1.3 "QR Code", Table 34 "Packed Binary Data Structure for Onboarding Payload") which includes: + + - 3-bit Version String=000 + + - 16-bit Vendor ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier") + + - 16-bit Product ID=0x8001 (as defined in section 2.5.3. "Product Identifier") + + - 2-bit Custom Flow=10 (Custom Commissioning Flow = 2) + + - 8-bit Discovery Capabilities Bitmask=00000100 (OnNetwork) + + - 12-bit Discriminator=0xF00 + + - 27-bit Passcode=20202021 + + - 4-bit Padding=0000 + + - no variable-length TLV Data included (as defined in section 5.1.3.1. "Payload", subsection "TLV Data") + disabled: true + - label: "Custom Commissioning Flow: Use a Commissionee with a QR code that has the Custom Flow field set to 2 and supports BLE for its Discovery @@ -35,6 +67,7 @@ tests: Version bit string follows the current Matter spec. documentation." PICS: MCORE.DD.DISCOVERY_BLE verification: | + Verify on the TH Commissionee side: $ ./out/ble/all-clusters-app/chip-all-clusters-app --custom-flow 2 --capabilities 2 [1657235055.253604][370941:370941] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== @@ -53,27 +86,36 @@ tests: - label: "DUT parses QR code." PICS: MCORE.DD.DISCOVERY_BLE verification: | - 1. Follow the steps given in the TH"s URL to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network - - On DUT=chip-tool: - ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 - [1657235087918] [31502:16832693] CHIP: [CTL] Successfully finished commissioning step "Cleanup" - [1657235087918] [31502:16832693] CHIP: [TOO] Device commissioning completed with success + 1. Parse the payload of the TH commissionee + + Verify on the DUT Commissioner side: + $ ./chip-tool payload parse-setup-payload MT:-24J0YXE00KA0648G00 + [1660352364702] [20244:11810896] CHIP: [SPL] Parsing base38Representation: MT:-24J0YXE00KA0648G00 + [1660352364702] [20244:11810896] CHIP: [SPL] Version: 0 + [1660352364702] [20244:11810896] CHIP: [SPL] VendorID: 65521 + [1660352364702] [20244:11810896] CHIP: [SPL] ProductID: 32769 + [1660352364702] [20244:11810896] CHIP: [SPL] Custom flow: 2 (CUSTOM) + [1660352364702] [20244:11810896] CHIP: [SPL] Capabilities: 0x02 (BLE) + [1660352364702] [20244:11810896] CHIP: [SPL] Discriminator: 3840 + [1660352364702] [20244:11810896] CHIP: [SPL] Passcode: 20202021 + + 2. Verify that TH logs do not show the commissionee being commissioned by the DUT. disabled: true - label: - "User should follow any steps from the CommissioningCustomFlowUrl - within the THs DCL, unless the DUT has alternative means to guide the - user to successful commissioning, for putting the TH Commissionee into - commissioning mode, for triggering the DUT Commissioner for - commissioning, and for completing the commissioning process using BLE." + "User should follow any TH-specific steps, unless the DUT has + alternative means to guide the user to successful commissioning, for + putting the TH Commissionee into commissioning mode, for triggering + the DUT Commissioner for commissioning, and for completing the + commissioning process using BLE." PICS: MCORE.DD.DISCOVERY_BLE verification: | - TH all-clusters-app: + Verify on the TH Commissionee side: [1657235088.040328][370941:370941] CHIP:SVR: Commissioning completed successfully [1657235088.040371][370941:370941] CHIP:DIS: Updating services using commissioning mode 0 - DUT chip-tool: $ ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 + Verify on the DUT Commissioner side: + $ ./chip-tool pairing code 1 MT:-24J0YXE00KA0648G00 [1657235087918] [31502:16832693] CHIP: [CTL] Successfully finished commissioning step "Cleanup" [1657235087918] [31502:16832693] CHIP: [TOO] Device commissioning completed with success disabled: true @@ -86,6 +128,7 @@ tests: documentation." PICS: MCORE.DD.DISCOVERY_IP verification: | + Verify on the TH Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app --custom-flow 2 --capabilities 4 [1657235141.663008][370963:370963] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ==== @@ -104,28 +147,35 @@ tests: - label: "DUT parses QR code." PICS: MCORE.DD.DISCOVERY_IP verification: | - 1. Follow the steps given in the TH"s URL to allow for commissioning to happen. TH should not be commissioned until these steps were followed and indicate DUT can proceed with commissioning the TH to the Matter network - - On DUT=chip-tool: - ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 - [1657235198856] [31506:16834043] CHIP: [CTL] Successfully finished commissioning step "Cleanup" - [1657235198856] [31506:16834043] CHIP: [TOO] Device commissioning completed with success + 1. Parse the payload of the TH commissionee + + Verify on the DUT Commissioner side: + $ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 + [1660352541112] [20246:11812333] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 + [1660352541113] [20246:11812333] CHIP: [SPL] Version: 0 + [1660352541113] [20246:11812333] CHIP: [SPL] VendorID: 65521 + [1660352541113] [20246:11812333] CHIP: [SPL] ProductID: 32769 + [1660352541114] [20246:11812333] CHIP: [SPL] Custom flow: 2 (CUSTOM) + [1660352541114] [20246:11812333] CHIP: [SPL] Capabilities: 0x04 (On IP network) + [1660352541114] [20246:11812333] CHIP: [SPL] Discriminator: 3840 + [1660352541114] [20246:11812333] CHIP: [SPL] Passcode: 20202021 + + 2. Verify that TH logs do not show the commissionee being commissioned by the DUT. disabled: true - label: - "User should follow any steps from the CommissioningCustomFlowUrl - within the THs DCL, unless the DUT has alternative means to guide the - user to successful commissioning, for putting the TH Commissionee into - commissioning mode, for triggering the DUT Commissioner for - commissioning, and for completing the commissioning process using IP - Network." + "User should follow any TH-specific steps, unless the DUT has + alternative means to guide the user to successful commissioning, for + putting the TH Commissionee into commissioning mode, for triggering + the DUT Commissioner for commissioning, and for completing the + commissioning process using IP Network." PICS: MCORE.DD.DISCOVERY_IP verification: | - TH all-clusters-app: + Verify on the TH Commissionee side: [1657235198.977848][370963:370963] CHIP:SVR: Commissioning completed successfully [1657235198.977943][370963:370963] CHIP:DIS: Updating services using commissioning mode 0 - DUT chip-tool: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 [1657235198856] [31506:16834043] CHIP: [CTL] Successfully finished commissioning step "Cleanup" [1657235198856] [31506:16834043] CHIP: [TOO] Device commissioning completed with success @@ -157,12 +207,11 @@ tests: disabled: true - label: - "User should follow any steps from the CommissioningCustomFlowUrl - within the THs DCL, unless the DUT has alternative means to guide the - user to successful commissioning, for putting the TH Commissionee into - commissioning mode, for triggering the DUT Commissioner for - commissioning, and for completing the commissioning process using - SoftAP." + "User should follow any TH-specific steps, unless the DUT has + alternative means to guide the user to successful commissioning, for + putting the TH Commissionee into commissioning mode, for triggering + the DUT Commissioner for commissioning, and for completing the + commissioning process using SoftAP." PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | Out of Scope for V1.0 diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml index 42fa580bc34c8a..e09184f8560eeb 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml @@ -27,8 +27,41 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.3 - QR code is printed on the device or in additional provided materials (ex: manual). + + An example onboarding QR code could be "MT:-24J029Q00KA0648G00" (following 5.1.3 "QR Code", Table 34 "Packed Binary Data Structure for Onboarding Payload") which includes: + + - 3-bit Version String=000 + + - 16-bit Vendor ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier") + + - 16-bit Product ID=0x8001 (as defined in section 2.5.3. "Product Identifier") + + - 2-bit Custom Flow=10 (Custom Commissioning Flow = 2) + + - 8-bit Discovery Capabilities Bitmask=00000100 (OnNetwork) + + - 12-bit Discriminator=0xF00 + + - 27-bit Passcode=20202021 + + - 4-bit Padding=0000 + + - no variable-length TLV Data included (as defined in section 5.1.3.1. "Payload", subsection "TLV Data") + disabled: true + - label: "Locate and scan/read the Commissionees QR code using DUT" verification: | + Verify on the TH Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 2 --capabilities 4 --discriminator 3840 --passcode 20202021 [1657235470.970680][371041:371041] CHIP:DL: Device Configuration: @@ -52,6 +85,7 @@ tests: Version String (i.e. 010 or any non-zero 3-bit value)" verification: | 1. Use chip-tool"s "payload generate-qrcode" command to help generate the new, invalid QR code + Verify on the TH Commissionee side: $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --allow-invalid-payload 1 --version 2 [1657235626568] [31698:16839018] CHIP: [TOO] QR Code: MT:034J029Q00KA0648G00 disabled: true @@ -59,8 +93,10 @@ tests: - label: "Scan/read the QR code, generated in the previous step, using the DUT" verification: | - TH all-clusters-app: + Verify on the DUT Commissioner side: Run command failure: ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:50: CHIP Error 0x0000002F: Invalid argument + + No applicable TH Logs disabled: true - label: @@ -70,13 +106,18 @@ tests: PICS: MCORE.DD.DISCOVERY_BLE verification: | 1. Use chip-tool"s "payload generate-qrcode" command to help generate the new, invalid QR code + Verify on the TH Commissionee side: $ ./chip-tool payload generate-qrcode --existing-payload MT:-24J029Q00KA0648G00 --allow-invalid-payload 1 --rendezvous 4 [1657235754393] [31702:16840391] CHIP: [TOO] QR Code: MT:-24J029Q00KA0648G00 + + Verify on the DUT Commissioner side: + No applicable logs on the DUT side disabled: true - label: "Scan/read the QR code of the TH device using the DUT" PICS: MCORE.DD.DISCOVERY_BLE verification: | + Verify on the DUT Commissioner side: ./chip-tool pairing code 1 MT:-24J029Q00KA0648G00 [1657235905214] [31706:16841970] CHIP: [CTL] Discovered device to be commissioned over DNS-SD ... @@ -92,6 +133,7 @@ tests: 00000000, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321" verification: | + No applicable TH or DUT Logs "MT:-24J029Q00OC0000000" (00000000), "MT:-24J029Q00KMSP0Z800" (11111111), "MT:-24J029Q00GWID1WH00" (22222222), @@ -109,7 +151,8 @@ tests: - label: "Scan each of the generated QR codes from the previous step using DUT" verification: | - TH chip-all-clusters-app Commissionee: + Verify on the DUT Commissioner side: + No applicable TH Logs ./chip-tool pairing code 1 MT:-24J029Q00OC0000000 @@ -170,11 +213,17 @@ tests: MT: (i.e. Prefix=AB:)" verification: | AB:-24J029Q00KA0648G00 + + No applicable TH or DUT Logs disabled: true - label: "Scan/read the QR code, generated in the previous step, using the DUT" verification: | + Verify on the DUT Commissioner side: + $ ./chip-tool pairing code 1 AB:-24J029Q00KA0648G00 [1657236169984] [31732:16844455] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed + + No applicable TH Logs disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml index 039487b9d39579..30475e9ee7f05e 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_15.yaml @@ -27,13 +27,42 @@ config: endpoint: 0 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: "Preconditions" + verification: | + Preconditions + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.4.2 - Manual Pairing Code is printed on the Commissionee device or in additional provided materials (ex: manual). + + An example onboarding payload could be "34970112332" (11-digit) or could be "749701123365521327694" (21-digit) (following 5.1.4. Table 37. "Manual Pairing Code Elements") which each include: + + - 1-bit VID_PID_PRESENT = 0 (11-digit) or = 1 (21-digit) + + - 1-bit VERSION=0 + + - 4-bit SHORT DISCRIMINATOR=0xF00 (4 Most-significant bits of the 12-bits Discriminator value) + + - 27-bit PASSCODE=20202021 (see section 5.1.6. Generation of the Passcode) + + - 16-bit VENDOR_ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier", for 21-digit Manual Pairing Code only) + + - 16-bit PRODUCT_ID=0x8001 (as defined in section 2.5.3. "Product Identifier", present if and only if VID is present) + + - A generated CHECK_DIGIT (see section 5.1.4. Manual Pairing Code, subsection "Check Digit") + disabled: true + - label: "Verify the THs 11-digit Manual Pairing Code meets the following criteria: - VERSION bit string string up to date with the current Matter spec. documentation - VID_PID_PRESENT bit string set to 0" PICS: MCORE.DD.11_MANUAL_PC verification: | - On TH Commissionee: + Verify on the TH Commissionee side: $ ./out/ble/all-clusters-app/chip-all-clusters-app [1651108891.390266][30833:30833] CHIP:DL: Device Configuration: [1651108891.390455][30833:30833] CHIP:DL: Serial Number: TEST_SN @@ -58,11 +87,11 @@ tests: process." PICS: MCORE.DD.11_MANUAL_PC verification: | - On TH Commissionee: + Verify on the TH Commissionee side: [1651109112.909458][30833:30833] CHIP:SVR: Commissioning completed successfully [1651109112.909503][30833:30833] CHIP:DIS: Updating services using commissioning mode 0 - On DUT Commissioner: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 34970112332 [1651109112823] [95528:65650355] CHIP: [CTL] Received CommissioningComplete response @@ -81,7 +110,7 @@ tests: PRODUCT_ID present (as defined in section 2.5.3. Product Identifier)" PICS: MCORE.DD.21_MANUAL_PC verification: | - On TH Commissionee: + Verify on the TH Commissionee side: $ ./out/ble/all-clusters-app/chip-all-clusters-app [1651109167.022364][30980:30980] CHIP:DL: Device Configuration: @@ -116,7 +145,7 @@ tests: [1651109219.100167][30980:30980] CHIP:SVR: Commissioning completed successfully [1651109219.100213][30980:30980] CHIP:DIS: Updating services using commissioning mode 0 - On DUT Commissioner: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 749701123365521327694 [1651109219028] [95536:65652322] CHIP: [CTL] Received CommissioningComplete response diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml index 3b34bd354eea56..6e9dd0f317e56b 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_16.yaml @@ -27,11 +27,39 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.4.2 - 11-digit Manual Pairing Code is printed on the Commissionee device or in additional provided materials (ex: manual). + + An example onboarding payload could be "34970112332" (following 5.1.4. Table 37. "Manual Pairing Code Elements") which each include: + + - 1-bit VID_PID_PRESENT = 0 (11-digit only) + + - 1-bit VERSION=0 + + - 4-bit SHORT DISCRIMINATOR=0xF00 (4 Most-significant bits of the 12-bits Discriminator value) + + - 27-bit PASSCODE=20202021 (see section 5.1.6. Generation of the Passcode) + + - 16-bit VENDOR_ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier", for 21-digit Manual Pairing Code only) + + - 16-bit PRODUCT_ID=0x8001 (as defined in section 2.5.3. "Product Identifier", present if and only if VID is present) + + - A generated CHECK_DIGIT (see section 5.1.4. Manual Pairing Code, subsection "Check Digit") + disabled: true + - label: "Provide the 11-digit Manual Pairing Code from the Commissionee to the DUT in any format supported by DUT" verification: | - Verify in TH as server side + Verify on the TH Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --custom-flow 0 --capabilities 4 --discriminator 3840 --passcode 20202021 [1651180718.960383][13218:13218] CHIP:DL: Device Configuration: @@ -56,10 +84,10 @@ tests: 2" verification: | 1. Use chip-tool"s "payload verhoeff-generate" command to help generate the new, invalid Manual code + No applicable DUT or TH logs $ ./chip-tool payload verhoeff-generate 8497011233 - Verify in DUT as client side [1651186243492] [13415:349553] CHIP: [SPL] Generating Character for: 84970112331 [1651186243492] [13415:349553] CHIP: [SPL] Generated Char: 1 Manual Code: 84970112331 @@ -71,7 +99,7 @@ tests: verification: | $ ./chip-tool pairing code 1 84970112331 - Verify in DUT as client side + Verify in DUT Commissioner side Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -81,9 +109,11 @@ tests: manual code but substituting out the current VID_PID_PRESENT with an invalid VID_PID_PRESENT set to 1" verification: | + 1. Use chip-tool"s "payload generate-manualcode" command to help generate the new, invalid Manual code + No applicable DUT or TH logs + $ ./chip-tool payload generate-manualcode --discriminator 0xF00 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 2 --force-short-code 1 - Verify in DUT as client side [1651181048462] [11611:269469] CHIP: [TOO] Manual Code: 74970112334 disabled: true @@ -93,7 +123,7 @@ tests: verification: | $ ./chip-tool pairing code 1 74970112334 - Verify in DUT as client side + Verify on the DUT Commissioner side: [1651184274318] [12512:321250] CHIP: [SPL] Failed decoding base10. Input length 10 was not expected length 20 ... [1651184274321] [12512:321244] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:63: CHIP Error 0x0000001E: Invalid string length @@ -109,11 +139,11 @@ tests: Discriminator value)" verification: | 1. Use chip-tool"s "payload generate-manualcode" command to help generate the new, invalid Manual code + No applicable DUT or TH logs $ ./chip-tool payload generate-manualcode --existing-payload 34970112332 --discriminator 0xE00 [1657236763262] [31784:16850989] CHIP: [TOO] Manual Code: 33331712336 - Verify in DUT as client side Manual Code: 33331712336 disabled: true @@ -121,7 +151,7 @@ tests: "Provide the Manual Pairing Code, generated in the previous step, to the DUT in any format supported by the DUT" verification: | - On DUT=chip-tool: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 33331712336 [1654001605.517505][3200:3205] CHIP:-: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:748: CHIP Error 0x0000002D: Not Implemented at ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:450 @@ -139,8 +169,7 @@ tests: 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321" verification: | 1. Use these as examples of how to generate manual codes with invalid passcodes - - Verify in DUT as client side + No applicable DUT or TH logs "34915200008" (00000000), $ ./chip-tool payload generate-manualcode --discriminator 3840 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 --allow-invalid-payload 1 --setup-pin-code 00000000 @@ -195,7 +224,8 @@ tests: "Provide each of the Manual Pairing Codes, generated in the previous step, to the DUT in any format supported by the DUT" verification: | - Verify in DUT as client side + Verify on the DUT Commissioner side: + No applicable TH logs (00000000) $ ./chip-tool pairing code 1 34915200008 @@ -253,7 +283,8 @@ tests: CHECK_DIGIT while following Table 38. Encoding Method without Vendor and Product IDs (VID_PID_Present == 0))" verification: | - 1. Change the last digit of the manual pairing code to a different digit + 1. Manually change the last digit of the manual pairing code to a different digit + No applicable DUT or TH logs Manual Code: 34970112331 disabled: true @@ -262,7 +293,7 @@ tests: "Provide the Manual Pairing Code, generated in the previous step, to the DUT in any format supported by the DUT" verification: | - On DUT=chip-tool: + Verify on the DUT Commissioner side: $ ./chip-tool pairing code 1 34970112331 [1657586218401] [10710:465838] CHIP: [TOO] Run command failure: ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml index 36730301d3760f..5f5987a38855cf 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_17.yaml @@ -27,11 +27,40 @@ config: endpoint: 0 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: "Preconditions" + verification: | + Preconditions + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + + 2 - 5.1.4.2 - 21-digit Manual Pairing Code is printed on the Commissionee device or in additional provided materials (ex: manual). + + An example onboarding payload could be "749701123365521327694" (21-digit) (following 5.1.4. Table 37. "Manual Pairing Code Elements") which each include: + + - 1-bit VID_PID_PRESENT = 1 (21-digit only) + + - 1-bit VERSION=0 + + - 4-bit SHORT DISCRIMINATOR=0xF00 (4 Most-significant bits of the 12-bits Discriminator value) + + - 27-bit PASSCODE=20202021 (see section 5.1.6. Generation of the Passcode) + + - 16-bit VENDOR_ID=0xFFF1 (as defined in section 2.5.2. "Vendor Identifier", for 21-digit Manual Pairing Code only) + + - 16-bit PRODUCT_ID=0x8001 (as defined in section 2.5.3. "Product Identifier", present if and only if VID is present) + + - A generated CHECK_DIGIT (see section 5.1.4. Manual Pairing Code, subsection "Check Digit") + disabled: true + - label: "Provide the 21-digit Manual Pairing Code from the Commissionee to the DUT in any format supported by DUT" verification: | - Verify in TH as server side + Verify in TH Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app [1657203632.334400][13827:13827] CHIP:DL: Device Configuration: @@ -61,10 +90,10 @@ tests: 2" verification: | 1. Use chip-tool"s "payload verhoeff-generate" command to help generate the new, invalid Manual code + No applicable TH or DUT logs. $ ./chip-tool payload verhoeff-generate 84970112336552132769 - Verify in DUT as client side [1657238290868] [31968:16868160] CHIP: [SPL] Generating Character for: 84970112336552132769 [1657238290868] [31968:16868160] CHIP: [SPL] Generated Char: 3 @@ -77,7 +106,7 @@ tests: verification: | $ ./chip-tool pairing code 1 849701123365521327693 - Verify in DUT as client side + Verify in DUT Commissioner side: [1657238348848] [31971:16868925] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:137: CHIP Error 0x0000002F: Invalid argument disabled: true @@ -87,9 +116,10 @@ tests: invalid VID_PID_PRESENT set to 0" verification: | 1. Use chip-tool"s "payload verhoeff-generate" command to help generate the new, invalid Manual code + No applicable TH or DUT logs. + $ ./chip-tool payload verhoeff-generate 34970112336552132769 - Verify in DUT as client side [1651186492744] [13434:353094] CHIP: [SPL] Generating Character for: 34970112336552132769 [1651186492744] [13434:353094] CHIP: [SPL] Generated Char: 6 @@ -102,7 +132,7 @@ tests: verification: | $ ./chip-tool pairing code 1 349701123365521327696 - Verify in DUT as client side + Verify in DUT Commissioner side: [1657238541643] [31975:16871084] CHIP: [SPL] Failed decoding base10. Input length 20 was not expected length 10 ... [1657238541644] [31975:16871079] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:63: CHIP Error 0x0000001E: Invalid string length @@ -118,8 +148,8 @@ tests: Discriminator value)" verification: | 1. Use chip-tool"s "payload generate-manualcode" command to help generate the new, invalid Manual code + No applicable TH or DUT logs. - Verify in DUT as client side $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --discriminator 3584 [1657238783501] [31989:16873588] CHIP: [TOO] Manual Code: 733317123365521327692 disabled: true @@ -130,7 +160,7 @@ tests: verification: | $ ./chip-tool pairing code 1 733317123365521327692 - Verify in DUT as client side + Verify in DUT Commissioner side: [1655814152.716988][3723:3726] CHIP:CTL: Commissioning discovery over BLE failed: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:829: CHIP Error 0x00000032: Timeout [1655814152.717099][3723:3726] CHIP:-: ../../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:829: CHIP Error 0x00000032: Timeout at ../../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:270 [1655814172.703455][3723:3728] CHIP:CTL: Discovery timed out @@ -148,10 +178,10 @@ tests: 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321" verification: | 1. Use this as an example of how to generate a manual code with an invalid passcode. In this example the invalid passcode=00000000 + No applicable TH or DUT logs. Use chip-tool"s "payload generate-manualcode" command to help generate the new, invalid Manual code - Verify in DUT as client side $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --setup-pin-code 00000000 [1657239062245] [32164:16876812] CHIP: [TOO] Manual Code: 749152000065521327698 disabled: true @@ -160,7 +190,8 @@ tests: "Provide each of the Manual Pairing Codes, generated in the previous step, to the DUT in any format supported by the DUT" verification: | - Verify in DUT as client side + Verify in DUT Commissioner side: + No applicable TH logs. (00000000) $ ./chip-tool pairing code 1 749152000065521327698 @@ -230,8 +261,8 @@ tests: Test VENDOR_ID from the list: 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4" verification: | 1. Use this as an example of how to generate a manual code with an invalid vendor IDs + No applicable TH or DUT logs. - Verify in DUT as client side $ ./chip-tool payload generate-manualcode --discriminator 3840 --setup-pin-code 20202021 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 1 [1651189120686] [14218:398626] CHIP: [TOO] Manual Code: 749701123365521327694 disabled: true @@ -241,7 +272,7 @@ tests: step, to the DUT in any format supported by the DUT" verification: | 1. Run each of the following DUT commands below containing invalid Vendor IDs. - 2. Verify that the TH commissionee=all-cluserters-app does not get commissioned -or- the DUT make the user fully aware of the security risks of providing an uncertified device with operational and networking credentials + 2. Verify that the TH commissionee=all-cluserters-app does not get commissioned -OR- the DUT Commissioner make the user fully aware of the security risks of providing an uncertified device with operational and networking credentials (0xFFF1) $ ./chip-tool pairing code 1 749701123365521327694 @@ -249,11 +280,9 @@ tests: (0xFFF2) $ ./chip-tool pairing code 1 749701123365522327692 - (0xFFF3) $ ./chip-tool pairing code 1 749701123365523327697 - (0xFFF4) $ ./chip-tool pairing code 1 749701123365524327693 disabled: true @@ -265,8 +294,8 @@ tests: Identifier)" verification: | 1. Use chip-tool"s "payload generate-manualcode" command to help generate the new, invalid Manual code + No applicable TH or DUT logs. - Verify in DUT as client side $ ./chip-tool payload generate-manualcode --existing-payload 749701123365521327694 --allow-invalid-payload 1 --product-id 0x0000 [1657239418656] [32180:16880488] CHIP: [TOO] Manual Code: 749701123365521000006 disabled: true @@ -275,7 +304,7 @@ tests: "Provide the Manual Pairing Code, generated in the previous step, to the DUT in any format supported by the DUT" verification: | - Verify in DUT as client side + Verify in DUT Commissioner side: $ ./chip-tool pairing code 1 749701123365521000006 [1657239565895] [32193:16881922] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:55: CHIP Error 0x0000002F: Invalid argument @@ -289,10 +318,10 @@ tests: Product IDs included (VID_PID_Present == 1))" verification: | 1. Use chip-tool"s "payload verhoeff-verify" command to help verify that the check-digit is invalid + No applicable TH or DUT logs. $ ./chip-tool payload verhoeff-verify 749701123365521327693 20 - Verify in DUT as client side [1651187504088] [13629:367627] CHIP: [SPL] Verifying Manual Code: 74970112336552132769 [1651187504088] [13629:367627] CHIP: [SPL] 749701123365521327693 is INVALID at position 20 disabled: true @@ -303,6 +332,16 @@ tests: verification: | $ ./chip-tool pairing code 1 749701123365521327693 - Verify in DUT as client side + Verify in DUT Commissioner side: [1651187528666] [13631:367920] CHIP: [TOO] Run command failure: ../../examples/chip-tool/third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:50: CHIP Error 0x00000013: Integrity check failed disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml index aeee0bd664f89b..2531691ed693f2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_18.yaml @@ -27,12 +27,24 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + 2 - 5.1.3 - QR code is printed on the Commissionee devices or in additional provided materials (ex: manual). + disabled: true + - label: "Place TH1 into commissioning mode using the TH manufacturers means to be discovered by a commissioner" verification: | 1. After launching all-clusters-app using discriminator 3841 using below command $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + No applicable TH or DUT logs. $ dns-sd -B _matterc._udp,_L3841 Browsing for _matterc._udp,_L3841 @@ -48,6 +60,7 @@ tests: verification: | 1. After launching all-clusters-app using discriminator 3844 using below command sudo ./chip-all-clusters-app --wifi --discriminator 3844 + No applicable TH or DUT logs. $ dns-sd -B _matterc._udp,_L3844 Browsing for _matterc._udp,_L3844 @@ -69,11 +82,11 @@ tests: Commissioner/Commissionee to complete the commissioning process over the TH Commissionees method of device discovery" verification: | - TH1 Commissionee: + Verify on the TH1 Commissionee: [1657240914.891250][372173:372173] CHIP:SVR: Commissioning completed successfully [1657240914.891297][372173:372173] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on the DUT Commissioner: $ ./chip-tool pairing code 1 MT:-24J0IRV01KA0648G00 [1657240914764] [32262:16895870] CHIP: [CTL] Successfully finished commissioning step "Cleanup" @@ -92,11 +105,11 @@ tests: Commissioner/Commissionee to complete the commissioning process over the TH Commissionees method of device discovery" verification: | - TH2 Commissionee: + Verify on the TH2 Commissionee: [1657240985.801360][112581:112581] CHIP:SVR: Commissioning completed successfully [1657240985.801406][112581:112581] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on the DUT Commissioner: $ ./chip-tool pairing code 2 MT:-24J04QI14KA0648G00 [1657240985682] [32264:16896797] CHIP: [CTL] Successfully finished commissioning step "Cleanup" @@ -109,7 +122,7 @@ tests: verification: | $ ./chip-tool basic read reachable 1 0 - Verify in DUT as client side + Verify in DUT Commissioner side: [1657241043430] [32266:16897416] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 131004400 [1657241043432] [32266:16897416] CHIP: [TOO] Reachable: TRUE @@ -121,7 +134,7 @@ tests: verification: | $ ./chip-tool basic read reachable 2 0 - Verify in DUT as client side + Verify in DUT Commissioner side: [1657241066927] [32267:16897671] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0011 DataVersion: 2450774961 [1657241066927] [32267:16897671] CHIP: [TOO] Reachable: TRUE diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml index 4920069bae4662..d7dc97a42dd086 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_19.yaml @@ -27,11 +27,17 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - Commissioner is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + 2 - 5.1.3 - QR code is printed on the Commissionee device or in additional provided materials (ex: manual). + disabled: true + - label: "Place DUT into commissioning mode using the DUTs manufacturers means to be discovered by the TH Commissioner" verification: | - DUT Commissionee: + Verify on DUT Commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3841 [1651111142.369356][32024:32024] CHIP:DL: Device Configuration: @@ -45,7 +51,7 @@ tests: [1651111142.369573][32024:32024] CHIP:DL: Device Type: 65535 (0xFFFF) [1651111142.370760][32024:32024] CHIP:SVR: SetupQRCode: [MT:-24J0ALY01KA0648G00] - TH Commissioner: + Verify on TH Commissioner side: $ ./chip-tool discover commissionables [1651111150395] [95835:65674062] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 @@ -68,11 +74,11 @@ tests: for the Commissioner/Commissionee to complete the commissioning process over the DUT Commissionees method of device discovery" verification: | - DUT Commissionee: + Verify on DUT Commissionee side: [1651111335.475159][32130:32130] CHIP:SVR: Commissioning completed successfully [1651111335.475204][32130:32130] CHIP:DIS: Updating services using commissioning mode 0 - TH Commissioner: + Verify on TH Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0ALY01KA0648G00 [1651111335378] [95843:65675989] CHIP: [CTL] Received CommissioningComplete response @@ -106,7 +112,7 @@ tests: 1. On RasPi DUT $ rm -rf /tmp/chip* 2. On RasPi DUT $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3841 - On TH chip-tool: + Verify on TH Commissioner side: $ ./chip-tool discover commissionables [1651111576350] [95850:65678872] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651111576350] [95850:65678872] CHIP: [DIS] Vendor ID: 65521 @@ -128,11 +134,11 @@ tests: for the Commissioner/Commissionee to complete the commissioning process over the DUT Commissionees method of device discovery" verification: | - DUT Commissionee: + Verify on DUT Commissionee side: [1651111614.006849][32259:32259] CHIP:SVR: Commissioning completed successfully [1651111614.006893][32259:32259] CHIP:DIS: Updating services using commissioning mode 0 - TH Commissioner: + Verify on TH Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0ALY01KA0648G00 [1651111613912] [95856:65679504] CHIP: [CTL] Received CommissioningComplete response diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml index 33a3be710bcd09..27b21af3206274 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_2.yaml @@ -25,13 +25,18 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be IP-based(Ethernet or WiFi) or Thread. Commissioner can either be a Matter device which is already on a network or the test harness connected to the network. + disabled: true + - label: "Commissioner and Commissionee discover each other and connect via the discovery mode applicable for the DUT." verification: | - Verify in TH as server side: start BLE Advertising by specific DUT implementation + Verify in DUT as commissionee side: start BLE Advertising by specific DUT implementation - Verify in DUT as client side: start commissioning process(need to obtain the Thread dataset first) + Verify in TH as commissioner side: start commissioning process(need to obtain the Thread dataset first) ./chip-tool pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd27e57b1b1e22d9051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f01021234041061e1206d2c2b46e079eb775f41fc72190c0402a0fff8 20202021 3840 ,, @@ -41,7 +46,7 @@ tests: "Establish encryption keys with Password Authenticated Session Establishment on the commissioning channel" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:SC: Received PBKDF param response disabled: true @@ -50,7 +55,7 @@ tests: "Commissioner SHALL re-arm Fail-safe timer on Commissionee within 60s (the autonomously Fail-safe timer length set by Commissionee)" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Arming failsafe (60 seconds) disabled: true @@ -60,7 +65,7 @@ tests: Commissionee." PICS: MCORE.COM.WIRELESS verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Setting Regulatory Config disabled: true @@ -69,7 +74,7 @@ tests: "Commissioner requests operational CSR from Commissionee with OperationalCSRRequest command" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Sending CSR request to 0xffffa4001730 device CHIP:DMG: ICR moving to [AddingComm] @@ -133,7 +138,7 @@ tests: "Commissioner configures operational credentials on DUT if not previously installed" verification: | - Verify in DUT as client side + Verify in TH as commissioner side [1651218829.220063][3273:3278] CHIP:CTL: Sending root certificate to the device [1651218829.220201][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -187,7 +192,7 @@ tests: "Commissioner configures itself as administrator in ACL on DUT if needed" verification: | - Verify in DUT as client side + Verify in TH as commissioner side [1651218829.457248][3273:3278] CHIP:CTL: Sending operational certificate chain to the device [1651218829.457372][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -243,7 +248,7 @@ tests: "Commissioner configures operational network on DUT if DUT both supports and requires" verification: | - Verify in DUT as client side + Verify in TH as commissioner side [1651218833.995054][3273:3278] CHIP:CTL: Adding thread network [1651218833.995176][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -295,7 +300,7 @@ tests: "Commissioner instructs Commissionee to connect to operational network if not already connected" verification: | - Verify in DUT as client side + Verify in TH as commissioner side [1651218834.137891][3273:3278] CHIP:CTL: Enabling thread network [1651218834.138014][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -353,7 +358,7 @@ tests: - label: "Commissioner starts discovery of DUT using Operational Discovery" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:DL: Avahi resolve found CHIP:DIS: Node ID resolved for 0x0000000000000001 @@ -364,7 +369,7 @@ tests: - label: "Commissioner opens a CASE session with DUT over operational network" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:SC: Sent Sigma1 msg CHIP:CTL: Address resolved for node: 0x0000000000000001 @@ -403,7 +408,7 @@ tests: - label: "Commissioner sends CommissioningComplete command" verification: | - Verify in DUT as client side + Verify in TH as commissioner side CHIP:CTL: Received CommissioningComplete response CHIP:CTL: Rendezvous cleanup diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml index e1b52070927b42..d78e3ffc11e3be 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_20.yaml @@ -27,11 +27,23 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + 2 - 5.1.3 - QR code is printed on the Commissionee device or in additional provided materials (ex: manual). + disabled: true + - label: "Place TH into commissioning mode using the TH manufacturers means to be discovered by the DUT Commissioner" verification: | $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3840 + Verify on TH Commissionee side: [1651109580.413197][31207:31207] CHIP:DL: Device Configuration: [1651109580.413259][31207:31207] CHIP:DL: Serial Number: TEST_SN @@ -58,11 +70,11 @@ tests: Commissioner/Commissionee to complete the commissioning process over the TH Commissionees method of device discovery" verification: | - TH Commissionee: + Verify on TH Commissionee side: [1651109784.452770][31207:31207] CHIP:SVR: Commissioning completed successfully [1651109784.452813][31207:31207] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on DUT Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651109784376] [95553:65657838] CHIP: [CTL] Received CommissioningComplete response @@ -78,6 +90,7 @@ tests: network." verification: | ./chip-tool operationalcredentials remove-fabric 1 1 0 + Verify on DUT Commissioner side: CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -92,7 +105,10 @@ tests: "Place TH Commissionee back into commissioning mode using the TH manufacturers means to be discovered by the DUT Commissioner" verification: | + 1. Place the TH into commissioning mode by launching the app again + $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3840 + Verify on TH Commissionee side: [1651110721.112368][31791:31791] CHIP:DL: Device Configuration: [1651110721.112448][31791:31791] CHIP:DL: Serial Number: TEST_SN @@ -119,11 +135,11 @@ tests: Commissioner/Commissionee to complete the commissioning process over the TH Commissionees method of device discovery" verification: | - TH Commissionee: + Verify on TH Commissionee side: [1651110724.759825][31791:31791] CHIP:SVR: Commissioning completed successfully [1651110724.759869][31791:31791] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on DUT Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651110724689] [95810:65669790] CHIP: [CTL] Received CommissioningComplete response diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml index ad4ea586253bbf..a860d0ddbf32f1 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_21.yaml @@ -27,13 +27,24 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - DUT is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + 2 - 5.1.3 - QR code is printed on the Commissionee device or in additional provided materials (ex: manual). + disabled: true + - label: "Place TH into commissioning mode using the TH manufacturers means to be discovered by the DUT Commissioner" verification: | $ ./out/all-clusters-app/chip-all-clusters-app --discriminator 3840 - Verify in TH as server side + Verify on TH Commissionee side: [1651109580.413197][31207:31207] CHIP:DL: Device Configuration: [1651109580.413259][31207:31207] CHIP:DL: Serial Number: TEST_SN [1651109580.413294][31207:31207] CHIP:DL: Vendor Id: 65521 (0xFFF1) @@ -59,11 +70,11 @@ tests: Commissioner/Commissionee to complete the commissioning process over the TH Commissionees method of device discovery" verification: | - TH Commissionee: + Verify on TH Commissionee side: [1651109784.452770][31207:31207] CHIP:SVR: Commissioning completed successfully [1651109784.452813][31207:31207] CHIP:DIS: Updating services using commissioning mode 0 - DUT Commissioner: + Verify on DUT Commissioner side: $ ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 [1651109784376] [95553:65657838] CHIP: [CTL] Received CommissioningComplete response @@ -81,12 +92,12 @@ tests: user action to trigger such command)." verification: | 1. Send "on" command from Commissioner to TH Endpoint 1 - On DUT=chip-tool: + Verify on DUT Commissioner side: $ ./chip-tool onoff on 1 1 [...] [1657930715416] [56399:2451384] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 - On TH=all-clusters-app: + Verify on TH Commissionee side: [...] [1657930715.432295][2911:2911] CHIP:ZCL: On/Off set value: 1 1 [1657930715.432341][2911:2911] CHIP:ZCL: Toggle on/off from 0 to 1 diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml index cb0031d272db29..d57af20dbf9a61 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_3.yaml @@ -26,6 +26,13 @@ config: endpoint: 0 tests: + - label: "" + verification: | + Preconditions + 1 - User must indicate the intention for commissioning using a display or other UI elements. + 2 - TH is not advertising Commissioner Discovery Service at start + disabled: true + - label: "DUT start scanning for available commissioners using Commissioner Discovery" @@ -35,6 +42,8 @@ tests: - label: "TH is instructed to advertise Commissioner Discovery service" verification: | + chip-tv-app is used as TH + ubuntu@ubuntu:~/may23_DUT/connectedhomeip/examples/tv-app/linux/out/tv-app$ sudo ./chip-tv-app Verify in tv-app side @@ -49,10 +58,11 @@ tests: "DUT start scanning for available commissioners using Commissioner Discovery" verification: | - connectedhomeip/examples/tv-casting-app/linux/out/tv-casting-app$ sudo ./chip-tv-casting-app + In certification QA we are using chip-tv-casting-app as a reference app, In case of certification testing, DUT (app) vendor to provide instructions on how to scan for commissioners + connectedhomeip/examples/tv-casting-app/linux/out/tv-casting-app$ sudo ./chip-tv-casting-app - Verify in tv-casting-app side + Verify for the commissioner advertisements from the TH in tv-casting-app side CHIP:SVR: Discovered Commissioner #0 [1653478433.097515][3785:3785] CHIP:DIS: Hostname: E45F010F19FF0000 [1653478433.097546][3785:3785] CHIP:DIS: IP Address #1: fe80::d83a:21ff:fe24:b6d6 @@ -96,15 +106,28 @@ tests: - label: "TH start the commissioning procedure with DUT" verification: | - ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2755 5640 + Into the shell, enter "cast request 0" to send a user-directed-commissioning request to the DUT on tv-casting-app side + + > cast request 0 + [1653179218011] [47890:1899175] CHIP: [DL] request + [1653179218011] [47890:1899175] CHIP: [SVR] ------- PrepareForCommissioning + [1653179218011] [47890:1899175] CHIP: [SVR] Server initializing... + + + UX will vary by product maker. The following is the tv-app shell output: + + [1653179219087] [89108:1898759] CHIP: [CTL] ------PROMPT USER: Test TV casting app is requesting permission to cast to this TV, approve? [0x0000_FFF1,0x0000_8001,E0707BB1AFFA6F23,020096D16895275F1B49A07221F0E588E06B] + + [1653179219087] [89108:1898759] CHIP: [CTL] ------Via Shell Enter: controller ux ok|cancel + + + Into the DUT UX, accept request for commissioning. Manufacturer may utilize a custom method for obtaining user consent other than an on-screen prompt. + + The following is the tv-app shell command to accept the request + + > controller ux ok - Verify in TH log: + The commissioning success completion is indicated in the TH with the following shell output: - [1653559159.021348][4240:4246] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1653559159.021432][4240:4246] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1653559159.021499][4240:4246] CHIP:CTL: Successfully finished commissioning step "SendComplete" - [1653559159.021554][4240:4246] CHIP:CTL: Commissioning stage next step: "SendComplete" -> "Cleanup" - [1653559159.021611][4240:4246] CHIP:CTL: Performing next commissioning step "Cleanup" - [1653559159.021725][4240:4246] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1653559159.021790][4240:4246] CHIP:TOO: Device commissioning completed with success + [1653088463910] [86837:1122544] CHIP: [SVR] Commissioning completed successfully disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml index 202705aee928d1..de3bb357ac2a44 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_4.yaml @@ -26,11 +26,25 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - User must indicate the intention for commissioning using a display or other UI elements." + disabled: true + - label: "DUT is instructed to advertise Commissioner Discovery service" 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) or tv-casting-app (when DUT is a commissionee): + + chip-tv-app is used as TH + ubuntu@ubuntu:~/may23_DUT/connectedhomeip/examples/tv-app/linux/out/tv-app$ sudo ./chip-tv-app - Verify in tv-app side: + Verify in tv-app side CHIP:DL: Using wifi MAC for hostname CHIP:DIS: Advertise operational node DFC28FF9FE811EF2-FFFFFFEFFFFFFFFF @@ -42,54 +56,105 @@ tests: "TH starts scanning for available commissioners using Commissioner Discovery" verification: | - ubuntu@ubuntu:~/may23_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterd._udp - - + eth0 IPv6 A0BF4D00BE973DEC _matterd._udp local - + eth0 IPv6 252FB62C79E2724B _matterd._udp local - = eth0 IPv6 A0BF4D00BE973DEC _matterd._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5650] - txt = ["T=1" "SAI=300" "SII=5000" "DN=Test TV" "DT=35" "VP=65521+32769"] - = eth0 IPv6 252FB62C79E2724B _matterd._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5650] - txt = ["T=1" "SAI=300" "SII=5000" "DN=Test TV" "DT=35" "VP=65521+32769"] + 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) or tv-casting-app (when DUT is a commissionee): + + In certification QA we are using chip-tv-casting-app as a reference app, In case of certification testing, DUT (app) vendor to provide instructions on how to scan for commissioners + + connectedhomeip/examples/tv-casting-app/linux/out/tv-casting-app$ sudo ./chip-tv-casting-app + + Verify for the commissioner advertisements from the TH in tv-casting-app side + + [1660758661.643392][2867:2867] CHIP:SVR: Discovered Commissioner #0 + [1660758661.643469][2867:2867] CHIP:DIS: Discovered node: + [1660758661.643506][2867:2867] CHIP:DIS: Hostname: E45F010F3BAF0000 [1660758661.643561][2867:2867] CHIP:DIS: IP Address #1: fe80::9052:32ff:fe00:92c4 + [1660758661.643606][2867:2867] CHIP:DIS: Port: 5540 + [1660758661.643648][2867:2867] CHIP:DIS: Mrp Interval idle: 5000 ms + [1660758661.643691][2867:2867] CHIP:DIS: Mrp Interval active: 300 ms + [1660758661.643733][2867:2867] CHIP:DIS: TCP Supported: 1 + [1660758661.643779][2867:2867] CHIP:DIS: Rotating ID: 0000406E4D7073744BF234AD391DAE869837 + [1660758661.643832][2867:2867] CHIP:DIS: Device Name: Test TV casting app + [1660758661.643876][2867:2867] CHIP:DIS: Vendor ID: 65521 + [1660758661.643918][2867:2867] CHIP:DIS: Product ID: 32769 + [1660758661.643960][2867:2867] CHIP:DIS: Device Type: 35 + [1660758661.644117][2867:2867] CHIP:DIS: Pairing Hint: 33 + [1660758661.644170][2867:2867] CHIP:DIS: Instance Name: 742273AB254EDCE1 + [1660758661.644212][2867:2867] CHIP:DIS: Commissioning Mode: 0 + [1660758661.644256][2867:2867] CHIP:SVR: Discovered Commissioner #1 + [1660758661.644294][2867:2867] CHIP:DIS: Discovered node: + [1660758661.644329][2867:2867] CHIP:DIS: Hostname: E45F010F27530000 [1660758661.644378][2867:2867] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:2753 + [1660758661.644426][2867:2867] CHIP:DIS: IP Address #2: fe80::e65f:1ff:fe0f:2753 + [1660758661.644468][2867:2867] CHIP:DIS: Port: 5640 + [1660758661.644510][2867:2867] CHIP:DIS: Mrp Interval idle: 5000 ms + [1660758661.644552][2867:2867] CHIP:DIS: Mrp Interval active: 300 ms + [1660758661.644594][2867:2867] CHIP:DIS: TCP Supported: 1 + [1660758661.644638][2867:2867] CHIP:DIS: Rotating ID: 01005FDB39737473FB22B819CEBB1084AFD5 + [1660758661.644680][2867:2867] CHIP:DIS: Device Name: Test TV + [1660758661.644721][2867:2867] CHIP:DIS: Vendor ID: 65521 + [1660758661.644762][2867:2867] CHIP:DIS: Product ID: 32769 + [1660758661.644803][2867:2867] CHIP:DIS: Device Type: 35 + [1660758661.644844][2867:2867] CHIP:DIS: Long Discriminator: 3840 + [1660758661.644886][2867:2867] CHIP:DIS: Pairing Hint: 33 + [1660758661.644927][2867:2867] CHIP:DIS: Instance Name: 38D0A5D1137B8FF4 + [1660758661.644968][2867:2867] CHIP:DIS: Commissioning Mode: 1 + [1660758661.645010][2867:2867] CHIP:SVR: Discovered Commissioner #2 + [1660758661.645046][2867:2867] CHIP:DIS: Discovered node: + [1660758661.645082][2867:2867] CHIP:DIS: Hostname: E45F010F27530000 [1660758661.645128][2867:2867] CHIP:DIS: IP Address #1: fe80::e65f:1ff:fe0f:2753 + [1660758661.645174][2867:2867] CHIP:DIS: IP Address #2: fe80::e65f:1ff:fe0f:2753 + [1660758661.645217][2867:2867] CHIP:DIS: Port: 5650 + [1660758661.645258][2867:2867] CHIP:DIS: Mrp Interval idle: 5000 ms + [1660758661.645299][2867:2867] CHIP:DIS: Mrp Interval active: 300 ms + [1660758661.645340][2867:2867] CHIP:DIS: TCP Supported: 1 + [1660758661.645382][2867:2867] CHIP:DIS: Device Name: Test TV + [1660758661.645424][2867:2867] CHIP:DIS: Vendor ID: 65521 + [1660758661.645465][2867:2867] CHIP:DIS: Product ID: 32769 + [1660758661.645506][2867:2867] CHIP:DIS: Device Type: 35 + [1660758661.645548][2867:2867] CHIP:DIS: Instance Name: 38D0A5D1137B8FF4 + [1660758661.645589][2867:2867] CHIP:DIS: Commissioning Mode: 0 + [1660758661.645633][2867:2867] CHIP:SVR: 3 commissioner(s) discovered. Select one (by number# above) to request commissioning from: + [1660758661.645672][2867:2867] CHIP:SVR: Example: cast request 0 disabled: true - label: "TH is instructed to start the commissioning procedure with the DUT found at Step 2" verification: | - Out of scope for V1.0 - IDM functionality - - https://github.com/project-chip/connectedhomeip/issues/11004 + Out of scope for V1.0 disabled: true - label: "DUT verifies the Identification Declaration message" verification: | - Out of scope for V1.0 - IDM functionality - - https://github.com/project-chip/connectedhomeip/issues/11004 + Out of scope for V1.0 disabled: true - label: "By any means, DUT prompts user for onboarding payload" verification: | - verification step to be updated. + 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) or tv-casting-app (when DUT is a commissionee): + + + Into the shell, enter "cast request 0" to send a user-directed-commissioning request to the DUT on tv-casting-app side + > cast request 0 [1653179218011] [47890:1899175] CHIP: [DL] request [1653179218011] [47890:1899175] CHIP: [SVR] ------- PrepareForCommissioning [1653179218011] [47890:1899175] CHIP: [SVR] Server initializing... disabled: true - label: "DUT starts the commissioning procedure with TH" verification: | - ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2755 5640 + 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) or tv-casting-app (when DUT is a commissionee): + + + + UX will vary by product maker. The following is the tv-app shell output: + + [1653179219087] [89108:1898759] CHIP: [CTL] ------PROMPT USER: Test TV casting app is requesting permission to cast to this TV, approve? [0x0000_FFF1,0x0000_8001,E0707BB1AFFA6F23,020096D16895275F1B49A07221F0E588E06B] + + [1653179219087] [89108:1898759] CHIP: [CTL] ------Via Shell Enter: controller ux ok|cancel + + + Into the DUT UX, accept request for commissioning. Manufacturer may utilize a custom method for obtaining user consent other than an on-screen prompt. + + The following is the tv-app shell command to accept the request + + > controller ux ok - Verify in DUT as commissioner side Log: + The commissioning success completion is indicated in the TH with the following shell output: - [1653559159.021348][4240:4246] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1653559159.021432][4240:4246] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1653559159.021499][4240:4246] CHIP:CTL: Successfully finished commissioning step "SendComplete" - [1653559159.021554][4240:4246] CHIP:CTL: Commissioning stage next step: "SendComplete" -> "Cleanup" - [1653559159.021611][4240:4246] CHIP:CTL: Performing next commissioning step "Cleanup" - [1653559159.021725][4240:4246] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1653559159.021790][4240:4246] CHIP:TOO: Device commissioning completed with success + [1653088463910] [86837:1122544] CHIP: [SVR] Commissioning completed successfully disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml index 92c0210c262910..8bb958ed534822 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_5.yaml @@ -24,13 +24,25 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be WiFi or Thread. + + 2 - 5.5 - Commissionee can either be a Matter device which is already on a network or the test harness connected to the network. + disabled: true + - label: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" verification: | sudo ./chip-all-clusters-app --wifi --discriminator 3841 - Verify in TH as server side + Verify in TH as commissionee side: [1653471956.966855][10713:10713] CHIP:SPT: PASE PBKDF iterations set to 1000 [1653471956.966887][10713:10713] CHIP:SPT: LinuxCommissionableDataProvider didn"t get a PASE salt, generating one. @@ -56,7 +68,7 @@ tests: ./chip-tool pairing code 1 MT:-24J0CEK01KA0648G00 - Verify in DUT as client side + Verify in DUT as commissioner side: [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 [1657226543861] [30621:16744161] CHIP: [IN] New secure session activated for device , LSID:47293 PSID:201! @@ -74,7 +86,7 @@ tests: (DNS-SD)" PICS: MCORE.DD.DISCOVERY_IP verification: | - Verify in DUT as client side + Verify in DUT as commissioner side: ./chip-tool pairing code 1 MT:-24J0AFN00KA0648G00 ... [1657226543861] [30621:16744161] CHIP: [IN] SecureSession[0x6000007cc000]: Activated - Type:1 LSID:47293 @@ -86,7 +98,7 @@ tests: [1657226543861] [30621:16744161] CHIP: [CTL] Commissioning stage next step: "SecurePairing" -> "ReadCommissioningInfo" - Verify in TH as server side + Verify in TH as commissionee side: $ ./out/all-clusters-app/chip-all-clusters-app ... [1657226543.948995][369114:369114] CHIP:IN: SecureSession[0xaaaab60788e0]: Activated - Type:1 LSID:201 @@ -100,7 +112,7 @@ tests: verification: | Verify that the responder receives the PBKDFParamRequest message - Verify in DUT as client side + Verify in DUT as commissioner side: CHIP:SC: Received PBKDF param request CHIP:SC: Peer assigned session ID 18450 CHIP:SC: Found MRP parameters in the message @@ -110,7 +122,7 @@ tests: CHIP:IN: Sending unauthenticated msg 0xaaaaad340560 with MessageCounter:1341084110 to 0x0000000000000000 at monotonic time: 0000000000FBA380 msec CHIP:SC: Sent PBKDF param response - Verify in TH as server side + Verify in TH as commissionee side: Sent PBKDF param request [1653471961.364996][30157:30162] CHIP:CTL: Setting wifi credentials from parameters [1653471961.365051][30157:30162] CHIP:CTL: Setting attestation nonce to random value @@ -128,10 +140,10 @@ tests: "Commissioner SHALL re-arm Fail-safe timer on Commissionee within 60s (the autonomously Fail-safe timer length set by Commissionee)" verification: | - Verify in TH as server side + Verify in TH as commissionee side: CHIP:DL: NVS set: chip-config/fail-safe-armed = true - Verify in DUT as client side + Verify in DUT as commissioner side: : Performing next commissioning step "ArmFailSafe" [1653471968.064493][30157:30162] CHIP:CTL: Arming failsafe (60 seconds) @@ -142,12 +154,12 @@ tests: Commissionee." PICS: MCORE.COM.WIRELESS verification: | - Verify in DUT as client side + Verify in DUT as commissioner side Performing next commissioning step "ConfigRegulatory" [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) - Verify in TH as server side + Verify in TH as commissionee side NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true @@ -155,14 +167,14 @@ tests: "Commissioner requests operational CSR from Commissionee with OperationalCSRRequest command" verification: | - Verify the following on DUT after commissioning + 1. Verify the following on DUT after commissioning - Verify in TH as server side + Verify in TH as commissionee side: [1646909537.102263][3145:3150] CHIP:CTL: Received Attestation Information from the device [1646909537.102418][3145:3150] CHIP:CTL: Verifying attestation [1646909537.115081][3145:3150] CHIP:CTL: Successfully validated "Attestation Information" command received from the device. - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:ZCL: OpCreds: commissioner has requested a CSR CHIP:ZCL: OpCreds: NewCertificateSigningRequest returned ../../third_party/connectedhomeip/src/crypto/CHIPCryptoPALOpenSSL.cpp:1114: Success disabled: true @@ -171,11 +183,11 @@ tests: "Commissioner configures operational credentials on DUT if not previously installed" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side: OpCreds: Received an AddTrustedRootCertificate command - Verify in TH as server side + Verify in TH as commissionee side: Sending root certificate to the device CHIP:DMG: ICR moving to [AddingComm] @@ -190,7 +202,7 @@ tests: "Commissioner configures itself as administrator in ACL on TH if needed" verification: | - Verify in DUT as client side after commissioning + Verify in DUT as commissioner side after commissioning: CHIP:CTL: Commissioning stage next step: "SendTrustedRootCert" -> "SendNOC" [1653471969.812357][30157:30162] CHIP:CTL: Performing next commissioning step "SendNOC" @@ -244,7 +256,7 @@ tests: [1653471970.347439][30157:30162] CHIP:TOO: Secure Pairing Success [1653471970.347485][30157:30162] CHIP:CTL: Successfully finished commissioning step "SendNOC" - Verify in DUT as client side + Verify in TH as commissionee side: OpCreds: Received an AddNOC command disabled: true @@ -253,24 +265,29 @@ tests: "Commissioner configures operational network on TH if TH both supports and requires" verification: | - Verify in DUT as client side after commissioning - + Verify in DUT as commissioner side after commissioning: [1646909537.345068][3145:3150] CHIP:CTL: Received certificate signing request from the device + + Verifiy on TH as commissionee side: + [1660151567834] [99153:10411339] CHIP: [CTL] Received certificate signing request from the device + [1660151567834] [99153:10411339] CHIP: [CTL] Successfully finished commissioning step "SendOpCertSigningRequest" disabled: true - label: "Commissioner instructs Commissionee to connect to operational network if not already connected" verification: | - Verify in DUT as client side after commissioning - + Verify in DUT as commissioner side after commissioning: [1646909537.976592][3145:3150] CHIP:CTL: Operational credentials provisioned on device 0xffffac001730 [1646909537.976664][3145:3150] CHIP:TOO: Secure Pairing Success + + Verifiy on TH as commissionee side: + [1660152735.835717][648909:648909] CHIP:ZCL: OpCreds: successfully created fabric index 0x1 via AddNOC disabled: true - label: "Commissioner starts discovery of TH using Operational Discovery" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side: Commissioning stage next step: "WiFiNetworkEnable" -> "FindOperational" [1653471976.344532][30157:30162] CHIP:CTL: Performing next commissioning step "FindOperational" @@ -287,12 +304,18 @@ tests: [1653471976.348732][30157:30162] CHIP:DIS: Mrp Interval idle: 5000 ms [1653471976.348762][30157:30162] CHIP:DIS: Mrp Interval active: 300 ms [1653471976.349059][30157:30162] CHIP:DIS: UDP:[fe80::e65f:1ff:fe0f:2753%eth0]:5540: new best score: 3 + + Verifiy on TH as commissionee side: + [1660152735.835315][648909:648909] CHIP:DIS: Broadcasting mDns reply for query from fe80::808c:7ff:fefd:3b1 + [1660152735.835522][648909:648909] CHIP:DIS: mDNS service published: _matter._tcp + [1660152735.835565][648909:648909] CHIP:DMG: Endpoint 0, Cluster 0x0000_003E update version to 553aae1 + [1660152735.835594][648909:648909] CHIP:DMG: Endpoint 0, Cluster 0x0000_003E update version to 553aae2 disabled: true - label: "Commissioner opens a CASE session with TH over operational network" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side: CASE Server enabling CASE session setups [1653471957.713139][10713:10713] CHIP:SVR: Joining Multicast groups @@ -303,16 +326,18 @@ tests: - label: "Commissioner sends CommissioningComplete command" verification: | - Received CommissioningComplete response - + Verify in DUT as commissioner side: CHIP:CTL: Received CommissioningComplete response + + Verifiy on TH as commissionee side: + [1660154248.898113][7143:7143] CHIP:SVR: Commissioning completed successfully disabled: true - label: "Commissioning channel between the Commissioner and Commissionee is terminated." verification: | - Verify in DUT as client side + Verify in DUT as commissioner side: CHIP:CTL: Successfully finished commissioning step "SendComplete" CHIP:CTL: Commissioning stage next step: "SendComplete" -> "Cleanup" @@ -326,4 +351,9 @@ tests: CHIP:DL: Closing BLE GATT connection (con 0xffff9c04df70) CHIP:CTL: Successfully finished commissioning step "Cleanup" CHIP:TOO: Device commissioning completed with success + + Verify on TH as commissionee side: + [1660154249.008047][7143:7143] CHIP:IN: Expiring all PASE sessions + [1660154249.008069][7143:7143] CHIP:IN: SecureSession[0xaaab09155000]: MarkForEviction Type:1 LSID:5786 + [1660154249.008090][7143:7143] CHIP:SC: SecureSession[0xaaab09155000]: Moving from state "kActive" --> "kPendingEviction" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml index dbd0be9c671393..8a641bdd92815e 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_6.yaml @@ -25,6 +25,18 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be WiFi or Thread. + + 2 - 5.5 - Commissionee is not connected to an operational network + disabled: true + - label: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" @@ -36,9 +48,9 @@ tests: "Commissioner and Commissionee discover each other and connect via the discovery mode applicable for the DUT." verification: | - Verify in TH as server side: start BLE Advertising by specific DUT implementation + Verify in TH as commissionee side: start BLE Advertising by specific DUT implementation - Verify in DUT as client side: start commissioning process(need to obtain the Thread dataset first) + Verify in DUT as commissioner side: start commissioning process(need to obtain the Thread dataset first) ./chip-tool pairing ble-thread 1 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd27e57b1b1e22d9051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f01021234041061e1206d2c2b46e079eb775f41fc72190c0402a0fff8 20202021 3840 disabled: true @@ -47,7 +59,7 @@ tests: "Establish encryption keys with Password Authenticated Session Establishment on the commissioning channel" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:SC: Received PBKDF param response disabled: true @@ -56,7 +68,7 @@ tests: "Commissioner SHALL re-arm Fail-safe timer on Commissionee within 60s (the autonomously Fail-safe timer length set by Commissionee)" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:CTL: Arming failsafe (60 seconds) disabled: true @@ -66,13 +78,13 @@ tests: Commissionee." PICS: MCORE.COM.WIRELESS verification: | - Verify in DUT as client side + Verify in DUT as commissioner side Performing next commissioning step "ConfigRegulatory" [1653471968.202645][30157:30162] CHIP:CTL: Setting Regulatory Config [1653471968.202666][30157:30162] CHIP:CTL: No regulatory config supplied by controller, leaving as device default (0) - Verify in TH as server side + Verify in TH as commissionee side NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true @@ -80,7 +92,7 @@ tests: "Commissioner requests operational CSR from Commissionee with OperationalCSRRequest command" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:CTL: Sending CSR request to 0xffffa4001730 device CHIP:DMG: ICR moving to [AddingComm] @@ -144,7 +156,7 @@ tests: "Commissioner configures operational credentials on DUT if not previously installed" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side [1651218829.220063][3273:3278] CHIP:CTL: Sending root certificate to the device [1651218829.220201][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -198,7 +210,7 @@ tests: "Commissioner configures itself as administrator in ACL on TH if needed" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side [1651218829.457248][3273:3278] CHIP:CTL: Sending operational certificate chain to the device [1651218829.457372][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -254,7 +266,7 @@ tests: "Commissioner configures operational network on TH if TH both supports and requires" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side [1651218833.995054][3273:3278] CHIP:CTL: Adding thread network [1651218833.995176][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -306,7 +318,7 @@ tests: "Commissioner instructs Commissionee to connect to operational network if not already connected" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side [1651218834.137891][3273:3278] CHIP:CTL: Enabling thread network [1651218834.138014][3273:3278] CHIP:DMG: ICR moving to [AddingComm] @@ -359,7 +371,7 @@ tests: "Commissioning channel between the Commissioner and Commissionee is terminated." verification: | - 1. Verify the channel was terminated on DUT=chip-tool + Verify the channel was terminated on DUT as commissioner side: [1651271753284] [23287:743790] CHIP: [CTL] Received CommissioningComplete response [1651271753284] [23287:743790] CHIP: [CTL] Successfully finished commissioning step "SendComplete" [1651271753284] [23287:743790] CHIP: [CTL] Commissioning stage next step: "SendComplete" -> "Cleanup" @@ -370,7 +382,7 @@ tests: - label: "Commissioner starts discovery of TH using Operational Discovery" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:DL: Avahi resolve found CHIP:DIS: Node ID resolved for 0x0000000000000001 @@ -381,7 +393,7 @@ tests: - label: "Commissioner opens a CASE session with TH over operational network" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:SC: Sent Sigma1 msg CHIP:CTL: Address resolved for node: 0x0000000000000001 @@ -420,7 +432,7 @@ tests: - label: "Commissioner sends CommissioningComplete command" verification: | - Verify in DUT as client side + Verify in DUT as commissioner side CHIP:CTL: Received CommissioningComplete response CHIP:CTL: Rendezvous cleanup diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml index cbf22f85473687..b6ba6b2d73b862 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_7.yaml @@ -26,6 +26,17 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be WiFi or Thread. + 2 - 5.5 - Commissionee can either be a Matter device which is already on a network or the test harness connected to the network. + disabled: true + - label: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml index 18bea24ee8c4f2..95b80018c71c01 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_8.yaml @@ -26,6 +26,17 @@ config: endpoint: 0 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: "Preconditions" + verification: | + 1 - 5.5 - Commissioner is on a network. - The network can either be WiFi or Thread. + 2 - 5.5 - Commissionee is not connected to an operational network + disabled: true + - label: "Commissioner has regulatory and fabric information available and has accurate date, time and timezone" @@ -758,3 +769,8 @@ tests: CHIP:CTL: Rendezvous cleanup CHIP:TOO: Device commissioning completed with success disabled: true + + - label: "" + verification: | + verification step to be updated. + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml index 98ceb571b3902a..7e181f2c075a3d 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_3_9.yaml @@ -26,9 +26,14 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 - Commissioner is on an operational network and has accurate date, time, timezone, regulatory, and fabric information available. + disabled: true + - label: "TH receives Onboarding Payload from the DUT" verification: | - 1. Parse the DUT"s QR Code using the TH commissioner: chip-tool + 1. Parse the DUT commissionee QR Code using the TH commissioner: chip-tool $ ./chip-tool payload parse-setup-payload MT:-24J029Q00KA0648G00 [1657230447725] [31078:16782733] CHIP: [SPL] Parsing base38Representation: MT:-24J029Q00KA0648G00 [1657230447725] [31078:16782733] CHIP: [SPL] Version: 0 @@ -43,24 +48,36 @@ tests: disabled: true - label: - "TH fetches commissioning data from Distributed Compliance Ledger - (DCL)" + "Follow any custom steps, guided by a service provided by the DUTs + manufacturer for initial device setup, then place the DUT Commissionee + into commissioning mode." verification: | - 1. TH fetches the DCL from DUT"s DCL - 2. Verify that DCL contains the criteria: - - CommissioningCustomFlow field = 2 - - CommissioningModeInitialStepsHint bit 0 (Power Cycle) = 0 and bit 1 (Device Manufacturer URL) = 1 - - CommissioningCustomFlowURL populated with a URL that uses https schema - disabled: true + 1. Follow DUT vendor-specific steps to put DUT into commissioning mode - - label: - "TH uses the provided URL to guide user on how to put DUT in a state - that allows commissioning" - verification: | - 1. Follow steps from DCL"s URL given + 2. Verify DUT is advertising in commissioning mode. On DUT, + + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + [1651192893436] [15304:442604] CHIP: [DL] Mdns: OnNewAddress interface: 24 ip:fe80::dea6:32ff:fe8d:6e32 + [1651192893436] [15304:442604] CHIP: [DIS] Vendor ID: 65521 + [1651192893436] [15304:442604] CHIP: [DIS] Product ID: 32769 + [1651192893436] [15304:442604] CHIP: [DIS] Long Discriminator: 3840 + [1651192893436] [15304:442604] CHIP: [DIS] Pairing Hint: 33 + [1651192893436] [15304:442604] CHIP: [DIS] Hostname: DCA6328D6E320000 [1651192893436] [15304:442604] CHIP: [DIS] Instance Name: 914762134DA8E7D1 + [1651192893436] [15304:442604] CHIP: [DIS] IP Address #1: fe80::dea6:32ff:fe8d:6e32 + [1651192893436] [15304:442604] CHIP: [DIS] Port: 5540 + [1651192893436] [15304:442604] CHIP: [DIS] Commissioning Mode: 1 + [1651192893436] [15304:442604] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1651192893436] [15304:442604] CHIP: [DIS] Mrp Interval active: 300 ms disabled: true - label: "DUT is commissioned by the TH" verification: | 1. Verify that the DUT is commissioned to the TH commissioner successfully + + Verify on the TH as commissioner side: + CHIP:CTL: Received CommissioningComplete response + CHIP:CTL: Rendezvous cleanup + CHIP:TOO: Device commissioning completed with success disabled: true 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 206342e67e963a..c2c35d4ac70359 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 @@ -24,11 +24,37 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Mandatory cluster requirements for each device type can be found here. + github link + Use the correct json required for the DUT, this file is PIXIT.DESC.DeviceTypeConformanceList. + disabled: true + + - label: "Precondition" + verification: | + TH and DUT are commissioned + disabled: true + - label: "TH reads DeviceTypeList and PartsList attributes from DUT for Endpoint 0" PICS: DESC.S.A0000 && DESC.S.A0003 verification: | + Send a read request to the DUT using chip-tool to read the partsList attribute in the descriptor cluster on Endpoint 0. + Make a note of all the items(Endpoint id’s) in the list. In the below example there are 2 endpoint id"s listed [1,2] + + ./chip-tool descriptor read parts-list 1 0 + + Verify PartsList response on the TH (Chip-tool) Log: + + [1641456769.777217][16238:16244] CHIP:DMG: SuppressResponse = true, + [1641456769.777267][16238:16244] CHIP:DMG: } + [1641456769.777839][16238:16244] CHIP:TOO: Descriptor.PartsList response: 2 entries + [1641456769.777925][16238:16244] CHIP:TOO: [1]: 1 + [1641456769.777978][16238:16244] CHIP:TOO: [2]: 2 + [1641456769.778080][16238:16244] CHIP:EM: Sending Standalone Ack for MessageCounter:2830202 on exchange 38042i + ./chip-tool descriptor read device-list 1 0 Verify DeviceList response on the TH (Chip-tool) Log: @@ -46,6 +72,19 @@ tests: Endpoint supported by DUT (except Endpoint 0)." PICS: DESC.S.A0000 && DESC.S.A0003 verification: | + For all the Endpoint id’s listed from the previous step run the following steps. The device type should correspond to the id value in the device_type.json + Chip tool outputs all values in integer, convert to hex before comparing. + + + ./chip-tool descriptor read parts-list 1 1 + + Verify parts-list response on the TH(Chip-tool) Log: + + [1660127331.634565][46437:46442] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 934889243 + [1660127331.634631][46437:46442] CHIP:TOO: parts list: 0 entries + + + ./chip-tool descriptor read device-list 1 1 Verify DeviceList response on the TH(Chip-tool) Log: @@ -57,54 +96,114 @@ tests: [1657200303.724594][2509:2514] CHIP:TOO: Type: 256 [1657200303.724621][2509:2514] CHIP:TOO: Revision: 1 [1657200303.724647][2509:2514] CHIP:TOO: } + + + + ./chip-tool descriptor read parts-list 1 2 + + Verify parts-list response on the TH(Chip-tool) Log: + + [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-list 1 2 + + Verify DeviceList response on the TH(Chip-tool) Log: + + [1660127725.802512][46460:46465] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1237610137 + [1660127725.802614][46460:46465] CHIP:TOO: device list: 1 entries + [1660127725.802669][46460:46465] CHIP:TOO: [1]: { + [1660127725.802707][46460:46465] CHIP:TOO: Type: 256 + [1660127725.802745][46460:46465] CHIP:TOO: Revision: 1 + [1660127725.802781][46460:46465] CHIP:TOO: } disabled: true - label: "TH reads ServerList attribute." PICS: DESC.S.A0001 verification: | - ./chip-tool descriptor read server-list 1 0 + For all the Endpoint id’s listed in step 1a run the following steps. For all the server list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + + ./chip-tool descriptor read server-list 1 1 Verify server list on the TH (Chip-tool) Log: - [1654155402.956829][3701:3706] CHIP:TOO: server list: 26 entries - [1654155402.956863][3701:3706] CHIP:TOO: [1]: 3 - [1654155402.956889][3701:3706] CHIP:TOO: [2]: 4 - [1654155402.956914][3701:3706] CHIP:TOO: [3]: 29 - [1654155402.956939][3701:3706] CHIP:TOO: [4]: 30 - [1654155402.956963][3701:3706] CHIP:TOO: [5]: 31 - [1654155402.956988][3701:3706] CHIP:TOO: [6]: 40 - [1654155402.957012][3701:3706] CHIP:TOO: [7]: 42 - [1654155402.957037][3701:3706] CHIP:TOO: [8]: 43 - [1654155402.957061][3701:3706] CHIP:TOO: [9]: 44 - [1654155402.957086][3701:3706] CHIP:TOO: [10]: 45 - [1654155402.957110][3701:3706] CHIP:TOO: [11]: 46 - [1654155402.957135][3701:3706] CHIP:TOO: [12]: 47 - [1654155402.957159][3701:3706] CHIP:TOO: [13]: 48 - [1654155402.957183][3701:3706] CHIP:TOO: [14]: 49 - [1654155402.957207][3701:3706] CHIP:TOO: [15]: 50 - [1654155402.957231][3701:3706] CHIP:TOO: [16]: 51 - [1654155402.957256][3701:3706] CHIP:TOO: [17]: 52 - [1654155402.957280][3701:3706] CHIP:TOO: [18]: 53 - [1654155402.957304][3701:3706] CHIP:TOO: [19]: 54 - [1654155402.957328][3701:3706] CHIP:TOO: [20]: 55 - [1654155402.957352][3701:3706] CHIP:TOO: [21]: 60 - [1654155402.957376][3701:3706] CHIP:TOO: [22]: 62 - [1654155402.957400][3701:3706] CHIP:TOO: [23]: 63 - [1654155402.957424][3701:3706] CHIP:TOO: [24]: 64 - [1654155402.957449][3701:3706] CHIP:TOO: [25]: 65 - [1654155402.957473][3701:3706] CHIP:TOO: [26]: 1029 + [1660149731.921734][49539:49544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2312399478 + [1660149731.921749][49539:49544] CHIP:TOO: server list: 44 entries + [1660149731.921753][49539:49544] CHIP:TOO: [1]: 3 + [1660149731.921755][49539:49544] CHIP:TOO: [2]: 4 + [1660149731.921758][49539:49544] CHIP:TOO: [3]: 5 + [1660149731.921760][49539:49544] CHIP:TOO: [4]: 6 + [1660149731.921762][49539:49544] CHIP:TOO: [5]: 7 + [1660149731.921765][49539:49544] CHIP:TOO: [6]: 8 + [1660149731.921767][49539:49544] CHIP:TOO: [7]: 15 + [1660149731.921769][49539:49544] CHIP:TOO: [8]: 29 + [1660149731.921772][49539:49544] CHIP:TOO: [9]: 30 + [1660149731.921774][49539:49544] CHIP:TOO: [10]: 37 + [1660149731.921776][49539:49544] CHIP:TOO: [11]: 47 + [1660149731.921779][49539:49544] CHIP:TOO: [12]: 59 + [1660149731.921781][49539:49544] CHIP:TOO: [13]: 64 + [1660149731.921783][49539:49544] CHIP:TOO: [14]: 65 + [1660149731.921785][49539:49544] CHIP:TOO: [15]: 69 + [1660149731.921787][49539:49544] CHIP:TOO: [16]: 80 + [1660149731.921790][49539:49544] CHIP:TOO: [17]: 257 + [1660149731.921792][49539:49544] CHIP:TOO: [18]: 258 + [1660149731.921795][49539:49544] CHIP:TOO: [19]: 259 + [1660149731.921797][49539:49544] CHIP:TOO: [20]: 512 + [1660149731.921799][49539:49544] CHIP:TOO: [21]: 513 + [1660149731.921801][49539:49544] CHIP:TOO: [22]: 514 + [1660149731.921804][49539:49544] CHIP:TOO: [23]: 516 + [1660149731.921806][49539:49544] CHIP:TOO: [24]: 768 + [1660149731.921808][49539:49544] CHIP:TOO: [25]: 1024 + [1660149731.921810][49539:49544] CHIP:TOO: [26]: 1026 + [1660149731.921812][49539:49544] CHIP:TOO: [27]: 1027 + [1660149731.921814][49539:49544] CHIP:TOO: [28]: 1028 + [1660149731.921817][49539:49544] CHIP:TOO: [29]: 1029 + [1660149731.921819][49539:49544] CHIP:TOO: [30]: 1030 + [1660149731.921821][49539:49544] CHIP:TOO: [31]: 1283 + [1660149731.921824][49539:49544] CHIP:TOO: [32]: 1284 + [1660149731.921826][49539:49544] CHIP:TOO: [33]: 1285 + [1660149731.921828][49539:49544] CHIP:TOO: [34]: 1286 + [1660149731.921830][49539:49544] CHIP:TOO: [35]: 1287 + [1660149731.921832][49539:49544] CHIP:TOO: [36]: 1288 + [1660149731.921835][49539:49544] CHIP:TOO: [37]: 1289 + [1660149731.921837][49539:49544] CHIP:TOO: [38]: 1290 + [1660149731.921839][49539:49544] CHIP:TOO: [39]: 1291 + [1660149731.921841][49539:49544] CHIP:TOO: [40]: 1292 + [1660149731.921844][49539:49544] CHIP:TOO: [41]: 1293 + [1660149731.921846][49539:49544] CHIP:TOO: [42]: 1294 + [1660149731.921848][49539:49544] CHIP:TOO: [43]: 2820 + [1660149731.921851][49539:49544] CHIP:TOO: [44]: 4294048773 + + + ./chip-tool descriptor read server-list 1 2 + + [1660146145.982691][46811:46816] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1051414887 + [1660146145.982733][46811:46816] CHIP:TOO: server list: 5 entries + [1660146145.982744][46811:46816] CHIP:TOO: [1]: 4 + [1660146145.982752][46811:46816] CHIP:TOO: [2]: 6 + [1660146145.982759][46811:46816] CHIP:TOO: [3]: 29 + [1660146145.982771][46811:46816] CHIP:TOO: [4]: 47 + [1660146145.982778][46811:46816] CHIP:TOO: [5]: 1030 disabled: true - label: "TH reads ClientList attribute" PICS: DESC.S.A0002 verification: | - ./chip-tool descriptor read client-list 1 0 + For all the Endpoint id’s listed in step 1a run the following steps. For all the client list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + + + ./chip-tool descriptor read client-list 1 1 Verify client list on the TH (Chip-tool) Log: + [1660195618.042544][2905:2910] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 2955150741 + [1660195618.042605][2905:2910] CHIP:TOO: client list: 0 entries - [1650281818.533446][9679:9684] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1976976904 - [1650281818.533514][9679:9684] CHIP:TOO: client list: 1 entries - [1650281818.533563][9679:9684] CHIP:TOO: [1]: 41 + ./chip-tool descriptor read client-list 1 2 + + Verify client list on the TH (Chip-tool) Log: + + [1660146160.390200][46818:46823] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1051414887 + [1660146160.390211][46818:46823] CHIP:TOO: client list: 0 entries disabled: true - label: "TH reads PartsList attribute." @@ -127,5 +226,43 @@ tests: to make sure all mandatory (and applicable optional) attributes/commands are implemented." verification: | - verification step to be updated. + FOR ENDPOINTS 2 + + + ./chip-tool descriptor read parts-list 1 2 + + Verify parts-list response on the TH(Chip-tool) Log: + + [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-list 1 2 + + Verify DeviceList response on the TH(Chip-tool) Log: + + [1660127725.802512][46460:46465] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1237610137 + [1660127725.802614][46460:46465] CHIP:TOO: device list: 1 entries + [1660127725.802669][46460:46465] CHIP:TOO: [1]: { + [1660127725.802707][46460:46465] CHIP:TOO: Type: 256 + [1660127725.802745][46460:46465] CHIP:TOO: Revision: 1 + [1660127725.802781][46460:46465] CHIP:TOO: } + + ./chip-tool descriptor read server-list 1 2 + + Verify server list on the TH (Chip-tool) Log: + + [1660146145.982691][46811:46816] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1051414887 + [1660146145.982733][46811:46816] CHIP:TOO: server list: 5 entries + [1660146145.982744][46811:46816] CHIP:TOO: [1]: 4 + [1660146145.982752][46811:46816] CHIP:TOO: [2]: 6 + [1660146145.982759][46811:46816] CHIP:TOO: [3]: 29 + [1660146145.982771][46811:46816] CHIP:TOO: [4]: 47 + [1660146145.982778][46811:46816] CHIP:TOO: [5]: 1030 + + ./chip-tool descriptor read client-list 1 2 + + Verify client list on the TH (Chip-tool) Log: + + [1660146160.390200][46818:46823] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1051414887 + [1660146160.390211][46818:46823] CHIP:TOO: client list: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml index 86a6beb3e9b8b4..fd9b809155774e 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml @@ -44,12 +44,16 @@ tests: scenario)" PICS: DRLK.S.E00 && DRLK.S.DetectLockJammed verification: | - To trigger the event give below command in another terminal of DUT + To trigger the event give below command by opening an another terminal of DUT echo "{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }" > /tmp/chip_lock_app_fifo- (PID of lock-app) For example : echo "{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }" > /tmp/chip_lock_app_fifo-3940 + disabled: true + - label: "TH reads the DoorLockAlarm event from DUT" + PICS: DRLK.S.E00 + verification: | ./chip-tool doorlock read-event door-lock-alarm 1 1 Verify "TH receives the DoorLockAlarm event and AlarmCode is set to LockJammed " on the TH(Chip-tool) Log: @@ -63,37 +67,16 @@ tests: [1659521453.110591][4098:4103] CHIP:TOO: } disabled: true - - label: "TH reads the DoorLockAlarm event from DUT" - PICS: DRLK.S.E00 - verification: | - verification step to be updated. - disabled: true - - label: "Trigger the DUT to generate DoorStateChange Event" PICS: DRLK.S.F05 && DRLK.S.E01 verification: | To trigger the event give below command in another terminal of DUT echo "{"Cmd": "SetDoorState", "Params": { "EndpointId": 1, "DoorState": 1 } }" > /tmp/chip_lock_app_fifo-4055 (4055 - value changes) - - ./chip-tool doorlock read-event door-state-change 1 1 - - Verify "TH recieve the DoorLockAlaram event and DoorState set to DoorClosed " on the TH(Chip-tool) Log: - - [1659521576.156075][4109:4114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0001 - [1659521576.156118][4109:4114] CHIP:TOO: Event number: 1 - [1659521576.156150][4109:4114] CHIP:TOO: Priority: Critical - [1659521576.156181][4109:4114] CHIP:TOO: Timestamp: 23466089 - [1659521576.156277][4109:4114] CHIP:TOO: DoorStateChange: { - [1659521576.156331][4109:4114] CHIP:TOO: DoorState: 1 - [1659521576.156368][4109:4114] CHIP:TOO: } disabled: true - label: "TH reads the DoorStateChange event from DUT" PICS: DRLK.S.F05 && DRLK.S.E01 verification: | - To trigger the event give below command in another terminal of DUT - echo "{"Cmd": "SetDoorState", "Params": { "EndpointId": 1, "DoorState": 1 } }" > /tmp/chip_lock_app_fifo-4055 (4055 - value changes) - ./chip-tool doorlock read-event door-state-change 1 1 Verify "TH recieve the DoorLockAlaram event and DoorState set to DoorClosed " on the TH(Chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml index 18eacd39f1aae0..82e79debbf4c59 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -14,6 +14,9 @@ name: 111.2.2. [TC-DRLK-2.2] Verification for Door lock command[DUT-Server] +PICS: + - DRLK.S + config: nodeId: 0x12344321 cluster: "Door Lock" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml index 3f4e53638ed919..b0b2097a8e1d47 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml @@ -14,6 +14,9 @@ name: 111.2.3. [TC-DRLK-2.3] Verification for Unlock Door command [DUT-Server] +PICS: + - DRLK.S + config: nodeId: 0x12344321 cluster: "Door Lock" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml index 6dc3140f82faf5..e0dba94eac3990 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads LockState from the TH." PICS: DRLK.C.A0000 verification: | 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 652cf20cf02915..9913e84fb2f000 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 @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT sends Lock Door command to TH." PICS: DRLK.C.C00.Tx verification: | @@ -864,3 +869,35 @@ tests: [1657115878.585752][8804:8804] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] [1657115878.585802][8804:8804] CHIP:ZCL: [clearCredential] Ignored attempt to clear unoccupied credential slot [endpointId=1,credentialType=1,credentialIndex=1,modifier=1] disabled: true + + - label: "" + verification: | + ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 + + Verify the " clear-user command response" on TH(lock-app): + + + [1658399779.246157][2474:2474] CHIP:DMG: CommandDataIB = + [1658399779.246193][2474:2474] CHIP:DMG: { + [1658399779.246219][2474:2474] CHIP:DMG: CommandPathIB = + [1658399779.246258][2474:2474] CHIP:DMG: { + [1658399779.246301][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399779.246336][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399779.246381][2474:2474] CHIP:DMG: CommandId = 0x1d, + [1658399779.246411][2474:2474] CHIP:DMG: }, + [1658399779.246452][2474:2474] CHIP:DMG: + [1658399779.246480][2474:2474] CHIP:DMG: CommandFields = + [1658399779.246519][2474:2474] CHIP:DMG: { + [1658399779.246562][2474:2474] CHIP:DMG: 0x0 = 1, + [1658399779.246595][2474:2474] CHIP:DMG: }, + [1658399779.246631][2474:2474] CHIP:DMG: }, + [1658399779.246662][2474:2474] CHIP:DMG: + [1658399779.246694][2474:2474] CHIP:DMG: ], + [1658399779.246732][2474:2474] CHIP:DMG: + [1658399779.246757][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399779.246788][2474:2474] CHIP:DMG: }, + [1658399779.246862][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399779.246899][2474:2474] CHIP:DMG: AccessControl: allowed + [1658399779.246926][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D + [1658399779.246958][2474:2474] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=1] + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml index 749d10874e91d8..b909f1aea6b7d7 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml @@ -27,24 +27,54 @@ config: tests: - label: "Note" verification: | - 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. + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Note" + verification: | + "NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/linux#readme + Events to be executed as following + 1. Compile app using below command in connectedhomeip folder + a. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build + b. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-libfuzzer-clang build + 2. Build respective app (lock-app) + 3. Commission DUT to TH + 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT + ps -aef|grep lock-app + 5. Follow the Verification step below to generate the event in 2nd terminal of DUT " disabled: true - label: "TH will initiate DoorLockAlarm Event (LockJammed scenario)" PICS: DRLK.C.E00 verification: | + To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in lock-app to generate the event, Vendor Dut should have capability to generate this event) + + + 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) and TH as lock-app. + + To generate the event give below command + echo "{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }" > /tmp/chip_lock_app_fifo- (PID of lock app) + ./chip-tool doorlock read-event door-lock-alarm 1 1 Verify "DUT receives the DoorLockAlarm event " on the TH(Lock-app) Log: - [1659520755.536021][3987:3992] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0000 - [1659520755.536048][3987:3992] CHIP:TOO: Event number: 4 - [1659520755.536069][3987:3992] CHIP:TOO: Priority: Critical - [1659520755.536089][3987:3992] CHIP:TOO: Timestamp: 22818908 - [1659520755.536198][3987:3992] CHIP:TOO: DoorLockAlarm: { - [1659520755.536234][3987:3992] CHIP:TOO: AlarmCode: 0 - [1659520755.536259][3987:3992] CHIP:TOO: } - [1659520755.536347][3987:3992] CHIP:EM: Sending Standalone Ack for MessageCounter:229373286 on exchange 22555i + [1660933624.278924][18319:18319] CHIP:DMG: ReadRequestMessage = + [1660933624.278964][18319:18319] CHIP:DMG: { + [1660933624.278987][18319:18319] CHIP:DMG: EventPathIBs = + [1660933624.279023][18319:18319] CHIP:DMG: [ + [1660933624.279116][18319:18319] CHIP:DMG: EventPath = + [1660933624.279155][18319:18319] CHIP:DMG: { + [1660933624.279192][18319:18319] CHIP:DMG: Endpoint = 0x1, + [1660933624.279232][18319:18319] CHIP:DMG: Cluster = 0x101, + [1660933624.279271][18319:18319] CHIP:DMG: Event = 0x0, + [1660933624.279300][18319:18319] CHIP:DMG: }, + [1660933624.279337][18319:18319] CHIP:DMG: + [1660933624.279360][18319:18319] CHIP:DMG: ], + [1660933624.279397][18319:18319] CHIP:DMG: + [1660933624.279422][18319:18319] CHIP:DMG: isFabricFiltered = true, + [1660933624.279455][18319:18319] CHIP:DMG: InteractionModelRevision = 1 + [1660933624.279478][18319:18319] CHIP:DMG: }, disabled: true - label: "DUT sends the Unlock Door command to the TH with valid PINCode" @@ -75,35 +105,47 @@ tests: [1658399917.775273][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A [1658399917.775327][2474:2474] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=1] - ./chip-tool doorlock set-credential 0 "{ "credentialType" : 1 , "credentialIndex" : 1 }" 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock set-credential 0 "{ "credentialType" : 1 , "credentialIndex" : 1 }" 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 Verify "DUT receives the set-credential response " on the TH(Lock-app) Log: - [1658400025.688730][2474:2474] CHIP:DMG: CommandFields = - [1658400025.688777][2474:2474] CHIP:DMG: { - [1658400025.688822][2474:2474] CHIP:DMG: 0x0 = 0, - [1658400025.688873][2474:2474] CHIP:DMG: 0x1 = - [1658400025.688922][2474:2474] CHIP:DMG: { - [1658400025.688964][2474:2474] CHIP:DMG: 0x0 = 1, - [1658400025.689016][2474:2474] CHIP:DMG: 0x1 = 1, - [1658400025.689058][2474:2474] CHIP:DMG: }, - [1658400025.689110][2474:2474] CHIP:DMG: 0x2 = [ - [1658400025.689161][2474:2474] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - [1658400025.689209][2474:2474] CHIP:DMG: ] - [1658400025.689261][2474:2474] CHIP:DMG: 0x3 = 1, - [1658400025.689312][2474:2474] CHIP:DMG: 0x4 = 0, - [1658400025.689353][2474:2474] CHIP:DMG: 0x5 = 0, - [1658400025.689403][2474:2474] CHIP:DMG: }, - [1658400025.689436][2474:2474] CHIP:DMG: }, - [1658400025.689477][2474:2474] CHIP:DMG: - [1658400025.689529][2474:2474] CHIP:DMG: ], - [1658400025.689575][2474:2474] CHIP:DMG: - [1658400025.689619][2474:2474] CHIP:DMG: InteractionModelRevision = 1 - [1658400025.689648][2474:2474] CHIP:DMG: }, - [1658400025.689747][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1658400025.689802][2474:2474] CHIP:DMG: AccessControl: allowed - [1658400025.689836][2474:2474] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 - [1658400025.689909][2474:2474] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] + [1660931208.583139][18319:18319] CHIP:DMG: InvokeRequestMessage = + [1660931208.583184][18319:18319] CHIP:DMG: { + [1660931208.583226][18319:18319] CHIP:DMG: suppressResponse = false, + [1660931208.583275][18319:18319] CHIP:DMG: timedRequest = true, + [1660931208.583319][18319:18319] CHIP:DMG: InvokeRequests = + [1660931208.583381][18319:18319] CHIP:DMG: [ + [1660931208.583426][18319:18319] CHIP:DMG: CommandDataIB = + [1660931208.583475][18319:18319] CHIP:DMG: { + [1660931208.583522][18319:18319] CHIP:DMG: CommandPathIB = + [1660931208.583579][18319:18319] CHIP:DMG: { + [1660931208.583636][18319:18319] CHIP:DMG: EndpointId = 0x1, + [1660931208.583698][18319:18319] CHIP:DMG: ClusterId = 0x101, + [1660931208.583757][18319:18319] CHIP:DMG: CommandId = 0x22, + [1660931208.583813][18319:18319] CHIP:DMG: }, + [1660931208.583871][18319:18319] CHIP:DMG: + [1660931208.583923][18319:18319] CHIP:DMG: CommandFields = + [1660931208.583979][18319:18319] CHIP:DMG: { + [1660931208.584037][18319:18319] CHIP:DMG: 0x0 = 0, + [1660931208.584100][18319:18319] CHIP:DMG: 0x1 = + [1660931208.584158][18319:18319] CHIP:DMG: { + [1660931208.584220][18319:18319] CHIP:DMG: 0x0 = 1, + [1660931208.584289][18319:18319] CHIP:DMG: 0x1 = 1, + [1660931208.584353][18319:18319] CHIP:DMG: }, + [1660931208.584413][18319:18319] CHIP:DMG: 0x2 = [ + [1660931208.584473][18319:18319] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + [1660931208.584540][18319:18319] CHIP:DMG: ] (6 bytes) + [1660931208.584596][18319:18319] CHIP:DMG: 0x3 = 1, + [1660931208.584662][18319:18319] CHIP:DMG: 0x4 = NULL + [1660931208.584722][18319:18319] CHIP:DMG: 0x5 = NULL + [1660931208.584781][18319:18319] CHIP:DMG: }, + [1660931208.584834][18319:18319] CHIP:DMG: }, + [1660931208.584895][18319:18319] CHIP:DMG: + [1660931208.584938][18319:18319] CHIP:DMG: ], + [1660931208.584999][18319:18319] CHIP:DMG: + [1660931208.585043][18319:18319] CHIP:DMG: InteractionModelRevision = 1 + [1660931208.585086][18319:18319] CHIP:DMG: }, + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PinCode 123456 @@ -163,18 +205,30 @@ tests: - label: "TH initiates DoorStateChange event with Doorstate set to DoorOpen" PICS: DRLK.C.F05 && DRLK.C.E01 verification: | + To trigger the event give below command in another terminal of DUT + echo "{"Cmd": "SetDoorState", "Params": { "EndpointId": 1, "DoorState": 1 } }" > /tmp/chip_lock_app_fifo- (PID of lock-app) + ./chip-tool doorlock read-event door-state-change 1 1 Verify "DUT receives DoorStateChange Event" on the TH(Lock-app) Log: - [1659521149.394340][4046:4051] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0001 - [1659521149.394391][4046:4051] CHIP:TOO: Event number: 1 - [1659521149.394412][4046:4051] CHIP:TOO: Priority: Critical - [1659521149.394433][4046:4051] CHIP:TOO: Timestamp: 22783568 - [1659521149.394503][4046:4051] CHIP:TOO: DoorStateChange: { - [1659521149.394539][4046:4051] CHIP:TOO: DoorState: 1 - [1659521149.394564][4046:4051] CHIP:TOO: } - [1659521149.394654][4046:4051] CHIP:EM: Sending Standalone Ack for MessageCounter:231120057 on exchange 10153i + [1660933582.187791][18319:18319] CHIP:DMG: ReadRequestMessage = + [1660933582.187819][18319:18319] CHIP:DMG: { + [1660933582.187851][18319:18319] CHIP:DMG: EventPathIBs = + [1660933582.187877][18319:18319] CHIP:DMG: [ + [1660933582.187901][18319:18319] CHIP:DMG: EventPath = + [1660933582.187937][18319:18319] CHIP:DMG: { + [1660933582.187966][18319:18319] CHIP:DMG: Endpoint = 0x1, + [1660933582.188006][18319:18319] CHIP:DMG: Cluster = 0x101, + [1660933582.188035][18319:18319] CHIP:DMG: Event = 0x1, + [1660933582.188069][18319:18319] CHIP:DMG: }, + [1660933582.188100][18319:18319] CHIP:DMG: + [1660933582.188132][18319:18319] CHIP:DMG: ], + [1660933582.188159][18319:18319] CHIP:DMG: + [1660933582.188193][18319:18319] CHIP:DMG: isFabricFiltered = true, + [1660933582.188218][18319:18319] CHIP:DMG: InteractionModelRevision = 1 + [1660933582.188250][18319:18319] CHIP:DMG: }, + [1660933582.188328][18319:18319] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: "DUT sends the Lock Door command to the TH with valid PINCode" diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml index 2252e4fa8d01bb..f7a6ebbc7eeb10 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml @@ -15,9 +15,6 @@ name: 3.3.1. [TC-IDM-3.1] Write Request Action from DUT to TH. [{DUT_Client}] -PICS: - - MCORE.IDM.C.WriteRequest - config: nodeId: 0x12344321 cluster: "Basic" 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 5ebd36b33d7d77..1fd77cd9e875d5 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 @@ -32,11 +32,6 @@ tests: Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - - label: "Note" - verification: | - 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: "TH sends Subscribe Request Message to DUT with EventRequests set to a specific event from a specific cluster on a specific endpoint on a diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml index f9c15459f0130c..ab5421f1ded75d 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + 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: "DUT sends Read Request Message to the TH for a supported event." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml index 46634220980848..45e15fe6bfd33d 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml @@ -46,7 +46,7 @@ tests: - label: "TH writes xx-XX to SupportedLocales attribute" verification: | - ./chip-tool any write-by-id 0x002B 1 ""xx-XX"" 1 0 + ./chip-tool any write-by-id 0x002B 1 '"xx-XX"' 1 0 On TH(chip-tool) verify that DUT responds as UNSUPPORTED_WRITE [1653996674.832226][7281:7286] CHIP:DMG: WriteClient moving to [AwaitingDe] diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml index b9caa8a2be326b..3dea75d005036b 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml @@ -26,7 +26,7 @@ config: tests: - label: "Note" verification: | - 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. + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true - label: "Commission DUT to TH" @@ -149,8 +149,3 @@ tests: [1659778463.618601][17263:17263] CHIP:DMG: IM RH moving to [GeneratingReports] [1659778463.618663][17263:17263] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 disabled: true - - - label: "" - verification: | - verification step to be updated. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml index d8e61b7df8e803..061f1b8d05ac29 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifaction: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" @@ -633,9 +638,9 @@ tests: TH all-clusters-minimal-app does not support optional attributes To verify this behaviour send the below mentioned commands and check the result as unsupported attribute - ./chip-tool levelcontrol write on-off-transition-time 5 1 1 - ./chip-tool levelcontrol write on-transition-time 5 1 1 - ./chip-tool levelcontrol write off-transition-time 5 1 1 - ./chip-tool levelcontrol write default-move-rate 5 1 1 - ./chip-tool levelcontrol write start-up-current-level 5 1 1 + ./chip-tool levelcontrol write on-off-transition-time 5 1 1 + ./chip-tool levelcontrol write on-transition-time 5 1 1 + ./chip-tool levelcontrol write off-transition-time 5 1 1 + ./chip-tool levelcontrol write default-move-rate 5 1 1 + ./chip-tool levelcontrol write start-up-current-level 5 1 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml index dedbb274dee5a3..095deb01323ba0 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml index e6653073d7a4b0..806b9c05f89290 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command + disabled: true + - label: "DUT reads the SupportedModes attribute from the TH" PICS: MOD.C.A0002 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml index ec53ad0c219e1b..63288a4d31c98d 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -24,17 +24,18 @@ config: endpoint: 0 tests: - - label: "Pre-conditions:" - 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: "Note" verification: | - 1.To run this test case build the OTA Provider app in nRF connectedhomeip Docker . [ + 1.To run this test case build the OTA Provider app to be build in the nRF Environment setup . Follow this step to setup the nRF build environment using container. + https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#using-docker-container-for-setup + + Once the build environmnet is ready , build teh OTA-Provider-App inside the container. Follow the below link to build the OTA-Provider app https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-provider-app/linux - 2. Build all-cluster-app in docker + 2. Build all-cluster-app in docker or Flash the pre-built folder from the delivered image + + To build maually and flash follow steps explained in: + https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#building west build -b nrf52840dk_nrf52840 -- -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y @@ -42,7 +43,11 @@ tests: 3.Flash west flash --erase - 4.OTA Image needs to build on docker + 4.OTA Image needs to build on the docker environment as like in the first step inside the all-clusters-app folder. Refer the below link to build the OTA image with new version. + + https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-requestor-app/linux#ota-requestor-app-linux + + To build the ota image with new version for nRF, use the following command inside the all-clusters-app folder , which will build matter.ota west build -b nrf52840dk_nrf52840 -d build2 -- -DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y disabled: true @@ -122,7 +127,11 @@ tests: verification: | To perform an OTA update on Thread device follow the cmmds below: - Step-1 : ./chip-ota-provider-app -f ~/chip_repos/connectedhomeip/examples/all-clusters-app/nrfconnect/build2/zephyr/matter.ota + Step-1 : Where we builded OTA provider app execute this cmmd . (In my case I ran connectedhomeip/out/debug ./chip-ota-provider-app -f ) + + ./chip-ota-provider-app -f ~/chip_repos/connectedhomeip/examples/all-clusters-app/nrfconnect/build2/zephyr/matter.ota + + Ran on chip-tool: Step-2: ./chip-tool pairing onnetwork 2 20202021 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml index 5a9118852691de..fd5883aecea22f 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml @@ -26,11 +26,6 @@ config: endpoint: 0 tests: - - label: "Pre-conditions:" - 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: "Note" verification: | To Execute the TC-MOD-3.4 test case using reboot in raspi device we followed the below suggested way: @@ -38,9 +33,9 @@ tests: 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 sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app sudo ./out/all-clusters-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 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml index 4be4ecaa5c749f..6fed52808eb096 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml @@ -20,10 +20,15 @@ PICS: config: nodeId: 0x12344321 - cluster: "Occupancy Sensing" - endpoint: 1 + cluster: "Basic" + endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Commission DUT to TH" verification: | verification step to be updated. diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml index f70d33351a6031..333db4004d2af8 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml @@ -26,6 +26,11 @@ config: endpoint: 1 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Commission DUT to TH" verification: | verification step to be updated. diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml index da18a036e8512d..d6af25ba58631c 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_2.yaml index 5730c3100f97ff..9f833109f95aae 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_3_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT issues an Off command to the Test Harness." PICS: OO.C.C00.Tx verification: | 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 7354d15140d161..e8a8c3d394cc91 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 @@ -26,6 +26,13 @@ config: endpoint: 0 tests: + - label: + "Precondition: This test case assumes that during Commissioning AddNOC + will be sent with ICACValue" + verification: | + + disabled: true + - label: "Factory Reset DUT" verification: | On both DUT and TH side use the below command @@ -237,8 +244,8 @@ 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 + "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: | @@ -274,10 +281,10 @@ tests: - label: "Verify that TH1 is able to read the FabricDescriptorStruct values - ,Verify that Fabrics list does not have any entry as FabricID = + Verify that Fabrics list does not have any entry as FabricID = FabricID2" verification: | - Verify the FabricDescriptorStruct values has no entry og FabricID2 + Verify the FabricDescriptorStruct values has no entry log FabricID2 on TH1 [1657693240.722099][15129:15134] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 908345149 [1657693240.722200][15129:15134] CHIP:TOO: Fabrics: 1 entries @@ -388,7 +395,7 @@ tests: - 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 ICAC matches the ICAC sent to the DUT during commissioning process from AddNOC in pre-condition" verification: | 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 3486d8b349a92e..010a2adb87b5b6 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,7 +45,7 @@ tests: - label: "Verify that the DUT sends AttestationRequest Command to TH" PICS: OPCREDS.C.C00.Tx verification: | - Verify that the DUT send AttestationRequest Command to TH(all-clusters-app) + Verify that the DUT send AttestationRequest Command to TH(all-clusters-app) commissioning log [1657778307.595402][8192:8197] CHIP:CTL: Commissioning stage next step: "SendDACCertificateRequest" -> "SendAttestationRequest" [1657778307.595466][8192:8197] CHIP:CTL: Performing next commissioning step "SendAttestationRequest" @@ -288,7 +288,7 @@ tests: - label: "Verify that the DUT sends CertificateChainRequest Command to TH" PICS: OPCREDS.C.C02.Tx verification: | - Verify that the DUT send CertificateChainRequest Command to TH (all-clusters-app) + Verify that the DUT send CertificateChainRequest Command to TH (all-clusters-app) commissioning log [1657778306.864918][8192:8197] CHIP:CTL: Sending Certificate Chain request to 0xffff78000b60 device [1657778306.865059][8192:8197] CHIP:DMG: ICR moving to [AddingComm] @@ -419,7 +419,7 @@ tests: - label: "Verify that the DUT Sends CSRRequest command to TH" PICS: OPCREDS.C.C04.Tx verification: | - Verify that the DUT send CSRRequest command to TH (all-clusters-app) + Verify that the DUT send CSRRequest command to TH (all-clusters-app) commissioning log [1657778307.949847][8192:8197] CHIP:CTL: Sending CSR request to 0xffff78000b60 device [1657778307.949923][8192:8197] CHIP:DMG: ICR moving to [AddingComm] @@ -519,7 +519,7 @@ tests: which contains the Node Operational PublicKey from CSR AttestationSignature" verification: | - Extract the CSRResponse values from TH (all-clusters-app) + Extract the CSRResponse values from TH (all-clusters-app) commissioning log [1657778308.175702][8192:8197] CHIP:EM: Found matching exchange: 40144i, Delegate: 0xaaaaf7819670 [1657778308.175743][8192:8197] CHIP:DMG: ICR moving to [ResponseRe] @@ -563,7 +563,7 @@ tests: - label: "Verify that the DUT sends AddTrustedRootCertificate command to TH" PICS: OPCREDS.C.C0b.Tx verification: | - Verify that the DUT send AddTrustedRootCertificate command to TH (all-clusters-app) + Verify that the DUT send AddTrustedRootCertificate command to TH (all-clusters-app) commissioning log [1657778308.179742][8192:8197] CHIP:CTL: Performing next commissioning step "SendTrustedRootCert" [1657778308.179769][8192:8197] CHIP:CTL: Sending root certificate to the device @@ -683,7 +683,7 @@ tests: - label: "Verify that DUT sends the AddNOC Command to TH" PICS: OPCREDS.C.C06.Tx verification: | - Verify that the DUT send AddNOC command to TH (all-clusters-app) + Verify that the DUT send AddNOC command to TH (all-clusters-app) commissioning log [1657778308.374786][8192:8197] CHIP:CTL: Performing next commissioning step "SendNOC" @@ -920,12 +920,12 @@ tests: disabled: true - label: - "Verify that the size of RootPublicKey is within 65 octstr ,Verify + "Verify that the size of RootPublicKey is within 65 octstr. Verify that the NodeID is the same as the chip-node-id in the NOC sent with - AddNOC Command,Verify that the VendorID is the same as the - AdminVendorID sent with AddNOC Command,Verify that the FabricID is the - same as the matter-fabric-id field from the operational - certificate,Verify that the size of Label has a maximum value of 32 + AddNOC Command. Verify that the VendorID is the same as the + AdminVendorID sent with AddNOC Command. Verify that the FabricID is + the same as the matter-fabric-id field from the operational + certificate. Verify that the size of Label has a maximum value of 32 bytes." verification: | Verify that the following on TH (all-clusters-app) log diff --git a/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml index ea7108c7a0d7a0..e2afec23eb8851 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_2_2.yaml index 0cd5f3da210b15..3a4e367bb7a47d 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_2_2.yaml @@ -24,6 +24,11 @@ config: 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: "Commission DUT to TH" verification: | verification step to be updated. @@ -48,26 +53,26 @@ tests: "TH reads the Order attribute from Power Source Cluster at Enpoint[eNr] of the DUT" verification: | - ./chip-tool powersource read order 1 1 + ./chip-tool powersource read order 1 2 verify on TH(chip-tool) that order attribute succeeds with no error.The order value is the same or greater than the order value of the previous iteration - [...] - [1653564242.694964][36231:36236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_0001 DataVersion: 4212858705 - [1653564242.695038][36231:36236] CHIP:TOO: Order: 2 + [1659879820.566144][2615:2620] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_002F Attribute 0x0000_0001 DataVersion: 1842182672 + [1659879820.569572][2615:2620] CHIP:TOO: Order: 1 - ./chip-tool powersource read order 1 2 + + ./chip-tool powersource read order 1 1 verify on TH(chip-tool) that order attribute succeeds with no error.The order value is the same or greater than the order value of the previous iteration - [1659879820.566144][2615:2620] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_002F Attribute 0x0000_0001 DataVersion: 1842182672 - [1659879820.569572][2615:2620] CHIP:TOO: Order: 1 + [...] + [1653564242.694964][36231:36236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_0001 DataVersion: 4212858705 + [1653564242.695038][36231:36236] CHIP:TOO: Order: 2 - ./chip-tool powersource read order 1 0 + ./chip-tool powersource read order 1 0 verify on TH(chip-tool) that order attribute succeeds with no error.The order value is the same or greater than the order value of the previous iteration [1659879944.863570][2633:2638] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_0001 DataVersion: 1479870496 [1659879944.863664][2633:2638] CHIP:TOO: Order: 3 - [1659879944.863854][2633:2638] CHIP:EM: Sending Standalone Ack for MessageCounter:4546692 on exchange 20518i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml index dca4b6443e6364..4f33bf4e31ab3f 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" 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 887f256cbbc1db..c137d70c6a29e7 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 @@ -39,6 +39,8 @@ tests: verification: | avahi-browse -rt _matter._tcp + Verify on the TH Log: + + veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local = veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local hostname = [E45F0149AE290000.local] 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 5f28f3d5beaeaa..0062e1c7f3e949 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 @@ -26,6 +26,11 @@ config: endpoint: 0 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: "DUT is instructed to start advertising its presence as a commissioner in the network" @@ -56,8 +61,7 @@ tests: - to look for subtypes, on the raspi run $ avahi-browse -p _services._dns-sd._udp - | grep _matterd + to look for subtypes, on the raspi run $ avahi-browse -p _services._dns-sd._udp | grep _matterd +;eth0;IPv6;_CM;_sub._matterd._udp;local +;eth0;IPv6;_L3840;_sub._matterd._udp;local diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml index 2ffd0fd3854d6b..5d2e190fdaff95 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml @@ -26,9 +26,14 @@ config: endpoint: 0 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: "Commission TH1 to DUTs Fabric" verification: | - 1. Provision the device using 1st controller chip-tool (as example commissioner) on the raspi (use above instructions) + 1. Provision the device using 1st controller chip-tool (as example commissioner) on the raspi (use the instructions) ./chip-tool pairing onnetwork 2 20202021 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml index ac51168f2d9a1e..a930c424fe8135 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -46,7 +46,8 @@ tests: - label: "Set up subscription to SwitchLatched event" PICS: SWTCH.S.F00 verification: | - In Raspi platform to change the switch position use the below command, Pls use equivalent command on the respective DUT.After provisioning ,open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + echo "{"Name":"SwitchLatched","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -69,7 +70,7 @@ tests: - label: "Operator sets switch to first position" PICS: SWTCH.S.F00 verification: | - In Raspi platform to change the switch to first position use the below command, Pls use equivalent command on the respective DUT.After provisioning ,open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"SwitchLatched","NewPosition":0}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -95,7 +96,7 @@ tests: - label: "Operator sets switch to second position" PICS: SWTCH.S.F00 verification: | - In Raspi platform to change the switch to second position use the below sample command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"SwitchLatched","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -118,12 +119,12 @@ tests: disabled: true - label: - "If NumberOfPositions>2 (see 2c of TC-SWTCH-2.1) : - Operator sets + "If NumberOfPositions>2 (see 2a of TC-SWTCH-2.1) : - Operator sets switch to next position - Read CurrentPosition attribute" verification: | Raspi device doesn"t support more than 2 position ,so this step is not verifiable by using raspi device - In Raspi platform to change the switch to third position use the below sample command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"SwitchLatched","NewPosition":2}" > /tmp/chip_all_clusters_fifo (PID of DUT) @@ -173,7 +174,7 @@ tests: - label: "Operator returns switch to first position" PICS: SWTCH.S.F00 verification: | - In Raspi platform to change the switch to first position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"SwitchLatched","NewPosition":0}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -198,7 +199,7 @@ tests: - label: "Set up subscription to InitialPress event" PICS: SWTCH.S.F01 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -243,7 +244,7 @@ tests: - label: "Operator operates switch (keep it pressed)" PICS: SWTCH.S.F01 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -268,7 +269,7 @@ tests: - label: "Operator does not operate switch (release switch)" PICS: SWTCH.S.F01 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -291,7 +292,7 @@ tests: - label: "Set up subscription to InitialPress and ShortRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -300,7 +301,7 @@ tests: [1659686596.526820][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659686596.526881][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -354,7 +355,7 @@ tests: "Operator operates switch (keep pressed for long time, e.g. 5 seconds)" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo_2530 @@ -380,7 +381,7 @@ tests: - label: "Operator releases switch" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -408,7 +409,7 @@ tests: LongRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F03 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -417,7 +418,7 @@ tests: [1659693098.031859][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659693098.031888][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"LongPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -426,7 +427,7 @@ tests: [1659693130.925064][2530:2530] CHIP:-: The new position when the momentary switch has been pressed for a long time:1 [1659693130.925313][2530:2530] CHIP:ZCL: SwitchServer: OnLongPress - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -435,7 +436,7 @@ tests: [1659693174.709479][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 [1659693174.709539][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"LongRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -538,7 +539,7 @@ tests: MultiPressComplete events" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"InitialPress","NewPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -547,7 +548,7 @@ tests: [1659693098.031859][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659693098.031888][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -556,7 +557,7 @@ tests: [1659694387.720237][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 [1659694387.720304][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":1}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -564,7 +565,7 @@ tests: [1659694592.348389][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e772b [1659694592.348481][2530:2530] CHIP:-: The new position when the momentary switch has been pressed in a multi-press sequence:1 - In Raspi platform to change the switch to second position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"MultiPressOngoing","NewPosition":1,"CurrentNumberOfPressesCounted":2}" > /tmp/chip_all_clusters_fifo- (PID of DUT) @@ -869,7 +870,7 @@ tests: [1659696223.568397][3981:3986] CHIP:TOO: } - In Raspi platform to change the switch position use the below command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) echo "{"Name":"MultiPressOngoing","previousPosition":1,"CurrentNumberOfPressesCounted":3}" > /tmp/chip_all_clusters_fifo- (PID of DUT) diff --git a/src/app/tests/suites/certification/Test_TC_TMP_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_3_1.yaml index e4101b19ecb7a3..f2dc3a06570cfa 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml index 5ee9d5d49fae27..90989264ca2dff 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" 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 1aaa744557356c..ab6f0e52bac81c 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 @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + 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 diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml index b1667296ad68a5..93899e3ed8eb66 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml @@ -28,6 +28,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml index 099a68415e1279..391fa07689121e 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "DUT reads LabelList from the TH" PICS: ULABEL.C.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_5_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_5_1.yaml index d1b9f4360ea558..ad1a9212f3c838 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_5_1.yaml @@ -24,12 +24,17 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Check Attribute defining the cluster Features" verification: | verification step to be updated. disabled: true - - label: "DUT reads the (65532) _FeatureMap_ attribute from T" + - label: "DUT reads the (65532) _FeatureMap_ attribute from TH" PICS: WNCV.C.Afffc verification: | On TestHarnes (all-cluster-app) a received read of feature-map looks like this: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml index 5a5ca6f749440f..7e077c22b70943 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Check UpOrOpen command" verification: | verification step to be updated. diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_7_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_7_1.yaml index 9140778f02ca5c..c2d60eb96c7982 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_7_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Check GoToLiftPercentage command 50%" verification: | verification step to be updated. From a8d12af4be0cbf26f3f1352a5562eb7856ca8651 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Sat, 20 Aug 2022 20:38:00 -0400 Subject: [PATCH 092/115] [Hotfix] disable lcd in CI lighting_app with RPC build (#22052) * Hotfix, disable lcd in CI lighting_app with RPC build * oops disable_lcd=true * missing #ifdef for building without lcd + add is_debug=false for efr32 rpc builds when using build_examples.py * fix strings in build_all_except_host.txt * fix strings again in build_all_except_host.txt --- .github/workflows/examples-efr32.yaml | 2 +- examples/platform/efr32/BaseApplication.cpp | 2 + scripts/build/builders/efr32.py | 2 +- .../build/testdata/build_all_except_host.txt | 64 +++++++++---------- 4 files changed, 36 insertions(+), 34 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index acb4e6b18e96b3..b8c5134d6e9fcd 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -95,7 +95,7 @@ jobs: timeout-minutes: 15 run: | scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \ - 'import("//with_pw_rpc.gni")' + disable_lcd=true 'import("//with_pw_rpc.gni")' .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \ out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ - name: Build example EFR32+WF200 WiFi Lock app for BRD4161A diff --git a/examples/platform/efr32/BaseApplication.cpp b/examples/platform/efr32/BaseApplication.cpp index 2cdc4753ef572b..66d8cbc0a4efa5 100644 --- a/examples/platform/efr32/BaseApplication.cpp +++ b/examples/platform/efr32/BaseApplication.cpp @@ -391,8 +391,10 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) CancelFunctionTimer(); mFunction = kFunction_NoneSelected; +#ifdef DISPLAY_ENABLED // TOGGLE QRCode/LCD demo UI slLCD.ToggleQRCode(); +#endif #ifdef SL_WIFI if (!ConnectivityMgr().IsWiFiStationProvisioned()) diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index 0f8abe07cb6865..d4a536a1e80ca2 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -120,7 +120,7 @@ def __init__(self, self.extra_gn_options = ['efr32_board="%s"' % board.GnArgName()] if enable_rpcs: - self.extra_gn_options.append('import("//with_pw_rpc.gni")') + self.extra_gn_options.append('is_debug=false import("//with_pw_rpc.gni")') if enable_ota_requestor: self.extra_gn_options.append('chip_enable_ota_requestor=true') diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 7c255c2eb96d29..ea86e68d1139fd 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -188,10 +188,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A"' {out}/efr32-brd4161a-light # Generating efr32-brd4161a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A" import("//with_pw_rpc.gni")' {out}/efr32-brd4161a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4161a-light-rpc # Generating efr32-brd4161a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4161a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4161a-light-rpc-with-ota-requestor # Generating efr32-brd4161a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4161A" chip_enable_ota_requestor=true' {out}/efr32-brd4161a-light-with-ota-requestor @@ -200,10 +200,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A"' {out}/efr32-brd4161a-lock # Generating efr32-brd4161a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A" import("//with_pw_rpc.gni")' {out}/efr32-brd4161a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4161a-lock-rpc # Generating efr32-brd4161a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4161a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4161a-lock-rpc-with-ota-requestor # Generating efr32-brd4161a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4161A" chip_enable_ota_requestor=true' {out}/efr32-brd4161a-lock-with-ota-requestor @@ -230,10 +230,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A"' {out}/efr32-brd4163a-light # Generating efr32-brd4163a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A" import("//with_pw_rpc.gni")' {out}/efr32-brd4163a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4163a-light-rpc # Generating efr32-brd4163a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4163a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4163a-light-rpc-with-ota-requestor # Generating efr32-brd4163a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4163A" chip_enable_ota_requestor=true' {out}/efr32-brd4163a-light-with-ota-requestor @@ -242,10 +242,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A"' {out}/efr32-brd4163a-lock # Generating efr32-brd4163a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A" import("//with_pw_rpc.gni")' {out}/efr32-brd4163a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4163a-lock-rpc # Generating efr32-brd4163a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4163a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4163a-lock-rpc-with-ota-requestor # Generating efr32-brd4163a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4163A" chip_enable_ota_requestor=true' {out}/efr32-brd4163a-lock-with-ota-requestor @@ -272,10 +272,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A"' {out}/efr32-brd4164a-light # Generating efr32-brd4164a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A" import("//with_pw_rpc.gni")' {out}/efr32-brd4164a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4164a-light-rpc # Generating efr32-brd4164a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4164a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4164a-light-rpc-with-ota-requestor # Generating efr32-brd4164a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4164A" chip_enable_ota_requestor=true' {out}/efr32-brd4164a-light-with-ota-requestor @@ -284,10 +284,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A"' {out}/efr32-brd4164a-lock # Generating efr32-brd4164a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A" import("//with_pw_rpc.gni")' {out}/efr32-brd4164a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4164a-lock-rpc # Generating efr32-brd4164a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4164a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4164a-lock-rpc-with-ota-requestor # Generating efr32-brd4164a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4164A" chip_enable_ota_requestor=true' {out}/efr32-brd4164a-lock-with-ota-requestor @@ -314,10 +314,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A"' {out}/efr32-brd4166a-light # Generating efr32-brd4166a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A" import("//with_pw_rpc.gni")' {out}/efr32-brd4166a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4166a-light-rpc # Generating efr32-brd4166a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4166a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4166a-light-rpc-with-ota-requestor # Generating efr32-brd4166a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4166A" chip_enable_ota_requestor=true' {out}/efr32-brd4166a-light-with-ota-requestor @@ -326,10 +326,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A"' {out}/efr32-brd4166a-lock # Generating efr32-brd4166a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A" import("//with_pw_rpc.gni")' {out}/efr32-brd4166a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4166a-lock-rpc # Generating efr32-brd4166a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4166a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4166a-lock-rpc-with-ota-requestor # Generating efr32-brd4166a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4166A" chip_enable_ota_requestor=true' {out}/efr32-brd4166a-lock-with-ota-requestor @@ -356,10 +356,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A"' {out}/efr32-brd4170a-light # Generating efr32-brd4170a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A" import("//with_pw_rpc.gni")' {out}/efr32-brd4170a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4170a-light-rpc # Generating efr32-brd4170a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4170a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4170a-light-rpc-with-ota-requestor # Generating efr32-brd4170a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4170A" chip_enable_ota_requestor=true' {out}/efr32-brd4170a-light-with-ota-requestor @@ -368,10 +368,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A"' {out}/efr32-brd4170a-lock # Generating efr32-brd4170a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A" import("//with_pw_rpc.gni")' {out}/efr32-brd4170a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4170a-lock-rpc # Generating efr32-brd4170a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4170a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4170a-lock-rpc-with-ota-requestor # Generating efr32-brd4170a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4170A" chip_enable_ota_requestor=true' {out}/efr32-brd4170a-lock-with-ota-requestor @@ -398,10 +398,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A"' {out}/efr32-brd4186a-light # Generating efr32-brd4186a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A" import("//with_pw_rpc.gni")' {out}/efr32-brd4186a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4186a-light-rpc # Generating efr32-brd4186a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4186a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4186a-light-rpc-with-ota-requestor # Generating efr32-brd4186a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4186A" chip_enable_ota_requestor=true' {out}/efr32-brd4186a-light-with-ota-requestor @@ -410,10 +410,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A"' {out}/efr32-brd4186a-lock # Generating efr32-brd4186a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A" import("//with_pw_rpc.gni")' {out}/efr32-brd4186a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4186a-lock-rpc # Generating efr32-brd4186a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4186a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4186a-lock-rpc-with-ota-requestor # Generating efr32-brd4186a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4186A" chip_enable_ota_requestor=true' {out}/efr32-brd4186a-lock-with-ota-requestor @@ -440,10 +440,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A"' {out}/efr32-brd4187a-light # Generating efr32-brd4187a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A" import("//with_pw_rpc.gni")' {out}/efr32-brd4187a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4187a-light-rpc # Generating efr32-brd4187a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4187a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4187a-light-rpc-with-ota-requestor # Generating efr32-brd4187a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4187A" chip_enable_ota_requestor=true' {out}/efr32-brd4187a-light-with-ota-requestor @@ -452,10 +452,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A"' {out}/efr32-brd4187a-lock # Generating efr32-brd4187a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A" import("//with_pw_rpc.gni")' {out}/efr32-brd4187a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4187a-lock-rpc # Generating efr32-brd4187a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4187a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4187a-lock-rpc-with-ota-requestor # Generating efr32-brd4187a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4187A" chip_enable_ota_requestor=true' {out}/efr32-brd4187a-lock-with-ota-requestor @@ -482,10 +482,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A"' {out}/efr32-brd4304a-light # Generating efr32-brd4304a-light-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A" import("//with_pw_rpc.gni")' {out}/efr32-brd4304a-light-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4304a-light-rpc # Generating efr32-brd4304a-light-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4304a-light-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4304a-light-rpc-with-ota-requestor # Generating efr32-brd4304a-light-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/efr32 '--args=efr32_board="BRD4304A" chip_enable_ota_requestor=true' {out}/efr32-brd4304a-light-with-ota-requestor @@ -494,10 +494,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A"' {out}/efr32-brd4304a-lock # Generating efr32-brd4304a-lock-rpc -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A" import("//with_pw_rpc.gni")' {out}/efr32-brd4304a-lock-rpc +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A" is_debug=false import("//with_pw_rpc.gni")' {out}/efr32-brd4304a-lock-rpc # Generating efr32-brd4304a-lock-rpc-with-ota-requestor -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A" import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4304a-lock-rpc-with-ota-requestor +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A" is_debug=false import("//with_pw_rpc.gni") chip_enable_ota_requestor=true' {out}/efr32-brd4304a-lock-rpc-with-ota-requestor # Generating efr32-brd4304a-lock-with-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/efr32 '--args=efr32_board="BRD4304A" chip_enable_ota_requestor=true' {out}/efr32-brd4304a-lock-with-ota-requestor From 977aba0a8102fb2903e4d09af7b4aafbcafd5de8 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Mon, 22 Aug 2022 06:53:08 -0700 Subject: [PATCH 093/115] follow-up for fabric-scoped event (#22014) --- src/app/EventLogging.h | 2 +- .../python/test/test_scripts/cluster_objects.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/EventLogging.h b/src/app/EventLogging.h index b2ce7667ab2364..f9fa56837f07e9 100644 --- a/src/app/EventLogging.h +++ b/src/app/EventLogging.h @@ -73,7 +73,7 @@ CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aE eventOptions.mPriority = aEventData.GetPriorityLevel(); eventOptions.mFabricIndex = aEventData.GetFabricIndex(); // this skips logging the event if it's fabric-scoped but no fabric association exists yet. - VerifyOrReturnError(eventOptions.mFabricIndex != kUndefinedFabricIndex, CHIP_NO_ERROR); + VerifyOrReturnError(eventOptions.mFabricIndex != kUndefinedFabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); // // Unlike attributes which have a different 'EncodeForRead' for fabric-scoped structs, diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index deae10c2cd6962..5a9db3dd6ba28c 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -313,8 +313,6 @@ async def _TriggerEvent(cls, devCtrl): await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest()) await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest()) await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestEventRequest()) - await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=0)) - await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=1)) @classmethod async def _RetryForContent(cls, request, until, retryCount=10, intervalSeconds=1): @@ -335,11 +333,19 @@ async def TriggerAndWaitForEvents(cls, devCtrl, req): @base.test_case async def TestGenerateUndefinedFabricScopedEventRequests(cls, devCtrl): logger.info("Running TestGenerateUndefinedFabricScopedEventRequests") - await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=0)) + try: + res = await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=Clusters.TestCluster.Commands.TestEmitTestFabricScopedEventRequest(arg1=0)) + raise ValueError(f"Unexpected Failure") + except chip.interaction_model.InteractionModelError as ex: + logger.info(f"Recevied {ex} from server.") res = await devCtrl.ReadEvent(nodeid=NODE_ID, events=[ - (1, Clusters.TestCluster.Events.TestEvent, 0), + (1, Clusters.TestCluster.Events.TestFabricScopedEvent, 0), ]) logger.info(f"return result is {res}") + if len(res) != 0: + raise AssertionError("failure: not expect to receive fabric-scoped event when fabric is undefined") + else: + logger.info("TestGenerateUndefinedFabricScopedEventRequests: Success") @classmethod @base.test_case From 9713e108ab731985fe8cf95d051cf640bdafb98a Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 22 Aug 2022 06:57:07 -0700 Subject: [PATCH 094/115] Wrap all nlfaultinjection logic with build flag chip_with_nlfaultinjection (#22004) --- src/inet/BUILD.gn | 6 ++++-- src/inet/tests/BUILD.gn | 9 +++++++-- src/system/BUILD.gn | 6 ++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index 10852750646742..cb86a45780df9c 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -88,7 +88,6 @@ static_library("inet") { "InetArgParser.h", "InetError.cpp", "InetError.h", - "InetFaultInjection.h", "InetInterface.cpp", "InetInterface.h", "InetLayer.h", @@ -132,7 +131,10 @@ static_library("inet") { } if (chip_with_nlfaultinjection) { - sources += [ "InetFaultInjection.cpp" ] + sources += [ + "InetFaultInjection.cpp", + "InetFaultInjection.h", + ] public_deps += [ "${nlfaultinjection_root}:nlfaultinjection" ] } diff --git a/src/inet/tests/BUILD.gn b/src/inet/tests/BUILD.gn index 3946a798fa63c3..1788410bb6c6d3 100644 --- a/src/inet/tests/BUILD.gn +++ b/src/inet/tests/BUILD.gn @@ -35,8 +35,6 @@ static_library("helpers") { "TestInetCommonOptions.h", "TestInetCommonPosix.cpp", "TestInetLayerCommon.cpp", - "TestSetupFaultInjection.h", - "TestSetupFaultInjectionPosix.cpp", "TestSetupSignalling.h", "TestSetupSignallingPosix.cpp", ] @@ -45,6 +43,13 @@ static_library("helpers") { sources += [ "TestInetLayer.cpp" ] } + if (chip_with_nlfaultinjection) { + sources += [ + "TestSetupFaultInjection.h", + "TestSetupFaultInjectionPosix.cpp", + ] + } + cflags = [ "-Wconversion" ] public_deps = [ diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index f2f5172dbee3c6..a70b943e1d14d2 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -177,7 +177,6 @@ static_library("system") { "SystemError.cpp", "SystemError.h", "SystemEvent.h", - "SystemFaultInjection.h", "SystemLayer.cpp", "SystemLayer.h", "SystemLayerImpl.h", @@ -219,7 +218,10 @@ static_library("system") { } if (chip_with_nlfaultinjection) { - sources += [ "SystemFaultInjection.cpp" ] + sources += [ + "SystemFaultInjection.cpp", + "SystemFaultInjection.h", + ] public_deps += [ "${nlfaultinjection_root}:nlfaultinjection" ] } } From 7c53493814cb9b3d9a6f1d215f4b2ebec20bfb6b Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Mon, 22 Aug 2022 10:38:04 -0400 Subject: [PATCH 095/115] Remove the default constructor for ChipDeviceController(). It is required to set a vendor ID (#21980) so it must be passed during construction. Also fix typo in onCommissioningStatusUpdate JNI method description. --- .../main/java/com/google/chip/chiptool/ChipClient.kt | 5 ++++- .../java/AndroidDeviceControllerWrapper.cpp | 2 +- .../chip/devicecontroller/ChipDeviceController.java | 11 +++++------ .../src/chip/devicecontroller/ControllerParams.java | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt index 10d7c32e994a9e..6e3833820716a3 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt @@ -20,6 +20,7 @@ package com.google.chip.chiptool import android.content.Context import android.util.Log import chip.devicecontroller.ChipDeviceController +import chip.devicecontroller.ControllerParams import chip.devicecontroller.GetConnectedDeviceCallbackJni.GetConnectedDeviceCallback import chip.platform.AndroidBleManager import chip.platform.AndroidChipPlatform @@ -38,12 +39,14 @@ object ChipClient { private const val TAG = "ChipClient" private lateinit var chipDeviceController: ChipDeviceController private lateinit var androidPlatform: AndroidChipPlatform + /* 0xFFF4 is a test vendor ID, replace with your assigned company ID */ + private const val VENDOR_ID = 0xFFF4 fun getDeviceController(context: Context): ChipDeviceController { getAndroidChipPlatform(context) if (!this::chipDeviceController.isInitialized) { - chipDeviceController = ChipDeviceController() + chipDeviceController = ChipDeviceController(ControllerParams.newBuilder().setControllerVendorId(VENDOR_ID).build()) } return chipDeviceController } diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 8b28896a701d44..ada814133734fc 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -425,7 +425,7 @@ void AndroidDeviceControllerWrapper::OnCommissioningStatusUpdate(PeerId peerId, JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); jmethodID onCommissioningStatusUpdateMethod; CHIP_ERROR err = JniReferences::GetInstance().FindMethod(env, mJavaObjectRef, "onCommissioningStatusUpdate", - "(JLjava/lang/string;I)V", &onCommissioningStatusUpdateMethod); + "(JLjava/lang/String;I)V", &onCommissioningStatusUpdateMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Error finding Java method: %" CHIP_ERROR_FORMAT, err.Format())); UtfString jStageCompleted(env, StageToString(stageCompleted)); diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 97627b56c4ce1f..47c87b364143e3 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -44,12 +44,11 @@ public static void loadJni() { return; } - /** Returns a new {@link ChipDeviceController} with default parameters. */ - public ChipDeviceController() { - this(ControllerParams.newBuilder().build()); - } - - /** Returns a new {@link ChipDeviceController} with the specified parameters. */ + /** + * Returns a new {@link ChipDeviceController} with the specified parameters. you must set a vendor + * ID, ControllerParams.newBuilder().setControllerVendorId(0xFFF4).build() 0xFFF4 is a test vendor + * ID + */ public ChipDeviceController(ControllerParams params) { deviceControllerPtr = newDeviceController(params); } diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java index 42fd04f42907de..b0413cf4a8abf0 100644 --- a/src/controller/java/src/chip/devicecontroller/ControllerParams.java +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -86,7 +86,8 @@ public static Builder newBuilder() { /** * Returns parameters which uses the provided {@code operationalKeyConfig} as its operating - * credentials. + * credentials. You must set a vendor ID, 0xFFF4 is a test vendor ID + * ControllerParams.newBuilder().setControllerVendorId(0xFFF4).build() */ public static Builder newBuilder(OperationalKeyConfig operationalKeyConfig) { return newBuilder() From b85c5ec60a1f9b35bcbe37b5b18c04e1d695db1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:40:44 +0200 Subject: [PATCH 096/115] [nrfconnect] Fix Light Switch Example build (#22036) The example was not built in CI, so we missed the build breakage. Signed-off-by: Damian Krolik Signed-off-by: Damian Krolik --- .github/workflows/examples-nrfconnect.yaml | 54 +++++++++---------- .../nrfconnect/CMakeLists.txt | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 3c110ce1ccece7..5da513c70de6ba 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -95,15 +95,6 @@ jobs: nrfconnect nrf52840dk_nrf52840 lock-app \ examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 lighting-app \ - examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' timeout-minutes: 15 @@ -122,6 +113,15 @@ jobs: nrfconnect nrf52840dk_nrf52840+rpc lighting-app \ examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Light Switch App on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + timeout-minutes: 15 + run: | + scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 light-switch-app \ + examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \ + /tmp/bloat_reports/ - name: Build example nRF Connect SDK Shell on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' timeout-minutes: 15 @@ -140,24 +140,6 @@ jobs: nrfconnect nrf52840dk_nrf52840 pigweed-app \ examples/pigweed-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lock App on nRF5340 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 - run: | - scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \ - examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF5340 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \ - examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - name: Build example nRF Connect SDK Pump App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' timeout-minutes: 15 @@ -192,6 +174,24 @@ jobs: nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \ examples/all-clusters-minimal-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lock App on nRF5340 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + timeout-minutes: 15 + run: | + scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \ + examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF5340 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + timeout-minutes: 15 + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \ + examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ + /tmp/bloat_reports/ - name: Run unit tests for Zephyr native_posix_64 platform if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' timeout-minutes: 15 diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index 865b8262749bb9..3a0084efa79c42 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -60,7 +60,7 @@ target_sources(app PRIVATE main/BindingHandler.cpp ${GEN_DIR}/light-switch-app/zap-generated/callback-stub.cpp ${GEN_DIR}/light-switch-app/zap-generated/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/LEDWidget.cpp + ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) if(CONFIG_CHIP_OTA_REQUESTOR) From e2c28dfd077f411342a5781abe71377cd98f9874 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 22 Aug 2022 13:11:51 -0400 Subject: [PATCH 097/115] Restrict esp32 build dependencies to x64 linux. Mac seems to fail on gevent which is brought by gdbgui (#22071) --- scripts/requirements.esp32.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/requirements.esp32.txt b/scripts/requirements.esp32.txt index c870b03a23cd56..4bf5479986c5a2 100644 --- a/scripts/requirements.esp32.txt +++ b/scripts/requirements.esp32.txt @@ -1,12 +1,12 @@ -click>=7.0 -future>=0.15.2 -pyparsing>=2.0.3,<2.4.0 -idf-component-manager>=0.2.99-beta -gdbgui==0.13.2.0 -pygdbmi<=0.9.0.2 -reedsolo>=1.5.3,<=1.5.4 -bitstring>=3.1.6 -ecdsa>=0.16.0 -kconfiglib==13.7.1 -construct==2.10.54 -python-socketio<5 +click>=7.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +future>=0.15.2 ; platform_machine != 'aarch64' and sys_platform == 'linux' +pyparsing>=2.0.3,<2.4.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +idf-component-manager>=0.2.99-beta ; platform_machine != 'aarch64' and sys_platform == 'linux' +gdbgui==0.13.2.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +pygdbmi<=0.9.0.2 ; platform_machine != 'aarch64' and sys_platform == 'linux' +reedsolo>=1.5.3,<=1.5.4 ; platform_machine != 'aarch64' and sys_platform == 'linux' +bitstring>=3.1.6 ; platform_machine != 'aarch64' and sys_platform == 'linux' +ecdsa>=0.16.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +kconfiglib==13.7.1 ; platform_machine != 'aarch64' and sys_platform == 'linux' +construct==2.10.54 ; platform_machine != 'aarch64' and sys_platform == 'linux' +python-socketio<5 ; platform_machine != 'aarch64' and sys_platform == 'linux' From 585a53a96f51e3e593316fba85bb8d49e0d8bb7c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 22 Aug 2022 13:17:19 -0400 Subject: [PATCH 098/115] Disable imx docker CI check step because it always fails with no space left on device (#22050) --- .github/workflows/docker_img.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index b706dbcac39e42..73c45ee303a756 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -42,7 +42,12 @@ jobs: - "-esp32" - "-esp32-qemu" - "-infineon" - - "-imx" + # NOTE: imx image requires too much space for GitHub-hosted runners. It fails with: + # ``` + # .... + # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device + # ``` + # - "-imx" - "-k32w" - "-mbed-os" - "-nrf-platform" From 3899b665418e2f79e229a5ba9498b59027de400d Mon Sep 17 00:00:00 2001 From: Sid Hsu Date: Tue, 23 Aug 2022 01:54:37 +0800 Subject: [PATCH 099/115] [Infineon] Fix CYW30739 KVS to pass the storage API audit. (#21995) * Support key length upto PersistentStorageDelegate::kKeyLengthMax. * _Get and _Put methods can handle zero-size data correctly. --- .../CYW30739/KeyValueStoreManagerImpl.cpp | 56 ++++++++++++------- .../CYW30739/KeyValueStoreManagerImpl.h | 18 +++++- 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp index 00e7a063614bb9..e61edab6ebfd18 100644 --- a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp @@ -44,15 +44,14 @@ CHIP_ERROR KeyValueStoreManagerImpl::Init(void) for (uint8_t configID = 0; configID < mMaxEntryCount; configID++) { - char key[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; - memset(key, 0, sizeof(key)); - size_t keyLength; - err = CYW30739Config::ReadConfigValueStr(CYW30739ConfigKey(Config::kChipKvsKey_KeyBase, configID), key, sizeof(key), - keyLength); + KeyStorage keyStorage; + size_t keyStorageLength; + err = CYW30739Config::ReadConfigValueBin(CYW30739ConfigKey(Config::kChipKvsKey_KeyBase, configID), &keyStorage, + sizeof(keyStorage), keyStorageLength); if (err != CHIP_NO_ERROR) continue; - KeyConfigIdEntry * entry = Platform::New(configID, key, keyLength); + KeyConfigIdEntry * entry = Platform::New(configID, keyStorage); VerifyOrExit(entry != nullptr, err = CHIP_ERROR_NO_MEMORY); slist_add_tail(entry, &mKeyConfigIdList); @@ -75,14 +74,24 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t VerifyOrReturnError(offset_bytes == 0, CHIP_ERROR_NOT_IMPLEMENTED); - const size_t keyLength = strnlen(key, CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH); - VerifyOrExit(keyLength != 0 && keyLength <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH && + const size_t keyLength = strnlen(key, PersistentStorageDelegate::kKeyLengthMax); + VerifyOrExit(keyLength != 0 && keyLength <= PersistentStorageDelegate::kKeyLengthMax && value_size <= kMaxPersistedValueLengthSupported, err = CHIP_ERROR_INVALID_ARGUMENT); entry = FindEntry(key); VerifyOrExit(entry != nullptr, err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - VerifyOrExit(value_size != 0, err = CHIP_ERROR_BUFFER_TOO_SMALL); + + if (value_size == 0 || entry->GetValueSize() == 0) + { + if (read_bytes_size != nullptr) + *read_bytes_size = 0; + + if (value_size >= entry->GetValueSize()) + ExitNow(err = CHIP_NO_ERROR); + else + ExitNow(err = CHIP_ERROR_BUFFER_TOO_SMALL); + } size_t byte_count; err = CYW30739Config::ReadConfigValueBin(entry->GetValueConfigKey(), value, value_size, byte_count); @@ -94,6 +103,8 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t *read_bytes_size = byte_count; } + VerifyOrExit(value_size >= entry->GetValueSize(), err = CHIP_ERROR_BUFFER_TOO_SMALL); + exit: return err; } @@ -101,10 +112,10 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) { CHIP_ERROR err = CHIP_NO_ERROR; - const KeyConfigIdEntry * entry; + KeyConfigIdEntry * entry; - const size_t keyLength = strnlen(key, CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH + 1); - VerifyOrExit(keyLength != 0 && keyLength <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH && + const size_t keyLength = strnlen(key, PersistentStorageDelegate::kKeyLengthMax + 1); + VerifyOrExit(keyLength != 0 && keyLength <= PersistentStorageDelegate::kKeyLengthMax && value_size <= kMaxPersistedValueLengthSupported, err = CHIP_ERROR_INVALID_ARGUMENT); @@ -112,9 +123,13 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, VerifyOrExit(entry != nullptr, ChipLogError(DeviceLayer, "%s AllocateEntry %s", __func__, ErrorStr(err)); err = CHIP_ERROR_NO_MEMORY); - SuccessOrExit(err = CYW30739Config::WriteConfigValueBin(entry->GetValueConfigKey(), value, value_size)); + if (value_size != 0) + { + SuccessOrExit(err = CYW30739Config::WriteConfigValueBin(entry->GetValueConfigKey(), value, value_size)); + } - SuccessOrExit(err = CYW30739Config::WriteConfigValueStr(entry->GetKeyConfigKey(), key, keyLength)); + entry->SetValueSize(value_size); + SuccessOrExit(err = CYW30739Config::WriteConfigValueBin(entry->GetKeyConfigKey(), &entry->mStorage, sizeof(entry->mStorage))); exit: return err; @@ -125,8 +140,8 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) CHIP_ERROR err; KeyConfigIdEntry * entry; - const size_t keyLength = strnlen(key, CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH); - VerifyOrExit(keyLength != 0 && keyLength <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH, err = CHIP_ERROR_INVALID_ARGUMENT); + const size_t keyLength = strnlen(key, PersistentStorageDelegate::kKeyLengthMax); + VerifyOrExit(keyLength != 0 && keyLength <= PersistentStorageDelegate::kKeyLengthMax, err = CHIP_ERROR_INVALID_ARGUMENT); entry = FindEntry(key); VerifyOrExit(entry != nullptr, err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); @@ -156,14 +171,13 @@ CHIP_ERROR KeyValueStoreManagerImpl::EraseAll(void) return CHIP_NO_ERROR; } -KeyValueStoreManagerImpl::KeyConfigIdEntry::KeyConfigIdEntry(uint8_t configID, const char * key, size_t keyLength) : - mConfigID(configID) +KeyValueStoreManagerImpl::KeyStorage::KeyStorage(const char * key, size_t keyLength) : mValueSize(0) { memset(mKey, 0, sizeof(mKey)); memcpy(mKey, key, keyLength); } -bool KeyValueStoreManagerImpl::KeyConfigIdEntry::IsMatchKey(const char * key) const +bool KeyValueStoreManagerImpl::KeyStorage::IsMatchKey(const char * key) const { return strncmp(mKey, key, sizeof(mKey)) == 0; } @@ -175,7 +189,7 @@ KeyValueStoreManagerImpl::KeyConfigIdEntry * KeyValueStoreManagerImpl::AllocateE ReturnErrorCodeIf(newEntry != nullptr, newEntry); ReturnErrorCodeIf(!freeConfigID.HasValue(), nullptr); - newEntry = Platform::New(freeConfigID.Value(), key, keyLength); + newEntry = Platform::New(freeConfigID.Value(), KeyStorage(key, keyLength)); ReturnErrorCodeIf(newEntry == nullptr, nullptr); KeyConfigIdEntry * entry = static_cast(slist_tail(&mKeyConfigIdList)); @@ -220,7 +234,7 @@ KeyValueStoreManagerImpl::KeyConfigIdEntry * KeyValueStoreManagerImpl::FindEntry { entry = entry->Next(); - if (entry->IsMatchKey(key)) + if (entry->mStorage.IsMatchKey(key)) return entry; if (freeConfigID != nullptr && !freeConfigID->HasValue() && entry != slist_tail(&mKeyConfigIdList)) diff --git a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h index a719bc6c2af7ac..5938bd28a56c98 100644 --- a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h +++ b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.h @@ -23,6 +23,7 @@ #pragma once +#include #include #include @@ -56,11 +57,20 @@ class KeyValueStoreManagerImpl final : public KeyValueStoreManager static constexpr uint8_t mMaxEntryCount = 128; - struct KeyConfigIdEntry : public slist_node_t + struct KeyStorage { - KeyConfigIdEntry(uint8_t configID, const char * key, size_t keyLength); + KeyStorage(const char * key = nullptr, size_t keyLength = 0); bool IsMatchKey(const char * key) const; + + size_t mValueSize; + char mKey[PersistentStorageDelegate::kKeyLengthMax]; + }; + + struct KeyConfigIdEntry : public slist_node_t + { + KeyConfigIdEntry(uint8_t configID, const KeyStorage & keyStorage) : mConfigID(configID), mStorage(keyStorage) {} + constexpr Config::Key GetValueConfigKey() const { return Internal::CYW30739ConfigKey(Config::kChipKvsValue_KeyBase, mConfigID); @@ -71,9 +81,11 @@ class KeyValueStoreManagerImpl final : public KeyValueStoreManager } constexpr KeyConfigIdEntry * Next() const { return static_cast(next); } constexpr uint8_t NextConfigID() const { return mConfigID + 1; } + constexpr size_t GetValueSize() const { return mStorage.mValueSize; } + constexpr void SetValueSize(size_t valueSize) { mStorage.mValueSize = valueSize; } uint8_t mConfigID; - char mKey[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; + KeyStorage mStorage; }; KeyConfigIdEntry * AllocateEntry(const char * key, size_t keyLength); From 15ec1792a4a6e47fa62fc127d5f9463ecb1ee99c Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Mon, 22 Aug 2022 13:55:44 -0400 Subject: [PATCH 100/115] [Docs] Update building guide for Ubuntu 2022.04 (#21636) --- docs/guides/BUILDING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 5bcd865ca5db1b..00bf6d97a581f9 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -8,7 +8,7 @@ Tested on: - macOS 10.15 - Debian 11 -- Ubuntu 20.04 LTS +- Ubuntu 22.04 LTS Build system features: @@ -81,9 +81,8 @@ dependency. ### Installing prerequisites on Raspberry Pi 4 -Using `rpi-imager`, install the Ubuntu _21.04_ 64-bit _server_ OS for arm64 -architectures on a micro SD card. This release will have bluez 5.55 or newer -which is required for BLE functionality. +Using `rpi-imager`, install the Ubuntu _22.04_ 64-bit _server_ OS for arm64 +architectures on a micro SD card. Boot the SD card, login with the default user account "ubuntu" and password "ubuntu", then proceed with From a71a002e5377f267a57cf112980e4a49f010e5f7 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:05:00 -0400 Subject: [PATCH 101/115] More cleanup for the openthread build targets and EFR32 (#22049) --- examples/chef/efr32/BUILD.gn | 1 + examples/light-switch-app/efr32/BUILD.gn | 1 + examples/lighting-app/efr32/BUILD.gn | 1 + examples/lock-app/efr32/BUILD.gn | 1 + examples/shell/shell_common/BUILD.gn | 15 ++--- examples/thermostat/efr32/BUILD.gn | 1 + examples/window-app/efr32/BUILD.gn | 1 + src/inet/BUILD.gn | 2 +- src/platform/EFR32/BUILD.gn | 4 +- src/test_driver/efr32/BUILD.gn | 1 + third_party/openthread/BUILD.gn | 21 ++++++- third_party/openthread/ot-efr32 | 2 +- third_party/silabs/BUILD.gn | 78 ++++++++++-------------- 13 files changed, 67 insertions(+), 62 deletions(-) diff --git a/examples/chef/efr32/BUILD.gn b/examples/chef/efr32/BUILD.gn index 662933081bc331..c567ae9d8f1cbf 100644 --- a/examples/chef/efr32/BUILD.gn +++ b/examples/chef/efr32/BUILD.gn @@ -207,6 +207,7 @@ efr32_executable("chef_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index 3118b7a6dadc18..e2705abdedcb65 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -200,6 +200,7 @@ efr32_executable("light_switch_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 76430e8586e8d3..060b9f67343aa0 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -205,6 +205,7 @@ efr32_executable("lighting_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index bb6530f56e5313..2f8f2dc6bf67b4 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -202,6 +202,7 @@ efr32_executable("lock_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index d4b57df2f969ee..0217eb057fdff4 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -52,17 +52,10 @@ static_library("shell_common") { if (chip_enable_openthread && (current_os == "freertos" || current_os == "zephyr")) { - if (chip_openthread_ftd) { - public_deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - public_deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } + public_deps += [ + "${chip_root}/third_party/openthread:openthread_cli", + "${chip_root}/third_party/openthread:openthread_device", + ] } if (chip_shell_cmd_server) { diff --git a/examples/thermostat/efr32/BUILD.gn b/examples/thermostat/efr32/BUILD.gn index fe2be76adf88a8..edb03073686e3e 100644 --- a/examples/thermostat/efr32/BUILD.gn +++ b/examples/thermostat/efr32/BUILD.gn @@ -196,6 +196,7 @@ efr32_executable("thermostat_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index 7d2bfbec6dca1f..c7a3f57e4b9ff8 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -188,6 +188,7 @@ efr32_executable("window_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index cb86a45780df9c..a042007d02c5a3 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -107,7 +107,7 @@ static_library("inet") { } if (chip_system_config_use_open_thread_inet_endpoints) { - public_deps += [ "${chip_root}/third_party/openthread:openthread" ] + public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ] } if (chip_inet_config_enable_tcp_endpoint) { diff --git a/src/platform/EFR32/BUILD.gn b/src/platform/EFR32/BUILD.gn index e406ce994eedee..eb73a6f80f85cf 100644 --- a/src/platform/EFR32/BUILD.gn +++ b/src/platform/EFR32/BUILD.gn @@ -98,9 +98,9 @@ static_library("EFR32") { "$dir_pw_kvs", ] if (chip_enable_openthread) { - public_deps += [ "${chip_root}/third_party/openthread:openthread" ] + public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ] - deps += [ "${chip_root}/third_party/silabs:openthread_cli" ] + deps += [ "${chip_root}/third_party/openthread:openthread_cli" ] sources += [ "../OpenThread/OpenThreadUtils.cpp", diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 45e4aff6fe40a7..8ee3c4f3e59c69 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -96,6 +96,7 @@ efr32_executable("efr32_device_tests") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread_device", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/third_party/openthread/BUILD.gn b/third_party/openthread/BUILD.gn index 752f245738a750..9ee8e905551837 100644 --- a/third_party/openthread/BUILD.gn +++ b/third_party/openthread/BUILD.gn @@ -16,10 +16,27 @@ group("openthread") { "${chip_root}/third_party/openthread/platforms:libopenthread-platform", "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", ] + } +} + +group("openthread_device") { + if (chip_openthread_target != "") { + public_deps = [ chip_openthread_target ] + } else { + if (chip_openthread_ftd) { + public_deps = [ "${openthread_root}:libopenthread-ftd" ] + } else { + public_deps = [ "${openthread_root}:libopenthread-mtd" ] + } + } +} + +group("openthread_cli") { + if (chip_openthread_target == "") { if (chip_openthread_ftd) { - public_deps += [ "${openthread_root}:libopenthread-ftd" ] + public_deps = [ "${openthread_root}:libopenthread-cli-ftd" ] } else { - public_deps += [ "${openthread_root}:libopenthread-mtd" ] + public_deps = [ "${openthread_root}:libopenthread-cli-mtd" ] } } } diff --git a/third_party/openthread/ot-efr32 b/third_party/openthread/ot-efr32 index fd77faf7a3443f..1e10a32228c96f 160000 --- a/third_party/openthread/ot-efr32 +++ b/third_party/openthread/ot-efr32 @@ -1 +1 @@ -Subproject commit fd77faf7a3443f7941dfd9e9713aea09eb08e9b9 +Subproject commit 1e10a32228c96f273603612ef7d5ce693ecdf887 diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index c4f96d18d339f5..1589f72e7865ae 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -31,18 +31,6 @@ group("efr32_sdk") { public_deps = [ efr32_sdk_target ] } -if (chip_enable_openthread) { - group("openthread_cli") { - if (!use_silabs_thread_lib) { - if (chip_openthread_ftd) { - public_deps = [ "${sl_openthread_root}:libopenthread-cli-ftd" ] - } else { - public_deps = [ "${sl_openthread_root}:libopenthread-cli-mtd" ] - } - } - } -} - if (use_silabs_thread_lib) { config("libopenthread-platform_config") { include_dirs = [ "${sl_openthread_root}/examples/platforms" ] @@ -74,7 +62,6 @@ if (use_silabs_thread_lib) { "RADIO_CONFIG_DMP_SUPPORT=1", "${efr32_board}=1", "${efr32_mcu}", - "USE_SL_THREAD_CERT_LIB", "OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-efr32-config-check.h\"", ] @@ -88,7 +75,6 @@ if (use_silabs_thread_lib) { source_set("openthread_core_config_efr32") { sources = [ - "${sl_openthread_root}/src/cli/cli_config.h", "${sl_ot_efr32_root}/src/src/openthread-core-efr32-config-check.h", "${sl_ot_efr32_root}/src/src/openthread-core-efr32-config.h", ] @@ -102,37 +88,39 @@ if (use_silabs_thread_lib) { } source_set("ot-efr32-cert") { - sources = [ - "${sl_openthread_root}/examples/apps/cli/cli_uart.cpp", - "${sl_openthread_root}/src/cli/cli.cpp", - "${sl_openthread_root}/src/cli/cli.hpp", - "${sl_openthread_root}/src/cli/cli_coap.cpp", - "${sl_openthread_root}/src/cli/cli_coap.hpp", - "${sl_openthread_root}/src/cli/cli_coap_secure.cpp", - "${sl_openthread_root}/src/cli/cli_coap_secure.hpp", - "${sl_openthread_root}/src/cli/cli_commissioner.cpp", - "${sl_openthread_root}/src/cli/cli_commissioner.hpp", - "${sl_openthread_root}/src/cli/cli_config.h", - "${sl_openthread_root}/src/cli/cli_dataset.cpp", - "${sl_openthread_root}/src/cli/cli_dataset.hpp", - "${sl_openthread_root}/src/cli/cli_history.cpp", - "${sl_openthread_root}/src/cli/cli_history.hpp", - "${sl_openthread_root}/src/cli/cli_joiner.cpp", - "${sl_openthread_root}/src/cli/cli_joiner.hpp", - "${sl_openthread_root}/src/cli/cli_network_data.cpp", - "${sl_openthread_root}/src/cli/cli_network_data.hpp", - "${sl_openthread_root}/src/cli/cli_output.cpp", - "${sl_openthread_root}/src/cli/cli_output.hpp", - "${sl_openthread_root}/src/cli/cli_srp_client.cpp", - "${sl_openthread_root}/src/cli/cli_srp_client.hpp", - "${sl_openthread_root}/src/cli/cli_srp_server.cpp", - "${sl_openthread_root}/src/cli/cli_srp_server.hpp", - "${sl_openthread_root}/src/cli/cli_tcp.cpp", - "${sl_openthread_root}/src/cli/cli_tcp.hpp", - "${sl_openthread_root}/src/cli/cli_udp.cpp", - "${sl_openthread_root}/src/cli/cli_udp.hpp", - "${sl_openthread_root}/src/cli/x509_cert_key.hpp", - ] + if (enable_openthread_cli) { + sources = [ + "${sl_openthread_root}/examples/apps/cli/cli_uart.cpp", + "${sl_openthread_root}/src/cli/cli.cpp", + "${sl_openthread_root}/src/cli/cli.hpp", + "${sl_openthread_root}/src/cli/cli_coap.cpp", + "${sl_openthread_root}/src/cli/cli_coap.hpp", + "${sl_openthread_root}/src/cli/cli_coap_secure.cpp", + "${sl_openthread_root}/src/cli/cli_coap_secure.hpp", + "${sl_openthread_root}/src/cli/cli_commissioner.cpp", + "${sl_openthread_root}/src/cli/cli_commissioner.hpp", + "${sl_openthread_root}/src/cli/cli_config.h", + "${sl_openthread_root}/src/cli/cli_dataset.cpp", + "${sl_openthread_root}/src/cli/cli_dataset.hpp", + "${sl_openthread_root}/src/cli/cli_history.cpp", + "${sl_openthread_root}/src/cli/cli_history.hpp", + "${sl_openthread_root}/src/cli/cli_joiner.cpp", + "${sl_openthread_root}/src/cli/cli_joiner.hpp", + "${sl_openthread_root}/src/cli/cli_network_data.cpp", + "${sl_openthread_root}/src/cli/cli_network_data.hpp", + "${sl_openthread_root}/src/cli/cli_output.cpp", + "${sl_openthread_root}/src/cli/cli_output.hpp", + "${sl_openthread_root}/src/cli/cli_srp_client.cpp", + "${sl_openthread_root}/src/cli/cli_srp_client.hpp", + "${sl_openthread_root}/src/cli/cli_srp_server.cpp", + "${sl_openthread_root}/src/cli/cli_srp_server.hpp", + "${sl_openthread_root}/src/cli/cli_tcp.cpp", + "${sl_openthread_root}/src/cli/cli_tcp.hpp", + "${sl_openthread_root}/src/cli/cli_udp.cpp", + "${sl_openthread_root}/src/cli/cli_udp.hpp", + "${sl_openthread_root}/src/cli/x509_cert_key.hpp", + ] + } public_configs = [ ":openthread_efr32_config", From f68b948bd78986ed85b1ee326e05da5361e83eff Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Mon, 22 Aug 2022 15:23:22 -0400 Subject: [PATCH 102/115] Fix GetBootReason prototype so it overrides the generic one, Replace sl_ot_sys_init by manual call. OT efr32MiscInit was 'stealing' the reboot cause from the matter stack (#22077) --- examples/platform/efr32/init_efrPlatform.cpp | 3 ++- src/platform/EFR32/ConfigurationManagerImpl.cpp | 5 +++-- src/platform/EFR32/ConfigurationManagerImpl.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/platform/efr32/init_efrPlatform.cpp b/examples/platform/efr32/init_efrPlatform.cpp index a0e33702b40e68..36ee0018e8a814 100644 --- a/examples/platform/efr32/init_efrPlatform.cpp +++ b/examples/platform/efr32/init_efrPlatform.cpp @@ -68,7 +68,8 @@ void init_efrPlatform(void) #endif #if CHIP_ENABLE_OPENTHREAD - sl_ot_sys_init(); + efr32RadioInit(); + efr32AlarmInit(); #endif // CHIP_ENABLE_OPENTHREAD } diff --git a/src/platform/EFR32/ConfigurationManagerImpl.cpp b/src/platform/EFR32/ConfigurationManagerImpl.cpp index 64a66be824f61a..0dd8170da5d3b5 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.cpp +++ b/src/platform/EFR32/ConfigurationManagerImpl.cpp @@ -97,7 +97,7 @@ CHIP_ERROR ConfigurationManagerImpl::IncreaseBootCount(void) return EFR32Config::WriteConfigValue(EFR32Config::kConfigKey_BootCount, bootCount + 1); } -uint32_t ConfigurationManagerImpl::GetBootReason(void) +CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason) { // rebootCause is obtained at bootup. BootReasonType matterBootCause; @@ -150,7 +150,8 @@ uint32_t ConfigurationManagerImpl::GetBootReason(void) matterBootCause = BootReasonType::kUnspecified; #endif - return to_underlying(matterBootCause); + bootReason = to_underlying(matterBootCause); + return CHIP_NO_ERROR; } CHIP_ERROR ConfigurationManagerImpl::GetTotalOperationalHours(uint32_t & totalOperationalHours) diff --git a/src/platform/EFR32/ConfigurationManagerImpl.h b/src/platform/EFR32/ConfigurationManagerImpl.h index aaebd3ea65ac91..2f40d8d260a363 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.h +++ b/src/platform/EFR32/ConfigurationManagerImpl.h @@ -40,7 +40,7 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp // This returns an instance of this class. static ConfigurationManagerImpl & GetDefaultInstance(); - uint32_t GetBootReason(void); + CHIP_ERROR GetBootReason(uint32_t & bootReason); CHIP_ERROR GetRebootCount(uint32_t & rebootCount); CHIP_ERROR IncreaseBootCount(void); CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours); From 6681060d7d44832bac7534464a84cab72bec62b1 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:41:58 -0400 Subject: [PATCH 103/115] [EFR32] Fix CSR length. (#22080) --- src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp | 4 +++- src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp index 6077681f19eb57..72c4706501f851 100644 --- a/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp @@ -894,7 +894,9 @@ P256Keypair::~P256Keypair() CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const { MutableByteSpan csr(out_csr, csr_length); - return GenerateCertificateSigningRequest(this, csr); + CHIP_ERROR err = GenerateCertificateSigningRequest(this, csr); + csr_length = (CHIP_NO_ERROR == err) ? csr.size() : 0; + return err; } CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_length, P256PublicKey & pubkey) diff --git a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp index b1c32dc028471d..da72af848bab51 100644 --- a/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp +++ b/src/platform/EFR32/Efr32PsaOpaqueKeypair.cpp @@ -407,7 +407,9 @@ CHIP_ERROR EFR32OpaqueP256Keypair::Deserialize(P256SerializedKeypair & input) CHIP_ERROR EFR32OpaqueP256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const { MutableByteSpan csr(out_csr, csr_length); - return GenerateCertificateSigningRequest(this, csr); + CHIP_ERROR err = GenerateCertificateSigningRequest(this, csr); + csr_length = (CHIP_NO_ERROR == err) ? csr.size() : 0; + return err; } CHIP_ERROR EFR32OpaqueP256Keypair::ECDSA_sign_msg(const uint8_t * msg, size_t msg_length, P256ECDSASignature & out_signature) const From f6929bb913bca7f5d5d7b770788e8d6f3c74ed29 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Mon, 22 Aug 2022 18:12:16 -0400 Subject: [PATCH 104/115] Set MAX_EXCHANGE_CONTEXT and NUM_UDP_ENDPOINT to match minimal requirements of matter spec (#22078) --- src/platform/EFR32/CHIPPlatformConfig.h | 2 +- src/platform/EFR32/InetPlatformConfig.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/EFR32/CHIPPlatformConfig.h b/src/platform/EFR32/CHIPPlatformConfig.h index decc6c59602779..cffeb4645ec29d 100644 --- a/src/platform/EFR32/CHIPPlatformConfig.h +++ b/src/platform/EFR32/CHIPPlatformConfig.h @@ -57,7 +57,7 @@ #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 20 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS #ifndef CHIP_LOG_FILTERING diff --git a/src/platform/EFR32/InetPlatformConfig.h b/src/platform/EFR32/InetPlatformConfig.h index 3e8bb9a2f6d229..fe3304fa5d9915 100644 --- a/src/platform/EFR32/InetPlatformConfig.h +++ b/src/platform/EFR32/InetPlatformConfig.h @@ -49,5 +49,5 @@ #endif // INET_CONFIG_NUM_TCP_ENDPOINTS #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_NUM_UDP_ENDPOINTS 6 +#define INET_CONFIG_NUM_UDP_ENDPOINTS 20 #endif // INET_CONFIG_NUM_UDP_ENDPOINTS From 095f6b5a25ca44d2b130816ed326d0130ed70697 Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:14:02 +0530 Subject: [PATCH 105/115] [EFR32] Setting the network interface type to WIFI for wifi devices (#22041) * EFR32 wifi setting the network interface type to WIFI * Changes as per the suggestions * Changing the if condition * Correcting the code by adding ; for the build to be succeed --- src/platform/EFR32/DiagnosticDataProviderImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index a6d4833b65fe4b..31858125a0665b 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -264,7 +264,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** ifp->name = CharSpan::fromCharString(ifp->Name); ifp->isOperational = true; Inet::InterfaceType interfaceType; - if (interfaceIterator.GetInterfaceType(interfaceType) == CHIP_NO_ERROR) + CHIP_ERROR err = interfaceIterator.GetInterfaceType(interfaceType); + if (err == CHIP_NO_ERROR || err == CHIP_ERROR_NOT_IMPLEMENTED) { switch (interfaceType) { @@ -283,6 +284,9 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** case Inet::InterfaceType::Cellular: ifp->type = EMBER_ZCL_INTERFACE_TYPE_CELLULAR; break; + default: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + break; } } else From 3b41dbe4dc520544be62be3b19e2b63140bb8428 Mon Sep 17 00:00:00 2001 From: rgoliver Date: Mon, 22 Aug 2022 23:46:58 -0400 Subject: [PATCH 106/115] OTA: Add SetMetadataForProvider to requestor (#22005) * OTA: Add SetMetadataForProvider to requestor Add a setter for the OTA MetadataForProvider, which is provided during the QueryImageRequest. * RPC: Add RPC to set ota metadata for provider Add an RPC to set the TLV data in metadata for provider, which is used during the SendQueryImageRequest. --- .../pigweed/protos/device_service.options | 1 + .../pigweed/protos/device_service.proto | 5 +++ examples/common/pigweed/rpc_services/Device.h | 33 +++++++++++++++++-- .../ota-requestor/DefaultOTARequestor.cpp | 1 + .../ota-requestor/DefaultOTARequestor.h | 5 +++ .../ota-requestor/OTARequestorInterface.h | 3 ++ 6 files changed, 45 insertions(+), 3 deletions(-) diff --git a/examples/common/pigweed/protos/device_service.options b/examples/common/pigweed/protos/device_service.options index b5f9da673ff778..a0798688c38a84 100644 --- a/examples/common/pigweed/protos/device_service.options +++ b/examples/common/pigweed/protos/device_service.options @@ -5,3 +5,4 @@ chip.rpc.PairingInfo.qr_code max_size:256 chip.rpc.PairingInfo.qr_code_url max_size:256 chip.rpc.SpakeInfo.verifier max_size:97 // kSpake2p_VerifierSerialized_Length chip.rpc.SpakeInfo.salt max_size:32 // kSpake2p_Max_PBKDF_Salt_Length +chip.rpc.MetadataForProvider.tlv max_size:512 // length defined in chip spec 11.20.6.7 diff --git a/examples/common/pigweed/protos/device_service.proto b/examples/common/pigweed/protos/device_service.proto index 1c13d7d7281f14..6903e4a9055414 100644 --- a/examples/common/pigweed/protos/device_service.proto +++ b/examples/common/pigweed/protos/device_service.proto @@ -41,10 +41,15 @@ message PairingState { bool pairing_enabled = 1; } +message MetadataForProvider { + bytes tlv = 1; +} + service Device { rpc FactoryReset(pw.protobuf.Empty) returns (pw.protobuf.Empty){} rpc Reboot(pw.protobuf.Empty) returns (pw.protobuf.Empty){} rpc TriggerOta(pw.protobuf.Empty) returns (pw.protobuf.Empty){} + rpc SetOtaMetadataForProvider(MetadataForProvider) returns (pw.protobuf.Empty){} rpc GetDeviceInfo(pw.protobuf.Empty) returns (DeviceInfo){} rpc GetDeviceState(pw.protobuf.Empty) returns (DeviceState){} rpc SetPairingState(PairingState) returns (pw.protobuf.Empty){} diff --git a/examples/common/pigweed/rpc_services/Device.h b/examples/common/pigweed/rpc_services/Device.h index d3d5afd165810d..4a80cb44516236 100644 --- a/examples/common/pigweed/rpc_services/Device.h +++ b/examples/common/pigweed/rpc_services/Device.h @@ -223,7 +223,7 @@ class Device : public pw_rpc::nanopb::Device::Service virtual pw::Status TriggerOta(const pw_protobuf_Empty & request, pw_protobuf_Empty & response) { -#if CONFIG_CHIP_OTA_REQUESTOR +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR chip::DeviceLayer::PlatformMgr().ScheduleWork( [](intptr_t) { chip::OTARequestorInterface * requestor = chip::GetRequestorInstance(); @@ -238,10 +238,33 @@ class Device : public pw_rpc::nanopb::Device::Service }, reinterpret_cast(nullptr)); return pw::OkStatus(); -#else +#else // CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR ChipLogError(AppServer, "Trigger OTA requested, but OTA requestor not compiled in."); return pw::Status::Unimplemented(); -#endif +#endif // CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + } + + virtual pw::Status SetOtaMetadataForProvider(const chip_rpc_MetadataForProvider & request, pw_protobuf_Empty & response) + { +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + chip::OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + ChipLogError(SoftwareUpdate, "Can't get the CASESessionManager"); + return pw::Status::Unavailable(); + } + else if (sizeof(metadataForProviderBuffer) < request.tlv.size) + { + return pw::Status::ResourceExhausted(); + } + memcpy(metadataForProviderBuffer, request.tlv.bytes, request.tlv.size); + DeviceLayer::StackLock lock; + requestor->SetMetadataForProvider(chip::ByteSpan(metadataForProviderBuffer, request.tlv.size)); + return pw::OkStatus(); +#else // CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + ChipLogError(AppServer, "OTA set metadata for provider requested, but OTA requestor not compiled in."); + return pw::Status::Unimplemented(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR } virtual pw::Status SetPairingState(const chip_rpc_PairingState & request, pw_protobuf_Empty & response) @@ -415,6 +438,10 @@ class Device : public pw_rpc::nanopb::Device::Service } private: +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + static constexpr size_t kMaxMetadataForProviderLength = 512; // length defined in chip spec 11.20.6.7 + uint8_t metadataForProviderBuffer[kMaxMetadataForProviderLength]; +#endif // CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR Internal::CommissionableDataProviderRpcWrapper mCommissionableDataProvider; }; diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index f31bb2e0c5408a..f96b85ed9b4963 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -767,6 +767,7 @@ CHIP_ERROR DefaultOTARequestor::SendQueryImageRequest(Messaging::ExchangeManager args.location.SetValue(CharSpan("XX", strlen("XX"))); } + args.metadataForProvider = mMetadataForProvider; Controller::OtaSoftwareUpdateProviderCluster cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); return cluster.InvokeCommand(args, this, OnQueryImageResponse, OnQueryImageFailure); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.h b/src/app/clusters/ota-requestor/DefaultOTARequestor.h index 9f9902858c3141..938f2be59f671a 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.h @@ -92,6 +92,10 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: void GetProviderLocation(Optional & providerLocation) override { providerLocation = mProviderLocation; } + // Set the metadata value for the provider to be used in the next query and OTA update process + // NOTE: Does not persist across reboot. + void SetMetadataForProvider(ByteSpan metadataForProvider) override { mMetadataForProvider.SetValue(metadataForProvider); } + // Add a default OTA provider to the cached list CHIP_ERROR AddDefaultOtaProvider(const ProviderLocationType & providerLocation) override; @@ -319,6 +323,7 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: BDXDownloader * mBdxDownloader = nullptr; // TODO: this should be OTADownloader BDXMessenger mBdxMessenger; // TODO: ideally this is held by the application uint8_t mUpdateTokenBuffer[kMaxUpdateTokenLen]; + Optional mMetadataForProvider; ByteSpan mUpdateToken; uint32_t mCurrentVersion = 0; uint32_t mTargetVersion = 0; diff --git a/src/app/clusters/ota-requestor/OTARequestorInterface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h index f24563d36c3c79..bd09f833971cc0 100644 --- a/src/app/clusters/ota-requestor/OTARequestorInterface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -203,6 +203,9 @@ class OTARequestorInterface // Set the provider location to be used in the next query and OTA update process virtual void SetCurrentProviderLocation(ProviderLocationType providerLocation) = 0; + // Set the metadata value for the provider to be used in the next query and OTA update process + virtual void SetMetadataForProvider(chip::ByteSpan metadataForProvider) = 0; + // If there is an OTA update in progress, returns the provider location for the current OTA update, otherwise, returns the // provider location that was last used virtual void GetProviderLocation(Optional & providerLocation) = 0; From 48f87f3ce2b3b8457af63f8e68dbf3f1e42ae219 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 22 Aug 2022 23:47:09 -0400 Subject: [PATCH 107/115] Add missing validity checks to CSR verification (#22069) * Add missing validity checks to CSR verification - SDK's CSR verification (VerifyCertificateSigningRequest) allowed trailing garbage past the end of the buffer if the primary SEQUENCE element is OK and checks-out. This is looser enforcement than some crypto libraries which expect a CSR to be 100% valid ASN.1 DER and have no unnecessary bytes or otherwise unparsable bytes. Fixes #22068 This PR: - Adds validity checks for size and basic format that catches the problem. - Adds unit tests that use externally generated CSRs to validate the `VerifyCertificateSigningRequest` logic, rather than only relying on round-trips with generation. Testing done: - Added new unit tests. Existing unit tests pass - Tested under OpenSSL, BoringSSL and mbedTLS * Fix docs typo --- src/crypto/CHIPCryptoPAL.cpp | 23 +++ src/crypto/CHIPCryptoPAL.h | 15 ++ src/crypto/CHIPCryptoPALOpenSSL.cpp | 2 + src/crypto/CHIPCryptoPALTinyCrypt.cpp | 2 + src/crypto/CHIPCryptoPALmbedTLS.cpp | 2 + src/crypto/tests/CHIPCryptoPALTest.cpp | 165 +++++++++++++++++++ src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp | 2 + 7 files changed, 211 insertions(+) diff --git a/src/crypto/CHIPCryptoPAL.cpp b/src/crypto/CHIPCryptoPAL.cpp index ec2e415806c23b..859f5809e4b742 100644 --- a/src/crypto/CHIPCryptoPAL.cpp +++ b/src/crypto/CHIPCryptoPAL.cpp @@ -1092,5 +1092,28 @@ CHIP_ERROR GenerateCertificateSigningRequest(const P256Keypair * keypair, Mutabl return err; } +CHIP_ERROR VerifyCertificateSigningRequestFormat(const uint8_t * csr, size_t csr_length) +{ + // Ensure we have enough size to validate header + VerifyOrReturnError((csr_length >= 16) && (csr_length <= kMAX_CSR_Length), CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + Reader reader(csr, csr_length); + + // Ensure we have an outermost SEQUENCE + uint8_t seq_header = 0; + ReturnErrorOnFailure(reader.Read8(&seq_header).StatusCode()); + VerifyOrReturnError(seq_header == kSeqTag, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + uint8_t seq_length = 0; + VerifyOrReturnError(ReadDerLength(reader, seq_length) == CHIP_NO_ERROR, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + // Ensure that outer length matches sequence length + tag overhead, otherwise + // we have trailing garbage + size_t header_overhead = (seq_length <= 127) ? 2 : 3; + VerifyOrReturnError(csr_length == (seq_length + header_overhead), CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + return CHIP_NO_ERROR; +} + } // namespace Crypto } // namespace chip diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index ea67c59a5765c1..544a554dcb31eb 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -640,8 +640,23 @@ CHIP_ERROR AES_CCM_decrypt(const uint8_t * ciphertext, size_t ciphertext_length, **/ CHIP_ERROR GenerateCertificateSigningRequest(const P256Keypair * keypair, MutableByteSpan & csr_span); +/** + * @brief Common code to validate ASN.1 format/size of a CSR, used by VerifyCertificateSigningRequest. + * + * Ensures it's not obviously malformed and doesn't have trailing garbage. + * + * @param csr CSR in DER format + * @param csr_length The length of the CSR buffer + * @return CHIP_ERROR_UNSUPPORTED_CERT_FORMAT on invalid format, CHIP_NO_ERROR otherwise. + */ +CHIP_ERROR VerifyCertificateSigningRequestFormat(const uint8_t * csr, size_t csr_length); + /** * @brief Verify the Certificate Signing Request (CSR). If successfully verified, it outputs the public key from the CSR. + * + * The CSR is valid if the format is correct, the signature validates with the embedded public + * key, and there is no trailing garbage data. + * * @param csr CSR in DER format * @param csr_length The length of the CSR * @param pubkey The public key from the verified CSR diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index 761294d0cc84ee..d1211bccbc5da2 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -1254,6 +1254,8 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr, size_t csr_length, P256PublicKey & pubkey) { + ReturnErrorOnFailure(VerifyCertificateSigningRequestFormat(csr, csr_length)); + ERR_clear_error(); CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; diff --git a/src/crypto/CHIPCryptoPALTinyCrypt.cpp b/src/crypto/CHIPCryptoPALTinyCrypt.cpp index ae166a294744fc..aa9df451cc692a 100644 --- a/src/crypto/CHIPCryptoPALTinyCrypt.cpp +++ b/src/crypto/CHIPCryptoPALTinyCrypt.cpp @@ -777,6 +777,8 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_length, P256PublicKey & pubkey) { #if defined(MBEDTLS_X509_CSR_PARSE_C) + ReturnErrorOnFailure(VerifyCertificateSigningRequestFormat(csr_buf, csr_length)); + // TODO: For some embedded targets, mbedTLS library doesn't have mbedtls_x509_csr_parse_der, and mbedtls_x509_csr_parse_free. // Taking a step back, embedded targets likely will not process CSR requests. Adding this action item to reevaluate // this if there's a need for this processing for embedded targets. diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index 9bce7e94430796..dfbd993f023d8d 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -889,6 +889,8 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_length, P256PublicKey & pubkey) { #if defined(MBEDTLS_X509_CSR_PARSE_C) + ReturnErrorOnFailure(VerifyCertificateSigningRequestFormat(csr_buf, csr_length)); + // TODO: For some embedded targets, mbedTLS library doesn't have mbedtls_x509_csr_parse_der, and mbedtls_x509_csr_parse_free. // Taking a step back, embedded targets likely will not process CSR requests. Adding this action item to reevaluate // this if there's a need for this processing for embedded targets. diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index 8c76468e6158ea..485ead2cf99322 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -1034,6 +1034,170 @@ static void TestP256_Keygen(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, keypair.Pubkey().ECDSA_validate_msg_signature(test_msg, msglen, test_sig) == CHIP_NO_ERROR); } +void TestCSR_Verify(nlTestSuite * inSuite, void * inContext) +{ + Crypto::P256PublicKey pubKey; + CHIP_ERROR err; + + // First case: there is trailing garbage in the CSR + { + const uint8_t kBadTrailingGarbageCsr[255] = { + 0x30, 0x81, 0xda, 0x30, 0x81, 0x81, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, + 0x0c, 0x03, 0x43, 0x53, 0x41, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x72, 0x48, 0xc0, 0x36, 0xf0, 0x12, 0x5f, 0xd1, + 0x68, 0x92, 0x2d, 0xee, 0x57, 0x2b, 0x8e, 0x20, 0x9d, 0x97, 0xfa, 0x73, 0x92, 0xf1, 0xa0, 0x91, 0x0e, 0xfd, 0x04, 0x93, + 0x66, 0x47, 0x3c, 0xa3, 0xf0, 0xa8, 0x47, 0xa1, 0xa3, 0x1e, 0x13, 0x3b, 0x67, 0x3b, 0x18, 0xca, 0x77, 0xd1, 0xea, 0xe3, + 0x74, 0x93, 0x49, 0x8b, 0x9d, 0xdc, 0xef, 0xf9, 0xd5, 0x9b, 0x27, 0x19, 0xad, 0x6e, 0x90, 0xd2, 0xa0, 0x11, 0x30, 0x0f, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x0e, 0x31, 0x02, 0x30, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x6a, 0x2e, 0x15, 0x34, 0x1b, 0xde, + 0xcb, 0x8f, 0xd2, 0xfd, 0x35, 0x03, 0x89, 0x0e, 0xed, 0x23, 0x54, 0xff, 0xcb, 0x79, 0xf9, 0xcb, 0x40, 0x33, 0x59, 0xb4, + 0x27, 0x69, 0xeb, 0x07, 0x3b, 0xd5, 0x02, 0x21, 0x00, 0xb0, 0x25, 0xc9, 0xc2, 0x21, 0xe8, 0x54, 0xcc, 0x08, 0x12, 0xf5, + 0x10, 0x3a, 0x0b, 0x25, 0x20, 0x0a, 0x61, 0x38, 0xc8, 0x6f, 0x82, 0xa7, 0x51, 0x84, 0x61, 0xae, 0x93, 0x69, 0xe4, 0x74, + 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + + err = VerifyCertificateSigningRequest(&kBadTrailingGarbageCsr[0], sizeof(kBadTrailingGarbageCsr), pubKey); + + // On first test case, check if CSRs are supported at all, and skip test if they are not. + if (err == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE) + { + ChipLogError(Crypto, "The current platform does not support CSR parsing."); + return; + } + + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + + err = VerifyCertificateSigningRequestFormat(&kBadTrailingGarbageCsr[0], sizeof(kBadTrailingGarbageCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + } + + // Second case: correct CSR + { + const uint8_t kGoodCsr[205] = { + 0x30, 0x81, 0xca, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, + 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xa3, 0xbe, 0xa1, 0xf5, 0x42, 0x01, + 0x07, 0x3c, 0x4b, 0x75, 0x85, 0xd8, 0xe2, 0x98, 0xac, 0x2f, 0xf6, 0x98, 0xdb, 0xd9, 0x5b, 0xe0, 0x7e, 0xc1, 0x04, + 0xd5, 0x73, 0xc5, 0xb0, 0x90, 0x77, 0x27, 0x00, 0x1e, 0x22, 0xc7, 0x89, 0x5e, 0x4d, 0x75, 0x07, 0x89, 0x82, 0x0f, + 0x49, 0xb6, 0x59, 0xd5, 0xc5, 0x15, 0x7d, 0x93, 0xe6, 0x80, 0x5c, 0x70, 0x89, 0x0a, 0x43, 0x10, 0x3d, 0xeb, 0x3d, + 0x4a, 0xa0, 0x00, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x1d, 0x86, 0x21, 0xb4, 0xc2, 0xe1, 0xa9, 0xf3, 0xbc, 0xc8, 0x7c, 0xda, 0xb4, 0xb9, + 0xc6, 0x8c, 0xd0, 0xe4, 0x9a, 0x9c, 0xef, 0x02, 0x93, 0x98, 0x27, 0x7e, 0x81, 0x21, 0x5d, 0x20, 0x9d, 0x32, 0x02, + 0x21, 0x00, 0x8b, 0x6b, 0x49, 0xb6, 0x7d, 0x3e, 0x67, 0x9e, 0xb1, 0x22, 0xd3, 0x63, 0x82, 0x40, 0x4f, 0x49, 0xa4, + 0xdc, 0x17, 0x35, 0xac, 0x4b, 0x7a, 0xbf, 0x52, 0x05, 0x58, 0x68, 0xe0, 0xaa, 0xd2, 0x8e, + }; + const uint8_t kGoodCsrSubjectPublicKey[65] = { + 0x04, 0xa3, 0xbe, 0xa1, 0xf5, 0x42, 0x01, 0x07, 0x3c, 0x4b, 0x75, 0x85, 0xd8, 0xe2, 0x98, 0xac, 0x2f, + 0xf6, 0x98, 0xdb, 0xd9, 0x5b, 0xe0, 0x7e, 0xc1, 0x04, 0xd5, 0x73, 0xc5, 0xb0, 0x90, 0x77, 0x27, 0x00, + 0x1e, 0x22, 0xc7, 0x89, 0x5e, 0x4d, 0x75, 0x07, 0x89, 0x82, 0x0f, 0x49, 0xb6, 0x59, 0xd5, 0xc5, 0x15, + 0x7d, 0x93, 0xe6, 0x80, 0x5c, 0x70, 0x89, 0x0a, 0x43, 0x10, 0x3d, 0xeb, 0x3d, 0x4a, + }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + + err = VerifyCertificateSigningRequestFormat(&kGoodCsr[0], sizeof(kGoodCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = VerifyCertificateSigningRequest(&kGoodCsr[0], sizeof(kGoodCsr), pubKey); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + Crypto::P256PublicKey expected(kGoodCsrSubjectPublicKey); + NL_TEST_ASSERT(inSuite, pubKey.Matches(expected)); + } + + // Third case: bad signature + { + const uint8_t kBadSignatureSignatureCsr[205] = { + 0x30, 0x81, 0xca, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, + 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xa3, 0xbe, 0xa1, 0xf5, 0x42, 0x01, + 0x07, 0x3c, 0x4b, 0x75, 0x85, 0xd8, 0xe2, 0x98, 0xac, 0x2f, 0xf6, 0x98, 0xdb, 0xd9, 0x5b, 0xe0, 0x7e, 0xc1, 0x04, + 0xd5, 0x73, 0xc5, 0xb0, 0x90, 0x77, 0x27, 0x00, 0x1e, 0x22, 0xc7, 0x89, 0x5e, 0x4d, 0x75, 0x07, 0x89, 0x82, 0x0f, + 0x49, 0xb6, 0x59, 0xd5, 0xc5, 0x15, 0x7d, 0x93, 0xe6, 0x80, 0x5c, 0x70, 0x89, 0x0a, 0x43, 0x10, 0x3d, 0xeb, 0x3d, + 0x4a, 0xa0, 0x00, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x1d, 0x86, 0x21, 0xb4, 0xc2, 0xe1, 0xa9, 0xf3, 0xbc, 0xc8, 0x7c, 0xda, 0xb4, 0xb9, + 0xc6, 0x8c, 0xd0, 0xe4, 0x9a, 0x9c, 0xef, 0x02, 0x93, 0x98, 0x27, 0x7e, 0x81, 0x21, 0x5d, 0x20, 0x9d, 0x32, 0x02, + 0x21, 0x00, 0x8b, 0x6b, 0x49, 0xb6, 0x7d, 0x3e, 0x67, 0x9e, 0xb1, 0x21, 0xd3, 0x63, 0x82, 0x40, 0x4f, 0x49, 0xa4, + 0xdc, 0x17, 0x35, 0xac, 0x4b, 0x7a, 0xbf, 0x52, 0x05, 0x58, 0x68, 0xe0, 0xaa, 0xd2, 0x8e, + }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + + err = VerifyCertificateSigningRequestFormat(&kBadSignatureSignatureCsr[0], sizeof(kBadSignatureSignatureCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = VerifyCertificateSigningRequest(&kBadSignatureSignatureCsr[0], sizeof(kBadSignatureSignatureCsr), pubKey); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + } + + // Fourth case: CSR too big + { + const uint8_t kBadTooBigCsr[256] = { + 0x30, 0x81, 0xda, 0x30, 0x81, 0x81, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, + 0x0c, 0x03, 0x43, 0x53, 0x41, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x72, 0x48, 0xc0, 0x36, 0xf0, 0x12, 0x5f, 0xd1, + 0x68, 0x92, 0x2d, 0xee, 0x57, 0x2b, 0x8e, 0x20, 0x9d, 0x97, 0xfa, 0x73, 0x92, 0xf1, 0xa0, 0x91, 0x0e, 0xfd, 0x04, 0x93, + 0x66, 0x47, 0x3c, 0xa3, 0xf0, 0xa8, 0x47, 0xa1, 0xa3, 0x1e, 0x13, 0x3b, 0x67, 0x3b, 0x18, 0xca, 0x77, 0xd1, 0xea, 0xe3, + 0x74, 0x93, 0x49, 0x8b, 0x9d, 0xdc, 0xef, 0xf9, 0xd5, 0x9b, 0x27, 0x19, 0xad, 0x6e, 0x90, 0xd2, 0xa0, 0x11, 0x30, 0x0f, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x0e, 0x31, 0x02, 0x30, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x6a, 0x2e, 0x15, 0x34, 0x1b, 0xde, + 0xcb, 0x8f, 0xd2, 0xfd, 0x35, 0x03, 0x89, 0x0e, 0xed, 0x23, 0x54, 0xff, 0xcb, 0x79, 0xf9, 0xcb, 0x40, 0x33, 0x59, 0xb4, + 0x27, 0x69, 0xeb, 0x07, 0x3b, 0xd5, 0x02, 0x21, 0x00, 0xb0, 0x25, 0xc9, 0xc2, 0x21, 0xe8, 0x54, 0xcc, 0x08, 0x12, 0xf5, + 0x10, 0x3a, 0x0b, 0x25, 0x20, 0x0a, 0x61, 0x38, 0xc8, 0x6f, 0x82, 0xa7, 0x51, 0x84, 0x61, 0xae, 0x93, 0x69, 0xe4, 0x74, + 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + err = VerifyCertificateSigningRequestFormat(&kBadTooBigCsr[0], sizeof(kBadTooBigCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + err = VerifyCertificateSigningRequest(&kBadTooBigCsr[0], sizeof(kBadTooBigCsr), pubKey); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + } + + // Fifth case: obviously invalid CSR (1/2) + { + const uint8_t kTooSmallCsr[10] = { 0x30, 0x81, 0xda, 0x30, 0x81, 0x81, 0x02, 0x01, 0x00, 0x30 }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + + err = VerifyCertificateSigningRequestFormat(&kTooSmallCsr[0], sizeof(kTooSmallCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + err = VerifyCertificateSigningRequest(&kTooSmallCsr[0], sizeof(kTooSmallCsr), pubKey); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + } + + // Sixth case: obviously invalid CSR (2/2) + { + const uint8_t kNotSequenceCsr[205] = { + 0x31, 0x81, 0xca, 0x30, 0x70, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0a, + 0x0c, 0x03, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xa3, 0xbe, 0xa1, 0xf5, 0x42, 0x01, + 0x07, 0x3c, 0x4b, 0x75, 0x85, 0xd8, 0xe2, 0x98, 0xac, 0x2f, 0xf6, 0x98, 0xdb, 0xd9, 0x5b, 0xe0, 0x7e, 0xc1, 0x04, + 0xd5, 0x73, 0xc5, 0xb0, 0x90, 0x77, 0x27, 0x00, 0x1e, 0x22, 0xc7, 0x89, 0x5e, 0x4d, 0x75, 0x07, 0x89, 0x82, 0x0f, + 0x49, 0xb6, 0x59, 0xd5, 0xc5, 0x15, 0x7d, 0x93, 0xe6, 0x80, 0x5c, 0x70, 0x89, 0x0a, 0x43, 0x10, 0x3d, 0xeb, 0x3d, + 0x4a, 0xa0, 0x00, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x1d, 0x86, 0x21, 0xb4, 0xc2, 0xe1, 0xa9, 0xf3, 0xbc, 0xc8, 0x7c, 0xda, 0xb4, 0xb9, + 0xc6, 0x8c, 0xd0, 0xe4, 0x9a, 0x9c, 0xef, 0x02, 0x93, 0x98, 0x27, 0x7e, 0x81, 0x21, 0x5d, 0x20, 0x9d, 0x32, 0x02, + 0x21, 0x00, 0x8b, 0x6b, 0x49, 0xb6, 0x7d, 0x3e, 0x67, 0x9e, 0xb1, 0x22, 0xd3, 0x63, 0x82, 0x40, 0x4f, 0x49, 0xa4, + 0xdc, 0x17, 0x35, 0xac, 0x4b, 0x7a, 0xbf, 0x52, 0x05, 0x58, 0x68, 0xe0, 0xaa, 0xd2, 0x8e, + }; + + Crypto::ClearSecretData(pubKey.Bytes(), pubKey.Length()); + + err = VerifyCertificateSigningRequestFormat(&kNotSequenceCsr[0], sizeof(kNotSequenceCsr)); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + + err = VerifyCertificateSigningRequest(&kNotSequenceCsr[0], sizeof(kNotSequenceCsr), pubKey); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); + } +} + void TestCSR_GenDirect(nlTestSuite * inSuite, void * inContext) { uint8_t csrBuf[kMAX_CSR_Length]; @@ -2136,6 +2300,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test adding entropy sources", TestAddEntropySources), NL_TEST_DEF("Test PBKDF2 SHA256", TestPBKDF2_SHA256_TestVectors), NL_TEST_DEF("Test P256 Keygen", TestP256_Keygen), + NL_TEST_DEF("Test CSR Verification + PK extraction", TestCSR_Verify), NL_TEST_DEF("Test CSR Generation via P256Keypair method", TestCSR_GenByKeypair), NL_TEST_DEF("Test Direct CSR Generation", TestCSR_GenDirect), NL_TEST_DEF("Test Keypair Serialize", TestKeypair_Serialize), diff --git a/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp index 72c4706501f851..27289aeea069aa 100644 --- a/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/EFR32/CHIPCryptoPALPsaEfr32.cpp @@ -902,6 +902,8 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr_buf, size_t csr_length, P256PublicKey & pubkey) { #if defined(MBEDTLS_X509_CSR_PARSE_C) + ReturnErrorOnFailure(VerifyCertificateSigningRequestFormat(csr_buf, csr_length)); + // TODO: For some embedded targets, mbedTLS library doesn't have mbedtls_x509_csr_parse_der, and mbedtls_x509_csr_parse_free. // Taking a step back, embedded targets likely will not process CSR requests. Adding this action item to reevaluate // this if there's a need for this processing for embedded targets. From 5f94d380c22c46267c521a008aff36653b902ecb Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 23 Aug 2022 18:48:29 +0530 Subject: [PATCH 108/115] [ESP32] Support disabling SOFTAP for saving some flash (#22096) * [ESP32] Support disabling SOFTAP support for saving some flash * Disable softap by default in examples * If rendezvous mode is softap then enable softap configurations --- config/esp32/components/chip/Kconfig | 1 + .../esp32/main/Kconfig.projbuild | 2 + .../all-clusters-app/esp32/sdkconfig.defaults | 3 ++ .../esp32/main/Kconfig.projbuild | 2 + .../esp32/sdkconfig.defaults | 3 ++ examples/bridge-app/esp32/sdkconfig.defaults | 3 ++ examples/chef/esp32/main/Kconfig.projbuild | 2 + examples/chef/esp32/sdkconfig.defaults | 3 ++ .../light-switch-app/esp32/sdkconfig.defaults | 5 ++- .../lighting-app/esp32/sdkconfig.defaults | 3 ++ examples/lock-app/esp32/sdkconfig.defaults | 3 ++ .../ota-provider-app/esp32/sdkconfig.defaults | 3 ++ .../esp32/sdkconfig.defaults | 3 ++ .../esp32/sdkconfig.defaults | 3 ++ src/platform/ESP32/CHIPDevicePlatformConfig.h | 2 + src/platform/ESP32/ConnectivityManagerImpl.h | 42 +++++++++++-------- .../ESP32/ConnectivityManagerImpl_WiFi.cpp | 23 ++++++++-- src/platform/ESP32/ESP32Utils.cpp | 9 +++- src/platform/ESP32/ESP32Utils.h | 2 + src/platform/ESP32/PlatformManagerImpl.cpp | 3 +- 20 files changed, 95 insertions(+), 25 deletions(-) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 4a6cc6dd6e889e..55cafa1c8a07a8 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -387,6 +387,7 @@ menu "CHIP Device Layer" menu "WiFi AP Options" config ENABLE_WIFI_AP + depends on ESP_WIFI_SOFTAP_SUPPORT bool "Enable CHIP WIFI AP" default y help diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index 8791a80a443e71..22edca7a03b264 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -53,6 +53,7 @@ menu "Demo" config RENDEZVOUS_MODE_SOFTAP bool "Soft-AP" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE bool "BLE" depends on BT_ENABLED @@ -60,6 +61,7 @@ menu "Demo" bool "On-Network" config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK bool "Soft-AP / On-Network" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE_ON_NETWORK bool "BLE / On-Network" endchoice diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index 5f996f40946d68..a9c28a1a863a25 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -53,3 +53,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y # Serial Flasher config CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild index 8791a80a443e71..22edca7a03b264 100644 --- a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild @@ -53,6 +53,7 @@ menu "Demo" config RENDEZVOUS_MODE_SOFTAP bool "Soft-AP" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE bool "BLE" depends on BT_ENABLED @@ -60,6 +61,7 @@ menu "Demo" bool "On-Network" config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK bool "Soft-AP / On-Network" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE_ON_NETWORK bool "BLE / On-Network" endchoice diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults index 5f996f40946d68..a9c28a1a863a25 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults @@ -53,3 +53,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y # Serial Flasher config CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/bridge-app/esp32/sdkconfig.defaults b/examples/bridge-app/esp32/sdkconfig.defaults index 6a6589e1040577..d76496f541c9ba 100644 --- a/examples/bridge-app/esp32/sdkconfig.defaults +++ b/examples/bridge-app/esp32/sdkconfig.defaults @@ -39,3 +39,6 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/chef/esp32/main/Kconfig.projbuild b/examples/chef/esp32/main/Kconfig.projbuild index 307b7f6ccb83bc..695222b7f43c45 100644 --- a/examples/chef/esp32/main/Kconfig.projbuild +++ b/examples/chef/esp32/main/Kconfig.projbuild @@ -55,6 +55,7 @@ menu "Demo" bool "Bypass" config RENDEZVOUS_MODE_SOFTAP bool "Soft-AP" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE bool "BLE" depends on BT_ENABLED @@ -62,6 +63,7 @@ menu "Demo" bool "On-Network" config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK bool "Soft-AP / On-Network" + select ESP_WIFI_SOFTAP_SUPPORT config RENDEZVOUS_MODE_BLE_ON_NETWORK bool "BLE / On-Network" endchoice diff --git a/examples/chef/esp32/sdkconfig.defaults b/examples/chef/esp32/sdkconfig.defaults index ab2bb7c5dcb419..a3a1d8a272b8b3 100644 --- a/examples/chef/esp32/sdkconfig.defaults +++ b/examples/chef/esp32/sdkconfig.defaults @@ -47,3 +47,6 @@ CONFIG_STACK_CHECK=y # Serial Flasher config CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/light-switch-app/esp32/sdkconfig.defaults b/examples/light-switch-app/esp32/sdkconfig.defaults index f8d119e98c2bec..4e780d862ad614 100644 --- a/examples/light-switch-app/esp32/sdkconfig.defaults +++ b/examples/light-switch-app/esp32/sdkconfig.defaults @@ -45,4 +45,7 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE="4MB" #enable debug shell -CONFIG_ENABLE_CHIP_SHELL=y \ No newline at end of file +CONFIG_ENABLE_CHIP_SHELL=y + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 23a3766c340c04..e051a3f2b37aee 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -43,3 +43,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y # Serial Flasher config CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/lock-app/esp32/sdkconfig.defaults b/examples/lock-app/esp32/sdkconfig.defaults index c9b513d752fc6c..d53bfc85c76c22 100644 --- a/examples/lock-app/esp32/sdkconfig.defaults +++ b/examples/lock-app/esp32/sdkconfig.defaults @@ -43,3 +43,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y #Lock app PID CONFIG_DEVICE_PRODUCT_ID=0x8006 + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/ota-provider-app/esp32/sdkconfig.defaults b/examples/ota-provider-app/esp32/sdkconfig.defaults index 537c6deab2897f..7fce894e5a80d8 100644 --- a/examples/ota-provider-app/esp32/sdkconfig.defaults +++ b/examples/ota-provider-app/esp32/sdkconfig.defaults @@ -58,3 +58,6 @@ CONFIG_USE_TEST_SETUP_DISCRIMINATOR=0xF01 # Enable chip shell CONFIG_ENABLE_CHIP_SHELL=y + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/ota-requestor-app/esp32/sdkconfig.defaults b/examples/ota-requestor-app/esp32/sdkconfig.defaults index beec4822b35cdf..17b6e378f65ca9 100644 --- a/examples/ota-requestor-app/esp32/sdkconfig.defaults +++ b/examples/ota-requestor-app/esp32/sdkconfig.defaults @@ -59,3 +59,6 @@ CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER=2 # Enable Chip Shell CONFIG_ENABLE_CHIP_SHELL=y + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/examples/temperature-measurement-app/esp32/sdkconfig.defaults b/examples/temperature-measurement-app/esp32/sdkconfig.defaults index 4659af909a144f..dcd05c0734f36a 100644 --- a/examples/temperature-measurement-app/esp32/sdkconfig.defaults +++ b/examples/temperature-measurement-app/esp32/sdkconfig.defaults @@ -84,3 +84,6 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 #enable lwIP route hooks CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# Disable softap support by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index 3bc56162c00350..c40cd8c565e11d 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -59,11 +59,13 @@ #define CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS CONFIG_MAX_SCAN_NETWORKS_RESULTS #define CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT #define CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT CONFIG_WIFI_CONNECTIVITY_TIMEOUT +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP #define CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX CONFIG_WIFI_AP_SSID_PREFIX #define CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL CONFIG_WIFI_AP_CHANNEL #define CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS CONFIG_WIFI_AP_MAX_STATIONS #define CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL CONFIG_WIFI_AP_BEACON_INTERVAL #define CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT CONFIG_WIFI_AP_IDLE_TIMEOUT +#endif /* CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP */ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY CONFIG_ENABLE_WIFI_TELEMETRY #define CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP | CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #endif // CONFIG_IDF_TARGET_ESP32H2 diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h index 3bdd1418c23564..9c7f7774317318 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.h +++ b/src/platform/ESP32/ConnectivityManagerImpl.h @@ -109,15 +109,6 @@ class ConnectivityManagerImpl final : public ConnectivityManager, CHIP_ERROR _SetWiFiStationReconnectInterval(System::Clock::Timeout val); bool _IsWiFiStationProvisioned(void); void _ClearWiFiStationProvision(void); - WiFiAPMode _GetWiFiAPMode(void); - CHIP_ERROR _SetWiFiAPMode(WiFiAPMode val); - bool _IsWiFiAPActive(void); - bool _IsWiFiAPApplicationControlled(void); - void _DemandStartWiFiAP(void); - void _StopOnDemandWiFiAP(void); - void _MaintainOnDemandWiFiAP(void); - System::Clock::Timeout _GetWiFiAPIdleTimeout(void); - void _SetWiFiAPIdleTimeout(System::Clock::Timeout val); CHIP_ERROR _GetAndLogWiFiStatsCounters(void); bool _CanStartWiFiScan(); void _OnWiFiScanDone(); @@ -126,13 +117,9 @@ class ConnectivityManagerImpl final : public ConnectivityManager, // ===== Private members reserved for use by this class only. System::Clock::Timestamp mLastStationConnectFailTime; - System::Clock::Timestamp mLastAPDemandTime; WiFiStationMode mWiFiStationMode; WiFiStationState mWiFiStationState; - WiFiAPMode mWiFiAPMode; - WiFiAPState mWiFiAPState; System::Clock::Timeout mWiFiStationReconnectInterval; - System::Clock::Timeout mWiFiAPIdleTimeout; BitFlags mFlags; CHIP_ERROR InitWiFi(void); @@ -144,10 +131,27 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void ChangeWiFiStationState(WiFiStationState newState); static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + WiFiAPMode _GetWiFiAPMode(void); + CHIP_ERROR _SetWiFiAPMode(WiFiAPMode val); + bool _IsWiFiAPActive(void); + void _DemandStartWiFiAP(void); + void _StopOnDemandWiFiAP(void); + void _MaintainOnDemandWiFiAP(void); + System::Clock::Timeout _GetWiFiAPIdleTimeout(void); + void _SetWiFiAPIdleTimeout(System::Clock::Timeout val); + bool _IsWiFiAPApplicationControlled(void); + + System::Clock::Timestamp mLastAPDemandTime; + WiFiAPMode mWiFiAPMode; + WiFiAPState mWiFiAPState; + System::Clock::Timeout mWiFiAPIdleTimeout; + void DriveAPState(void); CHIP_ERROR ConfigureWiFiAP(void); void ChangeWiFiAPState(WiFiAPState newState); static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP void UpdateInternetConnectivityState(void); void OnStationIPv4AddressAvailable(const ip_event_got_ip_t & got_ip); @@ -174,16 +178,12 @@ inline bool ConnectivityManagerImpl::_IsWiFiStationConnected(void) return mWiFiStationState == kWiFiStationState_Connected; } -inline bool ConnectivityManagerImpl::_IsWiFiAPApplicationControlled(void) -{ - return mWiFiAPMode == kWiFiAPMode_ApplicationControlled; -} - inline System::Clock::Timeout ConnectivityManagerImpl::_GetWiFiStationReconnectInterval(void) { return mWiFiStationReconnectInterval; } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP inline ConnectivityManager::WiFiAPMode ConnectivityManagerImpl::_GetWiFiAPMode(void) { return mWiFiAPMode; @@ -199,6 +199,12 @@ inline System::Clock::Timeout ConnectivityManagerImpl::_GetWiFiAPIdleTimeout(voi return mWiFiAPIdleTimeout; } +inline bool ConnectivityManagerImpl::_IsWiFiAPApplicationControlled(void) +{ + return mWiFiAPMode == kWiFiAPMode_ApplicationControlled; +} +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + inline bool ConnectivityManagerImpl::_CanStartWiFiScan() { return mWiFiStationState != kWiFiStationState_Connecting; diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index f00c92803908aa..2eb2e1b3ad11e0 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -110,10 +110,13 @@ void ConnectivityManagerImpl::_ClearWiFiStationProvision(void) esp_wifi_set_config(WIFI_IF_STA, &stationConfig); DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP } } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP CHIP_ERROR ConnectivityManagerImpl::_SetWiFiAPMode(WiFiAPMode val) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -167,6 +170,7 @@ void ConnectivityManagerImpl::_SetWiFiAPIdleTimeout(System::Clock::Timeout val) mWiFiAPIdleTimeout = val; DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL); } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP #define WIFI_BAND_2_4GHZ 2400 #define WIFI_BAND_5_0GHZ 5000 @@ -382,13 +386,17 @@ CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWiFiStatsCounters(void) CHIP_ERROR ConnectivityManagerImpl::InitWiFi() { mLastStationConnectFailTime = System::Clock::kZero; - mLastAPDemandTime = System::Clock::kZero; mWiFiStationMode = kWiFiStationMode_Disabled; mWiFiStationState = kWiFiStationState_NotConnected; - mWiFiAPMode = kWiFiAPMode_Disabled; - mWiFiAPState = kWiFiAPState_NotActive; mWiFiStationReconnectInterval = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL); - mWiFiAPIdleTimeout = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + mLastAPDemandTime = System::Clock::kZero; + mWiFiAPMode = kWiFiAPMode_Disabled; + mWiFiAPState = kWiFiAPState_NotActive; + mWiFiAPIdleTimeout = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP + mFlags.SetRaw(0); // TODO Initialize the Chip Addressing and Routing Module. @@ -435,7 +443,10 @@ CHIP_ERROR ConnectivityManagerImpl::InitWiFi() // Queue work items to bootstrap the AP and station state machines once the Chip event loop is running. ReturnErrorOnFailure(DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL)); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP ReturnErrorOnFailure(DeviceLayer::SystemLayer().ScheduleWork(DriveAPState, NULL)); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP return CHIP_NO_ERROR; } @@ -478,6 +489,7 @@ void ConnectivityManagerImpl::OnWiFiPlatformEvent(const ChipDeviceEvent * event) ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_STOP"); DriveStationState(); break; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP case WIFI_EVENT_AP_START: ChipLogProgress(DeviceLayer, "WIFI_EVENT_AP_START"); ChangeWiFiAPState(kWiFiAPState_Active); @@ -492,6 +504,7 @@ void ConnectivityManagerImpl::OnWiFiPlatformEvent(const ChipDeviceEvent * event) ChipLogProgress(DeviceLayer, "WIFI_EVENT_AP_STACONNECTED"); MaintainOnDemandWiFiAP(); break; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP default: break; } @@ -769,6 +782,7 @@ void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, sInstance.DriveStationState(); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP void ConnectivityManagerImpl::DriveAPState() { CHIP_ERROR err = CHIP_NO_ERROR; @@ -952,6 +966,7 @@ void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void { sInstance.DriveAPState(); } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) { diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index 9391ee586e3eb6..e6dd3ea4df09c3 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -38,6 +38,7 @@ using namespace ::chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::DeviceNetworkInfo; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP CHIP_ERROR ESP32Utils::IsAPEnabled(bool & apEnabled) { wifi_mode_t curWiFiMode; @@ -53,6 +54,7 @@ CHIP_ERROR ESP32Utils::IsAPEnabled(bool & apEnabled) return CHIP_NO_ERROR; } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP CHIP_ERROR ESP32Utils::IsStationEnabled(bool & staEnabled) { @@ -130,6 +132,7 @@ CHIP_ERROR ESP32Utils::EnableStationMode(void) return ESP32Utils::MapError(err); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP // If station mode is not already enabled (implying the current mode is WIFI_MODE_AP), change // the mode to WIFI_MODE_APSTA. if (curWiFiMode == WIFI_MODE_AP) @@ -144,15 +147,19 @@ CHIP_ERROR ESP32Utils::EnableStationMode(void) return ESP32Utils::MapError(err); } } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP return CHIP_NO_ERROR; } CHIP_ERROR ESP32Utils::SetAPMode(bool enabled) { - wifi_mode_t curWiFiMode, targetWiFiMode; + wifi_mode_t curWiFiMode; + wifi_mode_t targetWiFiMode = WIFI_MODE_STA; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP targetWiFiMode = (enabled) ? WIFI_MODE_APSTA : WIFI_MODE_STA; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP // Get the current ESP WiFI mode. esp_err_t err = esp_wifi_get_mode(&curWiFiMode); diff --git a/src/platform/ESP32/ESP32Utils.h b/src/platform/ESP32/ESP32Utils.h index 94a98e0f8b281e..716b85e8434d3a 100644 --- a/src/platform/ESP32/ESP32Utils.h +++ b/src/platform/ESP32/ESP32Utils.h @@ -29,7 +29,9 @@ namespace Internal { class ESP32Utils { public: +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP static CHIP_ERROR IsAPEnabled(bool & apEnabled); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP static CHIP_ERROR IsStationEnabled(bool & staEnabled); static bool IsStationProvisioned(void); static CHIP_ERROR IsStationConnected(bool & connected); diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index c96caeb03934ef..d2254692924cca 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -84,8 +84,9 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) wifi_init_config_t cfg; uint8_t ap_mac[6]; wifi_mode_t mode; - +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP esp_netif_create_default_wifi_ap(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP esp_netif_create_default_wifi_sta(); esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, PlatformManagerImpl::HandleESPSystemEvent, NULL); From 543ae309d7ddcb313a8e706a91f15c2fce35e104 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:22:23 -0400 Subject: [PATCH 109/115] address PR22049 post-merge commments (#22085) --- examples/chef/efr32/BUILD.gn | 2 +- examples/light-switch-app/efr32/BUILD.gn | 2 +- examples/lighting-app/efr32/BUILD.gn | 2 +- examples/lock-app/efr32/BUILD.gn | 2 +- examples/shell/shell_common/BUILD.gn | 2 +- examples/thermostat/efr32/BUILD.gn | 2 +- examples/window-app/efr32/BUILD.gn | 2 +- src/inet/BUILD.gn | 2 +- src/platform/EFR32/BUILD.gn | 2 +- src/test_driver/efr32/BUILD.gn | 2 +- third_party/openthread/BUILD.gn | 4 ++-- third_party/silabs/BUILD.gn | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/chef/efr32/BUILD.gn b/examples/chef/efr32/BUILD.gn index c567ae9d8f1cbf..e23b747fcad1dd 100644 --- a/examples/chef/efr32/BUILD.gn +++ b/examples/chef/efr32/BUILD.gn @@ -207,7 +207,7 @@ efr32_executable("chef_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index e2705abdedcb65..2d628f537f9f6e 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -200,7 +200,7 @@ efr32_executable("light_switch_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 060b9f67343aa0..fbd5a88a7909b9 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -205,7 +205,7 @@ efr32_executable("lighting_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index 2f8f2dc6bf67b4..e76b9cd48f1d1e 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -202,7 +202,7 @@ efr32_executable("lock_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index 0217eb057fdff4..d601f0b54764b8 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -53,8 +53,8 @@ static_library("shell_common") { if (chip_enable_openthread && (current_os == "freertos" || current_os == "zephyr")) { public_deps += [ + "${chip_root}/third_party/openthread:openthread", "${chip_root}/third_party/openthread:openthread_cli", - "${chip_root}/third_party/openthread:openthread_device", ] } diff --git a/examples/thermostat/efr32/BUILD.gn b/examples/thermostat/efr32/BUILD.gn index edb03073686e3e..7e4e923992ff70 100644 --- a/examples/thermostat/efr32/BUILD.gn +++ b/examples/thermostat/efr32/BUILD.gn @@ -196,7 +196,7 @@ efr32_executable("thermostat_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index c7a3f57e4b9ff8..a9aa7cf402911c 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -188,7 +188,7 @@ efr32_executable("window_app") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index a042007d02c5a3..cb86a45780df9c 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -107,7 +107,7 @@ static_library("inet") { } if (chip_system_config_use_open_thread_inet_endpoints) { - public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ] + public_deps += [ "${chip_root}/third_party/openthread:openthread" ] } if (chip_inet_config_enable_tcp_endpoint) { diff --git a/src/platform/EFR32/BUILD.gn b/src/platform/EFR32/BUILD.gn index eb73a6f80f85cf..1b5d6c45bbe3ba 100644 --- a/src/platform/EFR32/BUILD.gn +++ b/src/platform/EFR32/BUILD.gn @@ -98,7 +98,7 @@ static_library("EFR32") { "$dir_pw_kvs", ] if (chip_enable_openthread) { - public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ] + public_deps += [ "${chip_root}/third_party/openthread:openthread" ] deps += [ "${chip_root}/third_party/openthread:openthread_cli" ] diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 8ee3c4f3e59c69..1d6f87637a99db 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -96,7 +96,7 @@ efr32_executable("efr32_device_tests") { if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread:openthread", - "${chip_root}/third_party/openthread:openthread_device", + "${chip_root}/third_party/openthread:openthread-platform", "${examples_plat_dir}:efr-matter-shell", ] } diff --git a/third_party/openthread/BUILD.gn b/third_party/openthread/BUILD.gn index 9ee8e905551837..7a183e681867dc 100644 --- a/third_party/openthread/BUILD.gn +++ b/third_party/openthread/BUILD.gn @@ -8,7 +8,7 @@ declare_args() { chip_openthread_target = "" } -group("openthread") { +group("openthread-platform") { if (chip_openthread_target != "") { public_deps = [ chip_openthread_target ] } else { @@ -19,7 +19,7 @@ group("openthread") { } } -group("openthread_device") { +group("openthread") { if (chip_openthread_target != "") { public_deps = [ chip_openthread_target ] } else { diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index 1589f72e7865ae..7e885642cdd6f2 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -131,7 +131,7 @@ if (use_silabs_thread_lib) { ":libopenthread-platform", ":openthread_core_config_efr32", "${segger_rtt_root}:segger_rtt", - "${sl_openthread_root}/include/openthread:openthread", + "${sl_openthread_root}/include/openthread:openthread-platform", "${sl_openthread_root}/src/core/:libopenthread_core_headers", ] From 65d9ccf7461f8c45b4a07c4ca3e9c764dcc5793d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Tue, 23 Aug 2022 15:34:51 +0200 Subject: [PATCH 110/115] [nrfconnect] Fix Docker build due to conflicting PIP packages (#22072) nRF Connect Docker image build started to fail due to some conflicts in documentation dependencies. We don't need those dependencies in Matter CI, so get rid off them. Signed-off-by: Damian Krolik Signed-off-by: Damian Krolik --- integrations/docker/images/chip-build-nrf-platform/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/chip-build-nrf-platform/Dockerfile index f27f0813c748b3..280534cac6c9fe 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/chip-build-nrf-platform/Dockerfile @@ -61,7 +61,7 @@ RUN set -x \ && (apt-get remove -fy python3-yaml && apt-get autoremove || exit 0) \ && python3 -m pip install -U --no-cache-dir cmake==3.22.5 \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/zephyr/scripts/requirements.txt \ - && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/nrf/scripts/requirements.txt \ + && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/nrf/scripts/requirements-build.txt \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/bootloader/mcuboot/scripts/requirements.txt \ && : # last line diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 0791656d59351a..1cb8eca1c7f032 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.94 Version bump reason: Install ccache to the chip-build image +0.5.95 Version bump reason: Fix nrfconnect Docker build From ae16a8c75815c6b92c1c2788947a76a3127e3a56 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 23 Aug 2022 19:07:41 +0530 Subject: [PATCH 111/115] [ESP32] Fix namespace for unique id and added rotating device id (#22063) unique id key in chip-factory namespace Unique-id should be changed after every factory reset and to do that it should be stored in chip-config namespace. Earlier it was stored in chip-factory which is not erased on factory reset. --- .../tools/generate_esp32_chip_factory_bin.py | 12 +++++------ src/platform/ESP32/ESP32Config.cpp | 3 ++- src/platform/ESP32/ESP32Config.h | 21 +++++++++++-------- .../ESP32/ESP32FactoryDataProvider.cpp | 5 +++-- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/scripts/tools/generate_esp32_chip_factory_bin.py b/scripts/tools/generate_esp32_chip_factory_bin.py index d5f6ed380a91c6..64b6c293fd6510 100755 --- a/scripts/tools/generate_esp32_chip_factory_bin.py +++ b/scripts/tools/generate_esp32_chip_factory_bin.py @@ -140,7 +140,7 @@ 'encoding': 'string', 'value': None, }, - 'unique-id': { + 'rd-id-uid': { 'type': 'data', 'encoding': 'hex2bin', 'value': None, @@ -260,7 +260,7 @@ def validate_args(args): check_str_range(args.product_name, 1, 32, 'Product name') check_str_range(args.hw_ver_str, 1, 64, 'Hardware version string') check_str_range(args.mfg_date, 8, 16, 'Manufacturing date') - check_str_range(args.unique_id, 32, 32, 'Unique id') + check_str_range(args.rd_id_uid, 32, 32, 'Rotating device Unique id') logging.info('Discriminator:{} Passcode:{}'.format(args.discriminator, args.passcode)) @@ -295,8 +295,8 @@ def populate_factory_data(args, spake2p_params): if args.serial_num is not None: FACTORY_DATA['serial-num']['value'] = args.serial_num - if args.unique_id is not None: - FACTORY_DATA['unique-id']['value'] = args.unique_id + if args.rd_id_uid is not None: + FACTORY_DATA['rd-id-uid']['value'] = args.rd_id_uid if args.mfg_date is not None: FACTORY_DATA['mfg-date']['value'] = args.mfg_date if args.vendor_id is not None: @@ -460,8 +460,8 @@ def any_base_int(s): return int(s, 0) parser.add_argument('--hw-ver-str', type=str, required=False, help='Hardware version string') parser.add_argument('--mfg-date', type=str, required=False, help='Manufacturing date in format YYYY-MM-DD') parser.add_argument('--serial-num', type=str, required=False, help='Serial number') - parser.add_argument('--unique-id', type=str, required=False, - help='128-bit unique identifier, provide 32-byte hex string, e.g. "1234567890abcdef1234567890abcdef"') + parser.add_argument('--rd-id-uid', type=str, required=False, + help='128-bit unique identifier for generating rotating device identifier, provide 32-byte hex string, e.g. "1234567890abcdef1234567890abcdef"') # These will be used by DeviceInfoProvider parser.add_argument('--calendar-types', type=str, nargs='+', required=False, diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index 0feaa568886f29..537ec90375c754 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -72,9 +72,9 @@ const ESP32Config::Key ESP32Config::kConfigKey_VendorId = { kConfig const ESP32Config::Key ESP32Config::kConfigKey_VendorName = { kConfigNamespace_ChipFactory, "vendor-name" }; const ESP32Config::Key ESP32Config::kConfigKey_ProductId = { kConfigNamespace_ChipFactory, "product-id" }; const ESP32Config::Key ESP32Config::kConfigKey_ProductName = { kConfigNamespace_ChipFactory, "product-name" }; -const ESP32Config::Key ESP32Config::kConfigKey_UniqueId = { kConfigNamespace_ChipFactory, "unique-id" }; const ESP32Config::Key ESP32Config::kConfigKey_SupportedCalTypes = { kConfigNamespace_ChipFactory, "cal-types" }; const ESP32Config::Key ESP32Config::kConfigKey_SupportedLocaleSize = { kConfigNamespace_ChipFactory, "locale-sz" }; +const ESP32Config::Key ESP32Config::kConfigKey_RotatingDevIdUniqueId = { kConfigNamespace_ChipFactory, "rd-id-uid" }; // Keys stored in the chip-config namespace const ESP32Config::Key ESP32Config::kConfigKey_ServiceConfig = { kConfigNamespace_ChipConfig, "service-config" }; @@ -85,6 +85,7 @@ const ESP32Config::Key ESP32Config::kConfigKey_FailSafeArmed = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "reg-location" }; const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const ESP32Config::Key ESP32Config::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; // Keys stored in the Chip-counters namespace const ESP32Config::Key ESP32Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index 86138368352a7f..e038b664fb8a09 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -53,7 +53,6 @@ class ESP32Config // Key definitions for well-known keys. static const Key kConfigKey_SerialNum; - static const Key kConfigKey_UniqueId; static const Key kConfigKey_MfrDeviceId; static const Key kConfigKey_MfrDeviceCert; static const Key kConfigKey_MfrDeviceICACerts; @@ -62,15 +61,7 @@ class ESP32Config static const Key kConfigKey_HardwareVersionString; static const Key kConfigKey_ManufacturingDate; static const Key kConfigKey_SetupPinCode; - static const Key kConfigKey_ServiceConfig; - static const Key kConfigKey_PairedAccountId; - static const Key kConfigKey_ServiceId; - static const Key kConfigKey_LastUsedEpochKeyId; - static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; - static const Key kConfigKey_RegulatoryLocation; - static const Key kConfigKey_CountryCode; static const Key kConfigKey_Spake2pIterationCount; static const Key kConfigKey_Spake2pSalt; static const Key kConfigKey_Spake2pVerifier; @@ -85,6 +76,18 @@ class ESP32Config static const Key kConfigKey_ProductName; static const Key kConfigKey_SupportedCalTypes; static const Key kConfigKey_SupportedLocaleSize; + static const Key kConfigKey_RotatingDevIdUniqueId; + + // CHIP Config keys + static const Key kConfigKey_ServiceConfig; + static const Key kConfigKey_PairedAccountId; + static const Key kConfigKey_ServiceId; + static const Key kConfigKey_LastUsedEpochKeyId; + static const Key kConfigKey_FailSafeArmed; + static const Key kConfigKey_WiFiStationSecType; + static const Key kConfigKey_RegulatoryLocation; + static const Key kConfigKey_CountryCode; + static const Key kConfigKey_UniqueId; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/ESP32/ESP32FactoryDataProvider.cpp b/src/platform/ESP32/ESP32FactoryDataProvider.cpp index 443374b2c4421b..8239a96b159f48 100644 --- a/src/platform/ESP32/ESP32FactoryDataProvider.cpp +++ b/src/platform/ESP32/ESP32FactoryDataProvider.cpp @@ -198,12 +198,13 @@ CHIP_ERROR ESP32FactoryDataProvider::GetHardwareVersionString(char * buf, size_t CHIP_ERROR ESP32FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { ChipError err = CHIP_ERROR_WRONG_KEY_TYPE; -#if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) +#if CHIP_ENABLE_ROTATING_DEVICE_ID static_assert(ConfigurationManager::kRotatingDeviceIDUniqueIDLength >= ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength, "Length of unique ID for rotating device ID is smaller than minimum."); size_t uniqueIdLen = 0; - err = ESP32Config::ReadConfigValueBin(ESP32Config::kConfigKey_UniqueId, uniqueIdSpan.data(), uniqueIdSpan.size(), uniqueIdLen); + err = ESP32Config::ReadConfigValueBin(ESP32Config::kConfigKey_RotatingDevIdUniqueId, uniqueIdSpan.data(), uniqueIdSpan.size(), + uniqueIdLen); ReturnErrorOnFailure(err); uniqueIdSpan.reduce_size(uniqueIdLen); #endif From db3ce611a967ce9a93e3c6cf63519ef020f5c0ea Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 23 Aug 2022 19:10:03 +0530 Subject: [PATCH 112/115] [ESP32] Remove stale USE_ECHO_CLIENT and ECHO_HOST_IP kconfig options (#22097) --- .../all-clusters-app/esp32/main/Kconfig.projbuild | 7 ------- .../esp32/main/Kconfig.projbuild | 7 ------- examples/chef/esp32/main/Kconfig.projbuild | 7 ------- examples/lock-app/esp32/main/Kconfig.projbuild | 14 -------------- .../esp32/main/Kconfig.projbuild | 14 -------------- 5 files changed, 49 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index 22edca7a03b264..dbf11ecaab5a57 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -66,13 +66,6 @@ menu "Demo" bool "BLE / On-Network" endchoice - config ECHO_HOST_IP - string "IPV4 address" - default "127.0.0.1" - depends on USE_ECHO_CLIENT - help - The IPV4 Address of the ECHO Server. - # NOTE: This config is not displayed as a input in the Kconfig menu, as its value is # entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE # define that is produced is needed to configure the TFT library correctly. diff --git a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild index 22edca7a03b264..dbf11ecaab5a57 100644 --- a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild @@ -66,13 +66,6 @@ menu "Demo" bool "BLE / On-Network" endchoice - config ECHO_HOST_IP - string "IPV4 address" - default "127.0.0.1" - depends on USE_ECHO_CLIENT - help - The IPV4 Address of the ECHO Server. - # NOTE: This config is not displayed as a input in the Kconfig menu, as its value is # entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE # define that is produced is needed to configure the TFT library correctly. diff --git a/examples/chef/esp32/main/Kconfig.projbuild b/examples/chef/esp32/main/Kconfig.projbuild index 695222b7f43c45..a2b3ea3ce1c34c 100644 --- a/examples/chef/esp32/main/Kconfig.projbuild +++ b/examples/chef/esp32/main/Kconfig.projbuild @@ -68,13 +68,6 @@ menu "Demo" bool "BLE / On-Network" endchoice - config ECHO_HOST_IP - string "IPV4 address" - default "127.0.0.1" - depends on USE_ECHO_CLIENT - help - The IPV4 Address of the ECHO Server. - # NOTE: This config is not displayed as a input in the Kconfig menu, as its value is # entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE # define that is produced is needed to configure the TFT library correctly. diff --git a/examples/lock-app/esp32/main/Kconfig.projbuild b/examples/lock-app/esp32/main/Kconfig.projbuild index e2ec051d774fe1..4ec2e859c0b1f5 100644 --- a/examples/lock-app/esp32/main/Kconfig.projbuild +++ b/examples/lock-app/esp32/main/Kconfig.projbuild @@ -36,20 +36,6 @@ menu "Demo" bool "Ethernet" endchoice - config USE_ECHO_CLIENT - bool "Enable the built-in Echo Client" - default "n" - help - This enables a local FreeRTOS Echo Client so that the end-to-end echo server can be - tested easily - - config ECHO_HOST_IP - string "IPV4 address" - default "127.0.0.1" - depends on USE_ECHO_CLIENT - help - The IPV4 Address of the ECHO Server. - config RENDEZVOUS_MODE int range 0 8 diff --git a/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild b/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild index e2ec051d774fe1..4ec2e859c0b1f5 100644 --- a/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild +++ b/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild @@ -36,20 +36,6 @@ menu "Demo" bool "Ethernet" endchoice - config USE_ECHO_CLIENT - bool "Enable the built-in Echo Client" - default "n" - help - This enables a local FreeRTOS Echo Client so that the end-to-end echo server can be - tested easily - - config ECHO_HOST_IP - string "IPV4 address" - default "127.0.0.1" - depends on USE_ECHO_CLIENT - help - The IPV4 Address of the ECHO Server. - config RENDEZVOUS_MODE int range 0 8 From cfdb308152223458dfb28a4a606ef4c68c79245d Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Tue, 23 Aug 2022 06:41:28 -0700 Subject: [PATCH 113/115] TC_RR_1_1: Updated Method that Was Used to Generate Large Sized Operational Certificates (#22088) * TC_RR_1_1: Updated Method that Was Used to Generate Large Sized Operational Certificates. Instead of padding the subject DN this method adds size by adding Future Extension. This new approach doesen't have certain limitations compare to the previous approach and allows generation of larger certificates of approximate sizes: {RCAC, ICAC, NOC} ~ {400, 400, 350} bytes in TLV encoded form. * Update src/credentials/tests/TestChipCert.cpp Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Tennessee Carmel-Veilleux --- .../ExampleOperationalCredentialsIssuer.cpp | 39 ++++++++----------- src/credentials/CHIPCert.h | 7 ++++ src/credentials/GenerateChipX509Cert.cpp | 30 +++++++++++++- src/credentials/tests/TestChipCert.cpp | 36 +++++++++++++++++ src/tools/chip-cert/CertUtils.cpp | 4 +- src/tools/chip-cert/Cmd_GenCert.cpp | 26 ++++++------- src/tools/chip-cert/chip-cert.h | 12 +++--- 7 files changed, 109 insertions(+), 45 deletions(-) diff --git a/src/controller/ExampleOperationalCredentialsIssuer.cpp b/src/controller/ExampleOperationalCredentialsIssuer.cpp index 9c0b376b13716c..dc026dbbf88bfd 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.cpp +++ b/src/controller/ExampleOperationalCredentialsIssuer.cpp @@ -52,10 +52,11 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD const Crypto::P256PublicKey & subjectPublicKey, Crypto::P256Keypair & issuerKeypair, MutableByteSpan & outX509Cert) { - constexpr size_t kDERCertDnEncodingOverhead = 11; - constexpr size_t kTLVCertDnEncodingOverhead = 3; - constexpr size_t kMaxCertPaddingLength = 150; - constexpr size_t kTLVDesiredSize = kMaxCHIPCertLength - 50; + constexpr size_t kDERCertFutureExtEncodingOverhead = 12; + constexpr size_t kTLVCertFutureExtEncodingOverhead = kDERCertFutureExtEncodingOverhead + 5; + constexpr size_t kMaxCertPaddingLength = 200; + constexpr size_t kTLVDesiredSize = kMaxCHIPCertLength; + constexpr uint8_t sOID_Extension_SubjectAltName[] = { 0x55, 0x1d, 0x11 }; Platform::ScopedMemoryBuffer derBuf; ReturnErrorCodeIf(!derBuf.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); @@ -84,7 +85,7 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD return CHIP_ERROR_INVALID_ARGUMENT; } - if (maximizeSize && (desiredDn.RDNCount() < CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES)) + if (maximizeSize) { Platform::ScopedMemoryBuffer paddedTlvBuf; ReturnErrorCodeIf(!paddedTlvBuf.Alloc(kMaxCHIPCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); @@ -99,15 +100,8 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD ReturnErrorCodeIf(!fillerBuf.Alloc(kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); memset(fillerBuf.Get(), 'A', kMaxCertPaddingLength); - int derPaddingLen = static_cast(kMaxDERCertLength - kDERCertDnEncodingOverhead - derSpan.size()); - int tlvPaddingLen = static_cast(kTLVDesiredSize - kTLVCertDnEncodingOverhead - paddedTlvSpan.size()); - if (certType == CertType::kRcac) - { - // For RCAC the issuer/subject DN are the same so padding will be present in both - derPaddingLen = (derPaddingLen - static_cast(kDERCertDnEncodingOverhead)) / 2; - tlvPaddingLen = (tlvPaddingLen - static_cast(kTLVCertDnEncodingOverhead)) / 2; - } - + int derPaddingLen = static_cast(kMaxDERCertLength - kDERCertFutureExtEncodingOverhead - derSpan.size()); + int tlvPaddingLen = static_cast(kTLVDesiredSize - kTLVCertFutureExtEncodingOverhead - paddedTlvSpan.size()); size_t paddingLen = 0; if (derPaddingLen >= 1 && tlvPaddingLen >= 1) { @@ -119,24 +113,25 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD paddedDerSpan = MutableByteSpan{ paddedDerBuf.Get(), kMaxDERCertLength + kMaxCertPaddingLength }; paddedTlvSpan = MutableByteSpan{ paddedTlvBuf.Get(), kMaxCHIPCertLength + kMaxCertPaddingLength }; - ChipDN certDn = desiredDn; - // Fill the padding in the DomainNameQualifier DN - certDn.AddAttribute_DNQualifier(CharSpan(fillerBuf.Get(), paddingLen), false); + Optional futureExt; + FutureExtension ext = { ByteSpan(sOID_Extension_SubjectAltName), + ByteSpan(reinterpret_cast(fillerBuf.Get()), paddingLen) }; + futureExt.SetValue(ext); switch (certType) { case CertType::kRcac: { - X509CertRequestParams rcacRequest = { serialNumber, now, now + validity, certDn, certDn }; + X509CertRequestParams rcacRequest = { serialNumber, now, now + validity, desiredDn, desiredDn, futureExt }; ReturnErrorOnFailure(NewRootX509Cert(rcacRequest, issuerKeypair, paddedDerSpan)); break; } case CertType::kIcac: { - X509CertRequestParams icacRequest = { serialNumber, now, now + validity, certDn, issuerDn }; + X509CertRequestParams icacRequest = { serialNumber, now, now + validity, desiredDn, issuerDn, futureExt }; ReturnErrorOnFailure(NewICAX509Cert(icacRequest, subjectPublicKey, issuerKeypair, paddedDerSpan)); break; } case CertType::kNoc: { - X509CertRequestParams nocRequest = { serialNumber, now, now + validity, certDn, issuerDn }; + X509CertRequestParams nocRequest = { serialNumber, now, now + validity, desiredDn, issuerDn, futureExt }; ReturnErrorOnFailure(NewNodeOperationalX509Cert(nocRequest, subjectPublicKey, issuerKeypair, paddedDerSpan)); break; } @@ -146,10 +141,10 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD ReturnErrorOnFailure(ConvertX509CertToChipCert(paddedDerSpan, paddedTlvSpan)); - ChipLogProgress(Controller, "Generated maximized certificate with %u DER bytes, %u TLV bytes", - static_cast(paddedDerSpan.size()), static_cast(paddedTlvSpan.size())); if (paddedDerSpan.size() <= kMaxDERCertLength && paddedTlvSpan.size() <= kMaxCHIPCertLength) { + ChipLogProgress(Controller, "Generated maximized certificate with %u DER bytes, %u TLV bytes", + static_cast(paddedDerSpan.size()), static_cast(paddedTlvSpan.size())); return CopySpanToMutableSpan(paddedDerSpan, outX509Cert); } } diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index 2f3fb7f0d76253..d95671ee74c3a4 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -507,6 +507,12 @@ CHIP_ERROR ConvertChipCertToX509Cert(const ByteSpan chipCert, MutableByteSpan & */ CHIP_ERROR ValidateChipRCAC(const ByteSpan & rcac); +struct FutureExtension +{ + ByteSpan OID; + ByteSpan Extension; +}; + struct X509CertRequestParams { int64_t SerialNumber; @@ -514,6 +520,7 @@ struct X509CertRequestParams uint32_t ValidityEnd; ChipDN SubjectDN; ChipDN IssuerDN; + Optional FutureExt; }; /** diff --git a/src/credentials/GenerateChipX509Cert.cpp b/src/credentials/GenerateChipX509Cert.cpp index e1c6fe5002ce3b..b51c49e0174f22 100644 --- a/src/credentials/GenerateChipX509Cert.cpp +++ b/src/credentials/GenerateChipX509Cert.cpp @@ -230,7 +230,31 @@ CHIP_ERROR EncodeNOCSpecificExtensions(ASN1Writer & writer) return err; } -CHIP_ERROR EncodeExtensions(bool isCA, const Crypto::P256PublicKey & SKI, const Crypto::P256PublicKey & AKI, ASN1Writer & writer) +CHIP_ERROR EncodeFutureExtension(const Optional & futureExt, ASN1Writer & writer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(futureExt.HasValue(), CHIP_NO_ERROR); + + ASN1_START_SEQUENCE + { + ReturnErrorOnFailure(writer.PutObjectId(futureExt.Value().OID.data(), static_cast(futureExt.Value().OID.size()))); + + ASN1_START_OCTET_STRING_ENCAPSULATED + { + ReturnErrorOnFailure(writer.PutOctetString(futureExt.Value().Extension.data(), + static_cast(futureExt.Value().Extension.size()))); + } + ASN1_END_ENCAPSULATED; + } + ASN1_END_SEQUENCE; + +exit: + return err; +} + +CHIP_ERROR EncodeExtensions(bool isCA, const Crypto::P256PublicKey & SKI, const Crypto::P256PublicKey & AKI, + const Optional & futureExt, ASN1Writer & writer) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -250,6 +274,8 @@ CHIP_ERROR EncodeExtensions(bool isCA, const Crypto::P256PublicKey & SKI, const ReturnErrorOnFailure(EncodeSubjectKeyIdentifierExtension(SKI, writer)); ReturnErrorOnFailure(EncodeAuthorityKeyIdentifierExtension(AKI, writer)); + + ReturnErrorOnFailure(EncodeFutureExtension(futureExt, writer)); } ASN1_END_SEQUENCE; } @@ -336,7 +362,7 @@ CHIP_ERROR EncodeTBSCert(const X509CertRequestParams & requestParams, const Cryp ReturnErrorOnFailure(EncodeSubjectPublicKeyInfo(subjectPubkey, writer)); // certificate extensions - ReturnErrorOnFailure(EncodeExtensions(isCA, subjectPubkey, issuerPubkey, writer)); + ReturnErrorOnFailure(EncodeExtensions(isCA, subjectPubkey, issuerPubkey, requestParams.FutureExt, writer)); } ASN1_END_SEQUENCE; diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index 97c00d7ca555bd..c84b18db79024c 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -102,6 +102,14 @@ static const BitFlags sKCandCR(sKC, sCR); static const BitFlags sKCandEO(sKC, sEO); static const BitFlags sKCandDO(sKC, sDO); +constexpr uint8_t sOID_Extension_SubjectAltName[] = { 0x55, 0x1d, 0x11 }; +constexpr char kExtension_SubjectAltName[] = "test@example.com"; + +FutureExtension ext{ ByteSpan(sOID_Extension_SubjectAltName), + ByteSpan(reinterpret_cast(const_cast(kExtension_SubjectAltName)), + strlen(kExtension_SubjectAltName)) }; +Optional kSubjectAltNameAsFutureExt(ext); + static CHIP_ERROR LoadTestCertSet01(ChipCertificateSet & certSet) { CHIP_ERROR err; @@ -1247,6 +1255,15 @@ static void TestChipCert_GenerateRootCert(nlTestSuite * inSuite, void * inContex NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test with FutureExtension + X509CertRequestParams root_params2 = { 1234, 631161876, 729942000, root_dn, root_dn, kSubjectAltNameAsFutureExt }; + MutableByteSpan signed_cert_span2(signed_cert); + NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params2, keypair, signed_cert_span2) == CHIP_NO_ERROR); + outCert = MutableByteSpan(outCertBuf); + + NL_TEST_ASSERT(inSuite, ConvertX509CertToChipCert(signed_cert_span2, outCert) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test error case: root cert subject provided ICA OID Attribute. root_params.SubjectDN.Clear(); NL_TEST_ASSERT(inSuite, root_params.SubjectDN.AddAttribute_MatterICACId(0xabcdabcd) == CHIP_NO_ERROR); @@ -1325,6 +1342,15 @@ static void TestChipCert_GenerateICACert(nlTestSuite * inSuite, void * inContext NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test with FutureExtension + X509CertRequestParams ica_params2 = { 1234, 631161876, 729942000, ica_dn, issuer_dn, kSubjectAltNameAsFutureExt }; + MutableByteSpan signed_cert_span2(signed_cert); + NL_TEST_ASSERT(inSuite, NewICAX509Cert(ica_params2, ica_keypair.Pubkey(), keypair, signed_cert_span2) == CHIP_NO_ERROR); + outCert = MutableByteSpan(outCertBuf); + + NL_TEST_ASSERT(inSuite, ConvertX509CertToChipCert(signed_cert_span2, outCert) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test error case: ICA cert subject provided a node ID attribute ica_params.SubjectDN.Clear(); NL_TEST_ASSERT(inSuite, ica_params.SubjectDN.AddAttribute_MatterNodeId(0xABCDABCDABCDABCD) == CHIP_NO_ERROR); @@ -1372,6 +1398,16 @@ static void TestChipCert_GenerateNOCRoot(nlTestSuite * inSuite, void * inContext NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test with FutureExtension + X509CertRequestParams noc_params2 = { 123456, 631161876, 729942000, noc_dn, issuer_dn, kSubjectAltNameAsFutureExt }; + MutableByteSpan signed_cert_span2(signed_cert); + NL_TEST_ASSERT(inSuite, + NewNodeOperationalX509Cert(noc_params2, noc_keypair.Pubkey(), keypair, signed_cert_span2) == CHIP_NO_ERROR); + outCert = MutableByteSpan(outCertBuf); + + NL_TEST_ASSERT(inSuite, ConvertX509CertToChipCert(signed_cert_span2, outCert) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, DecodeChipCert(outCert, certData) == CHIP_NO_ERROR); + // Test error case: NOC cert subject doesn't have NodeId attribute noc_params.SubjectDN.Clear(); NL_TEST_ASSERT(inSuite, noc_params.SubjectDN.AddAttribute_MatterFabricId(0xFAB00000FAB00001) == CHIP_NO_ERROR); diff --git a/src/tools/chip-cert/CertUtils.cpp b/src/tools/chip-cert/CertUtils.cpp index f929e1446317e2..0c22503628bc31 100644 --- a/src/tools/chip-cert/CertUtils.cpp +++ b/src/tools/chip-cert/CertUtils.cpp @@ -772,7 +772,7 @@ bool WriteChipCert(const char * fileName, const ByteSpan & chipCert, CertFormat } bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, - uint32_t validDays, int pathLen, const FutureExtension * futureExts, uint8_t futureExtsCount, X509 * newCert, + uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig) { bool res = true; @@ -925,7 +925,7 @@ bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP } CHIP_ERROR MakeCertChipTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, - const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtension * futureExts, + const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, X509 * x509Cert, EVP_PKEY * newKey, CertStructConfig & certConfig, MutableByteSpan & chipCert) { diff --git a/src/tools/chip-cert/Cmd_GenCert.cpp b/src/tools/chip-cert/Cmd_GenCert.cpp index e944bdb07733c9..6a0a1c6784335d 100644 --- a/src/tools/chip-cert/Cmd_GenCert.cpp +++ b/src/tools/chip-cert/Cmd_GenCert.cpp @@ -243,19 +243,19 @@ OptionSet *gCmdOptionSets[] = // clang-format on ToolChipDN gSubjectDN; -uint8_t gCertType = kCertType_NotSpecified; -int gPathLengthConstraint = kPathLength_NotSpecified; -bool gSelfSign = false; -const char * gCACertFileName = nullptr; -const char * gCAKeyFileName = nullptr; -const char * gInKeyFileName = nullptr; -const char * gOutCertFileName = nullptr; -const char * gOutKeyFileName = nullptr; -CertFormat gOutCertFormat = kCertFormat_Default; -KeyFormat gOutKeyFormat = kKeyFormat_Default; -uint32_t gValidDays = kCertValidDays_Undefined; -FutureExtension gFutureExtensions[3] = { { 0, nullptr } }; -uint8_t gFutureExtensionsCount = 0; +uint8_t gCertType = kCertType_NotSpecified; +int gPathLengthConstraint = kPathLength_NotSpecified; +bool gSelfSign = false; +const char * gCACertFileName = nullptr; +const char * gCAKeyFileName = nullptr; +const char * gInKeyFileName = nullptr; +const char * gOutCertFileName = nullptr; +const char * gOutKeyFileName = nullptr; +CertFormat gOutCertFormat = kCertFormat_Default; +KeyFormat gOutKeyFormat = kKeyFormat_Default; +uint32_t gValidDays = kCertValidDays_Undefined; +FutureExtensionWithNID gFutureExtensions[3] = { { 0, nullptr } }; +uint8_t gFutureExtensionsCount = 0; struct tm gValidFrom; CertStructConfig gCertConfig; diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index 6bdd41855c3a01..39e32fbe580c8b 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -141,7 +141,7 @@ enum AttCertType kAttCertType_DAC, /**< Device Attestation Certificate (DAC). */ }; -struct FutureExtension +struct FutureExtensionWithNID { int nid; const char * info; @@ -410,12 +410,12 @@ extern bool WriteCert(const char * fileName, X509 * cert, CertFormat certFmt); extern bool WriteChipCert(const char * fileName, const chip::ByteSpan & cert, CertFormat certFmt); extern bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, - uint32_t validDays, int pathLen, const FutureExtension * futureExts, uint8_t futureExtsCount, X509 * newCert, - EVP_PKEY * newKey, CertStructConfig & certConfig); + uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, + X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig); extern CHIP_ERROR MakeCertChipTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, - const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtension * futureExts, - uint8_t futureExtsCount, X509 * x509Cert, EVP_PKEY * newKey, CertStructConfig & certConfig, - chip::MutableByteSpan & chipCert); + const struct tm & validFrom, uint32_t validDays, int pathLen, + const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, X509 * x509Cert, + EVP_PKEY * newKey, CertStructConfig & certConfig, chip::MutableByteSpan & chipCert); extern bool ResignCert(X509 * cert, X509 * caCert, EVP_PKEY * caKey); extern bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subjectVID, uint16_t subjectPID, From 4ab1882b52a66a99b66126034581ae716e3e668f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 23 Aug 2022 10:24:52 -0400 Subject: [PATCH 114/115] Add libnl-dev to chip-build Dockerfile (#22047) --- integrations/docker/images/chip-build/Dockerfile | 4 +++- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build/Dockerfile b/integrations/docker/images/chip-build/Dockerfile index bfcfea5e40e755..861f5ecb2df4e7 100644 --- a/integrations/docker/images/chip-build/Dockerfile +++ b/integrations/docker/images/chip-build/Dockerfile @@ -28,14 +28,16 @@ RUN set -x \ libcairo2-dev \ libdbus-1-dev \ libdbus-glib-1-dev \ + libdmalloc-dev \ libgif-dev \ libglib2.0-dev \ libical-dev \ libjpeg-dev \ - libdmalloc-dev \ libmbedtls-dev \ libncurses5-dev \ libncursesw5-dev \ + libnl-3-dev \ + libnl-route-3-dev \ libnspr4-dev \ libpango1.0-dev \ libpixman-1-dev \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 1cb8eca1c7f032..b22b98316c9f22 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.95 Version bump reason: Fix nrfconnect Docker build +0.5.96 Version bump reason: add libnl-dev libs to chip-build image From 0f9615d56605ab97e32c53d5cafd8a537666318b Mon Sep 17 00:00:00 2001 From: Seth Rickard Date: Tue, 23 Aug 2022 10:22:32 -0500 Subject: [PATCH 115/115] Update KVS to handle zero length elements (#21977) * allow for nullptr in KVS write * complete audit with chip_support_enable_storage_api_audit=true --- .../cc13x2_26x2/CC13X2_26X2Config.cpp | 83 +++++++++++-------- .../cc13x2_26x2/KeyValueStoreManagerImpl.cpp | 7 +- .../cc32xx/KeyValueStoreManagerImpl.cpp | 7 +- 3 files changed, 57 insertions(+), 40 deletions(-) diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index 09e3393e07b1b1..8d25d6673f5ea1 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -165,7 +166,7 @@ CHIP_ERROR CC13X2_26X2Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t /* Iterate through the key range to find a key that matches. */ static uint8_t FindKVSSubID(const char * key, uint16_t & subID) { - char key_scratch[32]; // 32 characters seems large enough for a key + char key_scratch[PersistentStorageDelegate::kKeyLengthMax + 1]; NVINTF_nvProxy_t nvProxy = { 0 }; uint8_t status = NVINTF_SUCCESS; @@ -209,20 +210,23 @@ CHIP_ERROR CC13X2_26X2Config::ReadKVS(const char * key, void * value, size_t val val_item.subID = subID; len = sNvoctpFps.getItemLen(val_item); - VerifyOrExit(len > 0, err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // key not found - if ((offset_bytes + value_size) > len) + if (value_size >= (len - offset_bytes)) { - // trying to read up to the end of the element + // reading to end of element read_len = len - offset_bytes; } else { read_len = value_size; + err = CHIP_ERROR_BUFFER_TOO_SMALL; } - VerifyOrExit(sNvoctpFps.readItem(val_item, (uint16_t) offset_bytes, read_len, value) == NVINTF_SUCCESS, - err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + if (read_len > 0) + { + VerifyOrExit(sNvoctpFps.readItem(val_item, (uint16_t) offset_bytes, read_len, value) == NVINTF_SUCCESS, + err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + } if (read_bytes_size) { @@ -264,22 +268,14 @@ CHIP_ERROR CC13X2_26X2Config::WriteKVS(const char * key, const void * value, siz CHIP_ERROR err = CHIP_NO_ERROR; uint16_t subID; - if (FindKVSSubID(key, subID) == NVINTF_SUCCESS) - { - NVINTF_itemID_t val_item = CC13X2_26X2Config::kConfigKey_KVS_value.nvID; - // key already exists, update value - val_item.subID = subID; - VerifyOrExit(sNvoctpFps.updateItem(val_item, (uint16_t) value_size, (void *) value) == NVINTF_SUCCESS, - err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - } - else + NVINTF_itemID_t key_item = CC13X2_26X2Config::kConfigKey_KVS_key.nvID; + NVINTF_itemID_t val_item = CC13X2_26X2Config::kConfigKey_KVS_value.nvID; + + if (FindKVSSubID(key, subID) != NVINTF_SUCCESS) { - // key does not exist, likely case + // key item not found, find an empty subID intptr_t lock_key = sNvoctpFps.lockNV(); - NVINTF_itemID_t key_item = CC13X2_26X2Config::kConfigKey_KVS_key.nvID; - NVINTF_itemID_t val_item = CC13X2_26X2Config::kConfigKey_KVS_value.nvID; - /* Iterate through the subID range to find an unused subID in the * keyspace. SubID is a 10 bit value, reference * `/source/ti/common/nv/nvocmp.c:MVOCMP_MAXSUBID`. @@ -289,26 +285,39 @@ CHIP_ERROR CC13X2_26X2Config::WriteKVS(const char * key, const void * value, siz key_item.subID = i; if (sNvoctpFps.getItemLen(key_item) == 0U) { - val_item.subID = i; + subID = i; break; } } + sNvoctpFps.unlockNV(lock_key); + // write they key item - if (sNvoctpFps.writeItem(key_item, (uint16_t) strlen(key), (void *) key) == NVINTF_SUCCESS) + VerifyOrExit(sNvoctpFps.writeItem(key_item, (uint16_t) strlen(key), (void *) key) == NVINTF_SUCCESS, + err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + } + + key_item.subID = subID; + val_item.subID = subID; + + if (value_size == 0U) + { + // delete the value item if it exists + int8_t ret = sNvoctpFps.deleteItem(val_item); + if (ret != NVINTF_SUCCESS && ret != NVINTF_NOTFOUND) { - if (sNvoctpFps.writeItem(val_item, (uint16_t) value_size, (void *) value) != NVINTF_SUCCESS) - { - // try to delete the key item - sNvoctpFps.deleteItem(key_item); - err = CHIP_ERROR_PERSISTED_STORAGE_FAILED; - } + err = CHIP_ERROR_PERSISTED_STORAGE_FAILED; } - else + } + else + { + if (sNvoctpFps.writeItem(val_item, (uint16_t) value_size, (void *) value) != NVINTF_SUCCESS) { + // try to delete the key item + sNvoctpFps.deleteItem(key_item); err = CHIP_ERROR_PERSISTED_STORAGE_FAILED; } - sNvoctpFps.unlockNV(lock_key); } + exit: return err; } @@ -325,25 +334,31 @@ CHIP_ERROR CC13X2_26X2Config::WriteConfigValueBin(Key key, const uint8_t * data, CHIP_ERROR CC13X2_26X2Config::ClearKVS(const char * key) { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; uint16_t subID; NVINTF_itemID_t key_item = CC13X2_26X2Config::kConfigKey_KVS_key.nvID; NVINTF_itemID_t val_item = CC13X2_26X2Config::kConfigKey_KVS_value.nvID; if (FindKVSSubID(key, subID) == NVINTF_SUCCESS) { + int8_t ret; + key_item.subID = subID; val_item.subID = subID; - // delete the value item - if (sNvoctpFps.deleteItem(val_item) != NVINTF_SUCCESS) + // delete the value item if it exists + ret = sNvoctpFps.deleteItem(val_item); + if (ret != NVINTF_SUCCESS && ret != NVINTF_NOTFOUND) { err = CHIP_ERROR_PERSISTED_STORAGE_FAILED; } - // delete the key item - if (sNvoctpFps.deleteItem(key_item) != NVINTF_SUCCESS) + // delete the key item if it exists + ret = sNvoctpFps.deleteItem(key_item); + if (ret != NVINTF_SUCCESS && ret != NVINTF_NOTFOUND) { err = CHIP_ERROR_PERSISTED_STORAGE_FAILED; } + + err = CHIP_NO_ERROR; } return err; diff --git a/src/platform/cc13x2_26x2/KeyValueStoreManagerImpl.cpp b/src/platform/cc13x2_26x2/KeyValueStoreManagerImpl.cpp index b74146c1de3704..5227b55e5e65df 100644 --- a/src/platform/cc13x2_26x2/KeyValueStoreManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/KeyValueStoreManagerImpl.cpp @@ -44,7 +44,10 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t CHIP_ERROR err; VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); + if (0U != value_size) + { + VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); + } err = CC13X2_26X2Config::ReadKVS(key, value, value_size, read_bytes_size, offset_bytes); @@ -58,8 +61,6 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value_size > 0, CHIP_ERROR_INVALID_ARGUMENT); return CC13X2_26X2Config::WriteKVS(key, value, value_size); } diff --git a/src/platform/cc32xx/KeyValueStoreManagerImpl.cpp b/src/platform/cc32xx/KeyValueStoreManagerImpl.cpp index 13c1a023443594..ea0f2e546ce6c4 100644 --- a/src/platform/cc32xx/KeyValueStoreManagerImpl.cpp +++ b/src/platform/cc32xx/KeyValueStoreManagerImpl.cpp @@ -42,7 +42,10 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t size_t offset_bytes) const { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); + if (0U != value_size) + { + VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); + } return CC32XXConfig::ReadKVS(key, value, value_size, read_bytes_size, offset_bytes); } @@ -50,8 +53,6 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) { VerifyOrReturnError(key, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(value_size > 0, CHIP_ERROR_INVALID_ARGUMENT); return CC32XXConfig::WriteKVS(key, value, value_size); }