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

NimBLE and BLE are not currently compatible.

Open zawatse opened this issue 1 year ago • 3 comments

Hello, Im using this library to create a custom game controller. Im also using the BLE lib in the same project to allow the controller to function as a keyboard. I need to implement a workaround currently, because NimBLE-Arduino\src\NimBLEHIDDevice.h and BLE\src\BLEHIDDevice.h use the same symbol in the #ifndef, BLEHIDDEVICE_H. My suggestion is to change this symbol in the NimBLE-Arduino lib to NIMBLEHIDDEVICE_H, or something else, to allow these libs to be compatible. I tried to push this change to the repo in a branch, but I dont have the right permissions.

zawatse avatar Nov 30 '23 17:11 zawatse

This is interesting, I'm not understanding why you need to use both libraries. Is there something missing in NimBLE that has been overlooked?

h2zero avatar Nov 30 '23 19:11 h2zero

Our use case evolved over time. It's possible we could switch to using NimBLE for both the keyboard and gamepad "modes" for our device, but our code originally only used the BLE lib, and we added use of NimBLE later for the gamepad mode. In your readme you mention that "this library is intended to be compatible with the original ESP32 BLE functions," so I was thinking this could be a useful change (regardless of if it is still necessary for our case), but just a suggestion.

zawatse avatar Dec 03 '23 22:12 zawatse

To be honest I'm quite surprised this even compiles, I will consider making this change in the near future, thanks.

h2zero avatar Dec 04 '23 13:12 h2zero