diff --git a/zboss/CHANGELOG.rst b/zboss/CHANGELOG.rst index 3fbfcf74ec..0783ef4abc 100644 --- a/zboss/CHANGELOG.rst +++ b/zboss/CHANGELOG.rst @@ -9,6 +9,24 @@ Changelog All notable changes to this project in the |NCS| are documented in this file. +nRF Connect SDK v2.9.0 +********************** + +Updated +======= + +* The ZBOSS stack to version ``3.11.6.0+5.1.7``. + For detailed information, see `ZBOSS stack release notes`_ for the |NCS| v2.9.0 release. + +Bug fixes +========= + +* Fixed generating Extended Response for certain address requests on ZED. +* Fixed an issue where ZR device sometimes would join to network with Extended PAN ID equal to 0x0000000000000000 after factory reset. +* Fixed a known issue where ZR would not accept new child devices if the maximum number of children was reached. +* Fixed some incorrect diagnostics cluster attributes macro names. +* Fixed an issue where a device would stop sending/receiving frames after being jammed. + nRF Connect SDK v2.8.0 ********************** diff --git a/zboss/production/include/osif/build_info.h b/zboss/production/include/osif/build_info.h index 66e9b1ec3f..5b6ec8a794 100644 --- a/zboss/production/include/osif/build_info.h +++ b/zboss/production/include/osif/build_info.h @@ -11,30 +11,30 @@ * Please use release scripts to update it's contents. * * Repositories: - * platform_ncs f1ce38e33a03c03fb922eea2827c9bf978d16fb1 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/platform_ncs.git - * zboss-stack-src 617305eb6e51ea20153fc520392177f56373cecf https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable - * zboss-stack-doc d185acb78465fce1252453a93635fc4e2aac2a68 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc - * nrf 21f851fa7d3c91f0e45c67f741bbf9e8efea9fc9 https://github.com/nrfconnect/sdk-nrf - * zephyr bc59fe3cf65c054b13305aa977ecddddf7cf42e4 https://github.com/nrfconnect/sdk-zephyr + * platform_ncs db349cfbf4d32d03bc8ca2b1934c055cedd38746 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/platform_ncs.git + * zboss-stack-src 527882038813c10bc16c58b3822728f01839f8e4 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable + * zboss-stack-doc a9e550875d1a486bb829f4be6ab45042cb758e02 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc + * nrf 2dee59af02a114e7fc7856bee2e35fc9f37d7ddd https://github.com/nrfconnect/sdk-nrf + * zephyr 0a2e205750dc7eff8767afa543b2fd23a1fbb332 https://github.com/nrfconnect/sdk-zephyr * wfa-qt-control-app af011c8a8d338ba529f17aed2cc2ef4c1c591a58 https://github.com/nrfconnect/sdk-wi-fiquicktrack-controlappc - * mcuboot c9e44365fd6c7bb1c95000a2d38a6bf263298126 https://github.com/nrfconnect/sdk-mcuboot + * mcuboot 12e5ee106034972b0f1074d6f2261b2b39d1501b https://github.com/nrfconnect/sdk-mcuboot * qcbor 751d36583a9ce1a640900c57e13c9b6b8f3a2ba2 https://github.com/laurencelundblade/QCBOR * mbedtls 98603a8c91660beac00e0ee1d76198fb7c4ed29b https://github.com/nrfconnect/sdk-mbedtls - * oberon-psa-crypto b41e899e7302462eb952b0b6a7c6903e368fb395 https://github.com/nrfconnect/sdk-oberon-psa-crypto - * nrfxlib 999c8a81426ed8d88915e008bfc13b8d33af1361 https://github.com/nrfconnect/sdk-nrfxlib - * trusted-firmware-m 8c7fae3936da02b7db4f5c8aba174b252a2b326e https://github.com/nrfconnect/sdk-trusted-firmware-m + * oberon-psa-crypto 21728cf8402ac567326d0d69eec891a2bfdb8ea3 https://github.com/nrfconnect/sdk-oberon-psa-crypto + * nrfxlib 1ab292d04974dc97523c00dfa82eb461fd27bdb1 https://github.com/nrfconnect/sdk-nrfxlib + * trusted-firmware-m f2bf78452629355e4180dc36756f6c1becc819fa https://github.com/nrfconnect/sdk-trusted-firmware-m * psa-arch-tests 3da9313e64806d352c519e3205e81cf959067588 https://github.com/nrfconnect/sdk-psa-arch-tests - * matter f67310e6166ce4738985168fb3d74c5314539688 https://github.com/nrfconnect/sdk-connectedhomeip - * soc-hwmv1 32b1ee3e4576815bebf9ce3e8d63efe73bd89c62 https://github.com/nrfconnect/sdk-soc-hwmv1 + * matter 9a6edcf725a9766e513fe789745da92e0f640cb1 https://github.com/nrfconnect/sdk-connectedhomeip + * soc-hwmv1 bd39fcf7832b4eb682a9c5ef5ad0e3b2e34cd502 https://github.com/nrfconnect/sdk-soc-hwmv1 * 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 * openthread ee86dc26d71c9ef021fad8a28898829df772011a https://github.com/nrfconnect/sdk-openthread - * suit-generator a9b80a109a5da13101b69120f678add48d68cc57 https://github.com/nrfconnect/suit-generator - * suit-processor 7d94614168540359651391e64aa4de6515e43fca https://github.com/nrfconnect/suit-processor + * suit-generator 8f9ce9039e6fb8584dc915944b2bc275856757c0 https://github.com/nrfconnect/suit-generator + * suit-processor 6802f3008cba16a74a8c65814af00808327a7ee7 https://github.com/nrfconnect/suit-processor * cmock f65066f15d8248e6dcb778efb8739904a4512087 https://github.com/ThrowTheSwitch/cmock * memfault-firmware-sdk 47d69c572c44c19d23936193629e19372e22c7e2 https://github.com/memfault/memfault-firmware-sdk - * bsim 9ee22c707970f6621adba0375841c0a609e24628 https://github.com/BabbleSim/bsim_west + * bsim 1f242f4ed7fc141fdfcfeca8d21c6d9e801179d7 https://github.com/BabbleSim/bsim_west * coremark d5fad6bd094899101a4e5fd53af7298160ced6ab https://github.com/eembc/coremark * canopennode dec12fa3f0d790cafa8414a4c2930ea71ab72ffd https://github.com/zephyrproject-rtos/canopennode * chre 3b32c76efee705af146124fb4190f71be5a4e36e https://github.com/zephyrproject-rtos/chre @@ -47,7 +47,7 @@ * cmsis-nn ea987c1ca661be723de83bd159aed815d6cbd430 https://github.com/zephyrproject-rtos/cmsis-nn * edtt b9ca3c7030518f07b7937dacf970d37a47865a76 https://github.com/zephyrproject-rtos/edtt * fatfs 427159bf95ea49b7680facffaa29ad506b42709b https://github.com/zephyrproject-rtos/fatfs - * hal_nordic c1c448df1b751c1c03229a447a2216f29e6aaf99 https://github.com/zephyrproject-rtos/hal_nordic + * hal_nordic 54bde38c6f6ffb3780b26ae728cf79426184384e https://github.com/zephyrproject-rtos/hal_nordic * hal_st b2f548fe672f24122c7f92027b2c9eeea8a0483a https://github.com/zephyrproject-rtos/hal_st * hal_wurthelektronik e5bcb2eac1bb9639ce13b4dafc78eb254e014342 https://github.com/zephyrproject-rtos/hal_wurthelektronik * hostap 44285310338f423021cc7df2c1056256882a00cc https://github.com/zephyrproject-rtos/hostap @@ -58,9 +58,10 @@ * lvgl 2b498e6f36d6b82ae1da12c8b7742e318624ecf5 https://github.com/zephyrproject-rtos/lvgl * mipi-sys-t 71ace1f5caa03e56c8740a09863e685efb4b2360 https://github.com/zephyrproject-rtos/mipi-sys-t * net-tools 93acc8bac4661e74e695eb1aea94c7c5262db2e2 https://github.com/zephyrproject-rtos/net-tools - * nrf_hw_models eeed2591d38e5e9bf89658df67555f2777249fc0 https://github.com/zephyrproject-rtos/nrf_hw_models + * nrf_hw_models 3cfca0192ff84da919e9bc7978bcc2239cd6a395 https://github.com/zephyrproject-rtos/nrf_hw_models + * nrf_wifi 71261e2b719b98500b7741c3398a74a5fb631596 https://github.com/zephyrproject-rtos/nrf_wifi * open-amp b735edbc739ad59156eb55bb8ce2583d74537719 https://github.com/zephyrproject-rtos/open-amp - * picolibc 06bde1fd7531b1f788f6e42b6f7b358c0fe4f814 https://github.com/zephyrproject-rtos/picolibc + * picolibc 27746bbc246841852912fc3bb5b45094cd8a505a https://github.com/zephyrproject-rtos/picolibc * segger b011c45b585e097d95d9cf93edf4f2e01588d3cd https://github.com/zephyrproject-rtos/segger * tinycrypt 1012a3ebee18c15ede5efc8332ee2fc37817670f https://github.com/zephyrproject-rtos/tinycrypt * uoscore-uedhoc 84ef879a46d7bfd9a423fbfb502b04289861f9ea https://github.com/zephyrproject-rtos/uoscore-uedhoc @@ -69,16 +70,16 @@ /** ZBOSS build tag */ -#define ZBOSS_BUILD_TAG "ncs_release-3.11.5.0" +#define ZBOSS_BUILD_TAG "ncs_release-3.11.6.0" /** ZBOSS platform build tag */ -#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.5.0+v5.1.6" +#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.6.0+v5.1.7" /** ZBOSS build date (UTC) */ -#define ZBOSS_BUILD_DATE 20241104 +#define ZBOSS_BUILD_DATE 20241211 /** ZBOSS build time (UTC) */ -#define ZBOSS_BUILD_TIME 094223 +#define ZBOSS_BUILD_TIME 122248 #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 ea50219489..d0100ee2a1 100644 --- a/zboss/production/include/osif/zb_revision_r22.h +++ b/zboss/production/include/osif/zb_revision_r22.h @@ -36,4 +36,4 @@ * * Note: This value is automatically updated by the release script. */ -#define ZBOSS_PATCH 5U +#define ZBOSS_PATCH 7U diff --git a/zboss/production/include/zboss_api.h b/zboss/production/include/zboss_api.h index 92d21c5936..bf912bd027 100644 --- a/zboss/production/include/zboss_api.h +++ b/zboss/production/include/zboss_api.h @@ -527,12 +527,12 @@ zb_ret_t zb_set_tx_power(zb_uint8_t tx_power); */ typedef struct zb_tx_power_params_s { - zb_ret_t status; /*!< Status of the operation. Can be RET_OK, RET_UNINITIALIZED or one of + zb_ret_t status; /*!< Status of the operation. Can be RET_OK, RET_UNINITIALIZED or one of RET_INVALID_PARAMETET_1, RET_INVALID_PARAMETET_2 or RET_INVALID_PARAMETET_3 for the following three fields respectively. */ zb_uint8_t page; /*!< Page number. Should be provided by the application. */ zb_uint8_t channel; /*!< Channel number on a given page. Should be provided by the application. */ - zb_int8_t tx_power; /*!< Transceiver power for a given page and channel. + zb_int8_t tx_power; /*!< Transceiver power for a given page and channel. Should be provided by the application in case of setting the power */ zb_callback_t cb; /*!< Callback function to be called after the function finishes. Should be provided by the application. */ } zb_tx_power_params_t; @@ -540,21 +540,21 @@ typedef struct zb_tx_power_params_s /** * @brief Get transceiver power for given page and channel asynchronously. - * - * This function requires param to contain @ref zb_tx_power_params_t. + * + * This function requires param to contain @ref zb_tx_power_params_t. * Will return status RET_UNINITIALIZED if the channel/page storage hasn't been initialized yet. - * + * * @param param - buffer, containing @ref zb_tx_power_params_t. */ void zb_get_tx_power_async(zb_bufid_t param); /** * @brief Set transceiver power to a given value on a given page and channel asynchronously. - * - * This function requires param to contain @ref zb_tx_power_params_t. - * If the power change is for the current channel, the function will attempt to change power immediately, + * + * This function requires param to contain @ref zb_tx_power_params_t. + * If the power change is for the current channel, the function will attempt to change power immediately, * otherwise it will save the change until channel switch. - * + * * @param param - buffer, containing @ref zb_tx_power_params_t. */ void zb_set_tx_power_async(zb_bufid_t param); diff --git a/zboss/production/include/zboss_api_zdo.h b/zboss/production/include/zboss_api_zdo.h index 25fdc40942..2ec38eb3ad 100644 --- a/zboss/production/include/zboss_api_zdo.h +++ b/zboss/production/include/zboss_api_zdo.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. @@ -222,6 +222,7 @@ typedef zb_uint8_t zb_zdp_status_t; * * Status codes: * - RET_OK: Device started after the NVRAM erase + * - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action() * - RET_ERROR: An error of any type. * * Signal parameters: @@ -241,6 +242,7 @@ typedef zb_uint8_t zb_zdp_status_t; * * Status codes: * - RET_OK: Device started using configuration stored in NVRAM + * - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action() * - RET_ERROR: An error of any type. * * Signal parameters: @@ -303,6 +305,7 @@ typedef zb_uint8_t zb_zdp_status_t; * 2. No touchlink commissioning cluster scan response inter-PAN commands were received with the * inter-PAN transaction identifier field equal to that used by the initiator in its scan request * command. + * - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action() * * Signal parameters: * - none @@ -321,6 +324,7 @@ typedef zb_uint8_t zb_zdp_status_t; * Status codes: * - RET_OK: Network steering completed. * - RET_INTERRUPTED: was cancelled with bdb_cancel_joining() + * or with zb_bdb_reset_via_local_action() * * Has additional data of type zb_zdo_signal_leave_indication_params_t. * @@ -338,6 +342,7 @@ typedef zb_uint8_t zb_zdp_status_t; * Status codes: * - RET_OK: Network formation completed. * - RET_INTERRUPTED: was cancelled with bdb_cancel_formation() + * or with zb_bdb_reset_via_local_action() * * Signal parameters: * - none @@ -381,6 +386,10 @@ typedef zb_uint8_t zb_zdp_status_t; * @parblock * When generated: * - Touchlink procedure started on the Target device. + * + * Status codes: + * - RET_OK: Procedure started on the Target device + * - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action() * * Signal parameters: * - none @@ -394,7 +403,7 @@ typedef zb_uint8_t zb_zdp_status_t; * * Status codes: * - RET_OK: Touchlink network started successfully. - * - Does not return error status. + * - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action() * * Signal parameters: * - none @@ -2485,7 +2494,7 @@ typedef ZB_PACKED_PRE struct zb_zdo_mgmt_leave_req_s { zb_ieee_addr_t device_address; /*!< 64-bit IEEE address */ zb_bitfield_t reserved:6; /*!< Reserve */ - zb_bitfield_t remove_children:1; /*!< Remove children */ + zb_bitfield_t remove_children:1; /*!< Obsolete field, should be always 0 according to CSA */ zb_bitfield_t rejoin:1; /*!< Rejoin */ } ZB_PACKED_STRUCT diff --git a/zboss/production/include/zcl/zb_zcl_diagnostics.h b/zboss/production/include/zcl/zb_zcl_diagnostics.h index b5d6c95c9b..b30f3ad206 100644 --- a/zboss/production/include/zcl/zb_zcl_diagnostics.h +++ b/zboss/production/include/zcl/zb_zcl_diagnostics.h @@ -354,7 +354,7 @@ enum zb_zcl_diagnostics_attr_e #define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID(data_ptr) \ { \ - ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_BCAST_ID, \ + ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID, \ ZB_ZCL_ATTR_TYPE_U32, \ ZB_ZCL_ATTR_ACCESS_READ_ONLY, \ (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ @@ -372,7 +372,7 @@ enum zb_zcl_diagnostics_attr_e #define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID(data_ptr) \ { \ - ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID, \ + ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID, \ ZB_ZCL_ATTR_TYPE_U16, \ ZB_ZCL_ATTR_ACCESS_READ_ONLY, \ (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ @@ -381,7 +381,7 @@ enum zb_zcl_diagnostics_attr_e #define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID(data_ptr) \ { \ - ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID, \ + ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID, \ ZB_ZCL_ATTR_TYPE_U16, \ ZB_ZCL_ATTR_ACCESS_READ_ONLY, \ (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ diff --git a/zboss/production/lib/cortex-m33/hard-float/libgppb.a b/zboss/production/lib/cortex-m33/hard-float/libgppb.a index 67138fb807..59ddfadb76 100644 Binary files a/zboss/production/lib/cortex-m33/hard-float/libgppb.a and b/zboss/production/lib/cortex-m33/hard-float/libgppb.a differ 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 fd8835c902..c4fd6bb9db 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 dcf053b7d6..2e0623ddd7 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 e7f3336728..d0174eccd7 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 163ca4a712..9982bad808 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/libgppb.a b/zboss/production/lib/cortex-m4/hard-float/libgppb.a index 97299632de..5fc3a723b3 100644 Binary files a/zboss/production/lib/cortex-m4/hard-float/libgppb.a and b/zboss/production/lib/cortex-m4/hard-float/libgppb.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 078471363d..414d64b24f 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 1950552519..c68a3c8a27 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 39ac9fb8e3..9430540948 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 bd62c33884..d1c8fb50ff 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/commissioning/bdb/zdo_commissioning_bdb.c b/zboss/production/src/commissioning/bdb/zdo_commissioning_bdb.c index 257825928f..10f5a2aa8e 100644 --- a/zboss/production/src/commissioning/bdb/zdo_commissioning_bdb.c +++ b/zboss/production/src/commissioning/bdb/zdo_commissioning_bdb.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. @@ -88,11 +88,18 @@ static void nwk_cancel_network_discovery_response(zb_bufid_t buf); zb_bool_t bdb_not_ever_joined() { zb_ext_pan_id_t curr_ext_pan_id = {0}; + zb_bool_t ret; zb_get_extended_pan_id(curr_ext_pan_id); - return (zb_bool_t)(ZB_EXTPANID_IS_ZERO(curr_ext_pan_id) - && !zb_zdo_authenticated() - && !zb_zdo_tclk_valid()); + ret = ZB_EXTPANID_IS_ZERO(curr_ext_pan_id) + && !zb_zdo_authenticated(); + + if (!ZB_IS_DEVICE_ZC()) + { + ret = ret && !zb_zdo_tclk_valid(); + } + + return ret; } @@ -251,7 +258,7 @@ zb_bool_t bdb_joined(void) joined = (zb_bool_t)(!ZB_EXTPANID_IS_ZERO(ext_pan_id) && zb_zdo_authenticated()); - if (zb_aib_get_coordinator_version() >= 21) + if (!ZB_IS_DEVICE_ZC() && zb_aib_get_coordinator_version() >= 21) { joined = (zb_bool_t)(joined && zb_zdo_tclk_valid()); } @@ -342,13 +349,25 @@ void bdb_preinit(void) bdb_init_channel_sets(); - TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd, tclk_valid %hd", + if (ZB_IS_DEVICE_ZC()) + { + TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd", + (FMT__H_H_H_H_H, + zb_get_device_type(), + joined, + !ZB_EXTPANID_IS_ZERO(ext_pan_id), + zb_zdo_authenticated())); + } + else + { + TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd, tclk_valid %hd", (FMT__H_H_H_H_H, zb_get_device_type(), joined, !ZB_EXTPANID_IS_ZERO(ext_pan_id), zb_zdo_authenticated(), zb_zdo_tclk_valid())); + } } @@ -407,7 +426,7 @@ void bdb_initialization_procedure(zb_uint8_t param) } else if (!ZB_EXTPANID_IS_ZERO(ext_pan_id) && ((zb_aib_get_coordinator_version() < 21) || - ((zb_aib_get_coordinator_version() >= 21) && zb_zdo_tclk_valid()))) + ((zb_aib_get_coordinator_version() >= 21) && !ZB_IS_DEVICE_ZC() && zb_zdo_tclk_valid()))) { /* Perform TC rejoin */ TRACE_MSG(TRACE_ERROR, "Perform TC rejoin", (FMT__0)); @@ -903,6 +922,12 @@ static void bdb_touchlink_machine(zb_uint8_t param) } break; #endif /* ZB_BDB_TOUCHLINK */ + case BDB_COMM_SIGNAL_LEAVE_DONE: + TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, finishing", (FMT__0)); + ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED; + bdb_commissioning_signal(BDB_COMM_SIGNAL_TOUCHLINK_FINISH, param); + break; + case BDB_COMM_SIGNAL_TOUCHLINK_FINISH: if (ZB_BDB().bdb_commissioning_status != ZB_BDB_STATUS_IN_PROGRESS) { @@ -1320,10 +1345,19 @@ static void bdb_network_steering_machine(zb_uint8_t param) break; case BDB_COMM_SIGNAL_LEAVE_DONE: + TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, status %hd", (FMT__H, ZB_BDB().bdb_commissioning_status)); if (ZB_BDB().bdb_commissioning_status != ZB_BDB_STATUS_NO_NETWORK) { /* Probably bdb device failed to update tclk exchange */ bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_STEERING_FINISH, param); + + /* We can be here with status ZB_BDB_STATUS_IN_PROGRESS after calling the function + * zb_bdb_reset_via_local_action on the application. In this case, we should change + * the comm status for the correct return code when commissioning is complete. */ + if (ZB_BDB().bdb_commissioning_status == ZB_BDB_STATUS_IN_PROGRESS) + { + ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED; + } } else { @@ -1433,6 +1467,12 @@ static void bdb_network_formation_machine(zb_uint8_t param) TRACE_MSG(TRACE_ZDO1, "Network is successfully formed", (FMT__0)); bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH, param); break; + + case BDB_COMM_SIGNAL_LEAVE_DONE: + TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, finishing", (FMT__0)); + ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED; + bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH, param); + break; case BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH: default: @@ -2418,7 +2458,7 @@ void zb_bdb_initiate_tc_rejoin(zb_uint8_t param) TRACE_MSG(TRACE_ZDO1, ">> zb_bdb_initiate_tc_rejoin, param %hd", (FMT__H, param)); - if ((!zb_zdo_tclk_valid() || (zb_aib_get_coordinator_version() < 21)) + if (((!ZB_IS_DEVICE_ZC() && !zb_zdo_tclk_valid()) || (zb_aib_get_coordinator_version() < 21)) && !zb_aib_tcpol_get_allow_unsecure_tc_rejoins()) { TRACE_MSG(TRACE_ERROR, "TC rejoin is not allowed", (FMT__0)); diff --git a/zboss/production/src/commissioning/legacy/zdo_commissioning_classic.c b/zboss/production/src/commissioning/legacy/zdo_commissioning_classic.c index f125d29c1e..1be7a22034 100644 --- a/zboss/production/src/commissioning/legacy/zdo_commissioning_classic.c +++ b/zboss/production/src/commissioning/legacy/zdo_commissioning_classic.c @@ -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. @@ -570,7 +570,11 @@ static zb_uint8_t zdo_classic_get_permit_join_duration(void) { zb_uint8_t duration; - if (ZB_NIB().max_children != 0U) + if ((ZB_NIB().max_children != 0U) +#ifdef ZB_CERTIFICATION_HACKS + && (ZB_CERT_HACKS().max_joins != 0U) +#endif /* ZB_CERTIFICATION_HACKS */ + ) { duration = ZDO_CTX().conf_attr.permit_join_duration; } diff --git a/zboss/production/src/include/zb_g_context.h b/zboss/production/src/include/zb_g_context.h index 1460148126..df873f14ad 100644 --- a/zboss/production/src/include/zb_g_context.h +++ b/zboss/production/src/include/zb_g_context.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. @@ -552,10 +552,15 @@ typedef struct zb_cert_hacks_s zb_bitfield_t tc_rejoin_aps_decrypt_error:1; /* Simulate TC rejoin without known aps key */ zb_ieee_addr_t nwk_leave_from_unknown_ieee_addr; /*!< IEEE source address used in nwk_leave if `nwk_leave_from_unknown_addr` is set */ zb_uint16_t nwk_leave_from_unknown_short_addr; /*!< Short source address used in nwk_leave if `nwk_leave_from_unknown_addr` is set */ + zb_uint8_t joins_ctr; /*!< count of joins to our device */ + zb_uint8_t max_joins; /*!< max number of successful joins */ } zb_cert_hacks_t; #define ZB_CERT_HACKS() ZG->cert_hacks -#endif + +/* Value that means that ZB_CERT_HACKS().max_joins is uninitialized */ +#define ZB_MAX_JOINS_UNINITIALIZED ZB_UINT8_MAX +#endif /* ZB_CERTIFICATION_HACKS */ #ifdef ZB_STACK_REGRESSION_TESTING_API diff --git a/zboss/production/src/include/zb_nwk.h b/zboss/production/src/include/zb_nwk.h index bec2ddd78b..9989621399 100644 --- a/zboss/production/src/include/zb_nwk.h +++ b/zboss/production/src/include/zb_nwk.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. @@ -2174,7 +2174,6 @@ zb_ret_t zb_nwk_get_neighbor_element(zb_uint16_t addr, zb_bool_t create_if_absen zb_ret_t zb_nwk_set_neighbor_element(zb_uint16_t addr, zb_nwk_neighbor_element_t *update); zb_ret_t zb_nwk_delete_neighbor_by_short(zb_uint16_t addr); -zb_ret_t zb_nwk_delete_neighbor_by_ieee(zb_ieee_addr_t addr); void zb_nwk_send_direct_leave_req(zb_uint8_t param, zb_uint16_t dst_addr); @@ -2238,4 +2237,14 @@ void zb_enable_control4_emulator(); zb_ext_neighbor_tbl_ent_t *nwk_choose_parent(zb_address_pan_id_ref_t panid_ref, zb_mac_capability_info_t capability_information); #endif /* ZB_MACSPLIT_DEVICE */ +void nwk_inc_child_num(zb_bool_t is_router); + +void nwk_clear_child_num(void); + +void nwk_dec_child_num(zb_bool_t is_router); + +zb_bool_t nwk_have_space_for_children(void); + +zb_bool_t nwk_have_ed_children(void); + #endif /* ZB_NWK_H */ diff --git a/zboss/production/src/include/zb_nwk_nib.h b/zboss/production/src/include/zb_nwk_nib.h index ca8075b66d..4001f369b5 100644 --- a/zboss/production/src/include/zb_nwk_nib.h +++ b/zboss/production/src/include/zb_nwk_nib.h @@ -712,9 +712,11 @@ typedef struct zb_nib_s #ifdef ZB_ROUTER_ROLE zb_uint8_t max_children; /*!< The number of children a device is allowed to have */ +#ifdef ZB_COUNT_CHILDREN zb_uint8_t router_child_num; /*!< Number of child devices with router capability */ zb_uint8_t ed_child_num; /*!< Number of child ed devices */ #endif +#endif #if defined ZB_NWK_DISTRIBUTED_ADDRESS_ASSIGN && defined ZB_ROUTER_ROLE zb_uint8_t max_routers; /*!< The number of routers any one device is allowed to have as children. */ diff --git a/zboss/production/src/include/zb_zdo.h b/zboss/production/src/include/zb_zdo.h index c767e937e8..a380e46b6f 100644 --- a/zboss/production/src/include/zb_zdo.h +++ b/zboss/production/src/include/zb_zdo.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. @@ -645,7 +645,16 @@ void zb_zdo_do_set_channel(zb_uint8_t channel); void zb_zdo_mgmt_permit_joining_confirm_handle(zb_uint8_t param); -#endif +#ifdef ZB_CERTIFICATION_HACKS +/* ZB_UINT8_MAX used as a special value + (this value forces stack to not consider this value at all) +*/ +void zb_set_max_joins(zb_uint8_t max_joins); + +zb_uint8_t zb_get_max_joins(void); + +#endif /* ZB_CERTIFICATION_HACKS */ +#endif /* ZB_ROUTER_ROLE */ #ifndef ZB_LITE_NO_ZDO_RESPONSE_VALIDATION zb_bool_t zb_zdo_validate_reponse(zb_bufid_t buf, zb_uint16_t cluster_id); diff --git a/zboss/production/src/zcl/zcl_thermostat_commands.c b/zboss/production/src/zcl/zcl_thermostat_commands.c index 070e3570dd..a6dd1866c2 100644 --- a/zboss/production/src/zcl/zcl_thermostat_commands.c +++ b/zboss/production/src/zcl/zcl_thermostat_commands.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. @@ -249,9 +249,9 @@ zb_ret_t check_value_thermostat_server(zb_uint16_t attr_id, zb_uint8_t endpoint, /* First check MinHeatSetpointLimit/MaxHeatSetpointLimit, than * AbsMinHeatSetpointLimit/AbsMaxHeatSetpointLimit, than predefined constants. */ zb_zcl_attr_t *attr_desc_min = zb_zcl_get_attr_desc_a(endpoint, - ZB_ZCL_CLUSTER_ID_THERMOSTAT, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_THERMOSTAT_ABS_MIN_HEAT_SETPOINT_LIMIT_ID); + ZB_ZCL_CLUSTER_ID_THERMOSTAT, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_THERMOSTAT_MIN_HEAT_SETPOINT_LIMIT_ID); zb_zcl_attr_t *attr_desc_max = zb_zcl_get_attr_desc_a(endpoint, - ZB_ZCL_CLUSTER_ID_THERMOSTAT, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_THERMOSTAT_ABS_MAX_HEAT_SETPOINT_LIMIT_ID); + ZB_ZCL_CLUSTER_ID_THERMOSTAT, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_THERMOSTAT_MAX_HEAT_SETPOINT_LIMIT_ID); if (attr_desc_min && attr_desc_max) { min_val = (zb_int16_t)ZB_ZCL_GET_ATTRIBUTE_VAL_S16(attr_desc_min); diff --git a/zboss/production/trace/lib/cortex-m33/hard-float/libgppb.a b/zboss/production/trace/lib/cortex-m33/hard-float/libgppb.a index d7c92b7f23..e7613b66ba 100644 Binary files a/zboss/production/trace/lib/cortex-m33/hard-float/libgppb.a and b/zboss/production/trace/lib/cortex-m33/hard-float/libgppb.a differ 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 ef67c60db6..9e5ef7ce42 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 4d3f92313d..bc6aa615be 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 83e8471090..ef2346003a 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 513a5d0298..e8f5635f0e 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/libgppb.a b/zboss/production/trace/lib/cortex-m4/hard-float/libgppb.a index 7c8020838c..c2ed510adc 100644 Binary files a/zboss/production/trace/lib/cortex-m4/hard-float/libgppb.a and b/zboss/production/trace/lib/cortex-m4/hard-float/libgppb.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 406f7243e9..35c4ceba7b 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 b9de408f44..100de189b6 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 3826434261..9e0250397d 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 33957d54f3..ea9a98af58 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