Skip to content

Commit e8eb070

Browse files
authored
Merge branch 'master' into telink_zephyr_sdk_update
2 parents a6799db + dd0ce89 commit e8eb070

38 files changed

+964
-259
lines changed

.github/workflows/check-data-model-directory-updates.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,25 @@ jobs:
3636
python3 scripts/dm_xml_ci_change_enforcement.py data_model/1.3
3737
- name: Check for changes to 1.4 data_model directory without a SHA update
3838
run: |
39-
python3 scripts/dm_xml_ci_change_enforcement.py data_model/1.4
39+
python3 scripts/dm_xml_ci_change_enforcement.py data_model/1.4
40+
41+
check-data_model-build-file:
42+
name: Check that all data_model files are listed in the data_model_xmls.gni build file
43+
runs-on: ubuntu-latest
44+
container:
45+
image: ghcr.io/project-chip/chip-build
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
- name: Setup pip modules we use
50+
run: |
51+
python3 -m venv out/venv
52+
out/venv/bin/pip3 install \
53+
jinja2
54+
- name: Generate build file (data_model_xmls.gni)
55+
run: out/venv/bin/python3 src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py
56+
- name: Ensure git works in current working directory
57+
run: git config --global --add safe.directory `pwd`
58+
- name: Check for uncommited changes
59+
run: |
60+
git diff --exit-code HEAD -- src/python_testing/matter_testing_infrastructure/data_model_xmls.gni

docs/platforms/esp32/config_options.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ CONFIG_LWIP_IPV4=n
1515
### Executable component not in "main" component
1616

1717
The ESP-IDF framework allows renaming the main component, which can be useful if
18-
you want to place the app_main() function in a different component.
18+
you want to place the `app_main()` function in a different component.
1919

2020
For required changes in the executable component, please refer to the
2121
[esp-idf documentation](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/build-system.html#renaming-main-component).
2222

23-
If you're building applications that support Matter and want to place app_main()
24-
in a component other than main, use the following command:
25-
26-
```
27-
idf.py -DEXECUTABLE_COMPONENT_NAME="your_component" build
28-
```
23+
You need to list the required components in `idf_component_register()`. If this
24+
module contains Matter related code, you may need to include
25+
`chip, app_update, spi_flash, and nvs_flash` as `PRIV_REQUIRES`, along with any
26+
other necessary dependencies.

examples/chip-tool/commands/clusters/ModelCommand.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
class ModelCommand : public CHIPCommand
2929
{
3030
public:
31-
ModelCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig, bool supportsMultipleEndpoints = false) :
32-
CHIPCommand(commandName, credsIssuerConfig), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this),
31+
ModelCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig, bool supportsMultipleEndpoints = false,
32+
const char * helpText = nullptr) :
33+
CHIPCommand(commandName, credsIssuerConfig, helpText),
34+
mOnDeviceConnectedCallback(OnDeviceConnectedFn, this),
3335
mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), mSupportsMultipleEndpoints(supportsMultipleEndpoints)
3436
{}
3537

examples/chip-tool/commands/clusters/ReportCommand.h

+32-16
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
class ReportCommand : public InteractionModelReports, public ModelCommand, public chip::app::ReadClient::Callback
2727
{
2828
public:
29-
ReportCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) :
30-
InteractionModelReports(this), ModelCommand(commandName, credsIssuerConfig, /* supportsMultipleEndpoints = */ true)
29+
ReportCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig, const char * helpText = nullptr) :
30+
InteractionModelReports(this),
31+
ModelCommand(commandName, credsIssuerConfig, /* supportsMultipleEndpoints = */ true, helpText)
3132
{}
3233

3334
/////////// ReadClient Callback Interface /////////
@@ -133,8 +134,8 @@ class ReportCommand : public InteractionModelReports, public ModelCommand, publi
133134
class ReadCommand : public ReportCommand
134135
{
135136
protected:
136-
ReadCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) :
137-
ReportCommand(commandName, credsIssuerConfig)
137+
ReadCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig, const char * helpText = nullptr) :
138+
ReportCommand(commandName, credsIssuerConfig, helpText)
138139
{}
139140

140141
void OnDone(chip::app::ReadClient * aReadClient) override
@@ -147,8 +148,8 @@ class ReadCommand : public ReportCommand
147148
class SubscribeCommand : public ReportCommand
148149
{
149150
protected:
150-
SubscribeCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) :
151-
ReportCommand(commandName, credsIssuerConfig)
151+
SubscribeCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig, const char * helpText = nullptr) :
152+
ReportCommand(commandName, credsIssuerConfig, helpText)
152153
{}
153154

