From 1c40b964a0a2cf4af55a273e172db76cc75487ec Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 9 Nov 2016 22:27:51 +0200 Subject: [PATCH] Bluetooth: Dump the content of unhandled events as hex This should be particularly useful with the recently added controller assert functionality that causes vendor events with debug information. Change-Id: Ied0df2ff414e08c11a73cca0afba4dc04b0b8625 Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/hci_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 82aa7ea7593..7cfa5d12a34 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -2615,7 +2615,8 @@ static void hci_le_meta_event(struct net_buf *buf) le_adv_report(buf); break; default: - BT_DBG("Unhandled LE event 0x%02x", evt->subevent); + BT_WARN("Unhandled LE event 0x%02x len %u: %s", + evt->subevent, buf->len, bt_hex(buf->data, buf->len)); break; } } @@ -2705,7 +2706,8 @@ static void hci_event(struct net_buf *buf) hci_le_meta_event(buf); break; default: - BT_WARN("Unhandled event 0x%02x", hdr->evt); + BT_WARN("Unhandled event 0x%02x len %u: %s", hdr->evt, + buf->len, bt_hex(buf->data, buf->len)); break; }