Appendix A – Getting Started Examples
Multi-Tech Systems, Inc. AT Commands for Wireless Modems with IP Connectivity (S000333D)
48
TCP Socket
Open a TCP socket between machines. One machine acts as a caller (TCP client); the other acts as a listener (TCP
server). Both machines have to be connected to the Internet and set to the same TCP port.
Act as a TCP Server: AT#LTCPSTART
Commands
Responses
AT#TCPSERV=1,”255.255.255.255”
Note: No filter of the incoming TCP client
OK
AT#TCPPORT=1,”23”
Note: TCP port between the TCP client and the
TCP server must be the same
OK
AT#LTCPSTART=1
Note: Launch the listening mode; waiting for an
incoming TCP connection from a TCP client
OK
OK_Info_WaitingForDate
Note: Message sent over the serial port in case of successful
TCP socket opening (Telnet for example in the IP address)
Data
Note: Data flow is bidirectional
Data
Note: Data flow is bidirectional
Note: The socket can be closed locally by the
attached host sending an [ETX] character
(CTRL+C on the keyboard)
OK
Note: The socket can be closed by the remote
OK_Info_SocketClosed
OK
Act as a TCP Client: AT#OTCP
Commands
Responses
AT#TCPSERV=1,”xxx.xxx.xxx.xxx”
Note: No filter of the incoming TCP client
OK
AT#TCPPORT=1,”23”
Note: TCP port between the TCP client and the
TCP server must be the same
OK
AT#OTCP=1
Note: Open as a TCP client, a socket TCP with
remote TCP server
OK_Info_WaitingForDate
Note: Message notifying the socket opening and the switch in
data mode
Data
Note: Data flow is bidirectional
Data
Note: Data flow is bidirectional
Note: The socket can be closed locally by the
attached host sending an [ETX] character
(CTRL+C on the keyboard)
OK
Note: The socket can be closed by the remote
OK_Info_SocketClosed
OK
Note: The closing of the socket can be performed either locally or remotely.