154155
void OnSubscriptionEstablished(chip::SubscriptionId subscriptionId) override
@@ -187,7 +188,8 @@ class SubscribeCommand : public ReportCommand
187188
class ReadAttribute : public ReadCommand
188189
{
189190
public:
190-
ReadAttribute(CredentialIssuerCommands * credsIssuerConfig) : ReadCommand("read-by-id", credsIssuerConfig)
191+
ReadAttribute(CredentialIssuerCommands * credsIssuerConfig) :
192+
ReadCommand("read-by-id", credsIssuerConfig, "Read attributes for the given attribute path (which may include wildcards).")
191193
{
192194
AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds,
193195
"Comma-separated list of cluster ids to read from (e.g. \"6\" or \"8,0x201\").\n Allowed to be 0xFFFFFFFF to "
@@ -198,7 +200,8 @@ class ReadAttribute : public ReadCommand
198200
}
199201

200202
ReadAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) :
201-
ReadCommand("read-by-id", credsIssuerConfig), mClusterIds(1, clusterId)
203+
ReadCommand("read-by-id", credsIssuerConfig, "Read attributes from this cluster; allows wildcard endpoint and attribute."),
204+
mClusterIds(1, clusterId)
202205
{
203206
AddAttributeIdArgument();
204207
AddCommonArguments();
@@ -245,7 +248,9 @@ class ReadAttribute : public ReadCommand
245248
class SubscribeAttribute : public SubscribeCommand
246249
{
247250
public:
248-
SubscribeAttribute(CredentialIssuerCommands * credsIssuerConfig) : SubscribeCommand("subscribe-by-id", credsIssuerConfig)
251+
SubscribeAttribute(CredentialIssuerCommands * credsIssuerConfig) :
252+
SubscribeCommand("subscribe-by-id", credsIssuerConfig,
253+
"Subscribe to attributes for the given attribute path (which may include wildcards).")
249254
{
250255
AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds,
251256
"Comma-separated list of cluster ids to subscribe to (e.g. \"6\" or \"8,0x201\").\n Allowed to be 0xFFFFFFFF "
@@ -256,7 +261,9 @@ class SubscribeAttribute : public SubscribeCommand
256261
}
257262

258263
SubscribeAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) :
259-
SubscribeCommand("subscribe-by-id", credsIssuerConfig), mClusterIds(1, clusterId)
264+
SubscribeCommand("subscribe-by-id", credsIssuerConfig,
265+
"Subscribe to attributes from this cluster; allows wildcard endpoint and attribute."),
266+
mClusterIds(1, clusterId)
260267
{
261268
AddAttributeIdArgument();
262269
AddCommonArguments();
@@ -312,7 +319,8 @@ class SubscribeAttribute : public SubscribeCommand
312319
class ReadEvent : public ReadCommand
313320
{
314321
public:
315-
ReadEvent(CredentialIssuerCommands * credsIssuerConfig) : ReadCommand("read-event-by-id", credsIssuerConfig)
322+
ReadEvent(CredentialIssuerCommands * credsIssuerConfig) :
323+
ReadCommand("read-event-by-id", credsIssuerConfig, "Read events for the given event path (which may include wildcards).")
316324
{
317325
AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds);
318326
AddArgument("event-id", 0, UINT32_MAX, &mEventIds);
@@ -322,7 +330,8 @@ class ReadEvent : public ReadCommand
322330
}
323331

324332
ReadEvent(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) :
325-
ReadCommand("read-event-by-id", credsIssuerConfig), mClusterIds(1, clusterId)
333+
ReadCommand("read-event-by-id", credsIssuerConfig, "Read events from this cluster; allows wildcard endpoint and event."),
334+
mClusterIds(1, clusterId)
326335
{
327336
AddArgument("event-id", 0, UINT32_MAX, &mEventIds);
328337
AddArgument("fabric-filtered", 0, 1, &mFabricFiltered);
@@ -356,7 +365,9 @@ class ReadEvent : public ReadCommand
356365
class SubscribeEvent : public SubscribeCommand
357366
{
358367
public:
359-
SubscribeEvent(CredentialIssuerCommands * credsIssuerConfig) : SubscribeCommand("subscribe-event-by-id", credsIssuerConfig)
368+
SubscribeEvent(CredentialIssuerCommands * credsIssuerConfig) :
369+
SubscribeCommand("subscribe-event-by-id", credsIssuerConfig,
370+
"Subscribe to events for the given event path (which may include wildcards).")
360371
{
361372
AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds);
362373
AddArgument("event-id", 0, UINT32_MAX, &mEventIds);
@@ -365,7 +376,9 @@ class SubscribeEvent : public SubscribeCommand
365376
}
366377

367378
SubscribeEvent(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) :
368-
SubscribeCommand("subscribe-event-by-id", credsIssuerConfig), mClusterIds(1, clusterId)
379+
SubscribeCommand("subscribe-event-by-id", credsIssuerConfig,
380+
"Subscribe to events from this cluster; allows wildcard endpoint and event."),
381+
mClusterIds(1, clusterId)
369382
{
370383
AddArgument("event-id", 0, UINT32_MAX, &mEventIds);
371384
AddCommonArguments();
@@ -447,7 +460,8 @@ class ReadNone : public ReadCommand
447460
class ReadAll : public ReadCommand
448461
{
449462
public:
450-
ReadAll(CredentialIssuerCommands * credsIssuerConfig) : ReadCommand("read-all", credsIssuerConfig)
463+
ReadAll(CredentialIssuerCommands * credsIssuerConfig) :
464+
ReadCommand("read-all", credsIssuerConfig, "Read attributes and events for the given paths (which may include wildcards).")
451465
{
452466
AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds,
453467
"Comma-separated list of cluster ids to read from (e.g. \"6\" or \"8,0x201\").\n Allowed to be 0xFFFFFFFF to "
@@ -513,7 +527,9 @@ class SubscribeNone : public SubscribeCommand
513527
class SubscribeAll : public SubscribeCommand
514528
{
515529
public:
516-
SubscribeAll(CredentialIssuerCommands * credsIssuerConfig) : SubscribeCommand("subscribe-all", credsIssuerConfig)
530+
SubscribeAll(CredentialIssuerCommands * credsIssuerConfig) :
531+
SubscribeCommand("subscribe-all", credsIssuerConfig,
532+
"Subscribe to attributes and events for the given paths (which may include wildcards).")
517533
{
518534
AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds,
519535
"Comma-separated list of cluster ids to read from (e.g. \"6\" or \"8,0x201\").\n Allowed to be 0xFFFFFFFF to "

examples/common/pigweed/rpc_services/Attributes.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
192192
return ::pw::Status::NotFound();
193193
}
194194

195-
Access::SubjectDescriptor subjectDescriptor{ .authMode = chip::Access::AuthMode::kPase };
195+
Access::SubjectDescriptor subjectDescriptor{ .authMode = chip::Access::AuthMode::kInternalDeviceAccess };
196196
app::DataModel::WriteAttributeRequest write_request;
197197
write_request.path = path;
198198
write_request.operationFlags.Set(app::DataModel::OperationFlags::kInternal);
@@ -343,7 +343,7 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
343343

344344
::pw::Status ReadAttributeIntoTlvBuffer(const app::ConcreteAttributePath & path, MutableByteSpan & tlvBuffer)
345345
{
346-
Access::SubjectDescriptor subjectDescriptor{ .authMode = chip::Access::AuthMode::kPase };
346+
Access::SubjectDescriptor subjectDescriptor{ .authMode = chip::Access::AuthMode::kInternalDeviceAccess };
347347
app::AttributeReportIBs::Builder attributeReports;
348348
TLV::TLVWriter writer;
349349
TLV::TLVType outer;

examples/platform/silabs/FreeRTOSConfig.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,8 @@ extern uint32_t SystemCoreClock;
174174

175175
/* Software timer related definitions. */
176176
#define configUSE_TIMERS (1)
177-
#ifdef SLI_SI917
177+
// Keep the timerTask at the highest prio as some of our stacks tasks leverage eventing with timers.
178178
#define configTIMER_TASK_PRIORITY (55) /* Highest priority */
179-
#else
180-
#define configTIMER_TASK_PRIORITY (40) /* Highest priority */
181-
#endif // SLI_SI917
182179
#define configTIMER_QUEUE_LENGTH (10)
183180
#define configTIMER_TASK_STACK_DEPTH (1024)
184181

@@ -313,7 +310,7 @@ standard names. */
313310
/* Thread local storage pointers used by the SDK */
314311

315312
#ifndef configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS
316-
#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 2
313+
#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0
317314
#endif
318315

319316
#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
105 : [Telink] Update Docker image (Zephyr SDK update)
1+
107 : [Telink] Update Docker image (Zephyr SDK update)

integrations/docker/images/stage-2/chip-build-java/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh
66
RUN set -x \
77
&& apt-get update \
88
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
9-
openjdk-11-jdk \
9+
openjdk-17-jdk \
1010
&& rm -rf /var/lib/apt/lists/ \
1111
&& : # last line
1212

@@ -20,4 +20,4 @@ RUN set -x \
2020
&& : # last line
2121

2222
ENV PATH $PATH:/usr/lib/kotlinc/bin
23-
ENV JAVA_PATH=/usr/lib/jvm/java-11-openjdk-amd64
23+
ENV JAVA_PATH=/usr/lib/jvm/java-17-openjdk-amd64

integrations/docker/images/stage-3/chip-build-android/Dockerfile

+9-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ RUN set -x \
2727
&& : # last line
2828

2929
# Download and install android command line tool (for installing `sdkmanager`)
30+
# We need create latest folder inide cmdline-tools, since latest android commandline tool looks for this latest folder
31+
# when running sdkmanager --licenses
3032
RUN set -x \
31-
&& wget -O /tmp/android-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip \
33+
&& wget -O /tmp/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
3234
&& cd /opt/android/sdk \
33-
&& unzip /tmp/android-tools.zip \
34-
&& rm -f /tmp/android-tools.zip \
35-
&& test -d /opt/android/sdk/tools \
35+
&& mkdir -p temp \
36+
&& unzip /tmp/cmdline-tools.zip -d temp \
37+
&& mkdir -p cmdline-tools/latest \
38+
&& cp -rf temp/cmdline-tools/* cmdline-tools/latest \
39+
&& rm -rf temp \
40+
&& test -d /opt/android/sdk/cmdline-tools \
3641
&& : # last line
3742

3843
# Download and install android NDK

scripts/tests/chiptest/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ def _GetDarwinFrameworkToolUnsupportedTests() -> Set[str]:
207207
"Test_TC_DGTHREAD_2_2", # Thread Network Diagnostics is not implemented under darwin.
208208
"Test_TC_DGTHREAD_2_3", # Thread Network Diagnostics is not implemented under darwin.
209209
"Test_TC_DGTHREAD_2_4", # Thread Network Diagnostics is not implemented under darwin.
210-
"Test_TC_FLABEL_2_1", # darwin-framework-tool does not support writing readonly attributes by name
211210
"Test_TC_GRPKEY_2_1", # darwin-framework-tool does not support writing readonly attributes by name
212211
"Test_TC_LCFG_2_1", # darwin-framework-tool does not support writing readonly attributes by name
213212
"Test_TC_OPCREDS_3_7", # darwin-framework-tool does not support the GetCommissionerRootCertificate command.

src/access/AccessControl.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ char GetAuthModeStringForLogging(AuthMode authMode)
9898
{
9999
case AuthMode::kNone:
100100
return 'n';
101+
case AuthMode::kInternalDeviceAccess:
102+
return 'i';
101103
case AuthMode::kPase:
102104
return 'p';
103105
case AuthMode::kCase:

src/access/AuthMode.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ namespace Access {
2727
// Auth mode should have only one value expressed, which should not be None.
2828
enum class AuthMode : uint8_t
2929
{
30-
kNone = 0,
31-
kPase = 1 << 5,
32-
kCase = 1 << 6,
33-
kGroup = 1 << 7
30+
kNone = 0,
31+
kInternalDeviceAccess = 1 << 4, // Not part of an external interaction
32+
kPase = 1 << 5,
33+
kCase = 1 << 6,
34+
kGroup = 1 << 7
3435
};
3536

3637
} // namespace Access

src/app/data-model-provider/Provider.h

+10
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ class Provider : public ProviderMetadataTree
8585
/// This includes cases where command handling and value return will be done asynchronously.
8686
/// - returning a value other than Success implies an error reply (error and data are mutually exclusive)
8787
///
88+
/// Preconditions:
89+
/// - `request.path` MUST be valid: Invoke` is only guaranteed to function correctly for
90+
/// VALID paths (i.e. use `ProviderMetadataTree::AcceptedCommands` to check). This is
91+
/// because we assume ACL or flags (like timed invoke) have to happen before invoking
92+
/// this command.
93+
/// - TODO: as interfaces are updated, we may want to make the above requirement more
94+
/// relaxed, as it seems desirable for users of this interface to have guaranteed
95+
/// behavior (like error on invalid paths) where as today this seems unclear as some
96+
/// command intercepts do not validate if the path is valid per endpoints.
97+
///
8898
/// Return value expectations:
8999
/// - if a response has been placed into `handler` then std::nullopt MUST be returned. In particular
90100
/// note that CHIP_NO_ERROR is NOT the same as std::nullopt:

src/app/dynamic_server/AccessControl.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ class AccessControlDelegate : public Access::AccessControl::Delegate
6363
return CHIP_ERROR_ACCESS_DENIED;
6464
}
6565

66-
if (subjectDescriptor.authMode != AuthMode::kCase && subjectDescriptor.authMode != AuthMode::kPase)
66+
if (subjectDescriptor.authMode != AuthMode::kCase && subjectDescriptor.authMode != AuthMode::kPase &&
67+
subjectDescriptor.authMode != AuthMode::kInternalDeviceAccess)
6768
{
6869
// No idea who is asking; deny for now.
6970
return CHIP_ERROR_ACCESS_DENIED;

0 commit comments

Comments
 (0)