Virtual serial ports emulator project

VSPE

Thank you for using VSPE!

See also:
  • General description
  • Product overview
  • Virtual serial ports pinout
  • HTTP server
  • Data monitoring
  • Usage tips and scenarios
  • User interface
  • VSPE API
  • Command line
  • Known limitations and bugs
  • Contact information
  • Version history
  • Frequently asked questions
  • Credits
Copyright (C) 2007-2023 Eterlogic.com. All rights reserved.


General description

VSPE main purpose

Virtual Serial Ports emulator (VSPE) is intended to help people to deal with such a thing as a serial port. Nowadays, serial ports are not used widely anymore. The reason is simple: it is a quite old stuff. Modern hardware devices as a rule connect to computers via high-speed USB ports and sometimes install their own UsbToCom driver. Serial ports are not installed in the most of new notebooks.

So why was VSPE created?

  • There are plenty of specific devices that require RS232 or RS422 compatible serial ports. VSPE can help developers to create and debug applications without real hardware installed.

  • Compatibility with old applications. VSPE can help people to make data stream from any source (like TCP connection, USB port and so on) visible to any program via virtual serial port.

  • To create a lot of virtual serial ports working simultaneously. You can do it without installing serial ports extension board.

  • To share serial port for many applications.

VSPE distinctive characteristics

VSPE has limitations described in the Known limitations and bugs section.

At current stage our main goals are:

  • To provide binary data exchange between applications or devices.
  • To create original solutions. The Connector and the DataSplitter devices are obvious examples of such solutions: they create COM ports that can be opened more that once.
  • To provide easy user interface.

Product status

VSPE current status is beta.

Product key features:

  • Virtual device: connector (Kernel mode)
  • Virtual device: data splitter (Kernel mode)
  • Virtual device: pair (Kernel mode)
  • Kernel mode device: Mapper
  • User mode device: TcpServer
  • User mode device: TcpClient
  • User mode device: Serial Redirector
  • User mode device: UDP Manager
  • User mode device: Bridge
  • Data monitoring and recording
  • Embedded HTTP server
  • x86 and x86_64 processor architecture support
  • Embedded Lua script language
  • VSPE API (C/C++ header and static library) for native language developers
  • VSPE API Python bindings for Python developers
  • VSPE API COM interface

Requirements

  • Read about requirements on https://eterlogic.com web site


Product overview

VSPE devices

VSPE is all about devices. Device is an entity that does some work. For example, if you need to redirect data from remote computer via Tcp connection, you can create TcpClient device that provides such functionality. Devices in VSPE divide into two categories: kernel mode and user mode devices. You can combine them as you like.

Kernel mode devices

These devices are implemented by VSPE kernel driver. VSPE main goal was to create virtual ports, so they are work horses of VSPE. Usually they create virtual COM ports, but some of them (Mapper for example) just substitutes link for existing COM port by another link (e.g. COM9 can be opened as COM1). The most popular devices such as Connector, Splitter and Pair are the kernel mode devices. When VSPE is closed, kernel mode devices can continue to work (if you want to change this behavior, look at the preferences page).

User mode devices

These devices do not create virtual ports. They have no relation to the kernel driver and are implemented in user-mode, so for me they are easier to develop/modify and debug. When VSPE is closed all user-mode devices are destroyed. User mode devices can be very useful if you need to redirect data streams from various sources (Tcp, UDP etc), spy on another VSPE devices etc. They can be successfully used in conjunction with kernel mode devices.

Spy device

This device is special. It can spy on some of VSPE devices and send intercepted data to some data stream. It is a very interesting feature for software developers. See Spy device for more details.

VSPE and software developers

Main purpose of VSPE was to make life of software developers easier. If your work is related to COM ports, you known how it is hard to debug your applications: you need sometimes to emulate input data, so you use null-modem cables or emulate incoming data using some another mechanism. VSPE exposes API that can be useful for developers that want to do something special or do not need VSPE GUI application at all, just ability to create/destroy VSPE devices. Look VSPE API for more details.


Virtual serial ports pinout

Virtual serial ports have standard pinout Currently, VSPE does not support custom pinout configuration.

(painted in PaintBrush)


HTTP server

Purpose

Http server is intended to control VSPE configuration and monitor devices state on remote computer.

Settings

To set up http server, look at HTTP server tab.

Http server in action


Data monitoring

Purpose

There are many situations when you need to know, what data is sent/received by application. To help advanced users/developers, data monitoring feature has been added to VSPE.

Monitoring

At the moment, data monitoring works only for kernel-mode devices, such as Splitter device, Connector device and Pair device.

Saving in binary format

This feature can be helpful for the software developers. To turn saving on, just click "Save..." button. Binary file consists of record chunks. Each chunk has the following format:
  • SecondsFromBeginningOfTheRecord (DWORD - 4 bytes, Little-endian format)
  • DataDirection (CHAR - 1 byte). 1 if incoming data, 0 if outgoing data
  • DataSizeInBytes (DWORD - 4 size, , Little-endian format)
  • RawData (Data, size is specified by the DataSizeInBytes field)

Binary file example

Here is simple binary file example. First record chunk is selected by red rectangle. It has the following values:
  • SecondsFromBeginningOfTheRecord = 2 (2 seconds)
  • DataDirection = 0 (Outgoing)
  • DataSizeInBytes = 4 (4 bytes)
  • RawData = Test

Spy device

Please look at the Spy device. It provides similar functionality, but works a bit differently.


Usage tips and scenarios

Here we will describe the most popular VSPE usage scenarios.

Remember that you can combine virtual VSPE devices: for example, Splitter device can be connected to Connector device, and at the same time the Connector device can be exposed to local network using TcpServer device. To achieve your goal you can create chains and combination of VSPE devices. Try and improvise.

See also:
  • Redirect from file to virtual COM port
  • Autorun: command line shortcut
  • Autorun: run as service
  • Splitter: Share existing physical serial port between several applications
  • Connector and Mapper link
  • Virtual machine integration
  • Network bridge
  • One-to-Many data redirection
  • Monitoring bidirectional traffic for debugging purposes


Redirect from file to virtual COM port

You are software developer.

You write software that parses some data (e.g. data from the GPS receiver). You want to write your program, but you do not have GPS. To solve the problem, you can follow the instruction below:

  • Find example of GPS data (use google.com or any other source of information). Save data to file (c:\gps.txt).
  • Create Connector device (COM5)
  • Create Bridge device (Stream1=COM5, Stream2=File;Input path=c:\gps.txt;Input speed=1024, Output path can be left empty).

Now open COM5 port and parse the recorded GPS data.


Autorun: command line shortcut

If you want to automatically load virtual devices configuration at Windows startup when you log in, please follow the steps shown below:

Step 1.

Create configuration and save it using "File => Save as..." command. Remember config file location (for example it can be c:\tools\1.vspe)
Step 2.
Run "shell:startup" command. It will open Startup folder.
Step 3.
Either copy VSPE shortcut from Desktop, or create a new one. To create new shortcut, right click "New -> Shortcut" in Startup folder to create shortcut with following parameters (your installation path can be different):
  • Target: "C:\Program Files\Eterlogic.com\Virtual Serial Ports Emulator (64 bit)\VSPEmulator.exe" -minimize -hide_splash c:\tools\1.vspe
  • Start in: "C:\Program Files\Eterlogic.com\Virtual Serial Ports Emulator (64 bit)"

See also:
Command line


