ppp自动启动 ln_ws_start 2494/1 2494/head 2495/target/1
author孙春阳 <snickersun@163.com>
Mon, 13 Oct 2025 08:40:34 +0000 (16:40 +0800)
committer孙春阳 <snickersun@163.com>
Mon, 13 Oct 2025 08:40:34 +0000 (16:40 +0800)
code/sdk/zhihui/leiniao/imsl_ln/ln_api.c
code/sdk/zhihui/ppp/src/ppp_lwip.c

index 5346086..200e5ea 100644 (file)
@@ -1373,6 +1373,14 @@ static void ln_init_required_dirs(void)
         }
     }
 }
+/*
+外部调用,启动雷鸟websocket服务
+*/
+errcode_t uapi_ln_ws_start(void)
+{
+    ln_ws_start(ln_ws_process_message,2000);
+    return ERRCODE_SUCC;
+}
 
 // 雷鸟http服务初始化
 errcode_t uapi_ln_http_server_init(void)
@@ -1397,7 +1405,7 @@ errcode_t uapi_ln_http_server_init(void)
         && !defined(SUPPORT_PPP_SERVICE_POLLING) \
         && !defined(SKIP_LN_PROTOCOL_TEST)
 
-    ln_ws_start(ln_ws_process_message,2000);
+    uapi_ln_ws_start();
     
     #endif
 
index 03e1ae5..6b267e9 100644 (file)
@@ -957,6 +957,9 @@ static void ppp_lwip_netif_status_callback(struct netif *netif)
             // ⚠️ 网络连接成功,更新runtime状态
             cat1_api_runtime_set_cat1_networkstat(1);
             PPP_DEBUG_INFO("PPP runtime: network_on set to 1");
+            extern errcode_t uapi_ln_ws_start(void);
+            uapi_ln_ws_start();
+            
         }
     }
 }