Skip to content

Commit 606e968

Browse files
committed
Merge branch 'master' of https://github.com/project-chip/connectedhomeip into bump_CI_images
2 parents 8d2ca27 + 7b7fe91 commit 606e968

Some content is hidden

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

61 files changed

+3353
-732
lines changed

.github/workflows/examples-cc13xx_26xx.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
107107
cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \
108-
out/artifacts/ti-cc13x4_26x4-lighting-mtd/chip-LP_EM_CC1354P10_6-lighting-example.out \
108+
out/artifacts/ti-cc13x4_26x4-lighting-ftd/chip-LP_EM_CC1354P10_6-lighting-example.out \
109109
/tmp/bloat_reports/
110110
- name: Uploading Size Reports
111111
uses: ./.github/actions/upload-size-reports

.github/workflows/examples-efr32.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: github.actor != 'restyled-io[bot]'
4141

4242
container:
43-
image: ghcr.io/project-chip/chip-build-efr32:73
43+
image: ghcr.io/project-chip/chip-build-efr32:74
4444
volumes:
4545
- "/tmp/bloat_reports:/tmp/bloat_reports"
4646
steps:

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,17 @@
213213
[submodule "third_party/silabs/simplicity_sdk"]
214214
path = third_party/silabs/simplicity_sdk
215215
url = https://github.com/SiliconLabs/simplicity_sdk.git
216-
branch = v2024.6.0
216+
branch = v2024.6.1-0
217217
platforms = silabs
218218
[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"]
219219
path = third_party/silabs/wiseconnect-wifi-bt-sdk
220220
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
221-
branch = 2.8.2
221+
branch = 2.10.0
222222
platforms = silabs
223223
[submodule "third_party/silabs/wifi_sdk"]
224224
path = third_party/silabs/wifi_sdk
225225
url = https://github.com/SiliconLabs/wiseconnect.git
226-
branch = v3.3.0
226+
branch = v3.3.1
227227
platforms = silabs
228228
[submodule "editline"]
229229
path = third_party/editline/repo

config/telink/chip-module/Kconfig.defaults

-5
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,7 @@ config NVS_LOOKUP_CACHE_SIZE
219219
config SETTINGS_NVS_SECTOR_SIZE_MULT
220220
default 1
221221

222-
# Set sector counter of NVS
223-
config SETTINGS_NVS_SECTOR_COUNT
224-
default 12
225-
226222
# Enable OpenThread
227-
228223
config NET_L2_OPENTHREAD
229224
default y if !WIFI
230225

docs/guides/fabric_synchronization_guide.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ Run the Fabric Synchronization script:
9898

9999
In Ecosystem 1 Fabric-Admin console:
100100

101+
Pair the local bridge of Ecosystem 1 with node ID 1:
102+
103+
```
104+
fabricsync add-local-bridge 1
105+
```
106+
101107
Pair the Ecosystem 2 bridge to Ecosystem 1 with node ID 2:
102108

103109
```
@@ -130,8 +136,8 @@ Pair the Light Example with node ID 3 using its payload number:
130136
pairing already-discovered 3 20202021 <ip> 5543
131137
```
132138

133-
After the device is successfully added, you will observe the following on
134-
Ecosystem 2 with the newly assigned Node ID:
139+
After the device is successfully added, you will observe the following message
140+
on Ecosystem 2 with the newly assigned Node ID:
135141

136142
```
137143
>>> New device with Node ID: 0x3 has been successfully added.

examples/fabric-admin/commands/clusters/ClusterCommand.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub
8484
if (data != nullptr)
8585
{
8686
LogErrorOnFailure(RemoteDataModelLogger::LogCommandAsJSON(path, data));
87-
DeviceMgr().HandleCommandResponse(path, data);
87+
DeviceMgr().HandleCommandResponse(path, *data);
8888
}
8989
}
9090

examples/fabric-admin/commands/clusters/ReportCommand.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void ReportCommand::OnAttributeData(const app::ConcreteDataAttributePath & path,
4646

4747
LogErrorOnFailure(RemoteDataModelLogger::LogAttributeAsJSON(path, data));
4848

49-
DeviceMgr().HandleAttributeData(path, data);
49+
DeviceMgr().HandleAttributeData(path, *data);
5050
}
5151

5252
void ReportCommand::OnEventData(const app::EventHeader & eventHeader, TLV::TLVReader * data, const app::StatusIB * status)
@@ -73,5 +73,5 @@ void ReportCommand::OnEventData(const app::EventHeader & eventHeader, TLV::TLVRe
7373

7474
LogErrorOnFailure(RemoteDataModelLogger::LogEventAsJSON(eventHeader, data));
7575

76-
DeviceMgr().HandleEventData(eventHeader, data);
76+
DeviceMgr().HandleEventData(eventHeader, *data);
7777
}

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

+10-7
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E
6464

6565
DeviceMgr().SubscribeRemoteFabricBridge();
6666

67-
// After successful commissioning of the Commissionee, initiate Reverse Commissioning
68-
// via the Commissioner Control Cluster. However, we must first verify that the
69-
// remote Fabric-Bridge supports Fabric Synchronization.
70-
//
71-
// Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command
72-
// if the remote Fabric-Bridge lacks Fabric Synchronization support.
73-
DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0);
67+
if (DeviceMgr().IsLocalBridgeReady())
68+
{
69+
// After successful commissioning of the Commissionee, initiate Reverse Commissioning
70+
// via the Commissioner Control Cluster. However, we must first verify that the
71+
// remote Fabric-Bridge supports Fabric Synchronization.
72+
//
73+
// Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command
74+
// if the remote Fabric-Bridge lacks Fabric Synchronization support.
75+
DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0);
76+
}
7477
}
7578
else
7679
{

examples/fabric-admin/device_manager/DeviceManager.cpp

+85-81
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ void DeviceManager::OpenRemoteDeviceCommissioningWindow(EndpointId remoteEndpoin
144144
commandBuilder.Add("pairing open-commissioning-window ");
145145
commandBuilder.AddFormat("%lu %d %d %d %d %d", mRemoteBridgeNodeId, remoteEndpointId, kEnhancedCommissioningMethod,
146146
kWindowTimeout, kIteration, discriminator);
147-
commandBuilder.Add(" --setup-pin 20202021");
148147

149148
PushCommand(commandBuilder.c_str());
150149
}
@@ -215,8 +214,8 @@ void DeviceManager::SubscribeRemoteFabricBridge()
215214

216215
// Prepare and push the commissioner control subscribe command
217216
commandBuilder.Add("commissionercontrol subscribe-event commissioning-request-result ");
218-
commandBuilder.AddFormat("%d %d %lu %d --is-urgent true", kSubscribeMinInterval, kSubscribeMaxInterval, mRemoteBridgeNodeId,
219-
kRootEndpointId);
217+
commandBuilder.AddFormat("%d %d %lu %d --is-urgent true --keepSubscriptions true", kSubscribeMinInterval, kSubscribeMaxInterval,
218+
mRemoteBridgeNodeId, kRootEndpointId);
220219
PushCommand(commandBuilder.c_str());
221220
}
222221

@@ -238,6 +237,25 @@ void DeviceManager::ReadSupportedDeviceCategories()
238237
PushCommand(commandBuilder.c_str());
239238
}
240239

240+
void DeviceManager::HandleReadSupportedDeviceCategories(chip::TLV::TLVReader & data)
241+
{
242+
ChipLogProgress(NotSpecified, "Attribute SupportedDeviceCategories detected.");
243+
244+
BitMask<CommissionerControl::SupportedDeviceCategoryBitmap> value;
245+
CHIP_ERROR error = app::DataModel::Decode(data, value);
246+
if (error != CHIP_NO_ERROR)
247+
{
248+
ChipLogError(NotSpecified, "Failed to decode attribute value. Error: %" CHIP_ERROR_FORMAT, error.Format());
249+
return;
250+
}
251+
252+
if (value.Has(CommissionerControl::SupportedDeviceCategoryBitmap::kFabricSynchronization))
253+
{
254+
ChipLogProgress(NotSpecified, "Remote Fabric-Bridge supports Fabric Synchronization, start reverse commissioning.");
255+
RequestCommissioningApproval();
256+
}
257+
}
258+
241259
void DeviceManager::RequestCommissioningApproval()
242260
{
243261
ChipLogProgress(NotSpecified, "Starting reverse commissioning for bridge device: NodeId: " ChipLogFormatX64,
@@ -255,12 +273,12 @@ void DeviceManager::RequestCommissioningApproval()
255273
PushCommand(commandBuilder.c_str());
256274
}
257275

258-
void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader * data)
276+
void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data)
259277
{
260278
ChipLogProgress(NotSpecified, "CommissioningRequestResult event received.");
261279

262280
CommissionerControl::Events::CommissioningRequestResult::DecodableType value;
263-
CHIP_ERROR error = app::DataModel::Decode(*data, value);
281+
CHIP_ERROR error = app::DataModel::Decode(data, value);
264282
if (error != CHIP_NO_ERROR)
265283
{
266284
ChipLogError(NotSpecified, "Failed to decode event value. Error: %" CHIP_ERROR_FORMAT, error.Format());
@@ -284,82 +302,12 @@ void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader * data)
284302
SendCommissionNodeRequest(value.requestId, kResponseTimeoutSeconds);
285303
}
286304

287-
void DeviceManager::SendCommissionNodeRequest(uint64_t requestId, uint16_t responseTimeoutSeconds)
288-
{
289-
ChipLogProgress(NotSpecified, "Request the Commissioner Control Server to begin commissioning a previously approved request.");
290-
291-
StringBuilder<kMaxCommandSize> commandBuilder;
292-
commandBuilder.Add("commissionercontrol commission-node ");
293-
commandBuilder.AddFormat("%lu %u %lu %d", requestId, responseTimeoutSeconds, mRemoteBridgeNodeId, kRootEndpointId);
294-
295-
PushCommand(commandBuilder.c_str());
296-
}
297-
298-
void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader * data)
305+
void DeviceManager::HandleAttributePartsListUpdate(chip::TLV::TLVReader & data)
299306
{
300-
CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType value;
301-
CHIP_ERROR error = app::DataModel::Decode(*data, value);
302-
if (error != CHIP_NO_ERROR)
303-
{
304-
ChipLogError(NotSpecified, "Failed to decode command response value. Error: %" CHIP_ERROR_FORMAT, error.Format());
305-
return;
306-
}
307-
308-
// Log all fields
309-
ChipLogProgress(NotSpecified, "DecodableType fields:");
310-
ChipLogProgress(NotSpecified, " commissioningTimeout: %u", value.commissioningTimeout);
311-
ChipLogProgress(NotSpecified, " discriminator: %u", value.discriminator);
312-
ChipLogProgress(NotSpecified, " iterations: %u", value.iterations);
313-
314-
char verifierHex[Crypto::kSpake2p_VerifierSerialized_Length * 2 + 1];
315-
Encoding::BytesToHex(value.PAKEPasscodeVerifier.data(), value.PAKEPasscodeVerifier.size(), verifierHex, sizeof(verifierHex),
316-
Encoding::HexFlags::kNullTerminate);
317-
ChipLogProgress(NotSpecified, " PAKEPasscodeVerifier: %s", verifierHex);
318-
319-
char saltHex[Crypto::kSpake2p_Max_PBKDF_Salt_Length * 2 + 1];
320-
Encoding::BytesToHex(value.salt.data(), value.salt.size(), saltHex, sizeof(saltHex), Encoding::HexFlags::kNullTerminate);
321-
ChipLogProgress(NotSpecified, " salt: %s", saltHex);
322-
323-
OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.commissioningTimeout, value.iterations, value.discriminator, saltHex,
324-
verifierHex);
325-
}
326-
327-
void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & path, TLV::TLVReader * data)
328-
{
329-
if (path.mClusterId == CommissionerControl::Id &&
330-
path.mAttributeId == CommissionerControl::Attributes::SupportedDeviceCategories::Id)
331-
{
332-
ChipLogProgress(NotSpecified, "Attribute SupportedDeviceCategories detected.");
333-
334-
BitMask<CommissionerControl::SupportedDeviceCategoryBitmap> value;
335-
CHIP_ERROR error = app::DataModel::Decode(*data, value);
336-
if (error != CHIP_NO_ERROR)
337-
{
338-
ChipLogError(NotSpecified, "Failed to decode attribute value. Error: %" CHIP_ERROR_FORMAT, error.Format());
339-
return;
340-
}
341-
342-
if (value.Has(CommissionerControl::SupportedDeviceCategoryBitmap::kFabricSynchronization))
343-
{
344-
ChipLogProgress(NotSpecified, "Remote Fabric-Bridge supports Fabric Synchronization, start reverse commissioning.");
345-
RequestCommissioningApproval();
346-
}
347-
348-
return;
349-
}
350-
351-
if (path.mClusterId != Descriptor::Id || path.mAttributeId != Descriptor::Attributes::PartsList::Id)
352-
{
353-
return;
354-
}
355-
356-
ChipLogProgress(NotSpecified, "Attribute change detected:");
357-
ChipLogProgress(
358-
NotSpecified, "Endpoint: %u, Cluster: " ChipLogFormatMEI ", Attribute: " ChipLogFormatMEI ", DataVersion: %" PRIu32,
359-
path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId), path.mDataVersion.ValueOr(0));
307+
ChipLogProgress(NotSpecified, "Attribute PartsList change detected:");
360308

361309
app::DataModel::DecodableList<EndpointId> value;
362-
CHIP_ERROR error = app::DataModel::Decode(*data, value);
310+
CHIP_ERROR error = app::DataModel::Decode(data, value);
363311
if (error != CHIP_NO_ERROR)
364312
{
365313
ChipLogError(NotSpecified, "Failed to decode attribute value. Error: %" CHIP_ERROR_FORMAT, error.Format());
@@ -413,7 +361,7 @@ void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & p
413361
for (const auto & endpoint : addedEndpoints)
414362
{
415363
// print to console
416-
fprintf(stderr, "A new devie is added on Endpoint: %u\n", endpoint);
364+
fprintf(stderr, "A new device is added on Endpoint: %u\n", endpoint);
417365

418366
if (mAutoSyncEnabled)
419367
{
@@ -457,7 +405,63 @@ void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & p
457405
}
458406
}
459407

460-
void DeviceManager::HandleEventData(const app::EventHeader & header, TLV::TLVReader * data)
408+
void DeviceManager::SendCommissionNodeRequest(uint64_t requestId, uint16_t responseTimeoutSeconds)
409+
{
410+
ChipLogProgress(NotSpecified, "Request the Commissioner Control Server to begin commissioning a previously approved request.");
411+
412+
StringBuilder<kMaxCommandSize> commandBuilder;
413+
commandBuilder.Add("commissionercontrol commission-node ");
414+
commandBuilder.AddFormat("%lu %u %lu %d", requestId, responseTimeoutSeconds, mRemoteBridgeNodeId, kRootEndpointId);
415+
416+
PushCommand(commandBuilder.c_str());
417+
}
418+
419+
void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader & data)
420+
{
421+
CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType value;
422+
CHIP_ERROR error = app::DataModel::Decode(data, value);
423+
if (error != CHIP_NO_ERROR)
424+
{
425+
ChipLogError(NotSpecified, "Failed to decode command response value. Error: %" CHIP_ERROR_FORMAT, error.Format());
426+
return;
427+
}
428+
429+
// Log all fields
430+
ChipLogProgress(NotSpecified, "DecodableType fields:");
431+
ChipLogProgress(NotSpecified, " commissioningTimeout: %u", value.commissioningTimeout);
432+
ChipLogProgress(NotSpecified, " discriminator: %u", value.discriminator);
433+
ChipLogProgress(NotSpecified, " iterations: %u", value.iterations);
434+
435+
char verifierHex[Crypto::kSpake2p_VerifierSerialized_Length * 2 + 1];
436+
Encoding::BytesToHex(value.PAKEPasscodeVerifier.data(), value.PAKEPasscodeVerifier.size(), verifierHex, sizeof(verifierHex),
437+
Encoding::HexFlags::kNullTerminate);
438+
ChipLogProgress(NotSpecified, " PAKEPasscodeVerifier: %s", verifierHex);
439+
440+
char saltHex[Crypto::kSpake2p_Max_PBKDF_Salt_Length * 2 + 1];
441+
Encoding::BytesToHex(value.salt.data(), value.salt.size(), saltHex, sizeof(saltHex), Encoding::HexFlags::kNullTerminate);
442+
ChipLogProgress(NotSpecified, " salt: %s", saltHex);
443+
444+
OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.commissioningTimeout, value.iterations, value.discriminator, saltHex,
445+
verifierHex);
446+
}
447+
448+
void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & path, TLV::TLVReader & data)
449+
{
450+
if (path.mClusterId == CommissionerControl::Id &&
451+
path.mAttributeId == CommissionerControl::Attributes::SupportedDeviceCategories::Id)
452+
{
453+
HandleReadSupportedDeviceCategories(data);
454+
return;
455+
}
456+
457+
if (path.mClusterId == Descriptor::Id && path.mAttributeId == Descriptor::Attributes::PartsList::Id)
458+
{
459+
HandleAttributePartsListUpdate(data);
460+
return;
461+
}
462+
}
463+
464+
void DeviceManager::HandleEventData(const app::EventHeader & header, TLV::TLVReader & data)
461465
{
462466
if (header.mPath.mClusterId == CommissionerControl::Id &&
463467
header.mPath.mEventId == CommissionerControl::Events::CommissioningRequestResult::Id)
@@ -466,7 +470,7 @@ void DeviceManager::HandleEventData(const app::EventHeader & header, TLV::TLVRea
466470
}
467471
}
468472

469-
void DeviceManager::HandleCommandResponse(const app::ConcreteCommandPath & path, TLV::TLVReader * data)
473+
void DeviceManager::HandleCommandResponse(const app::ConcreteCommandPath & path, TLV::TLVReader & data)
470474
{
471475
ChipLogProgress(NotSpecified, "Command Response received.");
472476

examples/fabric-admin/device_manager/DeviceManager.h

+9-5
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ class DeviceManager : public PairingDelegate
150150

151151
void ReadSupportedDeviceCategories();
152152

153-
void HandleAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data);
153+
void HandleAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader & data);
154154

155-
void HandleEventData(const chip::app::EventHeader & header, chip::TLV::TLVReader * data);
155+
void HandleEventData(const chip::app::EventHeader & header, chip::TLV::TLVReader & data);
156156

157-
void HandleCommandResponse(const chip::app::ConcreteCommandPath & path, chip::TLV::TLVReader * data);
157+
void HandleCommandResponse(const chip::app::ConcreteCommandPath & path, chip::TLV::TLVReader & data);
158158

159159
void OnDeviceRemoved(chip::NodeId deviceId, CHIP_ERROR err) override;
160160

@@ -163,11 +163,15 @@ class DeviceManager : public PairingDelegate
163163

164164
void RequestCommissioningApproval();
165165

166-
void HandleCommissioningRequestResult(chip::TLV::TLVReader * data);
166+
void HandleReadSupportedDeviceCategories(chip::TLV::TLVReader & data);
167+
168+
void HandleCommissioningRequestResult(chip::TLV::TLVReader & data);
169+
170+
void HandleAttributePartsListUpdate(chip::TLV::TLVReader & data);
167171

168172
void SendCommissionNodeRequest(uint64_t requestId, uint16_t responseTimeoutSeconds);
169173

170-
void HandleReverseOpenCommissioningWindow(chip::TLV::TLVReader * data);
174+
void HandleReverseOpenCommissioningWindow(chip::TLV::TLVReader & data);
171175

172176
static DeviceManager sInstance;
173177

0 commit comments

Comments
 (0)