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.

CC2652P: 关于report参数动态调整

Part Number: CC2652P

目前按照SW/LIGHT的例程可以进行数据自动上报。现在想请问一下如果运行过程中,我想调整上报的周期等参数的话,本地设备和远端设备分别可以通过哪些函数进行操作?

  • 使用Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq()配置

    看下:

    https://dev.ti.com/tirex/content/simplelink_cc13x2_26x2_sdk_5_20_00_52/docs/zigbee/html/zigbee/z-stack-overview.html#attribute-reporting-functionality

    https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/877895/lpstk-cc1352r-bdb-reporting-attribute-every-given-time/3247878#3247878

  • 你好,我在初始化的时候使用

    bdb_RepAddAttrCfgRecordDefaultToList(SAMPLETEMPERATURESENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT, ATTRID_TEMPERATURE_MEASUREMENT_MEASURED_VALUE, 5, 5, reportableChange);

    进行初始化,report可以以5S为周期正常上报。然后我在按键事件那里增加一个按键事件

    bdb_RepAddAttrCfgRecordDefaultToList(SAMPLETEMPERATURESENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT, ATTRID_TEMPERATURE_MEASUREMENT_MEASURED_VALUE, 10, 10, reportableChange);

    Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &dreq);

    但是上报周期还是5S,并没有变成10S,请问如何操作才可以使上报周期变为10S?

  • 有没有将对应的预编译指令添加到工程中?

    To enable BDB report sending functionality on a device, include the BDB_REPORTING compile option.
    To enable BDB report receiving/processing functionality, include the ZCL_REPORT_DESTINATION_DEVICE compile option.
    To enable configuring reporting parameters of remote devices, include the ZCL_REPORT_CONFIGURING_DEVICE compile option.

  • 有的,这三个预编译指令我都加进去了。目前我这边上报的配置和上报周期的修改都是在ZED_TEMPERATURESENSOR例程中进行添加的。

  • 按键事件事件是在哪里调用的,必须在BDB Commissioning之前调用,否则可能不会起作用

    参考:https://www.136.la/tech/show-422418.html

  • 我是在BDB Commissioning之后调用的,如果我想在组网之后动态调整report属性,请问应该怎么操作呢?我试着在ZC端使用zcl_SendConfigReportCmd函数对ZED进行操作,但是发现没有效果。而且我发现report好像使用了NVS,因为第二次我重新编译的时候我注释掉了report配置的内容,但是ZC端依然可以收到report信息

  • AddAttrCfgRecordDefaultToList在stack中没有办法在BDB Commissioning后调用,

    zed_temperaturesensor示例展示了bdb_RepAddAttrCfgRecordDefaultToList的用法

    如果是终端设置则可以设置一个定期的事件来报告

    而且我发现report好像使用了NVS

    是的,这在我发的第一个链接中有说明:

    When the BDB state machine starts commissioning, the Attribute Reporting module either loads the previously saved Attribute Reporting Configuration records from NV, or finds the application’s reportable attributes (from the attribute list) and constructs the necessary Attribute Reporting Configuration records. Then the module will consolidate the reportable attributes in each cluster of every endpoint, in order to trigger the periodic sending of the Report Attributes command messages using the Maximum Reporting Interval values.