NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Issue with deleting bonded peer address

Open EduardGub opened this issue 2 years ago • 3 comments

Hi,

Background: Im using a custom board with ESP32-WROOM-32D and Arduino framework (using platformio), operating as a BLE central device.

Issue: When trying to delete a specific bonded peer (by its address) using NimBLEDevice::deleteBond([peerAddress]), the function returns true meaning success. BUT upon requesting the number of bonds available using NimBLEDevice::getNumBonds() the returned value remains unchanged as been prior to deleteBond function. Checking for NimBLEDevice::IsBonded([peerAddress]) AFTER deleting bond also returns true meaning the address is still bonded.

Note: I'm not having any other issues with connecting or communicating with peripherals.

Specific versions: framework-arduinoespressif32 @ 3.20009.0 (2.0.9) NimBLE-Arduino @ 1.4.1

EduardGub avatar Aug 10 '23 13:08 EduardGub

Thanks, I'll try to reproduce this.

h2zero avatar Aug 12 '23 17:08 h2zero

Some additional information: It seems like the NimBLEDevice::deleteAllBonds() functions does the job but deletes all bonds even the ones I'm still interested in keeping. I've glanced through both "deleteAllBonds" and "deleteBond" functions and it looks like both functions perform different operation for deleting a bond. I guess the issue is related to that?

EduardGub avatar Aug 20 '23 10:08 EduardGub

This may be an issue with the underlying nimble core. I'll have a look into it when I can.

h2zero avatar Aug 21 '23 00:08 h2zero