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

Linux custom baudrate not work Linux下设置自定义波特率不起作用 #76

Closed itas109 closed 1 year ago

itas109 commented 1 year ago

Describe the bug Linux custom baudrate not work Linux下设置自定义波特率不起作用

To Reproduce

CSerialPort sp;
sp.init("/dev/ttyS0", 100);
sp.open();
bool isOpen = sp.isOpen();

isOpen is true, but receive data is messy code isOpen返回成功,但接收是乱码

Expected behavior isOpen is true, receive normal isOpen返回成功,且接收正常

Desktop (please complete the following information):