-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix NimBLEHIDDevice output report returning incorrect characteristic. #805
Conversation
eb00d7f
to
1c393d8
Compare
The input and output report characteristics share the same UUID and the `getOutputReport` was returning the input report characteristic. This change will return the correct characteristic by finding it with the index parameter.
1c393d8
to
20f10c5
Compare
…#805) The input and output report characteristics share the same UUID and the `getOutputReport` was returning the input report characteristic. This change will return the correct characteristic by finding it with the index parameter.
Hi. I know v2.1.1 has been released, but I think this bug is not fixed at all.
This creates temporal coupling which is bad both for the user and the maintainer. There should be another fix. Another related problem: If you return the same characteristic for any reportID, you have no way to install a different characteristic callback for each of them. |
Hi @afpineda, thanks for the feedback.
I did not know this. The PR was only to address the issue brought up in #804, where it was confirmed to resolve the issue. I'm starting to think that the best fix is to move this class into it's own repo/library as I know nothing of HID specs and have no use or interest for this myself. The only reason this is here is because it was in the original library so I converted it to use NimBLE. |
In fact, you can have more than one report of any kind (up to 255), including input reports.
Don't get discouraged by a few bugs. You are doing a good job! |
Not discouraged, just a bit weary. I get in trouble any time I touch this class lol. Like I said this is not my area of knowledge, just thought it would be better if someone that knows more about it maintained it. |
The input and output report characteristics share the same UUID and the
getOutputReport
was returning the input report characteristic. This change will return the correct characteristic by finding it with the index parameter.Fixes #804