forked from signal11/hidapi
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fill in the Usage Page and Usage on Linux with hidraw #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adapted from djpnewton's PR to signal11/hidapi (signal11#6)
Seems good. Haven't verified the functionality, but I saw on discord that the usage pages you got were correct. Thanks |
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 13, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Now using uses_numbered_reports() instead of duplicated code Includes additional interface fields that are useful in Linux when it's not possible (undesireable) to unbind the HID interface during a scan. * iInterface (only some devices use this, but can be very useful) * bInterfaceClass * bInterfaceSubClass * bInterfaceProtocol * bNumEndpoints TODO - macOS and Windows TODO - Test hid and libusb usage and usage page
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 19, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Now using uses_numbered_reports() instead of duplicated code Includes additional interface fields that are useful in Linux when it's not possible (undesireable) to unbind the HID interface during a scan. * iInterface (only some devices use this, but can be very useful) * bInterfaceClass * bInterfaceSubClass * bInterfaceProtocol * bNumEndpoints TODO - macOS and Windows TODO - Test hid and libusb usage and usage page
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 21, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_usage()
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 22, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_usage() - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 22, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 22, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 22, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Jan 27, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Mar 13, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
May 24, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
haata
added a commit
to haata/hidapi
that referenced
this pull request
Nov 18, 2020
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adapted from djpnewton's PR to signal11/hidapi (signal11#6)
The main complaint upstream for the PR back-in-the-day was the C99 dependency (removed that from here) which was understandable.