
Chapter 4 – Data Exchange for Protocol Services
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437C) 29
Socket Data Exchange +WIPDATA Continued
Examples:
Command Responses
AT+WIPDATA=2,5,1
Note; TCP Client with index 5 can send/read
data in continuous mode
CONNECT
<read/write data>
+++
OK
Note; +++ sequence causes the UART to switch to
AT mode
AT+WIPDATA=1,5,1
Note; UDP with index 5 can send/read data in
continuous mode
CONNECT
<read/write data>
+++
OK
Note; +++ sequence causes the UART to switch to
AT mode
AT+WIPDATA=1,5,1
Note; UDP with index 5 can send/read data in
continuous mode
CONNECT
<read/write data>
<ETX>
OK
Note; [ETX] character indicates end of data
AT+WIPDATA=2,5,2
Note: TCP with index 5 can send/read data in
continuous transparent mode
CONNECT
<read/write data>
+++
OK
Note; +++ sequence causes the UART to switch to
AT mode
Notes:
Continuous Mode (Non Transparent) for a TCP Mapped Socket
If the [ETX] character is sent from the peer, it is considered as an end of data transfer. After sending an
[ETX] character, the socket will be shut down and the peer will be informed of this shutdown by a
"[CR][LF]SHUTDOWN[CR][LF]" indication on its mapped UART. The UART does not switch to AT mode.
This indicates that no more data can be sent from the host socket, but it can receive data.
Shutdown Procedure for a TCP Socket
In the following schematic, a TCP socket is connected. On the transmitting side, data and an [EXT]
character are sent (use case: Desktop PC1 is a Wireless CPU which sends data to PC2 which is either a
PC or a Wireless CPU), the data is received on PC2 and an [EXT] character shutdowns the socket on the
transmitting side and displays a message "[CR][LF]SHUTDOWN[CR][LF]" on the mapped UART of PC2.
When PC2 is switched back to AT mode, the "+WIPPEERCLOSE:<protocol>,<idx>" indication is received
indicating that no more data can be sent by PC1 but can read data sent from PC2.
There are different indications received for shutdown and reset for a TCP socket. When a TCP socket is
reset, an [EXT] character is sent on the mapped UART to indicate the end of communication. The
mapped UART switches to AT mode and "+CME ERROR: 843" is displayed on the UART. The reset and
shutdown can, therefore, be distinguished by the indications received on the UART.
Comentarios a estos manuales