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 <lyle.zhu@nxp.com>
This commit is contained in:
parent
276dc8c138
commit
c803b1e1f4
|
@ -17,6 +17,7 @@
|
|||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/conn.h>
|
||||
#include <zephyr/bluetooth/classic/hfp_hf.h>
|
||||
#include <zephyr/settings/settings.h>
|
||||
|
||||
static void connected(struct bt_conn *conn)
|
||||
{
|
||||
|
@ -88,6 +89,10 @@ static void bt_ready(int err)
|
|||
return;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_SETTINGS)) {
|
||||
settings_load();
|
||||
}
|
||||
|
||||
printk("Bluetooth initialized\n");
|
||||
|
||||
err = bt_br_set_connectable(true);
|
||||
|
|
Loading…
Reference in a new issue