From 6a2ed584ebe5f9888047c7c78eaba60e54dea9e4 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 10 Sep 2025 12:39:26 +0530 Subject: [PATCH] connectedhomeip: update submodule to 2960abcbcf - Use the correct ESP32SecureCertDataProvider.h - update the readme to list v1.4.2 - ci: bump idf-component-manager to v2.2 for external platform builds - idf.py build complaining about older v2.1.2 of idf-component-manager so bumping it. - components/esp_matter: run the generate_zap_common_files.py, and commit delta --- .gitlab-ci.yml | 8 +-- README.md | 20 +++--- .../zap_common/zap-generated/access.h | 3 + connectedhomeip/connectedhomeip | 2 +- .../ESP32SecureCertDataProvider.h | 63 +------------------ .../ESP32SecureCertDataProvider.h | 62 ------------------ 6 files changed, 18 insertions(+), 140 deletions(-) mode change 100644 => 120000 examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h delete mode 100644 examples/common/external_platform/ESP32SecureCertDataProvider.h diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3912a9d76..e78c6d8eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ variables: IDF_CHECKOUT_REF: "v5.4.1" # This variable represents the short hash of the connectedhomeip submodule. # Note: Do change this short hash on submodule update MRs. - CHIP_SHORT_HASH: "320b9a6f6c" + CHIP_SHORT_HASH: "bc661692ad" DOCKER_IMAGE_NAME: "espressif/chip-idf" .add_gitlab_ssh_key: &add_gitlab_ssh_key | @@ -112,9 +112,7 @@ variables: - rm -rf ${ESP_MATTER_PATH}/../platform - mkdir -p ${ESP_MATTER_PATH}/../platform - cp -r ${CHIP_SUBMODULE_PATH}/src/platform/ESP32 $ESP_MATTER_PATH/../platform/ESP32_custom - # We have modified the ESP32SecureCertDataProvider.h file to include the ESP32FactoryDataProvider.h - # So copying all files from the external_platform directory. - - cp ${ESP_MATTER_PATH}/examples/common/external_platform/* $ESP_MATTER_PATH/../platform/ESP32_custom/ + - cp ${ESP_MATTER_PATH}/examples/common/external_platform/BUILD.gn $ESP_MATTER_PATH/../platform/ESP32_custom - cd ${ESP_MATTER_PATH}/examples/light - cp sdkconfig.defaults sdkconfig.defaults.backup - cp sdkconfig.defaults.ext_plat_ci sdkconfig.defaults @@ -278,7 +276,7 @@ build_image: - *add_gitlab_ssh_key - *get_build_caches - *setup_idf - - pip install 'idf-component-manager~=2.1.2' + - pip install 'idf-component-manager~=2.2' - cd ${ESP_MATTER_PATH} - mkdir -p ${REPOS_PATH} - *update_build_caches diff --git a/README.md b/README.md index bfe9f9a25..e529913bd 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,15 @@ Espressif's SDK for Matter is the official Matter development framework for ESP3 ## Supported Matter specification versions -| Matter Specification Version | Supported Branch | -|:----------------------------:|:-------------------------------------------------------------------------:| -| v1.0 | [release/v1.0](https://github.com/espressif/esp-matter/tree/release/v1.0) | -| v1.1 | [release/v1.1](https://github.com/espressif/esp-matter/tree/release/v1.1) | -| v1.2 | [release/v1.2](https://github.com/espressif/esp-matter/tree/release/v1.2) | -| v1.3 | [release/v1.3](https://github.com/espressif/esp-matter/tree/release/v1.3) | -| v1.4 | [release/v1.4](https://github.com/espressif/esp-matter/tree/release/v1.4) | -| v1.5 (Ongoing effort) | [main](https://github.com/espressif/esp-matter/tree/main) | +| Matter Specification Version | Supported Branch | +|:----------------------------:|:-----------------------------------------------------------------------------:| +| v1.0 | [release/v1.0](https://github.com/espressif/esp-matter/tree/release/v1.0) | +| v1.1 | [release/v1.1](https://github.com/espressif/esp-matter/tree/release/v1.1) | +| v1.2 | [release/v1.2](https://github.com/espressif/esp-matter/tree/release/v1.2) | +| v1.3 | [release/v1.3](https://github.com/espressif/esp-matter/tree/release/v1.3) | +| v1.4 | [release/v1.4](https://github.com/espressif/esp-matter/tree/release/v1.4) | +| v1.4.2 | [release/v1.4.2](https://github.com/espressif/esp-matter/tree/release/v1.4.2) | +| v1.5 (Ongoing effort) | [main](https://github.com/espressif/esp-matter/tree/main) | ## Getting the repositories @@ -27,8 +28,7 @@ For efficient cloning of the ESP-Matter repository, please refer section in the ESP-Matter Programming Guide. ## Supported ESP-IDF and connectedhomeip versions - -- This SDK currently works with commit [320b9a6f6c] (https://github.com/project-chip/connectedhomeip/tree/320b9a6f66) of connectedhomeip. +- This SDK currently works with commit [bc661692ad] (https://github.com/project-chip/connectedhomeip/tree/bc661692ad) of connectedhomeip. - For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.4.1](https://github.com/espressif/esp-idf/tree/v5.4.1). - For ESP32C5, it is recommended to utilize ESP-IDF [98cd765953](https://github.com/espressif/esp-idf/commit/98cd765953dfe0e7bb1c5df8367e1b54bd966cce). diff --git a/components/esp_matter/zap_common/zap-generated/access.h b/components/esp_matter/zap_common/zap-generated/access.h index 20d66c17d..b54a5828d 100644 --- a/components/esp_matter/zap_common/zap-generated/access.h +++ b/components/esp_matter/zap_common/zap-generated/access.h @@ -605,6 +605,7 @@ 0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ 0x00000004, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ 0x0000001F, /* Cluster: Access Control, Command: ReviewFabricRestrictions, Privilege: administer */ \ + 0x0000002A, /* Cluster: OTA Software Update Requestor, Command: AnnounceOTAProvider, Privilege: administer */ \ 0x00000030, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 0x00000030, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 0x00000030, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ @@ -752,6 +753,7 @@ 0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ 0x00000005, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ 0x00000000, /* Cluster: Access Control, Command: ReviewFabricRestrictions, Privilege: administer */ \ + 0x00000000, /* Cluster: OTA Software Update Requestor, Command: AnnounceOTAProvider, Privilege: administer */ \ 0x00000000, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 0x00000002, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 0x00000004, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ @@ -899,6 +901,7 @@ chip::Access::Privilege::kManage, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Command: ReviewFabricRestrictions, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: OTA Software Update Requestor, Command: AnnounceOTAProvider, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ diff --git a/connectedhomeip/connectedhomeip b/connectedhomeip/connectedhomeip index 320b9a6f6..bc661692a 160000 --- a/connectedhomeip/connectedhomeip +++ b/connectedhomeip/connectedhomeip @@ -1 +1 @@ -Subproject commit 320b9a6f6c49cc3877701bbdc1e631edf32b802b +Subproject commit bc661692ad988565230305be0ecdffca3b37b242 diff --git a/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h b/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h deleted file mode 100644 index c449d7e70..000000000 --- a/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2024 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. - */ - -/* - * ESP32FactoryDataProvider reads the commissionable data and device instance information from the factory partition. - * This implementation extends that behaviour to read the commissionable data from secure cert partition. - * It also extends the behaviour to read the unique id for generating rotating device identifier from the secure cert - * partition. - * - */ - -#pragma once - -#include -#include -// original file includes from ESP32 directory and hence it won't be able to find the ESP32FactoryDataProvider.h -// so switching to the external_platform directory, till the connectedhomeip repo switches to quoted includes. -#include "ESP32FactoryDataProvider.h" - -#include - -namespace chip { -namespace DeviceLayer { - -class ESP32SecureCertDataProvider : public ESP32FactoryDataProvider -{ -public: - // CommissionableDataProvider implementation - CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; - CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; - CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override; - CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override; - -#if CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER - // GetRotatingDeviceIdUniqueId from GenericDeviceInstanceInfoProvider - CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; -#endif // CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER - - // esp-secure-cert partition contains two 32-byte fixed random values that are set during manufacturing - // and remain constant for the lifetime of the device. These are unique per device and can be used - // for device identification, serial numbers, or any other purpose requiring a device-specific identifier. - static constexpr uint32_t kFixedRandomValueLength = 32; - static CHIP_ERROR GetFixedRandom1(MutableByteSpan & randomBuf); - static CHIP_ERROR GetFixedRandom2(MutableByteSpan & randomBuf); -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h b/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h new file mode 120000 index 000000000..e87008ad5 --- /dev/null +++ b/examples/common/blemesh_platform/platform/ESP32_custom/ESP32SecureCertDataProvider.h @@ -0,0 +1 @@ +../../../../../connectedhomeip/connectedhomeip/src/platform/ESP32/ESP32SecureCertDataProvider.h \ No newline at end of file diff --git a/examples/common/external_platform/ESP32SecureCertDataProvider.h b/examples/common/external_platform/ESP32SecureCertDataProvider.h deleted file mode 100644 index c449d7e70..000000000 --- a/examples/common/external_platform/ESP32SecureCertDataProvider.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2024 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. - */ - -/* - * ESP32FactoryDataProvider reads the commissionable data and device instance information from the factory partition. - * This implementation extends that behaviour to read the commissionable data from secure cert partition. - * It also extends the behaviour to read the unique id for generating rotating device identifier from the secure cert - * partition. - * - */ - -#pragma once - -#include -#include -// original file includes from ESP32 directory and hence it won't be able to find the ESP32FactoryDataProvider.h -// so switching to the external_platform directory, till the connectedhomeip repo switches to quoted includes. -#include "ESP32FactoryDataProvider.h" - -#include - -namespace chip { -namespace DeviceLayer { - -class ESP32SecureCertDataProvider : public ESP32FactoryDataProvider -{ -public: - // CommissionableDataProvider implementation - CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; - CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; - CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override; - CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override; - -#if CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER - // GetRotatingDeviceIdUniqueId from GenericDeviceInstanceInfoProvider - CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; -#endif // CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER - - // esp-secure-cert partition contains two 32-byte fixed random values that are set during manufacturing - // and remain constant for the lifetime of the device. These are unique per device and can be used - // for device identification, serial numbers, or any other purpose requiring a device-specific identifier. - static constexpr uint32_t kFixedRandomValueLength = 32; - static CHIP_ERROR GetFixedRandom1(MutableByteSpan & randomBuf); - static CHIP_ERROR GetFixedRandom2(MutableByteSpan & randomBuf); -}; - -} // namespace DeviceLayer -} // namespace chip