Purpose: share serial port with multiple applications on the same computer by doing the following:
- Splitting data from source serial port and sending to targets
- Joining data from virtual ports and sending them to source serial port
Splitter needs existing source serial port (real or virtual, which will be used as data provider) and virtual serial ports (which applications will open to send/receive data).
Splitter can work in Special or Default mode.
- Default mode (recommended): Splitter will create up to 8 virtual ports which can be opened onc by any application. Every virtual port can be configured separately (read/only mode, redirect modem registers).
- Special mode: Splitter will create single virtual port which can be opened 8 times by any application
Splitter
will wait for all connected clients (including the slowest one connected to some virtual port) to finish reading data before continuing reading from source COM port. It means that if one of the clients is not reading data (or reading it very slowly), Splitter will eventually fill in its internal buffer and will
stop reading from source COM port. The reading from source COM port will resume as soon as the slowest application starts reading again. This behavior can be overridden by the "Not allowed to block read flow" virtual COM port setting. Alternatively, you can uncheck "Allowed to receive data" to mark virtual COM port which is not supposed to read any data.
Uncheck "Allowed to receive data" or check "Not allowed to block read flow" for applications that connect but do not read data!
For non-trivial scenarios with multiple writers please use Serial Router device instead of Splitter. It provides settings to avoid write conflicts.
Please note that Splitter works best in "all connected applications can read, just one application can write" scenario. If all connected applications are sending data to Splitter virtual ports at the same time, Splitter will do its best trying to avoid merge conflicts, but it does not guarantee that device connected to source COM port will function properly. "Multiple writers" scenario can cause issues with connected applications but Splitter device can provides configuration settings to mitigate it.
Write conflict example: application A is sending "switch to channel A" command, but application B is sending "switch to channel B" command. In this case the latest sent command will take effect, but the first command will be overwritten. The device will switch to channel B, even though application 1 expected it to switch to channel A.
If your applications do not function properly, you can uncheck "Allowed to send data" checkbox to prevent writing for undesired applications (the application will work in read-only mode and all write requests will be ignored). Every virtual port can be configured separately. For example Splitter COM1 <-> COM2,3,4 can be configured to have COM3 and COM4 as read-only (reading data from COM1), and COM2 can read and write.
Additionally, you can configure redirecting DTR/RTS modem registers for every virtual port.
Data flow diagram
Splitter settings
- "Special mode": this will create single virtual port which can be opened 8 times.
- "Do not allow the same application to open the same virtual COM Port multiple times": if enabled, Splitter will not allow the same application to open Splitter virtual COM port 2 times (when in "special" mode). This solves problem with some applications.
- "Stop reading data when no clients connected": Splitter will stop reading incoming data from source COM port if there are no connected applications.
- "Reset DTR/RTS when no clients connected": If enabled, Splitter will reset DTR/RTS modem registers when last connected client closes virtual port. Additionally, Initial DTR/RTS state will be ignored if this option is enabled.
- "Clear input buffer when no clients connected": If enabled, Splitter will clear input buffer (the data read from source COM port) when last connected client closes virtual port.
- "Buffered Read Mode": If enabled, reading more data than currently reported in source COM port input buffer. May introduce small delays but reduces CPU usage and reads more complete data.
- "Purge virtual COM ports buffers on open": If enabled, virtual COM ports buffers will be purged on open.
- "Purge virtual COM ports buffers on close": If enabled, virtual COM ports buffers will be purged on close.
- Select source COM port from the list (or type in the name, for example COM1)
- Click "Settings" to configure port Speed and other settings (Serial port settings)
- Click "Test serial port" to check if source COM port is accessible
- Add up to 8 virtual ports by clicking "Add" button
- Delete selected virtual port by clicking "Delete" button
- Select virtual COM port in the list to edit additional virtual port properties:
- Select virtual COM port name from the list (or type in the name, for example COM2)
- "Override timeouts": (for experienced users only!) override serial timeouts for selected virtual port. Occasionally, it may be useful to improve compatibility with some applications (for example, when additional delays are introduced when sending traffic over network). Ignored in "legacy/special" mode. See Override virtual port timeouts for more details.
- "Allowed to receive data": redirect data from Source COM port to virtual COM port. Should be unchecked if connected application is not reading data!
- "Allowed to send data": redirect data from virtual COM port to Source COM port
- "Redirect RTS": redirect RTS modem register state from virtual COM port to Source COM port
- "Full RTS control": if enabled, allow client to set/reset RTS register without checking its previous state. This can be useful only in very specific cases and not enabled by default.
- "Redirect DTR": redirect DTR modem register state from virtual COM port to Source COM port
- "Full DTR control": if enabled, allow client to set/reset DTR register without checking its previous state. This can be useful only in very specific cases and not enabled by default.
- "Not allowed to block read flow": by default, Splitter wait for the slowest reader connected to one of the virtual ports, which will suspend data read flow. If this feature is enabled, VSPE will keep reading but application connected to this virtual COM port will not receive latest data.
- "Wait timeout (milliseconds)": When "Not allowed to block read flow" is enabled, defines delay in milliseconds before unblocking reading flow. If left blank, default timeout is used.
In very rare cases, Splitter may not work properly with serial ports created by other software. If that happens, you can apply one of the following workarounds:
- Workaround: Use Redirector -> Connector -> Splitter chain
- Create Connector (for example, COM10)
- Create Redirector (source COM port -> COM10)
- Create Splitter (select source port COM10)
- See also:
-