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.

CC2652P: A better way for Gateway/Coordinator to detect a New-Device joining.

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

Traditional way to detect device joining is to receive ZDP-Device-Announce. But this is not perfect. ZDP-Device-Announce is send by broadcast, so it might be missed. The End-Device rejoin network or restart, it will also broadcast ZDP-Device-Announce.

Exchange key is a best event to detect a new device joining. function "bdb_RegisterTCLinkKeyExchangeProcessCB" can detect a device first-time join into coordinator. But in ZNP sample, the "bdb_RegisterTCLinkKeyExchangeProcessCB" has never be used

  • Hi Aries,

    I agree that the TC Link Key update process is the best method for detecting a new device join, but this only applies for Zigbee 3.0 devices as HA 1.2.2a and older will not perform this exchange.  It also will not work if Install Codes are used.  You can refer to this similar E2E thread.  Another option involves maintaining a device table on the host application which would only add a device after detecting a new Device Announce.  The assumption is that "ZNP sample" refers to the ZIGBEE-LINUX-SENSOR-TO-CLOUD solution.

    Regards,
    Ryan

  • My meaning is Transport-NWK-Key. Coordinator will send NWK-Key to every joining device, include ZHA 1.2 Device.

  • Thanks for clarifying.  The host application layer is not notified when Z-Stack ZNP sends the NWK key to joining devices.  You could modify the ZNP firmware accordingly for a custom message to be interpreted by the host application.

    Regards,
    Ryan

  • Though coordinator has sent Network Key to joiner, but once joiner has never received Network Key, or ZB3.0 device exchange APS key failed, device joining will be failed. So it is better that when the coordinator's application send Network Key to joiner, wait for 3~5 second, then read its information by "Active-EP-Req", "Simple-Description-Req". If coordinator's application get the joiner's Active-Endpoint and Simple-Description success, it can be consider that the device joining success