![background image](http://html1.mh-extra.com/html/patton-electronics/etherbits-2211/etherbits-2211_getting-started-manual_4062529047.webp)
TCP Server/Client Mode Operations
47
Models 2211 & 2232 Getting Started Guide
5 • Host Mode configuration
Destination IP address and destination TCP Port are the information on the remote host to which the device
server will try to connect in TCP client mode. The IP address (or domain name) should be specified together
with the TCP port number.
Cyclic connection interval is the time interval at which the device server will try to connect to the remote host
regardless of the existence of incoming data from the serial port. If the interval is specified with a valid value
other than 0, the function is enabled. The time interval will be the specified value by the unit of minute. If the
interval is entered as 0, cyclic connection feature will be disabled.
Inactivity timeout is the same as described in TCP server mode setting section.
The following example shows how to set TCP client mode:
> set host tcpc 192.168.1.1 6001 10 300
OK
>
TCP Server/Client Mode Operations
The 2211 works as either TCP server or client according to the situation. This will be the typical mode for
most applications, since it will transfer the data either from serial port or from TCP port. The default TCP
state is [Listen] which is the same as that of TCP server mode.
1) Typical State Transition
[Listen] --> [Sync-Received] --> [Established] --> [Data] --> [Closed] --> [Listen]
Or
[Listen] --> [Sync-Sent] --> [Established] --> [Data] --> [Closed] --> [Listen]
The initial state is [Listen]. If there are data coming from the serial port, it will connect to the remote host as a
TCP client. If there is incoming connection request from the remote host, it will accept the connection as a
TCP server, and then transfer data through the serial port. Thus, users can assume that the 2211 is always con-
nected to the specified remote host.
2) Operations
The only difference from TCP server mode is that the 2211 will try to connect and send serial data to the
remote host even if the TCP session is not established. The difference from TCP client mode is that it will