(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )
If the communications itself is the object of the test, then a second serial port driven by the simulation code seems like a good approach. Simply using a loopback on a single port doesn't sound like it will work, since it is still a single port, which only a single process can open and use.
The problem
Suppose we have an application that works with some device using serial port (com port). It could be GPS reader, IRDA, whatever. So it looks like this:
Now what we want, is to have the device connected to one machine (server), and run the application on the remote machine (client) over the network. Real life example: a device is connected to raspberry pi (very small single-board machine) that is connected to a local network, and read the data on a desktop.
Since the application (APP on diagrams) knows only how to communicate with the device by serial port (we suppose), the client machine has to have some virtual serial port that is used by the application:
So now the application just works with serial port on the client machine, and doesn't even know that data is actually transmitted over the network.
The solution in theory
One of the solutions is using telnet with RFC2217 - Telnet Com Port Control Option. Is solves exactly the problem above. There are a lot of software that supports telnet+RFC2217 serial port forwarding. It allows you to run the server and the client on linux or windows machines (and MACs I suppose, but haven't tested it). Thus can, as example, run linux server and windows client, both using completely different packages, but because of RFC2217 they 'know' how to communicate.
More over you can multiplex the com ports and encrypt the data. Whatever you want.
The solution in practice
WINDOWS
There is an absolutely brilliant free opensoure solution that can be used for comport forwarding, client and server for windows. It is called com0com.
Server
For the server you need only hub4com part of it.
Configuration (I just cite the documentation):
You have a server computer with phisical COM1 port and you'd like to share itthrough the network by the RFC 2217 'Telnet Com Port Control Option' protocol:
Start the com2tcp-rfc2217.bat on COM1 port. For example:
It will listen TCP/IP port 7000 for incaming connections and redirect them to COM1 port.
Client
To be a windows client you have to install com0com virtual comport driver.
Create a PAIR of virtual comports where one is used for RFC2217 and the other is the port for your application will use.
(documentation citation) for RFC 2217 client :
You have a server computer your.comport.server with physical serial portshared through the network by the RFC 2217 protocol (see above example) andyou'd like to use it on the client computer like a virtual serial port.
With the com0com's Setup Command Prompt create COM5<->CNCB0 virtualCOM port pair (see com0com's ReadMe.txt for more info). For example:
Start the com2tcp-rfc2217.bat on CNCB0 port. For example:
It will redirect virtual serial port COM5 on the second computer to the physical serial port on the first computer.
Driver Signature
Deprecated part - com0com 3.0.0 comes with driver signarure. But if driver signature bugs you...
According to this bug report and my own experience, on Windows 8x64 you probably will get problem with driver installation if you don't have the driver signature verification turned off.
To enable driver test mode and sign a driver for windows, one may download
DSEO
DSEO
Then run it
Enable Test Mode (if you hasn't done it before)Sign a system file
d:ToolsComOverNetworkcom0com
- is where I installed com0comRestart the system
![Stm32 virtual com port driver linux Stm32 virtual com port driver linux](http://img.informer.com/screenshots/470/470727_12.png)
LINUX:
Server
The linux app I've got working pretty easy is ser2net
It has configuration file located at /etc/ser2net.conf.The configuration line (for /etc/ser2net.conf) that corresponds to windows setup above
Here:
- 7000 - port
- /dev/ttyUSB0 - name of serial port
- 1000000 ... - baud rate etc (actually you can skip it because of remctl)
- remctl - means using remote port configuration as of RFC2217
That is it. Read ser2net docs for more
Ubuntu installation
Client
Mmmm... Can you write it here, please?
Virtual Serial Port Driver Download for Windows 10 - Free (Latest Version)
Download Virtual Serial Port Driver for Windows 10 64 bit and 32 bit. Install Virtual Serial Port Driver latest (2020) full setup on your PC and laptop from FileHonor.com (100% Safe).
Short Description
Virtual COM Port Driver emulates virtual serial ports and connects them in pairs via virtual null modem cable. Applications on both ends of the pair will be able to exchange data in such a way, that everything written to the first port will appear in the second one and backwards. All virtual COM ports work and behave exactly like real ones, emulating all their settings. You can create as many virtual port pairs as you want, so there will be no serial ports shortage and no additional hardware crowding your desk.
Built on Virtual COM Port Driver functionality, Virtual COM Port Driver PRO is an efficient, powerful software application. It assists in creating bundles of virtual serial ports and allows the user to customize port parameters, making it an ideal solution for many different uses. Virtual Serial Port Driver PRO offers a user-friendly way to manage both real and virtual COM ports.
Serial port splitting
Virtual Serial Port Driver PRO allows splitting physical serial ports (e.g. COM 1) into several virtual communication ports (COM2, COM3, COM4, etc.) which appear in the system as exact copies of a hardware serial interface. Also, the software offers the sharing of hardware serial ports among multiple applications. Several serial apps will be able to access the same COM port and a device plugged into it.
Joining COM ports
The software solution will help you link several real COM ports to one virtual serial port. Connected to this virtual COM port, a serial application will receive data from all joined real COM ports simultaneously. Simply put, with this advanced feature, you’ll be able to redirect data from several devices to one application.
Creating bundle connections
This unique option offered by the software PRO version lets you create and manage complex bundles of serial ports. That means serial data can be transmitted in and out by an unlimited number of physical and virtual COM interfaces. Received by a COM port of the ‘IN’ side, serial data will be redirected to every COM port at the ‘OUT’ side of a bundle and vice versa.
Switching ports automatically
In case your application is designed to work with a limited number of ports, you can use Switcher, a special feature of Virtual Serial Port Driver PRO. With this option, you can join several physical ports into one virtual (optionally, you can give the same name to all of the ports), and create a switcher to this virtual COM port in the required app.
Whenever your program will require a serial port connection, the switcher will detect a non-occupied COM port in the list of joined ports and offer it to the app. This way, your program will automatically talk to any free serial port as though it were always the same port.
Merging COM ports
The new advanced feature of Virtual Serial Port Driver PRO lets you add any number of physical and virtual COM ports to a single serial port bundle not divided into ‘IN’ and ‘OUT’ sides. Everything sent to one port will be replicated to all the other real and virtual RS232 ports of the bundle. Thanks to this feature, every device/application gets the ability to exchange data with multiple devices/applications simultaneously.
How to install the latest version of Virtual Serial Port Driver:
- Download Virtual Serial Port Driver setup file from the above download button
- Double click on the downloaded setup file
- A smart screen will appear asking for confirmation to install the software, Click 'Yes'
- Finally, follow the installation instructions provided by the setup file
How to uninstall - remove - Virtual Serial Port Driver from Windows 10?
- Open Windows Start Menu, then open Settings
- From Settings >> Open Apps section
- All installed apps appear, then navigate to the desired app and click Uninstall
- Confirm, and you are done
Virtual Serial Port Driver Technical Details
- Main Category:Internet Tools
- Operating System Support: Windows 10
- Usability: Free Trial
- CPU Architecture Support: 64 and 32 bit
- Version Update Number: Latest
- Last Checked: 2020-01-02
If you have a review, inquiry, or any request about Virtual Serial Port Driver, leave your comment here and a Filehonor team member will respond to you as soon as possible.