NimBLE: Failed to restore IRKs from store
Posted: Thu Oct 26, 2023 3:46 pm
I am trying to persists BLE pairing with NimBLE. Bonding perists if I restart the phone application but does not persists over ESP reset and I get the following error message:
Any help is appreciated
Code: Select all
NimBLE: Failed to restore IRKs from store; status=8
- ESP-IDF version is: 5.1.1
- "Persist the BLE Bonding keys in NVS" is enabled in menuconfig
Code: Select all
ble_hs_cfg.sm_io_cap = BLE_SM_IO_CAP_NO_IO;
ble_hs_cfg.sm_mitm = true;
ble_hs_cfg.sm_sc = true;
ble_hs_cfg.sm_bonding = true;
ble_hs_cfg.sm_our_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;
ble_hs_cfg.sm_their_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;