Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)

ESP32 BLE Keyboard library

This library allows you to make the ESP32 act as a Bluetooth Keyboard and control what it does.
You might also be interested in:

Features

  • Send key strokes
  • Send text
  • Press/release individual keys
  • Media keys are supported
  • Read Numlock/Capslock/Scrolllock state
  • Set battery level (basically works, but doesn't show up in Android's status bar)
  • Compatible with Android
  • Compatible with Windows
  • Compatible with Linux
  • Compatible with MacOS X (not stable, some people have issues, doesn't work with old devices)
  • Compatible with iOS (not stable, some people have issues, doesn't work with old devices)

Installation

Example

/**
 * This example turns the ESP32 into a Bluetooth LE keyboard that writes the words, presses Enter, presses a media key and then Ctrl+Alt+Delete
 */
#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);

    Serial.println("Sending Enter key...");
    bleKeyboard.write(KEY_RETURN);

    delay(1000);

    Serial.println("Sending Play/Pause media key...");
    bleKeyboard.write(KEY_MEDIA_PLAY_PAUSE);

    delay(1000);
    
   //
   // Below is an example of pressing multiple keyboard modifiers 
   // which by default is commented out. 
   // 
   /* Serial.println("Sending Ctrl+Alt+Delete...");
    bleKeyboard.press(KEY_LEFT_CTRL);
    bleKeyboard.press(KEY_LEFT_ALT);
    bleKeyboard.press(KEY_DELETE);
    delay(100);
    bleKeyboard.releaseAll();
    */

  }
  Serial.println("Waiting 5 seconds...");
  delay(5000);
}

API docs

The BleKeyboard interface is almost identical to the Keyboard Interface, so you can use documentation right here: https://www.arduino.cc/reference/en/language/functions/usb/keyboard/

Just remember that you have to use bleKeyboard instead of just Keyboard and you need these two lines at the top of your script:

#include <BleKeyboard.h>
BleKeyboard bleKeyboard;

In addition to that you can send media keys (which is not possible with the USB keyboard library). Supported are the following:

  • KEY_MEDIA_NEXT_TRACK
  • KEY_MEDIA_PREVIOUS_TRACK
  • KEY_MEDIA_STOP
  • KEY_MEDIA_PLAY_PAUSE
  • KEY_MEDIA_MUTE
  • KEY_MEDIA_VOLUME_UP
  • KEY_MEDIA_VOLUME_DOWN
  • KEY_MEDIA_WWW_HOME
  • KEY_MEDIA_LOCAL_MACHINE_BROWSER // Opens "My Computer" on Windows
  • KEY_MEDIA_CALCULATOR
  • KEY_MEDIA_WWW_BOOKMARKS
  • KEY_MEDIA_WWW_SEARCH
  • KEY_MEDIA_WWW_STOP
  • KEY_MEDIA_WWW_BACK
  • KEY_MEDIA_CONSUMER_CONTROL_CONFIGURATION // Media Selection
  • KEY_MEDIA_EMAIL_READER

There is also Bluetooth specific information that you can set (optional): Instead of BleKeyboard bleKeyboard; you can do BleKeyboard bleKeyboard("Bluetooth Device Name", "Bluetooth Device Manufacturer", 100);. (Max lenght is 15 characters, anything beyond that will be truncated.)
The third parameter is the initial battery level of your device. To adjust the battery level later on you can simply call e.g. bleKeyboard.setBatteryLevel(50) (set battery level to 50%).
By default the battery level will be set to 100%, the device name will be ESP32 Bluetooth Keyboard and the manufacturer will be Espressif.
There is also a setDelay method to set a delay between each key event. E.g. bleKeyboard.setDelay(10) (10 milliseconds). The default is 8.
This feature is meant to compensate for some applications and devices that can't handle fast input and will skip letters if too many keys are sent in a small time frame.

NimBLE-Mode

The NimBLE mode enables a significant saving of RAM and FLASH memory.

Comparison (SendKeyStrokes.ino at compile-time)

Standard

RAM:   [=         ]   9.3% (used 30548 bytes from 327680 bytes)
Flash: [========  ]  75.8% (used 994120 bytes from 1310720 bytes)

NimBLE mode

