Introduction
41
Models 2211 & 2232 Getting Started Guide
5 • Host Mode configuration
Basic
set
command usage for host mode configuration is as follows:
set host hostmode par1 par2 ...
where,
hostmode: tcps=TCP server / tcpc=TCP client / tcpsc=TCP server & client
parameters:
if hostmode = TCP server (tcps),
par1 = listening TCP port,
par2 = inactivity timeout (sec)
if hostmode = TCP client (tcpc),
par1 = destination IP address,
par2 = destination TCP port,
par3 = cyclic connection interval (min),
par4 = inactivity timeout (sec)
if hostmode = TCP server & client (tcpsc),
par1 = listening TCP_port,
par2 = destination IP address,
par3 = destination TCP port,
par4 = cyclic connection interval (min),
par5 = inactivity timeout (sec)
* set cyclic connection interval to 0 not to use cyclic connection
* set inactivity timeout to 0 for unlimited timeout
For easier understanding of TCP modes, a simplified
State Transition Diagram
is often used. And too help
users understand the diagram, the TCP state of the device server is briefly described as follow:
•
Listen:
It represents “a waiting for a connection request from any remote host”. It is a default start-up mode
when it is set as TCP server mode. This state is valid only in TCP server mode operation.
•
Closed:
It means “No connection state at all”. If the data transfer is completed, the state is changed to this
state if one of the host requests disconnection request. If it is in TCP server mode, the state is automatically
changed to [Listen] mode. It is a default start-up mode when it is set as TCP client mode or TCP server/client
mode.
•
Sync-Received:
In TCP server mode, the state will be changed from [Listen] to [Sync-Received], if any
remote host sends connection request. If the device server accepts the request, the state will be changed into
[Established]. This state is not valid in TCP client mode.
•
Sync-Sent:
If the device server sends a connection request to a remote host, the state is changed from
[Closed] to [Sync-Sent]. This state is maintained until the remote host accepts the connection request. This
state is valid only in TCP client mode.
•
Established:
It represents “an open connection”. If one of the hosts accepts a connection request from the
other host, the connection is opened and state is changed into [Established].
•
Data:
When it is in [Established] state, data from a host will be transferred to the other one. For easier
understanding of the TCP session operation, we called the state as [Data] state when actual data transfer is
performed. Actually, the [Data] mode is a part of [Established] state as is described in the RFC 793 [Trans-
mission Control Protocol]. This is a normal state for the data transfer phase of the connection.