KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

New support for Bluetooth devices using –bt option

Beginning with kvm-79, there’s now support for Bluetooth devices that was included as part of the latest qemu merge. The following documentation is taken mostly from qemu documentation explaining the new Bluetooth options.

 

The new Bluetooth –bt options

 

‘-bt hci[...]’

Defines the function of the corresponding Bluetooth HCI. -bt options are matched with the HCIs present in the chosen machine type. For example when emulating a machine with only one HCI built into it, only the first -bt hci[...] option is valid and defines the HCI’s logic. The Transport Layer is decided by the machine type. Currently the machines n800 and n810 have one HCI and all other machines have none. The following three types are recognized:

-bt hci,null
(default) The corresponding Bluetooth HCI assumes no internal logic and will not respond to any HCI commands or emit events.

-bt hci,host[:id]
(bluez only) The corresponding HCI passes commands / events to / from the physical HCI identified by the name id (default: hci0) on the computer running QEMU. Only available on bluez capable systems like Linux.

-bt hci[,vlan=n]
Add a virtual, standard HCI that will participate in the Bluetooth scatternet n (default 0). Similarly to ‘-net’ VLANs, devices inside a bluetooth network n can only communicate with other devices in the same network (scatternet).

‘-bt vhci[,vlan=n]’
(Linux-host only) Create a HCI in scatternet n (default 0) attached to the host bluetooth stack instead of to the emulated target. This allows the host and target machines to participate in a common scatternet and communicate. Requires the Linux vhci driver installed. Can be used as following:

qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5

 

‘-bt device:dev[,vlan=n]’
Emulate a bluetooth device dev and place it in network n (default 0). QEMU can only emulate one type of bluetooth devices currently:

keyboard - Virtual wireless keyboard implementing the HIDP bluetooth profile.
 

See Also

Comments

How do I emulate bluetooth in qemu-kvm?

I would like to know how to make a bluetooth divice to work in a xp guest os under Arch linux... The divice is a IPRE; a robot named scribber. I want to use this option >> -bt hci,host[:id], i put
mau ~ $ qemu-kvm -hda windows 1500 -vga std -bt hci
but when i am in xp, bluetooth does not show up.

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.