From 2ebd4461971a1ee05a6c4850bd56a93d7a065362 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 20 Sep 2013 02:45:09 +0300 Subject: [PATCH] emulator/bthost: Use right CID for LE signaling --- emulator/bthost.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/emulator/bthost.c b/emulator/bthost.c index 5e3a1868b..2c96bc507 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); -- 2.11.0