User guide

Configure Serial Port Settings
Chapter 1 Command Line Configuration Tasks 25
When changes to port-sharing settings take effect
Some changes will not take effect until all clients have closed a port. If this
is the case, the “set sharing” command will print a warning message
saying:
“Warning: Some port sharing parameter changes will not take effect until all
clients have closed the port.”
Some changes take effect immediately, for example, changing the control,
changing the timeout value, or increasing the maximum number of clients
clients if the “clients” option is already larger than 1 (so that port sharing is
already on).
About flow control on shared ports
All open shared ports share the same underlying input data buffers, so they
must remain roughly in sync in the input data stream. For example, if one
client stops reading data, the other clients sharing that same physical port
can only read one buffer full of data ahead before they must wait for the
first client to catch up.
To overcome this limitation that all clients must remain roughly in sync
when reading data, a user-configurable timeout can be set by the
“set sharing timeout” option. If one client is waiting for the other clients to
read, it only has to wait until the timeout expires and then it will be allowed
to continue reading. The other clients, that is, ones that are not reading
data, will lose data from the time the timeout expires until they begin
reading again. This timeout will not be set by default.
Considerations and cautions for port sharing
There are several caveats when using port sharing:
When clients send data to the ports, their data will be intermixed; that is,
there is no synchronization of the data. If two clients send data at the
same time, the data from one client might appear in the middle of the
other client's data.
If one client stops reading data, the input will be flow-controlled for all
clients. Clients will only be able to read data at the rate of the slowest
client. (There is a timeout to override this, as described above.)
Incoming opens, persistent opens, and immediate opens may not
behave as expected when multiple clients are opening the port at the
same time.
The modem control lines are not dropped until all clients have closed
the port.
When multiple clients share control of the serial port options, such as
baud rate, data size, parity, flow control, etc., the last options set will
take effect. The serial port options could be changed unexpectedly by
another client. This could leave the RealPort driver confused about the
correct serial port settings. Different RealPort drivers might react
differently to these unexpected changes in serial port settings.