BlueTooth RFCOMM?
Hello,
I am trying to add support for Bluetooth braille devices, but I seem to be missing something. Basically, it should be using the RFCOMM PSM, but running
rfcomm connect 0 BA:BE:BA:D0:00:01
in the Linux guest hangs for some time and then the connect() system call returns EINPROGRESS. Am I perhaps missing some call to the qemu bt core?
Samuel
Makefile.objs +1 -1
@@ -78,7 +78,7 @@ common-obj-y += msmouse.o ps2.o common-obj-y += qdev.o qdev-properties.o common-obj-y += qemu-config.o block-migration.o -common-obj-$(CONFIG_BRLAPI) += baum.o +common-obj-$(CONFIG_BRLAPI) += baum.o bt-baum.o common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
hw/baum.h +4 -0
@@ -22,5 +22,9 @@* THE SOFTWARE. */ +#include "qemu-char.h" +#include "bt.h" /* char device */ CharDriverState *chr_baum_init (QemuOpts *opts); +/* bluetooth device */ +struct bt_device_s *bt_baum_init (struct bt_scatternet_s *net);
hw/bt-baum.c new file +158 -0
158 lines not on this page · raw message
hw/bt.h +4 -0
@@ -23,6 +23,9 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#ifndef BT_H +#define BT_H + /* BD Address */ typedef struct { uint8_t b[6];
@@ -2181,3 +2184,4 @@ enum bt_sdp_attribute_id {SDP_ATTR_NORMALLY_CONNECTABLE =0x020d , SDP_ATTR_BOOT_DEVICE = 0x020e, }; +#endif
vl.c +3 -0
@@ -1741,6 +1741,9 @@ static struct bt_device_s *bt_device_add(const char *opt)if (!strcmp (devname,"keyboard" ))return bt_keyboard_init (vlan); +if (!strcmp (devname,"braille" )) +return bt_baum_init (vlan); +fprintf (stderr,"qemu: unsupported bluetooth device `%s'\n" , devname);return 0 ; }