From b05fb44583e0b2da3f070114a8325dc070fbff53 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 10 Sep 2014 21:27:09 +0300 Subject: [PATCH] monitor: Add SMP over BR/EDR decoding --- monitor/l2cap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 47fb3bc43..6d9b1ce7e 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -676,6 +676,7 @@ static struct { { 0x0004, "Attribute Protocol" }, { 0x0005, "L2CAP Signaling (LE)" }, { 0x0006, "Security Manager" }, + { 0x0007, "Security Manager (BR/EDR)" }, { 0x003f, "AMP Test Manager" }, { } }; @@ -2661,8 +2662,9 @@ static void smp_packet(uint16_t index, bool in, uint16_t handle, opcode_str = "Unknown"; } - print_indent(6, opcode_color, "SMP: ", opcode_str, COLOR_OFF, - " (0x%2.2x) len %d", opcode, size - 1); + print_indent(6, opcode_color, cid == 0x0006 ? "SMP: " : "BR/EDR SMP: ", + opcode_str, COLOR_OFF, " (0x%2.2x) len %d", + opcode, size - 1); if (!opcode_data || !opcode_data->func) { packet_hexdump(data + 1, size - 1); @@ -2709,6 +2711,7 @@ static void l2cap_frame(uint16_t index, bool in, uint16_t handle, le_sig_packet(index, in, handle, cid, data, size); break; case 0x0006: + case 0x0007: smp_packet(index, in, handle, cid, data, size); break; default: -- 2.47.3