diff --git a/src/controller/CommissioningWindowOpener.cpp b/src/controller/CommissioningWindowOpener.cpp index f0fd3e2bbd180d..977c44ffc74245 100644 --- a/src/controller/CommissioningWindowOpener.cpp +++ b/src/controller/CommissioningWindowOpener.cpp @@ -245,7 +245,7 @@ void CommissioningWindowOpener::OnDeviceConnectedCallback(void * context, Operat err = cluster.ReadAttribute(context, OnPIDReadResponse, OnVIDPIDReadFailureResponse); #if CHIP_ERROR_LOGGING - messageIfError = "Could not read VID for opening commissioning window"; + messageIfError = "Could not read PID for opening commissioning window"; #endif // CHIP_ERROR_LOGGING break; } diff --git a/src/controller/CommissioningWindowOpener.h b/src/controller/CommissioningWindowOpener.h index 709fd4bbf62670..d3bc789d35c06f 100644 --- a/src/controller/CommissioningWindowOpener.h +++ b/src/controller/CommissioningWindowOpener.h @@ -85,8 +85,12 @@ class CommissioningWindowOpener * @param[in] discriminator The long discriminator for the DNS-SD advertisement. * @param[in] setupPIN The setup PIN to use, or NullOptional to use a randomly-generated one. * @param[in] callback The function to be called on success or failure of opening of commissioning window. - * @param[out] payload The setup payload, not including the VID/PID bits, that is generated based on the - * passed-in information. + * @param[out] payload The setup payload, not including the VID/PID bits, + * even if those were asked for, that is generated + * based on the passed-in information. The payload + * provided to the callback function, unlike this + * out parameter, will include the VID/PID bits if + * readVIDPIDAttributes is true. * * @param[in] readVIDPIDAttributes Should the API internally read VID and PID from the device while opening the * commissioning window. If this argument is `true`, the API will read VID and diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 8863c3c2254b26..b0702ff19f1c87 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -523,8 +523,8 @@ - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID chip::SetupPayload setupPayload; err = chip::Controller::AutoCommissioningWindowOpener::OpenCommissioningWindow(self.cppCommissioner, deviceID, - chip::System::Clock::Seconds16(static_cast(duration)), 1000, static_cast(discriminator), - chip::MakeOptional(static_cast(setupPIN)), setupPayload); + chip::System::Clock::Seconds16(static_cast(duration)), chip::Crypto::kSpake2p_Min_PBKDF_Iterations, + static_cast(discriminator), chip::MakeOptional(static_cast(setupPIN)), setupPayload); if (err != CHIP_NO_ERROR) { CHIP_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err));