h2zero / esp-nimble-cpp

C++ library for the esp32 NimBLE stack based on and mostly compatible with @nkolban cpp_utils BLE library.
https://h2zero.github.io/esp-nimble-cpp/
Apache License 2.0
171 stars 60 forks source link

driver error on Windows #137

Open 13Pixel opened 11 months ago

13Pixel commented 11 months ago

Hello, I'm having some issues with HID and windows. On Linux everything work fine.

I modified Simple ble server example and added NimBLEHIDDevice. Problem is that on Windows I get driver error, on this bluetooth device.

Does anyone had similar issues?

Thanks.

thomasMEBaker commented 8 months ago

@13Pixel - I am experiencing the same issue. Did you find a fix for this?

13Pixel commented 8 months ago

Unfortunately no, Couldn't find way to fix this, so put it on hold till I'll have time to figure it out.

h2zero commented 8 months ago

Do you have bonding enabled? I believe it's a requirement in windows.

thomasMEBaker commented 8 months ago

As in "Persist the BLE Bonding keys in NVS" within the Nimble Options?

h2zero commented 4 months ago

You should enable that as well as set the device to bond by calling NimBLEDevice::setSecurityAuth(true, false, true); You'll also need to call NimBLEDevice::startSecurity in the on connect callback or set the characteristic properties to require encryption.