From bc47bce39bc1107600b2b34cbc53938d091e6b8f Mon Sep 17 00:00:00 2001 From: Mark Wang Date: Mon, 21 Apr 2025 13:47:14 +0800 Subject: [PATCH] bluetooth: handsfree: improve the cod print string cod is three bytes, print it as 6 hex values. Signed-off-by: Mark Wang --- samples/bluetooth/handsfree_ag/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bluetooth/handsfree_ag/src/main.c b/samples/bluetooth/handsfree_ag/src/main.c index 0adbc951595..a5f67af8512 100644 --- a/samples/bluetooth/handsfree_ag/src/main.c +++ b/samples/bluetooth/handsfree_ag/src/main.c @@ -236,7 +236,7 @@ static void discovery_timeout_cb(const struct bt_br_discovery_result *results, s for (i = 0; i < count; i++) { bt_addr_to_str(&results[i].addr, addr, sizeof(addr)); - printk("Device[%d]: %s, rssi %d, cod 0x%X%X%X", i, addr, results[i].rssi, + printk("Device[%d]: %s, rssi %d, cod 0x%02x%02x%02x", i, addr, results[i].rssi, results[i].cod[0], results[i].cod[1], results[i].cod[2]); major_device = (uint8_t)BT_COD_MAJOR_DEVICE_CLASS(results[i].cod);