ESP32-BLE-Keyboard icon indicating copy to clipboard operation
ESP32-BLE-Keyboard copied to clipboard

How to configure for NimBLE

Open mpeill opened this issue 1 year ago • 3 comments

I'm a relative Newbie so may be simple. I've uncommented the #define USE_NIMBLE at the start of BleKeyboard.h, and installed the NimBLE-Arduino library, but get errors when compiling, the first two being:

In file included from D:\Malcolm\Documents\Arduino\libraries\ESP32-BLE-Keyboard\BleKeyboard.cpp:16: D:\Malcolm\Documents\Arduino\libraries\ESP32-BLE-Keyboard\BleKeyboard.h:15:36: error: 'NimBLEHIDDevice' does not name a type; did you mean 'NimBLEDevice'? #define BLEHIDDevice NimBLEHIDDevice ^~~~~~~~~~~~~~~ D:\Malcolm\Documents\Arduino\libraries\ESP32-BLE-Keyboard\BleKeyboard.h:110:3: note: in expansion of macro 'BLEHIDDevice' BLEHIDDevice hid; ^~~~~~~~~~~~*

And more errors, but assuming they may all resolve after fixing the first, any thoughts on what I've missed?

mpeill avatar Oct 18 '23 09:10 mpeill

I am having the same issue. No idea how to fix it..

raduprv avatar Oct 29 '23 20:10 raduprv

Ok, so I found the fix! Do NOT use the release zip. Instead, just get the cpp and h file from github and use them instead.

raduprv avatar Oct 30 '23 00:10 raduprv

Ah, that did it, thanks so much. I thought it was just my inexperience. Perhaps the owner of this could repack the zip file !! Works great now. Thanks again raduprv.

mpeill avatar Oct 30 '23 15:10 mpeill