Connecting multiple virtual serial ports together
Have you ever had the need to connect multiple programs that utilize serial ports? Or you tried to stream the data from single GPS device to multiple programs that needed the data? Then either you found out it can’t easily be done using the tools avalible on windows, or after some research online you stumbled upon com0com and hub4com which is part of com0com project (although distributed separately).
Com0Com is actually a null modem cable emulator, so it can be used to emulate pairs of serial ports that are virtually interconnected.You can get it at at its sourceforge page. If you have one of newer windows versions that don’t allow installing unsigned drivers you should probably download the 18.104.22.168 version from the official site or you can get signed 22.214.171.124 at this page. The installer is pretty straightforward. During the installation you can also choose to add two example pairs of ports (one with Ports class and one without).
After installing Com0com you can configure it using the setup program (which has a very descriptive name – Setup :P, but you can distinguish it by the port icon). Here is the setup screen, which is pretty intuitive by itself (except for Ports class meaning and signal routing).
Only ports with Port class checkbox checked will be available as “normal” serial ports to most programs. Ports without Ports checkbox checked can however still be used by utilities like hub4com. There are also additional checkboxes with more advanced features, which you probably won’t need to touch.
The serial port pair setup dialog also features advanced virtual cable setup, which allows you to choose which serial port signals from one port connect to which signals on the other port. Signal routing can be changed by clicking (and hodling mouse button) on one colored dot connector and dragging a signal to second colored dot connector. A negation of the signal can be obtained by doubleclicking on the green dot connector. On touchpad single click seems to disconnect the signal for me (but that does not seem to work with the mouse?). Up to current time I have not yet had the need to connect those extra signals on any of the programs I use.
Com0com creates virtual ports that are connected to each other, so you can use them to connect two programs to communicate using a pair of ports, for example GPS simulator (data source) and GPS client application (data client). Of course the communication can also be bidirectional like sinchronization of two programs.
(This is a multipage post. Read on for examples and using hub4com for connecting multiple ports >>)