Home > Back-end >  A serial port communication receiver than sender a byte
A serial port communication receiver than sender a byte

Time:09-18

A serial port communication receiver than sender a byte

CodePudding user response:

The extra byte is what ah, be like terminator?

Suggest you use serial communication pcomm. DLL;

It is best not to their own bit by bit API to write code, direct call pcomsm function, is relatively stable,

CodePudding user response:

See slowly with the serial debugging assistants, try, hair, and see what is the problem

CodePudding user response:

Received more bytes caused by ASCII newline, send a newline is \ n but becomes \ r \ n, received more than one byte, and a serial port receive strange unknown source data, it is related to the underlying driver

CodePudding user response:

I use MSCOMM32. Ocx doing small projects, though not perfect, way of asynchronous events can communication,
Second, because help others do the communication with very small DLL, can only use the API serial port communication, sending and receiving, is also very simple, but not an asynchronous event way,
Third party communication library, used, often did not say, can only be blind groping,
  • Related