chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.97k stars 1.22k forks source link

boost::asio::serial_port open() - fails to set_options if desired values match current values #1550

Open skazassoglou-jav opened 3 weeks ago

skazassoglou-jav commented 3 weeks ago

on windows: (win11) set_options fails with ec 31 = 'A device attached to the system is not functioning' if the option matches the desired value. workaround: get_options and only set_option if != but after closing the port I found that some Device Control Block dcp fail to be set that are not exposed by boost.asio in my case: BaudRate, fDtrControl, and fRtsControl my current strategy is to use the winAPI and reset the dcp before port.close() Am I missing a trick here? Or is this common, normal serial COM port hell?