Home > Software engineering > Serial debugging assistant problem (CSerialPort and Windows API to write a serial port application c
Serial debugging assistant problem (CSerialPort and Windows API to write a serial port application c
Time:11-02
The younger brother using CSerialPort class wrote a serial test program, as shown in the figure below
I use virtual serial port, set up two virtual serial port COM3, and COM4, then use the ready-made online serial assistants to test, test the effect is very good, but...
However, my goal is to eventually and lower machine STM32 testing, failed!!!!!! I write a serial port assistant, received no problem, but click send, the program will kneel (if using virtual serial port communication, didn't have this kind of phenomenon) [=hardware no problem, because I used online mature serial assistant test no problem=]
Finally, I downloaded some people use the Internet Windows API to write serial program, the result is the same, (CSerialPort class also calls the Windows API, receive special good, send on his knees, and in view of the machine), with a virtual serial port test no problem, but with single-chip microcomputer testing, will encounter all sorts of problems , don't know what to write a serial port application should pay attention to the problem, request a great god give some guidance, thanks,
CodePudding user response:
It is recommended to use portmon auxiliary software debugging serial communication program,