Diff between 24e9f567b4f1841567022de47c749e36cb56b546 and f8161ebd47022ee62ce4e5e33dc6e3242f47cbfc

Changed Files

File Additions Deletions Status
monitor/l2cap.c +8 -1 modified

Full Patch

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index 102b7ae..822ebd5 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"		},
 	{ }
 };