PortStore5 Manual
HW group
www.HW-group.com
35
Basic types of communication
Very brief overview of basic concepts. For a detailed version with a list of abbreviations etc., see our
website (under “Support, Download”).
TCP Server (passive mode)
When the device is turned on, it listens at the specified port and waits for a client to connect. When
the client connects, data from the Ethernet are sent over the serial line, and vice versa, data from the
serial line are sent over the Ethernet. When no client is connected and there are incoming data from
the serial line, the data are stored to the buffer (configurable size) and sent immediately after
reconnection (unless the option to clear the buffer when a client connects is configured in SETUP).
TCP Client (active mode)
The device acts as a server (described above). In addition, when there are incoming data from the
serial line, it actively tries to establish a connection as a client with a specified remote IP address and
transfer the data.
If that fails, data are stored into the buffer and transferred whenever a connection is established
(regardless of whether the converter is a client or a server).
UDP
Data from the Ethernet are sent to the serial line. Incoming data from the RS232 serial line are
assembled into packets according to configured rules and sent to the configured IP address. In UDP
mode, there are no acknowledgment checks; the application itself must tolerate data loss.
The advantage is a somewhat faster response time, which is particularly useful for RS-485 lines.
NVT (Network Virtual Terminal)
When using TCP/IP communication, the device capabilities include a NVT (RFC2217) compliant
control stream that can be used e.g. to change the serial port baudrate, control inputs and outputs or
clear the buffer. These control commands are included in the data stream and prefixed with “FF”
(data bytes of this value must then be doubled). For a detailed NVT description, see the
“Programming Ethernet applications” guide (which also describes the freely supplied communication
subroutines) or a separate article at our website.
VSP (virtual serial port)
The device is in the TCP Server mode and the PC behaves as a TCP client. The
HW VSP
software is
installed at the PC in order to create a virtual serial port (e.g. COM6). The serial port at the device
then acts as a physical port at your PC, even though it may be far away.
When buffering is enabled, data are again stored to the internal buffer whenever the TCP connection
is disconnected, and transferred after the connection is established.
If, in your scenario, it is more advantageous to initiate the connection by the device and per-packet
data charges apply (e.g. GPRS), it is possible to configure the device as a TCP Client/Server and
switch the VSP to the TCP Server mode. Connection (bidirectional of course) is then established
whenever data are received at the serial port.