1. 解决本地注册设备的流程无法正常控制设备的问题

2. 修改之前的 版本固件命名不对的问题
3. 增加debug kit,但是默认不开启(还在调试中)
This commit is contained in:
2025-11-04 21:24:15 +08:00
parent 21c6d05bad
commit 8270708ef2
27 changed files with 893 additions and 34 deletions

View File

@@ -665,8 +665,9 @@ int hilink_ble_main(void)
#endif
/* 启动Hilink SDK */
if (HILINK_Main() != 0) {
HILINK_SAL_NOTICE("HILINK_Main start error");
ret = HILINK_Main();
if (ret != 0) {
HILINK_SAL_NOTICE("HILINK_Main start error:%d\r\n", ret);
return -1;
}
e_printf("HILINK_Main start success\r\n");

View File

@@ -20,9 +20,9 @@
#include "hilink_entry.h"
#endif
extern void handle_device_online(void);
extern void handle_device_unbind(void);
extern void handle_device_offline(void);
extern void handle_device_register(void);
extern void handle_device_unregister(void);
extern int myhandle_put_brightness(const char* svc_id, const char* payload, unsigned int len);
extern int myhandle_put_cct(const char* svc_id, const char* payload, unsigned int len);
@@ -598,7 +598,6 @@ void HILINK_NotifyDevStatus(int status)
BLE_CfgNetAdvCtrl(0);
(void)BLE_CfgNetAdvCtrl(0xFFFFFFFF);
#endif
handle_device_offline();
break;
case HILINK_M2M_CLOUD_ONLINE:
/* 设备连接云端成功,请在此处添加实现 */
@@ -607,8 +606,6 @@ void HILINK_NotifyDevStatus(int status)
BLE_CfgNetAdvCtrl(0);
(void)BLE_CfgNetAdvCtrl(0xFFFFFFFF);
#endif
/* 设备连接云端成功,请在此处添加实现 */
handle_device_online(); // 处理设备上线
break;
case HILINK_M2M_LONG_OFFLINE:
/* 设备与云端连接长时间断开,请在此处添加实现 */
@@ -632,7 +629,6 @@ void HILINK_NotifyDevStatus(int status)
case HILINK_LINK_CONNECTED_WIFI:
/* 设备已经连上路由器,请在此处添加实现 */
hf_set_wifi_state(1);
handle_device_online();
break;
case HILINK_M2M_CONNECTTING_CLOUD:
/* 设备正在连接云端,请在此处添加实现 */
@@ -642,14 +638,17 @@ void HILINK_NotifyDevStatus(int status)
hf_set_wifi_state(0);
break;
case HILINK_DEVICE_REGISTERED:
/* 设备被注册,请在此处添加实现 */
/* 设备被注册:退出配网逻辑并完成绑定后的处理 */
handle_device_register();
break;
case HILINK_DEVICE_UNREGISTER:
/* 设备被解绑,请在此处添加实现 */
handle_device_unbind();
/* 设备被解绑:先执行解绑/下线处理,再做解绑清理 */
handle_device_unregister();
handle_device_unbind();
break;
case HILINK_REVOKE_FLAG_SET:
/* 设备被复位标记置位,请在此处添加实现 */
handle_device_unregister();
handle_device_unbind();
break;
case HILINK_NEGO_REG_INFO_FAIL: