Skip to content

Commit 58a0d71

Browse files
Merge branch 'project-chip:master' into YAML-Updates-2-23-2024
2 parents 63b49ac + 4b0cbcc commit 58a0d71

File tree

267 files changed

+21380
-2660
lines changed

Some content is hidden

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

267 files changed

+21380
-2660
lines changed

.github/.wordlist.txt

+7
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ EchoMessage
465465
EchoRequests
466466
EchoResponse
467467
EchoService
468+
ECW
468469
edaf
469470
edc
470471
EDR
@@ -738,6 +739,7 @@ kCase
738739
Kconfig
739740
kDacPublicKey
740741
KeypadInput
742+
keypair
741743
keyset
742744
kGroup
743745
kInvalidCommandId
@@ -884,6 +886,7 @@ mlan
884886
MLD
885887
mmevk
886888
moal
889+
Mobly
887890
ModeSelect
888891
modprobe
889892
Modustoolbox
@@ -948,6 +951,7 @@ nrfdks
948951
nrfutil
949952
nrfxlib
950953
NTAG
954+
NTP
951955
nullable
952956
nullptr
953957
NUM
@@ -1013,6 +1017,7 @@ OTBR
10131017
otcli
10141018
outform
10151019
outgoingCommands
1020+
overridable
10161021
OxygenConcentrationMeasurement
10171022
OzoneConcentrationMeasurement
10181023
PAA
@@ -1051,6 +1056,7 @@ perfetto
10511056
periodicQueryTimeout
10521057
pexpect
10531058
pickString
1059+
PICSCODE
10541060
PID
10551061
Pigweed
10561062
PinCode
@@ -1366,6 +1372,7 @@ TestGenExample
13661372
TestGroupDemoConfig
13671373
TestMultiRead
13681374
TestName
1375+
TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke
13691376
TESTPASSWD
13701377
TestPICS
13711378
TESTSSID

.github/workflows/lint.yml

-3
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ jobs:
9797
--known-failure app/CommandHandlerInterface.h \
9898
--known-failure app/CommandSenderLegacyCallback.h \
9999
--known-failure app/data-model/ListLargeSystemExtensions.h \
100-
--known-failure app/EventHeader.h \
101-
--known-failure app/EventLoggingTypes.h \
102100
--known-failure app/ReadHandler.h \
103101
--known-failure app/ReadPrepareParams.h \
104102
--known-failure app/reporting/tests/MockReportScheduler.cpp \
@@ -118,7 +116,6 @@ jobs:
118116
--known-failure app/util/DataModelHandler.h \
119117
--known-failure app/util/ember-compatibility-functions.cpp \
120118
--known-failure app/util/endpoint-config-api.h \
121-
--known-failure app/util/endpoint-config-defines.h \
122119
--known-failure app/util/generic-callbacks.h \
123120
--known-failure app/util/generic-callback-stubs.cpp \
124121
--known-failure app/util/im-client-callbacks.h \

.github/workflows/tests.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ jobs:
508508
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
509509
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
510510
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
511-
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_4_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
512511
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_PWRTL_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
513512
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
514513
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'

.spellcheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ matrix:
6565
# converts markdown to HTML
6666
- pyspelling.filters.markdown:
6767
sources:
68-
- '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md'
68+
- '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md | !docs/testing/python.md | !docs/testing/ChipDeviceCtrlAPI.md'
6969
aspell:
7070
ignore-case: true
7171
camel-case: true

config/esp32/components/chip/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ menu "CHIP Core"
271271
Opens the commissioning window automatically at application boot time if
272272
the node is not yet commissioned.
273273

274+
config ENABLE_SNTP_TIME_SYNC
275+
bool "Enable SNTP time synchronization"
276+
default n
277+
help
278+
Enable this option to enable SNTP time synchronization
279+
274280
endmenu # "System Options"
275281

276282
menu "Security Options"

config/nrfconnect/chip-module/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ choice CHIP_FACTORY_DATA_CERT_SOURCE
206206

207207
endchoice
208208

209+
config CHIP_FACTORY_DATA_GENERATE_CD
210+
bool "Generates Certification Declaration to the output build directory"
211+
help
212+
Generates the new Certification Declaration and stores it to the output build directory.
213+
209214
if CHIP_FACTORY_DATA_CERT_SOURCE_USER
210215

211216
config CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT
@@ -230,6 +235,7 @@ endif # CHIP_FACTORY_DATA_CERT_SOURCE_USER
230235
# Configs for SPAKE2+ generation
231236
config CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER
232237
bool "Generate SPAKE2+ verifier"
238+
default y
233239
help
234240
Enables the generation of the SPAKE2+ verifier for the configured SPAKE2+
235241
passcode, iteration count and salt.

config/nrfconnect/chip-module/generate_factory_data.cmake

+26-17
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,25 @@ string(APPEND script_args "--hw_ver ${CONFIG_CHIP_DEVICE_HARDWARE_VERSION}\n")
4848
string(APPEND script_args "--hw_ver_str \"${CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING}\"\n")
4949