Autorun: run as service

VSPE can be started as a service.

If you are running VSPE on 64 bit Windows operating system, you need to ensure that you do not have any activation key popups when you run VSPE, or else service wont work. Ensure that you have vspe.license file in localappdata%\Eterlogic\VSPE folder, it will be used by service.
Step 1.
Create and save VSPE configuration in file (for example, c:\temp\config.vspe).
Step 2.
Click "Helpers -> Set up as Windows service" menu and follow the instructions. Esure that you copy full command line when running it CMD!
NOTE: You cannot run VSPE as application and as service at the same time! You need to either stop service or close VSPE application.


Splitter: Share existing physical serial port between several applications

Let's assume that you have GPS receiver that is already connected to your computer to the physical serial port COM1.

You have a program that opened COM1 and is now receiving GPS data. And all was fine until you wanted to run another program at the same time to get GPS data. But when you tried to run it, you got some weird message like "Cannot open serial port" or something similiar. What happened ? Answer is: serial port can be opened by one application only. Serial port is an exclusive-access device type.

You have several options to deal with this situation:

  • Forget about it, close the first program and run the second. And then close the second and run the first... Actually, it is not an option.
  • Purchase serial ports extension board. Yes, this option can work. But do you want to spend your time and money, look for free PCI slot and install extension board ?
  • If you have two serial ports, you can purchase special cable that splits data from the GPS to each serial port. But if you have one physical serial port only or you need run more than two applications, you can forget about it...
  • And finally, you can use software solution, for example, VSPE. It is the best option.

Step 1.

Close program that opened serial port.
Step 2.
Run VSPE and create the splitter device. Select COM1 in "Data source serial port" combo box and COM2 in "Virtual serial port".
Step 3.
Now configure all your programs to receive GPS data from COM2. If you cannot do that, please refer to Mapper device and Connector and Mapper link.
Now COM2 can be used by up to 8 different applications! Simple, isn't it ?

See also:
Splitter device


Connector and Mapper link

Situation 1

Let's assume that you have:
  • Third-party application. It always opens and works with COM1 serial port. There is no way to change COM1 to another port from the application settings.
  • COM1 is physically installed on this computer.

You want to get access and modify data stream between the application and COM1. If you could change application settings, you could create Connector (COM2), change app settings to COM2 and run your own application-bridge that connects COM1 and COM2, modifying data stream on-the-fly. But application settings cannot be changed! To solve this problem, you can use Mapper device.

  • Add connector device (COM2)
  • Add Mapper device (COM1 --> COM2)

That's all! Now third-party application will work with COM2 and your own application will be able to work as intended.

Situation 1

You have the same situation that is described in Splitter: Share existing physical serial port between several applications. The only difference is that some applications do not allow to change their configurations, so Splitter device cannot help. In this case just add new VSPE device: Mapper (COM1 --> COM2). It will solve the problem. Please not, that Mapper must be created after Splitter, because on the contrary Splitter will not be able to work correctly.


Virtual machine integration

If you use virtual machine (for example VirtualBox, VirtualPC, VmWare etc), you can create virtual serial port (for example COM10) and specify it as data source for virtual machine.

It may be extremly useful for debugging / development purpose.

Here is VirtualBox settings example (take into consideration that serial port name is: "\\.\COM10"). It is explained in Frequently Asked Questions section.

VirtualBox serial port settings

See also:
Frequently asked questions


Network bridge

If you want to connect two computers via serial port you need a serial cable.

But it can be inconvenient in many cases: the cable can be too short or the computers can be located in different cities or even countries.

VSPE can solve it: just create "Network bridge" configuration that will allow you to do that. "Network bridge" is a combination of TcpServer, TcpClient and Connector (or Pair) devices.

Below is the example of such configuration that connects two computers via virtual serial port COM5 using network connection.

Computer 1
  • Create Connector device (COM5)
  • Create TcpServer device (Local Tcp Port = 5555, Source serial port = COM5)
Computer 2
  • Create Connector device (COM5)
  • Create TcpClient device (Remote TCP host = Computer 1 IP address or network name, Remote TCP port = 5555, Source serial port = COM5)
That's it, now both of your computers are connected via virtual serial port COM5.


One-to-Many data redirection

Let's assume that you have COM1, COM2 and COM3.

They can be either real or virtual serial ports (e.g. Connectors or Pairs). If you want to create data exchange: COM1<=>COM2 and COM1<=>COM3, you can use one of the following approaches:

Splitter and Serial Redirectors combination

  • Create Splitter device (Data source serial port=COM1, Virtual serial port=COM5)
  • Create Serial Redirector (Serial port 1 = COM5, Serial port 2 = COM2)
  • Create Serial Redirector (Serial port 1 = COM5, Serial port 2 = COM3)

TcpServer and TcpClient combination

  • Create TcpServer device (Source serial port=COM1, Local TCP port = 5555)
  • Create TcpClient device (Source serial port=COM2, Remote TCP host=127.0.0.1, Remote TCP port=5555)
  • Create TcpClient device (Source serial port=COM3, Remote TCP host=127.0.0.1, Remote TCP port=5555)


Monitoring bidirectional traffic for debugging purposes

What you need

Let's assume that you are the software developer. You have two computers. On the first computer (developer machine) you do not have any real COM ports. On the second computer (test machine) you do have real COM1 port with some hardware connected to it. You want:
  • Open COM5 on your developer machine and send some commands. Hardware on the test machine should receive these commands, answer to them. Of course, you need to get response from COM5 port on developer machine.
  • You want to save all data to file to analyze it later (or maybe just in case).

How to do it

Well, the main idea is to create virtual port COM5 on the developer computer, connect it via TCP socket with test computer and log traffic to the file. To do it, you should create the following configurations:

On the developer machine
  • Create Connector device (COM5)
  • Create TcpClient device (source port COM5, remote TCP host - test machine IP, port 5555 as an example).
  • Create Spy device: VSPE device index = 1 (this is TcpClient we have just created, Destination stream=File, Output path=c:\output.txt)
On the test machine
  • Create TcpServer device (COM1, port 5555)
That's it, now you will be able to send/receive data from the remote COM port using COM5 on the developer machine. All the data will be logged to file c:\output.txt.

See also:
Spy device


User interface

VSPE user interface is quite simple.

There are a main window and various options dialogs. The main window displays a list of created virtual serial devices.

See also:
  • Main window
  • VSPE Preferences
  • Create device wizard
  • Serial port settings dialog


Main window

Main window

The application main window displays information about created virtual devices.

Use menu or toolbar commands to create configuration.

To edit created device you need to stop emulation first.
Click on "Emulation => Stop" command and click right mouse
button on device. Then click on "Properties..." menu item.


VSPE Preferences

To display preferences dialog click "View => Preferences" menu command.

All settings are stored in the Windows registry for the current user.

See also:
  • General tab
  • Advanced tab
  • HTTP server tab
  • Debug tab


General tab

General tab

To read option description, open VSPE preferences dialog, move mouse over desired item and read tooltip.


Advanced tab

Advanced tab

To read option description, open VSPE preferences dialog, move mouse over desired item and read tooltip.


HTTP server tab

HTTP server

To read option description, open VSPE preferences dialog, move mouse over desired item and read tooltip.


Debug tab

Debug tab

To read option description, open VSPE preferences dialog, move mouse over desired item and read tooltip.


Create device wizard

The wizard will help you to create desired device.

Device creation process consists of two simple steps: specifying device type and characteristics.

