TCP/IP
The WM IoT SDK defaults to using the LWIP protocol stack.
TCP/IP Model
The TCP/IP model of the WM IoT SDK is illustrated in the following diagram:
The following events are included:
WM_EVENT_WIFI_STA_GOT_IP :
The station has obtained an IPv4 address.
WM_EVENT_WIFI_STA_GOT_IP6 :
The station has obtained an IPv6 address.
WM_EVENT_WIFI_STA_LOST_IP :
The station has lost its IPv4 address.
WM_EVENT_WIFI_STA_LOST_IP6 :
The station has lost its IPv6 address.
WM_EVENT_WIFI_AP_STAIPASSIGNED :
The SoftAP has successfully assigned 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 Standard Distribution of the UNIX operating system and has now been 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 by LWIP to implement the BSD Socket API. Compared to the BSD Socket API, this API consumes 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 .
IPv6:
The WM IoT SDK supports the IPv6 protocol.