Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
BLE: Added call to delete the security database object upon SM reset. #11831
This patch deletes the security database object upon calling
Resolves #11768 (for now...)
Summary of change (What the change is for and why)
Previously, there was no normal method to have the security manager close the security database file (if using a file-based security database, as the Mbed SM does if not using a volatile, RAM-based database).
In some cases, this prevented the file from ever being fully flushed to flash if using a block device or filesystem that buffers write operations. The result of this was that for some applications/targets there was no official way to get BLE bonding persistence to work.
This fix allows the file to be closed by the OS and flushed to disk upon calling
Users should note that if calling
Documentation (Details of any document updates required)
See issue #11768 for details.
Pull request type (required)
Test results (required)
I identified the problem and fix through the following method:
Tested on target:
1.) Upon startup, application initializes
Release Notes (required for feature/major PRs)
Summary of changes
Impact of changes
Migration actions required
This fix is pretty much a workaround for the situation described above. However, after reviewing the SecurityManager API a bit more in detail I think there are some ways that it could be improved and made more flexible. We should start a discussion on future improvements to the BLE SM API presented by Mbed.
I have started a forum post here: https://os.mbed.com/forum/bugs-suggestions/topic/36266/