Open sergiutigu opened 3 months ago
If you need to delete the service information within the NVS, you can use the API esp_ble_gattc_cache_clean.
The issue here is that can only be applied if you BLE stack is running. But the need to deleted the nvs namespace is coming from the need to perform a factory setting of the device. This must be implemented regardless of the state of the BLE stack. What i am saying that there is a missing functioanlity in the BLE stack, and that is blocking us to implement factory settings, Till now we could avoid it but not on the new platform.
is there any input that is expected from my side on this matter?
@sergiutigu "The issue is that this can only be applied if your BLE stack is running. You are correct.
Could you describe your use case? Why do you need to use this related API when the BLE stack is not running?"
we need to perform a factory settings. This can happen while the BT are running or not. Also we have 2 version of factory settings: BT Factory Settings/Wifi Factory Settings. So we need to be able to clear "all BT specific only" nvs files, whiteout affecting the Wifi information stored in flash while BT service are off. Factory settings performs a reset, and we do not have time to start the BT stack before the reset comes. We only have time to delete files, namespace from nvs space.
.Based on the Bluedroid host architecture, the GATTC cache can only be cleared after Bluedroid has been initialized. We do not currently support this method. Please consider alternative approaches.clear the corresponding GATTC cache after initialization.
Answers checklist.
IDF version.
v4.3
Espressif SoC revision.
ESP32
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
custom board
Power Supply used.
USB
What is the expected behavior?
when the configured namespace that stores the bonding information for a particular device is deleted , the cached service information to be also deleted.
What is the actual behavior?
when the configured namespace that stores the bonding information for a particular device is deleted , the cached service information is not deleted. and there is no way of deleting that, except deleting the entire partition, which we can't do since we have data than we don't want to loose.
Steps to reproduce.
Debug Logs.
No response
More Information.
No response