Skip to content

Commit 11c9a86

Browse files
authored
Merge branch 'master' into add_chef_rootnode_fan
2 parents adfc39a + 7a06f13 commit 11c9a86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1057
-512
lines changed

examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.mm

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#import <Matter/Matter.h>
44

5+
#define LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE 0
6+
57
NSString * const kCHIPToolDefaultsDomain = @"com.apple.chiptool";
68

79
id MTRGetDomainValueForKey(NSString * domain, NSString * key)
@@ -39,9 +41,13 @@ BOOL CHIPClearAllDomain(NSString * domain)
3941
{
4042

4143
NSArray * allKeys = CHIPGetDomainKeyList(domain);
44+
#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE
4245
NSLog(@"Removing keys: %@ %@", allKeys, domain);
46+
#endif
4347
for (id key in allKeys) {
48+
#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE
4449
NSLog(@"Removing key: %@", key);
50+
#endif
4551
if (!MTRRemoveDomainValueForKey(domain, (NSString *) key)) {
4652
return NO;
4753
}
@@ -61,7 +67,9 @@ - (BOOL)deleteAllStorage
6167
- (nullable NSData *)storageDataForKey:(NSString *)key
6268
{
6369
NSData * value = MTRGetDomainValueForKey(kCHIPToolDefaultsDomain, key);
70+
#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE
6471
NSLog(@"CHIPPersistentStorageDelegate Get Value for Key: %@, value %@", key, value);
72+
#endif
6573
return value;
6674
}
6775

examples/darwin-framework-tool/commands/common/MTRError.mm

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#import <lib/support/TypeTraits.h>
2727

2828
// Stolen for now from the framework, need to export this properly.
29-
@interface MTRErrorHolder : NSObject
29+
@interface DFTErrorHolder : NSObject
3030
@property (nonatomic, readonly) CHIP_ERROR error;
3131
@end
3232

33-
@implementation MTRErrorHolder
33+
@implementation DFTErrorHolder
3434

3535
- (instancetype)initWithError:(CHIP_ERROR)error
3636
{
@@ -64,8 +64,8 @@ CHIP_ERROR MTRErrorToCHIPErrorCode(NSError * error)
6464

6565
if (error.userInfo != nil) {
6666
id underlyingError = error.userInfo[@"underlyingError"];
67-
if (underlyingError != nil && [underlyingError isKindOfClass:[MTRErrorHolder class]]) {
68-
return ((MTRErrorHolder *) underlyingError).error;
67+
if (underlyingError != nil && [underlyingError isKindOfClass:[DFTErrorHolder class]]) {
68+
return ((DFTErrorHolder *) underlyingError).error;
6969
}
7070
}
7171

examples/lighting-app/qpg/include/CHIPProjectConfig.h

-10
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,6 @@
117117
*/
118118
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
119119

120-
/**
121-
* @def CHIP_CONFIG_MAX_FABRICS
122-
*
123-
* @brief
124-
* Maximum number of fabrics the device can participate in. Each fabric can
125-
* provision the device with its unique operational credentials and manage
126-
* its own access control lists.
127-
*/
128-
#define CHIP_CONFIG_MAX_FABRICS 4 // 3 fabrics + 1 for rotation slack
129-
130120
/**
131121
* @name Interaction Model object pool configuration.
132122
*

examples/lock-app/qpg/include/CHIPProjectConfig.h

-10
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@
106106
*/
107107
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
108108

109-
/**
110-
* @def CHIP_CONFIG_MAX_FABRICS
111-
*
112-
* @brief
113-
* Maximum number of fabrics the device can participate in. Each fabric can
114-
* provision the device with its unique operational credentials and manage
115-
* its own access control lists.
116-
*/
117-
#define CHIP_CONFIG_MAX_FABRICS 4 // 3 fabrics + 1 for rotation slack
118-
119109
/**
120110
* @name Interaction Model object pool configuration.
121111
*

examples/lock-app/qpg/src/AppTask.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -542,12 +542,14 @@ void AppTask::DispatchEvent(AppEvent * aEvent)
542542
*/
543543
void AppTask::UpdateClusterState(void)
544544
{
545+
using namespace chip::app::Clusters;
546+
auto newValue = BoltLockMgr().IsUnlocked() ? DoorLock::DlLockState::kUnlocked : DoorLock::DlLockState::kLocked;
547+
545548
ChipLogProgress(NotSpecified, "UpdateClusterState");
546549

547-
// write the new on/off value
548-
EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LOCK_ENDPOINT_ID, !BoltLockMgr().IsUnlocked());
550+
EmberAfStatus status = DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, newValue);
549551
if (status != EMBER_ZCL_STATUS_SUCCESS)
550552
{
551-
ChipLogError(NotSpecified, "ERR: updating on/off %x", status);
553+
ChipLogError(NotSpecified, "ERR: updating DoorLock %x", status);
552554
}
553555
}

examples/lock-app/qpg/src/ZclCallbacks.cpp

+16-10
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
4545
default:
4646
break;
4747
}
48-
49-
if (path.mAttributeId != OnOff::Attributes::OnOff::Id)
50-
{
51-
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(path.mAttributeId));
52-
return;
53-
}
54-
55-
BoltLockMgr().InitiateAction(0, *value ? BoltLockManager::LOCK_ACTION : BoltLockManager::UNLOCK_ACTION);
5648
}
5749

