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

Discussion in 'Windows Vista Drivers' started by Ken Spikowski, Apr 21, 2010.

  1. 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?
     
    Ken Spikowski, Apr 21, 2010
    #1
    1. Advertisements

  2. 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"
     
    Ken Spikowski, Apr 21, 2010
    #2
    1. Advertisements

  3. 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.

     
    Ken Spikowski, Apr 21, 2010
    #3
  4. 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"

     
    Ken Spikowski, Apr 22, 2010
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.