-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE HID OUT report handling seems not to be implemented. #207
Comments
It seems to me, that the find_device is "only" looking for a device with the desired usage_page and usage AND an attribute "send_report". But for a device of type ReportOut this will never be the case. I think: A Device should be / have a collection of several ReportOut and ReportIn objects.... |
With some small modifications in adafruit_hit_init_.py in the function "def find_device" By doing so, I continue to be able to send reports as well as obtaining the led_status. This leads me to believe that the underlying C implementation is working fine! (at least for a BLE HID keyboard) Next I will investigate how the underlying C implementation is handling descriptors which are asking for multiple ReportIn and ReportOut objects. |
There is no underlying C implementation specifically for BLE The current structure of |
@dhalbert How I see it:
1a. maybe the find_device function shall not be changed to provide/maintain back ward compatibility with older clients.
|
I am suggesting making a class with an API more or less identical to https://docs.circuitpython.org/en/latest/shared-bindings/usb_hid/index.html#usb_hid.Device. That is implemented in C: https://github.com/adafruit/circuitpython/blob/main/shared-module/usb_hid/Device.c. The BLE class would not be implemented in C. The |
For my project to create a BLE HID Braille device I tried to read in the BLE HID keyboard code the LED Status and got an error.
Here is the CP 9.2 CircuitPython code:
I am using (for test purposes) the "boot" button of the ESP32 board to send the character "a" and after sending the character I am testing the led_status.
In order to understand the objects involved I am printing the Type and the members.
The function / property k.led_status tries to get "self._keyboard_device.get_last_received_report()"
which fails with a runtime error.
Here is my log from the test:
I am using a FeatherS3 from UM
PS: I modified "find_device" to see what it does while finding the requested device which explains the debug output after
"starting Keyboard" and before "start Advertising".
Like so:
The text was updated successfully, but these errors were encountered: