Diff between 9844a8c3c7d74bb2554a537303c12e30bedb6341 and 2ebd4461971a1ee05a6c4850bd56a93d7a065362

Changed Files

File Additions Deletions Status
emulator/bthost.c +7 -2 modified

Full Patch

diff --git a/emulator/bthost.c b/emulator/bthost.c
index 5e3a186..2c96bc5 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -268,7 +268,7 @@ static uint8_t l2cap_sig_send(struct bthost *bthost, struct btconn *conn,
 {
 	static uint8_t next_ident = 1;
 	struct bt_l2cap_hdr_sig *hdr;
-	uint16_t pkt_len;
+	uint16_t pkt_len, cid;
 	void *pkt_data;
 
 	pkt_len = sizeof(*hdr) + len;
@@ -291,7 +291,12 @@ static uint8_t l2cap_sig_send(struct bthost *bthost, struct btconn *conn,
 	if (len > 0)
 		memcpy(pkt_data + sizeof(*hdr), data, len);
 
-	send_acl(bthost, conn->handle, 0x0001, pkt_data, pkt_len);
+	if (conn->addr_type == BDADDR_BREDR)
+		cid = 0x0001;
+	else
+		cid = 0x0005;
+
+	send_acl(bthost, conn->handle, cid, pkt_data, pkt_len);
 
 	free(pkt_data);