找回密码
 立即注册

微信扫码登录

查看: 952|回复: 5

如何更新Attribute属性,以及是否会自动report(假设已绑定)?

[复制链接]

24

主题

39

回帖

288

积分

华贵铂金

积分
288
发表于 2025-3-17 18:02:29 | 显示全部楼层 |阅读模式 来自 广东深圳
information
说明:   建议参照本版块置顶帖内容输入必要信息
芯片型号: 8258
SDK及版本: V3.7.1.2_Patch_0001(PR)
比如温度,温度改变后,请问可调用哪个API可写到温度的attribute呢? 然后写到这个温度对应的attribute, 那report会自动上报(假设已绑定对应的cluster&attribute id)吗,还是需要手动调用report接口呢?

27

主题

294

回帖

929

积分

版主

积分
929
发表于 2025-3-21 17:34:49 | 显示全部楼层 来自 上海
在支持上报属性的前提下(即属性注册表中有该属性),可以调用bdb_defaultReportingCfg()来配置属性自动上报的间隔。

以on_off属性为例,在onOff_attrTbl[]属性表中,你可以找到ZCL_ATTRID_ONOFF,且支持ACCESS_CONTROL_REPORTABLE权限,
说明该属性支持上报。
在初始化函数中,可以找到如下代码,它实现了自动上报的配置。
  1.     u8 reportableChange[2] = {0x00, 0x00};
  2.     bdb_defaultReportingCfg(SAMPLE_LIGHT_ENDPOINT, HA_PROFILE_ID,
  3.                             ZCL_CLUSTER_GEN_ON_OFF, ZCL_ATTRID_ONOFF,
  4.                             1, 120, (u8 *)&reportableChange);//min = 1s, max = 120s
复制代码

24

主题

20

回帖

316

积分

流光翡翠

积分
316
发表于 2025-4-18 10:15:22 | 显示全部楼层 来自 韩国
本帖最后由 jylee@kme21.com 于 2025-4-18 10:24 编辑
TL_YB 发表于 2025-3-21 17:34
在支持上报属性的前提下(即属性注册表中有该属性),可以调用bdb_defaultReportingCfg()来配置属性自动上 ...

Packet Sniffer cannot capture the report packets after adding bdb_defaultReportingCfg().

    bdb_defaultReportingCfg(2, HA_PROFILE_ID,
                                                    ZCL_CLUSTER_MS_OCCUPANCY_SENSING, ZCL_ATTRID_OCCUPANCY,
                                                        1, 120, (u8 *)&reportableChange);

How to set the data for sending the report packets ?

27

主题

294

回帖

929

积分

版主

积分
929
发表于 2025-4-18 16:55:51 | 显示全部楼层 来自 上海
jylee@kme21.com 发表于 2025-4-18 10:15
Packet Sniffer cannot capture the report packets after adding bdb_defaultReportingCfg().

    bdb_d ...

1. Ensure that the Occupancy Attribute is registered correctly and supports ACCESS_CONTROL_REPORTABLE.
2. Confirm that the ZCL_CLUSTER_MS_OCCUPANCY_SENSING binding request has been received.

24

主题

20

回帖

316

积分

流光翡翠

积分
316
发表于 2025-4-18 17:43:03 | 显示全部楼层 来自 韩国
本帖最后由 jylee@kme21.com 于 2025-4-18 18:00 编辑
TL_YB 发表于 2025-4-18 16:55
1. Ensure that the Occupancy Attribute is registered correctly and supports ACCESS_CONTROL_REPORTA ...

1. Occupancy attribute
            { ZCL_ATTRID_OCCUPANCY,                           ZCL_DATA_TYPE_BITMAP8,          ACCESS_CONTROL_READ | ACCESS_CONTROL_WRITE | ACCESS_CONTROL_REPORTABLE,      (u8*)&g_zcl_occupancyAttrs.occupancy },

2. Is the ZCL_CLUSTER_MS_OCCUPANCY_SENSING binding request received from Coordinator ?

3. In my test, zb_bindingTblSearched(pEntry->clusterID, pEntry->endPoint) is always 0.
    How to set this function to 1 ?

27

主题

294

回帖

929

积分

版主

积分
929
发表于 2025-4-18 18:58:07 | 显示全部楼层 来自 上海
#2. Yes.
#3. It should be caused by binding failure.
Pls check if your bound table is full, and you can modify APS_BINDING_TABLE_NUM to adjust the size of the bound table.
In addition, you can capture the data packets and track the binding failure status.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Telink forum ( 沪ICP备17008231号-1 )

GMT+8, 2025-6-3 00:52 , Processed in 0.087505 second(s), 21 queries .

Powered by Telink 隐私政策

泰凌微电子版权所有 © 。保留所有权利。 2024

快速回复 返回顶部 返回列表