Skip to content

Commit 1fa65b4

Browse files
authored
Merge branch 'master' into camera-push
2 parents 73ab16b + 775d86b commit 1fa65b4

File tree

7 files changed

+1
-47
lines changed

7 files changed

+1
-47
lines changed

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

-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ CommissioningParameters PairingCommand::GetCommissioningParameters()
129129
params.SetCountryCode(CharSpan::fromCharString(mCountryCode.Value()));
130130
}
131131

132-
// Default requiring TCs to false, to preserve release 1.3 chip-tool behavior
133-
params.SetRequireTermsAndConditionsAcknowledgement(mRequireTCAcknowledgements.ValueOr(false));
134-
135132
// mTCAcknowledgements and mTCAcknowledgementVersion are optional, but related. When one is missing, default the value to 0, to
136133
// increase the test tools ability to test the applications.
137134
if (mTCAcknowledgements.HasValue() || mTCAcknowledgementVersion.HasValue())

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

-6
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,6 @@ class PairingCommand : public CHIPCommand,
203203
"DSTOffset list to use when setting Time Synchronization cluster's DSTOffset attribute",
204204
Argument::kOptional);
205205

206-
AddArgument("require-tc-acknowledgements", 0, 1, &mRequireTCAcknowledgements,
207-
"Indicates whether Terms and Conditions acknowledgements are required during commissioning. If set to "
208-
"true, the tc-acknowledgements and tc-acknowledgements-version arguments must be provided for the "
209-
"commissioning to succeed. If false, the T&C acknowledgement step will be skipped.");
210-
211206
AddArgument("tc-acknowledgements", 0, UINT16_MAX, &mTCAcknowledgements,
212207
"Bit-field value indicating which Terms and Conditions have been accepted by the user. This value is sent "
213208
"to the device during commissioning via the General Commissioning cluster");
@@ -272,7 +267,6 @@ class PairingCommand : public CHIPCommand,
272267
chip::Optional<uint64_t> mICDMonitoredSubject;
273268
chip::Optional<chip::app::Clusters::IcdManagement::ClientTypeEnum> mICDClientType;
274269
chip::Optional<uint32_t> mICDStayActiveDurationMsec;
275-
chip::Optional<bool> mRequireTCAcknowledgements;
276270
chip::Optional<uint16_t> mTCAcknowledgements;
277271
chip::Optional<uint16_t> mTCAcknowledgementVersion;
278272
chip::app::DataModel::List<chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::Type> mTimeZoneList;

src/controller/CHIPDeviceController.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -3226,20 +3226,13 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio
32263226
case CommissioningStage::kConfigureTCAcknowledgments: {
32273227
ChipLogProgress(Controller, "Setting Terms and Conditions");
32283228

3229-
if (!params.GetRequireTermsAndConditionsAcknowledgement())
3229+
if (!params.GetTermsAndConditionsAcknowledgement().HasValue())
32303230
{
32313231
ChipLogProgress(Controller, "Setting Terms and Conditions: Skipped");
32323232
CommissioningStageComplete(CHIP_NO_ERROR);
32333233
return;
32343234
}
32353235

3236-
if (!params.GetTermsAndConditionsAcknowledgement().HasValue())
3237-
{
3238-
ChipLogError(Controller, "No acknowledgements provided");
3239-
CommissioningStageComplete(CHIP_ERROR_INCORRECT_STATE);
3240-
return;
3241-
}
3242-
32433236
GeneralCommissioning::Commands::SetTCAcknowledgements::Type request;
32443237
TermsAndConditionsAcknowledgement termsAndConditionsAcknowledgement = params.GetTermsAndConditionsAcknowledgement().Value();
32453238
request.TCUserResponse = termsAndConditionsAcknowledgement.acceptedTermsAndConditions;

src/controller/CommissioningDelegate.h

-9
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ class CommissioningParameters
174174
// The country code to be used for the node, if set.
175175
Optional<CharSpan> GetCountryCode() const { return mCountryCode; }
176176

177-
bool GetRequireTermsAndConditionsAcknowledgement() const { return mRequireTermsAndConditionsAcknowledgement; }
178-
179177
Optional<TermsAndConditionsAcknowledgement> GetTermsAndConditionsAcknowledgement() const
180178
{
181179
return mTermsAndConditionsAcknowledgement;
@@ -353,12 +351,6 @@ class CommissioningParameters
353351
return *this;
354352
}
355353

356-
CommissioningParameters & SetRequireTermsAndConditionsAcknowledgement(bool requireTermsAndConditionsAcknowledgement)
357-
{
358-
mRequireTermsAndConditionsAcknowledgement = requireTermsAndConditionsAcknowledgement;
359-
return *this;
360-
}
361-
362354
CommissioningParameters &
363355
SetTermsAndConditionsAcknowledgement(TermsAndConditionsAcknowledgement termsAndConditionsAcknowledgement)
364356
{
@@ -670,7 +662,6 @@ class CommissioningParameters
670662
Optional<uint32_t> mICDStayActiveDurationMsec;
671663
ICDRegistrationStrategy mICDRegistrationStrategy = ICDRegistrationStrategy::kIgnore;
672664
bool mCheckForMatchingFabric = false;
673-
bool mRequireTermsAndConditionsAcknowledgement = false;
674665
};
675666

676667
struct RequestedCertificate

src/controller/python/ChipDeviceController-ScriptBinding.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::De
183183
bool pychip_DeviceController_GetIPForDiscoveredDevice(chip::Controller::DeviceCommissioner * devCtrl, int idx, char * addrStr,
184184
uint32_t len);
185185

186-
PyChipError pychip_DeviceController_SetRequireTermsAndConditionsAcknowledgement(bool tcRequired);
187-
188186
PyChipError pychip_DeviceController_SetTermsAcknowledgements(uint16_t tcVersion, uint16_t tcUserResponse);
189187

190188
PyChipError pychip_DeviceController_SetSkipCommissioningComplete(bool skipCommissioningComplete);
@@ -578,12 +576,6 @@ PyChipError pychip_DeviceController_SetDefaultNtp(const char * defaultNTP)
578576
return ToPyChipError(CHIP_NO_ERROR);
579577
}
580578

