Quantcast
Channel: MS-official "WinUSB class" driver for XP, Vista and 7
Viewing all 25 articles
Browse latest View live

MS-official "WinUSB class" driver for XP, Vista and 7 (chinzei)

$
0
0
http://www.microchip.com/forums/FindPost/789872
ajs410:

What's really nice with Windows 8 is that you can supply a Microsoft descriptor that allows the system to automatically bind your vendor-defined interface to WinUSB without any INF file at all.  It will be plug-and-play exactly like HID - but only on Windows 8 or higher.

The MS-official "WinUSB class" driver extends this method back to XP, Vista and 7 (x86/x64).

As I noticed that this information is not popular even for USB experts like ajs410 yet, I post a brief summary, here.

A. Distribution
The driver file is distributed as "Windows Phone driver"
The detailed download instruction of this driver is described in this KB,

"Windows Phone 8 is not detected by your computer"
http://support.microsoft.com/kb/2749484/en-us
- Things to Try
- - 3. Update your Windows Phone 8 driver
- - - To manually download and install the Windows Phone driver:
- - - - a. Go to http://catalog.update.microsoft.com
- - - - b. Search for "windows phone winusb"

The direct link is (works just on IE),
http://catalog.update.mic...4522-9ad1-dcc969d94832

This CAB file is downloaded from above link,
AMD64_X86-en-20484220_5f2718fc6d44c5ae61d4275d679bbf1ededf58e5.cab

Extract winusbcompat.inf/.cat files from this CAB file.
For your convenience, I attached winusbcompat.zip to this post.


B. Installation
At plugin of a "WinUSB Device" (**1) to a PC (**2), specify the folder which contains winusbcompat.inf/.cat as its driver.

Once the winusbcompat.inf/.cat would be installed on the PC, another "WinUSB Devices" should be automatically recognized without any driver installation.

(**1) A device which returns MS OS descriptors for WinUSB, like Microchip "Device - WinUSB - Generic Driver Demo" example

(**2) Windows XP-SP3, Vista-SP2 (x86/x64), 7-SP1 (x86/x64)

Tsuneo

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (xiaofan)

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (ajs410)

$
0
0
That is pretty awesome, thanks for the links.
 
One thing I would note about this approach.  Windows 8 is supported by what is called an "in-box driver" - that is, you can install a fresh copy of Windows 8 on a PC with no Internet connection, plug in a WCID Device, and WinUSB will be installed correctly and automatically for your device.
 
For Windows Vista and Windows 7, the driver is not in-box; you can think of it as an "out-box driver", since it requires contact with Windows Update, but the OS will still automatically install the driver without you having to sign one.  This is not a problem if your customers have guaranteed Internet access on the machine in question, but if you must handle the use case of an air-gapped machine, your software installation will still need a driver package.
 
What is really new to me, here, is that you can install this winusbcompat driver package once, and then every WCID device after that gets the benefit.  That is awesome, especially since it works back to XP (even though XP officially dies tomorrow).  Even better than that, you don't need an Authenticode signature to install your driver package if you use winusbcompat!  And it can be included in your installer in the event that you target air-gapped systems.

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
I must not understand this or something, because I just don't see how this works. Using this method it will indeed bind the winusb.sys driver to the device. However, it doesn't look like this .inf file provides any device interface GUIDs. Without that, it seems impossible to open the device and use it with WinUSB functions?
 
Is there another way to open a WinUSB device without using SetupDiEnumDeviceInterfaces()? Or how does this actually work?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (chinzei)

$
0
0
salazar:
However, it doesn't look like this .inf file provides any device interface GUIDs. Without that, it seems impossible to open the device and use it with WinUSB functions?


The fact you aren’t aware of is,
the target "WinUSB class" (or "WCID") device provides every information in INF file over MS OS descriptors, including interface GUID. And then, any specific INF file is not required any more for the target device.

Since WinXP SP2, MS have integrated the protocol to detect "WinUSB class" device, by asking MS OS descriptors to every USB device at the first plugin enumeration. When the target device correctly responds to this protocol, Windows assigns MS_COMP_WINUSB to the device interface. But it doesn’t go any further, unless MS_COMP_WINUSB class driver is installed. Above class driver binds MS_COMP_WINUSB device to WinUSB driver. That is, it is the missing link ;-)

