itas109 / CSerialPort

CSerialPort - lightweight cross-platform serial port library for C++/C/C#/Java/Python/Node.js/Electron
https://blog.csdn.net/itas109/article/details/84282860
Other
730 stars 339 forks source link

read buffer size max 4096 on windows 在windows上读取缓冲区最大为4096 #54

Closed itas109 closed 2 years ago

itas109 commented 3 years ago

Describe the bug read buffer size max 4096 on windows 在windows上读取缓冲区最大为4096

To Reproduce write more than 4096, CSerailPort only receive 4096 on windows 在windows上向串口写超过4096的数据,CSerailPort 只能收到4096的数据

Desktop (please complete the following information):

itas109 commented 3 years ago

CSerialPort\src\SerialPortWinBase.cpp

bool CSerialPortWinBase::openPort()

After CreateFile add SetupComm could set max read buffer size, such as 8192

SetupComm(m_handle,8192,8192);
itas109 commented 2 years ago

v4.2.0版本增加缓冲区大小设置