You can create any combinations of devices: for example you can create connector and expose it to network using TcpServer device.

See also:
  • Connector device
  • Splitter device
  • Pair device
  • Mapper device
  • TcpServer device
  • TcpClient device
  • Serial Redirector device
  • UDP manager device
  • Bridge device
  • Spy device


Connector device

Connector is a very simple virtual device that can be opened by two clients.

After opening, clients can exchange data.

Warning: In some cases connector may not work correctly.
1) The same application tries to open connector twice
2) Query to device is initiated from another driver (such as modem driver)

In such a case you should use Pair device. If baud rate emulation is checked, VSPE will try to slow down data stream to conform with the current baud rate, but it may be quite inaccurate.

Step 1

Step 2


Splitter device

Data splitter is intended to help share serial port data stream among many clients.

You must choose source serial port (it will act as data provider) and virtual serial port. Current VSPE version supports up to 8 client connections to the data splitter. You can check "Read only" checkbox to prevent writing in the source serial port. To adjust source serial port settings, click "Settings..." button (Serial port settings dialog) Set "Redirect modem registers" checkbox if you want clients to manage RTS/DTR modem lines. You can also define initial modem registers state (DTR and RTS).

Step 1

Step 2

See also:
Splitter: Share existing physical serial port between several applications


Pair device

Pair is a simple device that consists of two logically connected virtual ports.

It is usually more popular solution than Connector device. If baud rate emulation is checked, VSPE will try to slow down data stream to conform with the current baud rate, but it may be quite inaccurate.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

Step 1

Step 2


Mapper device

Mapper can redirect (remap) existing serial port to another existing serial port.

Example: COM1 is mapped to COM2. If application tries to work with COM1 (send or receive data), it will be referenced to COM2 instead of COM1. It is pretty useful, when you cannot modify application settings, but want it to work with another serial port.

Please note, that when you create Mapper (COM1 --> COM2), all VSPE devices
using COM1 won't be able to work with it correctly (they will be working with COM2 instead).
To prevent it from happening, always create Mapper device(s) only when all another devices
are already created (Mappers should be last in the devices list).

Step 1

Step 2


TcpServer device

TCPServer opens TCP port to deliver serial port data to network clients.

Number of clients is not limited. Optionally, COM port can be read-only or write-only.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

  • Interface IP specifies interface to listen for incoming connections. Leave it empty to accept connections from any interface.

Step 1

Step 2


TcpClient device

TcpClient establishes TCP/IP connection to remote computer and transfers data from existing serial port to remote PC and vice versa.

If connection is lost it will reconnect automatically. Also you can specify read data timeout (in seconds) to automatically reconnect Tcp client. Optionally, COM port can be read-only or write-only.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

Step 1

Step 2

Lua scripting system

TcpClient device supports scripting. It means that it is customizable. All scripts must be located in Scripts folder (in VSPE installation directory).

Simple script example
-- connect handler
function this.TcpClientConnected(this, context)
    this:SendString(context, "==> Login")
end

-- disconnecting handler (connection is still alive)
function this.TcpClientDisconnecting(this, context)
    this:SendString(context, "==> Logout")
end

-- disconnect handler (connection is already broken)
function this.TcpClientDisconnected(this, context)
    return
end


Serial Redirector device

Serial Redirector can be used to establish connection between two serial ports.

You can also use Bridge device that has similar functionality.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

Step 1

Step 2


UDP manager device

UDP manager allows to send/receive data via UDP protocol.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

There are 3 entities in UDP manager: COM port, UDP local port and UDP clients.

  • COM port is serial port exposed by UDP Manager.
  • UDP Manager waits for incoming data from UDP local port. All incoming data is redirected to COM port.
  • UDP clients is a set of clients. Every client has its own IP address and port. UDP Manager reads data from COM port and redirects it to UDP clients, sending UDP packets.

So, UDP Manager work scheme is the following:

  • Read data from the local UDP port and send it to COM port.
  • Read data from the COM port and send it to each UDP client using UDP protocol.

Step 1

Step 2

Specify local UDP port (0 if you want only to send data from COM port) and Remote clients.

Remote client properties


Bridge device

Bridge is intended to connect two data streams.

Data stream source can be file, TCP connection, serial port etc. Just set up each data stream and data will be transfered from stream 1 to stream 2 and vice versa. Typical usage is to convert data stream from one source to another (e.g. from File to COM port or from COM port to file). As you can see, TcpServer and TcpClient functionality can be done by bridge, but using TcpServer and TcpClient can bring its own benefits, such as DTR/RTS control or scripts. In the future, new data sources types will be added, so Bridge will become more powerful.

This device does not create virtual serial port. It uses existing one
that can be either physical or virtual (for example, Connector).

Step 1

Step 2


Spy device

Spy device allows to connect to VSPE devices that support spying and expose their internal data streams.

For example, Spy device can connect to TcpServer device and redirect all the data traffic to COM port, target TCP port or any other supported data stream. This feature may be extremely useful for developers/engineers that have issues with debugging and want to see data that goes through VSPE some device. Index of VSPE device means number of VSPE device in the device list (starting from 0). Destination stream is the stream the intercepted data will be sent to.

Supported devices.

Please note that some devices do not support spying: at the moment Connector, Splitter and Pair devices do not provide such functionality (this may be changed in the future VSPE versions). All user-mode devices though provide spying interface.

Step 1

Step 2


Serial port settings dialog

Adjust serial port settings (speed, stop bits etc).

Serial port settings


VSPE API

VSPE exposes programming interface for software developers.

See also:
  • VSPE API reference
  • Devices initialization
  • C/C++ Example (Native)
  • Python bindings
  • C# (COM interface)


VSPE API reference

VSPE API activation

To use VSPE API, you need an activation key.
You can order it on eterlogic.com web site or you can use FREE 32 bit key in the installation package.

At the moment, there are two types of activation keys:

  • FREE 32 bit API key. Can be used for any purpose. To use it for FREE, place the link to www.eterlogic.com in the product documentation and your web site.
  • Commercial 32/64 bit API key. Gives ability to work in 64 bit environment. VSPE API can simultaneously work with VSPE or other applications consuming VSPE_API (with different vendor id).

There are two ways to activate VSPE API. Both ways are correct.

  • Use vspe_activate(key) function. Must be called every time your application runs.
  • Create 'vspeapi.license' file and paste your activation key. Place it in your application folder. vspe_activate still needs to be called, but you can provide empty string and the key file will be loaded.

Required files

There are two ways of using VSPE API: native dll linking and COM interface. Check out VSPE_API folder for examples.

Linking with VSPE API (using VSPE_API.dll)

To compile with VSPE API, do the following steps:
  • Include VSPE_API.h (for C++ programmers)
  • Link with VSPE_API.lib

In some cases static linking will not work.
To use dynamic linking, look in MSDN for
LoadLibaray and GetProcAddress functions.

Dependencies with native binding (without COM interface)

To run your application without correctly, you should either install VSPE or copy the following files to your application folder: All devices (kernel and user):
  • Vspe_Api.dll (VSPE API core)
  • VspeUtils.dll (VSPE core)
  • KernelDevices.plg (Connector, Splitter, Pair, Mapper)
  • UserDevices.plg (TcpServer, TcpClient etc)
  • KrushUtilities.dll (helper dll used by multiple components)

