Hello Everyone,
I am having a major issue with ZStack HA. Here when I remove device(Router) from Linux HA Gateway, it(Router) sometimes gets automatically added to the network without Permit Join.
For the Router to Leave with Rejoin I have done following changes in the ZDApp_LeaveReset Function. Can anyone check the following function.
void ZDApp_LeaveReset( uint8 ra )
{
NLME_LeaveReq_t leaveReq;
// Set every field to 0
osal_memset( &leaveReq, 0, sizeof( NLME_LeaveReq_t ) );
// This will enable the device to rejoin the network after reset.
leaveReq.rejoin = TRUE;
// Set the NV startup option to force a "new" join.
zgWriteStartupOptions( ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE );
/*
// Leave the network, and reset afterwards
if ( NLME_LeaveReq( &leaveReq ) != ZSuccess )
{
// Couldn't send out leave; prepare to reset anyway
ZDApp_LeaveReset( FALSE );
}
*/
//ZDApp_LeaveCtrlSet( ra );
SystemReset();
//ZDApp_ResetTimerStart( LEAVE_RESET_DELAY );
}