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.

CCS/CC2652R: BDB Reporting

Part Number: CC2652R


Tool/software: Code Composer Studio

SDK version :simplelink_zigbee_sdk_plugin_2_20_00_06

I use ZC_GenericApp and ZR_GenericApp to test BDB Reporting.

I add below code in zclGenericApp_ProcessIncomingMsg.

static uint8 zclGenericApp_ProcessIncomingMsg( zclIncoming_t *pInMsg )
{
  uint8 handled = FALSE;

  switch ( pInMsg->hdr.commandID )
  {
#ifdef ZCL_READ
    case ZCL_CMD_READ_RSP:
      zclGenericApp_ProcessInReadRspCmd( pInMsg );
      handled = TRUE;
      break;
#endif
#ifdef ZCL_WRITE
    case ZCL_CMD_WRITE_RSP:
      zclGenericApp_ProcessInWriteRspCmd( pInMsg );
      handled = TRUE;
      break;
#endif
    case ZCL_CMD_CONFIG_REPORT:
    case ZCL_CMD_CONFIG_REPORT_RSP:
    case ZCL_CMD_READ_REPORT_CFG:
    case ZCL_CMD_READ_REPORT_CFG_RSP:
    case ZCL_CMD_REPORT:
      bdb_ProcessIncomingReportingMsg( pInMsg );
      handled = TRUE;
      break;
static uint8 bdb_ProcessIncomingReportingMsg( zclIncoming_t *pInMsg )
{
  zclReportCmd_t *pInTempSensorReport;

  pInTempSensorReport = (zclReportCmd_t *)pInMsg->attrCmd;

  if ( pInTempSensorReport->attrList[0].attrID == ATTRID_POWER_CFG_BATTERY_PERCENTAGE_REMAINING )
  {
      Board_Led_toggle ( board_led_type_LED1 );

  }
  return ( TRUE );
}

But it no effect, please help me.

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/158/1.7z

  • Couldn't understand what you mean to test. Can you elaborate?
  • I add  below code in ZR_genericapp. 

      Req.attrID = ATTRID_POWER_CFG_BATTERY_PERCENTAGE_REMAINING;
      Req.cluster = ZCL_CLUSTER_ID_GEN_POWER_CFG;
      Req.endpoint = GENERICAPP_ENDPOINT;
      Req.maxReportInt = 10;
      Req.minReportInt = 0;
      memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);
    
      Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(zclGenericApp_Entity,&Req);

    I see this bdb reporting work well by ubiqua. I want  handle zr report data in zc application.

    static uint8 bdb_ProcessIncomingReportingMsg( zclIncoming_t *pInMsg )
    {
      zclReportCmd_t *pInTempSensorReport;
    
      pInTempSensorReport = (zclReportCmd_t *)pInMsg->attrCmd;
    
      if ( pInTempSensorReport->attrList[0].attrID == ATTRID_POWER_CFG_BATTERY_PERCENTAGE_REMAINING )
      {
          Board_Led_toggle ( board_led_type_LED1 );
    
      }
      return ( TRUE );
    }

    But , led1 no toggle.

    How  handle bdb report data.

  • I suppose you can add a case ZCL_CLUSTER_ID_GEN_POWER_CFG in zclGenericApp_ProcessIncomingMsg to receive the report.
  • I refer to zclSampleThermostat.
    zclSampleThermostat can handle reporting data in zclSampleThermostat_ProcessIncomingMsg.
    Why don't zclGenericApp don't handle the data in zclGenericApp_ProcessIncomingMsg?
  • zclGenericApp is a generic application example so you have to add your own case by yourself in zclGenericApp_ProcessIncomingMsg to handle it.