Ignore devices in raw mode
diff --git a/hcid/device.c b/hcid/device.c
index 987fa0c..01262f0 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -71,6 +71,8 @@
 };
 
 struct hci_dev {
+	int ignore;
+
 	bdaddr_t bdaddr;
 	uint8_t  features[8];
 	uint8_t  lmp_ver;
@@ -105,8 +107,15 @@
 
 	dev = &devices[dev_id];
 
-	if (hci_devinfo(dev_id, &di) < 0)
+	if (hci_devinfo(dev_id, &di) < 0) {
+		dev->ignore = 1;
 		return -errno;
+	}
+
+	if (hci_test_bit(HCI_RAW, &di.flags)) {
+		info("Device hci%d is using raw mode", dev_id);
+		dev->ignore = 1;
+	}
 
 	bacpy(&dev->bdaddr, &di.bdaddr);
 	memcpy(dev->features, di.features, 8);
@@ -157,6 +166,9 @@
 
 	dev = &devices[dev_id];
 
+	if (dev->ignore)
+		return 0;
+
 	dd = hci_open_dev(dev_id);
 	if (dd < 0) {
 		error("Can't open device hci%d",