[python-win32] High Baud Rate Serial Port Question

Roger Upole rwupole at msn.com
Tue Sep 11 01:14:01 CEST 2007


Jeff Taylor wrote:
> I know this has probably been brought up many years ago, but I'm rather 
> new to Python.
> 
> Is there a way to open a serial port with a baudrate greater than 
> 115.2kbps? I'm currently using pyserial and it can handle over 115.2, 
> but when it calls win32file, win32file gives back a bad parameter error 
> for higher baudrates (like 230400 or 460800 bps).
> 
> Any help would be appreciated.
> 
> Thanks.

Which function in win32file is throwing the exception ?

It may be that the device only accepts specific baud rates.

>From a quick look at pyserial, it has the buffer sizes hardcoded
to 4096 in the call to win32file.SetupComm.  Another possibility
is that larger buffer sizes are needed for higher baud rates.

        Roger




More information about the python-win32 mailing list