Skip to content
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

HID Report Parser for HIDAPI #585

Closed
mcuee opened this issue Jun 3, 2023 · 6 comments
Closed

HID Report Parser for HIDAPI #585

mcuee opened this issue Jun 3, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@mcuee
Copy link
Member

mcuee commented Jun 3, 2023

Reference:

The main hidapi tree will maintain the exting licenses (triple licenses). The exising HID Report Parser in the SuperCollider fork is using GPL so it can not be directly used.

One potential way is to have a branch or a new repo to host that integration if some one is interested and if they are okay with GPL license.

@mcuee mcuee added the enhancement New feature or request label Jun 3, 2023
@JoergAtGithub
Copy link
Contributor

The parsing code needed to fix #274 will be about 50 lines of code. This does not require a full blown ReportDescriptor parser.
Technically the hidapi contains already a report descriptor parser to determine Usage and UsageTable in the libusb backend:

while (i < size) {

the code to determine the report size per ReportId could be integrated here, than we would need to add even less lines of code.

@mcuee
Copy link
Member Author

mcuee commented Jun 4, 2023

@JoergAtGithub

So you are basically saying it is not that difficult to fix #274 and we do not need to use the GPL codes at all. Glad to hear that.

@mcuee
Copy link
Member Author

mcuee commented Jun 4, 2023

BTW, the old libhid has a GPL licensed hid parser as well.
https://alioth-archive.debian.org/releases/libhid/libhid/

I even keep a Windows port here.
https://github.com/mcuee/libhid-win

hidrd is also GPL licensed.
https://github.com/DIGImend/hidrd

@mcuee
Copy link
Member Author

mcuee commented Jun 4, 2023

This Python HID parser has MIT license.
https://github.com/usb-tools/python-hid-parser

This C based parser does not seem to be so complete, with MIT license as well.
https://github.com/listff/hidparser

This Python based HID/PID Report Descriptor parser is more complete, not so sure about the license.
https://github.com/beantowel/HID-descriptor-tool

@Youw
Copy link
Member

Youw commented Jun 4, 2023

My oppinion of having the HID Descriptor parser inside HIDAPI is the same: not much point having such, definitely not as a part of this repo (even in a branch).

There're multiple existing implementation (thank you @mcuee for examples above), and if someone needs any of those - there are multiple options to choose from.

And in the context of #274 - I agree, that minimally extending the existing parser would make the best sense, as @JoergAtGithub described above.

@mcuee
Copy link
Member Author

mcuee commented Jun 4, 2023

In this case I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants