![](http://datasheet.mmic.net.cn/Microchip-Technology/MCW1001AT-I-SS_datasheet_98973/MCW1001AT-I-SS_25.png)
2011 Microchip Technology Inc.
Preliminary
DS70671A-page 25
MCW1001A
6.0
MESSAGING API
The API between the host processor and the MCW1001A can be divided into two logical groups of commands. The first
set of commands deal with 802.11 connection management, while the second set deals with the BSD Socket Interface.
In addition to commands sent from the host to the MCW1001A, several asynchronous messages can be transmitted
directly from the MCW1001A to the host like:
IP address assigned
802.11 connection status changed
802.11 scan results ready
Ping response event
Error Event (including Reset condition)
The size of the transmit and receive buffers for the serial API are limited for MCW1001A. While, it is possible for the
host to receive a message from the MCW1001A as large as 1536 bytes, it is possible only to transmit messages to the
MCW1001A in 500 byte packets.
6.1
Overview
The WiComm-Socket Serial interface supports UART communication with a host system using no parity, 8 data bits,
and 2 stop bits (N,8,2). By default, the baud rate is 115200 BPS, but autobaud may be used to adjust this rate. The rate
at which the host sends the first character to WiComm-Socket (0x55) determines the data rate. The allowed values are
between 300 baud and 230400 baud.
6.2
WiComm-Socket Packet Format
Figure 6-1 shows the packet format for all serial messages exchanged between the host and WiComm-Socket.
FIGURE 6-1:
HOST CPU PACKET FORMAT
Header0 – Always 0x55
Header1– Always 0xAA
MsgType – 16-bit field containing the message type
Msg Data Length – 16-bit field containing the number of data bytes that follow (can be 0)
Msg Data – Message data bytes
Trailer – Always one byte equal to 0x45
From the perspective of the host, WiComm-Socket has a little-endian interface. All 16 and 32-bit message fields are
represented in an little-endian format.
Where an IP address is specified, 16 bytes are allocated for future compatibility with IPv6. However, for the current
implementation of WiComm-Socket, IPv4 is used exclusively, and the first (left most) 4 bytes of the 16 byte field refer to
the IPv4 address.
Header0
(1)
Header1
(1)
Msg Type
(2)
Msg Data Length
(2)
Msg Data
(0 thru N)
Trailer
(1)