
Chapter 17 – TCP APP AT Commands
TCP/IP Service Option Handling +WIPOPT
Description:
Syntax:
The +WIPOPT command is used to read and/or configure different parameters on sockets.
Command syntax: AT+WIPOPT=<protocol>,<idx>,<action>,<optnum>[,<optval>]
Command
AT+WIPOPT=2,1,1,0
Note: Display local port number for connection on TCP
socket 1
AT+WIPOPT=2,1,1,2
Note: Display peer IP address of the connection on TCP
socket 1
AT+WIPOPT=1,2,1,6
Note: Display bytes available to be read on UDP socket 2
AT+WIPOPT=2,2,2,8,32
Possible Responses
+WIPOPT: 2,0,56228
OK
Note: Display is +WIPOPT:
<protocol>,<optnum>,<result>
+WIPOPT: 2,2,"192.168.13.34"
OK
+WIPOPT: 1,6,23
OK
OK
Note: Set Time to Live for TCP socket 2 to value of 32
AT+WIPOPT? ERROR
Values:
<protocol>
1: UDP
2: TCP client
3: TCP server
<idx>
1-8
<action>
1
2
Socket or session identifier
Read (<optval> not allowed)
Write (<optval> required)
<optnum> Option to read or write (see Options and Values listed next)
<optval>
Options and Values:
Value of option to write (see Options and Values listed next)
O ptnum
Value
Description
UDP
TCP
TCP
Format
Clien t
S erve r
0
1
2
3
0-65535
0-65535
String
0-1
Local port number of the socket
Port of the peer socket
Address of the peer socket
Specifies whether the socket is bound to a peer
R
R
R
R
R
R
R
R
R
-
-
-
socket or not (see 18.11.5)
default: 1
4
536-36864
Size in bytes of the local transmit buffer.
-
RW
RW
default: 10240
5
536-65535
Size in bytes of the local receive buffer.
-
RW
RW
default: 16384
6
0-65535
Number of bytes that can currently be read on
R
R
-
the socket
7
0-1
When set to TRUE, TCP packets are sent
-
RW
RW
immediately, even if the buffer is not full
enough.
When set to FALSE, the packets will be sent
either,
a) by combining several small packets into a
bigger packet
b) when the data is ready to send and the
stack is idle.
default: 0
Multi-Tech Systems, Inc. CDMA C1 AT Commands Reference Guide (PN S000478C)
105