| 
     
      
      
      From: Fourcade, P. <Pie...@sm...> - 2024-10-15 14:22:05
      
     
   | 
Dear libusb community, I am reaching out for help regarding an unexpected error we have encountered using libusb on Windows. First of all, I believe this issue is probably more related to Windows and WinUSB itself, and I also intend to seek help from their side. However, I am trying my luck here to see if this is a known issue and if there might be some workaround. Regarding the issue: “Randomly”, with our custom USB device, libusb reports a systematic failure when attempting to set the device to a specific alternate setting. When setting the log levels to debug, the following issue is reported: “libusb: error [winusbx_set_interface_altsetting] SetCurrentAlternateSetting failed: Insufficient system resources exist to complete the requested service.” I have looked into existing topics regarding this issue but found none answered, at least related to USB. Usually, the issue appears to be more observable on computers that are not often turned off, but we have had the issue at least once on every computer using Windows. What has been tested/verified: * It is apparently not linked to our USB firmware since the same device plugged into two different computers (one with the issue, the other without) has different behavior. * Despite the libusb error, our USB device correctly detects the setting of the alternate setting and behaves correctly. * We have tried with libusb version 1.0.24 and the latest version 1.0.27 without any change in the issue. * The only solution found to fix the issue is to manually uninstall all the devices in Windows Device Manager and restart the computer afterward. After this, the problem is no longer present. * The issue is not reproducible (making it more fun). * USB enumeration and USB properties on Windows report no issue when the problem occurs. If this rings any bells or if you think we could try anything to fix this issue, please do not hesitate! Thank you for your time and consideration. Best regards.  |