Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zboss: version v3.11.6.0+5.1.7 #1616

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions zboss/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
**********************

Expand Down
43 changes: 22 additions & 21 deletions zboss/production/include/osif/build_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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__ */
2 changes: 1 addition & 1 deletion zboss/production/include/osif/zb_revision_r22.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
*
* Note: This value is automatically updated by the release script.
*/
#define ZBOSS_PATCH 5U
#define ZBOSS_PATCH 7U
18 changes: 9 additions & 9 deletions zboss/production/include/zboss_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,34 +527,34 @@ 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;


/**
* @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);
Expand Down
15 changes: 12 additions & 3 deletions zboss/production/include/zboss_api_zdo.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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.
*
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions zboss/production/include/zcl/zb_zcl_diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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), \
Expand All @@ -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), \
Expand All @@ -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), \
Expand Down
Binary file modified zboss/production/lib/cortex-m33/hard-float/libgppb.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m33/hard-float/libncp-dev.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m33/hard-float/libncp-dev.ed.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m33/hard-float/libzboss.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m33/hard-float/libzboss.ed.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m4/hard-float/libgppb.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m4/hard-float/libncp-dev.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m4/hard-float/libncp-dev.ed.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m4/hard-float/libzboss.a
Binary file not shown.
Binary file modified zboss/production/lib/cortex-m4/hard-float/libzboss.ed.a
Binary file not shown.
56 changes: 48 additions & 8 deletions zboss/production/src/commissioning/bdb/zdo_commissioning_bdb.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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()));
}
}


Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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));
Expand Down
Loading
Loading