BLE to HID 0x1812 Device (Keyboard)

bmckinney
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".

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE to HID 0x1812 Device (Keyboard)

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

Hi,
there can be few things. One of them can be bug in arduino BLE library that you are using. This is affected line:
https://github.com/espressif/arduino-es ... 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.

tharunjoy
Posts: 22
Joined: Wed Dec 12, 2018 5:30 am

Re: BLE to HID 0x1812 Device (Keyboard)

Postby tharunjoy » Tue Aug 13, 2019 3:08 pm

Any update on ble hid client in esp32?
I am really working on it. Can anybody help me with some starting point to build the client?

thedayu
Posts: 1
Joined: Fri Sep 13, 2019 9:10 am

Re: BLE to HID 0x1812 Device (Keyboard)

Postby thedayu » Fri Sep 13, 2019 9:16 am

I met the same problem. I want to use a BLE hid device as input for ESP32. Connected and could read device name, battery level, etc. but couldn't get any input idication.

Any solution or updates?

Who is online

Users browsing this forum: No registered users and 62 guests