T-vK / ESP32-BLE-Keyboard

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

Arduino Nano ESP32 Not Supported in 0.3.2 #292

Open Klazen108 opened 2 months ago

Klazen108 commented 2 months ago

Device: Arduino Nano ESP32 Version: 0.3.2-beta Testing System: Macbook Pro M3 (Apple Silicon)

Minimal Reproduction Code:

#include <BleKeyboard.h>
BleKeyboard bleKeyboard("Test Device");

void setup() {
  bleKeyboard.begin()
}

void loop() {
  if (bleKeyboard.isConnected()) {
    bleKeyboard.print("Hello World");
  }
  delay(3000);
}

When using this library, I am able to compile and run my application. The device shows up in bluetooth devices, and I can connect to it. While debugging, I can see that the device successfully connects (bleKeyboard.isConnected() returns true). However, functions such as press(), release(), and print() do not send anthing to the host computer. getWriteError() returns no error.

Solution: use version 0.2.3 - In this version, everything works successfully!

I may try to dive into the code and review the differences between 0.3.2 and 0.2.3 to see what resulted in the loss of functionality, but am still a newbie in this space. But in case anyone else runs into this issue, I wanted to report that downgrading to 0.2.3 does let things work correctly.

I assume there is something in the Arduino Nano ESP32 device that is different from other ESP32 devices, since I wasn't able to find much specifically for this device.