Opened 6 years ago
Last modified 5 years ago
#12295 new Bugs
Boost Asio Serial Port does not work with Exar (Baudrate zero)
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | serial port exar windows baudrate zero | Cc: |
Description
Calling boost::asio::serial_port.open("COM4") returns a error under windows. We use a Exar XR22804 using the latest official drivers for Windows. The problem is located in boost::asio::win_iocp_serial_port_service where the windows driver returns dcb.Baudrate=0. After that it tries to set new settings with SetCommState and it fails if dcb.Baudrate is 0. A solution would be to preset the baudrate if 0 or even better to read a user parameter with the wanted baudrate as it is done in some other frameworks.
Someone else has sent the same bug to the people of the qt-framework, and they solved it: https://bugreports.qt.io/browse/QTBUG-46993
have the same problemm with XR21B1411.