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.

BDB的Report必须要经过BDB层的绑定才能Report?

Genius 3030 points

利用APSME_BindRequest()绑定了一个设备,也用bdb_RepAddAttrCfgRecordDefaultToList()向bdb添加了温度属性记录,那温度变化的时候BDB会Report吗?

  • 是这样的,你可以找到下面的code:

    static void bdb_RepReport( uint8 specificCLusterEndpointIndex )
    {
      afAddrType_t dstAddr;
      zclReportCmd_t *pReportCmd;
      uint8 i;
      
      bdbReportAttrClusterEndpoint_t* clusterEndpointItem = NULL;
      if( specificCLusterEndpointIndex == BDBREPORTING_INVALIDINDEX )
      {
        if( bdb_reportingNextClusterEndpointIndex < bdb_reportingClusterEndpointArrayCount )
        {
          clusterEndpointItem = &(bdb_reportingClusterEndpointArray[bdb_reportingNextClusterEndpointIndex]);
        }
      }
      else
      {
        clusterEndpointItem = &(bdb_reportingClusterEndpointArray[specificCLusterEndpointIndex]);
      }
    
      // actually send the report
      if( clusterEndpointItem->consolidatedMaxReportInt != ZCL_REPORTING_OFF && clusterEndpointItem->attrLinkedList.numItems )
      {
        dstAddr.addrMode = (afAddrMode_t)AddrNotPresent;
        dstAddr.addr.shortAddr = 0;
        dstAddr.endPoint = clusterEndpointItem->endpoint;
        dstAddr.panId = _NIB.nwkPanId;

    这是读取bdb_reportingClusterEndpointArray的end device 信息。

    你可以直接用zcl_SendReportCmd去report.

  • 應該會的
  • 尝试了一下,BDB并没有Report,自己加的绑定可以正常发送。
  • 这个我记得是不可以的。



    “BDB并没有Report,自己加的绑定可以正常发送。”
    你后半句什么意思,你自己用zcl_SendReportCmd去发送,还是什么?
  • bdb_RepAddAttrCfgRecordDefaultToList如果有設置正確的reportableChange,finding&binding成功應該是要會回報
  • 我去试一下,给个反馈。
  • 我是用的zcl_SendWrite,以绑定的方式发送,抓包看到只有Write,并没有Report,所以证明BDB并没有Report。
  • 我试过了,我用了      

      zAddrType_t dstAddr;

               dstAddr.addrMode = Addr16Bit;

               dstAddr.addr.shortAddr = 0x0000; // Coordinator

               ZDP_EndDeviceBindReq( &dstAddr, NLME_GetShortAddr(),

               SAMPLETHERMOSTAT_ENDPOINT,

               zclSampleThermostat_SimpleDesc.AppProfId,

               zclSampleThermostat_SimpleDesc.AppNumInClusters, (cId_t *)zclSampleThermostat_SimpleDesc.pAppInClusterList,

               zclSampleThermostat_SimpleDesc.AppNumOutClusters, (cId_t *)zclSampleThermostat_SimpleDesc.pAppOutClusterList,

               FALSE );

    去手动绑定是没有report的,你可以用zcl_SendReportCmd去进行report。

  • 你有沒有綁定温度attribute report?
  • 有绑定
  • 不好意思,我查一下源碼温度变化的时候BDB不会自動Report,這部份要自己實作
x 出现错误。请重试或与管理员联系。