T-vK / ESP32-BLE-Keyboard

Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
2.28k stars 379 forks source link

Problems with .begin() and .end() using an ESP32-WROOM #249

Closed EmaB4r closed 10 months ago

EmaB4r commented 10 months ago

Hi everyone!

I'm currently working on converting an old keyboard from DIN-5 to BLE and I'm having issues connecting my ESP to my laptop via BLE (Asus TUF Gaming).

now I'll explain what problems I've encountered and what I found.

Basically when I connect the ESP to the pc for the "first time" the pc recognises the board as a keyboard, connects to it and everything works fine. But if I reset or turn off the ESP everything stops working. The ESP connects to the pc, but if i press some keys on the keyboard nothing happens and i can't manage get it working or to even disconnect it from the pc.

after some research i found this Now before shutting down the ESP i have to press a key, that calls the function .end() that now actually closes the BLE communication, and then manually removing the ESP from the devices associated to the pc; then turn on the ESP and associate it to the pc.

I'm using the latest release of the bleKeyboard

I apologize if I explained the issue in a confused way

EDIT BECAUSE I'M DUMB: After realising I'm using not the actual latest library I tried downloading version 0.3.2 beta and now the issue is gone.