diff --git a/README.md b/README.md index f6f2b9324..97f945cc7 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Espressif's SDK for Matter is the official Matter development framework for ESP3 ## Supported ESP-IDF and connectedhomeip versions -- This SDK currently works with [commit bc8c9ece1](https://github.com/espressif/connectedhomeip/tree/bc8c9ece1) of connectedhomeip. +- This SDK currently works with [tag v1.1.0.1](https://github.com/project-chip/connectedhomeip/tree/v1.1.0.1) of connectedhomeip. - For ESP32, ESP32-C3, and ESP32-S3, ESP-IDF [v5.0.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.0.1) is required. -- For ESP32-C2, ESP32-H2(preview) and ESP32-C6(preview) and Zigbee Bridge example, ESP-IDF branch at [commit bb9200ace](https://github.com/espressif/esp-idf/tree/bb9200ace) in branch release/v5.1 should be used. +- For ESP32-C2, ESP32-H2(preview) and ESP32-C6(preview) and Zigbee Bridge example, ESP-IDF branch at [commit 420ebd208](https://github.com/espressif/esp-idf/tree/420ebd208) in branch release/v5.1 should be used. ## Documentation diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index 110ce6281..995c61312 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -160,78 +160,6 @@ static esp_err_t esp_matter_command_callback_commissioning_complete(const Concre return ESP_OK; } -static esp_err_t esp_matter_command_callback_scan_networks(const ConcreteCommandPath &command_path, TLVReader &tlv_data, - void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterScanNetworksCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - -static esp_err_t esp_matter_command_callback_add_or_update_wifi_network(const ConcreteCommandPath &command_path, - TLVReader &tlv_data, void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterAddOrUpdateWiFiNetworkCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - -static esp_err_t esp_matter_command_callback_add_or_update_thread_network(const ConcreteCommandPath &command_path, - TLVReader &tlv_data, void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterAddOrUpdateThreadNetworkCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - -static esp_err_t esp_matter_command_callback_remove_network(const ConcreteCommandPath &command_path, - TLVReader &tlv_data, void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterRemoveNetworkCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - -static esp_err_t esp_matter_command_callback_connect_network(const ConcreteCommandPath &command_path, - TLVReader &tlv_data, void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterConnectNetworkCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - -static esp_err_t esp_matter_command_callback_reorder_network(const ConcreteCommandPath &command_path, - TLVReader &tlv_data, void *opaque_ptr) -{ - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::DecodableType command_data; - CHIP_ERROR error = Decode(tlv_data, command_data); - if (error == CHIP_NO_ERROR) { - emberAfNetworkCommissioningClusterReorderNetworkCallback((CommandHandler *)opaque_ptr, command_path, - command_data); - } - return ESP_OK; -} - static esp_err_t esp_matter_command_callback_open_commissioning_window(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr) { @@ -1474,37 +1402,37 @@ namespace command { command_t *create_scan_networks(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ScanNetworks::Id, COMMAND_FLAG_ACCEPTED, - esp_matter_command_callback_scan_networks); + NULL); } command_t *create_add_or_update_wifi_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id, - COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_or_update_wifi_network); + COMMAND_FLAG_ACCEPTED, NULL); } command_t *create_add_or_update_thread_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id, - COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_or_update_thread_network); + COMMAND_FLAG_ACCEPTED, NULL); } command_t *create_remove_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::RemoveNetwork::Id, - COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_network); + COMMAND_FLAG_ACCEPTED, NULL); } command_t *create_connect_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ConnectNetwork::Id, - COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_connect_network); + COMMAND_FLAG_ACCEPTED, NULL); } command_t *create_reorder_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ReorderNetwork::Id, - COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_reorder_network); + COMMAND_FLAG_ACCEPTED, NULL); } command_t *create_scan_networks_response(cluster_t *cluster) diff --git a/components/esp_matter/esp_matter_feature.cpp b/components/esp_matter/esp_matter_feature.cpp index e35d8c252..c65328363 100644 --- a/components/esp_matter/esp_matter_feature.cpp +++ b/components/esp_matter/esp_matter_feature.cpp @@ -381,7 +381,7 @@ namespace lift { uint32_t get_id() { - return (uint32_t)WindowCovering::Feature::kLift; + return (uint32_t)WindowCovering::WindowCoveringFeature::kLift; } esp_err_t add(cluster_t *cluster, config_t *config) @@ -409,7 +409,7 @@ namespace tilt { uint32_t get_id() { - return (uint32_t)WindowCovering::Feature::kTilt; + return (uint32_t)WindowCovering::WindowCoveringFeature::kTilt; } esp_err_t add(cluster_t *cluster, config_t *config) @@ -431,7 +431,7 @@ namespace position_aware_lift { uint32_t get_id() { - return (uint32_t)WindowCovering::Feature::kPositionAwareLift; + return (uint32_t)WindowCovering::WindowCoveringFeature::kPositionAwareLift; } esp_err_t add(cluster_t *cluster, config_t *config) @@ -472,7 +472,7 @@ namespace absolute_position { uint32_t get_id() { - return (uint32_t)WindowCovering::Feature::kAbsolutePosition; + return (uint32_t)WindowCovering::WindowCoveringFeature::kAbsolutePosition; } esp_err_t add(cluster_t *cluster, config_t *config) @@ -535,7 +535,7 @@ namespace position_aware_tilt { uint32_t get_id() { - return (uint32_t)WindowCovering::Feature::kPositionAwareTilt; + return (uint32_t)WindowCovering::WindowCoveringFeature::kPositionAwareTilt; } esp_err_t add(cluster_t *cluster, config_t *config) diff --git a/connectedhomeip/connectedhomeip b/connectedhomeip/connectedhomeip index bd17b9f52..8f66f4215 160000 --- a/connectedhomeip/connectedhomeip +++ b/connectedhomeip/connectedhomeip @@ -1 +1 @@ -Subproject commit bd17b9f52f41eeac5aaa74c1ecf3a76e06dd6958 +Subproject commit 8f66f4215bc0708efc8cc73bda80620e67d8955f diff --git a/docs/en/developing.rst b/docs/en/developing.rst index 13bd9b3f8..30766fb92 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -24,7 +24,7 @@ Additionally, we also support developing on Windows Host using WSL. The Prerequisites for ESP-IDF and Matter: - Please see `Prerequisites `__ for ESP IDF. -- Please get the `Prerequisites `__ for Matter. +- Please get the `Prerequisites `__ for Matter. @@ -61,7 +61,7 @@ For using VSCode for development, please check `Developing in WSL ", "SYSTEM_PLATFORM_CONFIG_INCLUDE=", "CHIP_CONFIG_SOFTWARE_VERSION_NUMBER=${chip_config_software_version_number}", + "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}", ] if (chip_enable_ota_requestor) { diff --git a/examples/common/external_platform/BUILD.gn b/examples/common/external_platform/BUILD.gn index 9b72832b4..fb5543f54 100644 --- a/examples/common/external_platform/BUILD.gn +++ b/examples/common/external_platform/BUILD.gn @@ -27,6 +27,7 @@ declare_args() { chip_enable_chipoble = true chip_bt_nimble_enabled = true chip_bt_bluedroid_enabled = true + chip_max_discovered_ip_addresses = 5 } config("ESP32_custom_include") { @@ -56,6 +57,7 @@ buildconfig_header("custom_buildconfig") { "INET_CONFIG_INCLUDE=", "SYSTEM_PLATFORM_CONFIG_INCLUDE=", "CHIP_CONFIG_SOFTWARE_VERSION_NUMBER=${chip_config_software_version_number}", + "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}", ] if (chip_enable_ota_requestor) { diff --git a/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp b/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp index 92e288763..eee8d1b96 100644 --- a/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp +++ b/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp @@ -691,81 +691,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } -namespace NetworkCommissioning { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ScanNetworks::Id: { - Commands::ScanNetworks::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::AddOrUpdateWiFiNetwork::Id: { - Commands::AddOrUpdateWiFiNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterAddOrUpdateWiFiNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::AddOrUpdateThreadNetwork::Id: { - Commands::AddOrUpdateThreadNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterAddOrUpdateThreadNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveNetwork::Id: { - Commands::RemoveNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ConnectNetwork::Id: { - Commands::ConnectNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterConnectNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ReorderNetwork::Id: { - Commands::ReorderNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterReorderNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} - namespace OtaSoftwareUpdateRequestor { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1109,9 +1034,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::LevelControl::Id: Clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::NetworkCommissioning::Id: - Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::OtaSoftwareUpdateRequestor::Id: Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break;