
Chapter 4 – Data Exchange for Protocol Services
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437C) 25
Socket Data Exchange +WIPDATA
Description: The +WIPDATA command is used to read/write from/to a socket. On successful
execution of the command, the UART switches to data mode. The UART can be
switched back to AT mode by sending “+++” with 1 second guard time before and
after the sequence. If data is not read using +WIPDATA command, further data will
be delayed.
An unsolicited event is received when there is a data to read on socket.
Data can be sent on the sockets using two modes
• continuous mode
• continuous transparent mode
Description Notes:
• The SIM card must be inserted in order to use this command
• The PIN 1/ CHV 1 code must be entered in order to use this command.
• The PIN 2/CHV 2 code does not have to be entered in order to use this
command.
• The +WIND general indication command value from which +WIPCREATE
is allowed is 4. This value (4) indicates that the product is ready to process
AT commands (except phonebooks, AOC, SMS), but is still in emergency
mode. See Appendix A – GSM/GPRS +WIND AT Command.
Continuous Mode: TCP Sockets in Continuous Mode
In continuous mode, an [ETX] character is considered as an end of data. When an
[ETX] character is sent on the mapped UART, the TCP socket is shutdown and the
peer side is informed of this shutdown with the indication
"[CR][LF]SHUTDOWN[CR][LF]" on the mapped UART.
In case an [EXT]/[DLE] character needs to be transmitted as data, it should be
preceded by a [DLE] character. Similarly, [EXT]/[DLE] characters received by the
TXP/IP stack from the Internet are sent to the host through the serial port preceded
by a [DLE] character.
To close sockets, switch the UART to AT command mode and use the
+WIPCLOSE command.
UDP Sockets in Continuous Mode
UDP is a connectionless protocol, and, hence, there is no way to detect or cause a
shutdown. However, an [ETX] character is used to mark the boundaries of
datagrams.
All data written on an UDP socket is collected till an [ETX] character is encountered
or the maximum size of the datagram
1
is reached and will be sent as a single
datagram. Similarly when reading data, all data will be read till an [ETX] character
is encountered which indicates the end of the datagram.
1
Maximum size of an UDP datagram has been fixed to 5840 Bytes. This limit
is an arbitrary one. Nevertheless, note that smaller the datagram is the surer it
will reach the aimed destination. Note that UDP is not a reliable transport layer.
In case an [ETX]/[DLE] character needs to be transmitted, it should be preceded by
[DLE] character similar to TCP socket.
When the UART leaves DATA mode, either because of “+++” escape sequence or
because of an AT+WIPDATA=1, index, 0 on another UART, the currently unsent
data are sent as a single datagram.
Komentarze do niniejszej Instrukcji