Kernel devices only (splitter, connector, pair, mapper)

  • Vspe_Api.dll (VSPE API core)
  • VspeUtils.dll (VSPE core)
  • KernelDevices.plg (Connector, Splitter, Pair, Mapper)

Dependencies with native binding (without COM interface)

  • Register VSPE_ComServer.dll (regsvr32 VSPE_ComServer.dll). No any additional files in the application folder required. Please note that 32/64 bit COM interfaces should be registered separately - use corresponding components from 32 and 64 bit installer packages.

Standalone installation

Installation
  • Add all the files mentioned in the sections above to your application setup package.
  • Run WixInteractor.exe on_install with administrator privileges
  • Register VSPE_ComServer.dll (regsvr32 VSPE_ComServer.dll)

Uninstallation

  • Run WixInteractor.exe on_uninstall with administrator privileges
  • Unregister VSPE_ComServer.dll (regsvr32 /u VSPE_ComServer.dll)

Additional uninstallation steps for 64 bit VSPE_API license with unique vendor ID If you are using 64 bit VSPE API license, you have unique vendor id. It means that you are responsible to unregister kernel driver with your unique vendor suffix.

  • You should check 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EterlogicVirtualSerialDriverXXXXX' key where XXXXX is your unique vendor id.
  • Stop the service (sc.exe stop EterlogicVirtualSerialDriverXXXXX)
  • Delete the service (sc.exe delete EterlogicVirtualSerialDriverXXXXX)
  • Delete corresponding kernel driver file (\Windows\System32\drivers\VSPEXXXXX.sys)

Settings folder. All settings are stored in 'localappdata%\Eterlogic\VSPE' folder:

  • VSPE.log: log file for VSPE or VSPE API startup
  • VSPE.ini: settings file for VSPE application
  • VSPE.license: license key used by VSPE application

Running compiled program

Ensure that all required dependencies are located in your app folder (if you link to VSPE by referencing DLL)

VSPE API header (VSPE_API.h)

// Virtual Serial Port Emulator API header
// https://www.eterlogic.com

#ifndef _VSPE_API_H_
#define _VSPE_API_H_

#ifdef VSPE_API_EXPORTS
#define VSPE_API extern "C" _declspec(dllexport)
#else
#define VSPE_API extern "C" _declspec(dllimport)
#endif

/*
* Activate VSPE API using activation key
* \return result
*/
VSPE_API bool __cdecl vspe_activate(const char* key);

/*
* Get VSPE API activation erorr details
* \return result
*/
VSPE_API char* __cdecl vspe_get_activation_error();

/*
 * Initialize VSPE core
 * \return result
 */
VSPE_API bool __cdecl vspe_initialize();

/*
 * Load configuration file
 * \param name
 * \return result
 */
VSPE_API bool __cdecl vspe_loadConfiguration(const char* name);

/*
* Save configuration
* \param name
* \return result
*/
VSPE_API bool __cdecl vspe_saveConfiguration(const char* name);

/*
* Create device
* \param name Device name. For example "Connector", "Splitter", "Pair" etc.
* \param initString device initialization string
* \return deviceId
*/
VSPE_API int __cdecl vspe_createDevice(const char* name, const char* initString);

/*
* Destroy device by deviceId
* \param deviceId
* \return result
*/
VSPE_API bool __cdecl vspe_destroyDevice(int deviceId);

/*
* Get VSPE devices count
* \return result
*/
VSPE_API int __cdecl vspe_getDevicesCount();

/*
* Get VSPE deviceId by device index
* \param idx device index
* \return deviceId
*/
VSPE_API int __cdecl vspe_getDeviceIdByIdx(int idx);

/*
* Get VSPE deviceId by COM port index
* \param ComPortIdx
* \return deviceId (-1 if not found).
*/
VSPE_API int __cdecl vspe_getDeviceIdByComPortIndex(int ComPortIdx);

/*
* Get device information
* \param deviceId
* \param name [out] device name
* \param initStirng [out] device initString
* \param ok [out] device state (1 = good)
* \param used [out] device clients count (0 - not used)
* \return result
*/
VSPE_API bool __cdecl vspe_getDeviceInfo(int deviceId, const char** name, const char** initString, int* ok, int* used);

/*
* Reinitialize device by deviceId
* \param deviceId
* \return result
*/
VSPE_API bool __cdecl vspe_reinitializeDevice(int deviceId);

/*
* Destroy all devices
* \return result
*/
VSPE_API bool __cdecl vspe_destroyAllDevices();

/*
 * Start emulation
 * \return result
 */
VSPE_API bool __cdecl vspe_startEmulation();

/*
 * Stop emulation
 * \return result
 */
VSPE_API bool __cdecl vspe_stopEmulation();

/*
 * Release VSPE core
 */
VSPE_API void __cdecl vspe_release();

/*
* Get VSPE API version information
* \return result
*/
VSPE_API const char* __cdecl vspe_getVersionInformation();

#endif

VSPE API COM interface (VSPE_ComServer.idl)

// Virtual Serial Port Emulator API header
// http://www.eterlogic.com

import "oaidl.idl";
import "ocidl.idl";

[
    object,
    uuid(4350205d-80d8-429e-ac0c-0fc64dc42180),
    dual,
    nonextensible,
    helpstring("IVSPE Interface"),
    pointer_default(unique)
]

// ========================================================================
// Main VSPE interface
// ========================================================================
interface IVSPE : IDispatch
{

    /*
    * Activate VSPE API using activation key
    * \param key Activation key
    * \return result
    */
    [id(1), helpstring("method vspe_activate")] HRESULT vspe_activate([in] BSTR key, [out, retval] BOOL* Result);

    /*
    * Initialize VSPE core
    * \return result
    */
    [id(2), helpstring("method vspe_initialize")] HRESULT vspe_initialize([out, retval] BOOL* Result);

    /*
    * Load configuration file
    * \param name
    * \return result
    */
    [id(3), helpstring("method vspe_loadConfiguration")] HRESULT vspe_loadConfiguration([in] BSTR name, [out, retval] BOOL* Result);

    /*
    * Save configuration
    * \param name
    * \return result
    */
    [id(4), helpstring("method vspe_saveConfiguration")] HRESULT vspe_saveConfiguration([in] BSTR name, [out, retval] BOOL* Result);

    /*
    * Create device
    * \param name Device name. For example "Connector", "Splitter", "Pair" etc.
    * \param initString device initialization string
    * \return deviceId
    */
    [id(5), helpstring("method vspe_createDevice")] HRESULT vspe_createDevice([in] BSTR name, [in] BSTR initString, [out, retval] BOOL* Result);

    /*
    * Destroy device
    * \param deviceId
    * \return result
    */
    [id(6), helpstring("method vspe_destroyDevice")] HRESULT vspe_destroyDevice([in] LONG deviceId, [out, retval] BOOL* Result);

    /*
    * Reinitialize device
    * \param deviceId
    * \return result
    */
    [id(7), helpstring("method vspe_reinitializeDevice")] HRESULT vspe_reinitializeDevice([in] LONG deviceId, [out, retval] BOOL* Result);

    /*
    * Destroy all devices
    * \return result
    */
    [id(8), helpstring("method vspe_destroyAllDevices")] HRESULT vspe_destroyAllDevices([out, retval] BOOL* Result);

    /*
    * Start emulation
    * \return result
    */
    [id(9), helpstring("method vspe_startEmulation")] HRESULT vspe_startEmulation([out, retval] BOOL* Result);

