From 468ed2e989bfb80ce198ef21cab51a6e1be85f2c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 3 Mar 2016 12:21:44 +0200 Subject: [PATCH] Bluetooth: ATT: Handle Confirmations This adds the callback necessary to parse Confirm PDU: < ACL Data TX: Handle 3585 flags 0x00 dlen 8 ATT: Handle Value Indication (0x1d) len 3 Handle: 0x001d Data: 00 > ACL Data RX: Handle 3585 flags 0x02 dlen 5 ATT: Handle Value Confirmation (0x1e) len 0 Change-Id: I870058150f27718541eae959dcd5d9d7c6414ad3 Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/att.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/bluetooth/att.c b/net/bluetooth/att.c index 351d86929a6..b19278cb34a 100644 --- a/net/bluetooth/att.c +++ b/net/bluetooth/att.c @@ -1492,6 +1492,13 @@ static uint8_t att_indicate(struct bt_att *att, struct net_buf *buf) return 0; } +static uint8_t att_confirm(struct bt_att *att, struct net_buf *buf) +{ + BT_DBG(""); + + return att_handle_rsp(att, buf->data, buf->len, 0); +} + static const struct { uint8_t op; uint8_t (*func)(struct bt_att *att, struct net_buf *buf); @@ -1543,6 +1550,7 @@ static const struct { sizeof(struct bt_att_notify) }, { BT_ATT_OP_INDICATE, att_indicate, sizeof(struct bt_att_indicate) }, + { BT_ATT_OP_CONFIRM, att_confirm, 0 }, { BT_ATT_OP_WRITE_CMD, att_write_cmd, sizeof(struct bt_att_write_cmd) }, { BT_ATT_OP_SIGNED_WRITE_CMD, att_signed_write_cmd,