diff --git a/zboss/CHANGELOG.rst b/zboss/CHANGELOG.rst index 7b4cbe87cc..3e0362855c 100644 --- a/zboss/CHANGELOG.rst +++ b/zboss/CHANGELOG.rst @@ -9,6 +9,20 @@ Changelog All notable changes to this project in the |NCS| are documented in this file. +Main branch +*********** + +Updated +======= + +* The ZBOSS stack to version ``3.11.4.0+5.1.5``. + For detailed information, see `ZBOSS stack release notes`_ for the |NCS| v2.6.0 release. + +Bug fixes +========= + +* Fixed an issue where corrupted entry integrity in zb_nvram resulted in an infinite loop of device reboots. + nRF Connect SDK v2.6.0 ********************** diff --git a/zboss/production/include/osif/build_info.h b/zboss/production/include/osif/build_info.h index bf47949567..f8fdd11317 100644 --- a/zboss/production/include/osif/build_info.h +++ b/zboss/production/include/osif/build_info.h @@ -11,20 +11,20 @@ * Please use release scripts to update it's contents. * * Repositories: - * platform_ncs 1366df8ca7f42a702dbec8d494a0015e85837755 https://projecttools.nordicsemi.no/bitbucket/scm/ZOI/platform_ncs.git - * zboss-stack-src 5c339a77a158b29b0072141573e9f7e661cac96c https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable - * zboss-stack-doc 31a9182d4fc43bfedbcc1bb1dab2aec4e07288ad https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc - * nrf 68bd648703fd5500e178a5e9ef2dd6fd98018245 https://github.com/nrfconnect/sdk-nrf - * zephyr 0fa93fad62c1cf6fb1f4c0f8fa30afcb0dbe50aa https://github.com/nrfconnect/sdk-zephyr - * hostap c66e5de97a44c77ec87a86ded88636a92d7ceea6 https://github.com/nrfconnect/sdk-hostap - * wfa-qt-control-app b3cea7b770cf8270cf25831cf3c9db063234e603 https://github.com/nrfconnect/sdk-wi-fiquicktrack-controlappc - * mcuboot 323fb663e832d4c45eb2fc2d30a3955684791b7d https://github.com/nrfconnect/sdk-mcuboot - * qcbor 751d36583a9ce1a640900c57e13c9b6b8f3a2ba2 https://github.com/laurencelundblade/QCBOR.git - * mbedtls 4625a6097993a0bae01f809aacd48ee2c9cb1d0b https://github.com/nrfconnect/sdk-mbedtls - * nrfxlib 502ce15474c2619e3ef9291588357dd2ddf31fb0 https://github.com/nrfconnect/sdk-nrfxlib - * trusted-firmware-m 51fe43807f8d968de0b0df01862f9a20d9f119e6 https://github.com/nrfconnect/sdk-trusted-firmware-m + * platform_ncs 12cdb97a3e189b24a7a457df05ac796b1ac535f5 https://projecttools.nordicsemi.no/bitbucket/scm/ZOI/platform_ncs.git + * zboss-stack-src 82b8031a171fa996b390540ed844498e63cea75a https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable + * zboss-stack-doc e27795fd73b18a7f3cd497ef2ed3092e569c292a https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc + * nrf 3190fa573ff67bfb745028f203e9d0ea4144a1ce https://github.com/nrfconnect/sdk-nrf + * zephyr d96769facecaba386b642d2c76c92c7694c81da0 https://github.com/nrfconnect/sdk-zephyr + * hostap dda5457ad2cfce99e333980c7764c8d480ae4010 https://github.com/nrfconnect/sdk-hostap + * wfa-qt-control-app d649bd1342215e089d4211757186705cda179013 https://github.com/nrfconnect/sdk-wi-fiquicktrack-controlappc + * mcuboot 3c2f2ff12bc20625cd65730b6036d061de4da5f7 https://github.com/nrfconnect/sdk-mcuboot + * qcbor 751d36583a9ce1a640900c57e13c9b6b8f3a2ba2 https://github.com/laurencelundblade/QCBOR + * mbedtls 9beb52e67835a17368616b27700270b3eb99e4ca https://github.com/nrfconnect/sdk-mbedtls + * nrfxlib 13cd978b22d192447537a60f7fae5fe092930dc4 https://github.com/nrfconnect/sdk-nrfxlib + * trusted-firmware-m 2a2e1ce5e80fa3893a7747728003552bf6cfef55 https://github.com/nrfconnect/sdk-trusted-firmware-m * psa-arch-tests 94a349db22cd0e44136c281724ffc71b6e7391c3 https://github.com/nrfconnect/sdk-psa-arch-tests - * matter 0b7d6e4909f070d20e0f5532927a7241f5de9364 https://github.com/nrfconnect/sdk-connectedhomeip + * matter 7653e6c78d0aab6d9c0fd25408e5a908435955b8 https://github.com/nrfconnect/sdk-connectedhomeip * cjson c6af068b7f05207b28d68880740e4b9ec1e4b50a https://github.com/nrfconnect/sdk-cjson * azure-sdk-for-c 308c171cb4b5eed266649012a68406487ec81fb2 https://github.com/nrfconnect/azure-sdk-for-c * cirrus 3873a08377d93a479105a75ac390d3bbcd31d690 https://github.com/nrfconnect/sdk-mcu-drivers @@ -43,7 +43,7 @@ * cmsis-nn 0c8669d81381ccf3b1a01d699f3b68b50134a99f https://github.com/zephyrproject-rtos/cmsis-nn * edtt 64e5105ad82390164fb73fc654be3f73a608209a https://github.com/zephyrproject-rtos/edtt * fatfs 427159bf95ea49b7680facffaa29ad506b42709b https://github.com/zephyrproject-rtos/fatfs - * hal_nordic dce8519f7da37b0a745237679fd3f88250b495ff https://github.com/zephyrproject-rtos/hal_nordic + * hal_nordic 5470822384781624efb2fda28cbc6a895a227677 https://github.com/zephyrproject-rtos/hal_nordic * hal_st fb8e79d1a261fd02aadff7c142729f1954163cf3 https://github.com/zephyrproject-rtos/hal_st * hal_wurthelektronik 24ca9873c3d608fad1fea0431836bc8f144c132e https://github.com/zephyrproject-rtos/hal_wurthelektronik * libmetal 03140d7f4bd9ba474ebfbb6256e84a9089248e67 https://github.com/zephyrproject-rtos/libmetal @@ -64,16 +64,16 @@ /** ZBOSS build tag */ -#define ZBOSS_BUILD_TAG "ncs_release-3.11.3.0" +#define ZBOSS_BUILD_TAG "ncs_release-3.11.4.0" /** ZBOSS platform build tag */ -#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.3.0+v5.1.4" +#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.4.0+v5.1.5" /** ZBOSS build date (UTC) */ -#define ZBOSS_BUILD_DATE 20240229 +#define ZBOSS_BUILD_DATE 20240508 /** ZBOSS build time (UTC) */ -#define ZBOSS_BUILD_TIME 112147 +#define ZBOSS_BUILD_TIME 141040 #endif /* ZBOSS_BUILD_INFO_H__ */ diff --git a/zboss/production/include/osif/zb_revision_r22.h b/zboss/production/include/osif/zb_revision_r22.h index ede1d44bf2..6dacc8303b 100644 --- a/zboss/production/include/osif/zb_revision_r22.h +++ b/zboss/production/include/osif/zb_revision_r22.h @@ -12,7 +12,7 @@ * * Note: This value is automatically updated by the release script. */ -#define ZBOSS_SDK_REVISION 1U +#define ZBOSS_SDK_REVISION 1U /** * Major version number of the ZBOSS platform for NCS. @@ -29,11 +29,11 @@ * * Note: This value is automatically updated by the release script. */ -#define ZBOSS_PLATFORM_PATCH 4U +#define ZBOSS_PLATFORM_PATCH 5U /** * Patch version number of the ZBOSS core. * * Note: This value is automatically updated by the release script. */ -#define ZBOSS_PATCH 3U +#define ZBOSS_PATCH 4U diff --git a/zboss/production/include/zb_address.h b/zboss/production/include/zb_address.h index 79bc649a03..f80ff850f8 100644 --- a/zboss/production/include/zb_address.h +++ b/zboss/production/include/zb_address.h @@ -626,6 +626,14 @@ void zb_ieee_addr_decompress(zb_ieee_addr_t address, zb_ieee_addr_compressed_t * */ zb_bool_t zb_address_cmp_two_refs(zb_address_ieee_ref_t addr_ref_a, zb_address_ieee_ref_t addr_ref_b); +/** + * @brief Check that address reference is used + * + * @param ref Address ref to check + * @return zb_bool_t ZB_TRUE if address is used, ZB_FALSE otherwise. + */ +zb_bool_t zb_address_in_use(zb_address_ieee_ref_t ref); + /** * @brief Check if address tables have enough memory for the new address * diff --git a/zboss/production/include/zb_debug.h b/zboss/production/include/zb_debug.h index 01721a9d88..1d9d345f4e 100644 --- a/zboss/production/include/zb_debug.h +++ b/zboss/production/include/zb_debug.h @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2021 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -153,7 +153,9 @@ void lwip_zb_assert(zb_uint16_t file_id, zb_int_t line_number); @param expr - expression to check. */ -#if (defined __GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#ifdef __cplusplus +#define ZB_ASSERT_COMPILE_DECL(expr) __extension__ static_assert(expr, "Assert at line __LINE__") +#elif (defined __GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define ZB_ASSERT_COMPILE_DECL(expr) __extension__ _Static_assert(expr, "Assert at line __LINE__") #elif defined(__COUNTER__) #define ZB_ASSERT_COMPILE_DECL(expr) typedef zb_int_t ZB_ASSERT_CAT(assert, ZB_ASSERT_CAT(__LINE__, __COUNTER__))[(expr) ? 1 : -1] @@ -222,7 +224,7 @@ while (0) #define ZB_P3_ON() #define ZB_P3_OFF() -#define ZB_P4_ON() +#define ZB_P4_ON() #define ZB_P4_OFF() #if defined ZB_TRAFFIC_DUMP_ON diff --git a/zboss/production/include/zboss_api.h b/zboss/production/include/zboss_api.h index 3a74845207..92d21c5936 100644 --- a/zboss/production/include/zboss_api.h +++ b/zboss/production/include/zboss_api.h @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2022 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -1132,6 +1132,23 @@ typedef enum zb_nvram_dataset_types_e #define ZB_NVRAM_APP_DATASET_NUMBER 4U +/** + * @brief Structure that contains report about any NVRAM failure. + * + * Upon receiving of this error, user can decide what to do: + * 1. Do nothing - stack will be reset immediately, + * all not corrupted datasets will be copied to another page. + * 2. Clear nvram. + * 3. Manually implement function that implements user logic in this case. + */ +typedef struct zb_nvram_failure_report_s +{ + zb_uint16_t ds_type; /*!< Dataset type @see zb_nvram_dataset_types_t */ + zb_uint16_t pos; /*!< Position of dataset payload that haven't been written */ + zb_uint8_t page; /*!< Page of dataset payload that haven't been written */ + zb_uint8_t reserved[3]; /*!< Reserved for future use */ +} zb_nvram_failure_report_t; + /** * Declares application callback used for reading application datasets from NVRAM. * @@ -1242,6 +1259,11 @@ zb_ret_t zb_nvram_write_dataset(zb_nvram_dataset_types_t t); * Clears all datasets except @ref ZB_IB_COUNTERS and application datasets. */ void zb_nvram_clear(void); + +/** + Disable using NVRAM till ZBOSS restart + */ +void zb_nvram_disable(void); /** @endcond */ /* DOXYGEN_INTERNAL_DOC */ #ifndef ZB_USE_INTERNAL_HEADERS diff --git a/zboss/production/include/zcl/zb_zcl_color_control.h b/zboss/production/include/zcl/zb_zcl_color_control.h index 724197513f..bf3a7c005f 100644 --- a/zboss/production/include/zcl/zb_zcl_color_control.h +++ b/zboss/production/include/zcl/zb_zcl_color_control.h @@ -1322,9 +1322,8 @@ void zb_zcl_color_control_send_move_to_hue_req(zb_bufid_t buffer, const zb_addr_ (zb_zcl_color_control_move_to_hue_req_t*)zb_buf_begin(buffer) : NULL; \ if (move_to_hue_req_ptr != NULL) \ { \ - move_to_hue_req.hue = move_to_hue_req_ptr->hue; \ - move_to_hue_req.direction = move_to_hue_req_ptr->direction; \ - ZB_HTOLE16(&(move_to_hue_req).transition_time, &(move_to_hue_req_ptr->transition_time)); \ + ZB_MEMCPY(&(move_to_hue_req), move_to_hue_req_ptr, ZB_ZCL_COLOR_CONTROL_MOVE_TO_HUE_REQ_PAYLOAD_LEN); \ + ZB_HTOLE16_ONPLACE((move_to_hue_req).transition_time); \ (void)zb_buf_cut_left(buffer, ZB_ZCL_COLOR_CONTROL_MOVE_TO_HUE_REQ_PAYLOAD_LEN); \ status = ZB_ZCL_PARSE_STATUS_SUCCESS; \ } \ @@ -3206,10 +3205,10 @@ void zb_zcl_color_control_send_move_color_temp_req(zb_bufid_t buffer, const zb_a (zb_zcl_color_control_move_color_temp_req_t*)zb_buf_begin(buffer) : NULL; \ if (move_color_temp_req_ptr != NULL) \ { \ - move_color_temp_req.move_mode = move_color_temp_req_ptr->move_mode; \ - ZB_HTOLE16(&(move_color_temp_req).rate, &(move_color_temp_req_ptr->rate)); \ - ZB_HTOLE16(&(move_color_temp_req).color_temp_min, &(move_color_temp_req_ptr->color_temp_min)); \ - ZB_HTOLE16(&(move_color_temp_req).color_temp_max, &(move_color_temp_req_ptr->color_temp_max)); \ + ZB_MEMCPY(&(move_color_temp_req), move_color_temp_req_ptr, ZB_ZCL_COLOR_CONTROL_MOVE_COLOR_TEMP_REQ_PAYLOAD_LEN); \ + ZB_HTOLE16_ONPLACE((move_color_temp_req).rate); \ + ZB_HTOLE16_ONPLACE((move_color_temp_req).color_temp_min); \ + ZB_HTOLE16_ONPLACE((move_color_temp_req).color_temp_max); \ (void)zb_buf_cut_left(buffer, ZB_ZCL_COLOR_CONTROL_MOVE_COLOR_TEMP_REQ_PAYLOAD_LEN); \ status = ZB_ZCL_PARSE_STATUS_SUCCESS; \ } \ @@ -3319,34 +3318,6 @@ void zb_zcl_color_control_send_step_color_temp_req(zb_bufid_t buffer, const zb_a dst_ep, ep, prfl_id, def_resp, cb, step_mode, step_size, transition_time, color_temp_min, color_temp_max); \ } -/** @brief Macro for getting Move color temperature command - * @attention Assumes that ZCL header already cut. - * @param buffer containing the packet (by pointer). - * @param move_color_temp_req - variable of type @ref - * zb_zcl_color_control_move_color_temp_req_s. - * @param status - variable to put parse status to (see @ref zb_zcl_parse_status_t). - */ -#define ZB_ZCL_COLOR_CONTROL_GET_MOVE_COLOR_TEMP_REQ(buffer, move_color_temp_req, status) \ -{ \ - zb_zcl_color_control_move_color_temp_req_t *move_color_temp_req_ptr; \ - (move_color_temp_req_ptr) = zb_buf_len(buffer) >= \ - ZB_ZCL_COLOR_CONTROL_MOVE_COLOR_TEMP_REQ_PAYLOAD_LEN ? \ - (zb_zcl_color_control_move_color_temp_req_t*)zb_buf_begin(buffer) : NULL; \ - if (move_color_temp_req_ptr != NULL) \ - { \ - move_color_temp_req.move_mode = move_color_temp_req_ptr->move_mode; \ - ZB_HTOLE16(&(move_color_temp_req).rate, &(move_color_temp_req_ptr->rate)); \ - ZB_HTOLE16(&(move_color_temp_req).color_temp_min, &(move_color_temp_req_ptr->color_temp_min)); \ - ZB_HTOLE16(&(move_color_temp_req).color_temp_max, &(move_color_temp_req_ptr->color_temp_max)); \ - (void)zb_buf_cut_left(buffer, ZB_ZCL_COLOR_CONTROL_MOVE_COLOR_TEMP_REQ_PAYLOAD_LEN); \ - status = ZB_ZCL_PARSE_STATUS_SUCCESS; \ - } \ - else \ - { \ - status = ZB_ZCL_PARSE_STATUS_FAILURE; \ - } \ -} - /** @brief Macro for getting Move color temperature command * @attention Assumes that ZCL header already cut. * @param buffer containing the packet (by pointer). diff --git a/zboss/production/include/zcl/zb_zcl_wwah.h b/zboss/production/include/zcl/zb_zcl_wwah.h index f23a399b32..a6359452cb 100644 --- a/zboss/production/include/zcl/zb_zcl_wwah.h +++ b/zboss/production/include/zcl/zb_zcl_wwah.h @@ -44,8 +44,6 @@ #ifndef ZB_ZCL_WWAH_H #define ZB_ZCL_WWAH_H 1 -#include - #include "zcl/zb_zcl_common.h" #include "zcl/zb_zcl_commands.h" @@ -395,6 +393,8 @@ ZB_ASSERT_VALUE_ALIGNED_TO_4(ZB_ZCL_WWAH_APS_LINK_KEY_AUTHORIZATION_TABLE_SIZE * #define ZB_ZCL_WWAH_USE_TRUST_CENTER_FOR_CLUSTER_TABLE_SIZE 4 ZB_ASSERT_VALUE_ALIGNED_TO_4(ZB_ZCL_WWAH_USE_TRUST_CENTER_FOR_CLUSTER_TABLE_SIZE * sizeof(zb_uint16_t)); +#define ZB_ZCL_WWAH_CLUSTER_LIST_MAX_SIZE ZB_ZCL_WWAH_APS_ACK_EXEMPT_TABLE_SIZE + /** @brief WWAH Cluster arrays "record is free" flag */ #define ZB_ZCL_WWAH_CLUSTER_ID_FREE_RECORD 0xFFFF @@ -643,12 +643,13 @@ typedef enum zb_zcl_wwah_behavior_e (void*) data_ptr \ } -typedef ZB_PACKED_PRE struct zb_zcl_wwah_cluster_list_s +typedef struct zb_zcl_wwah_cluster_list_s { - zb_uint8_t number_of_clusters; /**< Number of Clusters */ - zb_uint16_t *cluster_id; /**< Cluster ID */ + zb_uint8_t number_of_clusters; /**< Number of Clusters */ + zb_uint8_t alignment[3]; /**< Alignment */ + zb_uint16_t cluster_id[ZB_ZCL_WWAH_CLUSTER_LIST_MAX_SIZE]; /**< Cluster list */ } -ZB_PACKED_STRUCT zb_zcl_wwah_cluster_list_t; +zb_zcl_wwah_cluster_list_t; /*! @brief Parses various commands with cluster list variable length payload and fills data request structure. @@ -660,19 +661,21 @@ ZB_PACKED_STRUCT zb_zcl_wwah_cluster_list_t; #define ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(data_buf, req, status) \ { \ - zb_zcl_wwah_cluster_list_t *src_ptr = (zb_zcl_wwah_cluster_list_t*)zb_buf_begin((data_buf)); \ + zb_uint8_t *src_ptr = (zb_uint8_t*)zb_buf_begin((data_buf)); \ + zb_uint8_t number_of_clusters = *src_ptr; \ (status) = ZB_ZCL_PARSE_STATUS_FAILURE; \ if (zb_buf_len((data_buf)) >= sizeof(zb_uint8_t)) \ { \ - (req)->number_of_clusters = src_ptr->number_of_clusters; \ - if (src_ptr->number_of_clusters) \ + (req).number_of_clusters = number_of_clusters; \ + if (number_of_clusters > 0) \ { \ if (zb_buf_len((data_buf)) >= sizeof(zb_uint8_t) + \ - src_ptr->number_of_clusters * sizeof(zb_uint16_t)) \ + number_of_clusters * sizeof(zb_uint16_t)) \ { \ - zb_uint16_t cluster_id; \ - memcpy(&cluster_id, &(src_ptr->cluster_id), sizeof(zb_uint16_t)); \ - (req)->cluster_id = &cluster_id; \ + ZB_MEMCPY( \ + (zb_uint8_t*)((req).cluster_id), \ + (src_ptr + 1), \ + number_of_clusters * sizeof(zb_uint16_t)); \ (status) = ZB_ZCL_PARSE_STATUS_SUCCESS; \ } \ } \ diff --git a/zboss/production/lib/cortex-m33/hard-float/libncp-dev.a b/zboss/production/lib/cortex-m33/hard-float/libncp-dev.a index 0d2f776802..539efa5a9e 100644 Binary files a/zboss/production/lib/cortex-m33/hard-float/libncp-dev.a and b/zboss/production/lib/cortex-m33/hard-float/libncp-dev.a differ diff --git a/zboss/production/lib/cortex-m33/hard-float/libncp-dev.ed.a b/zboss/production/lib/cortex-m33/hard-float/libncp-dev.ed.a index bd2af2046d..b01889ebff 100644 Binary files a/zboss/production/lib/cortex-m33/hard-float/libncp-dev.ed.a and b/zboss/production/lib/cortex-m33/hard-float/libncp-dev.ed.a differ diff --git a/zboss/production/lib/cortex-m33/hard-float/libzboss.a b/zboss/production/lib/cortex-m33/hard-float/libzboss.a index e780dcc74f..3491959f85 100644 Binary files a/zboss/production/lib/cortex-m33/hard-float/libzboss.a and b/zboss/production/lib/cortex-m33/hard-float/libzboss.a differ diff --git a/zboss/production/lib/cortex-m33/hard-float/libzboss.ed.a b/zboss/production/lib/cortex-m33/hard-float/libzboss.ed.a index c7ff52d893..aeadf59e2f 100644 Binary files a/zboss/production/lib/cortex-m33/hard-float/libzboss.ed.a and b/zboss/production/lib/cortex-m33/hard-float/libzboss.ed.a differ diff --git a/zboss/production/lib/cortex-m4/hard-float/libncp-dev.a b/zboss/production/lib/cortex-m4/hard-float/libncp-dev.a index a98823e0d3..9b74bfd873 100644 Binary files a/zboss/production/lib/cortex-m4/hard-float/libncp-dev.a and b/zboss/production/lib/cortex-m4/hard-float/libncp-dev.a differ diff --git a/zboss/production/lib/cortex-m4/hard-float/libncp-dev.ed.a b/zboss/production/lib/cortex-m4/hard-float/libncp-dev.ed.a index 0802501240..a3763de5d3 100644 Binary files a/zboss/production/lib/cortex-m4/hard-float/libncp-dev.ed.a and b/zboss/production/lib/cortex-m4/hard-float/libncp-dev.ed.a differ diff --git a/zboss/production/lib/cortex-m4/hard-float/libzboss.a b/zboss/production/lib/cortex-m4/hard-float/libzboss.a index 70f6446d72..0b009c2e4e 100644 Binary files a/zboss/production/lib/cortex-m4/hard-float/libzboss.a and b/zboss/production/lib/cortex-m4/hard-float/libzboss.a differ diff --git a/zboss/production/lib/cortex-m4/hard-float/libzboss.ed.a b/zboss/production/lib/cortex-m4/hard-float/libzboss.ed.a index 0568024968..f6f6a5dfef 100644 Binary files a/zboss/production/lib/cortex-m4/hard-float/libzboss.ed.a and b/zboss/production/lib/cortex-m4/hard-float/libzboss.ed.a differ diff --git a/zboss/production/src/include/zb_nvram.h b/zboss/production/src/include/zb_nvram.h index 564cb60a06..0640bc3723 100644 --- a/zboss/production/src/include/zb_nvram.h +++ b/zboss/production/src/include/zb_nvram.h @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2022 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -310,15 +310,20 @@ typedef struct zb_nvram_position_s #define ZB_NVRAM_VER_7_0 6U /* Used for ZBOSS SDK: stub for the next versions */ #define ZB_NVRAM_VER_8_0 7U /* Used before introducing dataset tails */ #define ZB_NVRAM_VER_9_0 8U /* Version of NVRAM having additional dataset trailers */ -#define ZB_NVRAM_VER_10_0 9U -#define ZB_NVRAM_LAST_VER ZB_NVRAM_VER_10_0 /* Should always be equal to the highest version */ +#define ZB_NVRAM_VER_10_0 9U /* Version with unused CRC field in tail */ +#define ZB_NVRAM_VER_11_0 10U /* Version with used CRC field in tail */ +#define ZB_NVRAM_VER_12_0 11U /* Version with guarantee that all dataset sizes are forcefully aligned to 4 */ +#define ZB_NVRAM_LAST_VER ZB_NVRAM_VER_12_0 /* Should always be equal to the highest version */ /*------------------*/ #define ZB_NVRAM_VER_COUNT (ZB_NVRAM_LAST_VER + 1U) /** @} */ #define ZB_MIN_NVRAM_VER_WITH_DS_TRAILERS ZB_NVRAM_VER_9_0 +#define ZB_MIN_NVRAM_VER_WITH_DS_CRC_IN_TAIL ZB_NVRAM_VER_11_0 +/* Initnial value for crc calculation */ +#define ZB_NVRAM_CRC_DEFAULT_VALUE 0xFFFFU typedef zb_uint16_t zb_nvram_ver_t; @@ -1385,6 +1390,7 @@ zb_ret_t zb_nvram_write_poll_control_dataset(zb_uint8_t page, zb_uint32_t pos); #define ZB_ERROR_NVRAM_READ_FAILURE 1 #define ZB_ERROR_NVRAM_WRITE_FAILURE 2 +#define ZB_ERROR_NVRAM_WRITE_VALIDATION_FAILURE 3 #if defined(ZDO_DIAGNOSTICS) diff --git a/zboss/production/src/include/zb_nvram_globals.h b/zboss/production/src/include/zb_nvram_globals.h index a23c7a7082..c1c7428fd2 100644 --- a/zboss/production/src/include/zb_nvram_globals.h +++ b/zboss/production/src/include/zb_nvram_globals.h @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2021 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -53,6 +53,7 @@ typedef struct zb_nvram_pos_payload_checker_s zb_lbitfield_t pos:30; zb_lbitfield_t page:2; zb_uint16_t payload_length; + zb_uint16_t crc; /* < CRC field is needed to accumulate crc while writing */ } zb_nvram_pos_payload_checker_t; typedef ZB_PACKED_PRE struct zb_nvram_page_state_s @@ -103,7 +104,7 @@ typedef struct zb_nvram_globals_s zb_nvram_write_app_data_t write_app_data_cb[ZB_NVRAM_APP_DATASET_NUMBER]; zb_nvram_get_app_data_size_t get_app_data_size_cb[ZB_NVRAM_APP_DATASET_NUMBER]; zb_nvram_custom_ds_ctx_t custom_ds_ctx; - + zb_nvram_ds_filter_cb_t ds_filter_cb; /*!< If assigned function to be called to filter out some datasets at load */ zb_nvram_tl_t current_time_label; /*!< Current time label. Max from wrote NVRAM dataset header */ zb_nvram_page_state_t pages[ZB_NVRAM_MAX_N_PAGES]; diff --git a/zboss/production/src/include/zb_secur.h b/zboss/production/src/include/zb_secur.h index e0e7dab3f4..820a113aae 100644 --- a/zboss/production/src/include/zb_secur.h +++ b/zboss/production/src/include/zb_secur.h @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2021 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -1054,6 +1054,11 @@ void secur_nwk_generate_keys(void); */ void secur_authenticate_child(zb_uint8_t param); +/** + Remove from NBT unauthenticated device + */ +void secur_forget_unauth_dev(zb_uint8_t addr_ref); + /** Generate NWK key by key sequence number diff --git a/zboss/production/src/zcl/zcl_color_control_commands.c b/zboss/production/src/zcl/zcl_color_control_commands.c index 7e7f7ed122..5d173f3819 100644 --- a/zboss/production/src/zcl/zcl_color_control_commands.c +++ b/zboss/production/src/zcl/zcl_color_control_commands.c @@ -1228,7 +1228,7 @@ static void zb_zcl_process_color_control_stop_all_commands(zb_uint8_t endpoint) static zb_ret_t zb_zcl_process_color_control_move_to_hue_handler(zb_uint8_t param, zb_uint8_t buf2_param) { zb_ret_t ret = RET_OK; - zb_zcl_color_control_move_to_hue_req_t payload = {0}; + zb_zcl_color_control_move_to_hue_req_t payload; zb_zcl_parse_status_t status; zb_zcl_parsed_hdr_t cmd_info; @@ -2636,7 +2636,7 @@ static zb_uint16_t zb_zcl_color_control_get_color_temperature_limit( static zb_ret_t zb_zcl_process_color_control_move_color_temp_handler(zb_uint8_t param, zb_uint8_t buf2_param) { zb_ret_t ret = RET_OK; - zb_zcl_color_control_move_color_temp_req_t payload = {0}; + zb_zcl_color_control_move_color_temp_req_t payload; zb_zcl_parse_status_t status; zb_zcl_parsed_hdr_t cmd_info; zb_uint8_t endpoint; diff --git a/zboss/production/src/zcl/zcl_s_wwah.c b/zboss/production/src/zcl/zcl_s_wwah.c index 472640fae4..d0c752667f 100644 --- a/zboss/production/src/zcl/zcl_s_wwah.c +++ b/zboss/production/src/zcl/zcl_s_wwah.c @@ -1,7 +1,7 @@ /* * ZBOSS Zigbee 3.0 * - * Copyright (c) 2012-2022 DSR Corporation, Denver CO, USA. + * Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA. * www.dsr-zboss.com * www.dsr-corporation.com * All rights reserved. @@ -531,7 +531,7 @@ zb_ret_t zb_zcl_wwah_enable_aps_link_key_authorization_handler(zb_uint8_t param) ZB_MEMCPY(&cmd_info, ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t), sizeof(zb_zcl_parsed_hdr_t)); - ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, &payload, status); + ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, payload, status); if (status == ZB_ZCL_PARSE_STATUS_SUCCESS ) { if (payload.number_of_clusters > ZB_ZCL_WWAH_APS_LINK_KEY_AUTHORIZATION_TABLE_SIZE) @@ -580,7 +580,7 @@ zb_ret_t zb_zcl_wwah_disable_aps_link_key_authorization_handler(zb_uint8_t param ZB_MEMCPY(&cmd_info, ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t), sizeof(zb_zcl_parsed_hdr_t)); - ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, &payload, status); + ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, payload, status); if (status == ZB_ZCL_PARSE_STATUS_SUCCESS ) { if (payload.number_of_clusters > ZB_ZCL_WWAH_APS_LINK_KEY_AUTHORIZATION_TABLE_SIZE) @@ -1197,7 +1197,7 @@ zb_ret_t zb_zcl_wwah_require_aps_acks_on_unicasts_handler(zb_uint8_t param){ ZB_MEMCPY(&cmd_info, ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t), sizeof(zb_zcl_parsed_hdr_t)); - ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, &payload, status); + ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, payload, status); if (status == ZB_ZCL_PARSE_STATUS_SUCCESS ) { if (payload.number_of_clusters > ZB_ZCL_WWAH_APS_ACK_EXEMPT_TABLE_SIZE) @@ -1808,7 +1808,7 @@ zb_ret_t zb_zcl_wwah_use_trust_center_for_cluster_handler(zb_uint8_t param) ZB_MEMCPY(&cmd_info, ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t), sizeof(zb_zcl_parsed_hdr_t)); - ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, &payload, status); + ZB_ZCL_WWAH_GET_CLUSTER_LIST_CMD(param, payload, status); if (status == ZB_ZCL_PARSE_STATUS_SUCCESS ) { if (payload.number_of_clusters > ZB_ZCL_WWAH_USE_TRUST_CENTER_FOR_CLUSTER_TABLE_SIZE) diff --git a/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.a b/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.a index 4f82b29093..fb19f95218 100644 Binary files a/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.a and b/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.a differ diff --git a/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.ed.a b/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.ed.a index 13920a1a9b..c30ab8760b 100644 Binary files a/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.ed.a and b/zboss/production/trace/lib/cortex-m33/hard-float/libncp-dev.ed.a differ diff --git a/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.a b/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.a index d51c1c1e58..69535436db 100644 Binary files a/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.a and b/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.a differ diff --git a/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.ed.a b/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.ed.a index 399c672d37..0351f882c7 100644 Binary files a/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.ed.a and b/zboss/production/trace/lib/cortex-m33/hard-float/libzboss.ed.a differ diff --git a/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.a b/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.a index e7a87d5aaa..04a1471d06 100644 Binary files a/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.a and b/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.a differ diff --git a/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.ed.a b/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.ed.a index 1b622d280d..cf4df11905 100644 Binary files a/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.ed.a and b/zboss/production/trace/lib/cortex-m4/hard-float/libncp-dev.ed.a differ diff --git a/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.a b/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.a index 9ebe7ffefd..fb4e158214 100644 Binary files a/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.a and b/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.a differ diff --git a/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.ed.a b/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.ed.a index 017dcf4a02..d5312fb315 100644 Binary files a/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.ed.a and b/zboss/production/trace/lib/cortex-m4/hard-float/libzboss.ed.a differ