    /*
    * Stop emulation
    * \return result
    */
    [id(10), helpstring("method vspe_stopEmulation")] HRESULT vspe_stopEmulation([out, retval] BOOL* Result);

    /*
    * Release VSPE core
    */
    [id(11), helpstring("method vspe_release")] HRESULT vspe_release();

    /*
    * Get VSPE devices count
    * \return result
    */
    [id(12), helpstring("method vspe_getDevicesCount")] HRESULT vspe_getDevicesCount([out, retval] LONG* Result);

    /*
    * Get VSPE deviceId by device index
    * \param idx device index
    * \return deviceId
    */
    [id(13), helpstring("method vspe_getDeviceIdByIdx")] HRESULT vspe_getDeviceIdByIdx([in] LONG idx, [out, retval] LONG* Result);

    /*
    * Get device information
    * \param deviceId
    * \param name [out] device name
    * \param initString [out] device initString
    * \param ok [out] device state (1 = good)
    * \param used [out] device clients count (0 - not used)
    * \return result
    */
    [id(14), helpstring("method vspe_getDeviceInfo")] HRESULT vspe_getDeviceInfo([in] LONG deviceId, [out] BSTR* name, [out] BSTR* initString, [out] LONG* ok, [out] LONG* used, [out, retval] BOOL* Result);

    /*
    * Get VSPE API version information
    * \return result
    */
    [id(15), helpstring("method vspe_getVersionInformation")] HRESULT vspe_getVersionInformation([out, retval] BSTR* result);

    /*
    * Get VSPE deviceId by COM port index
    * \param ComPortIdx
    * \return deviceId (-1 if not found).
    */
    [id(16), helpstring("method vspe_getDeviceIdByComPortIndex")] HRESULT vspe_getDeviceIdByComPortIndex([in] LONG ComPortIdx, [out, retval] LONG* result);

    /*
    * Get activation error message
    * \return result
    */
    [id(17), helpstring("method vspe_get_activation_error")] HRESULT vspe_get_activation_error([out, retval] BSTR* result);
};

[
    uuid(d7cd1ef7-a520-457b-af9a-8ea103b95381),
    version(1.0),
    helpstring("VSPE 1.0 Type Library")
]

library VSPELib
{
    // ========================================================================
    // Interface implementations
    // ========================================================================
    [
        uuid(bf32160d-8fa7-408b-8a3c-cbfbfc19caa6),
        helpstring("VSPEApi Class")
    ]
    coclass VSPEApi
    {
        [default] interface IVSPE;
    };

};


Devices initialization

General

To create new device, you should call vspe_createDevice (or just load configuration file using vspe_loadConfiguration method). This function takes two parameters: name and initString. Name is device type: for example, "Connector" or "Splitter". initString is initialization string. All parameters in initialization string are separated by ';'.

SerialSettings is special settings block in which parameters are separated by commas. It describes serial port advanced settings.
  • Format: Speed,DtrRts,Bits,StopBits,Parity,CustomReadIntervalTimeout
  • Example: 19200,0,8,1,0,0

Connector

  • Initialization string example: 1;0
  • Description: ComPortIndex;Emulate baud rate

Splitter

  • Initialization string example: 10;1;0;19200,0,8,1,0,0;0;0;0
  • Description: VirtualComPortIndex;RealComPortIndex;ReadOnly;SerialSettings;UseModemRegisters;UseRts;UseDtr

Pair

  • Initialization string example: 10;11;0
  • Description: ComPortIndex1;ComPortIndex2;Emulate Baud rate

Mapper

  • Initialization string example: 1;2
  • Description: OldComPortIndex;NewComPortIndex

TcpServer

  • Initialization string example: 5555;1;19200,0,8,1,0,0;1;127.0.0.1;0;0
  • Description: TcpPort;ComPortIndex;SerialSettings;UseDtrRts;InterfaceIP

TcpClient

  • Initialization string example: 192.168.10.2;5555;1;19200,0,8,1,0,0;0;30;MyScript;0;0;ComPortReadOnly;ComPortWriteOnly
  • Description: TcpHost;TcpPort;ComPortIndex;SerialSettings;DtrRts;ReconnectTimeout;Script;ComPortReadOnly;ComPortWriteOnly Script can be omitted

UDP Manager

  • Initialization string example: 192.168.10.2;5555;1;19200,0,8,1,0,0
  • Description: Host;Port;ComPortIndex;SerialSettings

Serial Redirector

  • Initialization string example: 1;19200,0,8,1,0,0;2;19200,0,8,1,0,0;0
  • Description: ComPortIndex1;SerialSettings1;ComPortIndex2;SerialSettings2;UseModemRegisters


C/C++ Example (Native)

C++ sample

#include <stdio.h>
#include <conio.h>

// include VSPE API header and library
#include "VSPE_API.h"
#pragma comment(lib,"VSPE_API.lib")

int main()
{
    // ****************************
    // STEP 1 - INITIALIZATION
    // ****************************
    const char* config_file_path = "1.vspe";
    const char* activationKey = "";

    bool result;

    // display VSPE API version info
    printf("%s\n",vspe_getVersionInformation());

    // activate VSPE API
    result = vspe_activate(activationKey);
    if(result == false){
        printf("VSPE API activation error: %s", vspe_get_activation_error());
        return 1;
    }

    // initialize VSPE components
    result = vspe_initialize();
    if(result == false){
        printf("Initialization error");
        return 1;
    }

    // remove all existing devices
    vspe_destroyAllDevices();

    // stop current emulation
    result = vspe_stopEmulation();

    if(result == false)
    {
        printf("Error: emulation cannot be stopped: maybe one of VSPE devices is still used.");
        vspe_release();
        return 1;
    }

    // *********************************
    // Dynamically creating devices
    // *********************************
    // Create Connector device (COM9, no baud rate emulation)
    int deviceId = vspe_createDevice("Connector", "9;0");
    if(deviceId == -1)
    {
        printf("Error: cannot create device\n");
        vspe_release();
        return 1;
    }

    // Create Splitter (COM9 => COM10)
    deviceId = vspe_createDevice("Splitter", "10;9;0;19200,0,8,1,0,0;0;0;0");
    if(deviceId == -1)
    {
        printf("Error: cannot create device\n");
        vspe_release();
        return 1;
    }

    // Create Pair device (COM21 => COM22)
    deviceId = vspe_createDevice("Pair", "21;22;0");
    if(deviceId == -1)
    {
        printf("Error: cannot create device\n");
        vspe_release();
        return 1;
    }

    // *********************************
    // Working with configuration files
    // *********************************

    // save configuration to file
    result = vspe_saveConfiguration(config_file_path);
    if(result == false)
    {
        printf("Error: cannot save configuration");
        vspe_release();
        return 1;
    }

    // load configuration from file
    result = vspe_loadConfiguration(config_file_path);
    if(result == false)
    {
        printf("Error: cannot load configuration");
        vspe_release();
        return 1;
    }

    // ****************************
    // STEP 2 - EMULATION LOOP
    // ****************************

    // start emulation
    result = vspe_startEmulation();
    if(result == false)
    {
        printf("Error: cannot start emulation");
        vspe_release();
        return 1;
    }

    // *********************************
    // Extracting devices information
    // *********************************
    int i, count = vspe_getDevicesCount();
    for(i = 0;i<count;++i)
    {
        int ok, used;
        const char* name, *initString;
        int deviceId = vspe_getDeviceIdByIdx(i);
        if(vspe_getDeviceInfo(deviceId, &name, &initString, &ok, &used))
        {
            printf("Detected device: %s (%s). Status: %s, Used: %s\n",
                name, initString, ok == 1 ? "OK" : "ERROR",
                used == 1 ? "YES" : "NO");
        }
    }

    // emulation loop
    printf("Press any key to quit");
    _getch();

    // ****************************
    // STEP 3 - EXIT
    // ****************************

    // stop emulation before exit (skip this call to force kernel devices continue to work)
    result = vspe_stopEmulation();
    if(result == false)
    {
        printf("Error: emulation cannot be stopped: maybe one of VSPE devices is still used.");
        return 1;
    } // if(result == false)

    // release VSPE
    vspe_release();
    return 0;
}


