Implementation of Windows system add virtual serial port and Cantoolapp function 1

Source: Internet
Author: User

Our group began to try to add a virtual serial port with com0com, but encountered a problem, the system can see the added virtual serial port, but in C # cannot get the serial port. After many attempts, we decided to switch to virtual Serial port driver to add a dummy serial port.

(Tool Link: https://pan.baidu.com/s/1hs1mDE0 Password: fsq1)

  How to use :

Click Add pair to add COM port pairs

  

After adding:

Then in Computer Management-Device Manager, you can see the newly added virtual COM ports:

  C # Get serial code :

Private string[] Ports=system.io.ports.serialport.getportnames ();

This group uses the SerialPort control in Windows apps, enabling the function 1 to scan the system COM port, allowing the user to select COM port and baud rate

(See http://www.cnblogs.com/shenbing/p/6323152.htm L and http://blog.csdn.net/ZHINENGABC123456/for detailed use of SerialPort controls.) article/details/70145341 Two blog post

The specific results are as follows:

After this user operation, save the user's last selected COM port and bit rate through the INI file.

INI file contents:

[PORT] name=com1[baudrate]name=9600

Implementation of Windows system add virtual serial port and Cantoolapp function 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.