Specifications

Table Of Contents
Chapter 17 TCP App AT Commands
Multi-Tech Systems, Inc. CDMA C1 AT Commands Reference Guide 107
TCP/IP Service Option Handling +WIPOPT
Description: The +WIPOPT command is used to read and/or configure different parameters on sockets.
Syntax: AT+WIPOPT=<protocol>,<idx>,<action>,<optnum>[,<optval>]
Command
Possible Responses
AT+WIPOPT=2,1,1,0
Note: Display local port number for connection on TCP
socket 1
+WIPOPT: 2,0,56228
OK
Note: Display is +WIPOPT:
<protocol>,<optnum>,<result>
AT+WIPOPT=2,1,1,2
Note: Display peer IP address of the connection on TCP
socket 1
+WIPOPT: 2,2,"192.168.13.34"
OK
AT+WIPOPT=1,2,1,6
Note: Display bytes available to be read on UDP socket 2
+WIPOPT: 1,6,23
OK
AT+WIPOPT=2,2,2,8,32
Note: Set Time to Live for TCP socket 2 to value of 32
OK
AT+WIPOPT?
ERROR
Values: <protocol>
1 UDP
2 TCP client
3 TCP server
<idx>
1-8 Socket or session identifier
<action>
1 Read (<optval> not allowed)
2 Write (<optval> required)
<optnum> Option to read or write (see Options and Values listed next)
<optval> Value of option to write (see Options and Values listed next)
Options and
Values:
Optnum
Value
Format
Description
UDP
TCP
Client
TCP
Server
0
0-65535
Local port number of the socket
R
R
R
1
0-65535
Port of the peer socket
R
R
-
2
String
Address of the peer socket
R
R
-
3
0-1
Specifies whether the socket is bound to a peer
socket or not. See notes below.
default: 1
R
-
4
536-36864
Size in bytes of the local transmit buffer.
default: 10240
-
RW
RW
5
536-65535
Size in bytes of the local receive buffer.
default: 16384
-
RW
RW
6
0-65535
Number of bytes that can currently be read on
the socket
R
R
-
7
0-1
When set to TRUE, TCP packets are sent
immediately, even if the buffer is not full
enough.
-
RW
RW