Diff between ba2e12f69a5f08dcaf8e447179c9cd906a257b02 and 88fad37e7f35dad15e663cb453ec87b2514d4dbd

Changed Files

File Additions Deletions Status
monitor/l2cap.c +21 -0 modified

Full Patch

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index f48847a..7d52569 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -1563,6 +1563,27 @@ static void print_attribute_info(uint16_t type, const void *data, uint16_t len)
 	print_field("%s: %s (0x%4.4x)", "Attribute type", str, type);
 
 	switch (type) {
+	case 0x2800:	/* Primary Service */
+	case 0x2801:	/* Secondary Service */
+		print_uuid("  UUID", data, len);
+		break;
+	case 0x2802:	/* Include */
+		if (len < 4) {
+			print_hex_field("  Value", data, len);
+			break;
+		}
+		print_handle_range("  Handle range", data);
+		print_uuid("  UUID", data + 4, len - 4);
+		break;
+	case 0x2803:	/* Characteristic */
+		if (len < 3) {
+			print_hex_field("  Value", data, len);
+			break;
+		}
+		print_field("  Properties: 0x%2.2x", *((uint8_t *) data));
+		print_field("  Handle: 0x%2.2x", bt_get_le16(data + 1));
+		print_uuid("  UUID", data + 3, len - 3);
+		break;
 	default:
 		print_hex_field("Value", data, len);
 		break;