Skip to content

Commit 4929937

Browse files
edmontjukkar
authored andcommittedDec 13, 2024
zboss: version v3.11.6.0+5.1.7
- ZBOSS sources: `527882038813c10bc16c58b3822728f01839f8e4` - Several fixes included. Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
1 parent 7f23024 commit 4929937

33 files changed

+153
-56
lines changed
 

‎zboss/CHANGELOG.rst

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ Changelog
99

1010
All notable changes to this project in the |NCS| are documented in this file.
1111

12+
nRF Connect SDK v2.9.0
13+
**********************
14+
15+
Updated
16+
=======
17+
18+
* The ZBOSS stack to version ``3.11.6.0+5.1.7``.
19+
For detailed information, see `ZBOSS stack release notes`_ for the |NCS| v2.9.0 release.
20+
21+
Bug fixes
22+
=========
23+
24+
* Fixed generating Extended Response for certain address requests on ZED.
25+
* Fixed an issue where ZR device sometimes would join to network with Extended PAN ID equal to 0x0000000000000000 after factory reset.
26+
* Fixed a known issue where ZR would not accept new child devices if the maximum number of children was reached.
27+
* Fixed some incorrect diagnostics cluster attributes macro names.
28+
* Fixed an issue where a device would stop sending/receiving frames after being jammed.
29+
1230
nRF Connect SDK v2.8.0
1331
**********************
1432

‎zboss/production/include/osif/build_info.h

