Problem solving-error data received by testing the serial port software on the Virtual Machine

Source: Internet
Author: User

Last Saturday, I wanted to test a factory detection tool. Because I am a Windows 7 64-bit system, I used a 32-bit XP and Windows 7 image as two virtual machines.

(There are no serial ports on the motherboard of many new computers, so USB to serial ports are installed .)

(Set the length of data, which is 120 characters .)

-------------- Original reprinted in this article, please maintain integrity and explicitly indicate the source ---------------

Http://blog.csdn.net/wlsgzl/article/details/40517517

There was no problem in the development environment before, so I started the test with confidence. But it fails. The system prompts you to receive the error data.

At first, I thought it was a Windows 7 64-bit system that had poor compatibility with the execution file generated by vs2010. I planned to copy and paste the code and compile it with vc6 in XP. It's time to get off work.

On Sunday, I thought about the problem while playing games.

On Monday, install vs2010 on the slave XP Virtual Machine, compile and debug the original project, succeed, and fail to run.

Therefore, I have enabled level4 and all debugging exceptions, compiled links, and run it without any obvious problems (the warnings of MFC and other Microsoft components can only be blocked ).

After dozens of attempts on the XP testing virtual machine, I succeeded once, which proves that my code is correct, so I started to debug the data sending and receiving buffer step by step on the XP Virtual Machine Installed with vs2010.

Finally, we found that the received data was not correctly divided. Considering that I use a fixed-length data format, I began to doubt the problem of delayed response.

As a result, an XP system was created on an idle computer for testing and data sending and receiving was normal.

==================== Do you envy the split line of the double-Inbound pair? ====================

Summary: http://blog.csdn.net/wlsgzl/article/details/40517517

You can simulate software and hardware on a virtual machine, but cannot implement real Latency Response.

(That accidental success is a strange thing that cannot be said !)

Problem solving-error data received by testing the serial port software on the Virtual Machine

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.