T-vK / ESP32-BLE-Keyboard

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

How to make a Bluetooth keyboard with encrypted connections? #251

Open clientttt opened 10 months ago

clientttt commented 10 months ago

Hi, I would like to know how to make an encrypted Bluetooth keyboard to ensure that only one device can be connected to the ESP32? Can this function be realized?

brkai commented 10 months ago

Encryption itself has nothing to do with the amount of devices that can connect. If you mean "Pairing with a passkey": We are talking about BLE, right? It's technically possible, but kind of senseless: I've tried that. It works for a while; As soon as your device (your mobile for eg.) changes it's MAC you run into an authentication-failure. In my case the mobile phone deletes the ESP from the list of known devices. BTW.: If you don't start advertising again, someone else can't find the ESP either ....