+22-21
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,30 @@
1111
* Please use release scripts to update it's contents.
1212
*
1313
* Repositories:
14-
* platform_ncs f1ce38e33a03c03fb922eea2827c9bf978d16fb1 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/platform_ncs.git
15-
* zboss-stack-src 617305eb6e51ea20153fc520392177f56373cecf https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable
16-
* zboss-stack-doc d185acb78465fce1252453a93635fc4e2aac2a68 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc
17-
* nrf 21f851fa7d3c91f0e45c67f741bbf9e8efea9fc9 https://github.com/nrfconnect/sdk-nrf
18-
* zephyr bc59fe3cf65c054b13305aa977ecddddf7cf42e4 https://github.com/nrfconnect/sdk-zephyr
14+
* platform_ncs db349cfbf4d32d03bc8ca2b1934c055cedd38746 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/platform_ncs.git
15+
* zboss-stack-src 527882038813c10bc16c58b3822728f01839f8e4 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_stable
16+
* zboss-stack-doc a9e550875d1a486bb829f4be6ab45042cb758e02 https://projecttools.nordicsemi.no/bitbucket/scm/zoi/zboss_doc
17+
* nrf 2dee59af02a114e7fc7856bee2e35fc9f37d7ddd https://github.com/nrfconnect/sdk-nrf
18+
* zephyr 0a2e205750dc7eff8767afa543b2fd23a1fbb332 https://github.com/nrfconnect/sdk-zephyr
1919
* wfa-qt-control-app af011c8a8d338ba529f17aed2cc2ef4c1c591a58 https://github.com/nrfconnect/sdk-wi-fiquicktrack-controlappc
20-
* mcuboot c9e44365fd6c7bb1c95000a2d38a6bf263298126 https://github.com/nrfconnect/sdk-mcuboot
20+
* mcuboot 12e5ee106034972b0f1074d6f2261b2b39d1501b https://github.com/nrfconnect/sdk-mcuboot
2121
* qcbor 751d36583a9ce1a640900c57e13c9b6b8f3a2ba2 https://github.com/laurencelundblade/QCBOR
2222
* mbedtls 98603a8c91660beac00e0ee1d76198fb7c4ed29b https://github.com/nrfconnect/sdk-mbedtls
23-
* oberon-psa-crypto b41e899e7302462eb952b0b6a7c6903e368fb395 https://github.com/nrfconnect/sdk-oberon-psa-crypto
24-
* nrfxlib 999c8a81426ed8d88915e008bfc13b8d33af1361 https://github.com/nrfconnect/sdk-nrfxlib
25-
* trusted-firmware-m 8c7fae3936da02b7db4f5c8aba174b252a2b326e https://github.com/nrfconnect/sdk-trusted-firmware-m
23+
* oberon-psa-crypto 21728cf8402ac567326d0d69eec891a2bfdb8ea3 https://github.com/nrfconnect/sdk-oberon-psa-crypto
24+
* nrfxlib 1ab292d04974dc97523c00dfa82eb461fd27bdb1 https://github.com/nrfconnect/sdk-nrfxlib
25+
* trusted-firmware-m f2bf78452629355e4180dc36756f6c1becc819fa https://github.com/nrfconnect/sdk-trusted-firmware-m
2626
* psa-arch-tests 3da9313e64806d352c519e3205e81cf959067588 https://github.com/nrfconnect/sdk-psa-arch-tests
27-
* matter f67310e6166ce4738985168fb3d74c5314539688 https://github.com/nrfconnect/sdk-connectedhomeip
28-
* soc-hwmv1 32b1ee3e4576815bebf9ce3e8d63efe73bd89c62 https://github.com/nrfconnect/sdk-soc-hwmv1
27+
* matter 9a6edcf725a9766e513fe789745da92e0f640cb1 https://github.com/nrfconnect/sdk-connectedhomeip
28+
* soc-hwmv1 bd39fcf7832b4eb682a9c5ef5ad0e3b2e34cd502 https://github.com/nrfconnect/sdk-soc-hwmv1
2929
* cjson c6af068b7f05207b28d68880740e4b9ec1e4b50a https://github.com/nrfconnect/sdk-cjson
3030
* azure-sdk-for-c 308c171cb4b5eed266649012a68406487ec81fb2 https://github.com/nrfconnect/azure-sdk-for-c
3131
* cirrus 3873a08377d93a479105a75ac390d3bbcd31d690 https://github.com/nrfconnect/sdk-mcu-drivers
3232
* openthread ee86dc26d71c9ef021fad8a28898829df772011a https://github.com/nrfconnect/sdk-openthread
33-
* suit-generator a9b80a109a5da13101b69120f678add48d68cc57 https://github.com/nrfconnect/suit-generator
34-
* suit-processor 7d94614168540359651391e64aa4de6515e43fca https://github.com/nrfconnect/suit-processor
33+
* suit-generator 8f9ce9039e6fb8584dc915944b2bc275856757c0 https://github.com/nrfconnect/suit-generator
34+
* suit-processor 6802f3008cba16a74a8c65814af00808327a7ee7 https://github.com/nrfconnect/suit-processor
3535
* cmock f65066f15d8248e6dcb778efb8739904a4512087 https://github.com/ThrowTheSwitch/cmock
3636
* memfault-firmware-sdk 47d69c572c44c19d23936193629e19372e22c7e2 https://github.com/memfault/memfault-firmware-sdk
37-
* bsim 9ee22c707970f6621adba0375841c0a609e24628 https://github.com/BabbleSim/bsim_west
37+
* bsim 1f242f4ed7fc141fdfcfeca8d21c6d9e801179d7 https://github.com/BabbleSim/bsim_west
3838
* coremark d5fad6bd094899101a4e5fd53af7298160ced6ab https://github.com/eembc/coremark
3939
* canopennode dec12fa3f0d790cafa8414a4c2930ea71ab72ffd https://github.com/zephyrproject-rtos/canopennode
4040
* chre 3b32c76efee705af146124fb4190f71be5a4e36e https://github.com/zephyrproject-rtos/chre
@@ -47,7 +47,7 @@
4747
* cmsis-nn ea987c1ca661be723de83bd159aed815d6cbd430 https://github.com/zephyrproject-rtos/cmsis-nn
4848
* edtt b9ca3c7030518f07b7937dacf970d37a47865a76 https://github.com/zephyrproject-rtos/edtt
4949
* fatfs 427159bf95ea49b7680facffaa29ad506b42709b https://github.com/zephyrproject-rtos/fatfs
50-
* hal_nordic c1c448df1b751c1c03229a447a2216f29e6aaf99 https://github.com/zephyrproject-rtos/hal_nordic
50+
* hal_nordic 54bde38c6f6ffb3780b26ae728cf79426184384e https://github.com/zephyrproject-rtos/hal_nordic
5151
* hal_st b2f548fe672f24122c7f92027b2c9eeea8a0483a https://github.com/zephyrproject-rtos/hal_st
5252
* hal_wurthelektronik e5bcb2eac1bb9639ce13b4dafc78eb254e014342 https://github.com/zephyrproject-rtos/hal_wurthelektronik
5353
* hostap 44285310338f423021cc7df2c1056256882a00cc https://github.com/zephyrproject-rtos/hostap
@@ -58,9 +58,10 @@
5858
* lvgl 2b498e6f36d6b82ae1da12c8b7742e318624ecf5 https://github.com/zephyrproject-rtos/lvgl
5959
* mipi-sys-t 71ace1f5caa03e56c8740a09863e685efb4b2360 https://github.com/zephyrproject-rtos/mipi-sys-t
6060
* net-tools 93acc8bac4661e74e695eb1aea94c7c5262db2e2 https://github.com/zephyrproject-rtos/net-tools
61-
* nrf_hw_models eeed2591d38e5e9bf89658df67555f2777249fc0 https://github.com/zephyrproject-rtos/nrf_hw_models
61+
* nrf_hw_models 3cfca0192ff84da919e9bc7978bcc2239cd6a395 https://github.com/zephyrproject-rtos/nrf_hw_models
62+
* nrf_wifi 71261e2b719b98500b7741c3398a74a5fb631596 https://github.com/zephyrproject-rtos/nrf_wifi
6263
* open-amp b735edbc739ad59156eb55bb8ce2583d74537719 https://github.com/zephyrproject-rtos/open-amp
63-
* picolibc 06bde1fd7531b1f788f6e42b6f7b358c0fe4f814 https://github.com/zephyrproject-rtos/picolibc
64+
* picolibc 27746bbc246841852912fc3bb5b45094cd8a505a https://github.com/zephyrproject-rtos/picolibc
6465
* segger b011c45b585e097d95d9cf93edf4f2e01588d3cd https://github.com/zephyrproject-rtos/segger
6566
* tinycrypt 1012a3ebee18c15ede5efc8332ee2fc37817670f https://github.com/zephyrproject-rtos/tinycrypt
6667
* uoscore-uedhoc 84ef879a46d7bfd9a423fbfb502b04289861f9ea https://github.com/zephyrproject-rtos/uoscore-uedhoc
@@ -69,16 +70,16 @@
6970

