
This explains why using some other program (like TeraTerm) to set the desired baudrate then enables Win32::SerialPort to set the same baudrate.

Ironically, if the Serial port is found to be already configured for a baudrate other than what specified in $CP_MaxBaud, then Win32API::CommPort authorizes this additional baudrate in line 1009: Which has the following bit set: SP_BAUD 0x0002įurthermore we have $CP_SettableBaud= 67b70, which indicates that a number of different baudrates are supported. Nowhere does it state that this should be the only baud rate supported by the device.īesides, the same USB serial port reports ($CP_SettableParams= 7f) which from the same Microsoft link is:ĭwSettableParams : A bitmask indicating the communications parameters that can be changed In which case Win32API::CommPort operates correctly.īut this does not mean that the Serial port in question is behaving incorrectly by setting a MaxBaud of 115200.Īccording to Microsoft documentation (v=vs.85).aspxĭwMaxBaud : The maximum allowable baud rate, in bits per second (bps). Most other Serial ports I have worked with report a $CP_MaxBaud set to BAUD_USER (0x10000000) = Programmable baud rate Win32API::CommPort version 0.21 incorrectly interprets this as the Serial Port being unable to support any other baud rate than 115200, and thus refuses to set a different baudrate when the is_baudrate() method is called. The problem stems from the value it reports for $CP_MaxBaud, which indicates that the maximum baud rate it supports is BAUD_115200 (0x00020000) = 115200 bps USB Serial port Targus PA088, even with latest MCT driver 13.2.98, reports the following capabilities (on MSWin32): I believe this is exactly the same issue reported in bug id 25539, raised 10 years ago. Yet if he sets the desired baudrate with TeraTerm, the Perl based application is then able to use his USB serial port at the desired baudrate. His USB Serial port however works fine in other applications like TeraTerm. I have had reports from a user of one of my Perl applications that he was unable to use his USB Serial port because the application was failing to set the desired baudrate.

I'm the author of module Control::CLI which uses Win32::SerialPort for serial port connections.
