Why CDC Serial Device installation fails on Windows Vista and 7 ?
Because of Microchip's INF file bug, you may succeed or fail on installation of CDC device driver to Vista and 7 boxes.
Version of the stack and INF files with this problem Microchip Application Libraries v2010-02-09 (v2.6a)
http://ww1.microchip.com/downloads/en/devicedoc/MCHP_App_%20Lib%20v2010_02_09_Installer.zip C:\Microchip Solutions\USB Device - CDC - Basic Demo\inf\mchpcdc.inf
C:\Microchip Solutions\USB Device - CDC - Serial Emulator\inf\win2k_winxp\mchpcdc.inf
C:\Microchip Solutions\USB Device - Composite - MSD + CDC\inf - Composite Device\mchp-MSD+CDC.inf
C:\Microchip Solutions\USB Tools\USB CDC Serial Demo\inf\mchpcdc.inf
Temporary workaround for Windows Vista and 7 Manually copy usbser.sys from an archive on your PC to drivers folder, if you fail to install.
These archive files open when you click it on an explorer window. (*1)
To see these folders in C:\Windows folder, you may set "folder options"
Windows Vista (x86 32bit)
- Source of usbser.sys: C:\Windows\System 32\DriverStore\FileRepository\mdmcpq.inf_e99692b4 (archive file)
- Destination to copy: C:\Windows\System 32\drivers
Windows Vista (x64 64bit)
- Source of usbser.sys: C:\Windows\System 32\DriverStore\FileRepository\mdmcpq.inf_ec18f765 (archive file)
- Destination to copy: C:\Windows\System 32\drivers
Windows 7 (x86 32bit)
- Source of usbser.sys: C:\Windows\System 32\DriverStore\FileRepository\mdmcpq.inf_x86_neutral_1b9e317b2982c778 (archive file)
- Destination to copy: C:\Windows\System 32\drivers
Windows 7 (x64 64bit)
- Source of usbser.sys: C:\Windows\System 32\DriverStore\FileRepository\mdmcpq.inf_amd64_neutral_9bb71004e7b8f7ae (archive file)
- Destination to copy: C:\Windows\System 32\drivers
Bug fix of microchip INF files mchpcdc.inf (and its derivatives)
[DestinationDirs]
FakeModemCopyFileSection=12 ; <------ add this line
DefaultDestDir=12
[DriverInstall.nt]
include=mdmcpq.inf
;; CopyFiles = DriverCopyFiles.nt ; <------ wrong one: reference to this INF file
CopyFiles = FakeModemCopyFileSection ; <------ right one: reference to a section in mdmcpq.inf
AddReg=DriverInstall.nt.AddReg
;; [DriverCopyFiles.nt] ; <------ delete these lines
;; usbser.sys,,,0x20 ; <------
Background of the bug a) Source location of usbser.sys
There is no difference on the CDC (usbser.sys) INF file among Win XP, Vista and 7
The major difference lies in the pre-installation of usbser.sys to the driver folder on each PC.
Most of Win XP pre-install still have usbser.sys in the driver folder,
For Vista and 7, usbser.sys is not installed there, but it is held in the installation archive.
When INF [SourceDisk] section points to this archive correctly, usbser.sys is copied from the archive.
MS has warned to us not to refer usbser.sys source location directly on our custom INF file.
Instead, they suggest to "include" mdmcpq.inf
AND refer to "
FakeModemCopyFileSection" (awful naming sense) section, because mdmcpq.inf of each pre-installation knows the right place on which the original usbser.sys exists (*2).
Just writing "include = mdmcpq.inf" does nothing. Refer to the section, "FakeModemCopyFileSection", correctly.
Current version of Microchip INF file works just when usbser.sys has been already copied to the driver folder manually, or by another right INF file.
b) Driver signing on 64bit Windows
Above bug fix to INF file breaks driver signing of the installation package.
Broken sign prevents us from installation and use on 64bit Windows, unless we apply test-mode power up.
To complete the fix, we have to wait for Microchip until they get driver signing again.
(*1) there is no space on the folder name, "System 32". but without the space, this forum engine rejects my post
(*2) "How to use or to reference the Usbser.sys driver from universal serial bus (USB) modem .inf files"
http://support.microsoft.com/kb/837637 Tsuneo
post edited by chinzei - 2010/03/26 06:10:08