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.

CC2630: Cannot send report to gateway

Part Number: CC2630


Hello,

We are trying to send report from the SampleSwitch to the gateway.

We can send on_off report (Cluster ID 6) and we can see the messages on the HA gateway, however, if we chose a different Cluster ID other than 6, the report does not get sent.

The status of zcl_SendReportCmd is 0 (SUCCESS) but we do not see any messages in the air.

Do you have any effective example of how to do reporting?

  • I suggest you to use Ubiqua Protocol Analyzer to check if message is sent out over the air.
  • Hello,

    We are using Ubiqua to see that there is no report going on air, and we use IAR to see that the return status of the Send report function is 0x00

  • Can you show me how you use zcl_SendReportCmd in your application?
  • Hello,

    Here is the code to send the occupancy report that does not work. We do not see the report in Ubiqua:

    static zstack_AFAddr_t zswDstAddr;
    
    zswDstAddr.addrMode = zstack_AFAddrMode_NONE;
    zswDstAddr.addr.shortAddr = 0;
    zswDstAddr.endpoint = 0;
    zswDstAddr.panID = 0;
    
    afAddrType_t dstAddr;
    
    dstAddr.addrMode = (afAddrMode_t)zswDstAddr.addrMode;
    dstAddr.addr.shortAddr = zswDstAddr.addr.shortAddr;
    dstAddr.endPoint = zswDstAddr.endpoint;
    dstAddr.panId = zswDstAddr.panID;
    
    zclReportCmd_t *pReportCmd;
    pReportCmd = ICall_malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );
    if(pReportCmd != NULL)
    {
        pReportCmd->numAttr = 1;
        pReportCmd->attrList[0].attrID = ATTRID_MS_OCCUPANCY_SENSING_CONFIG_OCCUPANCY;
        pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8;
        pReportCmd->attrList[0].attrData = (void *)(&zoc_Occupied);
        zcl_SendReportCmd(SWITCH_EP, &dstAddr,
          ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,
          pReportCmd,
          ZCL_FRAME_SERVER_CLIENT_DIR,
          false,
          1);
    }

    We have breakpoint in the return status of zcl_SendReportCmd and the status is 0x00. We do not see the message in Ubiqua.

    If we change ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING to ZCL_CLUSTER_ID_GEN_ON_OFF, we can see the report in Ubiqua and also on the gateway (although the values are off because the ON_OFF cluster does not have this attribute). Do you know what could prevent the packet from being sent?

  • You should use zstack_AFAddrMode_SHORT as destination address mode instead of zstack_AFAddrMode_NONE and also set correct destination endpoint instead of 0.
  • Hello,

    We have done this:

        dstAddr.addrMode = (afAddrMode_t)zstack_AFAddrMode_SHORT;
        dstAddr.addr.shortAddr = 0x0000;
        dstAddr.endPoint = 0x08;
        dstAddr.panId = 0x185F;
        
        zclReportCmd_t *pReportCmd;
    
        pReportCmd = ICall_malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );
    
        if(pReportCmd != NULL)
        {
          pReportCmd->numAttr = 1;
          pReportCmd->attrList[0].attrID = ATTRID_MS_OCCUPANCY_SENSING_CONFIG_OCCUPANCY;
          pReportCmd->attrList[0].dataType = ZCL_DATATYPE_UINT8;
          pReportCmd->attrList[0].attrData = (void *)(&zoccOccupied);
          zcl_SendReportCmd(SWITCH_EP, &dstAddr,
            ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,
            pReportCmd,
            ZCL_FRAME_SERVER_CLIENT_DIR,
            false,
            1);
    

    And now we can see the reports in Ubiqua and also in the gateway. However, we need to specify exactly the destination address but we need to send the endpoint we are bound to.

    How can we send the report to the endpoint we are bound?

    Thank you.

  • What do you mean "How can we send the report to the endpoint we are bound?" Do you mean that you already do binding to your occupation sensor and want to use binding address in. Binding table to send report?
  • Yes.

    We connect the occupancy sensor, then we bind it with another endpoint (using the gateway).

    We want to send the report to the devices in the binding table.

  • If you use binding, it's correct to use zstack_AFAddrMode_NONE as address mode. Do you use sniffer to make sure binding successfully?
  • Yes. The bind is successful.

    We can see the binding in Ubiqua, we can see the On Off commands and we can send reports with zstack_AFAddrMode_NONE if we use ZCL_CLUSTER_ID_GEN_ON_OFF

    However, if we change the 3rd parameter in call to zcl_SendReportCmd to ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, the function return success (0x00) but nothing gets sent (Ubiqua does not see anything).

  • If you change cluster ID, you have to do binding to this cluster ID again.
  • We now see that the linux home automation gateway application binds the ON_OFF_CLUSTERID

    We changed to our clusters (Occupancy, electrical measurement, etc) and it works.

    Is there any way to have the bind request use all clusters?

    Thank you.

  • No, you have to do binding one by one.