Skip to content

Commit c803b1e

Browse files
lylezhu2012fabiobaltieri
authored andcommitted
Samples: Bluetooth: HF: Fix link key missing issue
The bonding info is not loaded after the Bluetooth initialization again. Call settings_load after the Bluetooth initialized. Signed-off-by: Lyle Zhu <[email protected]>
1 parent 276dc8c commit c803b1e

File tree

1 file changed

+5
-0
lines changed
  • samples/bluetooth/handsfree/src

1 file changed

+5
-0
lines changed

samples/bluetooth/handsfree/src/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <zephyr/bluetooth/bluetooth.h>
1818
#include <zephyr/bluetooth/conn.h>
1919
#include <zephyr/bluetooth/classic/hfp_hf.h>
20+
#include <zephyr/settings/settings.h>
2021

2122
static void connected(struct bt_conn *conn)
2223
{
@@ -88,6 +89,10 @@ static void bt_ready(int err)
8889
return;
8990
}
9091

92+
if (IS_ENABLED(CONFIG_SETTINGS)) {
93+
settings_load();
94+
}
95+
9196
printk("Bluetooth initialized\n");
9297

9398
err = bt_br_set_connectable(true);

0 commit comments

Comments
 (0)