You may refer to these topics.

How to install WinUSB.sys without a custom INF?
http://blogs.msdn.com/b/u...hout-a-custom-inf.aspx

Building USB devices for Windows
http://msdn.microsoft.com...dn385698(v=vs.85).aspx

Microsoft OS Descriptors
http://msdn.microsoft.com...dows/hardware/gg463179

Is there another way to open a WinUSB device without using SetupDiEnumDeviceInterfaces()?


No way.
The procedure around SetupDiEnumDeviceInterfaces() is stereotype.
Once you’ve written (or copied) it, you may reuse it without touching its contents.
Of course, you may apply "WinUSB libraries" on the web, to hide SetupDiEnumDeviceInterfaces() call.

Tsuneo


Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
A couple follow-up questions:
 
1. Under Windows XP, it does not seem possible to use this winusbcompat.inf file. The reason is that WinXP needs a coinstaller to get winusb.sys and winusb.dll, since those binaries did not ship with WinXP. But this winusbcompat.inf file does not mention a coinstaller. Does winusbcompat.inf actually work on WinXP? Or do you need a custom .inf anyways?
 
2. On my development computer (Windows 7 64-bit) I do not get a DeviceInterfaceGUID. I have tried numerous times uninstalling the device, deleting it from the registry, etc. Every time it reinstalls but does not give me a DeviceInterfaceGUID with which to open the device. I have not seen this problem on any other computer I have tested on. Is it possible that during development (adding the MS OS descriptors), that it corrupted something in the registry that I am not aware of, that is causing it not to list the DeviceInterfaceGUID?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
Just to add to question #2 above:
 
The problem computer is running Windows 7 64-bit SP1 (Build 7601). I have tried changing the USB product id to something new, but that also does not seem to solve the problem for me. No matter what I do, the inbox WinUSB drivers plus this winusbcompat.inf file do not register the DeviceInterfaceGUID on this one specific computer. Are there any WinUSB registry settings I could check?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
Anyone have any ideas on the 2 questions presented above?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (chinzei)

$
0
0
A) Name of WinUsb Device
The device "name" on the Device Manager depends on the OS version (**1).

a) Windows 8/8.1
The device name comes from the device - the iProduct string descriptor

b) Windows XP, Vista, 7
The name is always "WinUsb Device", which comes from winusb.inf

(**1) WinUSB Device - on MSDN site
http://msdn.microsoft.com...hh450799(v=vs.85).aspx
Described in "How to change the device description for a WinUSB device" section

These names are stored on this registry entry for each device
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_vvvv&PID_pppp\<serial-number>\DeviceDesc

At the first plug-in installation, this registry entry is made by the OS. As this registry entry is protected, we can’t change the value of this entry. That is, to change this entry from the default, a custom INF file is required, as described in above MSDN document.

But when "FriendlyName" entry is placed under the same key, Device Manager shows this "name" primarily instead of "DeviceDesc". FriendlyName entry is assigned manually, or by PC application (using SetupDiSetDeviceRegistryProperty(SPDRP_FRIENDLYNAME) under administrator privilege), as discussed on this topic.
http://www.microchip.com/forums/FindPost/477203

B) XP installation
If the target WinXP PC wouldn’t have been installed WinUSB before, "WinUSB Device" plug-in installation using winusbcompat.inf should fail. It’s because winusbcompat.inf refers to winusb.inf.

WinUSB is able to be pre-installed together with winusbcompat.inf. If you would like to customize the "name" of the device, however, ordinary INF-file installation of WinUSB is better.

Tsuneo

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
There is one more issue that eludes me:
 
On my development computer (Windows 7 64-bit) I do not get a DeviceInterfaceGUID. I have tried numerous times uninstalling the device, deleting it from the registry, etc. Every time it reinstalls but does not give me a DeviceInterfaceGUID with which to open the device. I have not seen this problem on any other computer I have tested on. Is it possible that during development (adding the MS OS descriptors), that it corrupted something in the registry that I am not aware of, that is causing it not to list the DeviceInterfaceGUID?
 