5850
bool emberAfPluginDoorLockGetUser(EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user)
@@ -83,13 +75,27 @@ bool emberAfPluginDoorLockSetCredential(EndpointId endpointId, uint16_t credenti
8375

8476
bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional<ByteSpan> & pinCode, DlOperationError & err)
8577
{
86-
return BoltLockMgr().ValidatePIN(pinCode, err);
78+
bool returnValue = false;
79+
80+
if (BoltLockMgr().ValidatePIN(pinCode, err))
81+
{
82+
returnValue = BoltLockMgr().InitiateAction(0, BoltLockManager::LOCK_ACTION);
83+
}
84+
85+
return returnValue;
8786
}
8887

8988
bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional<ByteSpan> & pinCode,
9089
DlOperationError & err)
9190
{
92-
return BoltLockMgr().ValidatePIN(pinCode, err);
91+
bool returnValue = false;
92+
93+
if (BoltLockMgr().ValidatePIN(pinCode, err))
94+
{
95+
returnValue = BoltLockMgr().InitiateAction(0, BoltLockManager::UNLOCK_ACTION);
96+
}
97+
98+
return returnValue;
9399
}
94100

95101
void emberAfDoorLockClusterInitCallback(EndpointId endpoint)

examples/persistent-storage/qpg/include/CHIPProjectConfig.h

-10
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@
111111
*/
112112
#define CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI 1
113113

114-
/**
115-
* @def CHIP_CONFIG_MAX_FABRICS
116-
*
117-
* @brief
118-
* Maximum number of fabrics the device can participate in. Each fabric can
119-
* provision the device with its unique operational credentials and manage
120-
* its own access control lists.
121-
*/
122-
#define CHIP_CONFIG_MAX_FABRICS 4 // 3 fabrics + 1 for rotation slack
123-
124114
/**
125115
* @name Interaction Model object pool configuration.
126116
*

examples/shell/qpg/include/CHIPProjectConfig.h

100755100644
+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
* provision the device with its unique operational credentials and manage
126126
* its own access control lists.
127127
*/
128-
#define CHIP_CONFIG_MAX_FABRICS 4 // 3 fabrics + 1 for rotation slack
128+
// !Note - 3 is not spec compliant, only to accomodate shell test app RAM use
129+
#define CHIP_CONFIG_MAX_FABRICS 3
129130

