Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

INF for Ports class CDC USB device using usbser.sys fails DTM INFT

455 views
Skip to first unread message

Ken Spikowski

unread,
Apr 20, 2010, 9:03:01 PM4/20/10
to
If a USB-to-serial CDC ACM specification device using usbser.sys is not
classified as a modem, the New Hardware Wizard will not install the Virtual
COM Port unless the INF file AddService directive Flags parameter has a value
of 2 to set the SPSVCINST_ASSOCSERVICE bit. This causes both ChkInf and the
DTM "INFTest for a single .INF" to fail with error "(E.22.1302) Filter
drivers cannot be the controlling service (SPSVCINST_ASSOCSERVICE)." To
certifiy the driver for a device that otherwise passes WINQUAL testing but is
less complicated than a modem, is there any other way besides misclassifying
it as a modem or writing a custom driver?

Chris

unread,
Apr 21, 2010, 9:54:13 AM4/21/10
to
I'm not sure I understand. If you're a USB modem, you're a lower
filter to Modem.sys and so the flag should be "2" as you say. If
you're a "COM port", you're simply a function driver for the entire
stack, so the flag should be "0".

On Apr 20, 8:03 pm, Ken Spikowski

Ken Spikowski

unread,
Apr 21, 2010, 11:16:01 AM4/21/10
to
If the flag is 0, Windows XP i386 New Hardware Wizard fails to install the
device, and Setupapi.log records:
#-035 Processing service Add/Delete section [DriverInstall.Services].
#E275 Error while installing services. Error 0xe0000219: The installation
failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed
because a function driver was not specified for this device instance.
#E154 Class installer failed. Error 0xe0000219: The installation failed
because a function driver was not specified for this device instance.

Here is the INF file:

; For 32 or 64 bit Windows from XP to Windows 7. Setup File for DATAQ CDC
; Copyright (c) 2010 Dataq Instruments, Inc.

[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%DATAQ%
CatalogFile=dataq160.cat
DriverVer=04/15/2010,1.0.2

[SourceDisksNames]
1=%DriversDisk%,,,

[SourceDisksFiles]

[Manufacturer]
%DATAQ%=DeviceList,NTamd64

[DeviceList]
%DATAQ_CDC%=DriverInstall,USB\VID_0683&PID_0160

[DeviceList.NTamd64]
%DATAQ_CDC_64BIT%=DriverInstall,USB\VID_0683&PID_0160

[DriverInstall]
include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=LowerFilterAddReg,SerialPropPageAddReg

[DriverInstall.Services]
include = mdmcpq.inf
AddService = usbser, 0x00000000, LowerFilter_Service_Inst

; This adds the serial port property tab to the device properties dialog
[SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[Strings]
DATAQ = "Dataq Instruments, Inc."
DriversDisk="DATAQ DI-160 Drivers Disk"
DATAQ_CDC = "DATAQ CDC USB to UART"
DATAQ_CDC_64BIT = "DATAQ CDC USB to UART 64BIT"
Serial.SvcDesc = "USB Serial emulation driver"

"Chris" wrote:

> .
>

Chris

unread,
Apr 21, 2010, 11:51:04 AM4/21/10
to
On Apr 21, 10:16 am, Ken Spikowski
<KenSpikow...@discussions.microsoft.com> wrote:

> If the flag is 0, Windows XP i386 New Hardware Wizard fails to install the
> device, and Setupapi.log records:

Sorry, sorry, I got that backwards (it's been awhile). "2" is a
function driver and "0" is a filter driver. So "2" is what you want.

Which really leads to your real problem: you're trying to install
usbser as a lower filter on a Ports stack, and there is no function
driver. Note from your INF:

AddReg=LowerFilterAddReg,SerialPropPageAddReg

[DriverInstall.Services]
include = mdmcpq.inf
AddService = usbser, 0x00000000, LowerFilter_Service_Inst

You need to install it as the standalone driver. Try something like
this:

[DriverInstall.nt.Services]
include=mdmcpq.inf
AddService=usbser, 0x00000002, DriverService

[DriverService]
include=mdmcpq.inf
DisplayName=%Serial.SvcDesc%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys

Ken Spikowski

unread,
Apr 21, 2010, 4:43:02 PM4/21/10
to
After making your suggested changes, Chkinf still failed with two errors. The
value of 2 for the flags parameter still resulted in error "(E.22.1302)
Filter
drivers cannot be the controlling service (SPSVCINST_ASSOCSERVICE).", so I
changed it back to 0. I also found it necessary to remove the ".nt" from the
[DriverInstall.Services] section heading. However, with those changes the
device will not install.

"Chris" wrote:

> .
>

Chris

unread,
Apr 21, 2010, 5:52:33 PM4/21/10
to
Note that I said "try something like this", not "this exact text will
cure your problem". There are plenty of usbser COM port INF's
floating around the net, so I suggest you copy one of those. For
example there is one in here:

http://www.st.com/stonline/books/pdf/docs/12571.pdf

Or here:

http://www.lvr.com/files/usbcomport.txt

On Apr 21, 3:43 pm, Ken Spikowski

Ken Spikowski

unread,
Apr 21, 2010, 7:05:01 PM4/21/10
to
Thank you for the suggestions. We came up with the following, which uses a
value of 2 for flags, passes ChkInf, and installs on both i386 and amd64
systems:

; For 32 or 64 bit Windows from XP to Windows 7. Setup File for DATAQ CDC
; Copyright (c) 2010 Dataq Instruments, Inc.

[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}

Provider=%PRVDR%
CatalogFile=dataq160.cat
DriverVer=04/21/2010,1.0.3

[SourceDisksNames]
1=%DriversDisk%,,,

[SourceDisksFiles]

[Manufacturer]
%MFGNAME%=VirComDevice,NT,NTamd64

[DestinationDirs]
DefaultDestDir = 12

[VirComDevice.NT]
%DESCRIPTION%=DriverInstall,USB\VID_0683&PID_0160

[VirComDevice.NTamd64]
%DESCRIPTION%=DriverInstall,USB\VID_0683&PID_0160

[DriverInstall.NT]
Include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=DriverInstall.NT.AddReg

[DriverInstall.NT.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[DriverInstall.NT.Services]
AddService=usbser, 0x00000002, DriverServiceInst

[DriverServiceInst]
DisplayName=%SERVICE%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary= %12%\usbser.sys
LoadOrderGroup = Base

[Strings]
PRVDR = "DATAQ"
MFGNAME = "DATAQ Instruments, Inc."
DESCRIPTION = "DATAQ USB CDC"
SERVICE = "DATAQ USB CDC driver"
DriversDisk = "DATAQ DI-160 Drivers Disk"

"Chris" wrote:

> .
>

Chris

unread,
Apr 22, 2010, 10:11:41 AM4/22/10
to
On Apr 21, 6:05 pm, Ken Spikowski
<KenSpikow...@discussions.microsoft.com> wrote:

> Thank you for the suggestions. We came up with the following, which uses a
> value of 2 for flags, passes ChkInf, and installs on both i386 and amd64
> systems:

Outstanding, glad to be of service sir.

0 new messages