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.

CC2530: ZStack 2.51 a version

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

Issue:

The coordinator actively deletes the information of the terminal or routing node that has been brought into the network, and the function returns true, and returns false again after 1 second. After a second or two, the coordinator is automatically reset, and all nodes are out-of-net, but do not remove a single terminal or route.

The customer would like to know if there are other ways to do this function.

Below are two options that the customer has tried before:

Option 1 Option 2
Processing The coordinator addresses the mac address based on the 16-bit short address and then calls ZDP_MgmtLeaveReq() to delete the node information. The coordinator addresses the mac address based on the 16-bit short address and then calls AssocRemove() to delete the node information.
Result

After the node is successfully netted, the coordinator receives the Delete Node action message and performs the following functions. The first ret returns true (1), the second ret returns false (0), and after one or two seconds the coordinator automatically restarts. The nodes that were previously connected to the network are also off the net.

zAddrType_t addr_delet;
uint8 IEEEbuf[8]={0};
uint8 ret[1];
addr_delet.addrMode = Addr16Bit;
addr_delet.addr.shortAddr =shortaddr;
AddrMgrExtAddrLookup(addr_delet.addr.shortAddr, IEEEbuf );
if(ZDP_MgmtLeaveReq((zAddrType_t *)&addr_delet,IEEEbuf ,FALSE,FALSE,FALSE)== ZSuccess){
HalUARTWrite(0,ret,1);//Prints the Remove Terminal Success flag
}else{
HalUARTWrite(0,ret,1);//Prints the Remove Terminal Success flag
}

Same as the Option 1. The functions are as follows:

NLME_LeaveReq_t req;
req.extAddr = IEEEbuf;
req.removeChildren = FALSE;
req.rejoin = FALSE;
req.silent = FALSE;
ret[0]=NLME_LeaveReq(&req); //Clear the stale device related entries with the leave command
ret[0]=AssocRemove(IEEEbuf);//This function call takes effect, the previous line does not


return ret[0];

 

Best Regards,

Cherry Zhou

  • ZDP_MgmtLeaveReq won’t cause coordinator to reset. You should check your application code to see where it causes reset.

  • Hello Cherry,

    The description you've provided thus far does not yet provide me with a good idea as to the issue at hand.  Is it that devices are not properly removed from the network, the coordinator restarting, or something else?  As always, please have the customer provide a sniffer log if possible.  Also note that Leave Requests will not delete local device information, this occurs when an actual Leave packet is received.  I'm not sure whether it is available in Z-Stack 2.51, but ZDApp_LeaveUpdate shows what APIs must be executed to fully remove a device from the network.

    Regards,
    Ryan