:: Re: [DNG] USB file transfer to your…
Kezdőlap
Delete this message
Reply to this message
Szerző: Brad Campbell
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] USB file transfer to your Android device
On 13/05/16 09:35, Steve Litt wrote:
> The following document looked pretty good, but the author kept pulling
> unexplained things out of every orifice, so it was impossible to know
> how the commands applied to me:
>
> https://pve.proxmox.com/wiki/USB_Devices_in_Virtual_Machines
>
> USB passthrough is a pretty complex thing because I have a Void host, a
> Devuan guest, by necessity I have a USB hub. There are so many
> variables that, without finding a person who really knows how this
> stuff works, I could spend days.


Hey Steve,

USB passthrough can be either complex or simple. I kinda like it the
simple way.

Here's how I pass iOS devices through to a Windows VM on my desktop and
laptop.

I add these three lines to my qemu command line script

-usb\
-device nec-usb-xhci,id=xhci\
-device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x1261 \

The first tells qemu we want the usb stack. The second creates a virtual
xhci controller and associated root hub, and the third assigns any
device plugged into the host with the VID/PID pair through to the VM.

With that, when I plug my iOS device into the host, qemu claims it and
pokes it through to the VM. VID/PID can be just pulled from lsusb when
you plug the device into your host.

There are other ways whereby you can attache busses and hubs to the qemu
instance, but that seems pretty complex when you just want to pass a
single device through (or multiple devices even).

eg :
-usb\
-device nec-usb-xhci,id=xhci\
-device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x1261 \
-device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x12ab \
-device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x12aa \
-device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x1281 \


That passes through my iPad, my Wife's iPad, my iPod and a mates iPod if
any or all of them are connected to the host simultaneously.

Now this works with pretty much anything I've tried from iPads to HASP
dongles, digital cameras. You get the idea.

When I pass through my Blackberry for a firmware update, it uses one PID
for normal mode and another PID for the bootloader, so I need both of
those. Come to think of it, so do the iOS devices when you are firmware
updating them. Just claim both and you are good to go.

Normally I'd just pass the VID through and wildcard the PID, but since
my desktop and laptop are Apple hardware I end up claiming the accessory
devices as well (like camera, sound card and keyboard), so I use both
VID and PID.