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

fix: fix get hid device interface number is always 0 on macos 13.3 #530

Closed
wants to merge 1 commit into from

Conversation

pengxianheng-nreal
Copy link

@pengxianheng-nreal pengxianheng-nreal commented Apr 13, 2023

fix get hid device interface number is always 0 on macos 13.3

@pengxianheng-nreal pengxianheng-nreal changed the title fix: fix get hid device interface is always 0 on macos 13.3 fix: fix get hid device interface number is always 0 on macos 13.3 Apr 13, 2023
@@ -552,6 +552,35 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
cur_dev->interface_number = -1;
}

if (cur_dev->interface_number == -1 || cur_dev->interface_number == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cur_dev->interface_number == 0 is a valid interface number
it doesn't look right to consider it for a fallback

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cause this problem: my device interface number is not 0. but the old code return 0 on macos 13.3. on macos13.2,the old code works fine(not 0) . so 0 may not be valid!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it is not vaid in your case, but generally the 0 is a valid interface number
maybe we need to change the get_int_property(dev, CFSTR(kUSBInterfaceNumber)); part to return -1 in case of failure

mac/hid.c Show resolved Hide resolved
}

if (temp_dev_path) {
const char* match_prefix_string = "Interface@";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no documentation guarantees that the interface number is going to be a part of the Path

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#527. The author of this discussion is my workmate. Now we have no other good solution to solve this problem except this one.

Copy link
Member

@Youw Youw Apr 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have no other good solution

let me investigate this
there is always a solution to find a corresponding USB/device interface having the Location ID - that one is guaranteed to match

Copy link
Member

@Youw Youw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even if it is functional - this is a workaround
I'd want to search for a better solution

@Youw Youw added don't_merge Don't merge this PR as is macOS Related to macOS backend labels Apr 13, 2023
@mcuee
Copy link
Member

mcuee commented Apr 15, 2023

even if it is functional - this is a workaround I'd want to search for a better solution

I agree with this one.

Copy link
Contributor

@imaami imaami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments and some draft code in them.

@@ -552,6 +552,36 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
cur_dev->interface_number = -1;
}

if (cur_dev->interface_number == -1 || cur_dev->interface_number == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation of the entire block is wrong. The commit indents with 4 spaces while the rest of the file indents with tabs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the width of tabs on different system is different , but the width of spaces is the same. so use spaces can croass-platform ,show consistency

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that the commit is not consistent with its own surroundings. Arguments for or against tab indentation are completely irrelevant in the context of one commit that adds code to an existing file.

Attached screenshot shows what this looks like.

Screenshot_20230525-074350~2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you explain like this ,I got it.

@@ -552,6 +552,36 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
cur_dev->interface_number = -1;
}

