Other Parts Discussed in Thread: Z-STACK
A customer is testing the Zstackapi_pauseResumeDeviceReq api in order to pause and resume an end device. They are able to use this api to put the device into pause, and if Zstackapi_pauseResumeDeviceReq is called right after the device is paused, the device will rejoin the network smoothly. However, if the device was left in pause for more that about 12-13 minutes, then after Zstackapi_pauseResumeDeviceReq is called the end device will take more that 18 minutes to rejoin.
According the sniffer log in attachment, when the issue happens the end device can send the Beacon Request, and the coordinator responds with a Beacon: NwkClosed. But after that the end device won't send the Rejoin Request immediately, and the device status stays in "Discovering" from the UART UI. Then after about 18 minutes, the end device finally sends out the Rejoin request and is able to rejoin successfully.
Normal pause and resume:
When the issue happend:
I am trying to debug this but have limited understanding about how the Zstackapi_pauseResumeDeviceReq works. Please help on where to start to debug this issue. The issue can be reproduced with the zc_light and zed_sw examples from SDK 5.30, with some modification to enable calling the api with buttons on the LaunchPad:
static void zclSampleSw_processKey(uint8_t key, Button_EventMask buttonEvents)
{
if (buttonEvents & Button_EV_CLICKED)
{
if(key == CONFIG_BTN_LEFT)
{
// Use left button for pause
zstack_pauseResumeDeviceReq_t zstack_pauseResumeDeviceReq = { 0 };
zstack_pauseResumeDeviceReq.pause = true;
Zstackapi_pauseResumeDeviceReq(appServiceTaskId, &zstack_pauseResumeDeviceReq);
}
if(key == CONFIG_BTN_RIGHT)
{
// Right button for resume
zstack_pauseResumeDeviceReq_t zstack_pauseResumeDeviceReq = { 0 };
zstack_pauseResumeDeviceReq.pause = false;
Zstackapi_pauseResumeDeviceReq(appServiceTaskId, &zstack_pauseResumeDeviceReq);
}
}
}
Thanks.
Best regards,
Shuyang