BleKeyboard and Android issues

Hi team, I have this very simple sketch (see below) aimed to continuously send a sequence of characters "RGB" from an ESP32C3 board to an Android device. The sketch works fine when I connect to an Apple device (mac or phone) but on Android sometimes it works and most often it doesn't.
In order to test the sketch I just pair the board with the target device using the operating system BlueTooth pairing tool and then open any note taking application which should receive the R, G and B characters for ever, but as I said most of the times nothing is received even after unpairing and pairing the board...
Any hints of what am I missing?
Any help will be greatly appreciated, I have been hiding my head for two days now....

#include <BleKeyboard.h>

BleKeyboard bleKeyboard("BT_Referi2");

void setup() {
   
  bleKeyboard.begin();
  delay (5000); 
  
}

void loop() {

  if(bleKeyboard.isConnected()) {
  bleKeyboard.print("R");
  delay(5000);
  }

  if(bleKeyboard.isConnected()) {
  bleKeyboard.print("G");
  delay(5000);
  }

  if(bleKeyboard.isConnected()) {
  bleKeyboard.print("B");
  delay(5000);
  }
 
 
}

Currently there are 142 open issues on GitHub, so I think it would be fair to say that this library has problems. Have a look through the list to see if any match your particular hardware.

1 Like

For completeness, have you tried a Windows device? Raspberry Pi? Other?

Scroll down to "Enabling Bluetooth Debug on Android"

Many thanks for your reply, I was afraid there could be issues with the library itself. Regards

@awneil many thanks for your input, I would like to contact you in order to explore how Argenox could help. Could you please contact me in private? Regards

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.