This computer is running Windows 7 64-bit SP1 (Build 7601). I have tried changing the USB product id to something new, but that also does not seem to solve the problem for me. No matter what I do, the inbox WinUSB drivers plus this winusbcompat.inf file do not register the DeviceInterfaceGUID on this one specific computer. Are there any WinUSB registry settings I could check?
 
Any ideas what is happening here?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
Anyone know why the DeviceInterfaceGUID is not being installed on this specific computer?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (maheshkarrajmanda)

$
0
0
Hai chinzei,
i have some doubts.
1)-->when we send morethan 64bytes of data is split into multiple 64byte packts.
so,is it the hardware that split the packets or our device firmware needs to spit it.(i think firmware needs to split it up if so i kept my INEp and OUTEp buffers to 512 or i need to put to 64)

2)-->At an instant how much data i can read into rxfifo when host transmits 64bytes or more. 
 
i configured txfifo[1] of 512bytes, global rxfifo of 512 bytes.

For these i also configured endpoints.
TX-EP[1] is of 512bytes and direction is IN(device to host).

RX-EP[2] is of 512bytes and direction is host to device[OUT]
.
i'm using bulk tranfer method
one more problem is that when i exactly transfer 64/128/192/256/320/384/448bytes from host to device ,nothing is happening.
other than these above mentioned bytes i'm reading and writing the all the data successfully including 512bytes also.

Also i enabled zero length packet.

what my requirement is to achieve transfer rate of 3 to 4Megabits/sec.
 
I dont know where i'm getting wrong.please solve my problem.

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
After many hours of debugging, I finally figured out that the DeviceInterfaceGUID for WinUSB devices was not being installed *only* when plugging the device into USB 3.0 ports on the Win7 machine. With that information, I finally found this thread:
 
http://www.microchip.com/forums/m802958.aspx
 
That thread solved my problem, and hopefully it will help others in this same situation.

MS-official "WinUSB class" driver for XP, Vista and 7 (chinzei)

$
0
0
http://www.microchip.com/forums/FindPost/789872
ajs410:

What's really nice with Windows 8 is that you can supply a Microsoft descriptor that allows the system to automatically bind your vendor-defined interface to WinUSB without any INF file at all.  It will be plug-and-play exactly like HID - but only on Windows 8 or higher.

The MS-official "WinUSB class" driver extends this method back to XP, Vista and 7 (x86/x64).

As I noticed that this information is not popular even for USB experts like ajs410 yet, I post a brief summary, here.

A. Distribution
The driver file is distributed as "Windows Phone driver"
The detailed download instruction of this driver is described in this KB,

"Windows Phone 8 is not detected by your computer"
http://support.microsoft.com/kb/2749484/en-us
- Things to Try
- - 3. Update your Windows Phone 8 driver
- - - To manually download and install the Windows Phone driver:
- - - - a. Go to http://catalog.update.microsoft.com
- - - - b. Search for "windows phone winusb"

The direct link is (works just on IE),
http://catalog.update.mic...4522-9ad1-dcc969d94832

This CAB file is downloaded from above link,
AMD64_X86-en-20484220_5f2718fc6d44c5ae61d4275d679bbf1ededf58e5.cab

Extract winusbcompat.inf/.cat files from this CAB file.
For your convenience, I attached winusbcompat.zip to this post.


B. Installation
At plugin of a "WinUSB Device" (**1) to a PC (**2), specify the folder which contains winusbcompat.inf/.cat as its driver.

Once the winusbcompat.inf/.cat would be installed on the PC, another "WinUSB Devices" should be automatically recognized without any driver installation.

(**1) A device which returns MS OS descriptors for WinUSB, like Microchip "Device - WinUSB - Generic Driver Demo" example

(**2) Windows XP-SP3, Vista-SP2 (x86/x64), 7-SP1 (x86/x64)

Tsuneo

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (xiaofan)


Re: MS-official "WinUSB class" driver for XP, Vista and 7 (ajs410)

$
0
0
That is pretty awesome, thanks for the links.
 
