- MTP & composite devices in Vista
- Posted by Johan Paul on August 17th, 2007
Hi all,
Are my preliminary discoveries correct, that if I plug in an MTP
capable device into Vista, it will be automatically placed into the
WPD device class and Vista will only load the MTP device driver
without further caring about the HWID thus not installing additional
drivers?
If this is correct, can this feature be disabled or prevented from
happening by the developer? Thus, how am I able to enumerate
additional capabilities of a composite USB device with MTP support in
Vista?
Regards,
Johan Paul
- Posted by chris.aseltine@gmail.com on August 17th, 2007
On Aug 17, 5:13 am, Johan Paul <johan.p...@gmail.com> wrote:
If your composite device exposes the MTP OS descriptor, I believe
you'll get the MS_COMP_MTP compatible ID along with the USB\COMPOSITE
compatible ID (assuming all other items are in place). In what order
they're placed in the PDO's compatible ID list they're placed is up to
usbhub, I don't really know or remember.
For the MTP composite devices that we had (MTP + two other custom
interfaces/child devices in our case), we just signed our bus driver
for the exact VID/PID of the device. (Our bus driver would pull the
OS descriptor also, and tack on the compatible ID to the child device
so WPD would still load). In this case, hardware ID trumps compatible
ID, so our bus driver loaded before WPD as the FDO for the device
itself.
If you don't have a bus driver, you can write an INF (and get it
signed) that manually references usbccgp, but in that case you'll
likely also need to write another INF that references WPD for the
child device, since I don't think usbccgp will add the MTP compatible
ID's to its child devices where applicable.
- Posted by Johan Paul on August 17th, 2007
Hi Chris,
Aah, so the core thing to remember here is that my bus driver needs to
be signed. I do have a bus driver for the device that matched exact
VID/PID, but in my case it is still unsigned. So Vista preferred it's
own class driver (that matched the MS_COMP_MTP compatible ID), because
it was signed, over my unsigned bus driver although my bus driver
matched the exact VID/PID?
Thanks for pointing this to us!
Regards,
Johan Paul
- Posted by chris.aseltine@gmail.com on August 17th, 2007
On Aug 17, 1:09 pm, Johan Paul <johan.p...@gmail.com> wrote:
Right (oh yeah, forgot you had that bus driver...) So to test
everything out first, you'll probably want to rename wpdusb.inf (or
whatever it's called) to something else (not ending in .inf
) when
you first install your bus driver. Then when your bus driver creates
its child devices, rename it back, and the MTP child device will pick
it up.
The "normal" way to do this would be to force-install your bus driver
(instead of WPD) on the device using Device Manager/hardware wizard
after the fact, but when we tried doing this we got blue screens
fairly predictably, at least on XP SP2 (YMMV, and so on).
- Posted by Johan Paul on August 17th, 2007
Thanks for suggesting this! I have high hopes for my bus driver since
it works perfectly in XP with MTP and all. This Vista issue scared the
hell out of me, but thankfully it has a natural explanation and I
think signing the bus driver will do the trick and stuff will work
like they do in XP - *fingers crossed* 