Search found 67 matches

by shiliang
2025年 Jul 11日 15:43
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

您好,

使用你发送的demo,增加了分包能力注册,并更改app_config.yaml中manufacture_name是可以的,之前应该是分包能力值未开启。

Image

Image

可参考附件测试demo

by shiliang
2025年 Jul 11日 10:20
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

您好: 1.麻烦在tuya_init_first中增加tal_zigbee_local_auto_func_enable(); (需是router设备) 2.非router设备增加,router设备hulve: BOOL_T __tal_inner_local_auto_action_device_enable(VOID_T) { return TRUE; } 3.修改file_send_transfer_end_callback如下: extern UINT8_T *__inner_file_send_buf; BOOL_T file_send_transfer_end_callback(U...
by shiliang
2025年 Jul 10日 18:15
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

您好:

result为0时发送失败,result为1发送成功。

可以提供下发送接口函数。

by shiliang
2025年 Jul 10日 17:42
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

你好,
这个问题是由于SDK会check是否已经注册了cluster和attribute造成的。

BOOL_T tal_inner_file_transfer_check_cluster_register(void)
{
return FALSE;
}
可通过此虚函数跳过。

by shiliang
2025年 Jul 10日 15:48
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

tuya_init_second中无法继续运行,可能是由于SDK本身heap资源不足,分包初始化会需要malloc 2k左右资源,可以尝试: 1.分包初始化函数可以放到tuya_init_last函数中。 2.可以尝试调低分包malloc资源大小,UINT16_T tal_zigbee_start_notify_buffer_size(UINT16_T addr,start_notification_pdu_t pdu) { return 1024; } 3.可以增加本身SDK malloc资源,通过: #define APP_HEAP_SIZE 12*1024 STATIC UINT8_T ...
by shiliang
2025年 Jul 10日 15:04
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

分包相关函数可参考:

include/component/tal_zigbee/src/file_transfer/include/tal_zigbee_file_transfer.h

by shiliang
2025年 Jul 10日 15:02
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

您好:

请问是否调用如下接口:
VOID_T tal_zigbee_local_auto_func_enable(VOID_T);

如果有调用,router设备默认会初始化分包功能。

如果没有调用上述接口可按照如下步骤初始化:

1.判断SDK内部是否初始化tal_inner_get_file_transfer_func_enable();

2.使能分包功能tal_zigbee_file_transfer_init();

3.tal_zigbee_file_transfer_config(TRUE,TRUE,TRUE,TRUE,TRUE);

by shiliang
2025年 Jul 10日 10:07
Forum: TuyaOS-Zigbee设备开发
Topic: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?
Replies: 27
Views: 1052

Re: 请问上报的dp数据长度超过64byte的时候该怎么上传? 分包?如何分?

对于下发的回复或者上报: @param[in] addr: device addr 一般下发源是网关,上报也是网关,地址固定0x0000; @param[in] cluster: cluster id 是接收到的下发dp 数据里包含的cluster id信息,如果dp数据通过TAL_MSG_RET_E tal_zcl_specific_msg_recv_callback(TAL_ZCL_MSG_T *msg)下发,则cluster id即为msg->cluster @param[in] type: file type fild type字段为命令类型,0代表global,1代表specific...