You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the follow code snippet come from libusb/hid.c.
`res = libusb_open(usb_dev, &dev->device_handle);
/* Detach the kernel driver, but only if the device is managed by the kernel */
if (libusb_kernel_driver_active(dev->device_handle, intf_desc->bInterfaceNumber) == 1) {
res = libusb_detach_kernel_driver(dev->device_handle, intf_desc->bInterfaceNumber);
res = libusb_claim_interface(dev->device_handle, intf_desc->bInterfaceNumber);
if (res < 0) {...... }`
Description:
the problem is that libusb_claim_interface always return -6 after the libusb_open() has been excuted successfully.
but libusb_kernel_driver_active(dev->device_handle, intf_desc->bInterfaceNumber) don't equal to 1, so it won't do the detach operation. Why?
The text was updated successfully, but these errors were encountered:
the follow code snippet come from libusb/hid.c.
`res = libusb_open(usb_dev, &dev->device_handle);
/* Detach the kernel driver, but only if the device is managed by the kernel */
if (libusb_kernel_driver_active(dev->device_handle, intf_desc->bInterfaceNumber) == 1) {
res = libusb_detach_kernel_driver(dev->device_handle, intf_desc->bInterfaceNumber);
res = libusb_claim_interface(dev->device_handle, intf_desc->bInterfaceNumber);
if (res < 0) {...... }`
Description:
the problem is that libusb_claim_interface always return -6 after the libusb_open() has been excuted successfully.
but libusb_kernel_driver_active(dev->device_handle, intf_desc->bInterfaceNumber) don't equal to 1, so it won't do the detach operation. Why?
The text was updated successfully, but these errors were encountered: