Lines Matching full:usb

1 USB emulation
4 QEMU can emulate a PCI UHCI, OHCI, EHCI or XHCI USB controller. You can
5 plug virtual USB devices or real host USB devices (only works with
7 connect virtual USB hubs as necessary to connect multiple USB devices.
9 USB controllers
23 XHCI supports USB 1.1, USB 2.0 and USB 3.0 devices, so this is the
24 only controller you need. With only a single USB controller (and
25 therefore only a single USB bus) present in the system there is no
26 need to use the bus= parameter when adding USB devices.
32 The QEMU EHCI Adapter supports USB 2.0 devices. It can be used either
33 standalone or with companion controllers (UHCI, OHCI) for USB 1.1
35 because it provides a single USB bus supporting both USB 2.0 and USB
39 controllers for USB 1.1 devices too. Each controller creates its own
40 bus though, so there are two completely separate USB buses: One USB
41 1.1 bus driven by the UHCI controller and one USB 2.0 bus driven by
46 ``-usb`` switch. QEMU will create the UHCI controller as function of
47 the PIIX3 chipset. The USB 1.1 bus will carry the name ``usb-bus.0``.
51 the controller so the USB 2.0 bus gets an individual name, for example
52 ``-device usb-ehci,id=ehci``. This will give you a USB 2.0 bus named
55 When adding USB devices using the ``-device`` switch you can specify the
62 -usb \\
63 -device usb-ehci,id=ehci \\
64 -device usb-tablet,bus=usb-bus.0 \\
65 -device usb-storage,bus=ehci.0,drive=usbstick
67 This attaches a USB tablet to the UHCI adapter and a USB mass storage
74 The UHCI and OHCI controllers can attach to a USB bus created by EHCI
89 Then use ``bus=ehci.0`` to assign your USB devices to that bus.
91 Using the ``-usb`` switch for ``q35`` machines will create a similar
92 USB controller configuration.
95 .. _Connecting USB devices:
97 Connecting USB devices
100 USB devices can be connected with the ``-device usb-...`` command line
103 ``usb-mouse``
107 ``usb-tablet``
113 ``usb-storage,drive=drive_id``
116 bulk-only transport protocol used by 99% of USB sticks. This
117 example shows it connected to an XHCI USB controller and with
124 -device nec-usb-xhci,id=xhci \\
125 -device usb-storage,bus=xhci.0,drive=stick
127 ``usb-uas``
128 USB attached SCSI device. This does not create a SCSI disk, so
131 specify what those disks are backed by. One ``usb-uas`` device can
141 -device nec-usb-xhci,id=xhci \\
142 -device usb-uas,id=uas,bus=xhci.0 \\
147 ``usb-bot``
149 same USB bulk-only transport protocol interface as ``usb-storage``, but
150 the QEMU command line option works like ``usb-uas`` and does not
151 automatically create SCSI disks for you. ``usb-bot`` supports up to
152 16 LUNs. Unlike ``usb-uas``, the LUN numbers must be continuous,
154 ``usb-uas`` example above won't work with ``usb-bot``.
156 ``usb-mtp,rootdir=dir``
160 ``usb-host,hostbus=bus,hostaddr=addr``
163 ``usb-host,vendorid=vendor,productid=product``
166 ``usb-wacom-tablet``
171 ``usb-kbd``
172 Standard USB keyboard. Will override the PS/2 keyboard (if present).
174 ``usb-serial,chardev=id``
178 ``usb-braille,chardev=id``
179 Braille device. This emulates a Baum Braille device USB port. id has to
186 |qemu_system| [...] -chardev braille,id=brl -device usb-braille,chardev=brl
194 ``usb-net[,netdev=id]``
201 |qemu_system| [...] -netdev user,id=net0 -device usb-net,netdev=net0
203 ``usb-ccid``
206 ``usb-audio``
207 USB audio device
210 :doc:`usb-u2f`
219 For all the above USB devices, by default QEMU will plug the device
220 into the next available port on the specified USB bus, or onto
221 some available USB bus if you didn't specify one explicitly.
225 ports (1-6), and the emulated (1.1) USB hub has eight ports.
229 -device usb-tablet,bus=usb-bus.0,port=1
233 -device usb-hub,bus=usb-bus.0,port=2
235 Plugging a virtual USB stick into port 4 of the hub just plugged works
238 -device usb-storage,bus=usb-bus.0,port=2.4,drive=...
246 (qemu) device_add usb-tablet,bus=usb-bus.0,port=1,id=my-tablet
249 Hotplugging USB storage
252 The ``usb-bot`` and ``usb-uas`` devices can be hotplugged. In the hotplug
258 #. ``device-add usb-bot,id=foo``
265 Using host USB devices on a Linux host
269 it. USB devices requiring real time streaming (i.e. USB Video Cameras)
273 actually using the USB device. A simple way to do that is simply to
277 2. Verify that ``/proc/bus/usb`` is working (most Linux distributions
282 ls /proc/bus/usb
285 3. Since only root can access to the USB devices directly, you can
286 either launch QEMU as root or change the permissions of the USB
291 chown -R myuid /proc/bus/usb
299 Class 00: USB device 1234:5678, USB DISK
308 device_add usb-host,vendorid=0x1234,productid=0x5678
310 Normally the guest OS should report that a new USB device is plugged.
311 You can use the option ``-device usb-host,...`` to do the same.
313 6. Now you can try to use the host USB device in QEMU.
315 When relaunching QEMU, you may have to unplug and plug again the USB
318 ``usb-host`` properties for specifying the host device
323 the only way to specify the host device. ``usb-host`` supports
351 Note that on the host USB 1.1 devices are handled by UHCI/OHCI and USB
352 2.0 by EHCI. That means different USB devices plugged into the very
357 and also assign it to the correct USB bus in QEMU like this:
362 -usb \\
363 -device usb-ehci,id=ehci \\
364 -device usb-host,bus=usb-bus.0,hostbus=3,hostport=1 \\
365 -device usb-host,bus=ehci.0,hostbus=1,hostport=1
367 ``usb-host`` properties for reset behavior
371 whenever the guest is allowed to reset the physical usb device on the
375 The guest is not allowed to reset the (physical) usb device.
379 initialized (aka no usb bus address assigned). Usually this results
385 The reason for this existing are broken usb devices. In theory one
386 should be able to reset (and re-initialize) usb devices at any time.
387 In practice that may result in shitty usb device firmware crashing and
392 usb device at hand, so it's a trial-and-error game. If the default
396 record usb transfers
399 All usb devices have support for recording the usb traffic. This can
402 ``-device usb-mouse,pcap=mouse.pcap``