Python bindings

Python bindings requirements

Requirements for native bindings

  • Install Python interpreter (we use version 2.5)
  • Install PythonWin extension
  • Run script from VSPE install folder or copy necessary files to the application folder

Requirements for COM bindings

  • Install PythonWin extension

Python sample (native)

#python

# --------------------------------------
# VSPE python subsystem usage sample
# --------------------------------------

import msvcrt
import VSPE_Python

config_file_path = '1.vspe'
activationKey = ''; # <-----  PUT ACTIVATION KEY HERE

# display VSPE API version information
print VSPE_Python.vspe_getVersionInformation()

# ****************************
# STEP 1 - INITIALIZATION
# ****************************

# activate VSPE API
result = VSPE_Python.vspe_activate(activationKey)
if result == False:
    print 'VSPE API activation error'
    exit(1)

# initialize VSPE python binding subsystem
result = VSPE_Python.vspe_initialize()

if result == False:
    print 'Initialization error'
    exit(1)

# stop current emulation
result = VSPE_Python.vspe_stopEmulation()
if result == False:
    print 'Error: emulation can not be stopped: maybe one of VSPE devices is still used.'
    exit(1)

# *********************************
# Dynamically creating devices
# *********************************
# Create Connector device (COM9, no baud rate emulation)
deviceId = VSPE_Python.vspe_createDevice("Connector", "9;0");
if deviceId == -1:
    print 'Error: can not create device'
    VSPE_Python.vspe_release()
    exit(1)

# *********************************
# Working with configuration files
# *********************************

# save configuration to file
result = VSPE_Python.vspe_saveConfiguration(config_file_path)
if result == False:
    print 'Error: can not save configuration'
    VSPE_Python.vspe_release()
    exit(1)

# load configuration from file
result = VSPE_Python.vspe_loadConfiguration(config_file_path)
if result == False:
    print 'Error: can not load configuration'
    VSPE_Python.vspe_release()
    exit(1)

# ****************************
# STEP 2 - EMULATION LOOP
# ****************************

# start emulation
result = VSPE_Python.vspe_startEmulation()
if result == False:
    print 'Error: can not start emulation'
    VSPE_Python.vspe_release()
    exit(1)

# emulation loop
print 'Press any key to quit'
msvcrt.getch()

# ****************************
# STEP 3 - EXIT
# ****************************

# stop emulation before exit (skip this call to force kernel devices work without this script)
result = VSPE_Python.vspe_stopEmulation()
if result == False:
    print 'Error: emulation can not be stopped: maybe one of VSPE devices is still used.'
    exit(1)

# release VSPE python binding subsystem before exit
VSPE_Python.vspe_release()
exit(0)

Python sample (COM interface)

#python
import win32com.client
import msvcrt

vspe = win32com.client.Dispatch("VSPE.VSPEApi")
activationKey = ''; # <-----  PUT ACTIVATION KEY HERE

# display VSPE API version information
print vspe.vspe_getVersionInformation()

# activate VSPE API
vspe.vspe_activate(activationKey)

# initialize VSPE
vspe.vspe_initialize()

# create Connector (COM9, no baud rate emulation)
vspe.vspe_createDevice('Connector','9;0')

# create Splitter (COM9 => COM10)
vspe.vspe_createDevice('Splitter','10;9;0;19200,0,8,1,0,0;0;0;0')

# create Pair device (COM21 => COM22)
vspe.vspe_createDevice('Pair','21;22;0')

# start emulation
vspe.vspe_startEmulation()

# wait for any key ...
print 'Press any key to quit'
msvcrt.getch()

# stop emulation
vspe.vspe_stopEmulation()

# release VSPE
vspe.vspe_release()


C# (COM interface)

Add reference to VSPE_ComServer.dll.

Or, if VSPE is already installed and VSPE_ComServer component is registered with regsvr32 tool just add reference to VSPE COM component as shown below:

Adding reference

C# example

Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VSPELib;

namespace VSPE_API_Test
{
    public partial class Form1 : Form
    {
        private VSPEApiClass vspe;

        public Form1()
        {
            InitializeComponent();

            vspe = new VSPEApiClass();
            int result;
            string activationKey = ""; // <-----  PUT ACTIVATION KEY HERE

            // display VSPE API info
            label1.Text = vspe.vspe_getVersionInformation();

            // activate VSPE API
            result = vspe.vspe_activate(activationKey);
            if (result == 0)
            {
                // failed to activate!
                MessageBox.Show("Failed to activate with error: " + vspe.vspe_get_activation_error());
                return;
            }

            // initialize API
            result = vspe.vspe_initialize();
            if (result == 0)
            {
                // failed to activate!
                MessageBox.Show("Failed to initialize");
                return;
            }
        }

        private void CreateDevice_Click(object sender, EventArgs e)
        {
            int result;

            // Stop emulation
            result = vspe.vspe_stopEmulation();

            // Deatroy all devices
            result = vspe.vspe_destroyAllDevices();

            // Add Connector (COM9, no baud rate emulation)
            result = vspe.vspe_createDevice("Connector", "9;0");

            // Start emulation
            result = vspe.vspe_startEmulation();
        }

        private void OnClosing(object sender, FormClosingEventArgs e)
        {
            // Stop emulatio
            vspe.vspe_stopEmulation();

            // Release VSPE
            vspe.vspe_release();
        }

        private void Info_Click(object sender, EventArgs e)
        {
            // get devices count
            int count = vspe.vspe_getDevicesCount();
            string result = "Devices count: " + count.ToString() + "\n";

            // enumerate devices
            for (int i = 0; i < count; ++i)
            {
                // get device ID
                int deviceId = vspe.vspe_getDeviceIdByIdx(i);
                string name, initString;
                int ok, used;
                vspe.vspe_getDeviceInfo(deviceId, out name, out initString, out ok, out used);

                result += name + " (" + initString + ") OK=" + ok.ToString() + "\n";
            }

            MessageBox.Show(result);
        }
    }
}


Command line

VSPE supports command line parameters.

For example it can be used to automatically load configuration at Windows startup. Please note that only one VSPE instance can exist at the same time !

Usage:
VSPEmulator.exe <config file path> <options>

Config file is a special file with extension ".vspe" that can be created using VSPE "Save as..." command.
Options are additional parameters that can be passed to VSPE to manage its basic behavior.
  • -minimize : minimize VSPE dialog
  • -hide_splash : do not show splash window

Example:

Execute VSPE and automatically load configuration file
VSPEmulator.exe c:/config_files/main.vspe

Execute, load configuration file, hide splash and minimize VSPE
VSPEmulator.exe c:/config_files/main.vspe -minimize -hide_splash


