![background image](http://html1.mh-extra.com/html/patton-electronics/etherbits-2211/etherbits-2211_getting-started-manual_4062529042.webp)
TCP Server Mode Operations
42
Models 2211 & 2232 Getting Started Guide
5 • Host Mode configuration
TCP Server Mode Operations
The device server works as a TCP server, and the default TCP state is [Listen] in this mode. The device server
supports only one TCP socket connection per one serial port. If a connection is currently established, the addi-
tional connection requests will be rejected. The remote host will be either Ethernet-Serial communication
devices acting as a TCP client or a socket program acting as a TCP client running on users' PC.
1) Typical State Transition
[Listen] --> [Sync-Received] --> [Established] --> [Data] --> [Closed] --> [Listen]
At start-up, an initial TCP state is [Listen]. If there is any incoming TCP connection request, the state will be
changed into [Sync-Received], then [Established], which means a session is opened. For a while, data will be
transferred between the hosts. This is the [Data] state. The session will be disconnected due to the request of
one of them, which is [Closed] state. And then, the state is automatically changed to its original state, [Listen].
2) Operations
Serial data transfer
When a session has been established, the device server reads the data from the serial port buffer till internal
serial buffer is full or inter-character time interval reaches the time specified as inter-character timeout value.
Then, it transfers the data to the IP address of the remote host. If there's no remote host connected to the
device server, all the incoming data from the serial port are discarded.
Session disconnection
The connected session will be disconnected when the remote host sends disconnection request or when no
data transfer activity is found through the serial port for a certain amount of time, which is
“Inactivity timeout”.