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.

LAUNCHXL-CC1352R1: Z2M does not receive any reports

Part Number: LAUNCHXL-CC1352R1

Tool/software:

Hello, 

I'm currently using LAUNCHXL-CC1352R1 as an end device (zed_light) and Sonoff Zigbee Dongle-P as my coordinator flashed with CC1352P2_CC2652P_launchpad_coordinator_20240710. I am using Z2M and I am having trouble receiving reports from the launchpad. The closest I've come is with this thread where I binded the clusters (genBasic, LevelCtrl, OnOff, Identify) of the launchpad from Z2M's options. But I only manage to receive one report from the light level during the boot up and it never updates. What should I do? Thanks!

  • Hello Jan,

    The zed_light project does not have BDB reporting enabled by default.  Please follow Task 2 of the Zigbee Fundamentals SLA and reference the default zed_temperaturesensor example to enable this functionality.

    Regards,
    Ryan

  • Is there any difference between the default zed_light project and the task 2 of the zigbee fundamentals SLA? I did not see any difference and didn't need to configure anything. As for the zed_temperaturesensor example, what exactly should I be doing? Is it correct to change anything to the bind and reporting setting in the Z2M (shown below)?

  • Hi Jan,

    Thank you for your patience and I apologize for the confusion.  I provided two examples of the F&B process, however this will not work if the Z2M does not identify as a switch client.  Thus you will need to create a manual bind using Zstackapi_ZdoBindReq.  I had meant to point you towards Task 1 of the SLA for manual binding.  You will need to call this API once you know you have joined to the Z2M coordinator, either through a device announce as shown in the SLA or through a zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND to zstack_DevState_DEV_END_DEVICE and assistance from Zstackapi_sysNwkInfoReadReq.  Here are two other relevant E2E threads.

    Regards,
    Ryan

  • You will need to call this API once you know you have joined to the Z2M coordinator, either through a device announce as shown in the SLA or through a zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND to zstack_DevState_DEV_END_DEVICE and assistance from Zstackapi_sysNwkInfoReadReq.

    Apologies because I'm just a beginner in ZigBee and TI launchpads. But, how exactly should I do this? How do I call the API and what's the "device announce as shown in the SLA"? I see "device announce" logs in the Z2M, is it different from that? i have already done the Task 1 of the SLA but does not know where to go from there. Bare with me on this one please. Thanks.

  • Your light project is a joiner device (ZED) and needs to create the bind locally.  Therefore you are correct that the light project will broadcast device announce messages and not receive them.  Thus you should be taking action after becoming a ZED joined to a network, so I recommend:

    1. Checking if zstackmsg_devStateChangeInd_t -> zstack_devStateChangeInd_t -> zstack_DevState is zstack_DevState_DEV_END_DEVICE inside of the zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND case.
    2. Reading network information with Zstackapi_sysNwkInfoReadReq.
    3. Create the manual bind with Zstackapi_ZdoBindReq where
      1. Destination address is the local device
      2. Source address is the Z2M device
      3. IEEE (i.e. long) addresses are used

            case zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND:
            {
    #if !defined(CUI_DISABLE) || defined(USE_DMM) && defined(BLE_START)
                // The ZStack Thread is indicating a State change
                zstackmsg_devStateChangeInd_t *pInd =
                    (zstackmsg_devStateChangeInd_t *)pMsg;
    #endif // !defined(CUI_DISABLE) || defined(USE_DMM) && defined(BLE_START)
    
    #ifndef CUI_DISABLE
                UI_DeviceStateUpdated(&(pInd->req));
    #endif
                if(pInd->req.state == zstack_DevState_DEV_END_DEVICE)
                {
                    zstack_sysNwkInfoReadRsp_t pRsp;
                    Zstackapi_sysNwkInfoReadReq(appServiceTaskId, &pRsp);
                    
                    zstack_zdoBindReq_t pReq;
                    pReq.nwkAddr = pRsp.nwkAddr;
                    pReq.bindInfo.clusterID = ZCL_CLUSTER_ID_GENERAL_ON_OFF;
                    pReq.bindInfo.srcEndpoint = SAMPLELIGHT_ENDPOINT;
                    pReq.bindInfo.dstAddr.addrMode = (zstack_AFAddrMode)Addr64Bit;
                    pReq.bindInfo.dstAddr.endpoint = Z2M_ENDPOINT; // DEFINED AND KNOWN FROM Z2M
                    OsalPort_memcpy(pReq.bindInfo.dstAddr.addr.extAddr, &(pRsp.parentExtAddr), Z_EXTADDR_LEN);  //ASSUMES Z2M IS THE PARENT
                    OsalPort_memcpy(pReq.bindInfo.srcAddr, &(pRsp.ieeeAddr), Z_EXTADDR_LEN);
    
                    Zstackapi_ZdoBindReq(appServiceTaskId, &pReq);
                }

    This is untested pseudo-code which makes assumptions and should be thoroughly tested against your environment.  If the Z2M destination endpoint is unknown, or if the Z2M ZNP is not guaranteed to be the parent (assumed destination address bind address in the example), then further Zigbee messages will need to be transferred over-the-air to query the Z2M ZNP and obtain the correct bind information.

    Regards,
    Ryan

  • I followed the following code but it seems like the Z2M can't get the active endpoint of the ZED.

    Because of this, it seems like I can't do anything binding now. PuTTY also freezes and when I reset it, it "fixes" things where that error won't appear again when interviewed again. 

  • Since I don't have your code, I don't know what is causing the device to free.  You should be able to read the Zstackapi_ZdoBindReq return status to determine whether it was successful, as it should be done locally.  You could also try to have the Zigbee2MQTT ZNP send a bind request to the remote device.  Please ask the Zigbee2MQTT discussions, or may be active and able to give you further advice.

    Regards,
    Ryan

  • How do I check the Zstackapi_ZdoBindReq return status? 

  • zstack_ZStatusValues statusValues; 
    
    //...
    
    statusValues = Zstackapi_ZdoBindReq;

    Return values are listed in zstack.h

    Regards,
    Ryan