Hi Friends,
I have removed the end device from coordinator using ZDP_MgmtleaveReq.
After end device removed from coordinator,
Do the end device execution starts from main?
Regards,
Keerthi G.
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 Chen,
I have followed the cetri solution.
Now the end device don't get reset.
But it joins again and again same coordinator.
I assumed it because The state is rejoin and extended PANID read from nwk base.(So it is joined to same coordinator)
I have modified little in code. i don't know whether it is correct or not. but it works.
Please tell me, Is the modification correct or not? Do I follow this one?
void ZDApp_LeaveReset( uint8 ra )
{
ZDApp_LeaveCtrlSet( ra );
+ APSME_HoldDataRequests( LEAVE_RESET_DELAY);
+ if ( ZSTACK_ROUTER_BUILD )
+ {
+ osal_stop_timerEx( NWK_TaskID, NWK_LINK_STATUS_EVT );
+ osal_clear_event( NWK_TaskID, NWK_LINK_STATUS_EVT );
+ }
+
+ if ( ra == TRUE )
+ {
+ devState = DEV_NWK_DISC;
+ devStartMode = MODE_REJOIN; ( I have changed this to MODE_JOIN)
+ _tmpRejoinState = true;
+
+ if (ZG_DEVICE_ENDDEVICE_TYPE)
+ {
+ zgPollRate = POLL_RATE;
+ ZDApp_SavedPollRate = zgPollRate;
+ NLME_SetPollRate(0);
+ }
+
+ // For rejoin, specify the extended PANID to look for
+ osal_cpyExtAddr( ZDO_UseExtendedPANID, _NIB.extendedPANID ); // Comment out this. I don't include this in code.
+
+ _NIB.nwkState = NWK_DISC;
+
+ zdoDiscCounter = 3;
+ NLME_NwkDiscTerm();
+
+ ZDApp_NetworkInit((uint16)(NWK_START_DELAY + ((uint16) (osal_rand() & EXTENDED_JOINING_RANDOM_MASK ))));
+ }
+ else
+ {
ZDApp_ResetTimerStart( LEAVE_RESET_DELAY );
+ }
}
One more doubt.
what is the difference between JOIN and REJOIN in zstack?
Regards,
Keerthi G.