![Multi-Tech ModemModule GPRS Скачать руководство пользователя страница 31](http://html1.mh-extra.com/html/multi-tech/modemmodule-gprs/modemmodule-gprs_reference-manual_1854075031.webp)
Chapter 5 – TCP Socket Services
Multi-Tech Systems, Inc. AT Commands for Wireless Modems with IP Connectivity (S000333D)
31
#LTCPTXDELAY Time Delay
Definition:
This parameter determines the time delay introduced before sending a TCP frame that has not been
entirely filled with user data. The time is entered in milliseconds, and it should be noted that a value of 0
initiates the sending of a TCP frame as soon as possible after the reception of a single character value
from the host.
Values:
Integer multiple of 20 between 0 and 32760 inclusive.
Default 100.
id:
{1,2}
Syntax:
Set Value: AT#TCPTXDELAY=id,value>
Get Value: AT#TCPTXDELAY=id or AT#VTCP=id, AT#VALL
#LTCPSTART Open Listening Mode
Definition:
This command, sent by the attached host, directs the TCP/IP stack to open a listening TCP connection
on the specified TCP port.
Once an IP link is established, the attached host can open a listening TCP socket at any time (except
when the TCP/IP stack software is already in a process using TCP resources).
The TCP connection will be active upon reception of a TCP connection request sent by a remote
allowed TCP peer (TCPSERV) on the appropriate TCP port (TCPPORT).
Once opened, this TCP connection may be closed by the remote TCP peer or by the attached host by
sending an ETX character on the serial port (depending on the DLEMODE parameter).
Notes:
The LTCP command can be aborted before an incoming TCP request has been received by issuing an
<ETX> character on the serial port.
If the DLEMODE parameter is set to 1, the TCP/IP stack will interpret an <ETX> character only as a
close request if a <DLE> character does not precede it. 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 the DLEMODE parameter is set to 0, the TCP/IP stack will never close the TCP connection (unless an
error occurs).
Values:
Read
Parameters:
DLEMODE
TCPPORT
TCPSERV
TCPTXDELAY
id:
{1,2}
Syntax:
AT#LTCPSTART=id, with id one of {1,2}
Command
Possible Responses
AT#LTCPSTART=1
Note: Active listening
mode
OK_Info_WaitingForData
Note:
This message signals that an allowed remote TCP peer has opened
the TCP socket. The TCP connection is now 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.
AT#LTCPSTART=2 Ok_Info_SocketClosed
OK Note: The TCP socket is closed.
AT#LTCPSTART=1
#CME ERROR: <value>
Notes: 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’.