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.

CC2652RSIP: Zstack, bdbRepChangeAttrValueReq() not triggering reports

Part Number: CC2652RSIP
Other Parts Discussed in Thread: SIMPLELINK-CC13XX-CC26XX-SDK

With ZStack I'm trying to send custom temperature report triggered by timer.

I started from zed_temperaturesensor example, added the timer (which successfully triggers the temperature read via SPI), and added Zstackapi_bdbRepChangeAttrValueReq() to try to send data. The measure changes of more than 300 every second. The firmware always send report with the periodic update according to the value set to Req.maxReportInt set with Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(), if maxReportInt is 10, I receive a new report every 10 sec, if 50, 50, and so on. Meanwhile, I never receive any other report, neither triggered by the function Zstackapi_bdbRepChangeAttrValueReq(), or by the reportableChange. If maxReportInt is set to BDBREPORTING_NOPERIODIC (0x0000) no report received at all.

I already played with Req.minReporInt, set to BDBREPORTING_NOLIMIT (0x0000) should be ok, but I also set different values. I played with reportableChange also, set to [00,00,00,00], set to [01,00,00,00] and [2C,01,00,00].

Do you have any suggestions?

  • Hi Simone,

    I evaluated the example zed_temperaturesensor and made the following changes to zcl_sampletemperaturesensor.c using the SIMPLELINK-LOWPOWER-F2-SDK (aka SIMPLELINK-CC13XX-CC26XX-SDK) v7.10:

    uint8_t reportableChange[] = {0x01, 0x00, 0x00, 0x00}; // 0x2C01 is 300 in int16_t
    //...
      Req.attrID = ATTRID_TEMPERATURE_MEASUREMENT_MEASURED_VALUE;
      Req.cluster = ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT;
      Req.endpoint = SAMPLETEMPERATURESENSOR_ENDPOINT;
      Req.maxReportInt = BDBREPORTING_NOPERIODIC;
      Req.minReportInt = BDBREPORTING_NOLIMIT;
      OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);
    
      Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);

    As a result, an attribute report was sent to the ZC every time the ZED UI changed the temperature sensor's measured value.  You can review the project READMEs to understand more about the UI and typical demo usage.  The UI changes the value of temperature measurement from zclSampleTemperatureSensor_UiActionChangeTemp:

              zclSampleTemperatureSensor_MeasuredValue = zclSampleTemperatureSensor_MeasuredValue + 100;  // considering using whole number value
    #ifdef BDB_REPORTING
          Req.attrID = ATTRID_TEMPERATURE_MEASUREMENT_MEASURED_VALUE;
              Req.cluster = ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT;
              Req.endpoint = SAMPLETEMPERATURESENSOR_ENDPOINT;
    
              Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId,&Req);
    #endif

    I suggest that you evaluate the same and attempt to recreate similar results for your application.  Further debugging may be required to confirm that your timer expiration code is being executed and that bdb_RepChangedAttrValue completes without any errors or unexpected behavior.  Here are some relevant E2E threads:

    https://e2e.ti.com/f/1/t/1183514
    https://e2e.ti.com/f/1/t/1134659
    https://e2e.ti.com/f/1/t/1169911

    Regards,
    Ryan