Virtual.com Port Emulator

Posted on
Virtual.com Port Emulator 5,7/10 1621 votes

The Null-modem emulator is an open source kernel-mode virtual serial port driver for Windows, available freely under GPL license. The Null-modem emulator allows you to create an unlimited number of virtual COM port pairs and use any pair to connect one COM port based application to another. HHD Software Freeware Virtual COM Ports Emulator Functionality Overview. See Free Virtual Serial Ports Feature List. Free Virtual Serial Ports. Application allows creation of a virtual serial port, which is connected to a named pipe. Virtual Serial Port that Uses Files for Input and Output.

In my computer networks course we are supposed to learn parallel port programming by using the native registers (like using outportb like commands). I don't have a parallel port (because I live in 2011) but want to practice the programs (I installed the old turboc 3 IDE using dosbox). Is there a program which emulates parallel ports like this program emulates serial ports?

Rick_2047Rick_2047

3 Answers

Since the environment is fake anyway, i.e. you don't have an actual port to play with, you could just as well emulate the port functionality in your program.

Here's how to do it in Windows using Structured Exception Handling (SEH):

Output:

Just alter the implementation of ReadPort() and WritePort() to do something more useful or more in line with the printer port operation.

Alexey FrunzeAlexey Frunze

It looks like dosbox may not support parallel ports without patches. It also appears that virtualbox also doesn't yet support parallel ports. But even if they did support parallel ports, you'd still need something on the other end - either a debug-driver on your host operating system, or something like a USB to Parallel adapter (available at the usual retailers).

Can you say more about why you want to learn about the parallel port? It is a mostly dead interface in 2011, as you suggest. If you really want to play with low-level parallel-style I/O, you may want to look in to the Arduino platform.

Community
ObscureRobotObscureRobot
Serial

I don't know of any software offhand, though I would not be surprised if Linux Wine did a good job of supporting a parallel port, though I don't know if it can be completely virtualized when lacking a physical LPT.

When having to do legacy compatibility testing, I'm always amazed out how easy it is to find a cheap old PC.

Alas, this is highly regionally-centric, but visit a local resale store or computer recycling operation. For example, in Portland, I would visit Free Geek and Goodwill and not expect to pay more than $15. If your time is worth much, this is probably more affordable than messing around with emulators and then wondering how good they are.

wallykwallyk

Not the answer you're looking for? Browse other questions tagged cemulationvirtualizationdevice or ask your own question.

This article is a reboot of an earlier piece which to our surprise is continuously one of the most visited pages on the NetBurner Learn Blog. However, the original is quite old and sorely in need of an update as our software has evolved. It’s great to see people are still making good use of this information and if you read on, you’ll see why it’s a great solution when you don’t want to reinvent the wheel.

What is a virtual COM port?

A virtual COM port or a virtual serial port is an ideal solution for when a legacy software application expects a connection to a serial device port (COM port) but cannot connect, due to a physical lack of available serial ports. Instead, we reconfigure the computer to send serial port data over a local area network or the Internet as if over a true serial port. When the legacy application sends data to a serial COM port, it is actually transmitted over a TCP/IP network and back from the network to your legacy application — and presto! — we have a virtual serial or virtual COM port.

Why should I use a virtual COM port?

Most modern desktop computers and laptops no longer have the old school DB9 RS-232 serial ports (COM ports) that were traditionally used to connect directly to hardware used in commercial, laboratory or industrial safety and control systems. In many cases, even if they do, the number of available ports is very limited. This can be especially problematic if you still rely on legacy software applications that specifically communicate through those now non-existent (or very limited) serial ports. This is a bit of a different challenge than just converting a serial device’s interface to a USB or ethernet interface since the legacy software doesn’t know how to recognize or read USB or Ethernet — and resurrecting the software engineer that originally coded it probably isn’t an option.

We all need to upgrade computers from time to time to keep up with the latest OS and security requirements, not to mention just getting that new car smell, but that doesn’t mean your legacy serial software assets should suddenly be worthless…does it? We say down with obsolescence and waste!

We’re going to help you get more life out of your serial system while keeping your computer in the 21st century. NetBurner provides a free virtual COM port application that creates a virtual COM port that can be used to transmit serial data over the network (Internet or LAN) to NetBurner Serial to Ethernet Servers or Core Modules. This saves time and money by allowing you to continue to use your existing legacy applications.

Important Note: This tutorial deals exclusively with a NetBurner Serial to Ethernet Server virtual COM port implementation. A tutorial specific to creating a virtual COM port using a NetBurner Core Modules is still in the works. If you are looking for a native software solution to create virtual COM port pairs, we suggest the Virtual Serial Port Driver from our partners at Eltima Software. It is an incredibly stable and versatile utility which supports various Windows versions, up to the latest Windows 10.

Hardware and software required for the example

  • A Serial to Ethernet adapter. Any of NetBurner’s serial to Ethernet solutions will work.
  • A serial communications program, such as MTTTY serial terminal provided on our website.
  • Virtual serial port software, such as NetBurner’s Virtual COM Port Driver provided on our website. (License Terms)
  • One serial to USB converter dongle, such those made by Sabrent for sale here.

