PORTS Forum
Ports and Interfaces => USB => Topic started by: Barry Twycross on May 30, 2013, 08:40:21 pm
-
We're having a problem at the factory. Our device has a unique serial number, so every new one which gets plugged in goes through the new device found dialog. We'd like to suppress the dialog and just install the driver once for every instance of the device. We thought we'd found a solution with the IgnoreHWSerNum registry key documented here: http://msdn.microsoft.com/en-us/library/windows/hardware/jj649944(v=vs.85).aspx but that doesn't seem to be working.
This being a Windows problem is somewhat beyond me. The device is enumerating as a CDC-ACM class device (class:2, subclass:2, protocol:1).
-
I got a little more information. I thought there had been discussion of this problem before, and I think I'm remembering the solution involved signing the driver. As this is using MS's own CDC driver, I was thinking the driver would be signed, so that wouldn't be the problem. Now I'm being told:
The procedure is to connect a device and go through the manual install steps where we provide the .inf I attached and select that it's a serial COM port. It definitely complains about being unsigned.
The .inf file referenced is:
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%ProviderName%
DriverVer=04/26/2012,1.1.0.0
[MANUFACTURER]
%ProviderName%=DeviceList, NTx86, NTamd64
[DeviceList.NTx86]
%NameCDC%=DriverInstall,USB\VID_2464&PID_0004&MI_01&Class_02&SubClass_02
[DeviceList.NTamd64]
%NameCDC%=DriverInstall,USB\VID_2464&PID_0004&MI_01&Class_02&SubClass_02
[DriverInstall]
include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=LowerFilterAddReg,SerialPropPageAddReg
[DriverInstall.Services]
include = mdmcpq.inf
AddService = usbser, 0x00000002, LowerFilter_Service_Inst
; This adds the serial port property tab to the device properties dialog
[SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Strings]
ProviderName = "Company"
NameCDC = "Name Serial Port"
-
For the driver to be considered signed, the INF has to be signed as well.
The issue came up here:
http://www.lvr.com/forum/index.php?topic=1059.0
Another discussion relating to FTDI but might have useful info:
http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm
-
That page from FTDI is where the engineer started thinking about the IgnoreHWSerNum key. It seems that no one has confirmed it still works on Windows 7 (which I forget to mention was the OS involved).
It seems that another key GlobalDisableSerNumGen has been used in the past, but MSDN no longer mentions that, so we don't think its supported still.
-
The linked thread looks promising:
The entry name should have VID/PID of the device. For example of devices (VID/PID = 0xABCD / 0x1234)
IgnoreHWSerNumABCD1234
We'll give that a try.
-
Hi Barry and Jan,
a) IgnoreHWSerNum
The old method, referred by above Jan's post, still works on Windows 7 (x86/x64) and Windows 8 (x86/x64), too.
Your device looks like a composite device.
Composite device requires two entries, one for the composite parent, another for the interface.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\
- IgnoreHWSerNum24640004
- IgnoreHWSerNum2464000401
Both of entries are REG_BINARY, and their value are 0x01 (1 byte).
b) Driver signing
Vista (x64), Win7 (x64) and Win8 (x86/x64) require signed package for driver installation.
As of CDC of usbser.sys, the installation package means just the INF file.
Tsuneo
-
Thanks everyone, adding the VID/PID to the registry entry name solved the problem.