581-
PyChipError pychip_DeviceController_SetRequireTermsAndConditionsAcknowledgement(bool tcRequired)
582-
{
583-
sCommissioningParameters.SetRequireTermsAndConditionsAcknowledgement(tcRequired);
584-
return ToPyChipError(CHIP_NO_ERROR);
585-
}
586-
587579
PyChipError pychip_DeviceController_SetTermsAcknowledgements(uint16_t tcVersion, uint16_t tcUserResponse)
588580
{
589581
sCommissioningParameters.SetTermsAndConditionsAcknowledgement(

src/controller/python/chip/ChipDeviceCtrl.py

-10
Original file line numberDiff line numberDiff line change
@@ -2008,9 +2008,6 @@ def _InitLib(self):
20082008
self._dmLib.pychip_DeviceController_SetSkipCommissioningComplete.restype = PyChipError
20092009
self._dmLib.pychip_DeviceController_SetSkipCommissioningComplete.argtypes = [c_bool]
20102010

2011-
self._dmLib.pychip_DeviceController_SetRequireTermsAndConditionsAcknowledgement.restype = PyChipError
2012-
self._dmLib.pychip_DeviceController_SetRequireTermsAndConditionsAcknowledgement.argtypes = [c_bool]
2013-
20142011
self._dmLib.pychip_DeviceController_SetTermsAcknowledgements.restype = PyChipError
20152012
self._dmLib.pychip_DeviceController_SetTermsAcknowledgements.argtypes = [c_uint16, c_uint16]
20162013

@@ -2142,13 +2139,6 @@ def SetDSTOffset(self, offset: int, validStarting: int, validUntil: int):
21422139
lambda: self._dmLib.pychip_DeviceController_SetDSTOffset(offset, validStarting, validUntil)
21432140
).raise_on_error()
21442141

2145-
def SetTCRequired(self, tcRequired: bool):
2146-
''' Set whether TC Acknowledgements should be set during commissioning'''
2147-
self.CheckIsActive()
2148-
self._ChipStack.Call(
2149-
lambda: self._dmLib.pychip_DeviceController_SetRequireTermsAndConditionsAcknowledgement(tcRequired)
2150-
).raise_on_error()
2151-
21522142
def SetTCAcknowledgements(self, tcAcceptedVersion: int, tcUserResponse: int):
21532143
''' Set the TC acknowledgements to set during commissioning'''
21542144
self.CheckIsActive()

src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py

-3
Original file line numberDiff line numberDiff line change
@@ -2378,9 +2378,6 @@ async def commission_device(instance: MatterBaseTest, i) -> bool:
23782378
logging.debug(
23792379
f"Setting TC Acknowledgements to version {conf.tc_version_to_simulate} with user response {conf.tc_user_response_to_simulate}.")
23802380
dev_ctrl.SetTCAcknowledgements(conf.tc_version_to_simulate, conf.tc_user_response_to_simulate)
2381-
dev_ctrl.SetTCRequired(True)
2382-
else:
2383-
dev_ctrl.SetTCRequired(False)
23842381

23852382
if conf.commissioning_method == "on-network":
23862383
try:

0 commit comments

Comments
 (0)