diff --git a/README.md b/README.md index e3bd47359..42089c170 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ git clone --recursive https://github.com/espressif/esp-matter.git ## Supported ESP-IDF and connectedhomeip versions -ESP Matter currently works with [TE9 tag](https://github.com/project-chip/connectedhomeip/releases/tag/TE9) of connectedhomeip. -For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.1 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.1) is required. -For Thread devices (ESP32-H2), ESP-IDF master branch at [commit 047903c](https://github.com/espressif/esp-idf/commit/047903c) should be used. +- ESP Matter currently works with [TE9 tag](https://github.com/project-chip/connectedhomeip/releases/tag/TE9) of connectedhomeip. +- For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.1 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.1) is required. +- For Thread devices (ESP32-H2), ESP-IDF master branch at [commit 047903c](https://github.com/espressif/esp-idf/commit/047903c) should be used. -### Documentation Build Status +## Documentation -[![Documentation Status](https://readthedocs.com/projects/espressif-esp-matter/badge/?version=latest)](https://docs.espressif.com/projects/esp-matter/en/latest/) +Refer [ESP Matter Programming Guide](https://docs.espressif.com/projects/esp-matter/en/main/) for the latest version of the documentation. diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 8a567177a..b081f171a 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -589,7 +589,7 @@ namespace diagnostics_network_wifi { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; -cluster_t *create(endpoint_t *endpoint, uint8_t flags) +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) { cluster_t *cluster = cluster::create(endpoint, WiFiNetworkDiagnostics::Id, flags); if (!cluster) { @@ -613,6 +613,13 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) attribute::create_wifi_version(cluster, 0); attribute::create_channel_number(cluster, 0); attribute::create_rssi(cluster, 0); + + /* Attributes not managed internally */ + if (config) { + global::attribute::create_cluster_revision(cluster, config->cluster_revision); + } else { + ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes."); + } } return cluster; @@ -623,7 +630,7 @@ namespace diagnostics_network_thread { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; -cluster_t *create(endpoint_t *endpoint, uint8_t flags) +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) { cluster_t *cluster = cluster::create(endpoint, ThreadNetworkDiagnostics::Id, flags); if (!cluster) { @@ -659,6 +666,13 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) attribute::create_channel_mask(cluster, NULL, 0); attribute::create_operational_dataset_components(cluster, NULL, 0, 0); attribute::create_active_network_faults(cluster, NULL, 0, 0); + + /* Attributes not managed internally */ + if (config) { + global::attribute::create_cluster_revision(cluster, config->cluster_revision); + } else { + ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes."); + } } return cluster; diff --git a/components/esp_matter/esp_matter_cluster.h b/components/esp_matter/esp_matter_cluster.h index 435f348fb..a84640a5e 100644 --- a/components/esp_matter/esp_matter_cluster.h +++ b/components/esp_matter/esp_matter_cluster.h @@ -139,11 +139,21 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags); } /* group_key_management */ namespace diagnostics_network_wifi { -cluster_t *create(endpoint_t *endpoint, uint8_t flags); +typedef struct config { + uint16_t cluster_revision; + config() : cluster_revision(1) {} +} config_t; + +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); } /* diagnostics_network_wifi */ namespace diagnostics_network_thread { -cluster_t *create(endpoint_t *endpoint, uint8_t flags); +typedef struct config { + uint16_t cluster_revision; + config() : cluster_revision(1) {} +} config_t; + +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); } /* diagnostics_network_thread */ namespace identify { diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index 8de6f699f..034a3b5e3 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -75,10 +75,10 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) group_key_management::create(endpoint, CLUSTER_FLAG_SERVER); #if CHIP_DEVICE_CONFIG_ENABLE_WIFI - diagnostics_network_wifi::create(endpoint, CLUSTER_FLAG_SERVER); + diagnostics_network_wifi::create(endpoint, &(config->diagnostics_network_wifi), CLUSTER_FLAG_SERVER); #endif #if CHIP_DEVICE_CONFIG_ENABLE_THREAD - diagnostics_network_thread::create(endpoint, CLUSTER_FLAG_SERVER); + diagnostics_network_thread::create(endpoint, &(config->diagnostics_network_thread), CLUSTER_FLAG_SERVER); #endif return endpoint; diff --git a/components/esp_matter/esp_matter_endpoint.h b/components/esp_matter/esp_matter_endpoint.h index 08fc72ae8..e4ac3994b 100644 --- a/components/esp_matter/esp_matter_endpoint.h +++ b/components/esp_matter/esp_matter_endpoint.h @@ -39,6 +39,8 @@ typedef struct config { general_diagnostics::config_t general_diagnostics; administrator_commissioning::config_t administrator_commissioning; operational_credentials::config_t operational_credentials; + diagnostics_network_wifi::config_t diagnostics_network_wifi; + diagnostics_network_thread::config_t diagnostics_network_thread; } config_t; uint32_t get_device_type_id(); diff --git a/examples/blemesh_bridge/README.md b/examples/blemesh_bridge/README.md index 23f282938..b0d11eb52 100644 --- a/examples/blemesh_bridge/README.md +++ b/examples/blemesh_bridge/README.md @@ -2,11 +2,15 @@ This example demonstrates a Matter-BLE Mesh Bridge that bridges BLE Mesh devices to Matter fabric. -See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. +See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. -## 1. Commissioning Setup +## 1. Additional Environment Setup -### 1.1 Discovering BLE Mesh Devices +No additional setup is required. + +## 2. Post Commissioning Setup + +### 2.1 Discovering BLE Mesh Devices You can read the parts list from the Bridge to get the number of the bridged devices. @@ -24,14 +28,14 @@ Data = [ ], ``` -### 1.2 Setup BLE Mesh Node on ESP32-C3 +### 2.2 Setup BLE Mesh Node on ESP32-C3 Build and run BLE Mesh onoff_server app on another ESP32-C3 board. ``` -$ cd ${IDF_PATH}/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server -$ idf.py set-target esp32c3 -$ idf.py -p build flash monitor +cd ${IDF_PATH}/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server +idf.py set-target esp32c3 +idf.py -p build flash monitor ``` The BLE Mesh device will be provisioned by provisioner and a dynamic @@ -39,7 +43,7 @@ endpoint will be added on the Bridge device. You can read the parts list again to get the dynamic endpoint ID. ``` -$ chip-tool descriptor read parts-list 12344321 0 +chip-tool descriptor read parts-list 0x7283 0 ``` The data will now contain the information of the connected BLE Mesh @@ -47,7 +51,7 @@ devices. Example: ``` Data = [ - 1, + 1, ], ``` @@ -55,7 +59,7 @@ It means that the BLE Mesh Node is added as Endpoint 1 on the Bridge device. You can read the cluster servers list on the dynamic endpoint. ``` -$ chip-tool descriptor read server-list 12344321 1 +chip-tool descriptor read server-list 0x7283 1 ``` This will give the list of supported server clusters. Example: @@ -68,17 +72,17 @@ OnDescriptorServerListListAttributeResponse: 4 entries [4]: 64 ``` -### 1.3 Control the BLE Mesh Node with chip-tool +### 2.3 Control the BLE Mesh Node with chip-tool Now you can control the BLE Mesh Node on chip tool. ``` -$ ./out/chip-tool onoff toggle 12344321 1 +./out/chip-tool onoff toggle 0x7283 1 ``` -## 2. Device Performance +## 3. Device Performance -### 2.1 Memory usage +### 3.1 Memory usage The following is the Memory and Flash Usage. @@ -88,14 +92,14 @@ The following is the Memory and Flash Usage. commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: - [2d04492](https://github.com/espressif/esp-matter/commit/2d044929ab78e9b036e41ed54e155a242e1d2e73) - (2022-05-20) + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) | | Bootup | After Commissioning | |:- |:-: |:-: | -|**Free Internal Memory** |100KB |95KB | +|**Free Internal Memory** |99KB |95KB | -**Flash Usage**: Firmware binary size: 1.4MB +**Flash Usage**: Firmware binary size: 1.42MB This should give you a good idea about the amount of free memory that is available for you to run your application's code. diff --git a/examples/light/README.md b/examples/light/README.md index 0459d535e..28211a8e0 100644 --- a/examples/light/README.md +++ b/examples/light/README.md @@ -3,7 +3,7 @@ This example creates a Color Temperature Light device using the ESP Matter data model. -See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. +See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. ## 1. Additional Environment Setup @@ -25,14 +25,16 @@ The following is the Memory and Flash Usage. commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: - [bd951b8](https://github.com/espressif/esp-matter/commit/bd951b84993d9d0b5742872be4f51bb6c9ccf15e) - (2022-05-05) + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) | | Bootup | After Commissioning | |:- |:-: |:-: | -|**Free Internal Memory** |109KB |105KB | +|**Free Internal Memory** |108KB |105KB | **Flash Usage**: Firmware binary size: 1.26MB This should give you a good idea about the amount of free memory that is available for you to run your application's code. + +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). diff --git a/examples/light_switch/README.md b/examples/light_switch/README.md index beaa8c9b9..33444dbeb 100644 --- a/examples/light_switch/README.md +++ b/examples/light_switch/README.md @@ -6,7 +6,7 @@ data model. It creates the On/Off client and other devices can be bound to the switch and then controlled from the switch. -See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. +See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. ## 1. Additional Environment Setup @@ -77,18 +77,20 @@ The following is the Memory and Flash Usage. commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: - [bd951b8](https://github.com/espressif/esp-matter/commit/bd951b84993d9d0b5742872be4f51bb6c9ccf15e) - (2022-05-05) + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) | | Bootup | After Commissioning | |:- |:-: |:-: | -|**Free Internal Memory** |113KB |110KB | +|**Free Internal Memory** |114KB |111KB | -**Flash Usage**: Firmware binary size: 1.24MB +**Flash Usage**: Firmware binary size: 1.25MB This should give you a good idea about the amount of free memory that is available for you to run your application's code. +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). + ## A2 Appendix FAQs ### A2.1 Binding Failed diff --git a/examples/zap_light/README.md b/examples/zap_light/README.md index e4a6fd3fb..aa2f3e566 100644 --- a/examples/zap_light/README.md +++ b/examples/zap_light/README.md @@ -3,7 +3,7 @@ This example creates a Color Temperature Light device using the Zap data model instead of the ESP Matter data model. -See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. +See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. ## 1. Additional Environment Setup @@ -48,8 +48,8 @@ The following is the Memory and Flash Usage. commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: - [bd951b8](https://github.com/espressif/esp-matter/commit/bd951b84993d9d0b5742872be4f51bb6c9ccf15e) - (2022-05-05) + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) | | Bootup | After Commissioning | |:- |:-: |:-: | @@ -60,6 +60,8 @@ The following is the Memory and Flash Usage. This should give you a good idea about the amount of free memory that is available for you to run your application's code. +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). + ## A2 Appendix FAQs ### A2.1 Zaptool is not working diff --git a/examples/zigbee_bridge/README.md b/examples/zigbee_bridge/README.md index 09ba1d7d1..e1753cdbb 100644 --- a/examples/zigbee_bridge/README.md +++ b/examples/zigbee_bridge/README.md @@ -5,7 +5,7 @@ This example demonstrates a Matter-Zigbee Bridge that bridges Zigbee devices to The Matter Bridge device is composed of two parts: The RCP running on ESP32-H2 and the bridge app running on ESP32. -See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. +See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. ## 1. Additional Environment Setup @@ -117,14 +117,16 @@ The following is the Memory and Flash Usage. commissioned and is rebooted. - device used: esp32c3_devkit_m - tested on: - [bd951b8](https://github.com/espressif/esp-matter/commit/bd951b84993d9d0b5742872be4f51bb6c9ccf15e) - (2022-05-05) + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) | | Bootup | After Commissioning | |:- |:-: |:-: | -|**Free Internal Memory** |109KB |105KB | +|**Free Internal Memory** |66KB |62KB | -**Flash Usage**: Firmware binary size: 1.26MB +**Flash Usage**: Firmware binary size: 1.5MB This should give you a good idea about the amount of free memory that is available for you to run your application's code. + +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2).