From 19e45ba50d571a6581de60bd9eadc1a754c9e349 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 7 Jun 2013 12:18:45 +0700 Subject: [PATCH] monitor: Add HCI LTK request negative reply command decoding --- monitor/bt.h | 5 +++++ monitor/packet.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/monitor/bt.h b/monitor/bt.h index 1de9b8bc9..7c4cafcc8 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -975,6 +975,11 @@ struct bt_hci_cmd_le_ltk_req_reply { uint8_t ltk[16]; } __attribute__ ((packed)); +#define BT_HCI_CMD_LE_LTK_REQ_NEG_REPLY 0x201b +struct bt_hci_cmd_le_ltk_req_neg_reply { + uint16_t handle; +} __attribute__ ((packed)); + #define BT_HCI_CMD_LE_READ_SUPPORTED_STATES 0x201c struct bt_hci_rsp_le_read_supported_states { uint8_t status; diff --git a/monitor/packet.c b/monitor/packet.c index 7708c3026..f964b92d0 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -3725,6 +3725,13 @@ static void le_ltk_req_reply(const void *data, uint8_t size) } +static void le_ltk_req_neg_reply(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_le_ltk_req_neg_reply *cmd = data; + + print_handle(cmd->handle); +} + static void le_read_supported_states_rsp(const void *data, uint8_t size) { const struct bt_hci_rsp_le_read_supported_states *rsp = data; @@ -4232,7 +4239,8 @@ static const struct opcode_data opcode_table[] = { le_start_encrypt, 28, true }, { 0x201a, 225, "LE Long Term Key Request Reply", le_ltk_req_reply, 18, true }, - { 0x201b, 226, "LE Long Term Key Request Neg Reply" }, + { 0x201b, 226, "LE Long Term Key Request Neg Reply", + le_ltk_req_neg_reply, 2, true }, { 0x201c, 227, "LE Read Supported States", null_cmd, 0, true, le_read_supported_states_rsp, 9, true }, -- 2.47.3