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

Add libusb_wrap_sys_device() #386

Open
mcuee opened this issue Sep 13, 2021 · 2 comments
Open

Add libusb_wrap_sys_device() #386

mcuee opened this issue Sep 13, 2021 · 2 comments

Comments

@mcuee
Copy link
Member

mcuee commented Sep 13, 2021

This is useful for Linux and Android. It is also discussed in #285.

https://libusb.sourceforge.io/api-1.0/group__libusb__dev.html#ga98f783e115ceff4eaf88a60e6439563c
int libusb_wrap_sys_device (libusb_context *ctx, intptr_t sys_dev, libusb_device_handle **dev_handle)
Must call libusb_set_option(NULL, LIBUSB_OPTION_WEAK_AUTHORITY) or before libusb_init if don't have authority to access the usb device directly.

@mcuee
Copy link
Member Author

mcuee commented Sep 13, 2021

Discussion in python-libusb1: vpelletier/python-libusb1#37 (comment)

@mcuee
Copy link
Member Author

mcuee commented Sep 13, 2021

BTW, there is the New NO_DEVICE_DISCOVERY option to replace WEAK_AUTHORITY option.
libusb/libusb@5c89594

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

1 participant