Closed maiducgiang closed 1 year ago
Do you insert '\0'
at the end of char buffer? And Strings may be truncated due to read timeout.
Can you give me some ESP CODE about serial port?
PS: Some people have also encountered this problem, but I have not been able to reproduce it on Windows 11.
The bug is due to PurgeComm
should be executed before read. But purge operation may be processed after read. So messae is lost.
Please try 1.1.0
. The bug should be fixed. If there is still bug, please reopen this issue.
In my Flutter project windows, I connect COM with setting: port = SerialPort(namePort, openNow: true, BaudRate: baudRate, Parity: parity, StopBits: stopBits, ByteSize: byteSize, ReadIntervalTimeout: readIntervalTimeout, ReadTotalTimeoutConstant: readTotalTimeoutConstant, ReadTotalTimeoutMultiplier: readTotalTimeoutMulti); port?.readBytesSize = 50; when i make the COM data return listener the data is sometimes lost a few bytes
Can anyone give me a solution?