daynix / UsbDk

Usb Drivers Development Kit for Windows
Apache License 2.0
535 stars 142 forks source link

usdbk device prevent device usage in virtual-box #40

Closed diabolo38 closed 7 years ago

diabolo38 commented 7 years ago

Under win7-64 (home edition) After usb device (maybe) used by usbdk via libusb and released it may not be possible anymore to map it in a virtual machine( virtual biox) I'm not 100% how i reach that situation, i noticed it after a while installing playing and testing libusbd+usbdk i was not able anymore to use an device in a VirtualBox , it fail to acquire device in host and map it on the guest.

I had to play with registry editor and delete an entry "upfilter" that was set as "Usdbk" in order to get back usb device usable in virtual machine. I came to this solution described in many virtual box forum post like here https://forums.virtualbox.org/viewtopic.php?f=2&t=37326

Is this a know issue? It's quite annoying for libusb based app under window if the same device is to be used in guest os (typically my multi os test environment).

dmitryfleytman commented 7 years ago

Hi,

Thanks for the report. Looks like interoperability issue between UsbDk and Virtual Box drivers. We will check this. It would be great if your could provide exact steps to reproduce this problem.

Thanks, Dmitry

diabolo38 commented 7 years ago

From a fresh window say "no usbdk" (de-installed+regisrty clan manualy already) i can attach my test dev (stm32 cdc/acm) to virtual box guest os. After usbdk runtime get install from https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.17_x64.msi and re-started window I can't attached my device to virtual box guest , The registry key mentioned is set again and seam to cause issue. So their is not even need to use the device with libusb to cause the issue installing usbdk is enough to cause interoperability issue with virtual box.

Strange things i noticed : while de-installing and same while installing "usbdk" caused my VIA USB 3.0 root hub to appear with exclamation mark , also running virtual box stop to show many usb-device that were presents before install/de-install. the mark goes away after os reboot but never usbdk asked to restart during (de-)install?

dmitryfleytman commented 7 years ago

Thanks, @diabolo38

We will check this.

eric-schleicher commented 7 years ago

I can confirm this behavior on windows 10 x64. if usbDK is installed, cannot attach USB devices to VirtualBox Guest.

sameehj commented 7 years ago

The problem is on VirtualBox side.

A patch which fixes the issue was sent to Vbox-devel: https://www.virtualbox.org/pipermail/vbox-dev/2017-July/014625.html

For more info on what causes the issue you can read the cover letter: https://www.virtualbox.org/pipermail/vbox-dev/2017-July/014624.html