#include <glib.h>
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+
#include "monitor/bt.h"
#include "emulator/btdev.h"
#include "emulator/bthost.h"
static bool create_vhci(struct hciemu *hciemu)
{
struct btdev *btdev;
+ uint8_t create_req[2];
+ ssize_t written;
int fd;
btdev = btdev_create(hciemu->btdev_type, 0x00);
return false;
}
+ create_req[0] = HCI_VENDOR_PKT;
+ create_req[1] = HCI_BREDR;
+ written = write(fd, create_req, sizeof(create_req));
+ if (written < 0) {
+ close(fd);
+ btdev_destroy(btdev);
+ return false;
+ }
+
hciemu->master_dev = btdev;
hciemu->master_source = create_source_btdev(fd, btdev);