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-CC26X2R1: Device not sending automatic reports

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

I'm new to zigbee. I have a TI device imitating a light. I'm attempting to run a GW_SET_ATTRIBUTE_REPORTING_REQ command to cause it to send regular attribute reports to the gateway. 

The command seems to work as I immediately get a status_success response, but there are no reports coming in. 

Also, I can send in a command to return a single attribute report for the light and it returns a correct result, so I know that the parameters are correct. 

Can you tell me what I'm doing wrong? Many thanks.

Here's my code:

public int hagwSetAttributeReportReq(final long devIeee, final int ep, final short attrReqClusterId,
final short attrReqAttrId, final int attrType, final int minInterval,
final int maxInterval, HagatewayZclCallback zclCallback ) {
final GwSetAttributeReportingReq.Builder gwSetAttrReportingReq = GwSetAttributeReportingReq.newBuilder();

gwSetAttrReportingReq.clear();
gwSetAttrReportingReq.setCmdId(gwCmdId_t.GW_SET_ATTRIBUTE_REPORTING_REQ);
gwSetAttrReportingReq.setClusterId(attrReqClusterId);

//set dst addr
gwSetAttrReportingReq.getDstAddressBuilder().setAddressType(gwAddressType_t.UNICAST);
gwSetAttrReportingReq.getDstAddressBuilder().setIeeeAddr(devIeee);
gwSetAttrReportingReq.getDstAddressBuilder().setEndpointId(ep);

gwAttributeReport_t.Builder attr = gwAttributeReport_t.newBuilder();
attr.setAttributeId(attrReqAttrId);
attr.setAttributeType(gwZclAttributeDataTypes_t.forNumber(attrType));
attr.setMinReportInterval(minInterval);
attr.setMaxReportInterval(maxInterval);
attr.addReportableChange(0);
attr.setReportableChange(0,0);
gwSetAttrReportingReq.addAttributeReportList(attr);



List<String> err = gwSetAttrReportingReq.findInitializationErrors();
if (!err.isEmpty()) {
System.out.println("hagwWriteAttrReq error - " + err.toString());
return -1;
}

final byte pkt[] = new byte[gwSetAttrReportingReq.build().getSerializedSize()
+ PKT_HEADER_SIZE];

pkt[PKT_HEADER_LEN_FIELD] = (byte) (gwSetAttrReportingReq.build()
.getSerializedSize() & 0xFF);
pkt[PKT_HEADER_LEN_FIELD + 1] = (byte) ((gwSetAttrReportingReq.build()
.getSerializedSize() & 0xFF00) << 8);
pkt[PKT_HEADER_SUBSYS_FIELD] = zStackGwSysId_t.RPC_SYS_PB_GW_VALUE;
pkt[PKT_HEADER_CMDID_FIELD] = gwCmdId_t.GW_SET_ATTRIBUTE_REPORTING_REQ_VALUE;

for (int pktIdx = 0; pktIdx < gwSetAttrReportingReq.build().toByteArray().length; pktIdx++) {
pkt[PKT_HEADER_DATA_FIELD + pktIdx] = gwSetAttrReportingReq.build()
.toByteArray()[pktIdx];
}

sendMessage(pkt);



}
  • Hi Michael,

    Are any reports being sent over-the-air as confirmed by a sniffer log?  You will need to add the attribute report processing inside your gateway application.  For example, add the following case to ‘hagateway:gw:report’, function(data) of nodejs_zb_gateway/zb_gateway/zb-gateway.js:

          case ZBL.HA_CLUSTER_ID.ON_OFF:
            if((data.attributeRecordList[0].attributeId === ZBL.ON_OFF_CLUSTER.OnOff)) {
              var on = parseInt((data.attributeRecordList[0].attributeValue).toString('hex'), 16);
              console.log("Zb-Gateway: The light is: ", on);  
    
              var on_data = {
                guid: data.guid,
                on: on
              };
    
              ZigbeeGatewayInstance.emit('zb-gateway:light_device:state', on_data);
            }
          break;
    

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for getting back to me. The zigbeeHAGw application doesn't show any activity, unless I send a message to zigbee. When I send the initial GW_SET_ATTRIBUTE_REPORTING_REQ request the gateway application shows that going to zigbee and a response coming back, but after that, nothing. Wireshark does record activity between my own application and the gateway, but only when I send a message, and nothing occurring regularly. 

  • Hi Michael,

    Can you please provide your sniffer log?  What are the parameters of your Attribute Reporting Request?  Are you using the default [zr/zed]_light_CC26X2R1_LAUNCHXL example from the SIMPLELINK-CC13X2-26X2-SDK v5.20?  Can you debug this project to determine how it handles zclParseInReadReportCfgRspCmd?

    Regards,
    Ryan