-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
extmod/modbluetooth: Add gap_unpair command. #7845
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7845 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21943 21943
=======================================
Hits 21623 21623
Misses 320 320 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
de857fc
to
ae8b7f9
Compare
97e6a24
to
ccb33c3
Compare
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
01fc245
to
0999f14
Compare
Code size report:
|
d47ac80
to
6d2bb53
Compare
This function deletes the pairing details from the DB on both the application and the radio, so can be used to free up IRK slots. Tests included for both single-device interface validation and multi-device pairing/unpairing scenarios with real bond keys. Signed-off-by: Andrew Leech <[email protected]>
This function deletes the pairing details from the DB on both the application and the radio, so can be used to free up IRK slots on the radio.
Note: this only works on nimble as pairing/bonding has not been fully implemented on other stacks.
Background
In my application, we have a stm327f765 chip running micropython, with a build of the official nimble uart/hci application running on a separate nrf52810 (https://github.com/apache/mynewt-nimble/tree/master/apps/blehci)
We use this with aioble and paring/bonding.
It's been found that this nimble hci radio only has buffer/storage for 4 RPA / IRK addressing lookups, so if you've got more devices than this stored in the pairing/bonding database, any new devices that come along and try to pair/bond seem to work initially, but upon disconnect/reconnect the pairing details are lost.
Also, if you've got more devices than this stored in the bond database, with the current inplementation of aioble the fact these are stored in a dict/json file means the order is not strictly controlled, so you can't know for certain which devices keys will be loaded first/last into the radio - which ever ones don't fit can fail to connect correctly.
As part of work to provide some control over this issue by allowing an application to limit the number of devices bonded, this gap_unpair() function is needed to remove keys from the ble stack / radio.