I’m having a little trouble installing an upper filter driver on COM2 and am looking for a little advice. What steps do I need to go through for setup and install? So far I have written the filter driver in KMDF, created the .inf, created a .cat file and test signed the driver. I tried installing with devcon (devcon update fltrcom.inf ACPI\PNP0501\2 and devcon update fltrcom.inf ACPI\PNP0501). I also tried updating the driver from the device manager but still no luck.
Here is an exceprt from my setupapi.dev.log:
>> [Device Install (UpdateDriverForPlugAndPlayDevices) - ACPI\PNP0501\2]
>> Section start 2011/05/08 02:47:34.873
cmd: devcon.exe update fltrcom.inf ACPI\PNP0501\2
<<< Section end 2011/05/08 02:47:35.013
<<< [Exit status: SUCCESS]
>> [Device Install (UpdateDriverForPlugAndPlayDevices) - ACPI\PNP0501]
>> Section start 2011/05/08 02:47:39.930
cmd: devcon.exe update fltrcom.inf ACPI\PNP0501
dvi: Set selected driver complete.
dvi: {Build Driver List} 02:47:40.130
dvi: Searching for hardware ID(s):
dvi: acpi\pnp0501
dvi: *pnp0501
cpy: Policy is set to make all digital signatures equal.
dvi: Processing a single INF: ‘c:\drivershare\com\signed\fltrcom.inf’
inf: Opened INF: ‘c:\drivershare\com\signed\fltrcom.inf’ ([strings])
dvi: {Build Driver List - exit(0x00000000)} 02:47:40.230
dvi: {DIF_SELECTBESTCOMPATDRV} 02:47:40.240
dvi: Using exported function ‘PortsClassInstaller’ in module ‘C:\Windows\system32\MsPorts.Dll’.
dvi: Class installer == MsPorts.Dll,PortsClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 02:47:40.311
dvi: Class installer: Exit
dvi: Default installer: Enter 02:47:40.331
dvi: {Select Best Driver}
! dvi: Selecting driver failed(0xe0000228)
dvi: {Select Best Driver - exit(0xe0000228)}
! dvi: Default installer: failed!
! dvi: Error 0xe0000228: There are no compatible drivers for this device.
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 02:47:40.381
dvi: {DIF_DESTROYPRIVATEDATA} 02:47:40.391
dvi: Class installer: Enter 02:47:40.401
dvi: Class installer: Exit
dvi: Default installer: Enter 02:47:40.421
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 02:47:40.441
<<< Section end 2011/05/08 02:47:40.461
<<< [Exit status: SUCCESS]
My install directory contains the driver .sys file, the .inf, the .cat, and the Wdf coinstaller dll. I’ve also tried installing the filter on a software only test driver I worked on and it worked fine.
Here is my .inf:
[Version]
Signature = “$Windows NT$”
Class = Ports
ClassGUID = {4d36e978-e325-11ce-bfc1-08002be10318}
Provider = “SomeCompany”
CatalogFile = fltrcomcat.cat ; WHQL checksum file
DriverVer = 04/29/2011,1.0.0.0 ; Driver date and version
[DestinationDirs]
DefaultDestDir = 12 ; DIRID_DRIVERS
; ================= Class section =====================
[SourceDisksNames]
1 = %DiskId1%,“”
[SourceDisksFiles]
fltrcom.sys = 1
;*****************************************
; Filter Install Section
;*****************************************
[Manufacturer]
%StdMfg%=Standard,NTx86
[Standard]
;
; Hw Id is ACPI\PNP0501\2 for COM2
;
%ComFilter.DeviceDesc%=COM_Filter_Device, ACPI\PNP0501\2
[Standard.NTx86]
%ComFilter.DeviceDesc%=COM_Filter_Device, ACPI\PNP0501\2
[COM_Filter_Device.NT]
CopyFiles=Drivers_Dir
AddReg=COM_Filter_Device.NT.AddReg
[COM_Filter_Device.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
[COM_Filter_Device.NT.HW]
AddReg=COM_Filter_Device.NT.HW.AddReg
[COM_Filter_Device.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010008,“fltrcom”
[Drivers_Dir]
fltrcom.sys
;-------------- Service installation
[COM_Filter_Device.NT.Services]
AddService = fltrcom, , fltrcom_Service_Inst
; -------------- Filter driver install sections
[fltrcom_Service_Inst]
DisplayName = %ComFilter.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START (3) SERVICE_SYSTEM_START (1)
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\fltrcom.sys
[DestinationDirs]
ECHO_Device_CoInstaller_CopyFiles = 11
[COM_Filter_Device.NT.CoInstallers]
AddReg=ECHO_Device_CoInstaller_AddReg
CopyFiles=ECHO_Device_CoInstaller_CopyFiles
[ECHO_Device_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[ECHO_Device_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames
[COM_Filter_Device.NT.Wdf]
KmdfService = fltrcom, fltrcom_wdfsect
[fltrcom_wdfsect]
KmdfLibraryVersion = 1.9
[Strings]
DiskId1 = “COM Port 2 Filter Driver”
StdMfg = “(Standard system devices)”
ComFilter.DeviceDesc = “Upper Filter Driver for COM Port 2”
ComFilter.SvcDesc = “Upper Filter Driver for COM Port 2”
Thanks,
Saad