Skip to content

Commit

Permalink
Merge branch 'release/esp-zigbee-sdk-v1.4.1' into 'main'
Browse files Browse the repository at this point in the history
esp-zigbee-sdk: release/v1.4.1(94bd7a1a)

Closes TZ-993 and TZ-994

See merge request espressif/esp-zigbee-sdk!135
  • Loading branch information
chshu committed Jul 19, 2024
2 parents 81ade24 + 28f4b50 commit 62d6737
Show file tree
Hide file tree
Showing 43 changed files with 527 additions and 285 deletions.
14 changes: 14 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Espressif Zigbee SDK Release Notes

## 19-Jul-2024
1.4.1 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.4

### Features
- Updated esp-zboss-lib to v1.4.1
- Updated esp-zigbee-lib to v1.4.1
- Supported NWK route record getting APIs
- Supported ZCL OTA image query request and response APIs
- Optimized APS maximum valid payload size for non-fragmented frames

### Bug Fixes
- Fixed touchlink assert when the touchlink initiator scans mismatched targets and is required to leave


## 04-Jul-2024
1.4.0 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3

Expand Down
2 changes: 1 addition & 1 deletion components/esp-zigbee-lib/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.4.0"
version: "1.4.1"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
1 change: 1 addition & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ typedef enum esp_zb_core_action_callback_id_s {
ESP_ZB_CORE_IAS_ACE_BYPASS_RESP_CB_ID = 0x002e, /*!< IAS ACE cluster Bypass command response, refer to esp_zb_zcl_ias_ace_bypass_response_message_t */
ESP_ZB_CORE_IAS_ACE_GET_ZONE_STATUS_RESP_CB_ID = 0x002f, /*!< IAS ACE cluster Get Zone Status command response, refer to esp_zb_zcl_ias_ace_get_zone_status_response_message_t */
ESP_ZB_CORE_WINDOW_COVERING_MOVEMENT_CB_ID = 0x0030, /*!< Window covering movement command, refer to esp_zb_zcl_window_covering_movement_message_t */
ESP_ZB_CORE_OTA_UPGRADE_QUERY_IMAGE_RESP_CB_ID = 0x0031, /*!< OTA upgrade query image response message, refer to esp_zb_zcl_ota_upgrade_query_image_resp_message_t */
ESP_ZB_CORE_CMD_READ_ATTR_RESP_CB_ID = 0x1000, /*!< Read attribute response, refer to esp_zb_zcl_cmd_read_attr_resp_message_t */
ESP_ZB_CORE_CMD_WRITE_ATTR_RESP_CB_ID = 0x1001, /*!< Write attribute response, refer to esp_zb_zcl_cmd_write_attr_resp_message_t */
ESP_ZB_CORE_CMD_REPORT_CONFIG_RESP_CB_ID = 0x1002, /*!< Configure report response, refer to esp_zb_zcl_cmd_config_report_resp_message_t */
Expand Down
35 changes: 33 additions & 2 deletions components/esp-zigbee-lib/include/esp_zigbee_ota.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ typedef esp_err_t (*esp_zb_ota_next_data_callback_t)(esp_zb_ota_zcl_information_
*
*/
typedef struct esp_zb_zcl_ota_upgrade_client_variable_s {
uint16_t timer_query; /*!< The field indicates the time of querying OTA imagge for OTA upgrade client */
uint16_t timer_query; /*!< The field indicates the time of querying OTA image for OTA upgrade client */
uint16_t hw_version; /*!< The hardware version */
uint8_t max_data_size; /*!< The maxinum size of OTA data */
uint8_t max_data_size; /*!< The maximum size of OTA data */
} esp_zb_zcl_ota_upgrade_client_variable_t;

/**
Expand Down Expand Up @@ -95,6 +95,37 @@ typedef struct esp_zb_ota_upgrade_server_notify_req_s {
*/
esp_err_t esp_zb_ota_upgrade_server_notify_req(esp_zb_ota_upgrade_server_notify_req_t *req);

/**
* @brief Send the OTA upgrade client query image request
*
* @param[in] server_addr The short address of the OTA upgrade server that the client expect to query
* @param[in] server_ep The endpoint identifier of the OTA upgrade server with OTA image
* @return
* - ESP_OK: On success
* - ESP_FAIL: On failed
*/
esp_err_t esp_zb_ota_upgrade_client_query_image_req(uint16_t server_ep, uint8_t server_addr);

/**
* @brief Set the interval of query for OTA upgrade client
*
* @param[in] endpoint The endpoint identifier of OTA upgrade client resides
* @param[in] interval The interval in minute
* @return
* - ESP_OK: On success
* - ESP_FAIL: On failed
*/
esp_err_t esp_zb_ota_upgrade_client_query_interval_set(uint8_t endpoint, uint16_t interval);

/**
* @brief Stop the image query of OTA upgrade client
*
* @return
* - ESP_OK: On success
* - ESP_FAIL: On failed
*/
esp_err_t esp_zb_ota_upgrade_client_query_image_stop(void);

#ifdef __cplusplus
}
#endif
29 changes: 29 additions & 0 deletions components/esp-zigbee-lib/include/nwk/esp_zigbee_nwk.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ typedef enum {
#define ESP_ZB_NWK_INFO_ITERATOR_INIT 0 /*!< Initializer for esp_zb_neighbor_info_iterator_t. */
#define ESP_ZB_NWK_INFO_ITERATOR_EOT 0xFFFF /*!< Indicate the iterator reach the End of Table. */

#define ESP_ZB_NWK_MAX_SOURCE_ROUTE 5

/**
* @brief Iterator used to iterate through the tables of network informations.
*
Expand Down Expand Up @@ -91,6 +93,18 @@ typedef struct esp_zb_nwk_route_info_s {
uint8_t expiry; /*!< Expiration time. */
} esp_zb_nwk_route_info_t;

/**
* @brief Information of network route record table entry
*
*/
typedef struct esp_zb_nwk_route_record_info_s {
uint16_t dest_address; /*!< Destination network address of this route record. */
uint8_t expiry; /*!< Expiration time. */
uint8_t relay_count; /*!< The count of relay nodes from concentrator to the destination. */
uint16_t path[ESP_ZB_NWK_MAX_SOURCE_ROUTE]; /*!< The set of network addresses that represent the route
* in order from the concentrator to the destination.*/
} esp_zb_nwk_route_record_info_t;

/**
* @brief Set the network update id
*
Expand Down Expand Up @@ -258,6 +272,7 @@ esp_zb_nwk_device_type_t esp_zb_get_network_device_role(void);
*
* @return - ESP_OK on success
* - ESP_ERR_NOT_FOUND on finish iteration
* - ESP_ERR_INVALID_ARG if arguements are invalid
*
*/
esp_err_t esp_zb_nwk_get_next_neighbor(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_neighbor_info_t *nbr_info);
Expand All @@ -270,10 +285,24 @@ esp_err_t esp_zb_nwk_get_next_neighbor(esp_zb_nwk_info_iterator_t *iterator, esp
*
* @return - ESP_OK on success
* - ESP_ERR_NOT_FOUND on finish iteration
* - ESP_ERR_INVALID_ARG if arguements are invalid
*
*/
esp_err_t esp_zb_nwk_get_next_route(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_route_info_t *route_info);

/**
* @brief Iterate through the route record table (a.k.a source route table) and get the information in the entry
*
* @param[in] iterator iterator used to iterate through routing table, refer to esp_zb_nwk_info_iterator_t
* @param[out] route_record_info next route record entry information, @ref esp_zb_nwk_route_record_info_s
*
* @return - ESP_OK on success
* - ESP_ERR_NOT_FOUND on finish iteration
* - ESP_ERR_INVALID_ARG if arguements are invalid
*
*/
esp_err_t esp_zb_nwk_get_next_route_record(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_route_record_info_t *route_record_info);

#ifdef __cplusplus
}
#endif
15 changes: 15 additions & 0 deletions components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,21 @@ typedef struct esp_zb_zcl_ota_upgrade_value_message_s {
uint8_t *payload; /*!< The OTA payload */
} esp_zb_zcl_ota_upgrade_value_message_t;

/**
* @brief The Zigbee zcl ota upgrade client query image response message struct
*
*/
typedef struct esp_zb_zcl_ota_upgrade_query_image_resp_message_s {
esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */
esp_zb_zcl_addr_t server_addr; /*!< Server address */
uint8_t server_endpoint; /*!< Server endpoint */
uint8_t query_status; /*!< Status, see esp_zb_zcl_status_t */
uint16_t manufacturer_code; /*!< Manufacturer code */
uint16_t image_type; /*!< Image type */
uint32_t file_version; /*!< File version */
uint32_t image_size; /*!< Image size */
} esp_zb_zcl_ota_upgrade_query_image_resp_message_t;

/**
* @brief The Zigbee zcl ota upgrade server status message struct
*
Expand Down
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ZigbeeCIConstants:
channel_min = 11
channel_max = 26
channel = 18
ota_total_package = '159616'
ota_total_package = '552928'
ota_version = '0x1010101'
image_type = '0x1011'
manufacturer_code = '1001'
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
1 change: 1 addition & 0 deletions examples/esp_zigbee_gateway/main/esp_zigbee_gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
esp_zb_bdb_open_network(180);
ESP_LOGI(TAG, "Device rebooted");
}
} else {
Expand Down
3 changes: 3 additions & 0 deletions examples/esp_zigbee_ota/ota_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../../common/switch_driver
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_ota_client)
Loading

0 comments on commit 62d6737

Please sign in to comment.