BLE to HID 0x1812 Device (Keyboard)

Posts: 1
Joined: Mon May 06, 2019 6:09 am

BLE to HID 0x1812 Device (Keyboard)

Postby bmckinney » Mon May 06, 2019 7:01 am

I have worked through all samples I could find, trying to get the ESP32 (as a client) to successfully exchange data with a BLE device that emulates a HID keyboard (0x1812 service).

Using the examples for the non-BLESecurity Client on the ESP32, I can connect and read data from all other services (0x1800,0x1801,0x180A,0x180F,etc.). I can specify the 0x1812 (HID) service but cannot read any of the characteristics (always NULL). The device shows a successful BLE connection, but when it attempts to send data, it displays an error indicating lost connection (although the ESP32 is still connected to it). It appears as if the device knows that the ESP32 has NOT connected to the 0x1812 service or is not acknowledging in some way.

The device connects quickly to all other systems (WIndows, Android, Linux, etc.) WITHOUT any sort of pairing requirements (passkeys, etc.). It then simply transmits data as if it is a keyboard.

My guess is that there is still something missing related to pairing, etc., but my attempts to use the examples for BLEClient with BLESecurity just hangs forever after " - Created client".

Posts: 741
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE to HID 0x1812 Device (Keyboard)

Postby chegewara » Wed May 08, 2019 2:04 am

there can be few things. One of them can be bug in arduino BLE library that you are using. This is affected line: ... e.cpp#L167

The other thing is that building HID client is not easy, because you need to handle characteristics with the same UUID but with different properties, so you need to distinguish them.
Another thing that is required is to parse HID report map. If you want to write client for one particular device, its not big issue because you know how report map looks like and you can parse it and hardcode all you need in your app.

Who is online

Users browsing this forum: Google [Bot] and 11 guests