Skip to content
Start free evaluation

Install virtual serial ports

You can create virtual serial ports in two ways:

  • Pseudo terminal (pty) mode needs no installation. All you need on macOS and Linux is the pdcomm-vserial program. Applications open paths such as /dev/ttys… or /dev/pts/….
  • Driver mode installs a port driver in the operating system. Applications open ordinary serial port names such as COMn on Windows and /dev/ttyPDVn on Linux. Use it to test applications that can’t change the port name or that look for ports in the device manager.
Operating system Modes
Windows 10/11 x64 Driver mode: MSI installer (UMDF2 port driver)
Linux (Debian, Ubuntu) amd64 and arm64 Driver mode: DKMS kernel module .deb package; pseudo terminal mode
macOS Pseudo terminal mode

The MSI installer installs:

  • C:\Program Files\PDComm\Virtual Serial\bin\pdcomm-vserial.exe, the command-line program that runs labs and manages ports.
  • C:\Program Files\PDComm\Virtual Serial\driver\, with the port driver (PDCommVSerial.dll, UMDF2), a kernel filter that passes flush requests to it (PDCommVSerialFlt.sys), and the INF and catalog files.

After it copies the files, the installer creates the COM port devices and installs the driver. It creates two ports by default, named COM201 and COM202 unless Windows assigns other names.

  1. Run the MSI file as an administrator. To create a different number of ports, set the PORTS property from an elevated command prompt:

    터미널 창
    msiexec /i <path to the MSI file> PORTS=4
  2. In Device Manager, under Ports (COM & LPT), look for entries such as PDComm Virtual Serial Port (COM201). You can also list the ports from the command line:

    터미널 창
    & "$env:ProgramFiles\PDComm\Virtual Serial\bin\pdcomm-vserial.exe" ports list

    The command prints the device instance, the driver port number (index), and the COM name of each port as JSON.

  3. The ports are connected only while a lab runs. This lab file joins driver ports 0 and 1 with a null-modem cable:

    windows-null-modem.json
    {
    "engine": {
    "pacing": "realistic",
    "nodes": [
    {"name": "plc", "port": {"line": {"baud": 19200, "data_bits": 8, "parity": "even", "stop_bits": "1"}}},
    {"name": "hmi", "port": {"line": {"baud": 19200, "data_bits": 8, "parity": "even", "stop_bits": "1"}}}
    ],
    "media": [{"kind": "null_modem", "a": "plc", "b": "hmi"}]
    },
    "ports": [
    {"node": "plc", "backend": {"type": "driver", "index": 0}},
    {"node": "hmi", "backend": {"type": "driver", "index": 1}}
    ]
    }
    터미널 창
    & "$env:ProgramFiles\PDComm\Virtual Serial\bin\pdcomm-vserial.exe" run --config windows-null-modem.json

    When the lab is ready, it prints its ports. One program can now open COM201 and another COM202. To stop the lab, type {"command":"stop"} or press Ctrl+Z and then Enter.

Run these commands in an elevated PowerShell:

터미널 창
$Bin = "$env:ProgramFiles\PDComm\Virtual Serial"
& "$Bin\bin\pdcomm-vserial.exe" ports install --inf "$Bin\driver\PDCommVSerial.inf" --count 4
& "$Bin\bin\pdcomm-vserial.exe" ports remove
  • ports install creates ports until there are --count of them. Each new port gets the lowest free driver port number and the name COM<--first-com + number>; --first-com defaults to 201. The driver supports up to 64 ports.
  • ports remove deletes all port devices. ports uninstall also deletes the driver package and the filter service.

Remove PDComm Virtual Serial in Settings > Apps, or run msiexec /x <path to the MSI file>. Before it removes the files, the installer deletes the port devices, the driver package, and the filter service.

  • pdcomm-vserial-manager is a GUI that edits and runs labs. It runs the pdcomm-vserial program in its own folder; to use a program elsewhere, set the PDCOMM_VSERIAL_BIN environment variable to its path. See Virtual serial manager.
  • pdcomm-vserial-mcp is an MCP server through which AI tools create and control labs. See Control virtual serial ports over MCP.