T-vK / ESP32-BLE-Keyboard

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

Everything works except for Android.. #167

Open creepscompilation opened 2 years ago

creepscompilation commented 2 years ago

Hello,

I have fully tested the following version of the ESP32-BLE-Keyboard library using an ESP32-S3 module and everything works GREAT, except for Android..

v0.2.3 v0.3.0 v0.3.1 v0.3.2

I confirmed the library versions prior to testing by removing the library completely, closing and opening the Arduino IDE, and installing the ESP32-BLE-Keyboard library clean.

Please let me know if I am doing something wrong here?

I am hoping that I am just doing something stupid, I am new to the Arduino IDE.

makerbitter commented 2 years ago

I have the same problem in some Android phones. The esp32 connect correctly but the keyboard keystrokes are not interpreted by the android phone

dailafing commented 1 year ago

I can confirm that I have the same problem. Used the Example file, the ESP32 is connecting and paired, but no keystrokes are being interpreted by Android. No idea why....

EDIT: In the Serial Monitor, I can see that the ESP32 is connected because the if statement is TRUE. Because I see "Sending Hello World. Followed by Waiting 5 seconds... And loops

#include <BleKeyboard.h>

BleKeyboard bleKeyboard;

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");
  bleKeyboard.begin();
}

void loop() {
  if(bleKeyboard.isConnected()) {
    Serial.println("Sending 'Hello world'...");
    bleKeyboard.print("Hello world");

    delay(1000);
    bleKeyboard.releaseAll();
  }

  Serial.println("Waiting 5 seconds...");
  delay(5000);
}
bertenvdb commented 1 year ago

Same here with v0.3.2 on Android 12.

sandman21vs commented 1 year ago

Oi estou exatamente com o mesmo problema, em me conectou com ele e no Pc funciona normalmente mas quando início no Android ele não manda as teclas que eu seleciono