Certain USB Device is not visible for VirtualBox

Discussions related to using VirtualBox on Linux hosts.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Certain USB Device is not visible for VirtualBox

Post by O11111 »

I have and USB device that I need to pass to virtual machine, but VirtualBox does not see it (others are visible).
I also checked that user is in required group (vboxusers)
Device reports itself as

Code: Select all

Bus 001 Device 028: ID 0a12:4010 Cambridge Silicon Radio, Ltd
in lsusb, so it's recognized by OS but not by VBox.
Here's "VBoxManage list usbhost" output:

Code: Select all

Host USB Devices:

UUID:               8c602fce-5057-4f6b-a361-7d77c98b3b53
VendorId:           0x0bda (0BDA)
ProductId:          0x8771 (8771)
Revision:           2.0 (0200)
Port:               5
USB version/speed:  1/Full
Manufacturer:       Realtek
Product:            Bluetooth Radio
SerialNumber:       00E04C239987
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6//device:/dev/vboxusb/001/017
Current State:      Busy

UUID:               7bfe7c8f-792c-441e-b58c-9846f0caf158
VendorId:           0x062a (062A)
ProductId:          0x4101 (4101)
Revision:           2.3 (0203)
Port:               6
USB version/speed:  1/Full
Manufacturer:       MOSART Semi.
Product:            2.4G Keyboard Mouse
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7//device:/dev/vboxusb/001/025
Current State:      Busy
Does this behaviour expected or it's a bug? Is there something I can do to make things work as I expected?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Certain USB Device is not visible for VirtualBox

Post by mpack »

Please provide a VM log file. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

Logs attached
Attachments
logs.zip
(29.31 KiB) Downloaded 5 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Certain USB Device is not visible for VirtualBox

Post by mpack »

Thanks. I don't see any gross errors in the log, though Windows 10 will run much better with 2 cores (not more not less), and perhaps with 3D acceleration enabled too, though that does ask more of the host OpenGL drivers. RAM allocation seems excessive: I'd have thought 8GB was plenty.

When you say that a USB device is not visible to VirtualBox, what do you mean exactly? Are you talking about "list usbhost" on the host (where I do see a radio device listed), or are you saying that the guest OS doesn't see this USB device at all (on which, I see no sign that a USB filter was created), or do you mean that the device is visible but doesn't work?


I should mention: if this USB device is a Software Defined Radio then I would expect it to be too fussy timing wise to work in a simulated PC. That's not a guarantee, just a suspicion I have.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

I mean that "list usbhost" not shows it, I cannot create filter based on attached device for it (because it's not in that list) and guest OS doesn't see it even with custom filter (configs are in attached screenshot, maybe they are wrong?)
In Win10 I checked using USB Deview and device isn't in list of connected devices and it's not visible to software used to program it (which is the only reason to use Windows)

It's not an SDR, it's QCC5144 board
Attachments
Screenshot from 2021-06-09 13-57-47.png
Screenshot from 2021-06-09 13-57-47.png (30.87 KiB) Viewed 4617 times
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Certain USB Device is not visible for VirtualBox

Post by Martin »

The usb device 0a12:4010 is listed as an USB hub.
https://linux-hardware.org/index.php?id=usb:0a12-4010
VirtualBox doesn't support assigning USB hubs to a guest, only devices attached to a hub.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

It's not a hub (at least does not seem to be a hub: usb lines from connector literally go only to D+ and D- pins of SJR-BTM544 module inserted into pin headers on board) and it's the only device showing then inserting cable.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Certain USB Device is not visible for VirtualBox

Post by Martin »

If you look at my link you see that the USB id of the device is registered / classified as hub and supported on Linux by the "hub.c" driver module.
Therefore it is a "hub" from the point of view of Virtualbox.

I don't know if Virtualbox can be tricked to attach this device to a guest in any way.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Certain USB Device is not visible for VirtualBox

Post by scottgus1 »

USB basics and troubleshooting mentions the possibility that a device can be a hub with multiple devices downwind of the hub. The hub itself cannot be filtered, as Martin says. (Though it would be sssssoooo cool if they could!)

If several devices appear under 'vboxmanage list usbhost' when the single device plugs in, then each device that appears must have its own filter to get into the Virtualbox VM. If only the one device appears in 'usbhost', then it cannot be captured in the present state of Virtualbox. A Bugtracker report may be useful for future users of such devices.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

The problem is that there are no new devices in 'vboxmanage list usbhost' and only one new in 'lsusb' - only this "hub".
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Certain USB Device is not visible for VirtualBox

Post by Martin »

Maybe the vendor only implemented the hub part according to the USB device standards and then does something outside the USB specifications with the Windows device driver.
In this case the chances are not good to get it to work in a Windows guest on Linux.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

So what could I try? Maybe patching VirtualBox code that decides if USB device is an hub (or it's done in kernel?) will work?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Certain USB Device is not visible for VirtualBox

Post by mpack »

I'm afraid that doesn't make sense. USB hubs are not addressable, that's why packets coming from that address can't be redirected to a VM: because nothing comes from that address.

Make sure that the hub is compatible with the PC port you plugged it into (i.e. if it's a USB3 hub, plug it into a USB3 port on the PC). Then make sure that the device is compatible with the hub, e.g. if it's a USB3 device then don't plug it into a USB2 hub.
O11111
Posts: 8
Joined: 8. Jun 2021, 23:20

Re: Certain USB Device is not visible for VirtualBox

Post by O11111 »

Just to clarify: I have chinese dev board for QCC5144 (not sure if I can give a link, but it's easily searchable on aliexpress as "QCC5144", photo attached). QCC5144 is Qualcomm's Bluetooth audio receiver, software to program it runs only on Windows (not sure about wine but probably won't) and installs custom drivers. I cannot see why it even recognized as hub, maybe they wanted to make impossible to program it without special hacks or had ran out of VID:PID pairs or something else. I have Linux as my main system and don't want to install W10 alongside (but will probably have to).

As you can see on photo, D+ and D- lines from usb connector go to the chip itself (and it's not a hub, at least I can't use it as hub because it has only 1 USB, 2 SPDIF, 3*3.5mm jacks)

So I will ask the following: how does VirtualBox passes USB devices? It simply forwards all calls from guest system (even non-spec ones) to device itself or implements some kind of high level translation? If it's the first then restriction could be bypassed easily, however if it's the second than I should search for free space for Windows installation.
USB hubs are not addressable, that's why packets coming from that address can't be redirected to a VM: because nothing comes from that address.
And what if something comes from that address? Even though it's out of spec, but it's still possible, right?
If I'll install Windows then how I should verify if some packets come from that address or not?
Attachments
1920.jpg.zip
(238.63 KiB) Downloaded 10 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Certain USB Device is not visible for VirtualBox

Post by mpack »

O11111 wrote: So I will ask the following: how does VirtualBox passes USB devices? It simply forwards all calls from guest system (even non-spec ones) to device itself or implements some kind of high level translation?
It's simply a network forwarder. It doesn't translate anything. I assume that the packet has to be correctly formed, otherwise any device along the path is liable to discard it.

On Windows hosts a little driver is inserted into the USB stack that looks for that slave device being attached, and launches a task to redirect packets coming from it. Linux hosts operate slightly differently I believe (see section 3.11 of the user manual), though the effect is similar.
Post Reply