Specifications

Chapter 18 – TCP/IP App AT Commands
Multi-Tech Systems, Inc. CDMA AT Commands Reference Guide (PN S000294K) 136
<socket> The number of an open socket.
<length> The number of bytes in the payload parameter not including the required <cr> character. This
value is an ASCII character decimal number. TCP range 1 – 536, UDP range 1 – 1330.
<cr> Required separator character; value 0x0d.
<payload> The binary data to be transmitted on the specified socket. confidential © Page : 249/ 313 This
document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged
without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne
peut être communiqué ou divulgué à des tiers sans son autorisation préalable.
Note: This command functions only when a traffic channel is present or the module is not dormant.
Syntax: Command syntax: AT+WSTX=<type>,<socket>,<length><cr><payload>
Command Possible responses
AT+WSTX=0,0,4<cr>0x54 0x45 0x53 0x54
Note: Transmit “TEST” on TCP socket zero.
OK
+WSTX: 0,0,4
Note: Payload transmitted.
AT+WSTX=0,1,4<cr>0x54 0x45 0x53 0x54
Note: Transmit “TEST” on TCP socket one.
ERROR
+WSTE: 0,1,114
Note: Socket not connected error.
AT+WSTX=1,2,4<cr>0x54 0x45 0x53 0x54
Note: Transmit “TEST” on UDP socket two.
OK
+WSTX: 1,2,4
Note: Payload transmitted.
AT+WSTX?
Note: Show last used command parameters.
+WSTX: 1,2,4
OK
Note: Last used command parameters displayed.
Read Receive Data +WSRX
Description: This command is used to read and clear the socket receive data buffer when received data polling has been
specified by the +WCRX command for the socket type. A valid socket type and socket number must be
specified and the socket must be open. The +WSRX unsolicited response is used to return the received
socket data to the host application.
The software returns payload data up to approximately 600 bytes using a single +WSRX unsolicited
response. This limit does not effect TCP sockets since the maximum TCP packet size is 536 bytes. For UDP
sockets, where the payload packet size can be larger, multiple +WSRX unsolicited responses will be used
as necessary to return the packet data to the host application. Each response will contain the next
sequential part of the received UDP packet data. When using received data polling and a large UDP packet
size, the host application must be designed to handle multiple +WSRX responses for each AT+WSRX
command that is issued.
Values: <type>
0 TCP
1 UDP
<socket> The number of an open socket.
Syntax: Command syntax: AT+WSRX=<type>,<socket>
Command Possible responses
AT+WSRX=0,1
Note: Read the pending TCP data.
+WSKS: 0,1,2
Note: Data available on TCP socket one.
+WSRX: 0,1,536:TEST …
OK
Note: Data “TEST” read from TCP socket one input buffer.
Input buffer cleared.
AT+WSRX=1,2
Note: Read the pending UDP data.
+WSKS: 1,2,2
Note: Data available on UDP socket two.
+WSRX: 1,2,600:TEST …
+WSRX: 1,2,300: …
OK
Note: A 900 byte packet beginning with “TEST” read from
UDP socket two input buffer. Input buffer cleared.
AT+WSRX?
Note: Show last used command parameters.
+WSRX: 1,2
OK
Note: Last used command parameters displayed.
AT+WSRX=?
Note: Display command parameter ranges.
+WSRX: (0-1),(0-3)
OK