Calculation of send timeout is incorrect.
Here is the calculation code:
Which in my case (115200 and 8 bytes of data) gives 0.7 ms. And after conversion to int, it becomes zero.
So m_sendTimer is fired up immediately, which brings us to to this code:
So there comes a premature timeout.
I experimented with a timeout and found that even a value of 15-20ms does not give stable results. only the value of around 50ms gives a stable result in my case.
I suppose that timeout calculation must include some additional minimum time constant.
It is only related to windows. In linux everything works perfectly.