-
yezhipeng
- Posts: 42
- Joined: 2023年 Jul 19日 09:56
Hi,
Code: Select all
send_data.qos = QOS_VIP_0;
send_data.delay_time = delay_ms;
send_data.zcl_id = ZCL_ID_ONOFF;
send_data.frame_type = ZG_ZCL_FRAME_TYPE_SPEC_TO_CLUSTER;
send_data.direction = ZG_ZCL_DATA_CLIENT_TO_SERVER;
send_data.command_id = CMD_OFF_COMMAND_ID;
send_data.addr.mode = SEND_MODE_GROUP;
send_data.addr.type.dev.cluster_id = CLUSTER_ON_OFF_CLUSTER_ID;
send_data.addr.type.dev.dst_ep = 1;
send_data.addr.type.dev.src_ep = src_ep;
send_data.addr.type.dev.dst_addr = sendGroupId;
send_data.data.private.len = 1;
tal_zg_send_data(&send_data, zigbee_send_callback, 1000);
如上面的代码可以发送成功,但我把send_data.data.private.len = 0就发送失败请问是什么原因?
BRS
Ye.Zhi-Peng
-
docker22docker
- Posts: 9
- Joined: 2022年 Sep 19日 19:42
send_data.addr.mode = SEND_MODE_GROUP;
send_data.addr.type.dev.cluster_id = CLUSTER_ON_OFF_CLUSTER_ID;
send_data.addr.type.dev.dst_ep = 1;
send_data.addr.type.dev.src_ep = src_ep;
send_data.addr.type.dev.dst_addr = sendGroupId;
////// 联合体错误,使用SEND_MODE_GROUP模式,不应该是dev,应该是group,详细查看TAL_ZG_ADDR_T结构体
-
yezhipeng
- Posts: 42
- Joined: 2023年 Jul 19日 09:56
这边测试下看看,但我这边有一个疑问,联合体共用内存块,组播单播结构是一样的,理论上这样发送也没问题。
-
yezhipeng
- Posts: 42
- Joined: 2023年 Jul 19日 09:56
send_data.qos = QOS_VIP_0;
send_data.delay_time = delay_ms;
send_data.zcl_id = ZCL_ID_ONOFF;
send_data.frame_type = ZG_ZCL_FRAME_TYPE_SPEC_TO_CLUSTER;
send_data.direction = ZG_ZCL_DATA_CLIENT_TO_SERVER;
send_data.command_id = CMD_OFF_COMMAND_ID;
send_data.addr.mode = SEND_MODE_GROUP;
send_data.addr.type.group.cluster_id = CLUSTER_ON_OFF_CLUSTER_ID;
send_data.addr.type.group.dst_ep = 1;
send_data.addr.type.group.src_ep = src_ep;
send_data.addr.type.group.group_id = sendGroupId;
send_data.data.private.len = 0;
tal_zg_send_data(&send_data, zigbee_send_callback, 1000);
这样修改后还是不行,len大于0就可以。
-
zeso
- Posts: 132
- Joined: 2022年 Sep 19日 17:02
你好,mg21 3.6.1 SDK对ZCL payload为空的数据发送做了屏蔽,此问题在下一版本SDK中优化。