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

Hotplug support #44

Open
mcuee opened this issue Oct 10, 2023 · 6 comments
Open

Hotplug support #44

mcuee opened this issue Oct 10, 2023 · 6 comments

Comments

@mcuee
Copy link
Owner

mcuee commented Oct 10, 2023

It may be good to provide hotplug support.

As of now, libusb-win32 does not support hotplug. libusb-1.0 does not support hotplug under Windows.
libusbK has hotplug support.

@dontech
Copy link
Collaborator

dontech commented Oct 12, 2023

Please clarify what exactly you mean by hotplug.

Do you mean generating a callback when a new device is enumerated ?

@mcuee
Copy link
Owner Author

mcuee commented Oct 12, 2023

Please clarify what exactly you mean by hotplug.

Do you mean generating a callback when a new device is enumerated ?

Yes, something along that line -- notification about device hotplug event.

libusbK hotplug APIs:
https://libusbk.sourceforge.net/UsbK3/group__hotk.html

libusb-1.0 hotplug APIs: (not yet implemented on Windows platform)
https://libusb.sourceforge.io/api-1.0/group__libusb__hotplug.html

@sonatique
Copy link

sonatique commented Dec 8, 2023

@mcuee : Quick question: what about fully implementing hotplug directly inside libusb-1.0 (supposing it is possible using win32-like API)?
Would there be any downside as compare to implementing the core functionality inside libusb0.sys and only calling it from libusb-1.0? I mean: appart from the fact that having hotplug insde libusb0.sys would allow program not using libusb-1.0 to have the feature as well.

@mcuee
Copy link
Owner Author

mcuee commented Dec 8, 2023

I think typical hotplug implementation is in the user mode side and not on the kernel side. For example you can look at libusbK.

BTW, libusb-win32 API (libusb0.dll) is a superset of libusb-0.1, so it is not compatible with libusb-1.0 API.

@mcuee
Copy link
Owner Author

mcuee commented Feb 20, 2024

@dontech

Please check if this is worth the efforts or not, if not, we can close this issue as not planned.

@dontech
Copy link
Collaborator

dontech commented Feb 20, 2024

We can still provide hotplug support to libusb-1.0 in the future I think, so lets keep this one open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants