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

NimBLEExtAdvertisingCallbacks don't expose onResult like BLEExtAdvertisingCallbacks

Open git-78 opened this issue 1 year ago • 1 comments
trafficstars

Hi, I was attempting to replace the core Bluetooth lib by NimBLE which looks excellent. My code is doing BLE scan and runs fine with Espressif's Bluetooth lib. But it cannot compile with NimBLE, as it implements BLEExtAdvertisingCallbacks.onResult(esp_ble_gap_ext_adv_report_t device) - see line 146 in https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/src/BLEAdvertisedDevice.h . Yet this method doesn't exist in NimBLEExtAdvertisingCallbacks, which exposes two other methods (onScanRequest and onStopped) that BLEExtAdvertisingCallbacks does not.

Am I missing something? Can anyone help?

git-78 avatar Sep 19 '24 19:09 git-78

The extended advertising components of this library were developed separately from the core BLE library so this is not exactly backward compatible in that area. What I think you are looking for is shown in the example here: https://github.com/h2zero/NimBLE-Arduino/blob/e2369bb380ad0fb57e8c9de94e2432a441b2a45c/examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino#L41

h2zero avatar Sep 19 '24 23:09 h2zero