Closed prasad-alatkar closed 4 years ago
I found this as well, currently testing a fix in my own fork. works for my purposes. You can see it here
@h2zero your proposed solution may avoid this issue when "Bonding" is not enabled, but the issue will eventually pop-up in case of bonding is enabled (i.e. ble_hs_cfg.sm_bonding = 1
).
@prasad-alatkar Yes, you are correct. It was just a quick patch to get by while developing the cpp library to avoid that error. Didn’t want to do any big changes to the NimBLE core code yet.
I do not think we should store cccd data if not bonding though, maybe a combination of my fix and a proper round robin cccd store patch?
This is fixed. Closing.
In cases where CCCDs are exceeding
MYNEWT_VAL(BLE_STORE_MAX_CCCDS)
(overflow event), we can end up in continuous while loop.Whenever
BLE_STORE_EVENT_OVERFLOW
is called in store callback, if we do not have any previously bonded peer,ble_gap_unpair_oldest_peer
will return0
without deleting any CCCD. This in turn results in continuous while loop inble_store_write
as it will continuously end up callingBLE_HS_ESTORE_CAP
evwnt.