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

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

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

bearsh
Copy link
Contributor

@bearsh bearsh commented Jun 25, 2021

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

See also #117

Closes: #117

@mcuee mcuee added the libusb Related to libusb backend label Jun 25, 2021
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.

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

@derekatkins
Copy link

Looks good to me.

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.

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

libusb/hid.c Outdated Show resolved Hide resolved
libusb/hid.c Outdated Show resolved Hide resolved
libusb/hid.c Outdated Show resolved Hide resolved
format the path like the linux kernel does:
<busnum>-<port[.port]>…:<config num>.<interface num>

See also libusb#117

Closes: libusb#117
@bearsh bearsh force-pushed the libusb_stable_path branch from 998fe4c to d03f799 Compare June 25, 2021 14:01
@bearsh
Copy link
Contributor Author

bearsh commented Jun 25, 2021

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
Copy link
Member

Youw commented Jun 25, 2021

// is AFAIK C99 and above...

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

@Youw
Copy link
Member

Youw commented Jun 28, 2021

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

@netfab
Copy link

netfab commented Jun 29, 2021

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

@Youw Youw merged commit 03998f4 into libusb:master Jul 3, 2021
@bearsh bearsh deleted the libusb_stable_path branch July 3, 2021 19:49
netfab added a commit to netfab/GLogiK that referenced this pull request Jul 4, 2021
We will need it after hidapi device path stabilization.
libusb/hidapi#291

USBInit class now have its own source files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libusb Related to libusb backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants