diff --git a/emulator/vhci.c b/emulator/vhci.c
index 106a8e2..1d198e4 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
#include <string.h>
#include "monitor/mainloop.h"
+#include "monitor/bt.h"
#include "btdev.h"
#include "vhci.h"
return;
len = read(vhci->fd, buf, sizeof(buf));
- if (len < 0)
+ if (len < 1)
return;
- btdev_receive_h4(vhci->btdev, buf, len);
+ switch (buf[0]) {
+ case BT_H4_CMD_PKT:
+ case BT_H4_ACL_PKT:
+ case BT_H4_SCO_PKT:
+ btdev_receive_h4(vhci->btdev, buf, len);
+ break;
+ }
}
struct vhci *vhci_open(enum vhci_type type)