nyholku / purejavacomm

Pure Java implementation of JavaComm SerialPort
http://www.sparetimelabs.com/purejavacomm/index.html
BSD 3-Clause "New" or "Revised" License
362 stars 146 forks source link

PureJavaSerialPort initializing fails for STM32 Virtual USB COM Port Driver #104

Open sg26565 opened 6 years ago

sg26565 commented 6 years ago

PureJavaSerialPort cannot be used with the STM32 Virtual USB COM Port Driver on Windows because the driver does not support the SetCommState function in kernel32.dll and always returns error 87 (ERROR_INVALID_PARAMETER) regardless of the parameters passed to the function.

The open method of jtermios.windows.JTermiosImpl should provide an option to bypass the SetCommState call or to ignore any error generated by this function.