submodule: update connectedhomeip to v1.1.0.1 tag

This commit is contained in:
Shu Chen
2023-04-28 13:50:37 +08:00
parent 592e1358f3
commit ecddefbfdd
9 changed files with 36 additions and 170 deletions
+2 -2
View File
@@ -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
+6 -78
View File
@@ -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)
+5 -5
View File
@@ -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)
+2 -2
View File
@@ -24,7 +24,7 @@ Additionally, we also support developing on Windows Host using WSL.
The Prerequisites for ESP-IDF and Matter:
- Please see `Prerequisites <https://docs.espressif.com/projects/esp-idf/en/v5.0.1/esp32/get-started/index.html#step-1-install-prerequisites>`__ for ESP IDF.
- Please get the `Prerequisites <https://github.com/espressif/connectedhomeip/tree/bb9200ace/docs/guides/BUILDING.md#prerequisites>`__ for Matter.
- Please get the `Prerequisites <https://github.com/espressif/connectedhomeip/blob/v1.1.0.1/docs/guides/BUILDING.md#prerequisites>`__ for Matter.
@@ -61,7 +61,7 @@ For using VSCode for development, please check `Developing in WSL <https://code.
::
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf; git checkout bb9200acec; git submodule update --init --recursive;
cd esp-idf; git checkout 420ebd208; git submodule update --init --recursive;
./install.sh
cd ..
+16 -4
View File
@@ -134,16 +134,28 @@ This section gives some examples on how to generate factory partition binary whi
This is the example to generate factory images after pre-provisioning:
- **Generate generic factory image**
- ./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25 --passcode 19861989 --discriminator 601 --serial-num esp32c_dev3
::
./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25 --passcode 19861989 --discriminator 601 --serial-num esp32c_dev3
- **Generate multiple generic factory images**
- ./mfg_tool.py -n 10 -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25
::
./mfg_tool.py -n 10 -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25
- **Generate factory image with rotating device unique identify**
- ./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25 --passcode 19861989 --discriminator 601 --serial-num esp32c_dev3 --enable-rotating-device-id --rd-id-uid c0398f4980b07c9460f71c5421e1a3c5
::
./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --mfg-date 2022-10-25 --passcode 19861989 --discriminator 601 --serial-num esp32c_dev3 --enable-rotating-device-id --rd-id-uid c0398f4980b07c9460f71c5421e1a3c5
- **Generate multiple factory images with csv and mcsv**
- ./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --enable-rotating-device-id --mfg-date 2022-10-25 --csv mfg.csv --mcsv mfg_m.csv
::
./mfg_tool.py -cd ~/test_cert/CD/Chip-CD-131B-1000.der -v 0x131B --vendor-name ESP -p 0x1000 --product-name light --hw-ver 1 --hw-ver-str v1.0 --enable-rotating-device-id --mfg-date 2022-10-25 --csv mfg.csv --mcsv mfg_m.csv
- **The example of csv and mcsv file**
- CSV:
@@ -29,6 +29,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") {
@@ -59,6 +60,7 @@ buildconfig_header("custom_buildconfig") {
"INET_CONFIG_INCLUDE=<platform/ESP32_custom/InetPlatformConfig.h>",
"SYSTEM_PLATFORM_CONFIG_INCLUDE=<platform/ESP32_custom/SystemPlatformConfig.h>",
"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) {
@@ -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=<platform/ESP32_custom/InetPlatformConfig.h>",
"SYSTEM_PLATFORM_CONFIG_INCLUDE=<platform/ESP32_custom/SystemPlatformConfig.h>",
"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) {
@@ -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;