A GPS receiver produces one stream of NMEA sentences on one COM port — and a Windows COM port can normally be opened by only one application at a time. So the chart software gets the position fix, and the logging program, the APRS client and the time-sync tool all get “port in use”. This is the exact problem the com0com project’s own documentation solves: the hub4com ReadMe’s “GPS hub” example is the canonical recipe, and this page walks through it step by step, in the ReadMe’s own commands.
The idea in one line: the GPS stays connected to its real port, hub4com opens that port once and copies everything it receives to the inner ends of two com0com pairs, and each application opens the friendly outer end of its own pair. Nobody shares a port, because everybody gets a port of their own.
What you need
- A GPS receiver connected to a physical COM port — the ReadMe example uses COM1. A USB GPS appears as a COM port too; substitute whatever number Device Manager shows for your receiver.
- com0com installed and working (the installation guide covers the driver, including the Windows 11 signing situation).
- hub4com 2.1.0.0 from the hub page — a single console program, no installer.
Step 1 — Create two pairs with friendly names
The ReadMe creates two pairs whose application-facing ends get real COM names (COM5 and COM6), while the hub-facing ends keep their default CNCB names. In the Setup Command Prompt (setupc), exactly as the ReadMe gives it:
command> install 0 PortName=COM5 -
command> install 1 PortName=COM6 -
Each command creates one pair. The first port of the pair is renamed to the COM name your applications will open; the dash tells setupc to leave the second port at its default name — CNCB0 for the first pair, CNCB1 for the second. The result is two pairs: COM5↔CNCB0 and COM6↔CNCB1. (The setupc reference explains the install syntax, and the renaming guide explains why applications need real COM names.)
Step 2 — Start the hub
Now start hub4com on the real port and the two inner ends, exactly as the ReadMe does:
hub4com \\.\COM1 \\.\CNCB0 \\.\CNCB1
The ReadMe states the resulting data flow in plain words: “It will send data received from COM1 port to CNCB0 and CNCB1 ports and it will send data received from CNCB0 port to COM1 port.” In other words, the GPS stream is broadcast to both virtual ports, and the first virtual port also has a path back to the receiver. Leave the hub’s console window running — hub4com shares the port only while it runs.
Step 3 — Point each application at its own port
Start the first GPS application on COM5 and the second on COM6, as the ReadMe instructs. Both should immediately show live position data from the single receiver. The numbers 5 and 6 are the ReadMe’s example, not a requirement — if either number is already taken on your system (a Bluetooth stack or another adapter may hold it), pick any free numbers when you create the pairs and use those consistently in the applications; only the pairing of outer name to inner CNCB end matters, and setupc’s list command shows you the mapping if you lose track of it. Add a third application by creating a third pair the same way (outer end COM7, inner end CNCB2) and adding \\.\CNCB2 to the hub command — the same fan-out pattern the ReadMe’s testing example uses with three pairs.
The wiring, drawn out
GPS receiver
| (real cable, physical port COM1)
v
COM1 ----> hub4com ----> CNCB0 ---- COM5 ----> Chart software
|
+-----> CNCB1 ---- COM6 ----> Logger / APRS client
|
+-----> CNCB2 ---- COM7 ----> Third application (optional)
Read it left to right: one talker, one hub, one private virtual port per listener. The applications never see each other and never contend for COM1, because hub4com is the only program that ever opens it.
Sharing etiquette: reading is free, writing is shared
NMEA output is a one-way broadcast, which is why GPS sharing works so well: any number of applications can listen without disturbing each other. Be more careful with applications that also send — configuration commands to the receiver, for instance. The ReadMe documents a return path from CNCB0 to COM1, so anything one application transmits can reach the receiver; two applications configuring the GPS at the same time will interleave their commands. Keep one writer and let the rest listen.
One classic gotcha, straight from the hub4com ReadMe FAQ: if the real port seems to receive nothing through the hub, the cause is usually flow control — “by default hub4com use CTS handshaking on output so if CTS state is OFF then no any data can be sent to the port.” The fix is to add --octs=off before the real port in the hub command, as the FAQ prescribes.
If your GPS is still on the shopping list
This recipe is software-only and works with the receiver you already have. If you are equipping a boat, a vehicle or a field laptop and need the hardware itself, these are the two pieces this setup actually consumes — a receiver that presents itself as a standard COM port, and, for older serial receivers, a quality USB-to-serial adapter (FTDI-based adapters are the dependable default; the hub page explains why the driver side matters):
- USB GPS receivers on Amazon (sponsored) — puck-style receivers that appear as a COM port and feed this recipe directly.
- FTDI USB-to-serial adapters on Amazon (sponsored) — for receivers with a classic 9-pin serial connector.
Prove it with a terminal before trusting your real applications
Before pointing chart software at the new ports, borrow the ReadMe’s own testing habit: open a plain terminal window on COM5 first. If the hub is running and the GPS is talking, NMEA sentences should scroll past continuously — lines beginning with $GP are the receiver narrating its position, time and satellite state. That thirty-second check separates the layers cleanly: sentences in the terminal mean the receiver, the hub and the pair are all working, and any remaining problem lives in the application’s own settings (wrong port number, or an application still configured for the old exclusive COM1). Repeat on COM6 and both halves of the split are proven independently.
Day-to-day running
The pairs you created in Step 1 are driver-level devices: they stay on the system until you remove them with setupc (the uninstall guide covers removal), so you do not recreate them each morning. The hub, by contrast, is an ordinary program that runs in its console window and shares the port only while it is running. The daily routine is therefore just: start hub4com with the Step 2 command, then start your applications in any order. If you reboot, start the hub again — a small shortcut or startup script containing the one command line is all the automation this setup needs.
With the hub running, your one receiver now serves the whole cockpit. The same pattern shares any one-way serial source — a weather station, an AIS receiver, a data logger — and the general form of the trick, including when several applications genuinely need to talk back, is covered in Split One Serial Port Between Several Applications. For moving a port across the network instead of across applications, see the RFC 2217 guide.
