Windows treats a COM port as an exclusive resource: the first application to open it owns it, and every other application gets an error until the first one lets go. That rule collides with real work constantly — the GPS feed that three programs want, the data logger you dare not close, the rig-control software and the logging software that both need the radio. “Splitting” a serial port means breaking that rule safely, and on this site it means one specific, free, well-documented tool: hub4com, the hub from the com0com project. This page explains the approach, its one real caveat, and the honest point at which a dedicated splitter product becomes the easier answer.
The idea: the hub opens the port once, applications open virtual ports
A splitter has to stand between the exclusive port and the crowd. hub4com’s arrangement — the one its ReadMe documents in the GPS hub example — is simple:
- The real port (say COM1) is opened by hub4com only. The exclusivity rule is satisfied because exactly one program holds it.
- You create one com0com pair per application. The inner ends (CNCB0, CNCB1, …) face the hub; the outer ends get ordinary names (COM5, COM6, …) that applications can open.
- hub4com copies what the real port receives to every inner end, so every application hears the device. The full worked example — pair creation commands included — is the GPS sharing recipe; the hub command at its heart is just:
hub4com \\.\COM1 \\.\CNCB0 \\.\CNCB1
Each application now believes it has the device to itself, on its own port. Nothing is emulated per-application and nothing is polled: the hub fans the stream out as it arrives.
Read-only sharing is safe; writing is the shared resource
How well splitting works depends on which direction your data flows. One-way streams — GPS NMEA, weather stations, AIS receivers, industrial sensors, most loggers — broadcast perfectly: the ReadMe states the hub “will send data received from COM1 port to CNCB0 and CNCB1 ports”, and any number of listeners can consume identical copies without affecting each other or the device.
Two-way devices need more care. The ReadMe also documents a return path — data received from CNCB0 is sent back to COM1 — because devices like radios and instruments accept commands. But a return path shared by several applications is a party line: if two programs send configuration commands at the same time, the device receives them interleaved, and replies cannot be attributed to one sender. Practical rule: designate one controlling application that is allowed to talk back, and let the rest listen. If two programs genuinely must control the same device simultaneously, a port splitter of any brand is the wrong layer — the applications themselves need to coordinate, typically through one program that owns the device and offers the others an interface.
A related kindness in hub4com 2.1.0.0: its changelog records “serial port share mode to allow use COM port by other applications when port is not used by hub4com”, and the RFC 2217 wrapper exposes the same idea as --share-com-port — the port is opened on connect and closed on disconnect rather than held permanently. That helps the hub coexist with other software between sessions; it does not change the one-writer rule while a session is live.
The gotcha that empties the stream: CTS handshaking
If your split is set up correctly but the real port delivers nothing, the hub4com ReadMe FAQ names the usual cause: “By default hub4com use CTS handshaking on output so if CTS state is OFF then no any data can be sent to the port.” Many simple devices and three-wire cables never raise CTS, so the hub politely waits forever. The FAQ’s fix is to disable CTS handshaking for the real port by putting --octs=off before it in the hub command. It is the single most common hub4com problem and it has nothing to do with your pairs — check it before rebuilding anything. (The hub guide covers the same item in its testing walkthrough, and the troubleshooting hub covers driver-side failures.)
When the job is bigger than splitting: the multiplexer
Splitting fans one port out locally. The package ships a second wrapper for the heavier, related job: carrying several ports across a single link — the ReadMe’s “Multiplexing” example, where a server computer’s COM2, COM3 and COM4 are made to appear on a client computer over one null-modem connection between their COM1 ports. That is what examples/multiplexer.bat builds, with a server end and a client end run over the shared link port:
multiplexer --baud 115200 COM1 --mode server CNCB1 CNCB2 CNCB3
multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3
Each named subport gets its own tagged channel inside the one link, and the same wrapper can switch the link to TCP and add a shared secret for encryption. Reach for the multiplexer when the constraint is the link — one cable, one connection, many ports — and for plain hub4com when the constraint is simply several local applications and one device.
One hub can host more than one split
Nothing in the pattern limits you to one device. Ports on a hub4com command line are just a list, and the ReadMe’s own examples put three ports into a single hub as a matter of course. A second receiver or instrument can join the same hub process as its own fan-out — its real port plus its own pair ends appended to the command — or run under a second hub instance if you prefer the setups independent. The practical limit is not the hub; it is your discipline about which application is allowed to write to which device.
Two things splitting cannot do
- It cannot share a port another program already holds. The hub must be the program that opens the real port. If an application has COM1 open directly, close it (and retrain it onto a virtual port) before starting the hub.
- It cannot merge two talkers into one listener coherently. Splitting fans one source out to many listeners. Feeding several devices into one application is the opposite shape — a routing and joining problem with its own collisions, not something to improvise on a shared return path.
A quick decision guide
- Several programs only listen to one device → the hub pattern above; this is the easy, safe case.
- One program controls, the rest listen → the hub pattern, with the controller on the pair whose return path you use, and the listeners told to stay read-only where the software allows it.
- Two programs must both control the device → no splitter is the answer; put one program in charge of the device and have the other talk to it.
- The PC is locked down or the setup is business-critical → weigh the dedicated splitter products discussed below.
When a dedicated splitter is easier
hub4com is free, scriptable and exact, but it is a 2012 console tool configured by command line, and its “interface” is a console window you must leave running. Commercial splitter products trade money for a graphical interface, saved configurations, a supported vendor and — on modern Windows — a driver that went through current Microsoft signing. If your splitting need is permanent, business-critical, or on a machine where com0com’s driver signing situation (see the Code 52 guide) is a blocker, that trade can be the right call. Our virtual serial port overview compares the field — the free com0com stack, VSPE, Eltima’s driver and splitter, and the hardware options — with prices verified from the vendors, so you can make that judgement with the whole picture in front of you.
For most home, lab and workshop setups, though, the free stack is enough: one hub, one pair per application, one writer at a time. Start with the GPS recipe even if your device is not a GPS — it is the cleanest worked example of the pattern — and keep --octs=off in mind the first time a real port stays silent.
