From f8161ebd47022ee62ce4e5e33dc6e3242f47cbfc Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 7 Jun 2013 12:38:35 +0700 Subject: [PATCH] monitor: Add ATT write command decoding support --- monitor/l2cap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 102b7ae6c..822ebd599 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -1781,6 +1781,12 @@ static void att_handle_value_conf(const struct l2cap_frame *frame) { } +static void att_write_command(const struct l2cap_frame *frame) +{ + print_field("Handle: 0x%4.4x", bt_get_le16(frame->data)); + print_hex_field(" Data", frame->data + 2, frame->size - 2); +} + struct att_opcode_data { uint8_t opcode; const char *str; @@ -1834,7 +1840,8 @@ static const struct att_opcode_data att_opcode_table[] = { att_handle_value_ind, 2, false }, { 0x1e, "Handle Value Confirmation", att_handle_value_conf, 0, true }, - { 0x52, "Write Command" }, + { 0x52, "Write Command", + att_write_command, 2, false }, { 0xd2, "Signed Write Command" }, { } }; -- 2.47.3