Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

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: Is there a callback for ZED sending the keep-alive timeout message?

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

I am using the timeout message for keep-alive, while looking into the implementation of the timeout message, it seems that the sending of the timeout message is implemented inside the Z-Stack, I cannot find where the ZED sends the periodic timeout message.

I have 2 questions about the timeout message:

1. Is my understanding right about the implementation of timeout message? Can I see where the ZED sends the periodic timeout message?

2. If no, is there a callback for the timeout message so I can know when the periodic timeout is sent?

Thanks.

Best regards,

Shuyang

  • keep-alive timeout message is unnecessary to be sent usually, it was sent when ZED join or rejoin into new parent.

    You can procceess Parent-lost message in your ZED's APP

  • 1. Basically, any message including polling and ZDO/ZCL messages would toggle timeout count in Z-Stack

    2. There is no such callback

  • Hi Shuyang,

    It is not possible to monitor or manually send MAC data poll from the release Z-Stack software, as YK mentioned you could send ZDO/ZCL messages or use the poll control cluster like modeled in this SimpleLink Academy Lab.

    Regards,
    Ryan

  • Hi Ryan,

      

    I am using the End Device Timeout Request instead of MAC poll by setting zgNwkParentInformation = NWK_PARENT_INFO_END_DEVICE_TIMEOUT_MSG, the end device sends the timeout request as expected according to the sniffer log, I'm just curious about where the periodic timeout request is sent, and where I can add my own code to cope with the unexpected failure.

      

    If the timeout request is also not possible to manually operate, what callback should be use to monitor the leave of the end device?

      

    BR,

    Shuyang

  • End Device Timeout Request is used for requesting parent node to revise timeout period according to the request.

  • Hi Shuyang,

    Please review the Z-Stack User's Guide -> Z-Stack Overview Child Management section.

    The timeout that the child device will indicate to its parent device is defined by END_DEV_TIMEOUT_VALUE (see RF STACKS → Z-Stack → Network → End Device Timeout (see Zigbee Configuration). Its suggested value should be at least 3 times greater than the MAC polling time (set by POLL_RATE in ti_zstack_config.h) to avoid being expired if there is interference when the end device is polling. The minimum allowable application poll rate is determined by MINIMUM_APP_POLL_RATE in ti_zstack_config.h but polling can be disabled by calling Zstackapi_sysConfigWriteReq with has_disablePollRate and disablePollRate both set to TRUE.

    Regards,
    Ryan

  • Hi Ryan,

    Maybe I didn't make myself clear about what I'm doing. In Z-Stack Overview Child Management section it says:

    There are two keep-alive methods, MAC polling NWK_PARENT_INFO_MAC_DATA_POLL and timeout message NWK_PARENT_INFO_END_DEVICE_TIMEOUT_MSG. An end device timeout message is preferred for Zigbee 3.0 devices where power consumption is important as it does not require the end device to constantly send data request frames other than needed by polling data from parent. 

    I'm using NWK_PARENT_INFO_END_DEVICE_TIMEOUT_MSG for keep-alive messages by making modifications as below in zc_light and zed_sw examples:

    1. Set zgNwkParentInformation = NWK_PARENT_INFO_END_DEVICE_TIMEOUT_MSG in zglobals.c in both projects.

    2. Set Poll Period to 3600000ms in zed_sw.syscfg.

    3. Set End Device Timeout to 1 (2 minutes) in zed_sw.syscfg.

    With these settings, I can see ZED sending End Device Timeout Request every 40 seconds, which is what I expected.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/158/1.cubx

    If I'm doing wrong, please let me know.

    My question is: where is the code for sending these End Device Timeout Request periodicly? If it is inside the Z-Stack lib, is there a callback for the End Device Timeout Request or receiving of the End Device Timeout Response I can use?

    BR,

    Shuyang

  • Thank you for clarifying Shuyang, both NLME_SendEndDevTimeoutReq and NLME_ProcessEndDevTimeoutRsp are handled inside the Z-Stack source libraries but you could monitor eventId NWK_ZED_KEEP_ALIVE_EVT inside OsalPortTimers_startReloadTimer.

    Regards,
    Ryan

  • Thanks Ryan, it works.

    BR,

    Shuyang