qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Bluetooth options


From: andrzej zaborowski
Subject: [Qemu-devel] Bluetooth options
Date: Mon, 29 Sep 2008 03:27:02 +0200

Hi,
  I added code to emulate various bluetooth hardware but I didn't add
any user interface to set it up or tweak.  The attached patch adds
command line switches for doind that but it's not very pretty, any
suggestions to change it will be appreciated.

There are three switches:

 -bt xxx
   tells qemu how to emulate a given HCI.  A HCI is made of two parts,
the transport layer (serial or USB) through which the host issues HCI
commands, and the HCI logic that does something with the commands.
The transport layer is determined by the emulated machine, for example
a machine might have two serial dongles in it, then the first -bt
switch will relate to the dongle on the first serial port and the
second -bt to the other dongle.  'xxx' can be three things:
 -bt null
    simply ignores any commands, i.e. never gives any response.
 -bt hci[,vlan=N]
    emulates a virtual HCI more or less according to the
specification.  Using -bt hci,vlan=N adds the HCI to scatternet N
(default 0) or creates a new scatternet, which is similar to a qemu
ethernet vlan in that any two devices in the same vlan can connect to
each other.
 -bt host[:ID]
    connects to the host's dongle named ID (defaults to 'hci0') and
proxies any commands to this dongle.  This has some limitations under
Linux and is not very reliable.

 -vhci N
    emulates a vireual HCI (like -bt hci) that is not connected to any
guest transport and instead opens /dev/vhci to create what appears as
a new dongle to the host bluetooth stack.  It will be connected to the
qemu vlan N.

 -btdevice dev[,vlan=N]
    adds a bluetooth device 'dev' to scatternet N (default 0),
similarly to -usbdevice.  The only supported value for 'dev' is
'keyboard' which is like a usb HID keyboard.  It doesn't support
authentication (which I think, in case of a keyboard makes it
out-of-spec) but that's easy to implement.

A usb dongle can be added with -usbdevice bt or -usbdevice:xxx where
xxx is same as in -bt xxx (defaults to 'hci,vlan=0').  Monitor usb_add
should also work.  It specifies both a transport layer (USB) and the
HCI logic, so no -bt switch is needed. -bt is only useful for machines
with a built-in transciever like the n800/n810.

Regards

Attachment: 0001-Add-commandline-options-to-make-use-of-bluetooth-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]