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.

CC1352R: Receiving broadcast custom data trough Zigbee

Part Number: CC1352R
Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK

Hi!

I am trying to make the Zigbee fundamental project to work. The problem is that after commisioning, and sending the message by the press of btn2 (confirmed by the sniffer), there is no packet received with clusterId == 0xf00d in the zclSampleSw_processAfIncomingMsgInd in the second board. What I am doing wrong?
I attach the coordinator and router projects along with ubiqua capture.

Sending code (the only modification of the zc_light project):

  zstack_LongAddr_t bindAddr;
  uint16_t shortAddr = 0;
  uint8_t EP = 0;
  uint8_t transID = 0;
  uint8_t theMessageData[]={"\0\0\30Hello World"};

static void zclSampleLight_processKey(uint8_t key, Button_EventMask buttonEvents)
{
    if (buttonEvents & Button_EV_CLICKED)
    {
        if(key == CONFIG_BTN_LEFT)
        {
            zstack_bdbStartCommissioningReq_t zstack_bdbStartCommissioningReq;

            zstack_bdbStartCommissioningReq.commissioning_mode = zclSampleLight_BdbCommissioningModes;
            Zstackapi_bdbStartCommissioningReq(appServiceTaskId, &zstack_bdbStartCommissioningReq);
        }
        if(key == CONFIG_BTN_RIGHT)
        {
            zstack_getZCLFrameCounterRsp_t pRsp;
            Zstackapi_getZCLFrameCounterReq(appServiceTaskId, &pRsp);

            theMessageData[1] = transID++;

            zstack_afDataReq_t pReq;
            pReq.dstAddr.addrMode = zstack_AFAddrMode_BROADCAST;
            pReq.dstAddr.addr.shortAddr = 0xFFFF;
            pReq.dstAddr.endpoint = EP;
            pReq.pRelayList = NULL;
            pReq.n_relayList = 0;
            pReq.srcEndpoint = SAMPLELIGHT_ENDPOINT;
            pReq.clusterID = 0xF00D;
            pReq.transID = &(pRsp.zclFrameCounter);
            pReq.options.ackRequest = FALSE;
            pReq.options.apsSecurity = TRUE;
            pReq.options.limitConcentrator = FALSE;
            pReq.options.skipRouting = FALSE;
            pReq.options.suppressRouteDisc = FALSE;
            pReq.options.wildcardProfileID = FALSE;
            pReq.radius = AF_DEFAULT_RADIUS;
            pReq.n_payload = sizeof(theMessageData);
            pReq.pPayload = theMessageData;

            Zstackapi_AfDataReq(appServiceTaskId, &pReq);

        }
    }
}

For receiving I use the zr_sw project without any modification.



Thank you!capture_not receiving.zip

  • Hi Cosmin,

    Here is a link to the SimpleLink Academy Lab referenced.  What version of SIMPLELINK-CC13X2-26X2-SDK are you using?  Have you tried following the SLA exactly as written?  You will note that there are several differences between the SLA's Zstackapi_AfDataqReq packet and your own.  The first issue I notice is that the Destination Endpoint (configured by pReq.dstAddr.endpoint = EP;) is set to zero (ZDO endpoint) instead of the application endpoint.  Your application does not seem to send out the Zstackapi_ZdoSimpleDescReq, from which the zstackmsg_CmdIDs_ZDO_SIMPLE_DESC_RSP is necessary to populate the EP value.  Please start by following the SLA as designed and debug your application as necessary.

    Regards,
    Ryan