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.

ZDP_MgmtLeaveReq for remove End Device

Other Parts Discussed in Thread: Z-STACK

I have 2 questions

1)I want to request ZED to leave from the network.

case Device_annce:
  {
                  uint8 ret;
                  ZDO_DeviceAnnce_t devAnnce;
                  ZDO_ParseDeviceAnnce(inMsg, &devAnnce);

                    if( /********some calculation*******************/)

                   else

                       leave_nwk(devAnnce.extAddr, devAnnce.nwkAddr);

 }

 void leave_nwk(uint8 *mac, uint16 shrt)
{
  zAddrType_t dstAddr;
 
  dstAddr.addrMode = afAddr16Bit;
  dstAddr.addr.shortAddr = 0x0000;
  HalLcdWriteString ("Send leave req", HAL_LCD_LINE_3);
  ZDP_MgmtLeaveReq(&dstAddr, mac, true, false, false);
}

After this the End device is still in the network.

2)In what format does  devAnnce.extAddr will give mac address, is it in hex?