Submit your email address to get a link for quick download on your desktop and get started!
In this article, we'll tell you about the simplest way to test serial applications with the help of a virtual serial port. By using dedicated software, you can provide your system with as many virtual COM interfaces as you need. Continue reading to better understand the benefits of serial port simulation for serial app development and testing. To find out how to split serial port between application look at out new tutorial with examples of using Virtual COM Port Driver PRO.
Serial communication is an integral part of a production environment where numerous specialized devices exchange data via serial interfaces. It often happens that to receive data from a particular device, specialists need to use dedicated serial applications. As a rule, such serial apps communicate with required hardware via COM interfaces which in turn are linked with a serial cable. Once connected, serial programs can get particular data from industrial equipment, process it, and store it in a single database. Later, the data will be used for making reports, creating various GUI objects, generating graphs, etc.
While developing serial apps, programmers may face some difficulties related to program testing. In some cases, it's not possible to modify the hardware device. Therefore, if it's required to test a certain application for a special occurrence of characters, experts start looking for solutions.
One of the possible workarounds is using a null-modem cable, which allows connecting one program, e.g. HyperTerminal, to another. With this type of connection, you can not only link two computers together but also provide communication between two apps installed on the same PC. For this to be accomplished, you need to have at least two COM ports available in your system.
If your PC lacks serial interfaces, you may create virtual COM ports and use them as emulators of physical serial ports. In this article, you'll find out how to establish serial communication using a virtual COM port.
This time we've decided to establish communication via a virtual null-modem cable. As is known, there are many port virtualization apps out there. We've chosen a solution that stands out for its stability and ease of use. Virtual COM Port Driver is a serial port emulator for Windows. The software supports Windows kernel driver technology (WDM, WMI, Power Management, PnP, etc.) and is fully compatible with most of recent Windows versions (including Windows 10 and Windows Server 2016). The software allows creating pairs of virtual serial ports connected via a virtual null-modem cable.
This comes in handy when you need to exchange data between serial apps. You can just connect apps to a pair of COM ports and communicate data in such a way that everything written to one virtual port will immediately appear on the other end of the pair and vice versa.
Now let's see how to install a pair of virtual serial interfaces on your system.
Please keep in mind that if you're going to use the newly-created virtual ports with C# Windows application, you need to name them starting with COM. It's very important as the .NET Framework uses the System.IO.Ports to access the COM ports. To establish a connection we need to use a function named as serialPort1.Open() but it can only open a port which name starts with COM.
In case you need to test serial ports with some other app, in “Using VSPD with programming languages” you’ll find the examples of using Virtual Serial Port Driver with different programming languages.
Here is a detailed guide that quickly gets you up and running with Advanced Serial Port Terminal. We will pass over a discussion of customization settings for the time being.
Serial Port Terminal is a high quality serial terminal emulation solution. Its advanced features set it apart from competitive products with advantages such as the ability to simultaneously monitor multiple serial ports and the variety of formats that are available for viewing data transmission. The developers at Eltima Software fully support the tool and provide regular updates to ensure the application continues to deliver excellent results.
Once your virtual COM interfaces have been properly set up, you can start testing. As an example, we’ll consider testing COM ports with Windows HyperTerminal .
To launch a new HyperTerminal instance, head to Windows Start Menu > Programs > Accessories > Communication > HyperTerminal.
Say, you have a pair of virtual ports named COM3 and COM4. Here’s how to use hyperterminal:
Starting from this moment, you can easily use HyperTerminal to test serial ports. Just type the required text in the white text area of COM3 and the written data will be transmitted via a virtual null modem cable and displayed on the screen of COM4.
As long as HyperTerminal supports data transfer via COM ports, you can use this program to perform a loopback test. If you feel the need for HyperTerminal replacement with a more advanced solution, HyperTerminal Alternative guide will help you.