This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: Device Leaving with Remove/Leave command from Coordinator or Device

Part Number: CC2538
Other Parts Discussed in Thread: Z-STACK

We are using the CC2538 with 512K and switched from Zstack 1.2 version to 3.0.1 and we have a new problem

From the traces we see the End Device is now sending a LEAVE command after a few seconds following successful association and binding, after which the coordinator disconnects the device and then the association/bind/LEAVE cycle repeats ad infinitum.

We tried changing compile time parameters

-       NWK_END_DEVICE_LEAVE_TIMEOUT   and   NWK_END_DEV_TIMEOUT_DEFAULT    (tried 10 seconds to several minutes)

-       zgNwkLeaveRequestAllowed (tried switching between True and False)

with no effect.

The difference is in the Coordinator's behavior, as we have tried an ED v1.2 as well as an ED v3.0.1 and they both send a LEAVE to the 3.0.1. coordinator, so we can infer that the coordinator is setting some run-time parameters as part of the binding process (?) causing this. 

  • Hi Sylvain,


    Thank you for sharing the issue you're seeing.

    A few clarifications, based on the Z-Stack 3.0 Developer's Guide that comes with Z-Stack 3.0.1:
    - NWK_END_DEVICE_LEAVE_TIMEOUT and NWK_END_DEV_TIMEOUT_DEFAULT are relevant for the ZC (zigbee coordinator), and are used for child management purposes. Please see section 9.12.
    - zgNwkLeaveRequestAllowed applies to routers. Please see section 15.9.5.

    About how many seconds after the association/binding does the ZC send a LEAVE command? Is this time consistent?

    By traces, I suppose you mean sniffer logs. In the logs, do you see any End Device Timeout requests? The device should poll every every sec (1000 ms as defined in f8wConfig.cfg).


    Regards,
    Toby
  • Hi Toby, thanks for your help

    First on Yikai's comments... there are no items in this errata list that we can see affect our problem

    Your points and questions:
    [1] section 9.12 states:
    "..Coordinators do not process leave commands, Router devices process leave commands from any device in the network (if allowed as mentioned above), and end devices only process leave commands from their parent device..."

    We have a point to point ZED <=> ZC - no router.
    Nothing in the Guide applies here, as what we see is a Leave command being sent by the ZED, and the ZC will not process it. Therefore the failure occurs at the ZED.
    Since as stated in my original post the ZED version 1.2 talking to a ZC version 1.2 does not send this command, I can only conclude that both ZED versions 1.2 and 3.0.1 are being configured during the setup exchanges - by the ZC version 3.0.1 - to behave this way.

    I have looked in some detail at the contents between Association Request and the last exchange (setup Extended address) but I haven't found the needle in this particular haystack!

    [2] zgNwkLeaveRequestAllowed applies to routers. Please see section 15.9.5.
    Same comment: doesn't apply.

    [3] By traces, I suppose you mean sniffer logs. In the logs, do you see any End Device Timeout requests? The device should poll every every sec (1000 ms as defined in f8wConfig.cfg).
    Yes there is an "ED Timeout Request/ Response" exchange during the setup. The ZED requests a timeout of 256 minutes (field value: 8)
    This does not appear to have anything to do with our issue.

    [4] About how many seconds after the association/binding does the ZC send a LEAVE command? Is this time consistent?
    Timing from the Wireshark trace. I'm showing 3 cycles:
    seconds seconds Events
    on trace elapsed
    ===========================================================
    283 Assoc'n Request
    287 4 Last setup message (Extended address request response)
    ZED reports data to the ZC in 2 ZCL's (Temperature and OTA)
    311 24 ZED sends Leave
    319 Assoc'n Request
    323 4 Last setup message (Extended address request response)
    ZED reports data to the ZC in 2 ZCL's (Temperature and OTA)
    346 23 ZED sends Leave
    353 Assoc'n Request
    357 4 Last setup message (Extended address request response)
    ZED reports data to the ZC in 2 ZCL's (Temperature and OTA)
    381 24 ZED sends Leave
    etc...
    So Yes the time is consistent: 27-28 seconds between beginning and end
    and no, I don't really know where to go from here. Downgrading to going back to using ver 1.2 stack has so many other pitfalls !!!
  • Thanks for providing more details.
    Correct, I mentioned those sections to clarify that changing those parameters wouldn't have affected the situation, so we're on the same page there.

    Please send us the mentioned logs so we can investigate further.

    In the meantime, please try the following:
    - erase flash on both devices (to guarantee that all NV items are cleared)
    - flash a fresh copy of 3.0.1 ZC and ZED examples to the boards
  • OK thanks enclosed is the trace I referred to

    We'll be restarting from scratch as you ask and let you know ASAP

    301ZC_301ZED.txt
    
    
    �M<+��������6Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (with SSE4.2)64-bit Windows 10, build 17134.Dumpcap (Wireshark) 2.6.0 (v2.6.0-0-gc7239f02)�\���\\.\pipe\tiwspc_data	64-bit Windows 10, build 17134\��N4nnEn��(����EZEZZUaEX�!2A�6��_	���UK(KUK�st��=R��A�h�<6FFEF��P����EZEZ2��EX�!
    L�����h�Q� kkEk��+����EZEZW�EX�!/A�Mk��	���~K(~K"r�6��h��wFFEF��P����EZEZ2��EX�!
    0�����hxk�wXXEX��>����EZEZD��EX�!��k��"�~K����x��HkkEk��+����EZEZWP�EX�!/A�Nk��	���~K(~K�h��i������kkEk��+����EZEZWK�EX�!/A�Ok��	���~K(~K���������B�kkEk��+����EZEZW2EX�!/A�Pk��	���~K(~K�[��V7��hd+FFEF��P����EZEZ27�EX�!	
    ������hx5XXEX��>����EZEZD��EX�!
    ��k��"�~K����xtSQ!QQEQ��E����EZEZ=��EX�!#Ȥk��DvK��tdsU!AAEA��U����EZEZ->�EX�!��dp�(NNEN��H����EZEZ:�EX�!
    cȥkDvK�pd�
    (AAEA��U����EZEZ-+�EX�!��dx&(WWEW��?����EZEZCeEX�!c�QkDvK~K��xd(AAEA��U����EZEZ-��EX�!Q�dh��.HHEH��N����EZEZ4�EX�!c��k��hd��.AAEA��U����EZEZ-&�EX�!��d���.ttEt��"����EZEZ`��EX�!8a�Rk�H�����f��
    E�j7DvK�d�.AAEA��U����EZEZ-��EX�!R�d�52/uuEu��!����EZEZaDEX�!9a��k�����(DvK6ݎ����iX�}���O�����d�:/AAEA��U����EZEZ-1�EX�!��d��?/ttEt��"����EZEZ`/|EX�!8a������:�8��B����w���2�r���o�Y��ii��(�@���nA��l���P/ttEt��"����EZEZ`@EX�!8a��k�	��~KDvK(DvKB	�(3C��drY/AAEA��U����EZEZ--�EX�!��d���/llEl��*����EZEZX�UEX�!0a��k�H�(DvK��Y�֌�
    �I�{��d;�/AAEA��U����EZEZ-*�EX�!��dhC�1HHEH��N����EZEZ4�EX�!c��k��hd@�1AAEA��U����EZEZ-�EX�!��d�L�1ttEt��"����EZEZ`J5EX�!8a�Tk�	��DvK~K(~K��+y�k��d̙1AAEA��U����EZEZ-{�EX�!T�dhV&3HHEH��N����EZEZ4�EX�! c��k��hdU)3AAEA��U����EZEZ-�EX�!!��d��,3E������EZEZk$bEX�!"Ca�Uk�H��(~KK��#�;3H��gaW��-7s�OϙSL�T1��'�u��d�63AAEA��U����EZEZ-v�EX�!#U�d�n@3iiEi��-����EZEZU�bEX�!$-a��k�H"�(DvK�����v.�[����d�G3AAEA��U����EZEZ-�EX�!%��d��P3kkEk��+����EZEZW�'EX�!&/a��k�H"�(DvK�S{7I��9�8��۶��dX3AAEA��U����EZEZ-�EX�!'��dh�4HHEH��N����EZEZ4��EX�!(c��k��hd�4AAEA��U����EZEZ-�EX�!)��d���4E������EZEZk�EX�!*Ca�Vk�H��(~K���&�9s�ͼ=�_�?]��_�|sX��4Q�T��d��4AAEA��U����EZEZ-m�EX�!+V�d���4iiEi��-����EZEZUEX�!,-a��k�H"�(DvK�Q�b��ٺ�J��d5AAEA��U����EZEZ-�EX�!-��d�N	5kkEk��+����EZEZWU�EX�!./a��k�H"�(DvKXWwd�����%O�?��d�5AAEA��U����EZEZ-�EX�!/��dhB�6HHEH��N����EZEZ4�EX�!0c��k��hdB�6AAEA��U����EZEZ-��EX�!1��d�<�6E������EZEZku�EX�!2Ca�Wk�H��(~K^/s=�
    `R։oEI,q�KYu}R�[�yN�i��d�6AAEA��U����EZEZ-d�EX�!3W�d��6iiEi��-����EZEZU!,EX�!4-a��k�H"�(DvKw�J]igƅ��Ō��d
    �6AAEA��U����EZEZ-�EX�!5��d�{�6kkEk��+����EZEZW�EX�!6/a��k�H"�(DvK=�X��c�~����d��6AAEA��U����EZEZ-�EX�!7��dh'k8HHEH��N����EZEZ4�EX�!8c��k��hd)n8AAEA��U����EZEZ-�EX�!9��d��q8zzEz������EZEZf�/EX�!:>a�Xk�H��(	~K�t�^"���-����4N|b ��^gi���d�z8AAEA��U����EZEZ-[�EX�!;X�dh%:HHEH��N����EZEZ4ܢEX�!<c��k��hd%:AAEA��U����EZEZ-��EX�!=��dh�NIHHEH��N����EZEZ4ڢEX�!>c��k��hd�QIAAEA��U����EZEZ-��EX�!?��d�NTrrEr��$����EZEZ^?EX�!@6a��k�"���(	DvK"���6z��8d6%���}�F��d�TAAEA��U����EZEZ-��EX�!A��d��)TrrEr��$����EZEZ^T]EX�!B6A�Yk�����(
    ~KP�B���N�����tέ���ҹ��h��UHHEH��N����EZEZ4ӢEX�!Cc��k��hd��UAAEA��U����EZEZ-�EX�!D��d�W�UooEo��'����EZEZ[ߑEX�!E3a�Zk�H��(~Kp�Ⱥ�F�a�kn�lr�@��d4�UAAEA��U����EZEZ-N�EX�!FZ�d��UiiEi��-����EZEZU�6EX�!G-a��k�H"�(
    DvK��|�"Zri�� ���d�UAAEA��U����EZEZ-�EX�!H��dhXOWHHEH��N����EZEZ4ˢEX�!Ic��k��hdXRWAAEA��U����EZEZ-�EX�!J��d���WnnEn��(����EZEZZi}EX�!K2a��k�H"�	(DvK��#���7�D��T����d?�WAAEA��U����EZEZ-�EX�!L��dh[wYHHEH��N����EZEZ4ƢEX�!Mc��k�
    �hdZzYAAEA��U����EZEZ-ԡEX�!N��d���YuuEu��!����EZEZa	�EX�!O9a�[k�H��(~KFP	YXMʘR�/�h�/6���x����dD�YAAEA��U����EZEZ-C�EX�!P[
    �d��YiiEi��-����EZEZU.EX�!Q-a��k�H"�
    (DvK�@v��xj&p��
    ��d�YAAEA��U����EZEZ-ߢEX�!R��dh�2[HHEH��N����EZEZ4��EX�!Sc��k�
    �hd�5[AAEA��U����EZEZ-ܡEX�!T��d��]k��E�������EZEZqIEX�!UIa��k�H"�(
    DvK�r���jvwӺo&ӡp�4��W�b��ڭt���o
    ��dvhkAAEA��U����EZEZ-١EX�!V��d��G�qqEq��%����EZEZ]3oEX�!W5a��k�H"�(DvK;���[f��{��[qJ�ޔ��dP�AAEA��U����EZEZ-֢EX�!X��d����kkEk��+����EZEZW��EX�!Y/A�\k��	���~K(
    ~K���v�����ZqqEq��%����EZEZ]��EX�!Z5a��k�H"�
    (DvK���V���~R�D�@G�sXi��d	�ZAAEA��U����EZEZ-ҢEX�![��d�%�kkEk��+����EZEZW:�EX�!\/A�]k��	���~K(~K�ԔA�����4��kkEk��+����EZEZW�lEX�!]/a��k�	���DvK(DvK~�"����d���AAEA��U����EZEZ-ΡEX�!^��dhu13FFEF��P����EZEZ2��EX�!_
    �����
    �hx�=3XXEX��>����EZEZD+�EX�!`��k��"�~K����xt�\;QQEQ��E����EZEZ==�EX�!a#��k��DvK��tda;AAEA��U����EZEZ-��EX�!b��dpRBNNEN��H����EZEZ:q�EX�!cc��kDvK	�pdBAAEA��U����EZEZ-��EX�!d��dx]BWWEW��?����EZEZC	�EX�!ec�^kDvK~K�N�xd:BAAEA��U����EZEZ-*�EX�!f^	�dh��HHHEH��N����EZEZ4�EX�!gc��k�N
    �hd��HAAEA��U����EZEZ-��EX�!h��d���HttEt��"����EZEZ`�EX�!i8a�_k�NH�N����f��
    E�j7DvK�df�HAAEA��U����EZEZ-%�EX�!j_	�d�g<IuuEu��!����EZEZa%kEX�!k9a��k�N���Nh(DvK6ݎ�����X�}���O�	Vc	��dEIAAEA��U����EZEZ-��EX�!l��d��MIuuEu��!����EZEZa�]EX�!m9A�`k�����Nh(~KݪZ�ȭs�L<k�(���3�	�����`IttEt��"����EZEZ`��EX�!n8a��k�N	�Ni~KDvK(DvKB	� ��*
    �dyiIAAEA��U����EZEZ-��EX�!o��d��JllEl��*����EZEZXD�EX�!p0a��k�NH�Nj(DvK��Y�֌�
    �I9b�
    �dZ
    JAAEA��U����EZEZ-��EX�!q��dhN�KHHEH��N����EZEZ4�EX�!rc��k�N
    �hdP�KAAEA��U����EZEZ-�EX�!s��d��KttEt��"����EZEZ`j�EX�!t8a�ak�N	�N�DvK~K(~K���Lr���d`�KAAEA��U����EZEZ-�EX�!ua
    �dhqCMHHEH��N����EZEZ4�EX�!vc��k�N
    �hdqFMAAEA��U����EZEZ-z�EX�!w��d��NME������EZEZk�EX�!xCa�bk�NH�N�(~K-�qbE���������Rzڻ�����j��
    ��E���d�XMAAEA��U����EZEZ-�EX�!yb
    �d��cMiiEi��-����EZEZU޶EX�!z-a��k�NH"�Nk(DvK�����v.������d�jMAAEA��U����EZEZ-��EX�!{��d��nMkkEk��+����EZEZW�EX�!|/a��k�NH"�Nl(DvK�S{7I��9�8����
    ��dQvMAAEA��U����EZEZ-��EX�!}��dhROHHEH��N����EZEZ4�EX�!~c��k�N
    �hdR	OAAEA��U����EZEZ-o�EX�!��d��OE������EZEZkQEX�!�Ca�ck�NH�N�(~K&�L稞%ǜ��q�hDMi��N�'ʌ��w[f�I��d�OAAEA��U����EZEZ-
    �EX�!�c
    �d��%OiiEi��-����EZEZU�%EX�!�-a��k�NH"�Nm(DvK�Q�b��ٳCg	��d�,OAAEA��U����EZEZ-z�EX�!���d��5OkkEk��+����EZEZW\EX�!�/a��k�NH"�Nn(DvKXWwd�����%�	��d*=OAAEA��U����EZEZ-w�EX�!���dh9�PHHEH��N����EZEZ4�EX�!�c��k�N	�hd9�PAAEA��U����EZEZ-d�EX�!���d�a�PE������EZEZk��EX�!�Ca�dk�NH�N�(~KI0��ks�$T�M;�m���.m�W���Ǟϗ��dA�PAAEA��U����EZEZ-�EX�!�d	�d���PiiEi��-����EZEZU�EX�!�-a��k�NH"�No(DvKw�J]igƎzR��	��d��PAAEA��U����EZEZ-o�EX�!���d�d�PkkEk��+����EZEZW�(EX�!�/a��k�NH"�Np(DvK=�X��f�,ݲ���d��PAAEA��U����EZEZ-l�EX�!���dh��RHHEH��N����EZEZ4�EX�!�c��k�N	�hd��RAAEA��U����EZEZ-Y�EX�!���d���RzzEz������EZEZf�EX�!�>a�ek�NH�N�(~Kl+��3�oŻ�`?��yLUp>;f����d�RAAEA��U����EZEZ-��EX�!�e�dh�2THHEH��N����EZEZ4�EX�!�c��k�N�hd�5TAAEA��U����EZEZ-d�EX�!���dh&~cHHEH��N����EZEZ4�EX�!�c��k�N�hd$�cAAEA��U����EZEZ-a�EX�!���d�nrrEr��$����EZEZ^9�EX�!�6a��k�N"���Nq(	DvK"���6z��8d6%��Ĕud	��dS&nAAEA��U����EZEZ-^�EX�!���d��6nrrEr��$����EZEZ^�EX�!�6A�fk�����Nq(~K���K�Ia�R�
    �8#pIG�e���h��oHHEH��N����EZEZ4�EX�!�c��k�N	�hd��oAAEA��U����EZEZ-J�EX�!���d���oooEo��'����EZEZ[)�EX�!�3a�gk�NH�N�(~K�j�߼$L����Ay��88O��d��oAAEA��U����EZEZ-�EX�!�g�d�-�oiiEi��-����EZEZU�EX�!�-a��k�NH"�Nr(
    DvK��|�"Zr~��|�	��dI�oAAEA��U����EZEZ-U�EX�!���dh
    {qHHEH��N����EZEZ4�EX�!�c��k�N
    �hd
    ~qAAEA��U����EZEZ-R�EX�!���d���qnnEn��(����EZEZZ�jEX�!�2a��k�NH"�Ns(DvK��#���7�D��TQ�q
    ��d��qAAEA��U����EZEZ-O�EX�!���dh`tsHHEH��N����EZEZ4�EX�!�c��k�N�hd`wsAAEA��U����EZEZ-<�EX�!���d�|suuEu��!����EZEZa�uEX�!�9a�hk�NH�N�(~K�xDR}M\f���L��g���l��&���d��sAAEA��U����EZEZ-�EX�!�h�d���siiEi��-����EZEZU��EX�!�-a��k�NH"�Nt(DvK�@v��xs�W����dƑsAAEA��U����EZEZ-G�EX�!���dhBuHHEH��N����EZEZ4�EX�!�c�k�N�hdBuAAEA��U����EZEZ-D�EX�!��d��%�vvEv�� ����EZEZb'EX�!�:a�k�NH"�Nu(
    DvK�r���jvwӺo#S�p��Q��Pu��db.�AAEA��U����EZEZ-A�EX�!��d�a�kkEk��+����EZEZW8�EX�!�/A�ik��	���~K(~K>Pw?������Z�qqEq��%����EZEZ]I]EX�!�5a�k�NH"�Nv(DvK;���[f��{��[t�8W���d�b�AAEA��U����EZEZ-=�EX�!��d��YskkEk��+����EZEZW�EX�!�/A�jk��	���~K(~K)�&�����tqqEq��%����EZEZ]��EX�!�5a�k�NH"�Nw(DvK���V���~R�D�@	G��e
    ��d�"tAAEA��U����EZEZ-9�EX�!��d��kkEk��+����EZEZW�dEX�!�/a�k�N	���NxDvK(DvK~өz2
    ��dw�AAEA��U����EZEZ-6�EX�!��dh��MFFEF��P����EZEZ2%�EX�!�
    �����hx7�MXXEX��>����EZEZD֤EX�!���k��"�~K����xtVQQEQ��E����EZEZ=��EX�!�#�
    k��DvK��td-VAAEA��U����EZEZ-)�EX�!�
    �d���ZkkEk��+����EZEZW�EX�!�/A�lk��	���~K(~Ka���,K��p
    �\NNEN��H����EZEZ:��EX�!�c�kDvK�pd��\AAEA��U����EZEZ-�EX�!��dx��\WWEW��?����EZEZC,�EX�!�c�kkDvK~K`�xdr�\AAEA��U����EZEZ-ƫEX�!�k�dhP�cHHEH��N����EZEZ4T�EX�!�c�k`�hdP�cAAEA��U����EZEZ-�EX�!��d�
    �cttEt��"����EZEZ`r�EX�!�8a�mk`H`����f��
    E�j7DvK�d��cAAEA��U����EZEZ-��EX�!�m�d�)�cuuEu��!����EZEZa�EX�!�9a�k`��`�(DvK6ݎ����l�X�}���O���a��d��cAAEA��U����EZEZ-�EX�!��d���cuuEu��!����EZEZa��EX�!�9A�nk����`�(~K��{Gx�{�P�Rd��ь��wc�����dttEt��"����EZEZ`��EX�!�8a�k`	`�~KDvK(DvKB	��J �dHdAAEA��U����EZEZ-�EX�!��d���dllEl��*����EZEZX��EX�!�0a�k`H`�(DvK��Y�֌�
    �I���7�d�dAAEA��U����EZEZ-�EX�!��dh�0fHHEH��N����EZEZ4F�EX�!�c�k`
    �hd�3fAAEA��U����EZEZ-�EX�!��d�T=fttEt��"����EZEZ`�HEX�!�8a�ok`	`�DvK~K(~K�Y���Q�d�EfAAEA��U����EZEZ-��EX�!�o�d�LfttEt��"����EZEZ`�HEX�!�8a�ok`	`�DvK~K(~K�Y���Q���`fttEt��"����EZEZ`�HEX�!�8a�ok`	`�DvK~K(~K�Y���Q��enfttEt��"����EZEZ`�HEX�!�8a�ok`	`�DvK~K(~K�Y���Q�h�gHHEH��N����EZEZ4?�EX�!�c�k`	�hd�gAAEA��U����EZEZ-��EX�!��d��gttEt��"����EZEZ`�EX�!�8a�pk`	`�DvK~K(~K����YO��d��gAAEA��U����EZEZ-��EX�!�p	�dhzgiHHEH��N����EZEZ4:�EX�!�c�k`	�hdxjiAAEA��U����EZEZ-�EX�!��d��piE������EZEZk�EX�!�Ca�qk`H`�(~KZ
    3���z$A�KplA����X����<�J���.��dbziAAEA��U����EZEZ-��EX�!�q
    �d���iiiEi��-����EZEZU�EX�!�-a�k`H"`�(DvK�����v.��Y��
    ��d��iAAEA��U����EZEZ-��EX�!��d���ikkEk��+����EZEZW�|EX�!�/a�k`H"`�(DvK�S{7I��9�8�@�
    ��d_�iAAEA��U����EZEZ-��EX�!��dh�kHHEH��N����EZEZ4/�EX�!�c�k`	�hd�"kAAEA��U����EZEZ-�EX�!��d�'&kE������EZEZk��EX�!�Ca�rk`H`�(~K!l�-��L&��Vܸ���-�t�Ҟs"��
    ��d0kAAEA��U����EZEZ-��EX�!�r
    �d�;kiiEi��-����EZEZUk�EX�!�-a�k`H"`�(DvK�Q�b��٨#%�
    ��d+BkAAEA��U����EZEZ-�EX�!��d�bFkkkEk��+����EZEZWpLEX�!�/a�k`H"`�(DvKXWwd�����%D�݊
    ��d�MkAAEA��U����EZEZ-�EX�!��dh��lHHEH��N����EZEZ4$�EX�!�c�k`	�hd��lAAEA��U����EZEZ-ޣEX�!��d��lE������EZEZk�"EX�!�Ca�sk`H`�( ~Kaݽ�]َ�R6���ť̾���v"#%�xq�R��d��lAAEA��U����EZEZ-��EX�!�s
    �d���liiEi��-����EZEZU,�EX�!�-a�k`H"`�(DvKw�J]igƗ�ܡL
    ��d��lAAEA��U����EZEZ-�EX�!��d�mkkEk��+����EZEZW�EX�!�/a�k`H"`�(DvK=�X��i�$Z_
    ��dnmAAEA��U����EZEZ-�EX�!��dh��nHHEH��N����EZEZ4�EX�!�c�k`
    �hd��nAAEA��U����EZEZ-ӣEX�!��d�%�nzzEz������EZEZffUEX�!�>a�tk`H`�(!~K����fm.�;�h�+9U��G��!���de�nAAEA��U����EZEZ-��EX�!�t
    �dh�?pHHEH��N����EZEZ4�EX�!�c�k`
    �hd�BpAAEA��U����EZEZ-ޣEX�!��dh4�HHEH��N����EZEZ4�EX�!�c� k`�hd2�AAEA��U����EZEZ-ۣEX�!� �d��V�rrEr��$����EZEZ^��EX�!�6a�!k`"��`�(	DvK"���6z��8d6%��)�tt��d6_�AAEA��U����EZEZ-أEX�!�!�d��q�rrEr��$����EZEZ^�tEX�!�6A�uk����`�("~K��MLsӪL�k��!\	���h��HHEH��N����EZEZ4�EX�!�c�"k`�hd��AAEA��U����EZEZ-ģEX�!�"�d����ooEo��'����EZEZ[(EX�!�3a�vk`H`�(#~K���-�j��L��%�Z��d��AAEA��U����EZEZ-~�EX�!�v�d�D
    �iiEi��-����EZEZU��EX�!�-a�#k`H"`�(
    DvK��|�"Zrw�hE���dd�AAEA��U����EZEZ-ϣEX�!�#�dhѣ�HHEH��N����EZEZ4��EX�!�c�$k`�hdѦ�AAEA��U����EZEZ-̣EX�!�$�d��#�nnEn��(����EZEZZ)GEX�!�2a�%k`H"`�(DvK��#���7�D��T���'��di+�AAEA��U����EZEZ-ɣEX�!%�dh�HHEH��N����EZEZ4��EX�!c�&k`�hd�AAEA��U����EZEZ-��EX�!&�d�l��uuEu��!����EZEZaqEX�!9a�wk`H`�($~K8>L\~�&0\���_37�.@��dʍAAEA��U����EZEZ-s�EX�!w�d�W�iiEi��-����EZEZU\�EX�!-a�'k`H"`�(DvK�@v��xx��N���dw�AAEA��U����EZEZ-��EX�!'�dh�t�HHEH��N����EZEZ4�EX�!c�(k`�hd�w�AAEA��U����EZEZ-��EX�!(�d���vvEv�� ����EZEZb nEX�!	:a�)k`H"`�(
    DvK�r���jvwӺo-S�p��Q�
    ��dI
    �AAEA��U����EZEZ-��EX�!
    )�d����qqEq��%����EZEZ]BKEX�!5a�*k`H"`�(DvK;���[f��{��[z��ߘV��d���AAEA��U����EZEZ-��EX�!*�d�<CkkEk��+����EZEZWT EX�!
    /A�xk��	���~K(%~K੎%o
    ����G�qqEq��%����EZEZ]*`EX�!5a�+k`H"`�(DvK���V���~R�D�@GFQ	��dP�AAEA��U����EZEZ-��EX�!+�d����kkEk��+����EZEZW#�EX�!/a�,k`	��`�DvK(DvK~�|+N��dY��AAEA��U����EZEZ-��EX�!,�d��,+kkEk��+����EZEZWjEX�!/A�yk��	���~K(&~K8!&l�-��h�gFFEF��P����EZEZ2ȘEX�!
    �����hxx<gXXEX��>����EZEZDy�EX�!��k��"�~K����xtsGoQQEQ��E����EZEZ=k�EX�!#�k��DvK��td�KoAAEA��U����EZEZ-ԦEX�!�dp��uNNEN��H����EZEZ:��EX�!c�kDvK�pdE�uAAEA��U����EZEZ-��EX�!�dxNvWWEW��?����EZEZC�HEX�!c�zkDvK~KP��xd0vAAEA��U����EZEZ-Z�EX�!z�dh��|HHEH��N����EZEZ4�YEX�!c�kP��hd��|AAEA��U����EZEZ-��EX�!�d��|ttEt��"����EZEZ`EX�!8a�{kP�HP�����f��
    E�j7DvK�d��|AAEA��U����EZEZ-U�EX�!{�d��}uuEu��!����EZEZap�EX�!9a�kP���P�l(DvK6ݎ����(X�}���O�m-���d''}AAEA��U����EZEZ-ǦEX�! �d�5}ttEt��"����EZEZ`�EX�!!8a�kP�	P�m~KDvK(DvKB	�q2|O�d�=}AAEA��U����EZEZ-ĦEX�!"�d�8K}uuEu��!����EZEZa<vEX�!#9A�|k����P�l('~KT��hr�$g�?�R{��ʹ���M�~�����}llEl��*����EZEZXx�EX�!$0a�	kP�HP�n(DvK��Y�֌�
    �Id���d5�}AAEA��U����EZEZ-��EX�!%	�dhGvHHEH��N����EZEZ4yYEX�!&c�
    kP��hdGyAAEA��U����EZEZ-��EX�!'
    �d�B�ttEt��"����EZEZ`�dEX�!(8a�}kP�	P��DvK~K((~K���kϬ�d��AAEA��U����EZEZ-H�EX�!)}
    �dh��HHEH��N����EZEZ4yYEX�!*c�kP�
    �hd��AAEA��U����EZEZ-��EX�!+�d��$�E������EZEZk4EX�!,Ca�~kP�HP��()~Ka��aG��-,����ϱ�eJgr*��p�I�U���d�.�AAEA��U����EZEZ-C�EX�!-~
    �d�m3�iiEi��-����EZEZU��EX�!.-a�kP�H"P�o(DvK�����v.�,+A
    ��d�:�AAEA��U����EZEZ-��EX�!/�d��>�kkEk��+����EZEZWILEX�!0/a�
    kP�H"P�p(DvK�S{7I��9�8gI�
    ��d]F�AAEA��U����EZEZ-��EX�!1
    �dhlՂHHEH��N����EZEZ4nYEX�!2c�kP�
    �hdl؂AAEA��U����EZEZ-��EX�!3�d�f�E������EZEZkI;EX�!4Ca�kP�HP��(*~K[��LO8�d �ДO�m׋�5�`�?b������S��dF�AAEA��U����EZEZ-:�EX�!5�d��iiEi��-����EZEZU�EX�!6-a�kP�H"P�q(DvK�Q�b��١��
    ��d1��AAEA��U����EZEZ-��EX�!7�d�z��kkEk��+����EZEZW��EX�!8/a�kP�H"P�r(DvKXWwd�����%�.�
    ��d��AAEA��U����EZEZ-��EX�!9�dhy��HHEH��N����EZEZ4dYEX�!:c�kP�	�hdy��AAEA��U����EZEZ-��EX�!;�d�H��E������EZEZk;�EX�!<Ca��kP�HP��(+~KQ�p��3}�%�J�?��i18���Ĩ�uϏ����d(��AAEA��U����EZEZ-1�EX�!=�	�d���iiEi��-����EZEZU:{EX�!>-a�kP�H"P�s(DvKw�J]igƠ��At
    ��d��AAEA��U����EZEZ-��EX�!?�d����kkEk��+����EZEZW7EX�!@/a�kP�H"P�t(DvK=�X��l�`G7/	��d���AAEA��U����EZEZ-��EX�!A�dh�S�HHEH��N����EZEZ4[ZEX�!Bc�kP��hd�V�AAEA��U����EZEZ-��EX�!C�d�gZ�zzEz������EZEZf�REX�!D>a��kP�HP��(,~K�jrHx�����?Ǭ���R�ڢ>���d�c�AAEA��U����EZEZ-(�EX�!E��dh��HHEH��N����EZEZ4SZEX�!Fc�kP�
    �hd��AAEA��U����EZEZ-��EX�!G�dh�9�HHEH��N����EZEZ4QZEX�!Hc�kP�	�hd�<�AAEA��U����EZEZ-��EX�!I�d�I�rrEr��$����EZEZ^=EX�!J6a�kP�"��P�u(	DvK"���6z��8d6%�ҽ|��	��d��AAEA��U����EZEZ-��EX�!K�d�f�rrEr��$����EZEZ^�EX�!L6A��k����P�u(-~K���/C��i���r�
    -�D���hq��HHEH��N����EZEZ4JZEX�!Mc�kP�	�hdq��AAEA��U����EZEZ-x�EX�!N�d�u��ooEo��'����EZEZ[��EX�!O3a��kP�HP��(.~Kg㙼�JζB�m�e��k���dU��AAEA��U����EZEZ-�EX�!P�	�d�͜�iiEi��-����EZEZU��EX�!Q-a�kP�H"P�v(
    DvK��|�"ZrL��_	��d죣AAEA��U����EZEZ-��EX�!R�dhJ1�HHEH��N����EZEZ4BZEX�!Sc�kP�	�hdJ4�AAEA��U����EZEZ-��EX�!T�d����nnEn��(����EZEZZ)EX�!U2a�kP�H"P�w(DvK��#���7�D��T���
    ��dtɥAAEA��U����EZEZ-}�EX�!V�dh&T�HHEH��N����EZEZ4<ZEX�!Wc�kP�	�hd&W�AAEA��U����EZEZ-j�EX�!X�d��h�uuEu��!����EZEZa_�EX�!Y9a��kP�HP��(/~K��
    =�#�	�������8E2C0d���d/q�AAEA��U����EZEZ-�EX�!Z�	�d��u�iiEi��-����EZEZU
    wEX�![-a�kP�H"P�x(DvK�@v��xA�%s	���܁�iiEi��-����EZEZU	wEX�!\-a�kP�H"P�x(DvK�@v��xA�%s	��d���AAEA��U����EZEZ-t�EX�!]�d�\��uuEu��!����EZEZaZ�EX�!^9a��kP�HP��(/~K��
    =�#�	�������8E2C0d������uuEu��!����EZEZaY�EX�!_9a��kP�HP��(/~K��
    =�#�	�������8E2C0d�������uuEu��!����EZEZaX�EX�!`9a��kP�HP��(/~K��
    =�#�	�������8E2C0d���h�$�HHEH��N����EZEZ40ZEX�!ac�kP�	�hd�'�AAEA��U����EZEZ-^�EX�!b�d�C1�uuEu��!����EZEZa�EX�!c9a��kP�HP��(0~KV�;s�R��֞~�{y~(
    C��[��d�9�AAEA��U����EZEZ-�EX�!d�	�d�KB�iiEi��-����EZEZU�cEX�!e-a�kP�H"P�y(
    DvK�u�F�b]?���	��dkI�AAEA��U����EZEZ-i�EX�!f�dh�۪HHEH��N����EZEZ4(ZEX�!gc� kP�	�hd�ުAAEA��U����EZEZ-f�EX�!h �d�W��vvEv�� ����EZEZb�EX�!i:a�!kP�H"P�z(DvK;���[f��z��[y�	{އ�X����d��AAEA��U����EZEZ-c�EX�!j!�d��?�qqEq��%����EZEZ]E,EX�!k5a�"kP�H"P�{(DvK���V���~Q�D�@�v!Y��d�G�AAEA��U����EZEZ-`�EX�!l"�d��kkEk��+����EZEZW0EX�!m/A��k��	���~K(1~K��C�����V:�kkEk��+����EZEZW��EX�!n/A��k��	���~K(2~Km�H[k���

  • Thanks for sharing that log.

    From the looks of it, ZR does not request a key. Is "BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE" (found in BDB/bdb_interface.h) defined as TRUE?
  • If your testing coordinator is based on Z-Stack 3.0.1 and you intend to join Zigbee HA devices, you have to set BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE to FALSE on coordinator.
  • We are sorry to report this did not fix the issue. Didn't the sniffer traces I sent give a clue as to what is wrong?
    I will take additional traces and compare with the original I sent you on Monday.
  • I am not clear about your test details now. Can you elaborate which Z-Stack version and examples you use on coordinator/device to test and also provide sniffer log?
  • Hi Sylvain,

    Any progress/new logs after starting from scratch?

    As far as I can see from the current log, the ZC does not send any kind of configuration command to the ZED.
    If the ZC was involved, I would expect that the ZC would send a ZDO Mgmt_leave_req.

    On the ZED side, please check if the ZED enters the ZDO_ProcessMgmtLeaveReq function (located in ZDO/ZDObject.c).
    On the ZC side, please check if the ZC enters the ZDP_MgmtLeaveReq function (located in ZDO/ZDProfile.c).


    Regards,
    Toby
  • Hi Toby,

    I am wokring with Sylvain, the attached is our wireshark log which shows that our ZED joins network and leave network. After Device Announcement broadcasted by ZED, ZED sends out End Device Timeout Request and ZC sends back response. After a few seconds, ZC sends Leave request to ZED and ZED broadcasts Leave Indication following resetting by itself. If we look at code, it looks like this: ZDO_LeaveInd() ---> ZDApp_LeaveReset() --> ZED reset.

    We don't understand why ZED broadcast Leave Indication and then reset while ZED is still sending out temperature data to ZC polling with data request periodically. We are trying to understand how Zigbee 3.0 work for us. The following are our questions about Zigbee 3.0:

    1. How does Child Aging work after enabling uint8 zgChildAgingEnable = TRUE;
    2. How does the following parameter works? This parameter is referenced from AssocList.o(AllDevice.a) which we cannot find source code. Also, this parameter is mandatory in ZC build.

      uint8 zgNwkEndDeviceLeaveTimeoutDefault = NWK_END_DEVICE_LEAVE_TIMEOUT;

    3. The following paramenters are currently configured as below:
      #if !defined ( NWK_END_DEV_TIMEOUT_DEFAULT )
        #define NWK_END_DEV_TIMEOUT_DEFAULT  8    // Default value per ZigBee core specification is 8
      #endif
         
         
      //Timeout after which an EndDevice will be removed from from the indirect MAC messages queue
         // NOTE: End devices which poll rate is slower than this will not receive the leave request
      #if !defined ( NWK_END_DEVICE_LEAVE_TIMEOUT )   
        #define NWK_END_DEVICE_LEAVE_TIMEOUT 2  
      #endif
      // Value used by END DEVICE when sending End Device Timeout Request
      // This is an index into table timeoutValue[] defined in nwk_globals.c
      #if !defined ( END_DEV_TIMEOUT_VALUE )
        #define END_DEV_TIMEOUT_VALUE   8   // Default value per ZigBee core specification is 8
      #endif
      
      // Value used by END DEVICE when sending End Device Timeout Request
      #if !defined ( END_DEV_CONFIGURATION )
        #define END_DEV_CONFIGURATION   0     // Per ZigBee Core spec R21, 0 is the only valid value
      #endif

    4. How does the following parameters work together?
    // This is an index into table Requested Timeout Enumerated Values.
    // It is used by the parent router, it indicates the default timeout value
    // for any end device that does not negotiate a different timeout value
    uint8 zgNwkEndDeviceTimeoutDefault = NWK_END_DEV_TIMEOUT_DEFAULT;
    
    // Index into table Requested Timeout Enumerated Values.
    // Used to keep the leave message into MAC queue for child devices that has expired
    uint8 zgNwkEndDeviceLeaveTimeoutDefault = NWK_END_DEVICE_LEAVE_TIMEOUT;
    //=====================================================================
    
    //==========    Child Aging END DEVICE configuration    ===============
    // Values used by End Device when sending End Device Timeout Request
    uint8 zgEndDeviceTimeoutValue  = END_DEV_TIMEOUT_VALUE;
    uint8 zgEndDeviceConfiguration = END_DEV_CONFIGURATION;

    In short, we dont want to see our ZED keep Leaving and Joining again and again. What we want to see is that ZED does not stay connected with ZC until it is req'd to leave.

    Thanks,

    Lei

    5543.pollrate_leave_timeout.rar

  • Also, another question is how ZDO_LeaveInd() is called in ZED?

    Thanks,

    Lei
  • The default timeout of child aging is set to 256 minutes like it is in the following code. It means the device would be aged out of association table if the parent node doesn’t receive any message or polling from child node.

    // Child aging management default values
    // Values are specified in table of nwk_globals.h module
    //timeoutValue[15]
    // 10, // 0 10 seconds
    // 2, // 1 2 minutes
    // 4, // 2 4 minutes
    // 8, // 3 8 minutes
    // 16, // 4 16 minutes
    // 32, // 5 32 minutes
    // 64, // 6 64 minutes
    // 128, // 7 128 minutes
    // 256, // 8 256 minutes
    // 512, // 9 512 minutes
    // 1024, // 10 1024 minutes
    // 2048, // 11 2048 minutes
    // 4096, // 12 4096 minutes
    // 8192, // 13 8192 minutes
    // 16384 // 14 16384 minutes
    //
    // This value is used by the parent ROUTER
    #if !defined ( NWK_END_DEV_TIMEOUT_DEFAULT )
    #define NWK_END_DEV_TIMEOUT_DEFAULT 8 // Default value per ZigBee core specification
    #endif

    // Value used by END DEVICE when sending End Device Timeout Request
    // This is an index into table timeoutValue[] defined in nwk_globals.c
    #if !defined ( END_DEV_TIMEOUT_VALUE )
    #define END_DEV_TIMEOUT_VALUE 8 // Default value per ZigBee core specification
    #endif

    If you don’t change default settings, your device shouldn’t be aged out so fast from association table and I think your trouble isn’t related to child aging. Until now, I am a little confused by your test setup so can you elaborate your issue again from scratch?
  • The default timeout of child aging is set to 256 minutes like it is in the following code. It means the device would be aged out of association table if the parent node doesn’t receive any message or polling from child node.

    // Child aging management default values

    // Values are specified in table of nwk_globals.h module

    //timeoutValue[15]

    //    10, // 0  10 seconds

    //     2, // 1  2 minutes

    //     4, // 2  4 minutes

    //     8, // 3  8 minutes

    //    16, // 4  16 minutes

    //    32, // 5  32 minutes

    //    64, // 6  64 minutes

    //   128, // 7  128 minutes

    //   256, // 8  256 minutes

    //   512, // 9  512 minutes

    //  1024, // 10 1024 minutes

    //  2048, // 11 2048 minutes

    //  4096, // 12 4096 minutes

    //  8192, // 13 8192 minutes

    // 16384 // 14  16384 minutes

    //

    // This value is used by the parent ROUTER

    #if !defined ( NWK_END_DEV_TIMEOUT_DEFAULT )

     #define NWK_END_DEV_TIMEOUT_DEFAULT  8    // Default value per ZigBee core specification

    #endif

    // Value used by END DEVICE when sending End Device Timeout Request

    // This is an index into table timeoutValue[] defined in nwk_globals.c

    #if !defined ( END_DEV_TIMEOUT_VALUE )

     #define END_DEV_TIMEOUT_VALUE   8   // Default value per ZigBee core specification

    #endif

    If you don’t change default settings, your device shouldn’t be aged out so fast from association table and I think your trouble isn’t related to child aging. Until now, I am a little confused by your test setup so can you elaborate your issue again from scratch?

  • Hi YiKai,

    #if !defined ( NWK_END_DEVICE_LEAVE_TIMEOUT )   
      #define NWK_END_DEVICE_LEAVE_TIMEOUT 2  
    #endif

    The reason here I changed to 2 is because our ZED cannot join network at all with the level of 8. This question I asked from another thread already. Changing this to 2 make our ZED joining network, however, it makes our ZED keeping leaving and joining again and again even though data request sends out periodically. That's why I am asking how to configure those parameters to work for us.

    Thanks,

    Lei

  • uint8 zgNwkEndDeviceLeaveTimeoutDefault = NWK_END_DEVICE_LEAVE_TIMEOUT;

    Actually, I am feeling this parameter is key point in ZC with Zigbee 3.0, plus how ZDO_LeaveInd() is called in ZED must be related to this parameter. I am trying to understand how AssociateList will be updated periodically.

    Thanks,

    Lei

  • Can you elaborate which Z-Stack version and example do you run on your coordinator and device?
  • ZStack 3.0 with Sample Switch as base for ZED, ZNP as ZC. We have tested the following scenarios:

    1) ZStack 3.0 ZED and ZStack 1.2.2a ZNP --------------------->Good

    2) ZStack 1.2.2a ZED and ZStack 1.2.2a ZNP -------------------->Good

    3) ZStack 3.0 ZED and ZStack 3.0 ZNP ------------------------>Bad

    Bad means that after we changed the following parameter:

    #if !defined ( NWK_END_DEVICE_LEAVE_TIMEOUT )   
      #define NWK_END_DEVICE_LEAVE_TIMEOUT 2  
    #endif

    ZED joins network, however, ZED keeps leaving and rejoining(reset itself) for ever, and data request is set to default value 1000.

    Also, if we have default value as below:

    #if !defined ( NWK_END_DEVICE_LEAVE_TIMEOUT )   
      #define NWK_END_DEVICE_LEAVE_TIMEOUT 9  
    #endif

    ZED cannot join network at all.

    Again, I tested the following scenarios:

    1) Disable the child aging on ZED only:

    //=====================================================================
    
    // Determines if the Child Aging Table Management process is active or not.
    // This feature is optional and it is disabled by default.
    //
    // NOTICE:  Before enabling Child Aging make sure to review all the related
    // definitions in this file, especially zgNwkParentInformation.
    uint8 zgChildAgingEnable = FALSE;
    

    ZED stops sending End Device Timeout Request, however after a few seconds, ZED still broadcast Leave Indication and reset itself and rejoin again and again

    2) Comment out the following parameter on both ZED and ZC

    // Index into table Requested Timeout Enumerated Values.
    // Used to keep the leave message into MAC queue for child devices that has expired
    //uint8 zgNwkEndDeviceLeaveTimeoutDefault = NWK_END_DEVICE_LEAVE_TIMEOUT;
    

    I got ZNP linking error shown as below:

    Upon investigation, I am guessing that all issues are related to ZStack 3.0 for ZC with the following parameter

    uint8 zgNwkEndDeviceLeaveTimeoutDefault = NWK_END_DEVICE_LEAVE_TIMEOUT;

    I cannot disable this parameter on ZC which is mandatory on ZStack 3.0 for ZC. Our expectation and questions are:

    1) ZED can join the network

    2) ZED does NOT keep Leaving and rejoining (reset by itself) for ever 

    3) can someone elaborate how child aging mechanism of ZStack 3.0 works?

  • END_DEV_TIMEOUT_VALUE is for End Device Timeout Request command sent by an end device to inform its parent of its timeout requirements. This allows the parent the ability to delete the child entry from the neighbor table if the child has not communicated with the parent in the specified amount of time. If it have not send , his parents will using NWK_END_DEV_TIMEOUT_DEFAULT . I will test case 3 if yours to verify it when I can access to my CC2538 kits.
  • For case 3, I suppose you don't add the following patch from . Please add it and test again.

    ZED poll rate set incorrectly if reset from a leave request with rejoin enabled

    Issue description:
    ZED will poll using REJOIN_POLL_RATE instead of POLL_RATE after being reset due to a parent leave request where the rejoin option was set.

    Proposed fix:
    In ZDApp_ProcessNetworkJoin of ZDApp.c, remove NLME_SetPollRate( zgRejoinPollRate ); from if (nwkStatus == ZSuccess) and place in the else statement instead. One must also set the zgRejoinPollRate when device state is DEV_END_DEVICE_UNAUTH

    if ( ZG_SECURE_ENABLED && ( ZDApp_RestoreNwkKey( TRUE ) == false ) )
    {
      if ( ZSTACK_END_DEVICE_BUILD )
      {
         NLME_SetPollRate( zgRejoinPollRate );
      }
      // wait for auth from trust center
      ZDApp_ChangeState( DEV_END_DEVICE_UNAUTH );
    
  • Hi YK,

    I also saw your post, may I follow that to update our code?

  • Yes, that's exactly the same.
  • Hi YK and Toby,

    Still no luck after updating this as suggested by YK, plz check it out as attached for wireshark log. One thing I can see is that ZC did not send out Leave Request, but ZED still sent out Leave Indication and reset by itself.

    Our timeout configuration like this:

    // This value is used by the parent ROUTER
    #if !defined ( NWK_END_DEV_TIMEOUT_DEFAULT )
      #define NWK_END_DEV_TIMEOUT_DEFAULT  8    // Default value per ZigBee core specification is 8
    #endif
       
       
    //Timeout after which an EndDevice will be removed from from the indirect MAC messages queue
       // NOTE: End devices which poll rate is slower than this will not receive the leave request
    #if !defined ( NWK_END_DEVICE_LEAVE_TIMEOUT )   
    //  #define NWK_END_DEVICE_LEAVE_TIMEOUT 9  
      #define NWK_END_DEVICE_LEAVE_TIMEOUT 2
    #endif
    
    // Value used by END DEVICE when sending End Device Timeout Request
    // This is an index into table timeoutValue[] defined in nwk_globals.c
    #if !defined ( END_DEV_TIMEOUT_VALUE )
      #define END_DEV_TIMEOUT_VALUE   2   // Default value per ZigBee core specification is 8
    #endif
    
    // Value used by END DEVICE when sending End Device Timeout Request
    #if !defined ( END_DEV_CONFIGURATION )
      #define END_DEV_CONFIGURATION   0     // Per ZigBee Core spec R21, 0 is the only valid value
    #endif



    And ZED MAC Poll Rate shown as below:

    /****************************************
     * The following are for End Devices only
     ***************************************/
    
    -DRFD_RCVC_ALWAYS_ON=FALSE
    
    /* The number of milliseconds to wait between data request polls to the coordinator. */
    -DPOLL_RATE=1000
    
    /* This is used after receiving a data indication to poll immediately
     * for queued messages...in milliseconds.
     */
    -DQUEUED_POLL_RATE=100
    
    /* This is used after receiving a data confirmation to poll immediately
     * for response messages...in milliseconds
     */
    -DRESPONSE_POLL_RATE=100
    
    /* This is used as an alternate response poll rate only for rejoin request.
     * This rate is determined by the response time of the parent that the device
     * is trying to join.
     */
    -DREJOIN_POLL_RATE=440
    
    /* Rejoin retry backoff silent period timer duration in milliseconds - default 15 minutes according to HA test spec */
    -DREJOIN_BACKOFF=900000
    
    /* Rejoin retry backoff scan timer duration in milliseconds - default 15 minutes according to HA test spec */
    -DREJOIN_SCAN=900000

    Again, why ZED still keeps sending Leave Indication in our case?

    ZBtrace_ZED_Leave_Issue_20181001.rar

  • In Bdb.c, comment out the following codes, ZED stops sending out Leave Indication. My understanding is that if BDB_TC_LINK_KEY_EXCHANGE_FAIL, ZED will send command NLME_LeaveReq(), right?

          if ( NLME_LeaveReq( &leaveReq ) != ZSuccess )
          {
            osal_set_event( bdb_TaskID,BDB_TC_LINK_KEY_EXCHANGE_FAIL);
          }
    

  • Lei, thanks for sharing more details on your setup. I assume the previous post you mentioned is e2e.ti.com/.../725702 .

    First, yes. On the ZED side, a BDB_TC_LINK_KEY_EXCHANGE_FAIL will cause the ZED to send a leave request for itself with all fields set to false. This is documented the in the Z-Stack 3.0 Developer's Guide, section 10.6.1. That section also documents the steps of the process. The ZED should request a key after receiving the ZDO Node Descriptor response, but I don't see this on the logs.
    Can you verify that bdbTrustCenterRequireKeyExchange is TRUE on the ZC and that requestNewTrustCenterLinkKey is TRUE on the ZED?

    One thing I also noticed is that you have
    NWK_END_DEVICE_LEAVE_TIMEOUT < NWK_END_DEV_TIMEOUT_DEFAULT.
    As mentioned in the previous post, this should be the other way around. In other words, ensure that
    NWK_END_DEVICE_LEAVE_TIMEOUT > NWK_END_DEV_TIMEOUT_DEFAULT.



    Regards,
    Toby
  • Hi Toby,

    [Toby]That section also documents the steps of the process. The ZED should request a key after receiving the ZDO Node Descriptor response, but I don't see this on the logs.

    [Lei] Yes, you are right. We did not send a key after ZDO Descriptor response. I will look at document regarding this process.

    [Toby] Can you verify that bdbTrustCenterRequireKeyExchange is TRUE on the ZC and that requestNewTrustCenterLinkKey is TRUE on the ZED?

    [Lei] On ZC, it is set to FALSE shown as below

    #define BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE                FALSE 

    On ZED, it is set to TRUE shown as below

    // Joining Device Policies: r21 spec 4.9.1
    // This boolean indicates whether the device will request a new Trust Center Link key after joining.
    // TC link key cannot be requested if join is performed on distributed nwk
    bool  requestNewTrustCenterLinkKey = TRUE;  
    

    Both I need to set to TRUE, right?

    [Toby] NWK_END_DEVICE_LEAVE_TIMEOUT < NWK_END_DEV_TIMEOUT_DEFAULT.

    [Lei] Yes, you are right, I will verify this part again.

    Thanks,

    Lei

  • I just test Z-Stack 3.0.1 ZNP ZC + Z-Stack 3.0.1 SampleSwitch ZED with the patch in Z-Stack known issue and without timeout configuration modification. I can see SampleSwitch ZED joins and stay in Z-Stack 3.0.1 ZC network without leaving. Can you try this without timeout configuration modification?
  • YK,

    Would you mind attach your wireshark log as reference? We use sample sw as base running our own application, there must be something missed in our application.

    Thanks,

    Lei

  • I use Ubiqua. Can you open Ubiqua sniffer log?
  • Anyway, I attach my sniffer log for your reference.

    YK.zip

  • Thx YK! But my license expired. For now I switch using 2531 to capture trace.
  • I suspect you can find any clue from my log. It reads just like normal joining process.
  • YK,

    How did you setup your samplesw ZED to unsecured joining network via LED? As suggested by Toby, our ZED did not send out key request after ZDO Node descriptor request. Can you elaborate what steps you setup your ZED? What did you do on ZNP?

    Thx,

    Lei
  • ZNP ZC setup steps are listed in sunmaysky.blogspot.com/.../use-ztool-z-stack-30-znp-to-set-up.html and I just use default SampleSwitch as ZED to join ZC.
  • YK,

    I tried to follow ZNP network formation steps, however, I was stuck on the last step shown as below

    ---------------->this is your final notification

    10:38:49.49 COM1 APP_CNF_BDB_COMMISSIONING_NOTIFICATION (0x4F80)
        Status: 0x00 (Success) (0x0)
        Commissioning Mode: 0x02 (Formation) (0x2)
        Commissioning Mode: 69 (0x45)

    --------------> this is my formation procedures and stopped at Network Starting(0x8)

    mtSapiWriteConfigurationSrspCb
    Status: SUCCESS(0x0)
    mtUtilGetDeviceInfoSrspCb
    Status: 0x00
    IEEEAddr: 0x00124B0006160BA7
    ShortAddr: 0x0000
    DeviceType: 0x07
    DeviceState: 0x08
    NumAssocDevices: 0x00
    Resetting ZNP
    mtSysResetIndCb
    ZNP Reset Reason: 0
    ZNP TransportRev: 2
    ZNP Product: 0
    ZNP Major.Minor.HW: 2.7.1
    Configuring Dev Type: ZC
    mtSapiWriteConfigurationSrspCb
    Status: SUCCESS(0x0)
    mtSapiWriteConfigurationSrspCb
    Status: SUCCESS(0x0)
    Set channel: 13
    mtAppCnfBdbSetChannelSrspCb
    Status: SUCCESS(0x0)
    Set Secondary channel: 0
    mtAppCnfBdbSetChannelSrspCb
    Status: SUCCESS(0x0)
    appCnfBdbSetTCRequireKeyExchange: (0x1)
    mtAppCnfBdbSetTCRequireKeyExchangeSrspCb
    Status: SUCCESS(0x0)
    Start CommissioningMode: (0x4) Network Formation
    mtAppCnfBdbStartCommissioningSrspCb
    Status: SUCCESS(0x0)
    mtAppCnfBdbStartCommissioningNotification
    Status: 0x1
    Commissioning Mode:: 0x2
    RemainingCommissioning Mode:: 0x4
    Commissioning Mode: 0x2(Steering)
    mtZdoStateChangeIndCb
    Network Starting
    

    What else did I miss for znp setup? Do you have ztool script as references?

    Thx,

    Lei

  • I don't have ZTool script for this. All you have to do is to follow the steps in sunmaysky.blogspot.com/.../use-ztool-z-stack-30-znp-to-set-up.html to setup coordinator and form Zigbee network accordingly.
  • Yes, I did same thing but it stayed in IN_PROGRESS and cannot complete network formation. I use znp-host-framework to setup my ZC instead of ztool. Any idea about this?

    Thx,

    Lei
  • If you use ZTool, can it form network successfully?
  • Hi Lei,

    Any progress on this?

    Did you try enabling TCLK exchange on both devices?

    Also, were you able to form the network using Z-Tool?

    Next, I would suggest reverting back to default values:
    #define NWK_END_DEV_TIMEOUT_DEFAULT 8
    #define NWK_END_DEVICE_LEAVE_TIMEOUT 9
    #define END_DEV_TIMEOUT_VALUE 8
    #define END_DEV_CONFIGURATION 0
    #define BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE FALSE
    bool requestNewTrustCenterLinkKey = TRUE;

    These defaults should work for both devices (I assume you're using the thermostat and temperature sensor example projects).
    Can you send a log when the devices are erased and flashed with the default settings?
    The end device should send a request for the TCLK in the function bdb_requestTCLinkKey (inside BDB/bdb.c). Can you check if that is the case on your side?



    Regards,
    Toby
  • Hi Toby,

    Thanks for your feedback. Yes, I reverted all changes to the original version. I can form network using ZNP via ztool, sending startCommissioning command. However, I have been using znp-host-framework to run my znp for a while on old version ZStack, and trying to run this new formation procedure with znp-host-framework, unfortunately I cannot make it work on ZB3.0 for now and trying to figure it out why it failed. 

    After using ztool to run ZNP to form network successfully , I can see my own ZED  sending out assoc request but cannot make it further, there must be new procedure for ZED to join network, e.g. steering. I will try TI SampleSW ZED to see how ZED joins the network, and will keep you posted.

    The purpose of my test is to use znp-host-framework to control ZNP as ZC to do network formation, and allow our own ZED(sampleSw-based) to join the network. For now, I am not fully understanding how ZED joins the network using TICC2538. Also, there are multiple joining types: TC Joining, Distributed Joining and Touchlink Joining. I will learn howto make it join the network then. Any suggestion for those joining?

    Thanks,

    Lei

  • Z-Stack 3.0 Developer's Guide discuss those in chapters 10 and 15, and is a good place to start.
    Along your testing, feel free to create a new thread for further support.


    Regards,
    Toby
  • Thanks Toby!  This issue is pretty much related to new procedures of Security and Commissioning in Z3.0. Again, thank you and YK for your great help!!