User guide

Part 1 – AT Commands for All Universal IP Devices Chapter 5 – TCP Commands
Universal IP AT Commands Reference Guide (Document S000457H) 40
#LTCPSTOP – Close TCP Listening Mode
Definition: This command directs the TCP/IP stack to close a TCP listening mode (previously launched by
the AT#LTCPSTART command.
Syntax: AT#LTCPSTOP=id
id: Enter a Profile Setting: 1 or 2 {1,2}
Values: DLEMODE
TCPPORT
TCPSERV
TCPTXDELAY
#OTCP – Open a TCP Connection
Definition: This command sent by the attached host directs the TCP/IP stack to open a TCP connection to
the specified TCP server. Once an IP link is established, the attached host can open a TCP
connection at any time (except when the TCP/IP stack software is already in a process using
TCP resources).
This TCP connection may be closed by the remote TCP server or by the attached host via
sending an ETX character on the serial port (depending on the DLEMODE parameter).
DLEMODE Value Notes:
Depending on the DLEMODE value, the attached host may close this TCP connection by sending
an ETX character.
If the DLEMODE parameter is set to 1, the TCP/IP stack will only interpret an <ETX> character
as a close request if it’s not preceded by a <DLE> character. As a consequence, the attached
host must send <ETX> characters preceded by <DLE> characters, and it must also code
<DLE> characters in <DLE><DLE>. Similarly, each <ETX> character present in the payload
data of the TCP frame will be coded by the TCP/IP stack on the serial port as <DLE><ETX>.
Each <DLE> character will be coded as <DLE><DLE>. The attached host must then decode
the TCP socket flow to remove these escape characters.
If DLEMODE is set to 0, the host cannot close the TCP connection (unless an error occurs).
If the remote TCP server closes the connection, the TCP/IP stack sends an ETX character on the
serial port.
Syntax: AT#OTCP=id
id: Enter a Profile Setting: 1 or 2 {1,2}
Values: DLEMODE
TCPPORT
TCPSERV
TCPTXDELAY
#OUTPORT – UDP/TCP Local Port Number
Definition: Controls the local port that the UDP/TCP connection is bound to.
Syntax: Set Value: AT#OUTPORT=<Port Number value>
View Values: AT#OUTPORT? or AT#VALL
Values: Set the port number local connection will use:
From 1 to 5 numeric digits (0 to 9).
Note: Numbers above 65,535 are illegal since port identification fields are 16-bits long in the
IDP header.
Default: 0