Introduction


Virtual Serial Port Driver lets you use command-line options to automate the process of creating and managing bundles of real and virtual serial ports.


port bundle is a collection of real and/or virtual serial ports divided by data transfer direction.


Virtual Serial Port Driver supports the following bundle types:


        Split, pair, join, merge, switch, redirect, share, loopback, complex. 


Note: Different bundle types may affect the behavior of certain port types.


The default bundle type is Complex.


Port names:


Port names may contain A-Z, a-z, 0-9, and the underline character (_). For example, “COM1”, “COM_8”.


Port types:


Depending on the bundle type, you can use serial ports of the following types:


  • Real (physical) ports.

  • Virtual ports.

  • Shared ports. 

  • Switcher ports. 

  • vspd, paired, pair, p (only for pair and loopback port bundles). 


The default port type is virtual. 


Bundle names:


Port bundle names may contain Latin letters, digits, and special characters. For example, “Pair#1”, “Split#1”. 


Directions:


There are two data transfer directions in port bundles created using Virtual Serial Port Driver: Input and Output. 


A shared port:


You can create a port bundle where one real port will be shared and used by multiple applications at the same time.


  1.  Help Commands


To invoke help for a certain command, use the following:


HELP ["command name"|all|bundles|ports|names|direction|share] …


Examples: 


vspdpro_service.exe help install


vspdpro_service.exe help uninstall


vspdpro_service.exe help all

\\Display general help.


To get a short description of how to use the command-line interface, execute:


USAGE ["command name"] ...


  1. Commands to manage the Virtual Serial Port Driver service and register the software. 


INSTALL

Installs the VSPD service.


Example: 

vspdpro_service.exe install


UNINSTALL

Uninstalls the VSPD service.


Example: 

vspdpro_service.exe uninstall


ENABLE

Enables the VSPD service.


Example: 

vspdpro_service.exe enable


DISABLE

Disables the VSPD service.


Example: 

vspdpro_service.exe disable


AUTOSTART

Enables the VSPD service to run at boot.


Example: 

vspdpro_service.exe autostart

  1. Commands to create and manage serial port bundles. 


LIST

Displays the list of all available port bundles.


Example: 

vspdpro_service.exe list


SHOW ["bundle"] ...

Shows detailed info about the selected bundle.


Example: 

vspdpro_service.exe show Pair#1


SET-CONFIG

Changes service settings.


        [/ignore-errors yes|no]

        [/baudrate-emulation    yes|no]

        [/printers      yes|no]

        [/reopen        yes|no]


ignore-errors

Ignores errors when creating bundles 


With this option enabled, you can continue the creation/opening process even if some of the ports are not created/opened.


baudrate-emulation

Enables strict baudrate emulation.


Strict baudrate emulation will be enabled by default when creating bundles with virtual serial ports.


printers

Makes ports available for printers. 


You can connect a printer to any created virtual port. This is achieved by registering virtual serial ports in the Windows Registry so that they can be selected in the Add Printer Wizard.


After enabling this option, you’ll see the warning message about the need to restart the “Print Spooler” service or reboot your computer for this feature to come into operation.


reopen

Retries opening real ports in case of failure.

 

This option allows reopening serial ports automatically if they failed to open on the first go (and the “Ignore errors…” option is enabled) or a serial port was removed while the service was still running (e.g. the USB to COM lead was unplugged).


Example:

vspdpro_service.exe set-config /ignore-errors yes /baudrate-emulation yes /printers yes /reopen yes 


ADD-BUNDLE "name" ["bundle-type"]

Creates a new port bundle.


Supported bundle types (and their shortcuts):


        split, s

        join, j

        redirect, redir, r

        share, sh

        complex, c, advanced, adv, a

        switcher, switch, sw

        merge, m

        vspd, pair, p

        loopback, loop, l


Example: 

vspdpro_service.exe add-bundle Pair#1 p


RENAME-BUNDLE "old name" "new name"

Renames a port bundle.


Example: 

vspdpro_service.exe rename-bundle Pair#1  Pair#2


DELETE-BUNDLE "bundle"

