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.
Hi all :
there are 4 ZEDs ,1 ZR and 1 ZC in the network.
those ZEDs were all connect to the ZR , and the ZR connect the ZC。
i set a timer to sending the Active EP request from ZR to ZC again and again to checking the link state.
if(events & NETLINK_CHECK_EVT) { if(Being_Link == FALSE) { #ifdef LEDShow HalLedSet ( HAL_LED_2, HAL_LED_MODE_OFF); if(!BasicReset) HalLedBlink ( HAL_LED_1, 0,LOST_NETWROK_FLASH, LOST_NETWROK_CYCLE ); #endif } else { #ifdef LEDShow HalLedSet ( HAL_LED_1 | HAL_LED_2, HAL_LED_MODE_OFF); #endif } if(FailedLinkCnt >= LoseLinkCnt_Limit) { Being_Link = FALSE; FailedLinkCnt =0; } else { FailedLinkCnt++; } ZDP_ActiveEPReq(&Coordinator_dstAddr,Coordinator_dstAddr.addr.shortAddr,0); osal_start_timerEx( zclVrouter_TaskID, NETLINK_CHECK_EVT, NETLINK_CHECK_CYCLE);//8second return ( events ^ NETLINK_CHECK_EVT ); }
this network running 30~40 minutes latter, i found that all ZEDs and ZR were “lose connect” with ZC.
Those ZED sent a Msg to ZC via ZR , but ZR receive it and didn't resend to ZC.
and there is not any ACtive EP request more....
here is the log :ZR lose connect with ZC.rar
it (AF_DataRequest)returns 0x10
#define afStatus_SUCCESS ZSuccess /* 0x00 */
#define afStatus_FAILED ZFailure /* 0x01 */
#define afStatus_INVALID_PARAMETER ZInvalidParameter /* 0x02 */
#define afStatus_MEM_FAIL ZMemError /* 0x10 */
#define afStatus_NO_ROUTE ZNwkNoRoute /* 0xCD */
i think that is i forgot to free the memory when receive active ep response !!!!
#ifdef NetLinkCheck
case Active_EP_rsp:
{
pActiveEndpoint = ZDO_ParseEPListRsp( pMsg );
if(pActiveEndpoint->status == ZSuccess)
{
FailedLinkCnt =0;
if(Being_Link == FALSE)
{
Being_Link = TRUE;
#ifdef LEDShow
HalLedBlink ( HAL_LED_1 | HAL_LED_2, 5, CANCEL_EZMODE_FLASH, CANCEL_EZMODE_CYCLE );
UserEvtItem = Turn_Off_LED;
osal_start_timerEx( zclVrouter_TaskID, USERAPP_EVT, 1000 );
#endif
}
}
osal_mem_free( pActiveEndpoint );
}
break;
#endif
maybe add this code should be work!!!!!
BR!