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.

CC2650EM-5XD-RD: Zstackapi_ZdoMgmtLeaveReq()

Guru 14820 points
Part Number: CC2650EM-5XD-RD


Hello,

i m trying to use this api -Zstackapi_ZdoMgmtLeaveReq

but i need to pass address to zstack_zdoMgmtLeaveReq_t   

i don't know how to get device address and how to pass that address to this structure?

  • There’s related APIs to get device short and IEEE address in nlme.h
  • i figured out the solution as below to perform ZdoMgmtLeaveReq

    zstack_sysNwkInfoReadRsp_t pRsp;
    Zstackapi_sysNwkInfoReadReq(zswEntity,&pRsp);

    zstack_zdoMgmtLeaveReq_t pReq;

    pReq.nwkAddr = pRsp.nwkAddr;
    pReq.options.rejoin = 0;
    pReq.options.removeChildren = 0;
    pReq.deviceAddress[0]=pRsp.ieeeAddr[0];
    pReq.deviceAddress[1]=pRsp.ieeeAddr[1];
    pReq.deviceAddress[2]=pRsp.ieeeAddr[2];
    pReq.deviceAddress[3]=pRsp.ieeeAddr[3];
    pReq.deviceAddress[4]=pRsp.ieeeAddr[4];
    pReq.deviceAddress[5]=pRsp.ieeeAddr[5];
    pReq.deviceAddress[6]=pRsp.ieeeAddr[6];
    pReq.deviceAddress[7]=pRsp.ieeeAddr[7];

    Zstackapi_ZdoMgmtLeaveReq(zswEntity, &pReq);