5050
# check if Rotating Device Id Unique Id should be generated
51-
if(NOT CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID)
52-
if(NOT DEFINED CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID)
53-
message(FATAL_ERROR "CHIP_DEVICE_ROTATING_DEVICE_UID was not provided. To generate it use CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=y")
51+
if(CONFIG_CHIP_ROTATING_DEVICE_ID)
52+
if(NOT CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID)
53+
if(NOT DEFINED CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID)
54+
message(FATAL_ERROR "CHIP_DEVICE_ROTATING_DEVICE_UID was not provided. To generate it use CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=y")
55+
else()
56+
string(APPEND script_args "--rd_uid \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n")
57+
endif()
5458
else()
55-
string(APPEND script_args "--rd_uid \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n")
59+
string(APPEND script_args "--generate_rd_uid\n")
5660
endif()
57-
else()
58-
string(APPEND script_args "--generate_rd_uid\n")
61+
endif()
62+
63+
if(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED OR CONFIG_CHIP_FACTORY_DATA_GENERATE_CD)
64+
find_program(chip_cert_exe NAMES chip-cert REQUIRED)
65+
string(APPEND script_args "--chip_cert_path ${chip_cert_exe}\n")
66+
endif()
67+
68+
if(CONFIG_CHIP_FACTORY_DATA_GENERATE_CD)
69+
string(APPEND script_args "--gen_cd\n")
5970
endif()
6071

6172
# for development purpose user can use default certs instead of generating or providing them
@@ -77,10 +88,8 @@ elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER)
7788
string(APPEND script_args "--dac_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT}\"\n")
7889
string(APPEND script_args "--dac_key \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY}\"\n")
7990
string(APPEND script_args "--pai_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT}\"\n")
80-
else()
81-
find_program(chip_cert_exe NAMES chip-cert REQUIRED)
82-
string(APPEND script_args "--gen_cd\n")
83-
string(APPEND script_args "--chip_cert_path ${chip_cert_exe}\n")
91+
elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED)
92+
string(APPEND script_args "--gen_certs\n")
8493
endif()
8594

8695
# add Password-Authenticated Key Exchange parameters
@@ -90,8 +99,14 @@ string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n
9099
string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n")
91100
string(APPEND script_args "--include_passcode\n")
92101
string(APPEND script_args "--overwrite\n")
93-
string(APPEND script_args "--product_finish ${CONFIG_CHIP_DEVICE_PRODUCT_FINISH}\n")
102+
# check if spake2 verifier should be generated using script
103+
if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER)
104+
# Spake2 verifier should be provided using kConfig
105+
string(APPEND script_args "--spake2_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n")
106+
endif()
94107

108+
# Product appearance
109+
string(APPEND script_args "--product_finish ${CONFIG_CHIP_DEVICE_PRODUCT_FINISH}\n")
95110
if(CONFIG_CHIP_DEVICE_PRODUCT_COLOR)
96111
string(APPEND script_args "--product_color ${CONFIG_CHIP_DEVICE_PRODUCT_COLOR}\n")
97112
endif()
@@ -100,12 +115,6 @@ if(CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES)
100115
string(APPEND script_args "--generate_onboarding\n")
101116
endif()
102117

103-
# check if spake2 verifier should be generated using script
104-
if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER)
105-
# Spake2 verifier should be provided using kConfig
106-
string(APPEND script_args "--spake2_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n")
107-
endif()
108-
109118
if(CONFIG_CHIP_DEVICE_ENABLE_KEY)
110119
# Add optional EnableKey that triggers user-specific action.
111120
string(APPEND script_args "--enable_key \"${CONFIG_CHIP_DEVICE_ENABLE_KEY}\"\n")

docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,25 @@ types in the SDK.
1616
- XML
1717
- Describes the structures, enums, attributes, commands, events etc.
1818
- Direct translation of the spec into code
19-
- src/app/zap-templates/zcl/data-model/chip/
19+
- [src/app/zap-templates/zcl/data-model/chip/](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip)
2020
- Cluster Implementation
2121

