Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleteAllBonds() not properly cleaning up space in NVS #155

Open
finger563 opened this issue May 3, 2024 · 3 comments
Open

deleteAllBonds() not properly cleaning up space in NVS #155

finger563 opened this issue May 3, 2024 · 3 comments

Comments

@finger563
Copy link

finger563 commented May 3, 2024

I've noticed (on esp-idf v5.2.1) that the ble_store_clear() doesn't work as expected - I still get too many bonded device errors even though every time i enter pairing mode I call NimBLEDevice::deleteAllBonds().

With logs enabled:
image

Originally posted by @finger563 in #5 (comment)

@h2zero
Copy link
Owner

h2zero commented May 3, 2024

That would be an upstream issue. Espressif probably changed something in the NimBLE code and broke it.

@finger563
Copy link
Author

FWIW i've found that manually deleting the bonds 1-1 is a better approach for now, though it does sometimes actually return errors. Currently the NimBLEDevice::deleteAllBonds() does not return any error code (though it could since the underlying call does). Perhaps I'll make a PR for that to help track errors.

Some of my testing can be seen here:
esp-cpp/espp#225

@finger563
Copy link
Author

Somewhat related, it can be useful to see the return code from the underlying ble_store_clear(), so I've made a PR: #158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants