bluekitchen / btstack

Dual-mode Bluetooth stack, with small memory footprint.
http://bluekitchen-gmbh.com
Other
1.74k stars 618 forks source link

How to include HID descriptors from usb keyboard in btstack #569

Closed emanuellopes closed 9 months ago

emanuellopes commented 9 months ago

Hi, In my project I'm trying to modify my keyboard to work with ble.

At this moment I already extracted the original keyboard HID descriptors using a cli tool https://github.com/todbot/mac-hid-dump.

I was able to extract 3 types of reports.

So, At this moment using the report from btstack hid_keyboard example, I was able to write everything in from keyboard, so after that, I have appended the consumer report from my keyboard and I was able to use media keys.

In my code, I was converted the report id != 3 to 5 report number 3 is consumer and 5 is the keyboard.

I tried add all my reports into HID_descriptor but I receive a kernel panic.

kb_report_v1.txt kb_report_v2.txt kb_report_v3.txt

this is my repository code

I already read a lot but I'm not sure why I can't use the same HID descriptor from keyboard inside btatck.

I used a app device monitoring studio and notice, the default keyboard keys doesn't have any report ID associated.

The report ID is not mandatory?

Sorry for the questions, I'm hope your answers can help more people.

Thank you

mringwal commented 9 months ago

Hi Emanuel. This is not an issue of BTstack. Feel free to post on the mailing list, and I might be answer some of your questions.