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

NimBLEExtAdvertisingCallbacks don't expose onResult like BLEExtAdvertisingCallbacks #721

Open
git-78 opened this issue Sep 19, 2024 · 1 comment

Comments

@git-78
Copy link

git-78 commented Sep 19, 2024

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?

@h2zero
Copy link
Owner

h2zero commented Sep 19, 2024

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:

class scanCallbacks: public NimBLEScanCallbacks {

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