One thing I would note about this approach.  Windows 8 is supported by what is called an "in-box driver" - that is, you can install a fresh copy of Windows 8 on a PC with no Internet connection, plug in a WCID Device, and WinUSB will be installed correctly and automatically for your device.
 
For Windows Vista and Windows 7, the driver is not in-box; you can think of it as an "out-box driver", since it requires contact with Windows Update, but the OS will still automatically install the driver without you having to sign one.  This is not a problem if your customers have guaranteed Internet access on the machine in question, but if you must handle the use case of an air-gapped machine, your software installation will still need a driver package.
 
What is really new to me, here, is that you can install this winusbcompat driver package once, and then every WCID device after that gets the benefit.  That is awesome, especially since it works back to XP (even though XP officially dies tomorrow).  Even better than that, you don't need an Authenticode signature to install your driver package if you use winusbcompat!  And it can be included in your installer in the event that you target air-gapped systems.

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
I must not understand this or something, because I just don't see how this works. Using this method it will indeed bind the winusb.sys driver to the device. However, it doesn't look like this .inf file provides any device interface GUIDs. Without that, it seems impossible to open the device and use it with WinUSB functions?
 
Is there another way to open a WinUSB device without using SetupDiEnumDeviceInterfaces()? Or how does this actually work?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (chinzei)

$
0
0
salazar:
However, it doesn't look like this .inf file provides any device interface GUIDs. Without that, it seems impossible to open the device and use it with WinUSB functions?


The fact you aren’t aware of is,
the target "WinUSB class" (or "WCID") device provides every information in INF file over MS OS descriptors, including interface GUID. And then, any specific INF file is not required any more for the target device.

Since WinXP SP2, MS have integrated the protocol to detect "WinUSB class" device, by asking MS OS descriptors to every USB device at the first plugin enumeration. When the target device correctly responds to this protocol, Windows assigns MS_COMP_WINUSB to the device interface. But it doesn’t go any further, unless MS_COMP_WINUSB class driver is installed. Above class driver binds MS_COMP_WINUSB device to WinUSB driver. That is, it is the missing link ;-)

You may refer to these topics.

How to install WinUSB.sys without a custom INF?
http://blogs.msdn.com/b/u...hout-a-custom-inf.aspx

Building USB devices for Windows
http://msdn.microsoft.com...dn385698(v=vs.85).aspx

Microsoft OS Descriptors
http://msdn.microsoft.com...dows/hardware/gg463179

Is there another way to open a WinUSB device without using SetupDiEnumDeviceInterfaces()?


No way.
The procedure around SetupDiEnumDeviceInterfaces() is stereotype.
Once you’ve written (or copied) it, you may reuse it without touching its contents.
Of course, you may apply "WinUSB libraries" on the web, to hide SetupDiEnumDeviceInterfaces() call.

Tsuneo


Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
A couple follow-up questions:
 
1. Under Windows XP, it does not seem possible to use this winusbcompat.inf file. The reason is that WinXP needs a coinstaller to get winusb.sys and winusb.dll, since those binaries did not ship with WinXP. But this winusbcompat.inf file does not mention a coinstaller. Does winusbcompat.inf actually work on WinXP? Or do you need a custom .inf anyways?
 
2. On my development computer (Windows 7 64-bit) I do not get a DeviceInterfaceGUID. I have tried numerous times uninstalling the device, deleting it from the registry, etc. Every time it reinstalls but does not give me a DeviceInterfaceGUID with which to open the device. I have not seen this problem on any other computer I have tested on. Is it possible that during development (adding the MS OS descriptors), that it corrupted something in the registry that I am not aware of, that is causing it not to list the DeviceInterfaceGUID?

Re: MS-official "WinUSB class" driver for XP, Vista and 7 (salazar)

$
0
0
Just to add to question #2 above:
 
The problem computer is running Windows 7 64-bit SP1 (Build 7601). I have tried changing the USB product id to something new, but that also does not seem to solve the problem for me. No matter what I do, the inbox WinUSB drivers plus this winusbcompat.inf file do not register the DeviceInterfaceGUID on this one specific computer. Are there any WinUSB registry settings I could check?
Viewing all 25 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>