2222
- Client side - codegen, you write the glue
2323
- Server side - cpp implementation through Ember and / or
24-
AttributeAccessInterface & CommandHandlerInterface
24+
[AttributeAccessInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/AttributeAccessInterface.h)
25+
and
26+
[CommandHandlerInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/CommandHandlerInterface.h)
2527
- src/app/clusters/<your_cluster_name>
26-
- build file: src/app/chip_data_model.gni
28+
- build file:
29+
[src/app/chip_data_model.gni](https://github.com/project-chip/connectedhomeip/blob/master/src/app/chip_data_model.gni)
2730
- build file uses data from the codegen to auto-populate the cluster
2831
list.
2932
- Follow examples in there to get your code building into the image
3033
when selected in zap
3134

3235
- Device Type Definitions
3336
- XML defines conformance
34-
- src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
37+
- [src/app/zap-templates/zcl/data-model/chip/matter-devices.xml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml)
3538

3639
The following wiki page has a detailed description of how and where to add
3740
cluster and device type definitions so they are picked up properly by ZAP/ember
@@ -208,7 +211,7 @@ be used across examples
208211

209212
##### Command Handler Code
210213

211-
- CommandHandlerInterface
214+
- [CommandHandlerInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/CommandHandlerInterface.h)
212215
- Can use HandleCommand function for convenience (sets handled)
213216
- If not, need to set whether the command was handled
214217
- if no, falls through to ember by default

docs/guides/nrfconnect_factory_data_configuration.md

+63-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ data secure by applying hardware write protection.
5151
- [Building an example with factory data](#building-an-example-with-factory-data)
5252
- [Providing factory data parameters as a build argument list](#providing-factory-data-parameters-as-a-build-argument-list)
5353
- [Setting factory data parameters using interactive Kconfig interfaces](#setting-factory-data-parameters-using-interactive-kconfig-interfaces)
54+
- [Default Kconfig values and developing aspects](#default-kconfig-values-and-developing-aspects)
5455
- [Programming factory data](#programming-factory-data)
5556
- [Using own factory data implementation](#using-own-factory-data-implementation)
5657

@@ -272,6 +273,7 @@ To use this script, complete the following steps:
272273
273274
```
274275
--chip_cert_path <path to chip-cert executable>
276+
--gen_certs
275277
```
276278
277279
> **Note:** To generate new certificates, you need the `chip-cert`
@@ -293,7 +295,7 @@ To use this script, complete the following steps:
293295
--rd_uid <rotating device ID unique ID>
294296
```
295297
296-
- Generate a new ID and provide it ():
298+
- (optional) Generate a new ID and provide it:
297299
298300
```
299301
--generate_rd_uid
@@ -328,6 +330,17 @@ To use this script, complete the following steps:
328330
--product_color <color>
329331
```
330332
333+
j. (optional) Generate Certification Declaration for testing purposes
334+
335+
```
336+
--chip_cert_path <path to chip-cert executable>
337+
--gen_cd
338+
```
339+
340+
> **Note:** To generate new Certification Declaration, you need the
341+
> `chip-cert` executable. See the note at the end of this section to learn
342+
> how to get it.
343+
331344
4. Run the script using the prepared list of arguments:
332345
333346
```
@@ -794,6 +807,55 @@ snippet:
794807
> interfaces, read the
795808
> [Kconfig documentation](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/menuconfig.html).
796809
810+
### Default Kconfig values and developing aspects
811+
812+
Each factory data parameter has its default value reflected in the Kconfig. The
813+
list below shows some Kconfig settings that are configured in the nRF Connect
814+
build system and have an impact on the application. You can modify them to
815+
achieve the desired behavior of your application.
816+
817+
- The device uses the test certificates located in the
818+
`credentials/development/attestation/` directory, which are generated using
819+
all default values. If you want to change the default `vendor_id`,
820+
`product_id`, `vendor_name`, or `device_name` and generate new test
821+
certificates, add the `CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED=y`
822+
Kconfig option. Remember to build the `chip-cert` application and add it to
823+
the system PATH.
824+
825+
For developing a production-ready product, you need to write the
826+
certificates obtained during the certification process. To do this, add the
827+
`CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER=y` Kconfig option and set the
828+
appropriate paths for the following Kconfig options:
829+
830+
- `CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT`
831+
- `CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY`
832+
- `CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT`
833+
834+
- By default, the SPAKE2+ verifier is generated during each example's build.
835+
This means that this value will change automatically if you change any of
836+
the following parameters:
837+
838+
- `CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE`
839+
- `CONFIG_CHIP_DEVICE_SPAKE2_SALT`
840+
- `CONFIG_CHIP_DEVICE_SPAKE2_IT`
841+
842+
You can disable the generation of the SPAKE2+ verifier by setting the
843+
`CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER=n` Kconfig option. Then,
844+
you will need to provide the externally-generated SPAKE2+ verifier using the
845+
`CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER` Kconfig value.
846+
847+
- Generating the rotating device ID unique ID is disabled by default, but you
848+
can enable it by setting the `CONFIG_CHIP_ROTATING_DEVICE_ID=y` and
849+
`CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=y` Kconfig values.
850+
Moreover, if you set the `CONFIG_CHIP_ROTATING_DEVICE_ID` Kconfig option to
851+
`y` and disable the `CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID`
852+
Kconfig option, you will need to provide it manually using the
853+
`CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID` Kconfig value.
854+
855+
- You can generate the test Certification Declaration by using the
856+
`CONFIG_CHIP_FACTORY_DATA_GENERATE_CD=y` Kconfig option. Remember to build
857+
the `chip-cert` application and add it to the system PATH.
858+
797859
<hr>
798860
799861
## Programming factory data

0 commit comments

Comments
 (0)