
Chapter 5 – TCP Socket Services
Multi-Tech Systems, Inc. AT Commands for Wireless Modems with IP Connectivity (S000333B) 31
#OTCP Open 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.
Values: Read Parameters:
DLEMODE
TCPPORT
TCPSERV
Syntax: AT#OTCP
Command Possible Responses
AT#OTCP
Request
TCP
socket
open
OK_Info_WaitingForData
Note: This message signals that the TCP socket has been opened.
All the data from the attached host / remote TCP server is then immediately
transferred by the TCP/IP stack to the remote TCP server / attached host.
Depending on the DLEMODE value, the attached host may close this TCP
connection by sending an ETX character. If the remote TCP server closes the
connection, the TCP/IP stack issues an ETX character on the serial port.
OK_Info_SocketClosed
OK
Note: The TCP socket is closed.
AT#OTCP #CME ERROR: 38027
Note: The address of the FTP server has not been resolved by the secondary DNS
server.
TCP/IP stack is not able to reach the primary and secondary DNS servers or a
wrong FTP server address has been filled in.
AT#OTCP #CME ERROR: <value>
Note: An error has occurred during the TCP connection. This connection is being
closed.
If this error occurs once the TCP connection opened, it is preceded by an ETX
character
See section ‘Response messages and error codes’.
#VTCP Display TCP Parameters
Definition: This command directs the TCP/IP stack to display all the AT# parameters related to the TCP socket
configuration.
Values: Read Parameters:
DLEMODE
TCPPORT
TCPSERV
Syntax: AT#VTCP
Command Possible Responses
AT#VTCP
Note: View TCP parameters
#DLEMODE: 1
#TCPPORT: “”
#TCPSERV: 0
OK
Kommentare zu diesen Handbüchern