When working with serial communication, there are many instances where the ability to create a virtual serial port can greatly facilitate our work. Without this capability, it would be necessary to connect and swap hardware devices to perform serial debugging. The standard method of debugging a device is to create a virtual serial port on a computer. We can then use virtual serial communication to debug Android device without directly connecting it to the computer.
The Virtual Serial Port Driver provides emulation of virtual serial ports and enables the creation of pairs of available serial ports over a virtual null-modem cable. This allows two applications to exchange data through the connection created by this software tool. The virtual serial ports are displayed in Device Manager and emulate the settings and functionality of a physical interface. Users no longer need to struggle with a lack of serial ports or excessive cabling. The application is fully compatible with ActiveX, DDL, and core-level utilities among other technologies
Virtual Com Port Emulator
Virtual COM Port Driver by Eltima takes the leading position in the market of software apps for serial data emulation.
VirtualBox is a powerful x86 and AMD64/intel64 virtualization product for businesses and home users. VirtualBox is not only an extremely feature-rich, high-performance product for enterprise customers but also the only professional solution available as open-source software under the terms of the GNU General Public License (GPL) version 2.
Currently, VirtualBox runs on Windows, Linux, Mac, and Solaris hosts and supports a large number of other operating systems, including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8, Windows 10). DOS/Windows 3.x, Linux (2.4, 2.6, 3.x, and 4.x), Solaris and OpenSolaris, OS/2, and OpenBSD.
With Oracle VM VirtualBox we can virtualize a Linux system and create a virtual Android serial port in the Android emulator (because the Android OS is based on Linux).
Serial debugging assistant
There are a lot of serial debugging assistants, which can be found in a quick search on Google. Here are some common tools:
Friendly serial debugging assistant (v2.6.5)
Easy to use;
Automatic identification of serial ports;
Support multi-serial port debugging;
COM numbers higher than COM 9 can be used;
Support sending of historical records;
Supports various baud rates up to 10 Mbps baud rate to for compatibility with hardware devices.
Potential data loss;
Lack of a smooth display;
Not suitable for stability testing.
Serial debugging assistant (V2.2)
Easy to use;
Has the most user groups;
Free source code.
Due to the multi-threaded receiving technology, the number of received calls is sometimes lost, especially when the high baud rate or the USB to serial port function is used.
It only supports a maximum of 115.2K baud rate.
You can only select COM1~COM2. When using USB to serial port emulator, you must remap the serial port.
Supports automatic identification of connected serial devices;
Easy to use;
Simple interface that provides a good user experience.
Plugging and unplugging the serial port program will crash your machine, resulting in a blue screen;
The high baud rates are only 115.2K, 128K, 256K, and there is no 230.4K;
As a console, echo is not supported;
Save display data is not supported under Win10.
High baud rate of up to 921.6K with no loss of reception.
Only COM1 through COM4 is available;
When using USB to a serial port, you need to remap the serial port.
Many configuration parameters;
No reception loss.
When the baud rate is high (such as 230.4K), large amounts of received data can cause disruption in the data sending process.
First, create two virtual ports COM2 and COM3 through Virtual Serial Port Driver. Of course, you can also create COM4 and COM5. This has no effect, as shown below:
After the creation is successful, click the Settings button, then find the serial port item and set the port 1.
The port number COM1 corresponds to the Android virtual machine, /dev/ttyS0and the COM2 port of the address (p) corresponds to our virtual COM2 port. Of course, you can also set it to COM3 because we created two virtual ports in front.
Next, we start the Android emulator, I am using Genymotion, here we should note that the emulator we created is lower than the Android 4.4 version, otherwise the emulator does not support the virtual serial port.
After starting the emulator, open the serial debugging assistant, let the serial debugging assistant connect to another port (COM2 for the emulator, so connect COM3 here), click to open the serial port after setting.
At this time, you will find that the status of the two virtual serial ports in the Virtual Serial Port Driver is active, as shown below:
Finally, we open the serial port in the apk /dev/ttyS0send analog data, you can see the received data, pay attention to both sides here you need to set the same baud rate in serial debugging assistant.
Requirements: Windows (32-bit and 64-bit): XP(only Standard)/2003(only Standard)/2008/ Vista/7/8/10, Windows Server 2012, Windows Server 2016 , 5.5MB size Version 9.0.575 (24 May, 2019) Release notes Category: Serial Port Software