2. Serial Protocols
ROS® v3.11User Guide
48
RMC30
2.2.1.5. Use of Port Redirectors
Port redirectors refer to software packages that emulate the existence of serial
communications ports. The redirector software creates and makes these “virtual” serial ports
available, providing access to the network via a TCP connection.
When a software package uses one of the virtual serial ports, a TCP connection request is
sent to a remote IP address and IP port that have been programmed into the redirector. Some
redirectors also offer the ability to accept connection requests.
The RawSocket protocol is the one most frequently used on RuggedServer for connection
to serial port redirection software. The TelnetComPort protocol may be used in place of
RawSocket if the redirection software on the other end of the connection also supports
the serial break command, as defined in RFC2217. In TelnetComPort mode, a serial break
received from the remote RFC2217-compatible client will be transmitted as a serial break on
the configured serial port, and a break signal received on the serial port will be transmitted as
an RFC2217-compatible break signal to the remote client. Note that a break signal on a serial
port is defined as a condition where the serial data signal is in 'space', or logic zero, state for
longer than the time needed to transmit one whole character, including start and stop bits.
2.2.1.6. Message Packetization
The serial server buffers received characters into packets in order to improve network
efficiency and demarcate messages.
The server uses three methods to decide when to packetize and forward the buffered
characters to the network:
• Packetize on a specific character.
• Packetize on timeout.
• Packetize on a specific packet size.
If configured to packetize on a specific character, the server will examine each received
character and will packetize and forward upon receiving the configured character. The
character is usually a <CR> or an <LF> character but may be any 8 bit (0 to 255) value.
If configured to packetize on a timeout, the server will wait for a configurable time after receiving
a character before packetizing and forwarding. If another character arrives during the waiting
interval, the timer is restarted. This method allows characters transmitted as part of an entire
message to be forwarded to the network in a single packet, when the timer expires after
receiving the very last character of the message.
Some polling software packages which perform well under DOS have been known
to experience problems when used with Windows-based software or port redirection
software. If the OS does not expedite the transmission of characters in a timely
fashion, pauses in transmission can be interpreted as the end of a message.
Messages can be split into separate TCP packets. A locally attached RuggedServer
or a port redirector could packetize and forward the message incorrectly. Solutions
include tuning the OS to prevent the problem or increasing the packetizing timer.
Finally, the server will always packetize and forward on a specific packet size, i.e. when the
number of characters received from the serial port reaches a configured value.