0

I'm using pyserial 3.4 with Python 2.17.13 under Windows 10. When open COM5 port, I obtained the error below. Same source, same pyserial, same python versions, they run correctly under Windows 7 and 8.1

Traceback (most recent call last): File "NAPOSend1.0.py", line 116, in sendfile

from serial import Serial
ser = Serial('COM5', 115200, timeout=10, writeTimeout=0)

File "build\bdist.win-amd64\egg\serial\serialwin32.py", line 31, in init File "build\bdist.win-amd64\egg\serial\serialutil.py", line 240, in init File "build\bdist.win-amd64\egg\serial\serialwin32.py", line 78, in open File "build\bdist.win-amd64\egg\serial\serialwin32.py", line 222, in _reconfig ure_port serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: Windows Error(87, 'Incorrect Parameter.')

skr
  • 1,610
  • 15
  • 19

1 Answers1

0

I have the exact same issue trying to connect to an STM32 microcontroller. The STMicroelectronics VCP driver works fine on Win7 (and presumably Win8) but the port does not configure on Win 10 (either using the built in driver from Microsoft or the STMicroelectronics driver)

What's interesting is that a C++ program written using an older driver (used at my work place) works OK. i.e. it talks to the driver and usb device fine.

So my conclusion is that there is something that has changed in Windows 10 and that PySerial needs to adapt to it some how (or it's a bug that's not surfaced until now)

BrendanSimon
  • 445
  • 7
  • 16