User guide

Chapter 17 – TCP APP AT Commands
Multi-Tech Systems, Inc. CDMA C1 AT Commands Reference Guide (PN S000478C) 104
Socket Data Exchange +WIPDATA
Description: The +WIPDATA command is used to read from or write to a socket. On successful execution of
the command, the UART switches to online data mode. The UART can be switched back to
online command mode (AT mode with PPP data call established) by sending an escape
sequence (“+++”) within a 1 second guard time before and after the sequence. De-asserting DTR
can also switch the mode from Data mode to Online Command mode (depending on the &D
setting). If data is not read using +WIPDATA command, further data will be delayed.
Syntax: Command syntax: AT+WIPDATA=<protocol>,<index>,<mode>
Command Possible Responses
AT+WIPDATA=<protocol>,<index>,<mode> CONNECT
AT+WIPDATA=? OK
AT+WIPDATA?
OK
or displays pending data in socket as follows:
Note: if <protocol> equals 1:
+WIPDATA: <protocol>,<index>,<datagram
size>,<peer IP>,<peer port>
Note: if <protocol> equals 2:
+WIPDATA: <protocol>,<index>,<number of
readable bytes>
Values: <protocol>
1 UDP
2 TCP client
<index>
1-8 Socket or session identifier
<mode> Mode of operation.
1 Continuous Mode
Data mode used by UDP sockets. Data is collected from UART until the [ETX]
character is encountered in the data stream, or until the maximum size of the buffer is
reached, then sent as a single datagram. If the [ETX] character needs to be
transmitted then it must be preceded by the [DLE] character. This mode is only
supported by UDP protocol.
2 Continuous Transparent Mode
Data mode used by TCP sockets. All data received on UART is treated as data. In
this mode, [DLE]/[ETX] characters are considered as normal data and not special
characters. This mode is only supported for TCP protocol.
+WIPDATA Unsolicited Response:
The +WIPDATA unsolicited response is output when data is received on a given
socket while in Online Command mode. If data is not read using +WIPDATA
command, further data will be delayed and +WIPDATA will not be shown.