Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Darwin]Fix: enable controller to skip complete step #26248

Merged
merged 9 commits into from
Apr 26, 2023
6 changes: 6 additions & 0 deletions src/darwin/Framework/CHIP/MTRCommissioningParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, copy, nullable) NSNumber * failSafeTimeout API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));

/**
* Only perform the PASE steps of commissioning.
* Commissioning will be completed by another admin on the network.
robinmo marked this conversation as resolved.
Show resolved Hide resolved
*/
@property (nonatomic, copy, nullable) NSNumber * skipCommissioningComplete;
robinmo marked this conversation as resolved.
Show resolved Hide resolved
robinmo marked this conversation as resolved.
Show resolved Hide resolved

@end

@interface MTRCommissioningParameters (Deprecated)
Expand Down
3 changes: 3 additions & 0 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID
if (commissioningParams.threadOperationalDataset) {
params.SetThreadOperationalDataset(AsByteSpan(commissioningParams.threadOperationalDataset));
}
if (commissioningParams.skipCommissioningComplete) {
params.SetSkipCommissioningComplete(commissioningParams.skipCommissioningComplete.boolValue);
}
if (commissioningParams.wifiSSID) {
chip::ByteSpan ssid = AsByteSpan(commissioningParams.wifiSSID);
chip::ByteSpan credentials;
Expand Down