{"id":22479,"date":"2025-04-19T06:04:29","date_gmt":"2025-04-18T22:04:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22479.html"},"modified":"2025-04-19T06:04:29","modified_gmt":"2025-04-18T22:04:29","slug":"esp32%e7%a7%bb%e6%a4%8dopenharmony%e7%89%a9%e8%81%94%e7%bd%91%e5%ae%9e%e6%88%98-lwip%e5%b7%b4%e6%b3%95%e4%ba%91tcp%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22479.html","title":{"rendered":"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"vapcH-toc\" style=\"margin-left:40px\">\u5df4\u6cd5\u4e91\u5e73\u53f0\u57df\u540d<\/p>\n<p id=\"WZKTd-toc\" style=\"margin-left:80px\">\u5df4\u6cd5\u4e91\u5e73\u53f0\u642d\u5efa<\/p>\n<p id=\"kQJ9L-toc\" style=\"margin-left:80px\">TCP\u7b80\u4ecb<\/p>\n<p id=\"GyqkE-toc\" style=\"margin-left:80px\">\u8ba2\u9605\u3001\u53d1\u5e03\u7b80\u4ecb<\/p>\n<p id=\"vJo60-toc\" style=\"margin-left:80px\">\u4ee3\u7801\u793a\u4f8b<\/p>\n<p id=\"w8xsn-toc\" style=\"margin-left:120px\">wifi_sta_connect.c<\/p>\n<p id=\"yvJ4s-toc\" style=\"margin-left:120px\">wifi_sta_example.c<\/p>\n<p id=\"c364I-toc\" style=\"margin-left:80px\">\u79fb\u690d\u6b65\u9aa4<\/p>\n<p id=\"k8wr5-toc\" style=\"margin-left:80px\">\u5df4\u6cd5\u4e91TCP\u5ba2\u6237\u7aef\u63a5\u5165\u8be6\u89e3<\/p>\n<p id=\"T0BKC-toc\" style=\"margin-left:120px\">\u547d\u4ee4\u5b57\u6bb5\u8bf4\u660e<\/p>\n<p id=\"pL9mS-toc\" style=\"margin-left:120px\">\u8ba2\u9605\u4e3b\u9898<\/p>\n<p id=\"mSuKz-toc\" style=\"margin-left:120px\">\u53d1\u5e03<\/p>\n<p id=\"esHHy-toc\" style=\"margin-left:120px\">\u8ba2\u9605\u4e3b\u9898&#xff0c;\u5e76\u83b7\u53d6\u4e00\u6761\u5386\u53f2\u6d88\u606f<\/p>\n<p id=\"vfPBq-toc\" style=\"margin-left:120px\">\u83b7\u53d6\u4e00\u6b21\u65f6\u95f4<\/p>\n<p id=\"Qprcu-toc\" style=\"margin-left:120px\">\u83b7\u53d6\u4e00\u6b21\u5df2\u53d1\u6d88\u606f<\/p>\n<p id=\"ZRmCe-toc\" style=\"margin-left:120px\">\u53d1\u9001\u5fc3\u8df3<\/p>\n<p id=\"o0KFL-toc\" style=\"margin-left:120px\">set \u6307\u4ee4<\/p>\n<p id=\"xKUWo-toc\" style=\"margin-left:120px\">up \u6307\u4ee4<\/p>\n<p id=\"cabbu-toc\" style=\"margin-left:120px\">app \u6307\u4ee4<\/p>\n<p id=\"yOLOV-toc\" style=\"margin-left:80px\">\u7f16\u8bd1\u5e76\u70e7\u5f55<\/p>\n<p id=\"s8fpf-toc\" style=\"margin-left:80px\">\u5b9e\u9a8c\u73b0\u8c61<\/p>\n<hr id=\"hr-toc\" \/>\n<p>\u5df4\u6cd5\u4e91\u4e91\u5e73\u53f0\u5b98\u7f51<\/p>\n<p>\u5df4\u6cd5\u5f00\u653e\u5e73\u53f0_\u5df4\u6cd5\u4e91_\u5df4\u6cd5\u7269\u8054\u7f51\u4e91\u5e73\u53f0<\/p>\n<h4 id=\"WZKTd\">\u5df4\u6cd5\u4e91\u4e91\u5e73\u53f0\u642d\u5efa<\/h4>\n<li id=\"u864c026b\">\u8fdb\u5165\u5df4\u6cd5\u4e91\u5e73\u53f0\u767b\u5f55\u6ce8\u518c<\/li>\n<li id=\"u852c70f3\">\u70b9\u51fbTCP\u8bbe\u5907\u4e91<\/li>\n<p id=\"u79c45820\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"328\" id=\"u6f99dd99\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220423-6802cc67b5424.png\" width=\"1200\" \/><\/p>\n<li id=\"uaae2e118\">\u5728\u6700\u53f3\u8fb9\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u4e3b\u9898\u540d&#xff0c;\u4e3b\u9898\u547d\u540d\u5e76\u65e0\u5f3a\u5236\u6027\u8981\u6c42&#xff0c;\u4e5f\u53ef\u4ee5\u53c2\u8003\u4e3b\u9898\u7c7b\u578b\u547d\u540d\u8bf4\u660e&#xff1a;<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"824\" id=\"uee1a8354\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220424-6802cc68276e6.png\" width=\"882\" \/><\/p>\n<p id=\"ucabd5f4a\">\u6bd4\u5982\u6211\u4eec\u8fd9\u91cc\u5c06\u4e3b\u9898\u547d\u540d\u4e3aledtest&#xff0c;\u70b9\u51fb\u65b0\u5efa\u4e3b\u9898<\/p>\n<p id=\"uaf6a5ed7\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"156\" id=\"ua89770c8\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220424-6802cc686aa63.png\" width=\"810\" \/><\/p>\n<p id=\"u7aec4bc8\">\u521b\u5efa\u6210\u529f\u540e\u53ef\u4ee5\u770b\u5230\u4e0b\u9762\u51fa\u73b0\u4e86\u4e00\u4e2a\u4e3b\u9898<\/p>\n<p id=\"u5bcdae54\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1200\" id=\"uc877c791\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220424-6802cc688e07a.png\" width=\"1200\" \/><\/p>\n<h4 id=\"kQJ9L\">TCP\u7b80\u4ecb<\/h4>\n<p id=\"u83085c00\">TCP \u662f\u4e00\u79cd\u9762\u5411\u8fde\u63a5\u7684\u3001\u53ef\u9760\u7684\u3001\u57fa\u4e8e\u5b57\u8282\u6d41\u7684\u4f20\u8f93\u5c42\u901a\u4fe1\u534f\u8bae&#xff0c;\u4f20\u8f93\u5c42\u534f\u8bae\u5e38\u7528\u7684\u6709TCP\u548cUDP&#xff0c;\u50cf\u5e38\u89c1\u7684http\u534f\u8bae\u6216mqtt\u534f\u8bae&#xff0c;\u90fd\u662f\u5728TCP\u4e0a\u4f20\u8f93\u7684&#xff0c;TCP\u7528\u9014\u5e7f\u6cdb&#xff0c;\u4e00\u822c\u53ef\u4ee5\u8054\u7f51\u7684\u8bbe\u5907&#xff0c;\u90fd\u652f\u6301TCP\u534f\u8bae\u4f20\u8f93\u3002<\/p>\n<p id=\"u36dae65e\">\n<h4 id=\"GyqkE\">\u8ba2\u9605\u3001\u53d1\u5e03\u7b80\u4ecb<\/h4>\n<p id=\"ue18f3c24\">\u901a\u4fd7\u7684\u6765\u8bb2&#xff0c;\u8ba2\u9605\u3001\u53d1\u5e03\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4fe1\u53f7 \u8ba2\u9605&#xff1a;\u8ba2\u9605\u67d0\u4e00\u4e2a\u4e3b\u9898&#xff0c;\u8ba2\u9605\u4e4b\u540e&#xff0c;\u5c31\u53ef\u4ee5\u6536\u5230\u53d1\u5f80\u8be5\u4e3b\u9898\u7684\u6d88\u606f\u3002 \u53d1\u5e03&#xff1a;\u5411\u67d0\u4e2a\u4e3b\u9898\u53d1\u9001\u6d88\u606f\u3002 \u4f8b\u5982&#xff1a;\u5f53\u67d0\u4e2a\u8bbe\u5907\u8ba2\u9605\u4e86\u4e3b\u9898\u201cX\u201d&#xff0c;\u8fd9\u65f6\u5411\u4e3b\u9898\u201cX\u201d\u53d1\u9001\u7684\u4efb\u4f55\u6d88\u606f&#xff0c;\u8bbe\u5907\u90fd\u53ef\u4ee5\u6536\u5230&#xff0c;\u56e0\u4e3a\u8bbe\u5907\u5df2\u7ecf\u8ba2\u9605\u4e0a\u4e86\u8be5\u4e3b\u9898\u3002<\/p>\n<p>\u76f4\u63a5\u4e0a\u5e72\u8d27&#xff01;<\/p>\n<h4 id=\"vJo60\">\u4ee3\u7801\u793a\u4f8b<\/h4>\n<h5 id=\"w8xsn\">wifi_sta_connect.c<\/h5>\n<p>\/*<br \/>\n * Copyright (c) 2022 Hunan OpenValley Digital Industry Development Co., Ltd.<br \/>\n * Licensed under the Apache License, Version 2.0 (the &#034;License&#034;);<br \/>\n * you may not use this file except in compliance with the License.<br \/>\n * You may obtain a copy of the License at<br \/>\n *<br \/>\n *    http:\/\/www.apache.org\/licenses\/LICENSE-2.0<br \/>\n *<br \/>\n * Unless required by applicable law or agreed to in writing, software<br \/>\n * distributed under the License is distributed on an &#034;AS IS&#034; BASIS,<br \/>\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br \/>\n * See the License for the specific language governing permissions and<br \/>\n * limitations under the License.<br \/>\n *\/<br \/>\n#include &lt;stdio.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\n#include &lt;unistd.h&gt;<br \/>\n#include &#034;securec.h&#034;<br \/>\n#include &#034;cmsis_os2.h&#034;<br \/>\n#include &#034;ohos_init.h&#034;<br \/>\n#include &#034;wifi_device.h&#034;<br \/>\n#include &#034;lwip\/ip4_addr.h&#034;<br \/>\n#include &#034;lwip\/netif.h&#034;<br \/>\n#include &#034;lwip\/netifapi.h&#034;<br \/>\n#include &#034;wifi_error_code.h&#034;<\/p>\n<p>#define DEF_TIMEOUT 15<br \/>\n#define ONE_SECOND 1<br \/>\n#define SELECT_WLAN_PORT &#034;wlan0&#034;<br \/>\n#define SELECT_WIFI_SECURITYTYPE WIFI_SEC_TYPE_OPEN<br \/>\n#define STD_TIMEZONE_OFFSET (&#043;8)<br \/>\n#define OD_DELAY_100 100<br \/>\n#define OD_DELAY_200 200<\/p>\n<p>static int g_staScanSuccess &#061; 0;<br \/>\nstatic int g_ConnectSuccess &#061; 0;<br \/>\nstatic int ssid_count &#061; 0;<br \/>\nstatic WifiErrorCode wifi_error;<br \/>\nstatic WifiEvent g_wifiEventHandler &#061; {0};<br \/>\nstatic int wifi_sta_init_state &#061; 0;<br \/>\nint sock_fd;<br \/>\nint addr_length;<br \/>\nconst int timeZone &#061; 8;<\/p>\n<p>static void WiFiInit(void);<br \/>\nstatic void WaitScanResult(void);<br \/>\nstatic int WaitConnectResult(void);<br \/>\nstatic void OnWifiScanStateChangedHandler(int state, int size);<br \/>\nstatic void OnWifiConnectionChangedHandler(int state, WifiLinkedInfo *info);<br \/>\nstatic void OnHotspotStaJoinHandler(StationInfo *info);<br \/>\nstatic void OnHotspotStateChangedHandler(int state);<br \/>\nstatic void OnHotspotStaLeaveHandler(StationInfo *info);<\/p>\n<p>void DisableWIFI(void)<br \/>\n{<br \/>\n    DisableWifi();<br \/>\n}<\/p>\n<p>static void OnHotspotStaJoinHandler(StationInfo *info)<br \/>\n{<br \/>\n    (void)info;<br \/>\n    printf(&#034;STA join AP\\\\n&#034;);<br \/>\n    return;<br \/>\n}<\/p>\n<p>static void OnHotspotStaLeaveHandler(StationInfo *info)<br \/>\n{<br \/>\n    (void)info;<br \/>\n    printf(&#034;HotspotStaLeave:info is null.\\\\n&#034;);<br \/>\n    return;<br \/>\n}<\/p>\n<p>static void OnHotspotStateChangedHandler(int state)<br \/>\n{<br \/>\n    printf(&#034;HotspotStateChanged:state is %d.\\\\n&#034;, state);<br \/>\n    return;<br \/>\n}<\/p>\n<p>static void WiFiInit(void)<br \/>\n{<br \/>\n    printf(&#034;&lt;&#8211;Wifi Init&#8211;&gt;\\\\r\\\\n&#034;);<br \/>\n    g_wifiEventHandler.OnWifiScanStateChanged &#061; OnWifiScanStateChangedHandler;<br \/>\n    g_wifiEventHandler.OnWifiConnectionChanged &#061; OnWifiConnectionChangedHandler;<br \/>\n    g_wifiEventHandler.OnHotspotStaJoin &#061; OnHotspotStaJoinHandler;<br \/>\n    g_wifiEventHandler.OnHotspotStaLeave &#061; OnHotspotStaLeaveHandler;<br \/>\n    g_wifiEventHandler.OnHotspotStateChanged &#061; OnHotspotStateChangedHandler;<br \/>\n    wifi_error &#061; RegisterWifiEvent(&amp;g_wifiEventHandler);<br \/>\n    if (wifi_error !&#061; WIFI_SUCCESS)<br \/>\n    {<br \/>\n        printf(&#034;register wifi event fail!\\\\r\\\\n&#034;);<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        printf(&#034;register wifi event succeed!\\\\r\\\\n&#034;);<br \/>\n    }<br \/>\n}<\/p>\n<p>static void OnWifiScanStateChangedHandler(int state, int size)<br \/>\n{<br \/>\n    (void)state;<br \/>\n    if (size &gt; 0)<br \/>\n    {<br \/>\n        ssid_count &#061; size;<br \/>\n        g_staScanSuccess &#061; 1;<br \/>\n    }<br \/>\n    return;<br \/>\n}<\/p>\n<p>static int result;<br \/>\nint WifiConnect(const char *ssid, const char *psk)<br \/>\n{<br \/>\n    WifiScanInfo *info &#061; NULL;<br \/>\n    unsigned int size &#061; WIFI_SCAN_HOTSPOT_LIMIT;<br \/>\n    static struct netif *g_lwip_netif &#061; NULL;<br \/>\n    WifiDeviceConfig select_ap_config &#061; {0};<br \/>\n    osDelay(OD_DELAY_200);<br \/>\n    printf(&#034;&lt;&#8211;System Init&#8211;&gt;\\\\r\\\\n&#034;);<br \/>\n    WiFiInit();<br \/>\n    if (EnableWifi() !&#061; WIFI_SUCCESS)<br \/>\n    {<br \/>\n        printf(&#034;EnableWifi failed, wifi_error &#061; %d\\\\n&#034;, wifi_error);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    if (IsWifiActive() &#061;&#061; 0)<br \/>\n    {<br \/>\n        printf(&#034;Wifi station is not actived.\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    info &#061; malloc(sizeof(WifiScanInfo) * WIFI_SCAN_HOTSPOT_LIMIT);<br \/>\n    if (info &#061;&#061; NULL)<br \/>\n    {<br \/>\n        printf(&#034;faild to create wifiscanInfo.\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    do<br \/>\n    {<br \/>\n        ssid_count &#061; 0;<br \/>\n        g_staScanSuccess &#061; 0;<br \/>\n        Scan();<br \/>\n        WaitScanResult();<br \/>\n        wifi_error &#061; GetScanInfoList(info, &amp;size);<br \/>\n    } while (g_staScanSuccess !&#061; 1);<br \/>\n    strcpy_s(select_ap_config.ssid, sizeof(select_ap_config.ssid), ssid);<br \/>\n    printf(&#034;[%s][%s] \\\\r\\\\n&#034;, select_ap_config.ssid, select_ap_config.preSharedKey);<br \/>\n    select_ap_config.securityType &#061; SELECT_WIFI_SECURITYTYPE;<br \/>\n    if (AddDeviceConfig(&amp;select_ap_config, &amp;result) &#061;&#061; WIFI_SUCCESS)<br \/>\n    {<br \/>\n        if (ConnectTo(result) &#061;&#061; WIFI_SUCCESS &amp;&amp; WaitConnectResult() &#061;&#061; 1)<br \/>\n        {<br \/>\n            printf(&#034;WiFi connect succeed!\\\\r\\\\n&#034;);<br \/>\n            wifi_sta_init_state &#061; 1;<br \/>\n        }<br \/>\n    }<br \/>\n    osDelay(OD_DELAY_100);<br \/>\n    return 0;<br \/>\n}<\/p>\n<p>static int WaitConnectResult(void)<br \/>\n{<br \/>\n    int ConnectTimeout &#061; DEF_TIMEOUT;<br \/>\n    while (ConnectTimeout &gt; 0)<br \/>\n    {<br \/>\n        sleep(1);<br \/>\n        ConnectTimeout&#8211;;<br \/>\n        if (g_ConnectSuccess &#061;&#061; 1)<br \/>\n        {<br \/>\n            printf(&#034;WaitConnectResult:wait success[%d]s\\\\n&#034;, (DEF_TIMEOUT &#8211; ConnectTimeout));<br \/>\n            break;<br \/>\n        }<br \/>\n    }<br \/>\n    if (ConnectTimeout &lt;&#061; 0)<br \/>\n    {<br \/>\n        printf(&#034;WaitConnectResult:timeout!\\\\n&#034;);<br \/>\n        return 0;<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>static void OnWifiConnectionChangedHandler(int state, WifiLinkedInfo *info)<br \/>\n{<br \/>\n    (void)info;<br \/>\n    if (state &gt; 0)<br \/>\n    {<br \/>\n        g_ConnectSuccess &#061; 1;<br \/>\n        printf(&#034;callback function for wifi connect\\\\r\\\\n&#034;);<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        g_ConnectSuccess &#061; 0;<br \/>\n        printf(&#034;connect wifi_error, please check password, state:%d, try connect again\\\\r\\\\n&#034;, state);<br \/>\n        esp_wifi_connect();<br \/>\n    }<br \/>\n    return;<br \/>\n}<\/p>\n<p>static void WaitScanResult(void)<br \/>\n{<br \/>\n    int scanTimeout &#061; DEF_TIMEOUT;<br \/>\n    while (scanTimeout &gt; 0)<br \/>\n    {<br \/>\n        sleep(ONE_SECOND);<br \/>\n        scanTimeout&#8211;;<br \/>\n        if (g_staScanSuccess &#061;&#061; 1)<br \/>\n        {<br \/>\n            printf(&#034;WaitScanResult:wait success[%d]s\\\\n&#034;, (DEF_TIMEOUT &#8211; scanTimeout));<br \/>\n            break;<br \/>\n        }<br \/>\n    }<br \/>\n    if (scanTimeout &lt;&#061; 0)<br \/>\n    {<br \/>\n        printf(&#034;WaitScanResult:timeout!\\\\n&#034;);<br \/>\n    }<br \/>\n}<\/p>\n<p id=\"u014f3bca\">\n<h5 id=\"yvJ4s\">wifi_sta_example.c<\/h5>\n<p>\/*<br \/>\n * Copyright (c) 2022 Hunan OpenValley Digital Industry Development Co., Ltd.<br \/>\n * Licensed under the Apache License, Version 2.0 (the &#034;License&#034;);<br \/>\n * you may not use this file except in compliance with the License.<br \/>\n * You may obtain a copy of the License at<br \/>\n *<br \/>\n *    http:\/\/www.apache.org\/licenses\/LICENSE-2.0<br \/>\n *<br \/>\n * Unless required by applicable law or agreed to in writing, software<br \/>\n * distributed under the License is distributed on an &#034;AS IS&#034; BASIS,<br \/>\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br \/>\n * See the License for the specific language governing permissions and<br \/>\n * limitations under the License.<br \/>\n *\/<br \/>\n#include &lt;stdio.h&gt;<br \/>\n#include &#034;securec.h&#034;<br \/>\n#include &#034;cmsis_os2.h&#034;<br \/>\n#include &#034;ohos_run.h&#034;<br \/>\n#include &#034;lwip\/sockets.h&#034;<br \/>\n#include &#034;lwip\/ip_addr.h&#034;<br \/>\n#include &#034;wifi_device.h&#034;<\/p>\n<p>#include &lt;string.h&gt;<\/p>\n<p>#define OPEN_WIFI_NAME &#034;test&#034;<br \/>\n\/\/ #define SERVER_IP&#034;192.168.31.67&#034;<br \/>\n#define SERVER_IP &#034;119.91.109.180&#034;<br \/>\n#define SERVER_PORT 8344<br \/>\n#define OD_DELAY_1000 1000<br \/>\n#define OD_DELAY_100 100<br \/>\n#define RECV_LEN 511<br \/>\n#define STACK_SIZE 4096<br \/>\n#define PRIORITY 25<\/p>\n<p>osThreadId_t wifi_test_id &#061; NULL;<\/p>\n<p>void wifi_test(void)<br \/>\n{<br \/>\n  int sock &#061; -1;<br \/>\n  struct sockaddr_in client_addr;<br \/>\n  char recv_data[512] &#061; {0};<br \/>\n  int recv_data_len;<br \/>\n  WifiConnect(OPEN_WIFI_NAME);<br \/>\n  printf(&#034;start wifi_test test\\\\r\\\\n&#034;);<br \/>\n  while (1)<br \/>\n  {<br \/>\n    sock &#061; socket(AF_INET, SOCK_STREAM, 0);<br \/>\n    if (sock &lt; 0)<br \/>\n    {<br \/>\n      printf(&#034;Socket error\\\\n&#034;);<br \/>\n      osDelay(OD_DELAY_100);<br \/>\n      continue;<br \/>\n    }<br \/>\n    memset_s(&amp;(client_addr), sizeof(client_addr), 0, sizeof(client_addr));<br \/>\n    client_addr.sin_family &#061; AF_INET;<br \/>\n    client_addr.sin_port &#061; htons(SERVER_PORT);<br \/>\n    client_addr.sin_addr.s_addr &#061; inet_addr(SERVER_IP);<br \/>\n    printf(&#034;try connect to server &#034; SERVER_IP &#034; :%d \\\\n&#034;, SERVER_PORT);<br \/>\n    if (connect(sock, (struct sockaddr *)&amp;client_addr, sizeof(struct sockaddr)) &#061;&#061; -1)<br \/>\n    {<br \/>\n      closesocket(sock);<br \/>\n      osDelay(OD_DELAY_1000);<br \/>\n      continue;<br \/>\n    }<br \/>\n    printf(&#034;Connect to tcp server successful!\\\\n&#034;);<br \/>\n    write(sock, &#034;cmd&#061;1&amp;uid&#061;4e2a189d769e4511bd5885742aa3edcb&amp;topic&#061;ledtest\\\\r\\\\n&#034;, strlen(&#034;cmd&#061;1&amp;uid&#061;4e2a189d769e4511bd5885742aa3edcb&amp;topic&#061;ledtest\\\\r\\\\n&#034;));<br \/>\n    while (1)<br \/>\n    {<br \/>\n      recv_data_len &#061; recv(sock, recv_data, RECV_LEN, 0);<br \/>\n      if (recv_data_len &lt;&#061; 0)<br \/>\n      {<br \/>\n        break;<br \/>\n      }<br \/>\n      else<br \/>\n      {<br \/>\n        recv_data[recv_data_len] &#061; &#039;\\\\0&#039;;<br \/>\n        printf(&#034;recv: %s\\\\n&#034;, recv_data);<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n}<\/p>\n<p>static void wifi_test_example(void)<br \/>\n{<br \/>\n  osThreadAttr_t attr;<br \/>\n  attr.name &#061; &#034;wifi_test&#034;;<br \/>\n  attr.attr_bits &#061; 0U;<br \/>\n  attr.cb_mem &#061; NULL;<br \/>\n  attr.cb_size &#061; 0U;<br \/>\n  attr.stack_mem &#061; NULL;<br \/>\n  attr.stack_size &#061; STACK_SIZE;<br \/>\n  attr.priority &#061; PRIORITY;<br \/>\n  wifi_test_id &#061; osThreadNew((osThreadFunc_t)wifi_test, NULL, &amp;attr);<br \/>\n  if (wifi_test_id &#061;&#061; NULL)<br \/>\n  {<br \/>\n    printf(&#034;Failed to create wifi_test thread!\\\\n&#034;);<br \/>\n  }<br \/>\n}<\/p>\n<p>OHOS_APP_RUN(wifi_test_example);<\/p>\n<p id=\"ud139db80\">\n<p id=\"ua36ac21a\">BUILD.gn<\/p>\n<p># Copyright (c) 2022 Hunan OpenValley Digital Industry Development Co., Ltd.<br \/>\n# Licensed under the Apache License, Version 2.0 (the &#034;License&#034;);<br \/>\n# you may not use this file except in compliance with the License.<br \/>\n# You may obtain a copy of the License at<br \/>\n#<br \/>\n#     http:\/\/www.apache.org\/licenses\/LICENSE-2.0<br \/>\n#<br \/>\n# Unless required by applicable law or agreed to in writing, software<br \/>\n# distributed under the License is distributed on an &#034;AS IS&#034; BASIS,<br \/>\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br \/>\n# See the License for the specific language governing permissions and<br \/>\n# limitations under the License.<br \/>\nimport(&#034;\/\/kernel\/liteos_m\/liteos.gni&#034;)<\/p>\n<p>module_name &#061; get_path_info(rebase_path(&#034;.&#034;), &#034;name&#034;)<br \/>\nkernel_module(module_name) {<br \/>\n    sources &#061; [<br \/>\n        &#034;wifi_sta_example.c&#034;,<br \/>\n        &#034;wifi_sta_connect.c&#034;<br \/>\n    ]<br \/>\n    include_dirs &#061; [<br \/>\n        &#034;\/\/foundation\/communication\/wifi_lite\/interfaces\/wifiservice&#034;,<br \/>\n        &#034;\/\/device\/board\/esp\/esp32\/liteos_m\/hals\/driver\/wifi_lite&#034;<br \/>\n    ]<br \/>\n} <\/p>\n<h4 id=\"c364I\">\u79fb\u690d\u6b65\u9aa4<\/h4>\n<p id=\"u66858144\">\u79fb\u690d\u672c\u4ee3\u7801\u4e2d\u6709\u51e0\u4e2a\u90e8\u5206\u9700\u8981\u6ce8\u610f&#xff1a;<\/p>\n<p id=\"ufe3f5cb9\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"61\" id=\"u0f857b61\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220425-6802cc69b7c9a.png\" width=\"368\" \/><\/p>\n<li id=\"ubb0ae028\">\u6240\u8fde\u63a5\u7684\u70ed\u70b9\u5fc5\u987b\u662f\u5f00\u653e\u76842.4G\u70ed\u70b9&#xff08;\u6ca1\u6709\u5bc6\u7801&#xff09;<\/li>\n<p id=\"u3c126ab0\">\u4fee\u6539\u8fde\u63a5\u70ed\u70b9\u540d\u65b9\u6cd5&#xff1a;\u5c06wifi_sta_example.c\u4e2dOPEN_WIFI_NAME\u7684\u5b8f\u5b9a\u4e49\u4fee\u6539\u4e3a\u70ed\u70b9\u540d\u5373\u53ef<\/p>\n<li id=\"uaddcaa3d\">\u53c2\u8003\u5df4\u6cd5\u4e91\u5e73\u53f0\u63a5\u5165\u6587\u6863 &#8211; TCP\u534f\u8bae\u4e2d \u63a5\u53e3\u5730\u5740\u5e94\u662f&#xff1a;<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"180\" id=\"u6558c1a6\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220425-6802cc69d12cf.png\" width=\"738\" \/><\/p>\n<p id=\"u1f9835a4\">\u4f46\u7ecf\u7b14\u8005\u6d4b\u8bd5&#xff0c;\u76f4\u63a5\u586b\u5165&#034;bemfa.com&#034;\u65e0\u6cd5\u8fde\u63a5\u4e0a\u8be5\u670d\u52a1\u5668&#xff0c;\u63a8\u6d4b\u662f\u65e0\u6cd5\u8fdb\u884cDNS\u89e3\u6790&#xff0c;\u6240\u4ee5\u6211\u4eec\u76f4\u63a5\u8fde\u63a5IP\u5730\u5740&#xff0c;\u53ef\u4ee5\u901a\u8fc7cmd\u6253\u5f00windows\u7ec8\u7aef &#8211; ping bemfa.com\u67e5\u770b\u57df\u540d\u5bf9\u5e94\u7684IP\u5730\u5740<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"480\" id=\"u27c59127\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220425-6802cc69ecf61.png\" width=\"960\" \/><\/p>\n<li id=\"u161fad8c\">\u5df4\u6cd5\u4e91\u63d0\u4f9b\u7684TCP\u670d\u52a1\u5668\u662f\u57fa\u4e8e\u8ba2\u9605\/\u53d1\u5e03&#xff08;\u7b80\u5316\u7248MQTT&#xff09;\u7684\u670d\u52a1&#xff0c;\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5411\u670d\u52a1\u5668\u53d1\u9001\u547d\u4ee4\u7684\u65b9\u5f0f\u5bf9\u4e3b\u9898\u8fdb\u884c\u8ba2\u9605\u4e0e\u53d1\u5e03\u3002<\/li>\n<h4 id=\"k8wr5\">\u5df4\u6cd5\u4e91TCP\u5ba2\u6237\u7aef\u63a5\u5165\u8be6\u89e3<\/h4>\n<h5 id=\"T0BKC\">\u547d\u4ee4\u5b57\u6bb5\u8bf4\u660e<\/h5>\n<p id=\"u4a21f8c7\">cmd&#xff1a;\u6d88\u606f\u7c7b\u578b<\/p>\n<p>cmd&#061;1 \u65f6\u4e3a\u8ba2\u9605\u6d88\u606f&#xff0c;\u5f53\u8bbe\u5907\u53d1\u9001\u4e00\u6b21\u6b64\u6d88\u606f\u7c7b\u578b&#xff0c;\u4e4b\u540e\u5c31\u53ef\u4ee5\u6536\u5230\u53d1\u5f80\u8be5\u4e3b\u9898\u7684\u6d88\u606f<\/p>\n<p>cmd&#061;2 \u65f6\u4e3a\u53d1\u5e03\u6d88\u606f&#xff0c;\u5411\u8ba2\u9605\u8be5\u4e3b\u9898\u7684\u8bbe\u5907\u53d1\u9001\u6d88\u606f<\/p>\n<p>cmd&#061;3 \u662f\u8ba2\u9605\u6d88\u606f&#xff0c;\u548ccmd&#061;1\u76f8\u540c&#xff0c;\u5e76\u4e14\u4f1a\u62c9\u53d6\u4e00\u6b21\u5df2\u53d1\u9001\u8fc7\u7684\u6d88\u606f<\/p>\n<p>cmd&#061;7 \u662f\u83b7\u53d6\u65f6\u95f4&#xff0c;\u83b7\u53d6\u5f53\u524d\u5317\u4eac\u65f6\u95f4<\/p>\n<p>cmd&#061;9 \u4e3a\u9057\u5631\u6d88\u606f&#xff0c;\u62c9\u53d6\u4e00\u6b21\u5df2\u7ecf\u53d1\u9001\u7684\u6d88\u606f <\/p>\n<p id=\"u3309e94c\">uid&#xff1a;\u7528\u6237\u79c1\u94a5<\/p>\n<p>\u53ef\u5728\u63a7\u5236\u53f0\u83b7\u53d6 <\/p>\n<p id=\"uf38dda03\">topic&#xff1a;\u7528\u6237\u4e3b\u9898<\/p>\n<p>\u53ef\u4ee5\u5728\u63a7\u5236\u53f0\u521b\u5efa\u4e3b\u9898&#xff0c;\u683c\u5f0f\u4e3a\u82f1\u6587\u6216\u6570\u5b57&#xff0c;\u76f8\u5f53\u4e8e\u8bbe\u5907\u6807\u8bc6 <\/p>\n<p id=\"ua24f68d2\">msg: \u4e3a\u6d88\u606f\u4f53<\/p>\n<p>\u7528\u6237\u60f3\u8981\u53d1\u9001\u5230\u67d0\u4e2a\u4e3b\u9898\u7684\u6570\u636e <\/p>\n<p id=\"u6246dc68\">\u7b26\u53f7\u8bf4\u660e<\/p>\n<p>\\\\r\\\\n: \u4e3a\u56de\u8f66\u6362\u7b26&#xff0c;\u6bcf\u6761\u6307\u4ee4\u540e\u90fd\u9700\u8981\u6709\u56de\u8f66\u6362\u884c\u3002<br \/>\n&amp;: \u4e3a\u8fde\u63a5\u7b26&#xff0c;\u5404\u5b57\u6bb5\u95f4\u7528&#039;&amp;&#039;\u9694\u79bb\u3002 <\/p>\n<p id=\"ucb0eb42d\">\u5fc3\u8df3\u8bf4\u660e<\/p>\n<p>\u53d1\u9001\u4efb\u610f\u6570\u636e \u4e3a\u5fc3\u8df3\u6d88\u606f,\u5305\u62ec\u4e0a\u8ff0\u6307\u4ee4\u4e5f\u7b97\u662f\u5fc3\u8df3&#xff0c;\u4f46\u8981\u4ee5\u56de\u8f66\u6362\u884c\u7ed3\u5c3e\u3002<br \/>\n\u5fc3\u8df3\u6d88\u606f\u662f\u544a\u8bc9\u670d\u52a1\u5668\u8bbe\u5907\u8fd8\u5728\u7ebf&#xff0c;\u5efa\u8bae60\u79d2\u53d1\u9001\u4e00\u6b21&#xff0c;\u8d85\u8fc765\u79d2\u672a\u53d1\u9001\u5fc3\u8df3\u4f1a\u6389\u7ebf\u3002 <\/p>\n<p id=\"u54309612\">\n<h5 id=\"pL9mS\">\u8ba2\u9605\u4e3b\u9898<\/h5>\n<p id=\"ud57e2d6b\">\u8ba2\u9605\u4e3b\u9898&#xff0c;\u5355\u6b21\u6700\u591a\u8ba2\u9605\u516b\u4e2a\u4e3b\u9898<\/p>\n<p>cmd&#061;1&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;topic&#061;xxx1,xxx2,xxx3,xxx4\\\\r\\\\n <\/p>\n<p id=\"uc984f185\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>cmd&#061;1&amp;res&#061;1 <\/p>\n<p id=\"ucd9f1b15\">\n<h5 id=\"mSuKz\">\u53d1\u5e03<\/h5>\n<p>cmd&#061;2&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;topic&#061;light002&amp;msg&#061;off\\\\r\\\\n <\/p>\n<p id=\"u3b683580\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>cmd&#061;2&amp;res&#061;1 <\/p>\n<h5 id=\"esHHy\">\u8ba2\u9605\u4e3b\u9898&#xff0c;\u5e76\u83b7\u53d6\u4e00\u6761\u5386\u53f2\u6d88\u606f<\/h5>\n<p>cmd&#061;3&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;topic&#061;light002\\\\r\\\\n <\/p>\n<p id=\"u58683a29\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>cmd&#061;3&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;topic&#061;light002&amp;msg&#061;on <\/p>\n<h5 id=\"vfPBq\">\u83b7\u53d6\u4e00\u6b21\u65f6\u95f4<\/h5>\n<p>cmd&#061;7&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;type&#061;1\\\\r\\\\n <\/p>\n<p id=\"u1044df1f\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>2021-06-11 16:39:27<br \/>\ntype&#061;1 \u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4&#xff0c;\u4f8b\u5982&#xff1a;2021-06-11 17:20:54<\/p>\n<p>type&#061;2 \u83b7\u53d6\u5f53\u524d\u65f6\u95f4&#xff0c;\u4f8b\u5982&#xff1a;17:20:54<\/p>\n<p>type&#061;3 \u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u6233&#xff0c;\u4f8b\u5982&#xff1a;1623403325 <\/p>\n<h5 id=\"Qprcu\">\u83b7\u53d6\u4e00\u6b21\u5df2\u53d1\u6d88\u606f<\/h5>\n<p>cmd&#061;9&amp;uid&#061;7d54f85af42976ee3c2693e6xxxxxxxx&amp;topic&#061;light002\\\\r\\\\n <\/p>\n<p id=\"u38834019\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>cmd&#061;9&amp;uid&#061;xxxxxxxxxxxxxxxxxxxxxxx&amp;topic&#061;light002&amp;msg&#061;on <\/p>\n<h5 id=\"ZRmCe\">\u53d1\u9001\u5fc3\u8df3<\/h5>\n<p>ping\\\\r\\\\n <\/p>\n<p id=\"ufe5211be\">\u6b63\u5e38\u8fd4\u56de&#xff1a;<\/p>\n<p>cmd&#061;0&amp;res&#061;1 <\/p>\n<p id=\"u22c00e28\">\u53d1\u9001\u4efb\u610f\u6570\u636e&#xff0c;\u5e76\u4ee5\\\\r\\\\n\u7ed3\u5c3e&#xff0c;\u90fd\u4e3a\u5fc3\u8df3\u6d88\u606f,\u5305\u62ec\u4e0a\u8ff0\u53d1\u5e03\u3001\u8ba2\u9605\u6307\u4ee4\u4e5f\u90fd\u7b97\u662f\u5fc3\u8df3\u3002 \u5fc3\u8df3\u6d88\u606f\u662f\u544a\u8bc9\u670d\u52a1\u5668\u8bbe\u5907\u8fd8\u5728\u7ebf&#xff0c;\u5efa\u8bae60\u79d2\u53d1\u9001\u4e00\u6b21&#xff0c;\u8d85\u8fc765\u79d2\u672a\u53d1\u9001\u5fc3\u8df3\u4f1a\u6389\u7ebf\u3002<\/p>\n<h5 id=\"o0KFL\">set \u6307\u4ee4<\/h5>\n<p id=\"u52aa6f70\">\u63a8\u9001\u6d88\u606f\u65f6&#xff1a;\u4e3b\u9898\u540d\u540e\u52a0\/set\u63a8\u9001\u6d88\u606f&#xff0c;\u8868\u793a\u5411\u6240\u6709\u8ba2\u9605\u8fd9\u4e2a\u4e3b\u9898\u7684\u8bbe\u5907\u4eec\u63a8\u9001\u6d88\u606f&#xff0c;\u5047\u5982\u63a8\u9001\u8005\u81ea\u5df1\u4e5f\u8ba2\u9605\u4e86\u8fd9\u4e2a\u4e3b\u9898&#xff0c;\u6d88\u606f\u4e0d\u4f1a\u88ab\u63a8\u9001\u7ed9\u5b83\u81ea\u5df1&#xff0c;\u4ee5\u9632\u6b62\u81ea\u5df1\u63a8\u9001\u7684\u6d88\u606f\u88ab\u81ea\u5df1\u63a5\u6536\u3002 \u4f8b\u5982\u5411\u4e3b\u9898 light002\u63a8\u9001\u6570\u636e&#xff0c;\u53ef\u4e3a light002\/set \u3002<\/p>\n<p id=\"u14be678f\">\u793a\u4f8b&#xff1a;<\/p>\n<p>cmd&#061;2&amp;uid&#061;4d9ec352e0376f2110a0c601a2857225&amp;topic&#061;light002\/set&amp;msg&#061;on <\/p>\n<h5 id=\"xKUWo\">up \u6307\u4ee4<\/h5>\n<p id=\"ub9e5ba25\">\u63a8\u9001\u6d88\u606f\u65f6&#xff1a;\u4e3b\u9898\u540d\u540e\u52a0\/up\u63a8\u9001\u6d88\u606f&#xff0c;\u8868\u793a\u53ea\u66f4\u65b0\u4e91\u7aef\u6570\u636e&#xff0c;\u4e0d\u8fdb\u884c\u4efb\u4f55\u63a8\u9001\u3002 \u4f8b\u5982\u5411\u4e3b\u9898 light002\u63a8\u9001\u6570\u636e&#xff0c;\u53ef\u4e3alight002\/up\u3002<\/p>\n<p id=\"u7ac1cec9\">\u793a\u4f8b&#xff1a;<\/p>\n<p>cmd&#061;2&amp;uid&#061;4d9ec352e0376f2110a0c601a2857225&amp;topic&#061;light002\/up&amp;msg&#061;on <\/p>\n<h5 id=\"cabbu\">app \u6307\u4ee4<\/h5>\n<p id=\"ufd1a3203\">\u8ba2\u9605\u65f6&#xff1a;\u4e3b\u9898\u540d\u540e\u52a0\/app\u8ba2\u9605\u4e3b\u9898&#xff0c;\u4e0d\u4f1a\u5360\u7528\u8bbe\u5907\u5728\u7ebf\u72b6\u6001&#xff0c;\u5373\u4e0d\u4f1a\u663e\u793a\u8bbe\u5907\u5728\u7ebf&#xff0c;\u53ef\u7528\u4e8eapp\u3001\u5c0f\u7a0b\u5e8f\u7b49\u8ba2\u9605\u65f6\u4f7f\u7528\u3002<\/p>\n<p id=\"uf17b4a3f\">\u793a\u4f8b&#xff1a;<\/p>\n<p>cmd&#061;1&amp;uid&#061;4d9ec352e0376f2110a0c601a2857225&amp;topic&#061;light002\/app <\/p>\n<p id=\"uefaf2b81\">\n<h4 id=\"yOLOV\">\u7f16\u8bd1\u5e76\u70e7\u5f55<\/h4>\n<p id=\"uf5cd32af\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"183\" id=\"u75c67629\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220426-6802cc6a283f2.png\" width=\"615\" \/><\/p>\n<p id=\"u33bdb036\">\u5728\u6e90\u7801\u6839\u76ee\u5f55\u4e0b\u4f7f\u7528hb\u5de5\u5177\u5bf9\u5199\u597d\u7684\u4ee3\u7801\u8fdb\u884c\u7f16\u8bd1<\/p>\n<p id=\"u6b4dca5f\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"93\" id=\"Viwcw\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220426-6802cc6a451c6.png\" width=\"727\" \/><\/p>\n<p id=\"u7a936ca5\">\u9009\u62e9mini\u7ea7\u7cfb\u7edf<\/p>\n<p id=\"u800fa331\">\u540c\u7406 \u4ea7\u54c1\u9009\u62e9esp\u516c\u53f8\u4e0b\u7684esp32<\/p>\n<p id=\"ubebc087b\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"176\" id=\"O07R1\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220426-6802cc6a5f195.png\" width=\"664\" \/><\/p>\n<p id=\"u3ff41fb3\">\u9009\u62e9\u5b8c\u6bd5\u540e\u5728\u6e90\u7801\u6839\u76ee\u5f55\u4e0b\u6267\u884chb build -f \u8fdb\u884c\u7f16\u8bd1<\/p>\n<p id=\"u047480d6\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"84\" id=\"Ha24q\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220426-6802cc6a7ecf2.png\" width=\"661\" \/><\/p>\n<p id=\"u90eb27c3\">\u7f16\u8bd1\u5b8c\u6210\u540e\u4f1a\u6709\u5982\u4e0b\u754c\u9762,\u5e76\u4e14\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u56fa\u4ef6\u4f4d\u4e8e&#xff1a;out\\\\esp32\\\\esp32<\/p>\n<p id=\"ue9c1e722\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1200\" id=\"LrUNk\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220426-6802cc6a97778.png\" width=\"1200\" \/><\/p>\n<p id=\"u456f4b2c\">\u4f7f\u7528\u70e7\u5f55\u8f6f\u4ef6\u8fdb\u884c\u70e7\u5f55&#xff1a;<\/p>\n<p id=\"u9a6ea4ca\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"678\" id=\"u9576b595\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220427-6802cc6bec894.png\" width=\"426\" \/><\/p>\n<p id=\"u9e09a925\">\u70b9\u51fbstart&#xff0c;\u7b49\u5f85\u70e7\u5f55\u5b8c\u6210<\/p>\n<h4 id=\"s8fpf\" style=\"background-color:transparent\">\u5b9e\u9a8c\u73b0\u8c61<\/h4>\n<p id=\"ue5486b84\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"555\" id=\"jarlG\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220428-6802cc6c1a0c7.png\" width=\"707\" \/><\/p>\n<p id=\"u99854165\">\u6309\u4e0bESP32\u5f00\u53d1\u677f\u4e0a\u7684EN\u952e,\u5373\u53ef\u89c2\u5bdf\u5230\u5b9e\u9a8c\u73b0\u8c61:<\/p>\n<p id=\"u550e3bd3\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"555\" id=\"ua8c863be\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220428-6802cc6c3eb8b.png\" width=\"707\" \/><\/p>\n<p id=\"ucad35e52\">\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u5df2\u7ecf\u6210\u529f\u8fde\u63a5\u4e0aTCP\u670d\u52a1\u5668&#xff0c;\u6211\u4eec\u6253\u5f00\u4e91\u5e73\u53f0\u67e5\u770b\u662f\u5426\u6709\u5ba2\u6237\u7aef\u5bf9\u4e3b\u9898ledtest\u8fdb\u884c\u4e86\u8ba2\u9605<\/p>\n<p id=\"u35b830ea\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"316\" id=\"u1a7ab538\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220428-6802cc6c6422d.png\" width=\"733\" \/><\/p>\n<p id=\"u8f1e9ac5\">\u6211\u4eec\u5c1d\u8bd5\u5728\u4e91\u5e73\u53f0\u8fdb\u884c\u624b\u52a8\u53d1\u5e03\u4fe1\u606f&#xff1a;hello openharmony&#xff01;<\/p>\n<p id=\"ua315df14\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"337\" id=\"u0ce81c4a\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220428-6802cc6c83017.png\" width=\"779\" \/><\/p>\n<p id=\"u72d9859a\">\u5728\u4e32\u53e3\u52a9\u624b\u4e0a\u6210\u529f\u6253\u5370\u51fa\u4e86\u8be5\u4fe1\u606f<\/p>\n<p id=\"u08dec84a\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"555\" id=\"u366727d0\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220428-6802cc6cabdf8.png\" width=\"706\" \/><\/p>\n<p id=\"u754daf49\">\u540e\u7eed\u5927\u5bb6\u81ea\u884c\u5c06\u624b\u52a8\u53d1\u5e03\u4fe1\u606f\u6539\u6210\u4f7f\u7528\u547d\u4ee4\u7684\u65b9\u5f0f\u8fdb\u884c\u53d1\u5e03\u5373\u53ef&#xff01;\u8ba2\u9605\u76f8\u540c\u4e3b\u9898\u7684\u8bbe\u5907\u90fd\u53ef\u4ee5\u6536\u5230\u53d1\u5e03\u7684\u4fe1\u606f&#xff01;\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u00a0\u672c\u9879\u76ee\u4ee3\u7801\u5df2\u4e0a\u4f20\u81f3gitee&#xff1a;ESP32_Oh: ESP32\u79fb\u690dOpenharmony<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.5k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf32\u6b21\u3002TCP \u662f\u4e00\u79cd\u9762\u5411\u8fde\u63a5\u7684\u3001\u53ef\u9760\u7684\u3001\u57fa\u4e8e\u5b57\u8282\u6d41\u7684\u4f20\u8f93\u5c42\u901a\u4fe1\u534f\u8bae\uff0c\u4f20\u8f93\u5c42\u534f\u8bae\u5e38\u7528\u7684\u6709TCP\u548cUDP\uff0c\u50cf\u5e38\u89c1\u7684http\u534f\u8bae\u6216mqtt\u534f\u8bae\uff0c\u90fd\u662f\u5728TCP\u4e0a\u4f20\u8f93\u7684\uff0cTCP\u7528\u9014\u5e7f\u6cdb\uff0c\u4e00\u822c\u53ef\u4ee5\u8054\u7f51\u7684\u8bbe\u5907\uff0c\u90fd\u652f\u6301TCP\u534f\u8bae\u4f20\u8f93\u3002\u8ba2\u9605\u3001\u53d1\u5e03\u7b80\u4ecb\u901a\u4fd7\u7684\u6765\u8bb2\uff0c\u8ba2\u9605\u3001\u53d1\u5e03\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4fe1\u53f7\u8ba2\u9605\uff1a\u8ba2\u9605\u67d0\u4e00\u4e2a\u4e3b\u9898\uff0c\u8ba2\u9605\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u6536\u5230\u53d1\u5f80\u8be5\u4e3b\u9898\u7684\u6d88\u606f\u3002\u53d1\u5e03\uff1a\u5411\u67d0\u4e2a\u4e3b\u9898\u53d1\u9001\u6d88\u606f\u3002\u4f8b\u5982\uff1a\u5f53\u67d0\u4e2a\u8bbe\u5907\u8ba2\u9605\u4e86\u4e3b\u9898\u201cX\u201d\uff0c\u8fd9\u65f6\u5411\u4e3b\u9898\u201cX\u201d\u53d1\u9001\u7684\u4efb\u4f55\u6d88\u606f\uff0c\u8bbe\u5907\u90fd\u53ef\u4ee5\u6536\u5230\uff0c\u56e0\u4e3a\u8bbe\u5907\u5df2\u7ecf\u8ba2\u9605\u4e0a\u4e86\u8be5\u4e3b\u9898\u3002\u76f4\u63a5\u4e0a\u5e72\u8d27\uff01_openharmony lwip<\/p>\n","protected":false},"author":2,"featured_media":22461,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280,67,270,220,1737],"topic":[],"class_list":["post-22479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-harmonyos","tag-67","tag-270","tag-220","tag-1737"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/22479.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.5k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf32\u6b21\u3002TCP \u662f\u4e00\u79cd\u9762\u5411\u8fde\u63a5\u7684\u3001\u53ef\u9760\u7684\u3001\u57fa\u4e8e\u5b57\u8282\u6d41\u7684\u4f20\u8f93\u5c42\u901a\u4fe1\u534f\u8bae\uff0c\u4f20\u8f93\u5c42\u534f\u8bae\u5e38\u7528\u7684\u6709TCP\u548cUDP\uff0c\u50cf\u5e38\u89c1\u7684http\u534f\u8bae\u6216mqtt\u534f\u8bae\uff0c\u90fd\u662f\u5728TCP\u4e0a\u4f20\u8f93\u7684\uff0cTCP\u7528\u9014\u5e7f\u6cdb\uff0c\u4e00\u822c\u53ef\u4ee5\u8054\u7f51\u7684\u8bbe\u5907\uff0c\u90fd\u652f\u6301TCP\u534f\u8bae\u4f20\u8f93\u3002\u8ba2\u9605\u3001\u53d1\u5e03\u7b80\u4ecb\u901a\u4fd7\u7684\u6765\u8bb2\uff0c\u8ba2\u9605\u3001\u53d1\u5e03\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4fe1\u53f7\u8ba2\u9605\uff1a\u8ba2\u9605\u67d0\u4e00\u4e2a\u4e3b\u9898\uff0c\u8ba2\u9605\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u6536\u5230\u53d1\u5f80\u8be5\u4e3b\u9898\u7684\u6d88\u606f\u3002\u53d1\u5e03\uff1a\u5411\u67d0\u4e2a\u4e3b\u9898\u53d1\u9001\u6d88\u606f\u3002\u4f8b\u5982\uff1a\u5f53\u67d0\u4e2a\u8bbe\u5907\u8ba2\u9605\u4e86\u4e3b\u9898\u201cX\u201d\uff0c\u8fd9\u65f6\u5411\u4e3b\u9898\u201cX\u201d\u53d1\u9001\u7684\u4efb\u4f55\u6d88\u606f\uff0c\u8bbe\u5907\u90fd\u53ef\u4ee5\u6536\u5230\uff0c\u56e0\u4e3a\u8bbe\u5907\u5df2\u7ecf\u8ba2\u9605\u4e0a\u4e86\u8be5\u4e3b\u9898\u3002\u76f4\u63a5\u4e0a\u5e72\u8d27\uff01_openharmony lwip\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22479.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T22:04:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220423-6802cc67b5424.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22479.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22479.html\",\"name\":\"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T22:04:29+00:00\",\"dateModified\":\"2025-04-18T22:04:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22479.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22479.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22479.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/22479.html","og_locale":"zh_CN","og_type":"article","og_title":"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.5k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf32\u6b21\u3002TCP \u662f\u4e00\u79cd\u9762\u5411\u8fde\u63a5\u7684\u3001\u53ef\u9760\u7684\u3001\u57fa\u4e8e\u5b57\u8282\u6d41\u7684\u4f20\u8f93\u5c42\u901a\u4fe1\u534f\u8bae\uff0c\u4f20\u8f93\u5c42\u534f\u8bae\u5e38\u7528\u7684\u6709TCP\u548cUDP\uff0c\u50cf\u5e38\u89c1\u7684http\u534f\u8bae\u6216mqtt\u534f\u8bae\uff0c\u90fd\u662f\u5728TCP\u4e0a\u4f20\u8f93\u7684\uff0cTCP\u7528\u9014\u5e7f\u6cdb\uff0c\u4e00\u822c\u53ef\u4ee5\u8054\u7f51\u7684\u8bbe\u5907\uff0c\u90fd\u652f\u6301TCP\u534f\u8bae\u4f20\u8f93\u3002\u8ba2\u9605\u3001\u53d1\u5e03\u7b80\u4ecb\u901a\u4fd7\u7684\u6765\u8bb2\uff0c\u8ba2\u9605\u3001\u53d1\u5e03\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u4fe1\u53f7\u8ba2\u9605\uff1a\u8ba2\u9605\u67d0\u4e00\u4e2a\u4e3b\u9898\uff0c\u8ba2\u9605\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u6536\u5230\u53d1\u5f80\u8be5\u4e3b\u9898\u7684\u6d88\u606f\u3002\u53d1\u5e03\uff1a\u5411\u67d0\u4e2a\u4e3b\u9898\u53d1\u9001\u6d88\u606f\u3002\u4f8b\u5982\uff1a\u5f53\u67d0\u4e2a\u8bbe\u5907\u8ba2\u9605\u4e86\u4e3b\u9898\u201cX\u201d\uff0c\u8fd9\u65f6\u5411\u4e3b\u9898\u201cX\u201d\u53d1\u9001\u7684\u4efb\u4f55\u6d88\u606f\uff0c\u8bbe\u5907\u90fd\u53ef\u4ee5\u6536\u5230\uff0c\u56e0\u4e3a\u8bbe\u5907\u5df2\u7ecf\u8ba2\u9605\u4e0a\u4e86\u8be5\u4e3b\u9898\u3002\u76f4\u63a5\u4e0a\u5e72\u8d27\uff01_openharmony lwip","og_url":"https:\/\/www.wsisp.com\/helps\/22479.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T22:04:29+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220423-6802cc67b5424.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22479.html","url":"https:\/\/www.wsisp.com\/helps\/22479.html","name":"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T22:04:29+00:00","dateModified":"2025-04-18T22:04:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22479.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22479.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22479.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ESP32\u79fb\u690dOpenharmony\u7269\u8054\u7f51\u5b9e\u6218 - LwIP+\u5df4\u6cd5\u4e91TCP\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=22479"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22479\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22461"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22479"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}