User’s Guide

Protocols and Packet Assembly Features

6.3. Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP) is an advanced transmission protocol that adds substantial functionality to the underlying Internet Protocol it is built on. Because of this structure it is often referred to as TCP/IP. The advantage of TCP is reliability of data transmission; achieved by using positive acknowledgements with automatic retransmission if required. The main disadvantage is the overhead needed to provide this reliability under various conditions.

Unlike UDP, TCP offers both reliable and connected data transmission service. Lost, delayed, duplicated, or out of sequence packets are detected and automatically corrected. A logical point- to-point connection is established and maintained throughout the communications session. It requires very little other than session establishment, sending data over the serial port, and session termination to get a basic application operational.

The price for this reliability is the number of extra data packets used and the time required to process them. Both need to be considered when selecting an application protocol.

The DART 300 is capable of acting as a client – originating sessions by “dialing” a remote IP and port, or as a server – opening a session when a connection request arrives from a remote client.

Once a session is opened, the modem handles packet assembly and disassembly for outgoing and incoming data respectively. For details on packet assembly and forwarding see Section 6.6 below.

6.3.1.TCP Handshaking

Connection establishment requires a three-way handshake between the caller (client) and the receiver (server). Once established, there is an optional inactivity timer available in the modem to monitor the connection. If the connection is idle for the time specified, the session is closed.

There is also a closing handshake between TCP partners. This is the significant advantage in using TCP with “dumb” local hosts. The modem can act as a server, opening the session when requested by the polling client. The client can then close the session when done and the DART 300 modem will also close the server side of the session, without the need of commands from the local host. UDP is not capable of doing this.

6.3.2.TCP Server Features

When acting as a server, the modem can restrict connections to specified “friendly” IP addresses (Section 5.1 above). Server sessions can be answered automatically or under AT command control from the local host.

The modem will listen to a specific port (set in +WS212) for client requests. All callers must send packets to the modem’s IP address (NEI) and this port number. Packets addressed to a different port will be discarded.

6.3.2.1.Answering TCP Server Sessions

Server sessions are opened when the modem answers a calling client. The modem can be set to auto-answer (S0=1), the default, or have the host control answering (S0=0). When a TCP connection request arrives, the modem notifies the host with the Ring Indicator (RI) signal and RING message, under the flow control described in Section 4.4.2 above. When answered, the modem sends the CONNECT message and asserts the DCD signal.

When a session is opened, the modem handles packet assembly and disassembly for outgoing and incoming data respectively. For details on packet assembly and forwarding see Section 6.6 below.

The session belongs to the calling client IP address and port exclusively. While the session is open, connection requests from other clients will be quietly declined.

2110212 Rev 1.0

Page 43

Page 54
Image 54
Sierra Wireless DART 300 manual Transmission Control Protocol TCP, TCP Handshaking, TCP Server Features