Hi there. I am trying to find how to use a Bluetooth classic connection to smartphone with ESP working as a simple keyboard. I have problems with compiling code for HID and Bluetooth Classic. Tried IDF profile and Arduino and some example code and still not working.
Has somebody working piece of code for that configuration?
I need classic Bluetooth because BLE has to short range for me.
You can easily take the ESP-IDF example for Bluetooth Classic + HID mouse
Then change up the HID descriptor to be a keyboard instead of a mouse, based on
https://gist.github.com/manuelbl/66f059effc8a7be148adb1f104666467
And then you get a working Bluetooth Classic HID keyboard
https://github.com/maxgerhardt/esp32-btc-hid-example
It can pair with my PC perfectly fine and types ‘a’ once every two seconds.