Deletes a port bundle.


Example: 

vspdpro_service.exe delete-bundle Pair#1


ADD-PORT "port" "bundle" [in|out] ["port-type"]

Adds a new port to a bundle. 


Note: Before using this command, make sure that the bundle you would like to add the port to exists. 


Supported port types (and their shortcuts):


-  real, r

-  virtual, v

-  shared, share, sh

-  switcher, switch, sw

-  vspd, paired, pair, p (only for pair loopback port bundles)


Examples: 

vspdpro_service.exe add-port COM1 Pair#1 in virtual

vspdpro_service.exe add-port COM2 Pair#1 out virtual


\\Add the virtual port COM1 to the Input side and the virtual port COM2 to the Output side in the bundle Pair#1 


SET-PORT "port" "bundle" [in|out]

Sets custom settings for a real port (e.g. baudrate, parity, etc.)

    

        [/baudrate      rate]

        [/read  yes|no]

        [/write yes|no]

        [/parity        none|odd|even|mark|space]

        [/databits      5..8]

        [/stopbits      1..2]

        [/flow  none|hw|x]


Example: 

vspdpro_service.exe set-port COM1 Split#1 in /baudrate 300 /read yes /write yes /parity even /databits 7 /stopbits 1 /flow hw


\\Configure settings for the real port COM1 added to the Input side of the port bundle Split#1: baudrate=300 read=yes write=yes parity=even databits=7 stopbits=1 flow=hw


UNSET-PORT "port" "bundle" [in|out]

Resets custom settings for a real port.


Example: 

vspdpro_service.exe unset-port COM1 Split#1 in   


DELETE-PORT "port" "bundle" [in|out]

Removes port from a bundle.


Example: 

vspdpro_service.exe delete-port COM5 Split#1 out 


SET-MAIN "port" "bundle" [in|out]

Sets port as main at the given direction.


Example: 

vspdpro_service.exe set-main COM5 Split#1 out


UNSET-MAIN "bundle" [in|out]

Unsets all main ports on the selected bundle side (In or Out).


Example: 

vspdpro_service.exe unset-main Split#1 out 


SET-SHARE "port" "bundle" [in|out] "app name" [rwc|0..7]

Adds an application to the list of applications that are able to access the shared port. 


Note: You should specify the port type “shared” when using this command. 


[rwc|0..7] - access rights:


“read” - allows reading port data.

“write” - allows writing data to the port. 

“control” -  allows controlling port settings. 


0 - Read/Write/Control off.

1 - Read on, Write/Control off.

2 - Write on, Read/Control off. 

3 - Read/Write on, Control off. 

4 - Control on, Read/Write off. 

5 - Read/Control on, Write off.  

6 - Write/Control on, Read off. 

7 - Read/Write/Control on. 

None - Read/Write/Control on.


Example: 

vspdpro_service.exe set-share COM1 Share#1 out “C:\Program Files (x86)\Eltima Software\Advanced Serial Port Terminal” rwc


UNSET-SHARE "port" "bundle" [in|out] "app name"

Removes an application from the list of applications that are able to access the shared port.


Example: 

vspdpro_service.exe unset-share COM1 Share#1 out "C:\Program Files (x86)\Eltima Software\Advanced Serial Port Terminal"


SET-WIRES "bundle" dtr-pins rts-pins

Sets a custom signal lines pinout.


The parameters dtr-pins, rts-pins should contain whole decimal numbers:


0 - none

1 - CTS

2 - DSR

3 - CTS, DSR

4 - RI

5 - CTS, RI

6 - DSR, RI

7 - CTS, DSR, RI

8 - DCD

9 - CTS, DCD

10 - DSR, DCD

11 - CTS, DSR, DCD

12 - RI, DCD

13 - CTS, RI, DCD

14 - DSR, RI, DCD

15 - CTS, DSR, RI, DCD


Example: 

vspdpro_service.exe set-wires Pair#1 1 11

//Set a custom pinout for the bundle Pair#1: DTR->CTS; RTS->CTS, DSR, DCD.


To set up a loopback pinout scheme, you should use the parameters 0 0.


Example: 

vspdpro_service.exe set-wires Pair#1 0 0

//Set a loopback wiring scheme for the port bundle Pair#1: DTR->DSR and RI, RTS->CTS

Loopback

  1. Additional options


RESTORE file [backup-file]

Restores bundle settings. 


You can save current bundle settings to a file and then restore the settings when required. 


Example: 

vspdpro_service.exe restore C:\vspd_config.json C:\backup-file.json


BACKUP file

Saves bundle settings to a file. 


Example: 

vspdpro_service.exe backup C:\vspd_config.json


Examples of commands to create serial port bundles.


Serial Port Pair:


vspdpro_service.exe add-bundle Pair#1 pair

vspdpro_service.exe add-port COM1 Pair#1 in virtual

vspdpro_service.exe add-port COM2 Pair#1 out virtual


\\Create a virtual port pair with the port COM1 on the Input side and the port COM2 on the Output side. 


Split Port Bundle:


vspdpro_service.exe add-bundle Split#1 split

vspdpro_service.exe add-port COM1 Split#1 in real

vspdpro_service.exe add-port COM20 Split#1 out virtual

vspdpro_service.exe add-port COM21 Split#1 out virtual


\\Create a bundle Split#1 with one real serial port on the Input side and two (or more) virtual ports on the Output side. 


Joined Port Bundle:


vspdpro_service.exe add-bundle Join#1 join

vspdpro_service.exe add-port COM1 Join#1 in real

vspdpro_service.exe add-port COM2 Join#1 in real

vspdpro_service.exe add-port COM19 Join#1 in virtual


\\Create a bundle Join#1 with two (or more) real serial ports on the Input side and one virtual port on the Output side. 


Redirection Port Bundle:


vspdpro_service.exe add-bundle Redirect#1 redirect

vspdpro_service.exe add-port COM1 Redirect#1 in real

vspdpro_service.exe add-port COM15 Redirect#1 out virtual

or

vspdpro_service.exe add-port COM2 Redirect#1 out real


\\Create a bundle Redirect#1 with one real port on the Input side and one real or virtual port on the Output side. 


Shared Port Bundle:


vspdpro_service.exe add-bundle Share#1 share

vspdpro_service.exe add-port COM1 Share#1 in real

vspdpro_service.exe add-port COM1 Share#1 out share


\\Create a bundle Share#1 with one real port COM1 on the Input side and one shared port with the same name on the Output side. 


Complex Port Bundle:


    vspdpro_service.exe add-bundle Complex#1 complex

vspdpro_service.exe add-port COM1 Complex#1 in real

vspdpro_service.exe add-port COM10 Complex#1 in share

vspdpro_service.exe add-port COM11 Complex#1 in virtual

vspdpro_service.exe add-port COM2 Complex#1 out real

vspdpro_service.exe add-port COM12 Complex#1 out share

vspdpro_service.exe add-port COM13 Complex#1 out virtual


\\Create a bundle Complex#1 with multiple real, virtual, and shared ports on the Input and Output sides. 


Port Switcher Bundle:


vspdpro_service.exe add-bundle Switch#1 switcher

vspdpro_service.exe add-port COM20 Switch#1 in switch

vspdpro_service.exe add-port COM1 Switch#1 out real

vspdpro_service.exe add-port COM2 Switch#1 out real


\\Create a bundle Switch#1 with a switcher port named COM20 on the Input side and multiple real ports on the Output side. 


Merged Port Bundle: 


vspdpro_service.exe add-bundle Merge#1 merge

vspdpro_service.exe add-port COM2 Merge#1 in real

vspdpro_service.exe add-port COM10 Merge#1 in virtual

vspdpro_service.exe add-port COM11 Merge#1 in virtual


\\Create a bundle Merge#1 with multiple real and virtual ports on the Input side. 


Loopback Port Bundle:


vspdpro_service.exe add-bundle Loopback#1 loopback

vspdpro_service.exe add-port COM10 Loopback#1 in vspd


\\Create a bundle Loopback#1 with one “vspd” port on the Input side.