libusb backend: stabilize device path, superseeds: #117 #291

Merged
bearsh merged 1 commit from libusb_stable_path into master 2021-07-03 14:06:31 -05:00
bearsh commented 2021-06-25 01:43:33 -05:00 (Migrated from github.com)

format the path like the linux kernel does:
-<port[.port]>…:.

See also https://github.com/libusb/hidapi/pull/117

Closes: #117

format the path like the linux kernel does: <busnum>-<port[.port]>…:<config num>.<interface num> See also https://github.com/libusb/hidapi/pull/117 Closes: #117
Youw (Migrated from github.com) approved these changes 2021-06-25 04:40:42 -05:00
Youw (Migrated from github.com) left a comment

This looks perfect.
I'll test this out over the weekend, but I think we should be good with currently suggested implementation.

This looks perfect. I'll test this out over the weekend, but I think we should be good with currently suggested implementation.
derekatkins commented 2021-06-25 08:41:02 -05:00 (Migrated from github.com)

Looks good to me.

Looks good to me.
derekatkins (Migrated from github.com) approved these changes 2021-06-25 08:41:21 -05:00
Youw (Migrated from github.com) reviewed 2021-06-25 08:57:47 -05:00
Youw (Migrated from github.com) left a comment

By agreement we're using "C-style" comments only in this source file

By agreement we're using "C-style" comments only in this source file
@ -484,15 +484,29 @@ err:
return str;
Youw (Migrated from github.com) commented 2021-06-25 08:56:41 -05:00
	char str[64]; /* max length "000-000.000.000.000.000.000.000:000.000" */
```suggestion char str[64]; /* max length "000-000.000.000.000.000.000.000:000.000" */ ```
Youw (Migrated from github.com) commented 2021-06-25 08:56:54 -05:00
	/* Note that USB3 port count limit is 7; use 8 here for alignment */
```suggestion /* Note that USB3 port count limit is 7; use 8 here for alignment */ ```
Youw (Migrated from github.com) commented 2021-06-25 08:57:09 -05:00
		/* USB3.0 specs limit number of ports to 7 and buffer size here is 8 */
```suggestion /* USB3.0 specs limit number of ports to 7 and buffer size here is 8 */ ```
bearsh commented 2021-06-25 09:04:57 -05:00 (Migrated from github.com)

By agreement we're using "C-style" comments only in this source file

// is AFAIK C99 and above... anyway, pull request has been updated

> By agreement we're using "C-style" comments only in this source file `//` is AFAIK C99 and above... anyway, pull request has been updated
Youw commented 2021-06-25 09:17:32 -05:00 (Migrated from github.com)

// is AFAIK C99 and above...

Yeah. It is more about agreement/code-style/source consistency.

> `//` is AFAIK C99 and above... Yeah. It is more about agreement/code-style/source consistency.
Youw commented 2021-06-28 03:58:33 -05:00 (Migrated from github.com)

I've tested this out with several of my devices. With and without hubs (multiple hubs) - so far looking good!

I've tested this out with several of my devices. With and without hubs (multiple hubs) - so far looking good!
netfab commented 2021-06-29 02:16:16 -05:00 (Migrated from github.com)

Tested successfully with my keyboard driver.

  • 09:04:26.441 openUSBDevice - searched path: 3-2:1.1
  • 09:04:26.504 openUSBDevice - detected HIDAPI device path: 3-2:1.0
  • 09:04:26.504 openUSBDevice - detected HIDAPI device path: 3-2:1.1
  • 09:04:26.504 openUSBDevice - [b3d2] found HIDAPI device: 3-2:1.1
  • 09:04:26.520 openUSBDevice - [b3d2] opened HIDAPI USB device
  • 09:04:26.520 sendUSBDeviceInitialization - [b3d2] sending Logitech G510s Gaming Keyboard initialization requests
  • 09:04:26.525 sendControlRequest - sent HIDAPI feature report: 19 bytes - expected: 19
  • 09:04:26.528 sendControlRequest - sent HIDAPI feature report: 8 bytes - expected: 8
Tested successfully with my keyboard driver. > - 09:04:26.441 openUSBDevice - searched path: 3-2:1.1 > - 09:04:26.504 openUSBDevice - detected HIDAPI device path: 3-2:1.0 > - 09:04:26.504 openUSBDevice - detected HIDAPI device path: 3-2:1.1 > - 09:04:26.504 openUSBDevice - [b3d2] found HIDAPI device: 3-2:1.1 > - 09:04:26.520 openUSBDevice - [b3d2] opened HIDAPI USB device > - 09:04:26.520 sendUSBDeviceInitialization - [b3d2] sending Logitech G510s Gaming Keyboard initialization requests > - 09:04:26.525 sendControlRequest - sent HIDAPI feature report: 19 bytes - expected: 19 > - 09:04:26.528 sendControlRequest - sent HIDAPI feature report: 8 bytes - expected: 8
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!291
No description provided.