7071

7172
/** ZBOSS build tag */
72-
#define ZBOSS_BUILD_TAG "ncs_release-3.11.5.0"
73+
#define ZBOSS_BUILD_TAG "ncs_release-3.11.6.0"
7374

7475
/** ZBOSS platform build tag */
75-
#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.5.0+v5.1.6"
76+
#define ZBOSS_PLATFORM_BUILD_TAG "v3.11.6.0+v5.1.7"
7677

7778
/** ZBOSS build date (UTC) */
78-
#define ZBOSS_BUILD_DATE 20241104
79+
#define ZBOSS_BUILD_DATE 20241211
7980

8081
/** ZBOSS build time (UTC) */
81-
#define ZBOSS_BUILD_TIME 094223
82+
#define ZBOSS_BUILD_TIME 122248
8283

8384

8485
#endif /* ZBOSS_BUILD_INFO_H__ */

‎zboss/production/include/osif/zb_revision_r22.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
*
3737
* Note: This value is automatically updated by the release script.
3838
*/
39-
#define ZBOSS_PATCH 5U
39+
#define ZBOSS_PATCH 7U

‎zboss/production/include/zboss_api.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -527,34 +527,34 @@ zb_ret_t zb_set_tx_power(zb_uint8_t tx_power);
527527
*/
528528
typedef struct zb_tx_power_params_s
529529
{
530-
zb_ret_t status; /*!< Status of the operation. Can be RET_OK, RET_UNINITIALIZED or one of
530+
zb_ret_t status; /*!< Status of the operation. Can be RET_OK, RET_UNINITIALIZED or one of
531531
RET_INVALID_PARAMETET_1, RET_INVALID_PARAMETET_2 or RET_INVALID_PARAMETET_3
532532
for the following three fields respectively. */
533533
zb_uint8_t page; /*!< Page number. Should be provided by the application. */
534534
zb_uint8_t channel; /*!< Channel number on a given page. Should be provided by the application. */
535-
zb_int8_t tx_power; /*!< Transceiver power for a given page and channel.
535+
zb_int8_t tx_power; /*!< Transceiver power for a given page and channel.
536536
Should be provided by the application in case of setting the power */
537537
zb_callback_t cb; /*!< Callback function to be called after the function finishes. Should be provided by the application. */
538538
} zb_tx_power_params_t;
539539

