Hi, (My first-ever post here, so be kind...)
I'm trying to understand why our USB device doesn't work with VirtualBox. If, from my description, you know what I'm doing wrong, that'd be unexpectedly wonderful; but what I'm really asking is how to debug this sort of thing:
I'm currently running VirtualBox 4.3.14 under MacOS 10.9.4, with the Oracle VM VirtualBox Extension Pack and the EHCI controller checked. It probably has nothing to do with a particular version of VirtualBox or the presence/absence of the Extension Pack, since it has never worked. The device filter works fine and the device is captured.
The device is USB 2.0 Full-Speed, with USBTMC (USB Test & Measurement Class) / USB488 Subclass. As for software, we use the National Instruments NI-VISA package, under Windows 7; this installs a USBTMC driver (ausbtmc.sys) and provides a test environment with which I can send individual commands to our device (Measurement and Automation Explorer (MAX) & VISA Test Panels). I use this to send the most basic query, the *IDN? command, which should return a device-information string. All this works swimmingly on a real Windows host.
With a USB protocol analyzer, I see that the link is basically alive, but the IN transaction (device->host) doesn't complete, and after 2 seconds the host clears the USB endpoint.
I didn't see anything very revealing in the VBox.log file -- but I probably don't know what I'm looking for either.
Just for grins, because I've personally never seen *any* USB device work with VirtualBox, I hooked up a USB mouse. It's captured fine and recognized by Windows, but only managed to move the cursor once, for a little bit (until the cursor slid off the Windows screen, in fact). Unplugging/plugging and rebooting does not change a thing. Clicking does seem to work. ??! I would have expected a plain-Jane HID to work straight away... shouldn't it?
Any hints greatly appreciated!!
How do I debug USB problem?
-
Mark92630
- Posts: 31
- Joined: 2. Dec 2012, 09:56
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Windows 10
Re: How do I debug USB problem?
When you launch VB and get the "Oracle VM VirtualBox Manager" window, does it show at least "1 active" device filter in the USB section?
I had a lot of trouble getting my Guest O/S (Windows 7) to recognize any USB device, but, once I got things configured correctly (and sorry, but I don't remember exactly how), I now have the opposite "problem."
Namely, I have several times attached a USB device to my Mac, only to have it intercepted by a running Windows VM that I had forgotten in the background, when what I wanted was to use the device on Mac OS X (the host O/S), itself.
Anyway, my Guest O/S can see the Apple USB SuperDrive and memory sticks and a digital camera. USB mouse works fine, too, as long as I first turn off the trackpad before launching the VM. Trying to connect the mouse to a running VM, already using the trackpad, fails. Specifically, the mouse can move the pointer (as indicated by what is highlighted as mouse passes over it), but the pointer will not be displayed.
I don't know if 4.3.14 is different. I've seen enough traffic on problems with the 4.3.14 software to keep me from upgrading, at least so far.
Mark
I had a lot of trouble getting my Guest O/S (Windows 7) to recognize any USB device, but, once I got things configured correctly (and sorry, but I don't remember exactly how), I now have the opposite "problem."
Anyway, my Guest O/S can see the Apple USB SuperDrive and memory sticks and a digital camera. USB mouse works fine, too, as long as I first turn off the trackpad before launching the VM. Trying to connect the mouse to a running VM, already using the trackpad, fails. Specifically, the mouse can move the pointer (as indicated by what is highlighted as mouse passes over it), but the pointer will not be displayed.
I don't know if 4.3.14 is different. I've seen enough traffic on problems with the 4.3.14 software to keep me from upgrading, at least so far.
Mark
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: How do I debug USB problem?
Oh dear... GPIB... As a long-time NI user (20 years this year!) I have felt your pain time and again. I know what MAX, NI-VISA and USBTMC mean (before they existed as acronyms
).
The basic problem is timing. You see there's a layer of "translation" going on when you use a software filter (like the VB USB filter) and not talking directly to the hardware (via software again of course, but it's a different set of assumptions). I've seen reports in the Info-LabVIEW list from people that couldn't get their USB-DAQ devices to work at all, but their GPIB ones did. If you get it to work, it would be a miracle honestly...
As far as general USB support, VirtualBox is doing a very good, almost perfect job. I've had zero problems connecting all sorts of devices (except NI ones, I haven't tried) to my Mac and a plethora of guest VMs.
The basic problem is timing. You see there's a layer of "translation" going on when you use a software filter (like the VB USB filter) and not talking directly to the hardware (via software again of course, but it's a different set of assumptions). I've seen reports in the Info-LabVIEW list from people that couldn't get their USB-DAQ devices to work at all, but their GPIB ones did. If you get it to work, it would be a miracle honestly...
As far as general USB support, VirtualBox is doing a very good, almost perfect job. I've had zero problems connecting all sorts of devices (except NI ones, I haven't tried) to my Mac and a plethora of guest VMs.
I smell a timeout. Did you set your timeouts and terminations correctly in MAX?pkeller wrote:the IN transaction (device->host) doesn't complete, and after 2 seconds the host clears the USB endpoint.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: How do I debug USB problem?
Just wanted to mention the issue with 4.3.14 only affects Windows hosts.Mark92630 wrote: I don't know if 4.3.14 is different. I've seen enough traffic on problems with the 4.3.14 software to keep me from upgrading, at least so far.
Mark
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
Re: How do I debug USB problem?
Sorry for my silence, just back from vacation. Thanks to all for your feedback. I think socratis' suspicions are correct; in the meantime, my colleagues have discovered that USB communications with our device also fails on certain PCs, which certainly smells like a timing issue. So I will try to flush out the problem on one of those physical platforms before coming back to VirtualBox. Incidentally, I forgot to mention that it does work under Parallels... but since our development environment is VirtualBoxed, I'd like to get it to work on VB.
Re: How do I debug USB problem?
FYI, USB access has not worked right for me since 4.3.12. I just tried 4.3.16 and it's still broken, so I'm reverting back to 4.3.12 again. What do I mean by broken?
I use a Windows 7 guest with IAR IDE for embedded development. USB connections are used for serial console interfaces and a JTAG debugger. The consoles seem to work fine (115200 n/8/1), but the connection to the JTAG box is completely unreliable. That seems to reinforce the timing suspicion. This problem renders my whole environment useless.
I've used Windows (XP & 7) VMs on Virtualbox in this manner for over three years on a daily basis, and never had a problem. I'm about to try VMWare again.
I use a Windows 7 guest with IAR IDE for embedded development. USB connections are used for serial console interfaces and a JTAG debugger. The consoles seem to work fine (115200 n/8/1), but the connection to the JTAG box is completely unreliable. That seems to reinforce the timing suspicion. This problem renders my whole environment useless.
I've used Windows (XP & 7) VMs on Virtualbox in this manner for over three years on a daily basis, and never had a problem. I'm about to try VMWare again.