Skip to content

Commit 17940c7

Browse files
authored
Merge 1.4 (#44)
2 parents a0845c8 + 0b2a891 commit 17940c7

File tree

137 files changed

+11279
-846
lines changed

Some content is hidden

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

137 files changed

+11279
-846
lines changed

config/esp32/components/chip/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ endif()
143143

144144
if(CONFIG_ENABLE_ICD_SERVER)
145145
chip_gn_arg_append("chip_enable_icd_server" "true")
146-
if(CONFIG_ICD_ENFORCE_SIT_SLOW_POLL_LIMIT)
147-
chip_gn_arg_append("icd_enforce_sit_slow_poll_limit" "true")
148-
endif()
149146
if(CONFIG_ICD_REPORT_ON_ACTIVE_MODE)
150147
chip_gn_arg_append("chip_icd_report_on_active_mode" "true")
151148
endif()

config/esp32/components/chip/Kconfig

+1-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ menu "CHIP Core"
3232
default 8
3333
help
3434
The maximum number of simultaneously active CHIP exchange contexts.
35-
35+
3636
An exchange context object is used to track the state of an ongoing CHIP message
3737
exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or
3838
another device.
@@ -410,13 +410,6 @@ menu "CHIP Device Layer"
410410
help
411411
Enables or Disables ICD server
412412

413-
config ICD_ENFORCE_SIT_SLOW_POLL_LIMIT
414-
bool "Enforce SIT Slow Polling Max value to 15 seconds"
415-
depends on ENABLE_ICD_SERVER
416-
default n
417-
help
418-
Set to true to enforce SIT Slow Polling Max value to 15seconds
419-
420413
config ICD_REPORT_ON_ACTIVE_MODE
421414
bool "Emit a report on entering active mode"
422415
depends on ENABLE_ICD_SERVER

config/nrfconnect/chip-module/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
156156
matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT)
157157
matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT)
158158
matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT)
159-
matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE)
160159
endif()
161160

162161
if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND)

docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ Trigger Support, set the following parameter to true:
2424
chip_enable_icd_lit = true
2525
```
2626

27-
TI examples have only been tested with the ICD Server configuration. To enable
28-
the client configuration, set `chip_enable_icd_client` to true.
29-
3027
Persistent subscriptions allow devices to attempt resuming existing
3128
subscriptions following a device reset. To enable persistent subscriptions, set
3229
the following parameter to true:

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Generally regenerate using one of:
129129
| 1294 | 0x50E | AccountLogin |
130130
| 1295 | 0x50F | ContentControl |
131131
| 1296 | 0x510 | ContentAppObserver |
132+
| 1363 | 0x553 | WebRTCTransportProvider |
132133
| 1366 | 0x556 | Chime |
133134
| 1872 | 0x750 | EcosystemInformation |
134135
| 1873 | 0x751 | CommissionerControl |

examples/chef/devices/rootnode_laundrydryer_01796fe396.matter

+7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 {
212212
kFinalValue = 2;
213213
}
214214

215+
enum ThreeLevelAutoEnum : enum8 {
216+
kLow = 0;
217+
kMedium = 1;
218+
kHigh = 2;
219+
kAutomatic = 3;
220+
}
221+
215222
bitmap TestGlobalBitmap : bitmap32 {
216223
kFirstBit = 0x1;
217224
kSecondBit = 0x2;

examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CHIP_ERROR OpenCommissioningWindowCommand::RunCommand()
4949
}
5050

5151
void OpenCommissioningWindowCommand::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err,
52-
chip::SetupPayload payload)
52+
SetupPayload payload)
5353
{
5454
LogErrorOnFailure(err);
5555

examples/chip-tool/commands/pairing/PairingCommand.cpp

+23-24
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ CommissioningParameters PairingCommand::GetCommissioningParameters()
151151

152152
if (!mICDSymmetricKey.HasValue())
153153
{
154-
chip::Crypto::DRBG_get_bytes(mRandomGeneratedICDSymmetricKey, sizeof(mRandomGeneratedICDSymmetricKey));
154+
Crypto::DRBG_get_bytes(mRandomGeneratedICDSymmetricKey, sizeof(mRandomGeneratedICDSymmetricKey));
155155
mICDSymmetricKey.SetValue(ByteSpan(mRandomGeneratedICDSymmetricKey));
156156
}
157157
if (!mICDCheckInNodeId.HasValue())
@@ -289,7 +289,7 @@ CHIP_ERROR PairingCommand::PairWithMdnsOrBleByIndexWithCode(NodeId remoteId, uin
289289
// There is no device with this index that has some resolution data. This could simply
290290
// be because the device is a ble device. In this case let's fall back to looking for
291291
// a device with this index and some RendezvousParameters.
292-
chip::SetupPayload payload;
292+
SetupPayload payload;
293293
bool isQRCode = strncmp(mOnboardingPayload, kQRCodePrefix, strlen(kQRCodePrefix)) == 0;
294294
if (isQRCode)
295295
{
@@ -329,21 +329,21 @@ CHIP_ERROR PairingCommand::PairWithMdns(NodeId remoteId)
329329
Dnssd::DiscoveryFilter filter(mFilterType);
330330
switch (mFilterType)
331331
{
332-
case chip::Dnssd::DiscoveryFilterType::kNone:
332+
case Dnssd::DiscoveryFilterType::kNone:
333333
break;
334-
case chip::Dnssd::DiscoveryFilterType::kShortDiscriminator:
335-
case chip::Dnssd::DiscoveryFilterType::kLongDiscriminator:
336-
case chip::Dnssd::DiscoveryFilterType::kCompressedFabricId:
337-
case chip::Dnssd::DiscoveryFilterType::kVendorId:
338-
case chip::Dnssd::DiscoveryFilterType::kDeviceType:
334+
case Dnssd::DiscoveryFilterType::kShortDiscriminator:
335+
case Dnssd::DiscoveryFilterType::kLongDiscriminator:
336+
case Dnssd::DiscoveryFilterType::kCompressedFabricId:
337+
case Dnssd::DiscoveryFilterType::kVendorId:
338+
case Dnssd::DiscoveryFilterType::kDeviceType:
339339
filter.code = mDiscoveryFilterCode;
340340
break;
341-
case chip::Dnssd::DiscoveryFilterType::kCommissioningMode:
341+
case Dnssd::DiscoveryFilterType::kCommissioningMode:
342342
break;
343-
case chip::Dnssd::DiscoveryFilterType::kCommissioner:
343+
case Dnssd::DiscoveryFilterType::kCommissioner:
344344
filter.code = 1;
345345
break;
346-
case chip::Dnssd::DiscoveryFilterType::kInstanceName:
346+
case Dnssd::DiscoveryFilterType::kInstanceName:
347347
filter.code = 0;
348348
filter.instanceName = mDiscoveryFilterInstanceName;
349349
break;
@@ -463,13 +463,13 @@ void PairingCommand::OnReadCommissioningInfo(const Controller::ReadCommissioning
463463

464464
void PairingCommand::OnICDRegistrationComplete(ScopedNodeId nodeId, uint32_t icdCounter)
465465
{
466-
char icdSymmetricKeyHex[chip::Crypto::kAES_CCM128_Key_Length * 2 + 1];
466+
char icdSymmetricKeyHex[Crypto::kAES_CCM128_Key_Length * 2 + 1];
467467

468-
chip::Encoding::BytesToHex(mICDSymmetricKey.Value().data(), mICDSymmetricKey.Value().size(), icdSymmetricKeyHex,
469-
sizeof(icdSymmetricKeyHex), chip::Encoding::HexFlags::kNullTerminate);
468+
Encoding::BytesToHex(mICDSymmetricKey.Value().data(), mICDSymmetricKey.Value().size(), icdSymmetricKeyHex,
469+
sizeof(icdSymmetricKeyHex), Encoding::HexFlags::kNullTerminate);
470470

471471
app::ICDClientInfo clientInfo;
472-
clientInfo.check_in_node = chip::ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex());
472+
clientInfo.check_in_node = ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex());
473473
clientInfo.peer_node = nodeId;
474474
clientInfo.monitored_subject = mICDMonitoredSubject.Value();
475475
clientInfo.start_icd_counter = icdCounter;
@@ -505,15 +505,15 @@ void PairingCommand::OnICDStayActiveComplete(ScopedNodeId deviceId, uint32_t pro
505505
ChipLogValueX64(deviceId.GetNodeId()), promisedActiveDuration);
506506
}
507507

508-
void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData)
508+
void PairingCommand::OnDiscoveredDevice(const Dnssd::CommissionNodeData & nodeData)
509509
{
510510
// Ignore nodes with closed commissioning window
511511
VerifyOrReturn(nodeData.commissioningMode != 0);
512512

513513
auto & resolutionData = nodeData;
514514

515515
const uint16_t port = resolutionData.port;
516-
char buf[chip::Inet::IPAddress::kMaxStringLength];
516+
char buf[Inet::IPAddress::kMaxStringLength];
517517
resolutionData.ipAddress[0].ToString(buf);
518518
ChipLogProgress(chipTool, "Discovered Device: %s:%u", buf, port);
519519

@@ -556,20 +556,19 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E
556556
command->SetCommandExitStatus(err);
557557
}
558558

559-
chip::Optional<uint16_t> PairingCommand::FailSafeExpiryTimeoutSecs() const
559+
Optional<uint16_t> PairingCommand::FailSafeExpiryTimeoutSecs() const
560560
{
561561
// We don't need to set additional failsafe timeout as we don't ask the final user if he wants to continue
562-
return chip::Optional<uint16_t>();
562+
return Optional<uint16_t>();
563563
}
564564

565-
void PairingCommand::OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner,
566-
chip::DeviceProxy * device,
567-
const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info,
568-
chip::Credentials::AttestationVerificationResult attestationResult)
565+
void PairingCommand::OnDeviceAttestationCompleted(Controller::DeviceCommissioner * deviceCommissioner, DeviceProxy * device,
566+
const Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info,
567+
Credentials::AttestationVerificationResult attestationResult)
569568
{
570569
// Bypass attestation verification, continue with success
571570
auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(
572-
device, chip::Credentials::AttestationVerificationResult::kSuccess);
571+
device, Credentials::AttestationVerificationResult::kSuccess);
573572
if (CHIP_NO_ERROR != err)
574573
{
575574
SetCommandExitStatus(err);

examples/chip-tool/commands/pairing/PairingCommand.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class PairingCommand : public CHIPCommand,
244244
const PairingNetworkType mNetworkType;
245245
const chip::Dnssd::DiscoveryFilterType mFilterType;
246246
Command::AddressWithInterface mRemoteAddr;
247-
NodeId mNodeId;
247+
NodeId mNodeId = chip::kUndefinedNodeId;
248248
chip::Optional<uint16_t> mTimeout;
249249
chip::Optional<bool> mDiscoverOnce;
250250
chip::Optional<bool> mUseOnlyOnNetworkDiscovery;
@@ -266,7 +266,7 @@ class PairingCommand : public CHIPCommand,
266266
TypedComplexArgument<chip::app::DataModel::List<chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::Type>>
267267
mComplex_DSTOffsets;
268268

269-
uint16_t mRemotePort;
269+
uint16_t mRemotePort = 0;
270270
// mDiscriminator is only used for some situations, but in those situations
271271
// it's mandatory. Track whether we're actually using it; the cases that do
272272
// will emplace this optional.
@@ -275,15 +275,15 @@ class PairingCommand : public CHIPCommand,
275275
// it's mandatory. Track whether we're actually using it; the cases that do
276276
// will emplace this optional.
277277
std::optional<uint32_t> mSetupPINCode;
278-
uint16_t mIndex;
278+
uint16_t mIndex = 0;
279279
chip::ByteSpan mOperationalDataset;
280280
chip::ByteSpan mSSID;
281281
chip::ByteSpan mPassword;
282-
char * mOnboardingPayload;
283-
uint64_t mDiscoveryFilterCode;
284-
char * mDiscoveryFilterInstanceName;
282+
char * mOnboardingPayload = nullptr;
283+
uint64_t mDiscoveryFilterCode = 0;
284+
char * mDiscoveryFilterInstanceName = nullptr;
285285

286-
bool mDeviceIsICD;
286+
bool mDeviceIsICD = false;
287287
uint8_t mRandomGeneratedICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length];
288288

289289
// For unpair

examples/contact-sensor-app/nxp/k32w0/args.gni

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ chip_generate_link_map_file = true
2828

2929
chip_enable_icd_server = true
3030
chip_enable_icd_lit = false
31-
icd_enforce_sit_slow_poll_limit = true
3231
chip_persist_subscriptions = true
3332
chip_subscription_timeout_resumption = true
3433

examples/contact-sensor-app/nxp/k32w1/args.gni

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ chip_with_lwip = false
3232
chip_enable_icd_server = true
3333
chip_enable_icd_lit = false
3434
chip_enable_icd_dsls = false
35-
icd_enforce_sit_slow_poll_limit = true
3635
chip_persist_subscriptions = true
3736
chip_subscription_timeout_resumption = true
3837

examples/contact-sensor-app/nxp/mcxw71/args.gni

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ chip_with_lwip = false
3030

3131
chip_enable_icd_server = true
3232
chip_enable_icd_lit = false
33-
icd_enforce_sit_slow_poll_limit = true
3433
chip_persist_subscriptions = true
3534
chip_subscription_timeout_resumption = true
3635

examples/fabric-admin/commands/common/CHIPCommand.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
182182
mCredIssuerCmds->SetCredentialIssuerOption(CredentialIssuerCommands::CredentialIssuerOptions::kAllowTestCdSigningKey,
183183
allowTestCdSigningKey);
184184

185-
PairingManager::Instance().Init(&CurrentCommissioner());
185+
ReturnLogErrorOnFailure(PairingManager::Instance().Init(&CurrentCommissioner(), mCredIssuerCmds));
186186

187187
return CHIP_NO_ERROR;
188188
}

examples/fabric-admin/commands/common/CHIPCommand.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ class CHIPCommand : public Command
120120
StopWaiting();
121121
}
122122

123+
static chip::app::DefaultICDClientStorage sICDClientStorage;
124+
123125
protected:
124126
// Will be called in a setting in which it's safe to touch the CHIP
125127
// stack. The rules for Run() are as follows:
@@ -167,7 +169,6 @@ class CHIPCommand : public Command
167169
static chip::Crypto::RawKeySessionKeystore sSessionKeystore;
168170

169171
static chip::Credentials::GroupDataProviderImpl sGroupDataProvider;
170-
static chip::app::DefaultICDClientStorage sICDClientStorage;
171172
static chip::app::CheckInHandler sCheckInHandler;
172173
CredentialIssuerCommands * mCredIssuerCmds;
173174

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp

+5-41
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,8 @@ CHIP_ERROR FabricSyncAddBridgeCommand::RunCommand(NodeId remoteId)
9494
return CHIP_NO_ERROR;
9595
}
9696

97-
PairingCommand * pairingCommand = static_cast<PairingCommand *>(CommandMgr().GetCommandByName("pairing", "already-discovered"));
97+
PairingManager::Instance().SetCommissioningDelegate(this);
9898

99-
if (pairingCommand == nullptr)
100-
{
101-
ChipLogError(NotSpecified, "Pairing already-discovered command is not available");
102-
return CHIP_ERROR_NOT_IMPLEMENTED;
103-
}
104-
105-
pairingCommand->RegisterCommissioningDelegate(this);
10699
mBridgeNodeId = remoteId;
107100

108101
DeviceMgr().PairRemoteFabricBridge(remoteId, mSetupPINCode, reinterpret_cast<const char *>(mRemoteAddr.data()), mRemotePort);
@@ -146,16 +139,7 @@ CHIP_ERROR FabricSyncRemoveBridgeCommand::RunCommand()
146139

147140
mBridgeNodeId = bridgeNodeId;
148141

149-
PairingCommand * pairingCommand = static_cast<PairingCommand *>(CommandMgr().GetCommandByName("pairing", "unpair"));
150-
151-
if (pairingCommand == nullptr)
152-
{
153-
ChipLogError(NotSpecified, "Pairing unpair command is not available");
154-
return CHIP_ERROR_NOT_IMPLEMENTED;
155-
}
156-
157-
pairingCommand->RegisterPairingDelegate(this);
158-
142+
PairingManager::Instance().SetPairingDelegate(this);
159143
DeviceMgr().UnpairRemoteFabricBridge();
160144

161145
return CHIP_NO_ERROR;
@@ -203,10 +187,7 @@ CHIP_ERROR FabricSyncAddLocalBridgeCommand::RunCommand(NodeId deviceId)
203187
return CHIP_NO_ERROR;
204188
}
205189

206-
PairingCommand * pairingCommand = static_cast<PairingCommand *>(CommandMgr().GetCommandByName("pairing", "already-discovered"));
207-
VerifyOrDie(pairingCommand != nullptr);
208-
209-
pairingCommand->RegisterCommissioningDelegate(this);
190+
PairingManager::Instance().SetCommissioningDelegate(this);
210191
mLocalBridgeNodeId = deviceId;
211192

212193
if (mSetupPINCode.HasValue())
@@ -259,16 +240,7 @@ CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand()
259240

260241
mLocalBridgeNodeId = bridgeNodeId;
261242

262-
PairingCommand * pairingCommand = static_cast<PairingCommand *>(CommandMgr().GetCommandByName("pairing", "unpair"));
263-
264-
if (pairingCommand == nullptr)
265-
{
266-
ChipLogError(NotSpecified, "Pairing unpair command is not available");
267-
return CHIP_ERROR_NOT_IMPLEMENTED;
268-
}
269-
270-
pairingCommand->RegisterPairingDelegate(this);
271-
243+
PairingManager::Instance().SetPairingDelegate(this);
272244
DeviceMgr().UnpairLocalFabricBridge();
273245

274246
return CHIP_NO_ERROR;
@@ -287,15 +259,7 @@ void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_
287259
{
288260
NodeId nodeId = DeviceMgr().GetNextAvailableNodeId();
289261

290-
PairingCommand * pairingCommand = static_cast<PairingCommand *>(CommandMgr().GetCommandByName("pairing", "code"));
291-
292-
if (pairingCommand == nullptr)
293-
{
294-
ChipLogError(NotSpecified, "Pairing code command is not available");
295-
return;
296-
}
297-
298-
pairingCommand->RegisterCommissioningDelegate(this);
262+
PairingManager::Instance().SetCommissioningDelegate(this);
299263
mAssignedNodeId = nodeId;
300264

301265
usleep(kCommissionPrepareTimeMs * 1000);

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h

-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
#pragma once
2020

2121
#include <commands/common/CHIPCommand.h>
22-
#include <commands/pairing/PairingCommand.h>
2322
#include <device_manager/PairingManager.h>
2423

2524
// Constants
2625
constexpr uint32_t kCommissionPrepareTimeMs = 500;
27-
constexpr uint16_t kMaxManualCodeLength = 21;
2826

2927
class FabricSyncAddBridgeCommand : public CHIPCommand, public CommissioningDelegate
3028
{

0 commit comments

Comments
 (0)