540540

541541
/**
542542
* @brief Get transceiver power for given page and channel asynchronously.
543-
*
544-
* This function requires param to contain @ref zb_tx_power_params_t.
543+
*
544+
* This function requires param to contain @ref zb_tx_power_params_t.
545545
* Will return status RET_UNINITIALIZED if the channel/page storage hasn't been initialized yet.
546-
*
546+
*
547547
* @param param - buffer, containing @ref zb_tx_power_params_t.
548548
*/
549549
void zb_get_tx_power_async(zb_bufid_t param);
550550

551551
/**
552552
* @brief Set transceiver power to a given value on a given page and channel asynchronously.
553-
*
554-
* This function requires param to contain @ref zb_tx_power_params_t.
555-
* If the power change is for the current channel, the function will attempt to change power immediately,
553+
*
554+
* This function requires param to contain @ref zb_tx_power_params_t.
555+
* If the power change is for the current channel, the function will attempt to change power immediately,
556556
* otherwise it will save the change until channel switch.
557-
*
557+
*
558558
* @param param - buffer, containing @ref zb_tx_power_params_t.
559559
*/
560560
void zb_set_tx_power_async(zb_bufid_t param);

‎zboss/production/include/zboss_api_zdo.h

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ZBOSS Zigbee 3.0
33
*
4-
* Copyright (c) 2012-2021 DSR Corporation, Denver CO, USA.
4+
* Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA.
55
* www.dsr-zboss.com
66
* www.dsr-corporation.com
77
* All rights reserved.
@@ -222,6 +222,7 @@ typedef zb_uint8_t zb_zdp_status_t;
222222
*
223223
* Status codes:
224224
* - RET_OK: Device started after the NVRAM erase
225+
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
225226
* - RET_ERROR: An error of any type.
226227
*
227228
* Signal parameters:
@@ -241,6 +242,7 @@ typedef zb_uint8_t zb_zdp_status_t;
241242
*
242243
* Status codes:
243244
* - RET_OK: Device started using configuration stored in NVRAM
245+
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
244246
* - RET_ERROR: An error of any type.
245247
*
246248
* Signal parameters:
@@ -303,6 +305,7 @@ typedef zb_uint8_t zb_zdp_status_t;
303305
* 2. No touchlink commissioning cluster scan response inter-PAN commands were received with the
304306
* inter-PAN transaction identifier field equal to that used by the initiator in its scan request
305307
* command.
308+
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
306309
*
307310
* Signal parameters:
308311
* - none
@@ -321,6 +324,7 @@ typedef zb_uint8_t zb_zdp_status_t;
321324
* Status codes:
322325
* - RET_OK: Network steering completed.
323326
* - RET_INTERRUPTED: was cancelled with bdb_cancel_joining()
327+
* or with zb_bdb_reset_via_local_action()
324328
*
325329
* Has additional data of type zb_zdo_signal_leave_indication_params_t.
326330
*
@@ -338,6 +342,7 @@ typedef zb_uint8_t zb_zdp_status_t;
338342
* Status codes:
339343
* - RET_OK: Network formation completed.
340344
* - RET_INTERRUPTED: was cancelled with bdb_cancel_formation()
345+
* or with zb_bdb_reset_via_local_action()
341346
*
342347
* Signal parameters:
343348
* - none
@@ -381,6 +386,10 @@ typedef zb_uint8_t zb_zdp_status_t;
381386
* @parblock
382387
* When generated:
383388
* - Touchlink procedure started on the Target device.
389+
*
390+
* Status codes:
391+
* - RET_OK: Procedure started on the Target device
392+
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
384393
*
385394
* Signal parameters:
386395
* - none
@@ -394,7 +403,7 @@ typedef zb_uint8_t zb_zdp_status_t;
394403
*
395404
* Status codes:
396405
* - RET_OK: Touchlink network started successfully.
397-
* - Does not return error status.
406+
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
398407
*
399408
* Signal parameters:
400409
* - none
@@ -2485,7 +2494,7 @@ typedef ZB_PACKED_PRE struct zb_zdo_mgmt_leave_req_s
24852494
{
24862495
zb_ieee_addr_t device_address; /*!< 64-bit IEEE address */
24872496
zb_bitfield_t reserved:6; /*!< Reserve */
2488-
zb_bitfield_t remove_children:1; /*!< Remove children */
2497+
zb_bitfield_t remove_children:1; /*!< Obsolete field, should be always 0 according to CSA */
24892498
zb_bitfield_t rejoin:1; /*!< Rejoin */
24902499
}
24912500
ZB_PACKED_STRUCT

