I'm using an embedded device (bare metal program running on it) which is connected via USB and appears as serial interface on an connected host PC. This works perfectly with all tested Linux variants and all Windows up to Win 7. Unfortunately with Windows 10 there are larger problems: COM port can't be opened easily (means several retries are necessary) and sometimes an existing connection stops working.
The funny thing is: opening of the COM port includes calls to SetCommState() and GetCommState() where SetCommState() fails - also when it is used with exactly the same parameters like they are returned from GetCommState(). Repeating this procedure several times then is successful, latest after 10 retries SetCommState() works.
On host PC an INF file is used which does nothing more than declaring own VID/PID (which fits to the embedded device) but then points to Windows-internal driver usbser.sys:
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MFGNAME%
LayoutFile=layout.inf
DriverVer=08/17/2001,5.1.2600.0
[Manufacturer]
%MFGNAME%=DeviceList, NTx86, NTamd64
[DestinationDirs]
DefaultDestDir=12
[SourceDisksFiles]
[SourceDisksNames]
;------------------------------------------------------------------------------
; Windows 32-bit 2000/XP/Vista/Win7 Sections
;------------------------------------------------------------------------------
[DeviceList.NTx86]
%DESCRIPTION%=DriverInstall, USB\VID_1CBE&PID_0002
[DriverInstall]
CopyFiles=DriverCopyFiles
AddReg=DriverInstall.AddReg
[DriverCopyFiles]
usbser.sys,,,0x20
[DriverInstall.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[DriverInstall.Services]
AddService=usbser, 0x00000002, DriverService
[DriverService]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
;------------------------------------------------------------------------------
; Windows 64-bit Vista/Win7 Sections
;------------------------------------------------------------------------------
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall.NTamd64, USB\VID_1CBE&PID_0002
[DriverInstall.NTamd64]
CopyFiles=DriverCopyFiles.NTamd64
AddReg=DriverInstall.NTamd64.AddReg
[DriverCopyFiles.NTamd64]
usbser.sys,,,0x20
[DriverInstall.NTamd64.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[DriverInstall.NTamd64.Services]
AddService=usbser, 0x00000002, DriverService.NTamd64
[DriverService.NTamd64]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
[Strings]
MFGNAME = "Texas Instruments Incorporated"
DESCRIPTION = "StarterWare USB serial port"
SERVICE = "StarterWare USB CDC serial port"
So: are there any important changes in Windows 10 related to serial drivers/serial interface/INF driver definition files? Or is this a bug in MS' USB serial driver?