Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync csa branch with main #316

Merged
merged 19 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5becd81
Initial implementation of camera-controller app (#37835)
yufengwangca Mar 5, 2025
7dfd606
Adding a Security Policy that redirects to CSA's Vulnerability Report…
Alami-Amine Mar 5, 2025
7c581bc
Energy app: Enable ConnectMaxTimeSeconds and ScanMaxTimeSeconds attri…
jadhavrohit924 Mar 5, 2025
8c011e0
Only use kMaxIfNameLength instead of IFNAMSIZ (#37859)
bukepo Mar 5, 2025
a4530cb
Parametrize app-common zap-generated path (#37816)
maciejbaczmanski Mar 5, 2025
d0ae88d
Minor fixes for nm mapping (#37873)
andy31415 Mar 5, 2025
52213a8
Disable ABS feature in windowcovering (#37853)
sxb427 Mar 5, 2025
a579c8d
Support On/Off controls to fan device (#37814)
sxb427 Mar 5, 2025
2aaf2f8
Generate dishwasher alarm alchemy (#37861)
tersal Mar 5, 2025
cf45d5d
Fix attr read overflows (#36003)
witowsg-amazon Mar 5, 2025
1eb2421
ESP32: Add menuconfig to use PSRAM for Matter memory allocation (#37482)
wqx6 Mar 6, 2025
ee95bd2
[ICD] Expose SetModeDurations via ICDManager (#37887)
yunhanw-google Mar 6, 2025
607fdca
Darwin style update: remove extra namespace prefixes (#37888)
andy31415 Mar 6, 2025
3d77651
fix total operation hours value get incorrect (#37891)
Jerry-ESP Mar 6, 2025
39ccad9
Generate BooleanState with Alchemy (#37857)
tersal Mar 6, 2025
89a8496
Fix clang-tidy error in PersistedCounter.h (#37855)
adigie Mar 6, 2025
cfcfef3
[NXP] Upstream sdk 24.12 (#37848)
Martin-NXP Mar 6, 2025
b38c5b8
Add a server cluster interface registry for use by codegen. (#37850)
andy31415 Mar 6, 2025
7d7d638
fix(testing): Move CloseSession call after factory reset in TC_CGEN_2…
swan-amazon Mar 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,17 @@ jobs:
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug camera-app \
out/linux-x64-camera/chip-camera-app \
/tmp/bloat_reports/
/tmp/bloat_reports/
- name: Build example Camera Controller App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-camera-controller \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug camera-controller \
out/linux-x64-camera-controller/camera-controller \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
Expand Down
11 changes: 11 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Security Policy

Thank you for helping us keep the Matter SDK secure!

## Reporting a Vulnerability

To report a security vulnerability, please follow the instructions at
[Report a Vulnerability | How to Report - CSA-IOT](https://csa-iot.org/vulnerability-reporting/).

We appreciate responsible disclosure and will work to address any issues
promptly.
6 changes: 5 additions & 1 deletion config/common/cmake/chip_gn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ if (NOT CHIP_ROOT)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../.. REALPATH)
endif()

if (NOT CHIP_APP_ZAP_DIR)
get_filename_component(CHIP_APP_ZAP_DIR ${CHIP_ROOT}/zzz_generated/app-common REALPATH)
endif()

# ==============================================================================
# Find required programs
# ==============================================================================
Expand Down Expand Up @@ -165,7 +169,7 @@ macro(matter_build target)
${CHIP_ROOT}/third_party/nlassert/repo/include
${CHIP_ROOT}/third_party/nlio/repo/include
${CHIP_ROOT}/third_party/nlfaultinjection/include
${CHIP_ROOT}/zzz_generated/app-common
${CHIP_APP_ZAP_DIR}
${CMAKE_CURRENT_BINARY_DIR}/gen/include
)

Expand Down
6 changes: 6 additions & 0 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ include(generate_factory_data.cmake)
if (NOT CHIP_ROOT)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
endif()

if (NOT CHIP_APP_ZAP_DIR)
get_filename_component(CHIP_APP_ZAP_DIR ${CHIP_ROOT}/zzz_generated/app-common REALPATH)
endif()

get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/nrfconnect/chip-gn REALPATH)
get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH)

Expand Down Expand Up @@ -132,6 +137,7 @@ matter_common_gn_args(
matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
matter_add_gn_arg_string("chip_app_zap_dir" ${CHIP_APP_ZAP_DIR})
matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG)
matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
Expand Down
8 changes: 8 additions & 0 deletions docs/examples/camera_controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Camera

```{toctree}
:glob:
:maxdepth: 1
camera-controller/README
```
Original file line number Diff line number Diff line change
Expand Up @@ -3648,7 +3648,7 @@ cluster SmokeCoAlarm = 92 {

/** Attributes and commands for configuring the Dishwasher alarm. */
cluster DishwasherAlarm = 93 {
revision 1; // NOTE: Default/not specifically set
revision 1;

bitmap AlarmBitmap : bitmap32 {
kInflowError = 0x1;
Expand Down Expand Up @@ -3689,9 +3689,9 @@ cluster DishwasherAlarm = 93 {
AlarmBitmap mask = 0;
}

/** Reset alarm */
/** This command resets active and latched alarms (if possible). */
command Reset(ResetRequest): DefaultSuccess = 0;
/** Modify enabled alarms */
/** This command allows a client to request that an alarm be enabled or suppressed at the server. */
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
}

Expand Down
25 changes: 25 additions & 0 deletions examples/camera-controller/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
import("//args.gni")
}
117 changes: 117 additions & 0 deletions examples/camera-controller/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("//build_overrides/editline.gni")
import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/examples/camera-controller/camera-controller.gni")
import("${chip_root}/src/lib/core/core.gni")

assert(chip_build_tools)

config("config") {
include_dirs = [
".",
"${chip_root}/examples/common",
"${chip_root}/zzz_generated/app-common/app-common",
"${chip_root}/zzz_generated/chip-tool",
"${chip_root}/src/lib",
]

defines = [ "CONFIG_USE_SEPARATE_EVENTLOOP=${config_use_separate_eventloop}" ]

# Note: CONFIG_USE_LOCAL_STORAGE is tested for via #ifdef, not #if.
if (config_use_local_storage) {
defines += [ "CONFIG_USE_LOCAL_STORAGE" ]
}
}

static_library("camera-controller-utils") {
sources = [
"${chip_root}/src/controller/ExamplePersistentStorage.cpp",
"${chip_root}/src/controller/ExamplePersistentStorage.h",
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp",
"commands/clusters/ModelCommand.cpp",
"commands/clusters/ModelCommand.h",
"commands/clusters/ReportCommand.cpp",
"commands/clusters/ReportCommand.h",
"commands/common/CHIPCommand.cpp",
"commands/common/CHIPCommand.h",
"commands/common/Command.cpp",
"commands/common/Command.h",
"commands/common/Commands.cpp",
"commands/common/Commands.h",
"commands/common/CredentialIssuerCommands.h",
"commands/common/HexConversion.h",
"commands/common/RemoteDataModelLogger.cpp",
"commands/common/RemoteDataModelLogger.h",
"commands/pairing/OpenCommissioningWindowCommand.cpp",
"commands/pairing/OpenCommissioningWindowCommand.h",
"commands/pairing/PairingCommand.cpp",
"commands/pairing/ToTLVCert.cpp",
]

deps = [ "${chip_root}/src/app:events" ]

sources += [ "commands/interactive/InteractiveCommands.cpp" ]
deps += [
"${chip_root}/src/platform/logging:headers",
"${editline_root}:editline",
]

if (chip_device_platform == "darwin") {
sources += [ "commands/common/DeviceScanner.cpp" ]
}

public_deps = [
"${chip_root}/examples/common/tracing:commandline",
"${chip_root}/src/app/server",
"${chip_root}/src/app/tests/suites/commands/interaction_model",
"${chip_root}/src/controller/data_model",
"${chip_root}/src/credentials:file_attestation_trust_store",
"${chip_root}/src/lib",
"${chip_root}/src/lib/core:types",
"${chip_root}/src/lib/support/jsontlv",
"${chip_root}/src/platform",
"${chip_root}/third_party/inipp",
"${chip_root}/third_party/jsoncpp",
]

public_configs = [ ":config" ]

if (chip_enable_transport_trace) {
public_deps +=
[ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ]
}

output_dir = root_out_dir
}

executable("camera-controller") {
sources = [ "main.cpp" ]

deps = [
":camera-controller-utils",
"${chip_root}/src/platform/logging:stdio",
]

output_dir = root_out_dir
}

group("default") {
deps = [ ":camera-controller" ]
}
25 changes: 25 additions & 0 deletions examples/camera-controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Matter Camera Controller Example

This example application demonstrates the CHIP Camera Controller running on a
Linux platform and explains how to build and run the Camera Controller Example
on Linux.

In a typical setup, the Camera Controller app manages a CameraDevice app running
on a Raspberry Pi. The CameraDevice captures and encodes the video feed before
streaming it through a WebRTC track, while the CameraController receives this
video stream and displays it, creating a complete end-to-end camera solution.

---

- [Building the Example Application](#building-the-example-application)

---

## Building the Example Application

For Linux host example:

```
source scripts/activate.sh
./scripts/build/build_examples.py --target linux-x64-camera-controller build
```
34 changes: 34 additions & 0 deletions examples/camera-controller/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")

import("${chip_root}/config/standalone/args.gni")

chip_device_project_config_include = "<CHIPProjectAppConfig.h>"
chip_project_config_include = "<CHIPProjectAppConfig.h>"
chip_system_project_config_include = "<SystemProjectConfig.h>"

chip_project_config_include_dirs =
[ "${chip_root}/examples/camera-controller/include" ]
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]

matter_enable_tracing_support = true

matter_log_json_payload_hex = true
matter_log_json_payload_decode_full = true

# make camera-controller very strict by default
chip_tlv_validate_char_string_on_read = true
chip_tlv_validate_char_string_on_write = true
1 change: 1 addition & 0 deletions examples/camera-controller/build_overrides
22 changes: 22 additions & 0 deletions examples/camera-controller/camera-controller.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

declare_args() {
# Use a separate eventloop for CHIP tasks
config_use_separate_eventloop = true
config_use_local_storage = true
}
Loading
Loading