Known limitations and bugs

  • Virtual COM ports are not visible in Device Manager, but they can be opened and used by applications
  • "Start as service" feature can create only kernel mode devices: Splitter, Pair, Connector or Mapper devices
  • Baud rate emulation is very rough
  • Serial port output buffer is pass-through (not actually emulated)
  • Serial port output timeouts are ignored
  • DataFlow control is not as fast as it could be (try to avoid sending packets that are actually larger than receiver's input buffer size)


Contact information

Contact information

E-mail: support@eterlogic.com
Online form: https://www.eterlogic.com/Feedback.html
Please make sure emails from support@eterlogic.com are not blocked/filtered out by your SPAM filter.


Version history

Version 1.1 BETA (January, 2023)
  • Added ARM64 platform kernel driver
  • VSPE Windows Service is now working for all devices.

Not compatible with previous version, service needs to be re-created

  • VSPE Service mode: silent mode
  • Bridge: read-only mode for data stream
  • Bridge: added Text Transformer (replacing regex/wait for new line)
  • Spy: better descriptions, n/a stream is now supported
  • Added more technical details to Help->About
  • More detailed error descriptions
  • UI fixes and tweaks

Version 1.1 (October, 2021)

  • Fixed kernel driver memory integrity compatibility for Windows 10 64
  • Updated kernel driver signing with 3 signatures
  • Windows 10 32 bit driver extra signature
  • Documentation fixes
  • VSPE API: now does not print anything to console output

Version 1.0 (June, 2020)

  • VSPE installer: upgraded to latest WiX module
  • VSPE installer: to reduce number of support cases, now asking for Windows reboot after installation has been completed
  • VSPE API: vspe_release now releases control device handle
  • VSPE API: initialization refactoring
  • 64 bit installer now installs VSPE to correct Program Files location
  • Better description in kernel driver troubleshooting dialog
  • Correctly detecting missing kernel driver service in troubleshooting information

Version 0.946 (May, 2020)

  • Fixed bug in Autostart helper command when file contains spaces
  • Fixed bug in Windows service mode when service manager complained that service did not start
  • Multi signature kernel driver signing
  • Refactored kernel driver installation
  • More debug info in about dialog
  • Minimizing to system tray is now optional (disabled by default)

Version 0.945 (May, 2020)

  • Fixed issues with starting as service
  • Updated 'autostart shortcut' documentation for modern Windows systems

Version 0.944 (May, 2020)

  • Fixed issue with monitoring devices from 64 bit VSPE app
  • Getting ready for dropping exclusive access requirement to kernel driver
  • Switching to global mutex to detect VSPE tool instances from other sessions
  • Better checkpoint logging on startup to investigate client issues
  • AppData folder is now changed in LocalAppData, license and settings are migrated
  • Missing LocalAppData variable is now handled correctly

Version 0.943 (May, 2020)

  • Fixed issue with settings file permission denied when started as regular user
  • Fixed issues with API/VSPE tool licenses collisions
  • Identified issue and disabled Monitoring feature for x64 version
  • Register directly from About dialog
  • Support information in About dialog
  • More descriptive error messages for registration and kernel driver issues
  • VSPE.log is now created in correct AppData folder
  • API: Added vspe_get_activation_error() method and better activation error message
  • UI tweaks

Version 0.942 (April, 2020)

  • Fixed issues with product registration
  • Showing user more information when driver cannot be started

Version 0.941 (June, 2019)

  • Fixed kernel driver loading issue with Windows 10 Desktop

Version 0.940 (June, 2019)

  • Fixed Windows 10 May update compatibility issue
  • Added 64 bit package

Version 0.939 (February, 2011)

  • Fixed UDPManager device

Version 0.938 (June 26, 2010)

  • Added Spy device
  • TcpServer and TcpClient devices now supports COM port read-only and COM port write-only modes
  • Fixed bug with localization of the device properties dialog
  • Added ability to reorganize devices (move up and down) when emulation is stopped
  • Fixed bug with COM port speed selection from Combo box (added missed values)
  • Reinitialization of failed devices (see Preferences => Advanced tab) - disabled by default
  • Fixed French translation
  • File data stream: added output ability, now it can be used to write output to file
  • Updated documentation

Version 0.937 (March 29, 2010)

  • Fixed bug with all devices: input buffer is cleared when virtual COM port is being opened
  • Fixed bug: possible crash when using just created port at the same moment when it is being initialized
  • Fixed bug: TcpClient and TcpServer connections leaks
  • Fixed French translation (thanks to Emmanuel Gambarini)
  • Fixed Italian translation (made from scratch - Thanks to Fabio Bima)
  • Added Czech translation (thanks to Martin Hradil)

Version 0.936 (October 2, 2009)

  • VSPE_API: updated header file (__cdecl specification)
  • Fixed fail on exit

Version 0.935 (October 1, 2009)

  • Corrected German language translation (thanks to Philipp M. Kappler)
  • Corrected French language translation (thanks to Mathieu Peyrega)
  • Added Dutch language translation (thanks to Mathieu Fichefet)
  • Fixed bug in TcpClient: could not start without script file
  • Fixed fault on VSPE_API unitialization (The instruction referenced memory at "0x00000020")
  • Splitter device: experiments

Version 0.934 (September 17, 2009)

  • Added translations to Spanish, French, German and Italian languages
  • Added lua scripting support in TcpClient device
  • Added saving possibility (in the binary format) from the Connector/Splitter/Pair devices
  • Emulation improvement: SERIAL_EV_RLSD event generation
  • Emulation improvement: simplified emulation of IOCTL_SERIAL_LSRMST_INSERT control code
  • API bug fixed: VSPE kernel driver reinstallation when it is opened by another API instance
  • TcpServer: added interface IP parameter to listen for incoming connections

Version 0.933 (April 23, 2009)

  • Kernel devices: IRP_MJ_FLUSH_BUFFERS processing
  • VSPE settings are stored now in vspe.ini instead of registry: service compatibility
  • TcpClient: python scripting is disabled to remove dependency on Python25.dll.
  • VSPE_API users: there is no need to bundle Python25.dll anymore with your programs.
  • HttpServer: fixed exception when TCP port is used.
  • Splitter: bogus "critical error" fix when used with Connector. This is not an error.
  • VSPE GUI bug: language changing when information panel is visible.
  • VSPE_API: automatic driver initialization in vspe_initialize(). Error returned on fail.
  • VSPE_API: OutputDebugString is now called to display errors/important messages.
  • VSPE_API: vspe_getDeviceInfo - used now returns actual clients count

Version 0.931 (April 6, 2009)

  • Bug fixed: BSOD on destroyDevices (Pair, Connector)
  • Bug fixed: BSOD when splitter is created/destroyed very quickly

Version 0.929 (April 5, 2009)

  • Bug fixed: ReadIntervalTimeout is now enabled only after some data is received once
  • Added Chinese language
  • TcpClient: "zombie" connections bug fixed
  • Windows 2000 compatibility fixed (HttpServer issue)

Version 0.928 (April 4, 2009)

  • Splitter: bogus "critical error" quick fix

Version 0.927 (April 3, 2009)

  • New device added: Mapper
  • Feature added: kernel devices data monitoring
  • Feature added: password protected VSPE http server
  • HTTP interface: creating, deleting, reinitializing devices, loading configuration
  • Splitter: fixed bug (input buffer synchronization)
  • Splitter: invalid file handle detection (Properties dialog: Debug => Fix broken devices)
  • GUI: small fixes and modifications
  • Fixed bug: (kernel devices) making write request (0 bytes)
  • Fixed bug: properties dialog boolean values problem

Version 0.924 (March 29, 2009)

  • CRITICAL bug fixed: occasional BSOD with all kernel devices (synchronization issue with some port settings)
  • Added russian language
  • TcpClient: TCP conenction ignored on initialization
  • Splitter device: changed default sleep timeout

Version 0.923 (March 24, 2009)

  • Updated VSPE API, C++ sample, documentation
  • Updated VSPE_API PythonBindings
  • Added: VSPE_ComServer.dll - COM interface
  • WixInteractor: removed console
  • VSPE_API: Activation requirement added
  • VSPE_API: No additional files required in application folder when using COM interface.
  • VSPE_API: commercially licensed applications can work simultaneously
  • Distribution package contains FREE 32 bit VSPE API key
  • Fixed bug: splitter freezing
  • 64 bit: VSPE can be started for testing purposes without activation key
  • TcpClient, TcpServer, Redirector, UdpManager: checking for errors when reading from the source port

Version 0.911 (February, 2009)

  • Fixed uninstaller bug in Vista

Version 0.910 (January 28, 2009)

  • Feature added: Windows Vista 64 bit support (64 bit license required)

Version 0.875 (December 31, 2008)

  • Feature added: Bridge device

Version 0.871 (November 25, 2008)

  • Feature added: VSPE API
  • Feature added: VSPE API C/C++ sample
  • Feature added: VSPE API Python bindings and sample
  • Fixed bug: ReadIntervalTimeout=MAXDWORD, ReadTotalTimeoutMultiplier=MAXDWORD, ReadTotalTimeoutConstant=(0;MAXDWORD)
  • Fixed bug: advanced tab in VSPE settings dialog did not work at all
  • Code refactoring

Version 0.866 (September 30, 2008)

  • Pair device can be used with modem drivers (unlike Connector)
  • Fixed Python scripting bug on program exit
  • Fixed bug: driver start failure on XP64 when previous version is installed
  • Fixed bug: ReadTotalTimeoutMultiplier is now ignored if -1
  • (In progress) Data flow control

Version 0.865 (September 17, 2008)

  • Fixed major bug (Connector and Pair): read buffer synchronization issues
  • Fixed critical bug: ReadTotalTimeoutConstant timer fails
  • Improved Splitter device processing
  • Added compatibility with NSSM (service manager)
  • UdpManager: added error message if listening to port failed
  • Added Simple UdpManager (hidden by default)

Version 0.86 (September 16, 2008)

  • Fixed bug: Redirector and TcpClient crash on exit
  • Improved Updater parser

Version 0.85 (September 13, 2008)

  • Added custom ReadIntervalTimeout in the serial port settings dialog
  • Added UdpManager device
  • VSPE can be started without kernel driver (only user-mode devices can be created)
  • Devices configuration can be modified after creation
  • Logging into file
  • Start/stop emulation buttons
  • TCP keep-alive control (optional, disabled by default)
  • Added simple Python script system for TcpClient device
  • Fixed bug on 64 bit OS: WOW64 file system redirection
  • Fixed bug on XP 64: Waiting dialog hanging

Version 0.81 (September 1, 2008)

  • Kernel driver bug fixed: ReadFile with TotalTimeout != 0
  • Kerner driver bug fixed: ReadTotalTimeoutConstant
  • Device reinitialization command
  • Socket manager: polling timeout changed from 500 ms to 100 ms
  • TcpClient: read data timeouts

Version 0.80 (July 29, 2008)

  • Feature added: initial modem registers state in the Splitter device settings
  • Modem registers mapping in the Serial Redirector device
  • TcpClient/TcpServer: Changing RTS/DTR state depending on connection status is optional
  • Some small kernel driver bugs fixed

Version 0.78 (July 25, 2008)

  • Feature added: user mode device - Serial Redirector
  • DTR for TcpServer and TcpClient depends on connection status
  • Information page for TcpServer
  • EV_CTS, EV_DSR events
  • Bug fixed: TcpServer, TcpClient disconnect detection
  • Bug fixed: hanging up when ReadIntervalTimeout is zero
  • Small GUI improvements

Version 0.77 (July 21, 2008)

  • Standard pinout for Pair and Connector devices
  • RTS for TcpServer and TcpClient depends on connection status
  • Modem registers information for kernel devices (Connector and Pair)
  • Preferences dialog (General tab)

Version 0.76 (July 15, 2008)

  • Bug fixed: Pair device: exclusive access only
  • Bug fixed: Read errors in some applications
  • Feature added: Baud rate emulation for Connector and Pair devices (Optional)
  • Additional driver checks at program startup
  • Kernel driver location and type changed (SERVICE_SYSTEM_START)

Version 0.75 (July 10, 2008)

  • Bug fixed: some apps hanged on close

Version 0.74 (June 24, 2008)

  • Feature added: TcpServer device receives data from network clients
  • Fixed some bugs

Version 0.73 (June 21, 2008)

  • Feature added: information panel
  • Performed some code optimization

Version 0.72 (June 10, 2008)

  • Feature added: working without administrator privileges
  • Emulation issue: ReadIntervalTimeout

Version 0.71 (May 30, 2008)

  • Fixed 2 nasty emulation bugs

Version 0.7 (May 29, 2008)

  • Windows Vista compatibility
  • Command line support
  • Documentation update

Version 0.6 (May 26, 2008)

  • Feature added: TcpClient device

Version 0.5 (May 22, 2008)

  • Registered vspe shell extension
  • Improved user interface

Version 0.4 (May 21, 2008)

  • Feature added: TcpServer device
  • Feature added: loading / saving configuration
  • Improved user interface
  • Code refactoring

Version 0.3 (May 13, 2008)

  • Feature added: x86_64 platform support
  • Fixed some emulation bugs
  • Improved user interface

Version 0.2 (May 5, 2008)

  • Feature added: virtual pair
  • Fixed emulation bugs (thanks to Dmitry Fomin for his detailed error reports)
  • Fixed problems with deleting virtual devices.

Version 0.1 (April 13, 2008)

  • Feature added: virtual connector
  • Feature added: virtual data splitter


Frequently asked questions

I am using some feature and it does not work. Is it because VSPE is unregistered?

Currently, only "Start as service" feature won't work correctly if VSPE is unregistered. All other features will work exactly the same.

Virtual serial ports are not visible in Windows device manager!

This is currently by design. Even though the ports are not shown in Device manager, they are still created and can be used by applications - just try it.

I create virtual port COM10 but it is not visible to my application.

It is the operating system issue. COM ports with numbers from 1 to 9 can be opened without any problems. To open device with number greater than 9 you need to use "\\.\" prefix.

  • COM1 : valid name
  • COM10 : invalid name
  • \\.\COM10 : valid name
  • \\.\COM1 : valid name

I create connector device to emulate modem, but modem does not work correctly.

This can be related to the modem driver. Try to use Pair device.


Credits

Team

  • Olena Ter

VSPE contributors

  • Agustin Perez: Spanish translation
  • Fabio Bima: Italian translation
  • Yan Ning: Chinese translation
  • Philipp M. Kappler: German translation
  • Mathieu Peyrega: French translation
  • Mathieu Fichefet: Dutch translation
  • Martin Hradil: Czech translation

-

Portions of this software are copyrighted by:

-- Eric Young and the OpenSSL Project (https://www.openssl.org)