Skip to content

Commit

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

See merge request espressif/esp-zigbee-sdk!101
  • Loading branch information
chshu committed Feb 2, 2024
2 parents 95117c9 + f9cc2dc commit eef1e0e
Show file tree
Hide file tree
Showing 53 changed files with 574 additions and 294 deletions.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ before_script:
.build_rcp_gateway: &build_rcp_gateway
- mv $CI_PROJECT_DIR/examples/esp_zigbee_gateway/sdkconfig.defaults $CI_PROJECT_DIR/examples/esp_zigbee_gateway/sdkconfig.defaults.ori
- cp $CI_PROJECT_DIR/tools/ci/sdkconfig_for_gateway_ci.defaults $CI_PROJECT_DIR/examples/esp_zigbee_gateway/sdkconfig.defaults
- cd $CI_PROJECT_DIR/examples/esp_zigbee_rcp
- cd $IDF_PATH/examples/openthread/ot_rcp
- echo "CONFIG_OPENTHREAD_NCP_VENDOR_HOOK=y" >> sdkconfig.defaults
- idf.py set-target esp32h2
- idf.py build
- cd $CI_PROJECT_DIR/examples/esp_zigbee_gateway
Expand Down
27 changes: 27 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Espressif Zigbee SDK Release Notes

## 2-Feb-2024
1.1.0 version release of ESP-ZIGBEE-SDK

### Features
- Updated esp-zboss-lib to v1.1.0
- Updated esp-zigbee-lib to v1.1.0
- Added more commands support for cli example
- Added zigbee stack lock support
- Added reset factory to default APIs
- Added zll identify callback
- Added zigbee device announcement APIs
- Replaced the macsplit of the gateway with Radio Spinel
- Replaced zigbee rcp example with ot-rcp example

### Bug Fixes
- Fixed the error trigger the zcl identify timer upon write_req
- Fixed Zigbee color control downward movement failure
- Fixed Zigbee color control step color failure
- Fixed the scan_response for touchlink scan req handler
- Fixed touchlink transaction id
- Corrected the check for clearing touchlink factory new
- Rectified the logic of touchlink set network key
- Fixed touchlink target does not not send join router response with failure status
- Fixed the erase-NVRAM operation of device leave network for touchlink
- Fixed esp_zigbee_gateway build error on Win11
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/231

## 19-Jan-2024
1.0.9 version release of ESP-ZIGBEE-SDK