‎zboss/production/include/zcl/zb_zcl_diagnostics.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ enum zb_zcl_diagnostics_attr_e
354354

355355
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID(data_ptr) \
356356
{ \
357-
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_BCAST_ID, \
357+
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID, \
358358
ZB_ZCL_ATTR_TYPE_U32, \
359359
ZB_ZCL_ATTR_ACCESS_READ_ONLY, \
360360
(ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \
@@ -372,7 +372,7 @@ enum zb_zcl_diagnostics_attr_e
372372

373373
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID(data_ptr) \
374374
{ \
375-
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID, \
375+
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID, \
376376
ZB_ZCL_ATTR_TYPE_U16, \
377377
ZB_ZCL_ATTR_ACCESS_READ_ONLY, \
378378
(ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \
@@ -381,7 +381,7 @@ enum zb_zcl_diagnostics_attr_e
381381

382382
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID(data_ptr) \
383383
{ \
384-
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID, \
384+
ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID, \
385385
ZB_ZCL_ATTR_TYPE_U16, \
386386
ZB_ZCL_ATTR_ACCESS_READ_ONLY, \
387387
(ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎zboss/production/src/commissioning/bdb/zdo_commissioning_bdb.c

+48-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ZBOSS Zigbee 3.0
33
*
4-
* Copyright (c) 2012-2022 DSR Corporation, Denver CO, USA.
4+
* Copyright (c) 2012-2024 DSR Corporation, Denver CO, USA.
55
* www.dsr-zboss.com
66
* www.dsr-corporation.com
77
* All rights reserved.
@@ -88,11 +88,18 @@ static void nwk_cancel_network_discovery_response(zb_bufid_t buf);
8888
zb_bool_t bdb_not_ever_joined()
8989
{
9090
zb_ext_pan_id_t curr_ext_pan_id = {0};
91+
zb_bool_t ret;
9192
zb_get_extended_pan_id(curr_ext_pan_id);
9293

93-
return (zb_bool_t)(ZB_EXTPANID_IS_ZERO(curr_ext_pan_id)
94-
&& !zb_zdo_authenticated()
95-
&& !zb_zdo_tclk_valid());
94+
ret = ZB_EXTPANID_IS_ZERO(curr_ext_pan_id)
95+
&& !zb_zdo_authenticated();
96+
97+
if (!ZB_IS_DEVICE_ZC())
98+
{
99+
ret = ret && !zb_zdo_tclk_valid();
100+
}
101+
102+
return ret;
96103
}
97104

98105

@@ -251,7 +258,7 @@ zb_bool_t bdb_joined(void)
251258
joined = (zb_bool_t)(!ZB_EXTPANID_IS_ZERO(ext_pan_id) &&
252259
zb_zdo_authenticated());
253260

254-
if (zb_aib_get_coordinator_version() >= 21)
261+
if (!ZB_IS_DEVICE_ZC() && zb_aib_get_coordinator_version() >= 21)
255262
{
256263
joined = (zb_bool_t)(joined && zb_zdo_tclk_valid());
257264
}
@@ -342,13 +349,25 @@ void bdb_preinit(void)
342349

343350
bdb_init_channel_sets();
344351

345-
TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd, tclk_valid %hd",
352+
if (ZB_IS_DEVICE_ZC())
353+
{
354+
TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd",
355+
(FMT__H_H_H_H_H,
356+
zb_get_device_type(),
357+
joined,
358+
!ZB_EXTPANID_IS_ZERO(ext_pan_id),
359+
zb_zdo_authenticated()));
360+
}
361+
else
362+
{
363+
TRACE_MSG(TRACE_INFO1, "dev type %hd, joined %hd, ext_pan_id %hd, authenticated %hd, tclk_valid %hd",
346364
(FMT__H_H_H_H_H,
347365
zb_get_device_type(),
348366
joined,
349367
!ZB_EXTPANID_IS_ZERO(ext_pan_id),
350368
zb_zdo_authenticated(),
351369
zb_zdo_tclk_valid()));
370+
}
352371
}
353372

354373

@@ -407,7 +426,7 @@ void bdb_initialization_procedure(zb_uint8_t param)
407426
}
408427
else if (!ZB_EXTPANID_IS_ZERO(ext_pan_id)
409428
&& ((zb_aib_get_coordinator_version() < 21) ||
410-
((zb_aib_get_coordinator_version() >= 21) && zb_zdo_tclk_valid())))
429+
((zb_aib_get_coordinator_version() >= 21) && !ZB_IS_DEVICE_ZC() && zb_zdo_tclk_valid())))
411430
{
412431
/* Perform TC rejoin */
413432
TRACE_MSG(TRACE_ERROR, "Perform TC rejoin", (FMT__0));
@@ -903,6 +922,12 @@ static void bdb_touchlink_machine(zb_uint8_t param)
903922
}
904923
break;
905924
#endif /* ZB_BDB_TOUCHLINK */
925+
case BDB_COMM_SIGNAL_LEAVE_DONE:
926+
TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, finishing", (FMT__0));
927+
ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED;
928+
bdb_commissioning_signal(BDB_COMM_SIGNAL_TOUCHLINK_FINISH, param);
929+
break;
930+
906931
case BDB_COMM_SIGNAL_TOUCHLINK_FINISH:
907932
if (ZB_BDB().bdb_commissioning_status != ZB_BDB_STATUS_IN_PROGRESS)
908933
{
@@ -1320,10 +1345,19 @@ static void bdb_network_steering_machine(zb_uint8_t param)
13201345
break;
13211346

13221347
case BDB_COMM_SIGNAL_LEAVE_DONE:
1348+
TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, status %hd", (FMT__H, ZB_BDB().bdb_commissioning_status));
13231349
if (ZB_BDB().bdb_commissioning_status != ZB_BDB_STATUS_NO_NETWORK)
13241350
{
13251351
/* Probably bdb device failed to update tclk exchange */
13261352
bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_STEERING_FINISH, param);
1353+
1354+
/* We can be here with status ZB_BDB_STATUS_IN_PROGRESS after calling the function
1355+
* zb_bdb_reset_via_local_action on the application. In this case, we should change
1356+
* the comm status for the correct return code when commissioning is complete. */
1357+
if (ZB_BDB().bdb_commissioning_status == ZB_BDB_STATUS_IN_PROGRESS)
1358+
{
1359+
ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED;
1360+
}
13271361
}
13281362
else
13291363
{
@@ -1433,6 +1467,12 @@ static void bdb_network_formation_machine(zb_uint8_t param)
14331467
TRACE_MSG(TRACE_ZDO1, "Network is successfully formed", (FMT__0));
14341468
bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH, param);
14351469
break;
1470+
1471+
case BDB_COMM_SIGNAL_LEAVE_DONE:
1472+
TRACE_MSG(TRACE_ZDO1, "BDB_COMM_SIGNAL_LEAVE_DONE, finishing", (FMT__0));
1473+
ZB_BDB().bdb_commissioning_status = ZB_BDB_STATUS_CANCELLED;
1474+
bdb_commissioning_signal(BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH, param);
1475+
break;
14361476

14371477
case BDB_COMM_SIGNAL_NETWORK_FORMATION_FINISH:
14381478
default:
@@ -2418,7 +2458,7 @@ void zb_bdb_initiate_tc_rejoin(zb_uint8_t param)
24182458

24192459
TRACE_MSG(TRACE_ZDO1, ">> zb_bdb_initiate_tc_rejoin, param %hd", (FMT__H, param));
24202460

2421-
if ((!zb_zdo_tclk_valid() || (zb_aib_get_coordinator_version() < 21))
2461+
if (((!ZB_IS_DEVICE_ZC() && !zb_zdo_tclk_valid()) || (zb_aib_get_coordinator_version() < 21))
24222462
&& !zb_aib_tcpol_get_allow_unsecure_tc_rejoins())
24232463
{
24242464
TRACE_MSG(TRACE_ERROR, "TC rejoin is not allowed", (FMT__0));

0 commit comments

Comments
 (0)
Please sign in to comment.