RAM:   [=         ]   8.3% (used 27180 bytes from 327680 bytes)
Flash: [====      ]  44.2% (used 579158 bytes from 1310720 bytes)

Comparison (SendKeyStrokes.ino at run-time)

Standard NimBLE mode difference
ESP.getHeapSize() 296.804 321.252 + 24.448
ESP.getFreeHeap() 143.572 260.764 + 117.192
ESP.getSketchSize() 994.224 579.264 - 414.960

How to activate NimBLE mode?

ArduinoIDE:

Uncomment the first line in BleKeyboard.h

#define USE_NIMBLE

PlatformIO:

Change your platformio.ini to the following settings

lib_deps = 
  NimBLE-Arduino

build_flags = 
  -D USE_NIMBLE

Credits

Credits to chegewara and the authors of the USB keyboard library as this project is heavily based on their work!
Also, credits to duke2421 who helped a lot with testing, debugging and fixing the device descriptor! And credits to sivar2311 for adding NimBLE support, greatly reducing the memory footprint, fixing advertising issues and for adding the setDelay method.

Owner
I love writing (and contributing to) free open source software. I also love Linux, hardware-hacking and diy electronics.
null
Comments
  • NimBLE-Arduino (optional) and remove of xTaskCreate

    NimBLE-Arduino (optional) and remove of xTaskCreate

    NimBLE-Mode

    This implements NimBLE-Mode to reduce memory consumption ArduinoIDE: Before including the library, insert the line #define USE_NIMBLE

    #define USE_NIMBLE
    #include <BleKeyboard.h>
    

    PlatformIO: Change your platformio.ini to the following settings

    lib_deps = 
      NimBLE-Arduino
    
    build-flags = 
      -D USE_NIMBLE
    

    Comparison (SendKeyStrokes.ino at run-time)

    | | Standard | NimBLE mode | difference |---|--:|--:|--:| | ESP.getHeapSize() | 296.804 | 321.252 | + 24.448 | | ESP.getFreeHeap() | 143.572 | 260.764 | + 117.192 | | ESP.getSketchSize() | 994.224 | 579.264 | - 414.960 |

    xTaskCreate

    xTaskCreate was removed to fix stack issues.

  • Will the use of bleKeyboard work as a BT Remote Control  ?

    Will the use of bleKeyboard work as a BT Remote Control ?

    Hi, kind of off-topic but do you know if this solution would work as a BT Remote Control for my Satellite Receiver? I've not found any good articles yet how to simulate a BT Remote Control. Now, sat receivers and a lot of new tv's are sold with BT controllers rather than IR...

    In advance, thanx for any help/input.

  • iOS14.1 and iOS12.4.8 cannot find ESP32 BLE keyboard

    iOS14.1 and iOS12.4.8 cannot find ESP32 BLE keyboard

    I use M5StickC have Code include BleKeyboard.h. But they cannot find the device as ESP32 BLE keyboard. Win10 can find the device with Bluetooth. How iOS find the device with BleKeyboard?

    #include <M5StickC.h>
    #include <BleKeyboard.h>
    
    BleKeyboard bleKeyboard;
    
    enum ConfSystem {
      mic = 0,
      video
    } conf;
    int n_conf = 2;
    bool on_air;
    
    void setup() {
      M5.begin();
      bleKeyboard.begin();
    
      Serial.println("Webconf Mute button");
      Serial.println("Push Button A (M5) to toggle MUTE");
      Serial.println("Push Button B to switch VideoOn or VideoOFF");
      M5.Lcd.setRotation(3); // BtnA is left side to LCD
    
      // default
      conf = mic;
      on_air = true;
      update_display();
    }
    
    void loop() {
      M5.update();
      
      if(M5.BtnA.wasPressed()){
        Serial.println("BtnA was pressed");
        if(bleKeyboard.isConnected()){
          on_air = !on_air;
          if(conf==mic){
            send_mute_mic();
          }
          else if(conf==video){
          send_off_video();
          }
        }
        else {
          Serial.println("BLE is not connected");
        }
        update_display();
      }
    
      if(M5.BtnB.wasPressed()){
        Serial.println("BtnB was pressed");
        conf = ConfSystem((conf+1) % n_conf);
        Serial.print("New ConfSystem: ");
        Serial.println(conf);
        update_display();
      }
      delay(10);
    }
    
    void update_display(){
      Serial.println("update_display");
      Serial.print("On air?: ");
      Serial.println(on_air);
      if(on_air){
        show_onair();
      }
      else {
        show_inmute();
      }
    }
    
    void show_onair(){
      M5.Lcd.fillScreen(TFT_RED);
      M5.Lcd.setTextColor(TFT_WHITE, TFT_RED);
      M5.Lcd.setTextSize(3);
      M5.Lcd.setTextDatum(MC_DATUM);
      M5.Lcd.drawString("ON AIR",80,40);
    
      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextDatum(BR_DATUM);
      if(conf==mic){
        M5.Lcd.drawString("Mic",158,78);
      }
      else if (conf==video){
        M5.Lcd.drawString("Video", 158,78);  
      }
    }
    
    void show_inmute(){
      M5.Lcd.fillScreen(TFT_DARKGREY);
      M5.Lcd.setTextColor(TFT_WHITE, TFT_DARKGREY);
      M5.Lcd.setTextSize(3);
      M5.Lcd.setTextDatum(MC_DATUM);
      M5.Lcd.drawString("Muted...",80,40);
    
      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextDatum(BR_DATUM);
      if(conf==mic){
        M5.Lcd.drawString("Mic",158,78);
      }
      else if (conf==video){
        M5.Lcd.drawString("Video", 158,78);  
      }
    }
    
    void send_mute_mic(){
      // https://support.zoom.us/hc/en-us/articles/205683899-Hot-Keys-and-Keyboard-Shortcuts-for-Zoom
      // Command(⌘)+Shift+A: Mute/unmute audio
      Serial.println("Toggle Mic");
      bleKeyboard.press(KEY_LEFT_GUI);
      bleKeyboard.press(KEY_LEFT_SHIFT);
      bleKeyboard.press('a');
      delay(100);
      bleKeyboard.releaseAll();
    }
    
    void send_off_video(){
      // https://www.cisco.com/c/en/us/td/docs/collaboration/CWMS/2_5/b_manage_meetings/b_manage_meetings_chapter_0100.html
      Serial.println("Toggle Video");
      bleKeyboard.press(KEY_LEFT_GUI);
      bleKeyboard.press(KEY_LEFT_SHIFT);
      bleKeyboard.press('v');
      delay(100);
      bleKeyboard.releaseAll();
    }
    
  • Reason for xTaskCreate in BleKeyboard::begin()?

    Reason for xTaskCreate in BleKeyboard::begin()?

    Hello T-vK!

    I have forked your library to switch to the NimBLE-Arduino library to save memory. While editing I noticed that in the BleKeyboard::begin() function xTaskCreate is used. In the fork I removed this extra task and the library works fine.

    I wonder what is the reason for this extra task? Can you explain it to me in more detail?

  • Problem sending F13 to F24 keys.

    Problem sending F13 to F24 keys.

    Hi, I would like to report a problem sending the keys F13 to F24. I am able to send all the keys otherwise but these keys are not going through.

    I have just tested the key F13 and F6 specifically but have mentioned the 13 to 24 range as those are not the standard keys available on the keyboard.

    Also posting a link to a similar problem faced by other people using the standard keyboard.h library. https://forum.arduino.cc/index.php?topic=324554.0 In the post it is mentioned that the Arduino keyboard code falsely translates the keycodes that are sent via Keyboard.press() It also has a few solutions implemented by people for the usb keyboard.h library.

    Maybe that has something to do with this?

    Thanks

  • SNES Control

    SNES Control

    Sorry for my complete ignorance, I'm new to this world of Arduino and ESP32. I thought this work was great and I'm trying to adapt it for a SNES control. For each button on the control I am assigning a key, for button "A" on the control for example, assign the key "x" and sending this data via BLE to the computer with ZSNS. My problem seems to be in the timing, because when pressing a button on the control there is no instant response on the emulator, I have to press several times to enter the command. Was there a way to sync the keyboard input?

    Below my code.

    #include <BleKeyboard.h>

    BleKeyboard bleKeyboard;

    //define where your pins are const int dataPin = 21; // RED const int latchPin = 19; // YELLOW const int clockPin = 18; // BLUE const int intervalo = 250; // atraso entre leituras

    long buttonData, lastButtonData = 72; //01001000

    // On NES Controller there are only 8 buttons, also B, Y swap to A and B const int n_buttons = 12; char* buttons[] = {"B", "Y", "SELECT", "START", "UP", "DOWN", "LEFT", "RIGHT", "A", "X", "L_BUTTON", "R_BUTTON"};

    //Funções que serão chamadas por um array de pinteiros void Button_B() {/Serial.println("Apertou o B bruxo!!!!");/ bleKeyboard.print("z"); delay(intervalo);} void Button_Y(){/Serial.println("Apertou o Y bruxo!!!!");/ bleKeyboard.print("a"); delay(intervalo);} void Button_SELECT(){/Serial.println("Apertou o SELECT bruxo!!!!");/ bleKeyboard.write(KEY_RIGHT_SHIFT); delay(intervalo);} void Button_START(){/Serial.println("Apertou o START bruxo!!!!");/ bleKeyboard.write(KEY_RETURN); delay(intervalo);} void Button_UP(){/Serial.println("Apertou o UP bruxo!!!!");/ bleKeyboard.write(KEY_UP_ARROW); delay(intervalo);} void Button_DOWN(){/Serial.println("Apertou o DOWN bruxo!!!!");/ bleKeyboard.write(KEY_DOWN_ARROW); delay(intervalo);} void Button_LEFT(){/Serial.println("Apertou o LEFT bruxo!!!!");/ bleKeyboard.write(KEY_LEFT_ARROW); delay(intervalo);} void Button_RIGHT(){/Serial.println("Apertou o RIGHT bruxo!!!!");/ bleKeyboard.write(KEY_RIGHT_ARROW); delay(intervalo);} void Button_A(){/Serial.println("Apertou o A bruxo!!!!");/ bleKeyboard.print("x"); delay(intervalo);} void Button_X(){/Serial.println("Apertou o X bruxo!!!!");/ bleKeyboard.print("s"); delay(intervalo);} void Button_L_BUTTON(){/Serial.println("Apertou o L_BUTTON bruxo!!!!");/ bleKeyboard.print("d"); delay(intervalo);} void Button_R_BUTTON(){/Serial.println("Apertou o R_BUTTON bruxo!!!!");/ bleKeyboard.print("c"); delay(intervalo);}

    //Array com os ponteiro que chamará as funções void (*ButtonPointer[])(void) = {Button_B, Button_Y, Button_SELECT, Button_START, Button_UP, Button_DOWN, Button_LEFT, Button_RIGHT, Button_A, Button_X, Button_L_BUTTON, Button_R_BUTTON};

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

    //define pin modes pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, INPUT);

    //Cria a Task para ler os botões do controle SNES **************************************************** xTaskCreate( taskControleSNES, /* Task function. / "TaskControleSNES", / String with name of task. / 10000, / Stack size in bytes. / NULL, / Parameter passed as input of the task / 1, / Priority of the task. / NULL); / Task handle. / //***************************************************************************************************

    }

    void loop() { if(bleKeyboard.isConnected()) {

    //if (buttonData != lastButtonData){ lastButtonData = buttonData; //Print Raw Value of Registers //Serial.println(buttonData, BIN);

    // Print String in Button Name Array
    for (int n = 0; n < n_buttons; n++)
    {
      if (buttonData & (1 << n) ){
        //Serial.print(buttons[n]);
        ButtonPointer[n]();
        //Serial.print(", ");
      }
    }
    //Serial.println("\n-------------------");
    

    //}

    //delay(10);
      
    //bleKeyboard.releaseAll();
    

    } }

    void taskControleSNES( void * parameter ) {

    while(1){

    // Latch Signal
    

    digitalWrite(latchPin, HIGH); delayMicroseconds(12); digitalWrite(latchPin, LOW);

    int temp = 0; buttonData = 0; for (int i = 0; i < n_buttons; i++) { digitalWrite(clockPin, LOW); delayMicroseconds(0.2); temp = digitalRead(dataPin); // 0 Indicates button depressed for SNES controller if (!temp) { //temp = size_buttonData - i; buttonData = buttonData | ((long)1 << i); } digitalWrite(clockPin, HIGH); }

    //if (buttonData != lastButtonData){ //lastButtonData = buttonData; // Print Raw Value of Registers //Serial.println(buttonData, BIN);

    // Print String in Button Name Array
    

    /* for (int n = 0; n < n_buttons; n++) { if (buttonData & (1 << n) ){ Serial.print(buttons[n]); Serial.print(", "); } } Serial.println("\n-------------------"); */ //} delay(10); }

    vTaskDelete( NULL );

    }

  • #include

    #include "sdkconfig.h" file or directory not found

    Disclaimer: This may very well be due to the fact I'm still fairly new to using Arduino controllers and the IDE in general.

    I have the library is included in my project, but when I attempt to verify and upload I get the following error ...\Arduino\libraries\ESP32-BLE-Keyboard-0.1.0/BleConnectionStatus.h:3:10: fatal error: sdkconfig.h: No such file or directory.

    I am trying to upload to a Arduino MKR WiFi 1010 which uses an esp32 chip. I'm using IDE 1.8.8, and I have the esp32 board package version 1.0.4.

    Any help is appreciated.

  • Reconnecting Issue

    Reconnecting Issue

    Hello Everyone. I have an android Samsung note 20 phone. The problem that when I reconnect my esp32 to my phone it won't control it any more. I have to delete connected device, reconnect again, and then it starts to control. I have tried both libraries 0.3.0 and 0.3.1

    With library 0.2.3 everything works!

    Thank you!

  • Add small delay for writes

    Add small delay for writes

    For long strings, the write function skips a bunch of keys. This is on Windows 10, not sure if it affects other platforms or not.

    Adding few millisecond delay between the key press and release solved it for me. I'm happy to make changes/corrections to my PR if needed!

  • ESP32 BLE Scan and BLE Keyboard

    ESP32 BLE Scan and BLE Keyboard

    Hello,

    My task is to scan a Bluetooth and send a message to the monitor whenever the scanned Bluetooth device is found. For this purpose my ESP32 should act as a keyboard. Also I have an LED interfaced, that blinks whenever the Bluetooth is detected.

    I am able to scan and detect the bluetooth, and also blink the LED. But however when I tried to use BLEkeyboard, the loop isnot executed with the condition bleKeyboard.isConnected(). My questions are how do I know why this "if condition" is not satisfied and where can I read my bleKeyboard.print output? I have posted my code below, please help me with your inputs. Thank you.

    #include <BleKeyboard.h>

    /* Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleScan.cpp Ported to Arduino ESP32 by Evandro Copercini */

    #include <BLEDevice.h> #include <BLEUtils.h> #include <BLEScan.h> #include <BLEAdvertisedDevice.h>

    BleKeyboard bleKeyboard;

    String Address = "58:ba:01:ef:ba:12"; const int Pin = 2; int scanTime = 5; //In seconds static BLEAddress pServerAddress; BLEScan pBLEScan;

    class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { void onResult(BLEAdvertisedDevice advertisedDevice) { Serial.printf("Advertised Device: %s \n", advertisedDevice.toString().c_str()); if (advertisedDevice.getAddress().equals(*pServerAddress))
    { Serial.println("Device Match");
    digitalWrite (Pin, HIGH);
    advertisedDevice.getScan()->stop(); } // Found our server else { Serial.println("Device Mismatch"); digitalWrite (Pin, LOW); } } };

    void setup() { Serial.begin(115200); Serial.println("Scanning..."); Serial.println("Starting BLE Keyboard"); //Begin the BLE keyboard/start advertising the keyboard (so phones can find it) bleKeyboard.begin();

    pinMode(Pin, OUTPUT); pServerAddress = new BLEAddress(Address.c_str()); BLEDevice::init(""); pBLEScan = BLEDevice::getScan(); //create new scan pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster pBLEScan->setInterval(100); pBLEScan->setWindow(99); // less or equal setInterval value }

    void loop() { if (bleKeyboard.isConnected()) { Serial.println("Sending 'Hello world'..."); bleKeyboard.print("Hello world"); bleKeyboard.print(" "); pBLEScan->start(scanTime, false); pBLEScan->clearResults(); // delete results fromBLEScan buffer to release memory delay(2000); } }

  • Won't automatically reconnect after power up of ESP32

    Won't automatically reconnect after power up of ESP32

    The example works fine after pairing with my PC. However if my ESP32 is powered down and up then it doesn't work (keyboard commands sent from ESP32 don't work). According to COM port on Arduino messages are being sent and on the PC Bluetooth panel it shows it as connected but it doesn't work until I remove the Bluetooth pairing in the PC and re pair it again,, then its ok until the next power cycle.

    My PC has Bluetooth keyboard and mouse, which don't suffer the same problem. Is there anything I need to do to the code, or am I missing something? Cheers Ian

  • Adafruit SS1306 OLED library incompatablity

    Adafruit SS1306 OLED library incompatablity

    using the Adafruit SS1306 library in Arduino IDE Bricks the Bluetooth functionality, the computer does not detect the keyboard removing the OLED code solves the issue

    Thank you

  • Solution seems to Work..

    Solution seems to Work..

    RESOLVED: I took the advice from SunandMittal..

    Starting with release v0.3.2 filename = "BleKeyboard.cpp"

    Find this line: pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND);

    Replace the above line to the following from release v0.3.0 pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND);

    So, far.. Android connects, re-connects, keyboard codes work Apple iOS connects, re-connects, keyboard codes work Windows 10 connects, re-connects, keyboard codes work

  • Won't re-connect on Windows 10 after Power Cycle Off-On Release v0.3.0

    Won't re-connect on Windows 10 after Power Cycle Off-On Release v0.3.0

    I am in the final phase of testing and I have to use release v0.3.0 to get Android to work at all..

    So, with release v0.3.0, Android and Apple iOS work GREAT !!! On Windows 10 however, I can PAIR and Connect OK, and the BLE Keyboard works GREAT, until I reset the ESP32 module either power off-on, or boot button. After that, "isConnected" comes up as connected, but no keyboard data outputs to Windows 10.

    I am forced to UNPAIR the BLE keyboard from Windows 10, the PAIR again. This test is repeatable and confirmed. This probem does not exist with Android or Apple iOS, only Windows 10.

  • Everything works except for Android..

    Everything works except for Android..

    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.

  • Android compatibility issues and observations with 0.3.2/0.3.0 version

    Android compatibility issues and observations with 0.3.2/0.3.0 version

    Dear Sirs,

    I have been working on BLE Keyboard for last one week. Following are observations:

    1. In 0.3.0 verion, saved Bluetooth settings (in Windows or Android) does not reconnect on ESP32 reboot. We have to forget BLE and then pair again. This problem was eliminated in 0.3.2.

    2. But in 0.3.2: Android versions did not work well for me. It "Connects" but BLE keyboard is not enabled as input device. And no data comes on Android. I checked on Lenovo Tablet (android 10) and one android phone. This issue was not present in 0.3.0

    3. Gradually, I tried to undo changes in 0.3.2. Finally, with reverting Authentication code back to 0.3.0 the problem of (2) is eliminated: //pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND);

    I am not sure other bad impact of undoing this change.

    1. Still, there seems to be problem in Android 10 (Lenovo Tab): After first pairing, the BLE keyboard works well. It shows BLE keyboard as "Physical Keyboard" in conjunction with gboard in "Languages settings". And BLE keyboard data comes on Tablet inputs. But, after ESP32 reboot (or BT enable/disable), BLE keyboard is connected, but it does not take keyboard inputs. The keyboard icon is seen in Bluetooth settings. But it is not seen as "Physical Keyboard". This problem is not present in Android mobile phone. I believe this problem is related to specific version of Android 10 (which was latest available for given tablet).

    On windows 11, connect-reconnect or ESP32 reboot - all works neatly!

    1. Is there option to provide "PIN" for BLE Keyboard. In one of android Tablet version, the pairing failed as it said invalid PIN.

    2. If I change the BLE Keyboard name (KEYBOARD1 to KEYBOARD2): Android and Windows picks up connection of KEYBOARD2 (if KEYBOARD1 was stored). I believe the pairing information stores MAC address or other BT address/credentials. And KEYBOARD1/2 are just names for user?

    Thanks for wonderful library!

    Best regards, Sunand Mittal

  • Updating version?

    Updating version?

    I have not been able to get Android devices to work, Windows and Apple MacOS, iOS work well.

    I read that I should update the version, so I downloaded the latest version and added the library ZIP, however, Android still does not work.

    Android connects, but no keystrokes are received. Android seems to "pair" every time and never shows up under the "paired" device list.

    I cannot find this ESP32-BLE Keyboard listed in the library manager to confirm the current version. Question: How do I confirm the version number and correctly update the version?

    I apologize if this seems like simple question, but all other libraries I have installed show up in the library manager and I am able to confirm the version being used and install new versions.

Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth.

BluuBomb Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth. For a more detailed write-up see WRITEUP.md. Not to be confuse

Jun 11, 2022
Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.
Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

BluetoothJoystick Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

Feb 24, 2022
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE

INSTRUCTIONS - The codes for the Fingerprint Door lock are present in the Code For Fingerprint Door Lock folder The instructions of how to operate the

Mar 3, 2022
ESP32 S2 C++ host library compatible with arduino, esp-idf.

Info I would like to announce USB host library for esp32 S2 compatible with arduino, esp-idf and PIO (when pio will be updated to most recent esp-idf)

Jun 2, 2022
Adafruit GFX compatible arduino library for using cat thermal printers with the ESP32
Adafruit GFX compatible arduino library for using cat thermal printers with the ESP32

CatGFX This library offers a Adafruit GFX "driver" for ESP32 and the cheap cat (or rabbit?) BLE thermal printers like this one: For usage information

May 19, 2022
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

Jun 23, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

Feb 4, 2022
split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.
 split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.

split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support. This keyboar

May 10, 2022
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Raspberry Pi 400 as a USB HID Keyboard Hook your Pi 400 up to your PC somehow, using a USB Type-C cable into the power port. Anker make good ones- I u

Jun 17, 2022
Use Atari keyboard as USB keyboard with a Teensy 3.6
Use Atari keyboard as USB keyboard with a Teensy 3.6

Atari Keyboard Convert an Atari 600/800/1200 XL into a USB keyboard. I bricked my Atari mainboard. My goal is to use the keyboard of the Atari on a Ra

Dec 3, 2021
Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.
Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

May 6, 2022
Bluetooth low energy (BLE) tracker for ESP32

BLEcker Bluetooth low energy (BLE) tracker for ESP32 This software is written for ESP32 boards to track BLE devices. It can be used for your smart hom

Jun 23, 2022
A handy little system information monitor using and ESP32 + ILI9488 TFT. Receives data over Serial Bluetooth.
A handy little system information monitor using and ESP32 + ILI9488 TFT. Receives data over Serial Bluetooth.

Bluetooth-System-Monitor A handy little system information monitor using and ESP32 + ILI9488 TFT. Receives data over Serial Bluetooth and thus giving

May 28, 2022
Bluetooth Monitor port for the ESP32
Bluetooth Monitor port for the ESP32

ESP32 BT Monitor What is it? This is a (at the moment partial) port of andrewjfreyer/monitor for the popular and super cheap ESP32 boards. For a more

Jun 11, 2022
Bluetooth Gateway for Phantom Remote Control based on ESP32
Bluetooth Gateway for Phantom Remote Control based on ESP32

Phantom remote control Bluetooth gateway An ESP3232 firmware for the gateway of Phantom remote control, which can push the temperature and humidity data of Phantom remote control through LAN, and also support to control Phantom remote control to send and receive IR data through LAN.

Jan 23, 2022
Some sketches for the VL53L5CX ranging camera for use with the Arduino IDE
Some sketches for the VL53L5CX ranging camera for use with the Arduino IDE

VL53L5CX Some examples for the ST's VL53L5CX 8 x 8 pixel ranging camera using Simon Levy's Arduino library and Seth Bonn's multi-byte I2C read and wri

May 4, 2022
ESP-32 CAM implementation of a Bird classifier using Arduino IDE

Bird-Classifier ESP-32 CAM implementation of a Bird classifier using Arduino IDE For the file server to run, you also need to have the ESP32 SD File M

Mar 28, 2022
Jun 15, 2022
Arduino Sketch and a Web Bluetooth API for loading models and running inference on the Nano Sense 33 BLE device.
Arduino Sketch and a Web Bluetooth API for loading models and running inference on the Nano Sense 33 BLE device.

TF4Micro Motion Kit This repo contains the Arduino Sketch and a Web Bluetooth API for loading models and running inference on the device. Install and

May 6, 2022