Skip to content

Commit

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

Closes TZ-864, TZ-885, TZ-883, TZ-831, and TZ-762

See merge request espressif/esp-zigbee-sdk!129
  • Loading branch information
chshu committed May 24, 2024
2 parents dc28b23 + cf3f2c5 commit 46a5a5a
Show file tree
Hide file tree
Showing 35 changed files with 1,173 additions and 151 deletions.
21 changes: 21 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Espressif Zigbee SDK Release Notes

## 24-May-2024
1.3.2 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3

### Features
- Updated esp-zboss-lib to v1.3.2
- Updated esp-zigbee-lib to v1.3.2
- Supported APS data confirmation
- Supported ZCL IAS ACE cluster
- Supported ZCL read report config command
- Added NWK parameters setting APIs
- Added NWK neighbor table getting APIs
- Added NWK routing table getting APIs
- Added Zigbee scheduler queue size setting API
- Optimized Zigbee device reset mechanism

### Bug Fixes
- Fixed the crash caused by a full rx radio queue during radio frame handling
- Fixed the buffer ID not being freed during rapid on/off level control
- Fixed the issue with the rough transition in color control


## 30-Apr-2024
1.3.1 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.3.1"
version: "1.3.2"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
46 changes: 40 additions & 6 deletions components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,22 @@ extern "C" {
#include "esp_zigbee_type.h"

/**
* @brief The enumeration for apsde tx option
*
* @brief Enumeration for APSDE-DATA address mode
*
*/
typedef enum {
ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT = 0x0, /*!< DstAddress and DstEndpoint not present,
only for APSDE-DATA request and confirm */
ESP_ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT = 0x1, /*!< 16-bit group address for DstAddress; DstEndpoint not present */
ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT = 0x2, /*!< 16-bit address for DstAddress and DstEndpoint present */
ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT = 0x3, /*!< 64-bit extended address for DstAddress and DstEndpoint present */
ESP_ZB_APS_ADDR_MODE_64_PRESENT_ENDP_NOT_PRESENT = 0x4, /*!< 64-bit extended address for DstAddress, but DstEndpoint NOT present,
only for APSDE indication */
} esp_zb_aps_address_mode_t;

/**
* @brief Enumeration for APSDE-DATA Request TX options
*
*/
typedef enum esp_zb_apsde_tx_opt_e {
ESP_ZB_APSDE_TX_OPT_SECURITY_ENABLED = 0x01U, /*!< Security enabled transmission */
Expand All @@ -30,7 +44,8 @@ typedef enum esp_zb_apsde_tx_opt_e {
*
*/
typedef struct esp_zb_apsde_data_req_s {
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred. */
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred,
refer to esp_zb_aps_address_mode_t */
uint16_t dst_short_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred*/
uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/
uint16_t profile_id; /*!< The identifier of the profile for which this frame is intended. */
Expand All @@ -51,7 +66,8 @@ typedef struct esp_zb_apsde_data_req_s {
*/
typedef struct esp_zb_apsde_data_confirm_s {
uint8_t status; /*!< The status of data confirm. 0: success, otherwise failed */
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred.*/
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred,
refer to esp_zb_aps_address_mode_t */
esp_zb_addr_u dst_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred.*/
uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/
uint8_t src_endpoint; /*!< The individual endpoint of the entity from which the ASDU is being transferred.*/
Expand All @@ -66,7 +82,8 @@ typedef struct esp_zb_apsde_data_confirm_s {
*/
typedef struct esp_zb_apsde_data_ind_s {
uint8_t status; /*!< The status of the incoming frame processing, 0: on success */
uint8_t dst_addr_mode; /*!< Reserved, the addressing mode for the destination address used in this primitive and of the APDU that has been received.*/
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU that has been received,
refer to esp_zb_aps_address_mode_t */
uint16_t dst_short_addr; /*!< The individual device address or group address to which the ASDU is directed.*/
uint8_t dst_endpoint; /*!< The target endpoint on the local entity to which the ASDU is directed.*/
uint8_t src_addr_mode; /*!< Reserved, The addressing mode for the source address used in this primitive and of the APDU that has been received.*/
Expand Down Expand Up @@ -95,7 +112,7 @@ typedef bool (* esp_zb_apsde_data_indication_callback_t)(esp_zb_apsde_data_ind_t
/**
* @brief APSDE data confirm application callback
*
* @param[in] ind APSDE-DATA.confirm
* @param[in] confirm APSDE-DATA.confirm
*/
typedef void (* esp_zb_apsde_data_confirm_callback_t)(esp_zb_apsde_data_confirm_t confirm);

Expand Down Expand Up @@ -125,6 +142,23 @@ esp_err_t esp_zb_aps_data_request(esp_zb_apsde_data_req_t *req);
*/
void esp_zb_aps_data_confirm_handler_register(esp_zb_apsde_data_confirm_callback_t cb);

/**
* @brief Set the APS trust center address
*
* @param[in] address A 64-bit value is expected to be set to trust center address
* @return
* - ESP_OK: On success
* - ESP_ERR_INVALID_STATE: Device is already on a network
*/
esp_err_t esp_zb_aps_set_trust_center_address(esp_zb_ieee_addr_t address);

/**
* @brief Get the APS trust center address
*
* @param[out] address A 64-bit value will be assigned from the trust center address
*/
void esp_zb_aps_get_trust_center_address(esp_zb_ieee_addr_t address);

#ifdef __cplusplus
}
#endif
25 changes: 25 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,31 @@ esp_err_t esp_zb_ias_zone_cluster_add_attr(esp_zb_attribute_list_t *attr_list, u
*
*/
esp_err_t esp_zb_ias_zone_cluster_set_cie_address(uint8_t endpoint, esp_zb_ieee_addr_t cie_ieee_addr);

/**
* @brief Get the zone table size of the IAS ACE cluster
*
* @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach
* @param[out] table_size The zone table size of IAS ACE cluster on the given endpoint.
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint.
*
*/
esp_err_t esp_zb_ias_ace_get_zone_table_length(uint8_t endpoint, uint8_t *table_size);

/**
* @brief Get the zone table of the IAS ACE cluster
*
* @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach
* @param[out] table_p The address of the zone table of IAS ACE cluster on the given endpoint.
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint.
*
*/
esp_err_t esp_zb_ias_ace_get_zone_table(uint8_t endpoint, esp_zb_zcl_ias_ace_zone_table_t** table_p);

/**
* @brief Add an attribute in temperature measurement cluster.
*
Expand Down
39 changes: 39 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ esp_zb_attribute_list_t *esp_zb_door_lock_cluster_create(esp_zb_door_lock_cluste
*/
esp_zb_attribute_list_t *esp_zb_ias_zone_cluster_create(esp_zb_ias_zone_cluster_cfg_t *ias_zone_cfg);

/**
* @brief Create a standard IAS ACE cluster attribute list.
*
* @note This only contains the mandatory attribute.
* @param[in] zone_table_size Maximum number of entries in the zone table.
*
* @return Pointer to attribute list @ref esp_zb_attribute_list_s
*
*/
esp_zb_attribute_list_t *esp_zb_ias_ace_cluster_create(uint8_t zone_table_size);

/**
* @brief Create a standard temperature measurement cluster attribute list.
*
Expand Down Expand Up @@ -629,6 +640,20 @@ esp_err_t esp_zb_cluster_list_add_commissioning_cluster(esp_zb_cluster_list_t *c
*/
esp_err_t esp_zb_cluster_list_add_ias_zone_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);

/**
* @brief Add IAS ACE cluster (attribute list) in a cluster list.
*
* @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s
* @param[in] attr_list An attribute list which wants to add
* @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if cluster list not initialized
*
*/
esp_err_t esp_zb_cluster_list_add_ias_ace_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);

/**
* @brief Add Door Lock cluster (attribute list) in a cluster list.
*
Expand Down Expand Up @@ -1181,6 +1206,20 @@ esp_err_t esp_zb_cluster_list_update_commissioning_cluster(esp_zb_cluster_list_t
*/
esp_err_t esp_zb_cluster_list_update_ias_zone_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);

/**
* @brief Update IAS ACE cluster (attribute list) in a cluster list.
*
* @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s
* @param[in] attr_list An attribute list which wants to update
* @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if cluster list not initialized
*
*/
esp_err_t esp_zb_cluster_list_update_ias_ace_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);

/**
* @brief Update Door Lock cluster (attribute list) in a cluster list.
*
Expand Down
Loading

0 comments on commit 46a5a5a

Please sign in to comment.