Skip to content

Commit 924ad8f

Browse files
authored
Merge branch 'master' into add_presets_to_Sdk
2 parents c41d02c + 2b223ce commit 924ad8f

File tree

133 files changed

+4707
-30
lines changed

Some content is hidden

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

133 files changed

+4707
-30
lines changed

BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
5757
"${chip_root}/src/lib/core/tests:fuzz-tlv-reader",
5858
"${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing",
5959
"${chip_root}/src/lib/format/tests:fuzz-payload-decoder",
60+
"${chip_root}/src/setup_payload/tests:fuzz-setup-payload-base38",
61+
"${chip_root}/src/setup_payload/tests:fuzz-setup-payload-base38-decode",
6062
]
6163
}
6264
}

config/nrfconnect/chip-module/CMakeLists.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ matter_generate_args_tmp_file()
200200
# ==============================================================================
201201

202202
matter_build(chip
203-
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
204203
LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS}
205204
DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER}
206205
GN_DEPENDENCIES kernel
@@ -225,6 +224,16 @@ if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE)
225224
)
226225
endif()
227226

227+
if (CONFIG_CHIP_LIB_SHELL)
228+
# Force pulling chip::Shell::Engine::RunMainLoop() in the final binary.
229+
# Without this workaround, the linker script does not process the shell and
230+
# init objects defined in MainLoopZephyr.cpp unless the Matter library or
231+
# the Matter shell library is linked using the '--whole-archive' flag.
232+
target_link_options(chip INTERFACE
233+
-Wl,-u,_ZN4chip5Shell6Engine11RunMainLoopEv
234+
)
235+
endif()
236+
228237
# ==============================================================================
229238
# Define 'chip-ota-image' target for building CHIP OTA image
230239
# ==============================================================================

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+22
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ cluster GeneralCommissioning = 48 {
502502
kInvalidAuthentication = 2;
503503
kNoFailSafe = 3;
504504
kBusyWithOtherAdmin = 4;
505+
kRequiredTCNotAccepted = 5;
506+
kTCAcknowledgementsNotReceived = 6;
507+
kTCMinVersionNotMet = 7;
505508
}
506509

