TCP/IP
The WM IoT SDK uses the following open-source protocol stacks:
By default, the WM IoT SDK uses the LWIP protocol stack.
TCP/IP Model
The TCP/IP model of the WM IoT SDK is shown in the figure below:
The following events are included:
WM_EVENT_WIFI_STA_GOT_IP :
Station obtains an IPv4 address.
WM_EVENT_WIFI_STA_GOT_IP6 :
Station obtains an IPv6 address.
WM_EVENT_WIFI_STA_LOST_IP :
Station loses the IPv4 address.
WM_EVENT_WIFI_STA_LOST_IP6 :
Station loses the IPv6 address.
WM_EVENT_WIFI_AP_STAIPASSIGNED :
SoftAP successfully assigns an IP address to a connected Station.
LWIP Protocol Stack
The specific APIs of the LWIP TCP/IP protocol stack in the WM IoT SDK are as follows:
BSD Socket API:
The BSD Socket API is a common cross-platform TCP/IP socket API that originated from the Berkeley Software Distribution of the UNIX operating system and is now standardized as part of the POSIX specification.
In the WM IoT SDK, LWIP supports all common usages of the BSD Socket API.
Netconn API:
In the WM IoT SDK, LWIP supports two lower-level APIs, namely the Netconn API and the Raw API:
The LWIP Raw API is suitable for single-threaded devices.
The Netconn API is used internally within LWIP to utilize the BSD Socket API. Compared to the BSD Socket API, this API occupies fewer resources.
Attention
Generally, it is recommended to use the BSD Socket API.
For more information on the Netconn API, please refer to the `Unofficial lwIP Application Developer's Manual<https://lwip.fandom.com/wiki/Netconn_API>`_.
IPv6:
WM IoT SDK supports the IPv6 protocol.
FreeRTos TCP Protocol Stack
Currently not supported.
BSD TCP/IP Protocol Stack
Currently not supported.