Expand Down
2 changes: 0 additions & 2 deletions components/esp-zigbee-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ if(CONFIG_ZB_ENABLED)
add_prebuilt_library(esp_zigbee_api_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libesp_zb_api_zczr.a" REQUIRES espressif__esp-zboss-lib)
elseif(CONFIG_ZB_ZED)
add_prebuilt_library(esp_zigbee_api_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libesp_zb_api_ed.a" REQUIRES espressif__esp-zboss-lib)
elseif(CONFIG_ZB_RCP)
add_prebuilt_library(esp_zigbee_api_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libesp_zb_api_rcp.a" REQUIRES espressif__esp-zboss-lib)
elseif(CONFIG_ZB_ZGPD)
add_prebuilt_library(esp_zigbee_api_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libesp_zb_api_gpd.a" REQUIRES espressif__esp-zboss-lib)
endif()
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.0.9"
version: "1.1.0"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
15 changes: 15 additions & 0 deletions components/esp-zigbee-lib/include/bdb/esp_zigbee_bdb_touchlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ typedef enum esp_zb_touchlink_action_s {
*/
typedef bool (*esp_zb_touchlink_action_allowed_callback_t)(uint8_t action);

/**
* @brief Zll identify callback
*
* @param[in] identify_on An indication that needs start or stop identify
*/
typedef void (*esp_zb_zll_identify_req_callback_t)(bool identify_on);

/**
* @brief Register the Zigbee touchlink action check handler
*
Expand Down Expand Up @@ -112,6 +119,14 @@ int8_t esp_zb_zdo_touchlink_get_rssi_threshold(void);
* - RET_ERROR: Not in touchlink target procedure
*/
esp_err_t esp_zb_bdb_cancel_touchlink_target(void);

/**
* @brief Register ZLL identify request handler
*
* @param[in] cb A callback for zll identify notificaion, refer to esp_zb_zll_identify_req_callback_t
*/
void esp_zb_zll_identify_req_handler_register(esp_zb_zll_identify_req_callback_t cb);

#ifdef __cplusplus
}
#endif
96 changes: 84 additions & 12 deletions components/esp-zigbee-lib/include/esp_zigbee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ typedef enum esp_zb_core_action_callback_id_s {
ESP_ZB_CORE_DOOR_LOCK_LOCK_DOOR_CB_ID = 0x0010, /*!< Lock/unlock door request, refer to esp_zb_zcl_door_lock_lock_door_message_t */
ESP_ZB_CORE_DOOR_LOCK_LOCK_DOOR_RESP_CB_ID = 0x0011, /*!< Lock/unlock door response, refer to esp_zb_zcl_door_lock_lock_door_resp_message_t */
ESP_ZB_CORE_IDENTIFY_EFFECT_CB_ID = 0x0012, /*!< Identify triggers effect request, refer to esp_zb_zcl_identify_effect_message_t */
ESP_ZB_CORE_BASIC_RESET_TO_FACTORY_RESET_CB_ID = 0x0013, /*!< Reset all clusters of endpoint to factory default, refer to esp_zb_zcl_basic_reset_factory_default_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 reprot response, refer to esp_zb_zcl_cmd_config_report_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 */
ESP_ZB_CORE_CMD_READ_REPORT_CFG_RESP_CB_ID = 0x1003, /*!< Read report configuration response, refer to esp_zb_zcl_cmd_read_report_config_resp_message_t */
ESP_ZB_CORE_CMD_DISC_ATTR_RESP_CB_ID = 0x1004, /*!< Discover attributes response, refer to esp_zb_zcl_cmd_discover_attributes_resp_message_t */
ESP_ZB_CORE_CMD_DEFAULT_RESP_CB_ID = 0x1005, /*!< Default response, refer to esp_zb_zcl_cmd_default_resp_message_t */
Expand Down Expand Up @@ -198,6 +199,17 @@ typedef uint8_t (*esp_zb_cli_resp_callback_t)(uint8_t bufid);
*/
typedef void (*esp_zb_identify_notify_callback_t)(uint8_t identify_on);

/**
* @brief ZCL reset default attribute callback
*
* @param[in] endpoint The Endpoint identifier
* @param[in] cluster_id The cluster identifier
* @param[in] curr_attr The current attribute information
*
* @return The default attribute value will be set to
*/
typedef void *(*esp_zb_zcl_reset_default_attr_callback_t)(uint8_t endpoint, uint16_t cluster_id, esp_zb_zcl_attribute_t curr_attr);

/**
* @brief Register the Zigbee core action handler
*
Expand Down Expand Up @@ -283,7 +295,7 @@ bool esp_zb_zcl_delete_privilege_command(uint8_t endpoint, uint16_t cluster, uin
* @param[in] group_id The group id of scene, which will be used to find scenes table record
* @param[in] scene_id The scene id of scene, which will be used to find scenes table record
* @param[in] transition_time The transition time of scene, whose unit is 100 milliseconds
* @param[in] field The pointer to zcl senes extension field list
* @param[in] field The pointer to zcl sense extension field list
* @return
* - ESP_OK: on success
* - ESP_FAIL: the group id or scene id is invalid
Expand Down Expand Up @@ -389,6 +401,15 @@ esp_err_t esp_zb_bdb_open_network(uint8_t permit_duration);
*/
esp_err_t esp_zb_bdb_close_network(void);

/**
* @brief Check if device has joined network or not
*
* @return
* - true: device is joined
* - false: device is not joined
*/
bool esp_zb_bdb_dev_joined(void);

/**
* @brief Set Touchlink NWK channel
*
Expand Down Expand Up @@ -529,6 +550,39 @@ esp_err_t esp_zb_bdb_start_top_level_commissioning(uint8_t mode_mask);
*/
void esp_zb_factory_reset(void);

/**
* @brief Reset all endpoints to factory default
*
* @note If @p cb is not set or @p cb return NULL, the default attribute value will be set to zero
* @param[in] reset_report Whether reset report of clusters or not
* @param[in] cb The user can utilize the callback to set default attribute value
*
* @return
* - ESP_OK: on success
* - ESP_FAIL: on failed
*/
esp_err_t esp_zb_zcl_reset_all_endpoints_to_factory_default(bool reset_report, esp_zb_zcl_reset_default_attr_callback_t cb);

/**
* @brief Reset endpoint to factory default
*
* @note If @p cb is not set or @p cb return NULL, the default attribute value will be set to zero
* @param[in] endpoint The endpoint identifier which will be reset
* @param[in] reset_report Whether reset report of clusters or not
* @param[in] cb The user can utilize the callback to set default attribute value
*
* @return
* - ESP_OK: on success
* - ESP_FAIL: on failed
*/
esp_err_t esp_zb_zcl_reset_endpoint_to_factory_default(uint8_t endpoint, bool reset_report, esp_zb_zcl_reset_default_attr_callback_t cb);

/**
* @brief Reset the non-volatile data to factory default
*
*/
void esp_zb_zcl_reset_nvram_to_factory_default(void);

/**
* @brief Start Zigbee function.
*
Expand Down Expand Up @@ -565,6 +619,22 @@ void esp_zb_factory_reset(void);
*/
esp_err_t esp_zb_start(bool autostart);

/**
* @brief Acquire Zigbee lock.
*
* @note It's mandatory to acquire the lock before calling any Zigbee SDK APIs, except that the call site is in Zigbee callbacks.
* @return
* - true: on success
*
*/
bool esp_zb_lock_acquire(TickType_t block_ticks);

/**
* @brief Release Zigbee lock.
*
*/
void esp_zb_lock_release(void);

/**
* @brief Zigbee main loop iteration.
*
Expand Down Expand Up @@ -679,22 +749,24 @@ esp_err_t esp_zb_bdb_cancel_formation(void);
*/
esp_err_t esp_zb_device_register(esp_zb_ep_list_t *ep_list);

#ifdef ZB_DISTRIBUTED_SECURITY_ON

/**
* @brief Zigbee stack minior initialization for RCP.
* @brief Set trust center policy state to distributed or not
*
* @warning It is ONLY for RCP initialization for limited Zigbee stack init
* @param[in] enabled The trust center policy state
*/
void esp_zb_rcp_init(void);
void esp_zb_tc_policy_set_distributed_security(bool enabled);

/**
* @brief Zigbee main loop iteration for RCP
*
* @warning It is ONLY for RCP main loop iteration.
* @brief Check the trust center policy is distributed
*
* @return
* - true: trust center policy is set as distributed
* - false: trust center policy is not set as distributed
*/
void esp_zb_rcp_main_loop_iteration(void);
bool esp_zb_tc_policy_get_distributed_security();

#ifdef ZB_DISTRIBUTED_SECURITY_ON
/**
* @brief Enable or disable the Zigbee distributed network.
*
Expand All @@ -718,7 +790,7 @@ bool esp_zb_network_is_distributed(void);
/**
* @brief Enable or disable the Zigbee device to join a distributed TC network
*
* @note It is disbaled by default
* @note It is disabled by default
*
* @param[in] enabled Enable or disable
*/
Expand All @@ -735,7 +807,7 @@ bool esp_zb_joining_to_distributed_network_enabled(void);
/**
* @brief Set the sleep threshold on the device. When the scheduler detects that the device can enter sleep mode, it will notify the application with the signal ESP_ZB_COMMON_SIGNAL_CAN_SLEEP.
* The device cannot enter sleep mode when the sleep interval is less than this threshold.
* Default sleep threshold is 20 milliseconds, beacuse do not sleep when it is less then 1 Beacon Interval to wake up.
* Default sleep threshold is 20 milliseconds, because do not sleep when it is less then 1 Beacon Interval to wake up.
*
* @param[in] threshold_ms Sleep threshold in milliseconds
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,14 @@ typedef struct esp_zb_zcl_identify_effect_message_s {
uint8_t effect_variant; /*!< The field is used to indicate which variant of the effect, indicated in the effect identifier field, SHOULD be triggered */
} esp_zb_zcl_identify_effect_message_t;

/**
* @brief The Zigbee zcl basic cluster reset to factory defualt message
*
*/
typedef struct esp_zb_zcl_basic_reset_factory_default_message_s {
esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */
} esp_zb_zcl_basic_reset_factory_default_message_t;

/**
* @brief The Zigbee zcl command basic application information struct
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ typedef void (*esp_zb_zdo_binding_table_callback_t)(const esp_zb_zdo_binding_tab
* @param[in] scan_duration Time to spend scanning each channel
* @param[in] user_cb A user callback to get the active scan result please refer to esp_zb_zdo_scan_complete_callback_t
*/
void esp_zb_active_scan_request(uint32_t channel_mask, uint8_t scan_duration, esp_zb_zdo_scan_complete_callback_t user_cb);
void esp_zb_zdo_active_scan_request(uint32_t channel_mask, uint8_t scan_duration, esp_zb_zdo_scan_complete_callback_t user_cb);

/**
* @brief Send bind device request command
Expand Down Expand Up @@ -424,6 +424,12 @@ void esp_zb_zdo_permit_joining_req(esp_zb_zdo_permit_joining_req_param_t *cmd_re
*/
void esp_zb_zdo_binding_table_req(esp_zb_zdo_mgmt_bind_param_t *cmd_req, esp_zb_zdo_binding_table_callback_t user_cb, void *user_ctx);

/**
* @brief Send device announcement command
*
*/
void esp_zb_zdo_device_announcement_req(void);

/**
* @brief Stringify the Zigbee Device Object signal
*
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_cli_command.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_cli_command.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_gpd.a
Binary file not shown.
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_cli_command.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_gpd.a
Binary file not shown.
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_cli_command.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 modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified docs/_static/esp-thread-border-router-board.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/en/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Build following examples in the esp-zigbee-sdk environment which implemented wit
- :project:`esp_zigbee_ota_client <examples/esp_zigbee_ota/ota_client>`
- :project:`esp_zigbee_ota_server <examples/esp_zigbee_ota/ota_server>`
- :project:`esp_zigbee_gateway <examples/esp_zigbee_gateway>`
- :project:`esp_zigbee_rcp <examples/esp_zigbee_rcp>`
- :project:`esp_zigbee_touchlink <examples/esp_zigbee_touchlink>`

2.1.4 Flashing the Firmware
Expand Down
6 changes: 0 additions & 6 deletions examples/.build-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ examples/esp_zigbee_ncp:
temporary: true
reason: the other targets are not tested yet

examples/esp_zigbee_rcp:
enable:
- if: IDF_TARGET in ["esp32c6", "esp32h2"]
temporary: true
reason: the other targets are not tested yet

examples/esp_zigbee_sleep/deep_sleep:
enable:
- if: IDF_TARGET in ["esp32c6", "esp32h2"]
Expand Down
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This directory contains a range of Zigbee examples. These examples are intended
The examples are grouped into subdirectories by category. Each category directory contains one or more example projects:
- [esp_zigbee_customized_devices](esp_zigbee_customized_devices) Zigbee fully customized attribute/cluster/endpoint for server and client devices
- [esp_zigbee_gateway](esp_zigbee_gateway) Zigbee gateway example, combines a Wi-Fi SoC such as ESP32, ESP32-C3 and ESP32-S3, with an 802.15.4 SoC like ESP32-H2
- [esp_zigbee_rcp](esp_zigbee_rcp) Zigbee RCP (radio co-processor) device
- [esp_zigbee_HA_sample](esp_zigbee_HA_sample) Zigbee Home automation examples
- [esp_zigbee_CLI](esp_zigbee_cli) Zigbee CLI (Command line interface) examples
- [esp_zigbee_OTA](esp_zigbee_ota) Zigbee OTA (Over-The-Air) upgrade example
Expand Down
Loading

0 comments on commit eef1e0e

Please sign in to comment.