130131
/**
131132
* @name Interaction Model object pool configuration.

src/app/tests/suites/certification/PICS.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,9 @@ PICS:
807807
- label: "Does the device implement the ACCapacityFormat attribute?"
808808
id: TSTAT.S.A0047
809809

810+
- label: "Is the MinSetpointDeadBand attribute writeable?"
811+
id: TSTAT.S.M.MinSetpointDeadBandWritable
812+
810813
#Thermostat commands
811814
- label: "Does the device implement the SetpointRaiseLower command?"
812815
id: TSTAT.S.C00.Rsp

src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ config:
2121
nodeId: 0x12344321
2222
cluster: "Audio Output"
2323
endpoint: 1
24+
Index:
25+
type: int8u
26+
defaultValue: 1
2427

2528
tests:
2629
- label: "Wait for the commissioned device to be retrieved"
@@ -45,11 +48,11 @@ tests:
4548
arguments:
4649
values:
4750
- name: "Index"
48-
value: 1
51+
value: Index
4952

5053
- label: "Reads the CurrentOutput attribute"
5154
PICS: AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C00.Rsp
5255
command: "readAttribute"
5356
attribute: "CurrentOutput"
5457
response:
55-
value: 1
58+
value: Index

src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ config:
2121
nodeId: 0x12344321
2222
cluster: "Audio Output"
2323
endpoint: 1
24+
Index:
25+
type: int8u
26+
defaultValue: 1
2427

2528
tests:
2629
- label: "Wait for the commissioned device to be retrieved"
@@ -46,7 +49,7 @@ tests:
4649
arguments:
4750
values:
4851
- name: "Index"
49-
value: 1
52+
value: Index
5053
- name: "name"
5154
value: "CertTest"
5255

src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml

+1-13
Original file line numberDiff line numberDiff line change
@@ -648,26 +648,14 @@ tests:
648648
response:
649649
value: UniqueIDValue
650650

651+
#This step implicitly validating the attribute(CapabilityMinima)constraints, as long as the payload is being parsed successfully
651652
- label: "TH reads CapabilityMinima attribute from the DUT."
652653
PICS: BINFO.S.A0013
653654
command: "readAttribute"
654655
attribute: "CapabilityMinima"
655656
response:
656657
saveAs: CapabilityMinimaValue
657658

658-
- label:
659-
"Step 56 is implicitly validating the attribute(CapabilityMinima)
660-
constraints, as long as the payload is being parsed successfully"
661-
cluster: "LogCommands"
662-
command: "UserPrompt"
663-
PICS: PICS_USER_PROMPT && BINFO.S.A0013
664-
arguments:
665-
values:
666-
- name: "message"
667-
value: "Please enter 'y' for success"
668-
- name: "expectedValue"
669-
value: "y"
670-
671659
- label: "TH writes CapabilityMinima from the DUT."
672660
PICS: BINFO.S.A0013
673661
command: "writeAttribute"

src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ tests:
217217
value: "SPAKE2P Key Salt"
218218
response:
219219
error: FAILURE
220+
clusterError: 2
220221

221222
- label: "TH_CR1 reads the list of Fabrics on DUT_CE"
222223
cluster: "Operational Credentials"
@@ -297,6 +298,7 @@ tests:
297298
value: discriminator
298299
response:
299300
error: FAILURE
301+
clusterError: 2
300302

301303
- label:
302304
"Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was
@@ -353,3 +355,4 @@ tests:
353355
value: discriminator
354356
response:
355357
error: FAILURE
358+
clusterError: 2

src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ tests:
294294
value: "SPAKE2P Key Salt"
295295
response:
296296
error: FAILURE
297+
clusterError: 2
297298

298299
- label: "TH_CR1 reads the list of Fabrics on DUT_CE"
299300
identity: "alpha"
@@ -395,6 +396,7 @@ tests:
395396
value: "SPAKE2P Key Salt"
396397
response:
397398
error: FAILURE
399+
clusterError: 2
398400

399401
- label: "TH_CR1 reads the list of Fabrics on DUT_CE"
400402
identity: "alpha"
@@ -460,6 +462,7 @@ tests:
460462
value: "SPAKE2P Key Salt"
461463
response:
462464
error: FAILURE
465+
clusterError: 2
463466

464467
- label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds"
465468
cluster: "DelayCommands"

src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,36 @@ tests:
228228
constraints:
229229
type: list
230230

231+
#Check for DNS-SD advertisement is not possible in YAML
232+
- label:
233+
"Verify DUT_CE is now discoverable over DNS-SD with 2 Operational
234+
service records (_matter._tcp SRV records)."
235+
verification: |
236+
Execute the below command in any linux platform or in TH_CR1
237+
grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp
238+
+ wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local
239+
+ wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local
240+
= wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local
241+
hostname = [E45F010F27530000.local]
242+
address = [fe80::e65f:1ff:fe0f:2753]
243+
port = [5540]
244+
txt = ["T=1" "SAI=300" "SII=5000"]
245+
= wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local
246+
hostname = [E45F010F27530000.local]
247+
address = [fe80::e65f:1ff:fe0f:2753]
248+
port = [5540]
249+
txt = ["T=1" "SAI=300" "SII=5000"]
250+
grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$
251+
cluster: "LogCommands"
252+
command: "UserPrompt"
253+
PICS: PICS_SKIP_SAMPLE_APP
254+
arguments:
255+
values:
256+
- name: "message"
257+
value: "enter 'y' after success"
258+
- name: "expectedValue"
259+
value: "y"
260+
231261
- label: "TH_CR1 opens a commissioning window on DUT_CE using ECM"
232262
identity: "alpha"
233263
PICS: CADMIN.S.C00.Rsp

src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml

+35-1
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,46 @@ tests:
148148
- name: "nodeId"
149149
value: nodeId2
150150

151+
#Check for DNS-SD advertisement is not possible in YAML
152+
- label:
153+
"Verify DUT_CE is now discoverable over DNS-SD with two SRV Records"
154+
verification: |
155+
On TH_CR2 send the below command
156+
157+
Verify if the DUT_CE is broadcasting using
158+
159+
ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp
160+
+ eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local
161+
+ eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local
162+
= eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local
163+
hostname = [E45F010F27530000.local]
164+
address = [fe80::e65f:1ff:fe0f:2753]
165+
port = [5540]
166+
txt = ["T=1" "SAI=300" "SII=5000"]
167+
= eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local
168+
hostname = [E45F010F27530000.local]
169+
address = [fe80::e65f:1ff:fe0f:2753]
170+
port = [5540]
171+
txt = ["T=1" "SAI=300" "SII=5000"]
172+
ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$
173+
cluster: "LogCommands"
174+
command: "UserPrompt"
175+
PICS: PICS_SKIP_SAMPLE_APP
176+
arguments:
177+
values:
178+
- name: "message"
179+
value: "enter 'y' after success"
180+
- name: "expectedValue"
181+
value: "y"
182+
151183
- label: "TH_CR1 reads the list of Fabrics on DUT_CE"
152184
command: "readAttribute"
153185
cluster: "Operational Credentials"
154186
attribute: "Fabrics"
155187
PICS: OPCREDS.S.A0001
188+
fabricFiltered: false
156189
response:
157-
value: [{ Label: "", nodeId: nodeId }]
190+
value: [{ Label: "", nodeId: nodeId }, { Label: "", nodeId: nodeId2 }]
158191
constraints:
159192
type: list
160193

@@ -287,3 +320,4 @@ tests:
287320
value: payload
288321
response:
289322
error: FAILURE
323+
clusterError: 9

0 commit comments

Comments
 (0)