Hello -
This is a follow-up on this topic that covers persistent storage of the keys required to maintain device bonds across ESP32 reboots:
viewtopic.php?t=13049
Simple question: Where is the code that reads and writes the persistent data? Looking at the ble_hs_cfg store callbacks and reading through the ESP-IDF NimBLE port, I wasn't able to find the code. Presumably there are functions that read/write NVS to store the keys and associated data. The sample apps only set the store_status_cb to ble_store_util_status_rr, which I believe is called when there is insufficient storage.
Thanks,
Brian
NimBLE - where is code that manages persistent bonding
Re: NimBLE - where is code that manages persistent bonding
Hi Brian, you can find this code section in: components/bt/host/nimble/nimble/nimble/host/store.
In this directory, there are different implementations of storing configuration, including the NVS way that the ESP32 implements, you can find specifically this implementation in: store/config/src/ble_store_nvs.c, the configuration of the read and write memory callbacks are implemented locally in this file.
Please let me know if this information was useful to you
Felipe
In this directory, there are different implementations of storing configuration, including the NVS way that the ESP32 implements, you can find specifically this implementation in: store/config/src/ble_store_nvs.c, the configuration of the read and write memory callbacks are implemented locally in this file.
Please let me know if this information was useful to you
Felipe
Re: NimBLE - where is code that manages persistent bonding
Felipe -
Thank you for the helpful answer. That is what I was looking for.
Regards,
Brian
Thank you for the helpful answer. That is what I was looking for.
Regards,
Brian
Re: NimBLE - where is code that manages persistent bonding
Glad that I could help.
Cheers.
Cheers.
Who is online
Users browsing this forum: No registered users and 106 guests