Search found 44 matches

by lightthgil
2025年 Apr 10日 15:15
Forum: TuyaOS-网关中控开发
Topic: 【已处理】tuyaOS SDK怎么获取中控自身的信息
Replies: 1
Views: 1564

Re: tuyaOS SDK怎么获取中控自身的信息

和普通设备的获取方式一致,例如tuya_get_dev_brief_info_list
前提:需要再能力上报加上中控品类,例如使用tuya_ctrl_center_add_dev_category_ability。能力上报在OTA升级后或者重新注册才生效

by lightthgil
2025年 Jan 22日 10:23
Forum: TuyaOS-网关中控开发
Topic: 【已处理】非标类子设备能添加,但是没法在中控上使用
Replies: 1
Views: 4915

Re: 非标类子设备能添加,但是没法在中控上使用

非标设备,需要设备厂家提标准化申请后,转换成标准设备才能控制。
或者使用开发文档里的非标接口开发

by lightthgil
2024年 Sep 20日 15:10
Forum: TuyaOS-网关中控开发
Topic: 【已解决】【中控】R328_TuyaOS-3.10.7 适配tkl_wired.c后, 崩溃
Replies: 3
Views: 6697

Re: 【求助】【中控】R328_TuyaOS-3.10.7 适配tkl_wired.c后, 崩溃

c3620765-9fa1-4e04-b437-39eef11997c6.png

c库里面,用了一个8k的局部变量,lpc_task线程堆栈设置的只有4k,导致栈越界

解决方案:删除tkl_thread_create中的pthread_attr_setstacksize(&attr, stack_size);

by lightthgil
2024年 Sep 20日 14:52
Forum: TuyaOS-网关中控开发
Topic: 【已解决】【中控】AK3760E_TuyaOS-3.10.10调用tuya_home_ctrl_dev_open程序崩溃
Replies: 2
Views: 4829

Re: 【求助】【中控】AK3760E_TuyaOS-3.10.10调用tuya_home_ctrl_dev_open程序崩溃

安凯的芯片,属于ARMV5类型,不支持非对齐的功能。如果代码中使用attribute((packed))定义的结构体,会出现结构体成员是非对齐的,此时如果没有使能非对齐访问会导致触发abort异常。

可以通过配置 /proc/cpu/alignment 来控制内核对非对齐访问的处理, 可以通过设置2来修复

image_5272219736385364.png
by lightthgil
2024年 Jul 3日 09:49
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: [Share] Solution for Zibgbee device loss after upgrading TuyaOS central control SDK 3.8.1
Replies: 0
Views: 7030

[Share] Solution for Zibgbee device loss after upgrading TuyaOS central control SDK 3.8.1

Since version 3.9, the central control SDK has optimized the zigbee module and improved the utilization rate of the zigbee channel. However, due to the difference from the previous zibee implementation method, the following compatibility is required at the application layer. The method is as follows...
by lightthgil
2024年 Jul 3日 09:48
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: 【Share】TuyaOS Central Control Global Subscription
Replies: 0
Views: 6951

【Share】TuyaOS Central Control Global Subscription

Generally, when the central control SDK controls the device and obtains information, it needs to call tuya_home_ctrl_dev_open to obtain the device handle first, and then operate the device. This method will occupy some memory in the process of obtaining the handle; at the same time, the mapping rela...
by lightthgil
2024年 Jul 2日 14:37
Forum: TuyaOS-网关中控开发
Topic: 【分享】TuyaOS中控全局订阅
Replies: 2
Views: 4794

【分享】TuyaOS中控全局订阅

一般情况下,中控sdk对设备进行控制、获取信息的时候,需要调用 tuya_home_ctrl_dev_open ,先获取设备的句柄,然后才可以对设备进行操作。这种方式,会在获取句柄的过程中,占用了部分内存;同时,句柄和设备dev_id的映射关系还需要应用层自己存储对应关系。所以,SDK对于经常使用的一些特性,提供了一些全局接口。 tuya_home_ctrl_subscribe_dev_online //订阅设备上下线事件 tuya_home_ctrl_subscribe_dev_shortcut //订阅设备快捷开关事件 tuya_home_ctrl_subscribe_dp_name_up...
by lightthgil
2024年 Jul 2日 11:00
Forum: TuyaOS-网关中控开发
Topic: 【分享】TuyaOS中控SDK3.8.1升级后zibgbee设备丢失解决方案
Replies: 0
Views: 3580

【分享】TuyaOS中控SDK3.8.1升级后zibgbee设备丢失解决方案

中控SDK自3.9版本开始,对zigbee模块左右优化,提升了zigbee信道的利用率。但由于和之前的zibee实现方式不同,需要在应用层做以下兼容。方法如下: 在中控demo的config.json文件中,zigbee的标签下增加"dev_txt_sta": 0,即从 { "pid": "xxxxxxxxxxxxxxxx", "uuid": "xxxxxxxxxxxxxxxxxxxx", "authkey": "xxxxxxxxxxxxxxxxxxxxxxxxxx...
by lightthgil
2024年 Jun 11日 17:45
Forum: TuyaOS-网关中控开发
Topic: 【已处理】中控无网络情况下长时间运行,出现设备回调异常数据
Replies: 1
Views: 3225

Re: 中控无网络情况下长时间运行,出现设备回调异常数据

回调函数的user_arg的值,其实就是dev_cb.report_cb.user_arg。这部分内存是应用自己管理的。
你可以先把两个user_arg的地址打印出来,看是否一样的