jcurl / RJCP.DLL.SerialPortStream

SerialPortStream is an independent implementation of System.IO.Ports.SerialPort and SerialStream for better reliability and maintainability. Default branch is 2.x and now has support for Mono with help of a C library.
Microsoft Public License
639 stars 199 forks source link

Write large data(~128kB) will cause out buffer wrap around #9

Closed Kurapikov closed 8 years ago

Kurapikov commented 8 years ago

Hi Jason,

I tested the 2.0.0 release, and found a weird bug.

I need to write about 1MB data through UART. Each time I write 256 bytes (as a page) and wait for slave ack. When about 128kB data is writed, slave received the first page I've wrote.

I tried to flush and discard out buffer after every 256 bytes write, and this problem is resolved.

I have no time to read through the code to analysis what happened.

I can do more test if you need.

Regards.

jcurl commented 8 years ago

Can you please provide a small test program that recreates the issue? I'm particularly interested in the drivers and chipset of the serial port, how you initialise the serial port. Then please enable debugging to a file and send me the logs (see http://serialportstream.codeplex.com/wikipage?title=TraceSwitch%20Settings&referringTitle=Documentation). This page might also help (http://serialportstream.codeplex.com/wikipage?title=Providing%20Debug%20Information&referringTitle=Documentation)

Are you using Windows or Linux?

jcurl commented 8 years ago

As I've not heard any response, and I've not seen this issue in the unit test cases that do similar work, I'm closing.