Our test setup

We’re going to show you a very basic virtual com port configuration to display the ins and outs of getting a virtual com port running. Please note that the virtual COM port driver provided on our website can only be used with NetBurner’s serial to Ethernet (S2E) hardware and System-on-Modules. To set up a virtual serial port configuration that can be used with any type of device, we highly recommend the Virtual Serial Port over Ethernet Connector from our partners at Eltima Software. This application allows for the creation of any number of virtual COM ports with preassigned parameters, and can be used to establish a connection with hardware serial device servers over an Ethernet connection, as well as to create links with virtual serial ports created on other computers.

In our scenario, we will run an instance of the MTTTY serial terminal application to represent both ends of our communication path. First, it will represent the “legacy serial application” that is connected to the NetBurner serial to Ethernet device through the serial to USB converter. Second, it will represent the “remote client” that is sending and receiving data to this device.

To begin, we will initially create a virtual serial port on COM20 which will allow us to send data from the “remote client” MTTTY instance to the NetBurner serial to Ethernet device over the Ethernet connection. The NetBurner device will then send the received network data out of its own serial port (DB9) back to the laptop. This data will be read using the USB port on the laptop with the help of a USB to serial converter. Finally, we will use the “legacy serial application” MTTTY terminal to read the data from our USB converted serial port, COM6. This communication path is bi-directional, so the expected behavior is that if we send data from one MTTTY terminal instance, it will show up in the other, and vice-versa.

How to setup the virtual COM port driver

  • Install the Virtual COM Port Driver software using the link provided above. The default installation directory for the software linked above can be found at C:nburnVirtualCommPort. From here, execute NBVirtualCommPort.exe. The application window will open…we’ll come back to this shortly.
  • Before we go further, we will need to know the IP address of your device, and the listening port number. With NetBurner devices, finding the IP address is as easy as using our IPSetup tool’s search ability to discover our device on the network and looking at it’s associated IP address. IPSetup can be found in the C:nburnpcbin directory of your install or just use your operating system’s search utility to find it.

If you are new to NetBurner products here’s a quick guide to help you use IPSetup. First make sure your NetBurner S2E device or Core Module is connected to your Ethernet router or LAN. In our example we use the SB800EX. Second, power your devices either with an AC wall wart or via USB. Open the IPSetup software. Your device should appear in the “Select a Unit” field, but if not click “Search Again” and it should appear. If your device supports wifi, click the + sign the expanded information will reveal the unit’s current IP address. Otherwise, it should be listed on the main line of the device entry. In the figure below the SB800EX shows an IP of 10.1.1.130. Jot down this IP address to use later.

  • Now we need to go to your device’s homepage, and discover its listening port. You can simply click “Launch Webpage” in IPSetup or type the IP of the device into your favorite browser. Then click the “TCP” hyperlink in the menu. The figure below shows the “TCP” page for our SB800EX Serial to Ethernet server device which has two serial ports, Port 0 and Port 1, respectively. Jot down the listening port for serial port 0.
  • Back in the Virtual COM Port application, click on “Add” in the Virtual Serial Port dialog box, which will bring up the “Edit Connection” window.
  • Next, from the “Select serial port” drop-down menu, select a comm port to associate with and give it a new “Connection Name”. In this case we chose COM20 and named it “Client_COM20” to correspond. Then, in the box labeled “Remote host name/port” enter the IP address of your NetBurner device followed by the listening port determined during the previous steps.
  • Click “Add”, verify that the entry was added to the list, and then click “Apply”.
  • Now we can see that our new virtual comm port has been successfully added to the main Virtual Comm Port application window.
  • Open two Multi-threaded TTY windows (the MTTTY serial terminal application). One window will be used for the USB Serial port, and one window will be used for the Virtual Serial Port. In our image below, COM20 was the virtual comm port we had set up, and COM6 is connected directly to our device via a serial port (in this case converted from the USB port- Universal Serial Bus).
  • Click connect and send data from the Virtual serial port or USB Serial port to confirm data is going back and forth.

Congratulations! You have now setup and tested your virtual com port. We hope that you can see how this example can be expanded upon to incorporate your own legacy serial comm applications and systems to work with newer computers that either have too few DB9 RS-232-style ports or none at all.

License Terms

Permission is hereby granted to purchasers of NetBurner System-on-Modules and serial-to-Ethernet modules (NetBurner Devices) to use this program to create a virtual serial communications port on a Windows computer so long as the sole purpose is to connect to the NetBurner Device. No other rights to use this program or its derivatives in part or in whole are granted.

  • Tags: COM Port, Serial to Ethernet, virtual serial port

Get monthly updates from our Learn Blog with the latest in IoT and Embedded technology news, trends, tutorial and best practices. Or just opt in for product change notifications.

Recent Posts

Virtual Serial Port Emulator 64 Bit Crack

Tags