507510
enum RegulatoryLocationTypeEnum : enum8 {
@@ -510,6 +513,10 @@ cluster GeneralCommissioning = 48 {
510513
kIndoorOutdoor = 2;
511514
}
512515

516+
bitmap Feature : bitmap32 {
517+
kTermsAndConditions = 0x1;
518+
}
519+
513520
struct BasicCommissioningInfo {
514521
int16u failSafeExpiryLengthSeconds = 0;
515522
int16u maxCumulativeFailsafeSeconds = 1;
@@ -520,6 +527,10 @@ cluster GeneralCommissioning = 48 {
520527
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
521528
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
522529
readonly attribute boolean supportsConcurrentConnection = 4;
530+
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
531+
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
532+
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
533+
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
523534
readonly attribute command_id generatedCommandList[] = 65528;
524535
readonly attribute command_id acceptedCommandList[] = 65529;
525536
readonly attribute event_id eventList[] = 65530;
@@ -553,12 +564,23 @@ cluster GeneralCommissioning = 48 {
553564
char_string debugText = 1;
554565
}
555566

567+
request struct SetTCAcknowledgementsRequest {
568+
int16u TCVersion = 0;
569+
bitmap16 TCUserResponse = 1;
570+
}
571+
572+
response struct SetTCAcknowledgementsResponse = 7 {
573+
CommissioningErrorEnum errorCode = 0;
574+
}
575+
556576
/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
557577
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
558578
/** Set the regulatory configuration to be used during commissioning */
559579
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
560580
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
561581
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
582+
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
583+
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
562584
}
563585

564586
/** Functionality to configure, enable, disable network credentials and access on a Matter device. */

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+22
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ cluster GeneralCommissioning = 48 {
502502
kInvalidAuthentication = 2;
503503
kNoFailSafe = 3;
504504
kBusyWithOtherAdmin = 4;
505+
kRequiredTCNotAccepted = 5;
506+
kTCAcknowledgementsNotReceived = 6;
507+
kTCMinVersionNotMet = 7;
505508
}
506509

507510
enum RegulatoryLocationTypeEnum : enum8 {
@@ -510,6 +513,10 @@ cluster GeneralCommissioning = 48 {
510513
kIndoorOutdoor = 2;
511514
}
512515

516+
bitmap Feature : bitmap32 {
517+
kTermsAndConditions = 0x1;
518+
}
519+
513520
struct BasicCommissioningInfo {
514521
int16u failSafeExpiryLengthSeconds = 0;
515522
int16u maxCumulativeFailsafeSeconds = 1;
@@ -520,6 +527,10 @@ cluster GeneralCommissioning = 48 {
520527
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
521528
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
522529
readonly attribute boolean supportsConcurrentConnection = 4;
530+
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
531+
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
532+
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
533+
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
523534
readonly attribute command_id generatedCommandList[] = 65528;
524535
readonly attribute command_id acceptedCommandList[] = 65529;
525536
readonly attribute event_id eventList[] = 65530;
@@ -553,12 +564,23 @@ cluster GeneralCommissioning = 48 {
553564
char_string debugText = 1;
554565
}
555566

567+
request struct SetTCAcknowledgementsRequest {
568+
int16u TCVersion = 0;
569+
bitmap16 TCUserResponse = 1;
570+
}
571+
572+
response struct SetTCAcknowledgementsResponse = 7 {
573+
CommissioningErrorEnum errorCode = 0;
574+
}
575+
556576
/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
557577
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
558578
/** Set the regulatory configuration to be used during commissioning */
559579
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
560580
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
561581
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
582+
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
583+
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
562584
}
563585

564586
/** Functionality to configure, enable, disable network credentials and access on a Matter device. */

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+22
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,9 @@ cluster GeneralCommissioning = 48 {
14401440
kInvalidAuthentication = 2;
14411441
kNoFailSafe = 3;
14421442
kBusyWithOtherAdmin = 4;
1443+
kRequiredTCNotAccepted = 5;
1444+
kTCAcknowledgementsNotReceived = 6;
1445+
kTCMinVersionNotMet = 7;
14431446
}
14441447

14451448
enum RegulatoryLocationTypeEnum : enum8 {
@@ -1448,6 +1451,10 @@ cluster GeneralCommissioning = 48 {
14481451
kIndoorOutdoor = 2;
14491452
}
14501453

1454+
bitmap Feature : bitmap32 {
1455+
kTermsAndConditions = 0x1;
1456+
}
1457+
14511458
struct BasicCommissioningInfo {
14521459
int16u failSafeExpiryLengthSeconds = 0;
14531460
int16u maxCumulativeFailsafeSeconds = 1;
@@ -1458,6 +1465,10 @@ cluster GeneralCommissioning = 48 {
14581465
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
14591466
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
14601467
readonly attribute boolean supportsConcurrentConnection = 4;
1468+
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
1469+
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
1470+
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
1471+
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
14611472
readonly attribute command_id generatedCommandList[] = 65528;
14621473
readonly attribute command_id acceptedCommandList[] = 65529;
14631474
readonly attribute event_id eventList[] = 65530;
@@ -1491,12 +1502,23 @@ cluster GeneralCommissioning = 48 {
14911502
char_string debugText = 1;
14921503
}
14931504

1505+
request struct SetTCAcknowledgementsRequest {
1506+
int16u TCVersion = 0;
1507+
bitmap16 TCUserResponse = 1;
1508+
}
1509+
1510+
response struct SetTCAcknowledgementsResponse = 7 {
1511+
CommissioningErrorEnum errorCode = 0;
1512+
}
1513+
14941514
/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
14951515
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
14961516
/** Set the regulatory configuration to be used during commissioning */
14971517
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
14981518
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
14991519
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
1520+
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
1521+
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
15001522
}
15011523

15021524
/** Functionality to configure, enable, disable network credentials and access on a Matter device. */

examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate
167167
* @param percentageReplaced The % of water being replaced with water with a temperature of replacedWaterTemperature.
168168
* @param replacedWaterTemperature The temperature of the percentageReplaced water.
169169
*/
170-
void DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature);
170+
void DrawOffHotWater(chip::Percent percentageReplaced, uint16_t replacedWaterTemperature);
171171

172172
private:
173173
/**

examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void WaterHeaterManagementDelegate::SetTargetWaterTemperature(uint16_t targetWat
294294
CheckIfHeatNeedsToBeTurnedOnOrOff();
295295
}
296296

297-
void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature)
297+
void WaterHeaterManagementDelegate::DrawOffHotWater(Percent percentageReplaced, uint16_t replacedWaterTemperature)
298298
{
299299
// Only supported in the kTankPercent is supported.
300300
// Replaces percentageReplaced% of the water in the tank with water of a temperature replacedWaterTemperature
@@ -303,7 +303,7 @@ void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced,
303303
// See if all of the water has now been replaced with replacedWaterTemperature
304304
if (mTankPercentage >= percentageReplaced)
305305
{
306-
mTankPercentage -= percentageReplaced;
306+
mTankPercentage = static_cast<Percent>(mTankPercentage - percentageReplaced);
307307
}
308308
else
309309
{

examples/all-clusters-app/nrfconnect/prj_release.conf

+4
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=y
6262

6363
# Enable the Read Client for binding purposes
6464
CONFIG_CHIP_ENABLE_READ_CLIENT=y
65+
66+
# Enable LTO to reduce the flash usage
67+
CONFIG_LTO=y
68+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+22
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,9 @@ cluster GeneralCommissioning = 48 {
13201320
kInvalidAuthentication = 2;
13211321
kNoFailSafe = 3;
13221322
kBusyWithOtherAdmin = 4;
1323+
kRequiredTCNotAccepted = 5;
1324+
kTCAcknowledgementsNotReceived = 6;
1325+
kTCMinVersionNotMet = 7;
13231326
}
13241327

13251328
enum RegulatoryLocationTypeEnum : enum8 {
@@ -1328,6 +1331,10 @@ cluster GeneralCommissioning = 48 {
13281331
kIndoorOutdoor = 2;
13291332
}
13301333

1334+
bitmap Feature : bitmap32 {
1335+
kTermsAndConditions = 0x1;
1336+
}
1337+
13311338
struct BasicCommissioningInfo {
13321339
int16u failSafeExpiryLengthSeconds = 0;
13331340
int16u maxCumulativeFailsafeSeconds = 1;
@@ -1338,6 +1345,10 @@ cluster GeneralCommissioning = 48 {
13381345
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
13391346
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
13401347
readonly attribute boolean supportsConcurrentConnection = 4;
1348+
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
1349+
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
1350+
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
1351+
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
13411352
readonly attribute command_id generatedCommandList[] = 65528;
13421353
readonly attribute command_id acceptedCommandList[] = 65529;
13431354
readonly attribute event_id eventList[] = 65530;
@@ -1371,12 +1382,23 @@ cluster GeneralCommissioning = 48 {
13711382
char_string debugText = 1;
13721383
}
13731384

1385+
request struct SetTCAcknowledgementsRequest {
1386+
int16u TCVersion = 0;
1387+
bitmap16 TCUserResponse = 1;
1388+
}
1389+
1390+
response struct SetTCAcknowledgementsResponse = 7 {
1391+
CommissioningErrorEnum errorCode = 0;
1392+
}
1393+
13741394
/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
13751395
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
13761396
/** Set the regulatory configuration to be used during commissioning */
13771397
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
13781398
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
13791399
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
1400+
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
1401+
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
13801402
}
13811403

13821404
/** Functionality to configure, enable, disable network credentials and access on a Matter device. */

examples/bridge-app/bridge-common/bridge-app.matter

+22
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,9 @@ cluster GeneralCommissioning = 48 {
959959
kInvalidAuthentication = 2;
960960
kNoFailSafe = 3;
961961
kBusyWithOtherAdmin = 4;
962+
kRequiredTCNotAccepted = 5;
963+
kTCAcknowledgementsNotReceived = 6;
964+
kTCMinVersionNotMet = 7;
962965
}
963966

964967
enum RegulatoryLocationTypeEnum : enum8 {
@@ -967,6 +970,10 @@ cluster GeneralCommissioning = 48 {
967970
kIndoorOutdoor = 2;
968971
}
969972

973+
bitmap Feature : bitmap32 {
974+
kTermsAndConditions = 0x1;
975+
}
976+
970977
struct BasicCommissioningInfo {
971978
int16u failSafeExpiryLengthSeconds = 0;
972979
int16u maxCumulativeFailsafeSeconds = 1;
@@ -977,6 +984,10 @@ cluster GeneralCommissioning = 48 {
977984
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
978985
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
979986
readonly attribute boolean supportsConcurrentConnection = 4;
987+
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
988+
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
989+
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
990+
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
980991
readonly attribute command_id generatedCommandList[] = 65528;
981992
readonly attribute command_id acceptedCommandList[] = 65529;
982993
readonly attribute event_id eventList[] = 65530;
@@ -1010,12 +1021,23 @@ cluster GeneralCommissioning = 48 {
10101021
char_string debugText = 1;
10111022
}
10121023

1024+
request struct SetTCAcknowledgementsRequest {
1025+
int16u TCVersion = 0;
1026+
bitmap16 TCUserResponse = 1;
1027+
}
1028+
1029+
response struct SetTCAcknowledgementsResponse = 7 {
1030+
CommissioningErrorEnum errorCode = 0;
1031+
}
1032+
10131033
/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
10141034
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
10151035
/** Set the regulatory configuration to be used during commissioning */
10161036
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
10171037
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
10181038
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
1039+
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
1040+
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
10191041
}
10201042

10211043
/** Functionality to configure, enable, disable network credentials and access on a Matter device. */

0 commit comments

Comments
 (0)