From 17f15cd1a92742e99f3fa5c0ead3bd2d65200489 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 8 Nov 2024 17:41:55 +0100 Subject: [PATCH] Bluetooth: Host: ID: Log resolve list conflicts In case of conflicts when calling bt_id_find_conflict there was no way to easily determine what conflicted. This is a rare occurance, but has happened when testing against PTS. Signed-off-by: Emil Gydesen --- subsys/bluetooth/host/id.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/bluetooth/host/id.c b/subsys/bluetooth/host/id.c index 4e1313c5d2ce5..3a6fdf3ee28aa 100644 --- a/subsys/bluetooth/host/id.c +++ b/subsys/bluetooth/host/id.c @@ -974,6 +974,11 @@ void find_rl_conflict(struct bt_keys *resident, void *user_data) bt_irk_eq(&conflict->candidate->irk, &resident->irk)); if (addr_conflict || irk_conflict) { + LOG_DBG("Resident : addr %s and IRK %s", bt_addr_le_str(&resident->addr), + bt_hex(resident->irk.val, sizeof(resident->irk.val))); + LOG_DBG("Candidate: addr %s and IRK %s", bt_addr_le_str(&conflict->candidate->addr), + bt_hex(conflict->candidate->irk.val, sizeof(conflict->candidate->irk.val))); + conflict->found = resident; } }