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.

CC2652R: CC2652R ZCL with unicast.

Part Number: CC2652R


SDK version: C:\TI\simplelink_zigbee_sdk_plugin_1_60_00_14

I will test CC2652R ZCL with unicast. But  I find no response and light don't toggle. The attached files include my code and sniffer files.

ZC: light  ZED:switchhttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/158/Desktop.7z

  • The problem is your destination endpoint. The destination endpoint in your sniffer log is 0x0. You should set destination endpoint as SampleLight's active endpoint.
  • my light is coordinate, so my switch destination address is 0x0.
  • I see you send toggle command from sw to light but he destination endpioint is 0x0. There is no problem on destination short address.

  • I need use ZDP_ActiveEPIFReq () ?
  • Yes. Unless you want to hard code active endpoint.
  • I reedit my code, but no work.  ZC: SWITH ZED:LIGHT.

  • Can you specify where you assign destination short address and endpoint in your code?
  • ZC SWITCH:

    static void SetupZStackCallbacks(void)
    {
    zstack_devZDOCBReq_t zdoCBReq = {0};

    // Register for Callbacks, turn on:
    // Device State Change,
    // ZDO Match Descriptor Response,


    zdoCBReq.has_devStateChange = true;
    zdoCBReq.devStateChange = true;

    zdoCBReq.has_activeEndpointRsp= true;
    zdoCBReq.has_deviceAnnounce=true;

    zdoCBReq.deviceAnnounce=true;
    zdoCBReq.activeEndpointRsp= true;

    (void)Zstackapi_DevZDOCBReq(zclSampleSw_Entity, &zdoCBReq);
    }


    get destination address and ZDP_ActiveEPReq() :
    case zstackmsg_CmdIDs_ZDO_DEVICE_ANNOUNCE:
    {


    zstackmsg_zdoDeviceAnnounceInd_t*pInd;
    pInd=(zstackmsg_zdoDeviceAnnounceInd_t*)pMsg;
    zclSampleSw_DstAddr.addr.shortAddr = pInd->req.devAddr;

    zAddrType_t myaddr;
    myaddr.addr.shortAddr=zclSampleSw_DstAddr.addr.shortAddr;
    myaddr.addrMode=Addr16Bit;
    ZDP_ActiveEPReq(&myaddr,zclSampleSw_DstAddr.addr.shortAddr,0);
    }


    get endpoint :
    case zstackmsg_CmdIDs_ZDO_ACTIVE_EP_RSP:
    {


    zstackmsg_zdoActiveEndpointsRspInd_t *pInd;
    pInd=(zstackmsg_zdoActiveEndpointsRspInd_t*)pMsg;
    zclSampleSw_DstAddr.endPoint =pInd->rsp.pActiveEPList[0];
    }

    ZED LIGHT:

    static void SetupZStackCallbacks(void)
    {
    zstack_devZDOCBReq_t zdoCBReq = {0};

    // Register for Callbacks, turn on:
    // Device State Change,
    // ZDO Match Descriptor Response,
    zdoCBReq.has_devStateChange = true;
    zdoCBReq.devStateChange = true;
    zdoCBReq.has_activeEndpointRsp= true;
    zdoCBReq.activeEndpointRsp= true;
    (void)Zstackapi_DevZDOCBReq(zclSampleLight_Entity, &zdoCBReq);
    }



    ZDP_ActiveEPReq :

    zAddrType_t myaddr;

    myaddr.addr.shortAddr=0x0000;
    myaddr.addrMode=Addr16Bit;
    ZDP_ActiveEPReq(&myaddr,0x0000,0);

    get endpoint :
    case zstackmsg_CmdIDs_ZDO_ACTIVE_EP_RSP:
    {
    zstackmsg_zdoActiveEndpointsRspInd_t *pInd;
    pInd=(zstackmsg_zdoActiveEndpointsRspInd_t*)pMsg;
    zclSampleLight_DstAddr.endPoint =pInd->rsp.pActiveEPList[0];;
    }

  • Do you check what is inside zclSampleLight_DstAddr.endPoint and zclSampleSw_DstAddr.endPoint after you run the code? And where do you send toggle command from sw to light with Addr16Bit mode?
  • Thanks YK. Now,i t's work well.
  • Cheers!