if (cur_dev->interface_number == -1 || cur_dev->interface_number == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in the taken branch is actually dependent on iokit_dev != MACH_PORT_NULL so it should be evaluated in the outermost conditional. Currently if iokit_dev is null the code enters the branch just to look at a char pointer that is guaranteed to be NULL anyway. So why not:

	if (iokit_dev != MACH_PORT_NULL &&
	    (cur_dev->interface_number == -1 || cur_dev->interface_number == 0)) {

int old_interface_number = cur_dev->interface_number;
//try to Fallback to older interface number find rules
io_string_t temp_dev_path_str;
char* temp_dev_path = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The char *temp_dev_path variable is not needed. Allocating a new string with strdup(temp_dev_path_str) is unnecessary, and strdup("") doubly so. io_string_t temp_dev_path_str alone is sufficient as it's an alias of char[512] and can be passed to strstr().

With this in mind the only conditional you need to evaluate is res == KERN_SUCCESS, and the program flow remains identical.

	if (iokit_dev != MACH_PORT_NULL &&
	    (cur_dev->interface_number == -1 || cur_dev->interface_number == 0)) {
		io_string_t temp_dev_path_str;
		temp_dev_path_str[0] = '\0';

		/* Fill in the path (IOService plane) */
		res = IORegistryEntryGetPath(iokit_dev, kIOServicePlane, temp_dev_path_str);
		if (res == KERN_SUCCESS) {
			char *interface_component = strstr(temp_dev_path_str,  // ...

}

if (temp_dev_path) {
const char* match_prefix_string = "Interface@";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A string literal would do just fine here.


if (temp_dev_path) {
const char* match_prefix_string = "Interface@";
char* interface_component = strstr(temp_dev_path, match_prefix_string);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

			char *interface_component = strstr(temp_dev_path_str, "Interface@");

const char* match_prefix_string = "Interface@";
char* interface_component = strstr(temp_dev_path, match_prefix_string);
if (interface_component) {
char* decimal_str = interface_component + strlen(match_prefix_string);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A string literal instead of a const char * would avoid potentially compiling in a runtime call to strlen(), as sizeof("...") - 1 is equal to strlen("...") but is guaranteed to be evaluated compile-time. Doing strlen(s) on a const char *s = "..." might get optimized away with some compiler flags, but it definitely won't always be.

Of course a string literal would have to be typed out twice, once for strstr() and then a second time for sizeof(). If you can stomach it you can define a temporary macro or two.

Because at this point I think I've written enough comment spam I'll just post an alternative to the whole code block, with a couple of additional minor tweaks in addition to the ones I've mentioned. Haven't compiled, no guarantees that it actually works. It just might.

	if (iokit_dev != MACH_PORT_NULL &&
	    (cur_dev->interface_number == -1 || cur_dev->interface_number == 0)) {
		io_string_t temp_dev_path_str;
		temp_dev_path_str[0] = '\0';

		/* Fill in the path (IOService plane) */
		res = IORegistryEntryGetPath(iokit_dev, kIOServicePlane, temp_dev_path_str);
		if (res == KERN_SUCCESS) {
			#define match_prefix_str "Interface@"
			#define match_prefix_len (sizeof(match_prefix_str) - 1)

			char *interface_component = strstr(temp_dev_path_str, match_prefix_str);
			if (interface_component) {
				char *decimal_str = interface_component + match_prefix_len;
				if (decimal_str[0]) {
					char *endptr = decimal_str;
					int interface_number = strtol(decimal_str, &endptr, 10);
					if (endptr != decimal_str) {
						/* Parsing succeeded, update the interface number. */
						cur_dev->interface_number = interface_number;
					}
				}
			}

			#undef match_prefix_len
			#undef match_prefix_str
		}
	}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for suggestion

@DanBurkhardt
Copy link

DanBurkhardt commented Apr 26, 2023

Just chiming in here that without a fix like this, this lib is totally broken on macOS 13.3^. The changes in this PR fixed the issue for me, and I suspect many others will have the same experience.

@mcuee
Copy link
Member

mcuee commented Apr 26, 2023

Just chiming in here that without a fix like this, this lib is totally broken on macOS 13.3^. The changes in this PR fixed the issue for me, and I suspect many others will have the same experience.

You may want to file a feedback to Apple as well using the link here: https://developer.apple.com/bug-reporting/. The more people send the feedbacks to Apple, it may get their attention faster and they may fix the issue faster.
Reference: #531 (comment)

@imaami
Copy link
Contributor

imaami commented Apr 29, 2023

Since nothing has so far happened I forked this PR branch, rebased it onto current master, and added an improvement commit (for the most part the same one I pasted in the discussions here). I don't have access to a mac I could test it on, so if anyone wants to have a go please do:

https://github.com/imaami/hidapi/tree/mac13.3

Please notice this is still fundamentally the same fix, I have done nothing original except clean and simplify the implementation a little.

@Youw
Copy link
Member

Youw commented Apr 29, 2023

Thanks @imaami
Anyway, I'm still looking into a better solution.
Got my hands to upgrade my own mac pro to latest macOS (so I could reproduce it at least) and will look at it closer soon.

@Youw
Copy link
Member

Youw commented Apr 29, 2023

As for the improvement, we will start with #534

@mcuee
Copy link
Member

mcuee commented Apr 30, 2023

@imaami

Yes your mod is working but as @Youw mentioned that this PR is not the right fix to go with.

mcuee@mcuees-Mac-mini hidapi_pr530_mod % ./hidtest/hidtest 
hidapi test/example tool. Compiled with hidapi version 0.14.0, runtime version 0.14.0.
Compile-time version matches runtime version of hidapi.

...
...
Device Found
  type: 046d 1000
  path: DevSrvsID:4294970699
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x2 (0x1)
  Bus type: 0

  Report Descriptor: (69 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 046d 1000
  path: DevSrvsID:4294970699
  serial_number: 
  Manufacturer: Logitech
  Product:      LogiVirtualHIDDevice
  Release:      1
  Interface:    2
  Usage (page): 0x1 (0x1)
  Bus type: 0

  Report Descriptor: (69 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970675
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x1 (0xff00)
  Bus type: 1

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970675
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x2 (0xff00)
  Bus type: 1

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970675
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    2
  Usage (page): 0x4 (0xff00)
  Bus type: 1

  Report Descriptor: (98 bytes)
0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x10, 0x75, 
0x08, 0x95, 0x06, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x01, 
0x81, 0x00, 0x09, 0x01, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 
0x09, 0x02, 0xa1, 0x01, 0x85, 0x11, 0x75, 0x08, 0x95, 0x13, 
0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 0x02, 0x81, 0x00, 0x09, 
0x02, 0x91, 0x00, 0xc0, 0x06, 0x00, 0xff, 0x09, 0x04, 0xa1, 
0x01, 0x85, 0x20, 0x75, 0x08, 0x95, 0x0e, 0x15, 0x00, 0x26, 
0xff, 0x00, 0x09, 0x41, 0x81, 0x00, 0x09, 0x41, 0x91, 0x00, 
0x85, 0x21, 0x95, 0x1f, 0x15, 0x00, 0x26, 0xff, 0x00, 0x09, 
0x42, 0x81, 0x00, 0x09, 0x42, 0x91, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970673
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x2 (0x1)
  Bus type: 1

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970673
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0x1)
  Bus type: 1

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970673
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x1 (0xc)
  Bus type: 1

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970673
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x80 (0x1)
  Bus type: 1

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
Device Found
  type: 046d c52b
  path: DevSrvsID:4294970673
  serial_number: 
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2410
  Interface:    1
  Usage (page): 0x88 (0xffbc)
  Bus type: 1

  Report Descriptor: (148 bytes)
0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x02, 0x09, 0x01, 
0xa1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 
0x25, 0x01, 0x95, 0x10, 0x75, 0x01, 0x81, 0x02, 0x05, 0x01, 
0x16, 0x01, 0xf8, 0x26, 0xff, 0x07, 0x75, 0x0c, 0x95, 0x02, 
0x09, 0x30, 0x09, 0x31, 0x81, 0x06, 0x15, 0x81, 0x25, 0x7f, 
0x75, 0x08, 0x95, 0x01, 0x09, 0x38, 0x81, 0x06, 0x05, 0x0c, 
0x0a, 0x38, 0x02, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0, 0x05, 
0x0c, 0x09, 0x01, 0xa1, 0x01, 0x85, 0x03, 0x75, 0x10, 0x95, 
0x02, 0x15, 0x01, 0x26, 0xff, 0x02, 0x19, 0x01, 0x2a, 0xff, 
0x02, 0x81, 0x00, 0xc0, 0x05, 0x01, 0x09, 0x80, 0xa1, 0x01, 
0x85, 0x04, 0x75, 0x02, 0x95, 0x01, 0x15, 0x01, 0x25, 0x03, 
0x09, 0x82, 0x09, 0x81, 0x09, 0x83, 0x81, 0x60, 0x75, 0x06, 
0x81, 0x03, 0xc0, 0x06, 0xbc, 0xff, 0x09, 0x88, 0xa1, 0x01, 
0x85, 0x08, 0x19, 0x01, 0x29, 0xff, 0x15, 0x01, 0x26, 0xff, 
0x00, 0x75, 0x08, 0x95, 0x01, 0x81, 0x00, 0xc0, 
unable to open device

@Youw
Copy link
Member

Youw commented Apr 30, 2023

Closing in favor of #534.

@Youw Youw closed this Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
don't_merge Don't merge this PR as is macOS Related to macOS backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants