Virtual Serial Ports - Build advanced serial port configurations for any usage scenario
Download Virtual Serial Port Tools Hide this button

Command-Line Utility

Command-line utility rspcli.exe may be used as a simple API to create and manage alias, shared, remote, pipe, tcp and script serial ports and local bridges. Command-line utility returns 0 if the requested operation is completed successfully, or non-zero error code (HRESULT). It also prints error description to STDOUT unless the --silent parameter is specified.

Command-line Parameters

The utility supports the following command-line parameters:

ParameterValueDescription
-?, --helpDisplays the list of supported parameters with short description.
--silentDo not display any error or success messages.
-create(alias | bridge | shared | remote | pipe | tcp | script)Create new virtual serial device.
-deleteNDelete an existing port.
-list(alias | bridge | shared | remote | pipe | tcp | script)List all remote serial ports on the current computer.
-list-remotehostnameList all shared serial ports on the specified host.
Port Creation Parameters
--local-portNOptional local port number. If omitted, the next available port is used.
--device-namenameOptional name to use for created virtual serial port device.
Alias Port Parameters
--alias-portNOriginal serial port number.
Bridge Parameters
--bridge-portsN1,N2Optional bridges port numbers.
Shared Port Parameters
--share-portNOriginal serial port number.
Pipe Port Parameters
--create-pipe\\.\pipe\PIPENAMEName of the pipe to create.
--connect-pipe\\SERVERNAME\pipe\PIPENAMEName of the pipe to connect to.
--num-instancesNNumber of port instances, 255 to unlimited
--input-buffer-sizeNSize of the input buffer.
--output-buffer-sizeNSize of the output buffer.
--pipe-timeoutNPipe timeout.
--pipe-security-descriptorstringPipe security descriptor in SDDL format.
Common Port Parameters
--baud-rateNSpecify port baud rate to override.
--data-bitsNSpecify port data bits to override.
--parity(no | odd | even | mark | space)Specify port parity to override.
--stop-bits(1 | 1.5 | 2)Specify port stop bits to override.
--flow-control(none | software | hardware)Specify port flow control to override.
--timeouts"N1,N2,N3,N4,N5"Specify port timeouts to override. Timeout values must be separated with commas (no spaces allowed) and must in the following order: readIntervalTimeout, readTotalMultiplier, readTotalConstant, writeTotalMultiplier, writeTotalConstant. -1 can be used to specify MAXDWORD. Enclose the whole parameter in double quotation marks if using negative numbers.
Remote Port Parameters
--remote-hosthostnameName or address of remote host that shares COM port.
--remote-portNName of the remote COM port for RSP server or remote TCP port for TCP/IP server.
--loginusernameName of the user to use for authentication on a remote host. May include domain in the form DOMAIN\USERNAME.
--passwordpasswordPassword of the user for authentication on remote computer. If omitted, the user is asked to enter password in terminal.
--connection-timeoutNAn optional connection timeout (in milliseconds).
--connection-attemptsNAn optional number of connection attempts to try before giving up.
TCP Port Parameters
--tcp-protocol(rfc2217 | raw)

TCP/IP emulation protocol. Defaults to “rfc2217”.

rfc2217RFC2217 protocol.
rawRaw protocol.
--local-address(ip-address | *)Local address to listen on.
--local-tcp-portNLocal TCP port number to listen on.
--remote-hosthostnameName or address of remote host that shares COM port.
--remote-portNRemote TCP port number.
--tcp-buffer-sizeNTCP buffer size, in bytes. Default is 512KB. Allowed range: 4KB..10MB.
Script Port Parameters
--script-file<path>Full or relative path to a script file.
--script-log-folder<path>Full path to a folder where script execution log files will be created.
--script-init-valuestringAny custom string to use for script initialization.
Compatibility Flags
--get-compatN

Gets the current compatibility flags. Can be a combination of the following values:

0not set
1ignore requests to set invalid special characters.
2ignore transmit queue clear purge requests.
--set-compatN

Sets the current compatibility flags. Can be a combination of the following values:

0not set
1ignore requests to set invalid special characters.
2ignore transmit queue clear purge requests.