Please go to pyusb discussion and not to discuss issues here. Thanks. https://github.com/pyusb/pyusb/discussions
Home
https://github.com/libusb/libusb/blob/master/ChangeLog 2022-04-10: v1.0.26 * Fix regression with transfer free's after closing device * Fix regression with destroyed context if API is misused * Workaround for applications using missing default context ...
The other possibility is to upgrade to libusb 1.0.26 to see if that helps.
allow zero length control transfer (without buffer)
Thanks. We no longer use Sourceforge for development. Please use github instead. Thanks. Ref: https://github.com/mcuee/libusb-win32/issues/21
Exposing usb overlapped event
Distinguishing between SEM_TIMEOUT and OPERATION_ABORTED
usb_free_async should check CloseHandle return value
libusb_dyn.c is missing stubs for several of the libusb-win32 functions
Uninstall doesn't remove filter driver
Installer exit status
Reviewed in gerrit and the fix is good. Thanks. http://openocd.zylin.com/#/c/6331/1
Reviewed in gerrit and the fix is good. Thanks.
To proof my theory, I apply the following dirty fix to openocd and now latest openocd git has not issues with latest libusb git. https://github.com/libusb/libusb/issues/928 ~~~ diff --git a/src/jtag/drivers/libusb_helper.c b/src/jtag/drivers/libusb_helper.c index f0122d534..05c6e5574 100644 --- a/src/jtag/drivers/libusb_helper.c +++ b/src/jtag/drivers/libusb_helper.c @@ -163,7 +163,7 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], bool serial_mismatch = false; struct libusb_device_handle...
To proof my theory, I apply the following dirty fix to openocd and now latest openocd git has not issues with latest libusb git. https://github.com/libusb/libusb/issues/928 diff --git a/src/jtag/drivers/libusb_helper.c b/src/jtag/drivers/libusb_helper.c index f0122d534..05c6e5574 100644 --- a/src/jtag/drivers/libusb_helper.c +++ b/src/jtag/drivers/libusb_helper.c @@ -163,7 +163,7 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], bool serial_mismatch = false; struct libusb_device_handle...
In summary, looks like the big patch in libusb (32a2206) changed a bit of the behavior of libusb code but the root cause of this anomaly is that openocd stlink_usb.c does not handle the context right. Why FTDI adapter does not have such issue, because it does not use libusb_helper.h and uses properly libusb by itself with the mpsse backend. https://github.com/ntfreak/openocd/blob/master/src/jtag/drivers/mpsse.c Why does other libusb_helper based adapter not have such an issue, because they do not...
You can see ftdi mpsse backend has no such issue. https://github.com/ntfreak/openocd/blob/master/src/jtag/drivers/mpsse.c
I guess this assumption is not somehow not correct. /* Assuming a single libusb context exists. There no existing interface into this * module to pass a libusb context. */ struct libusb_context *ctx = NULL; It seems to me the problem is that libusb_init() is not called with NULL context. https://github.com/ntfreak/openocd/blob/master/src/jtag/drivers/libusb_helper.c if (libusb_init(&jtag_libusb_context) < 0) return ERROR_FAIL;
I guess this assumption is not somehow not correct. /* Assuming a single libusb context exists. There no existing interface into this * module to pass a libusb context. */ struct libusb_context *ctx = NULL;
Okay, with my Mac Mini M1 I can confirm the above commit is causing the differences in openocd. But I am not so sure if libusb change is the real issue or not. openocd/test/stm32 ❯ brew info libusb libusb: stable 1.0.24 (bottled), HEAD Library for USB device access https://libusb.info/ /opt/homebrew/Cellar/libusb/HEAD-a2b81ae (6 files, 769.3KB) * Built from source From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libusb.rb License: LGPL-2.1-or-later ==> Options --HEAD Install HEAD...
@asier70 From the libusb side, I think you have narrowed down pretty close, you can check before and after this particular big commit. https://github.com/libusb/libusb/commit/32a22069428cda9d63aa666e92fb8882a83d4515
@asier70 From the libusb side, I think you have narrowed down pretty close, you can check this particular big commit. https://github.com/libusb/libusb/commit/32a22069428cda9d63aa666e92fb8882a83d4515
No, it is not that due to that commit. I revert that commit and the issue is still there under my Mac Mini M1.
Not so sure if this one triggers the problem. http://openocd.zylin.com/gitweb?p=openocd.git;a=commitdiff;h=68e200c660aefe960e351452748f299c4a334474 And I am not so sure which libusb commit triggers this in the first place.
Yes this is correct. So some changes in libusb triggered the problem. But my testing shows that the problem may well be related to openocd st-link codes, as other debug adapters have no issues. Github stlink.org stlink project also has no issues.
https://github.com/libusb/libusb/issues/928 Based on my testing, most likely the issue is with openocd ST-Link codes. It can not find the ST-Link, strange.
Which libusb version are you using? Is it 1.0.24 release or the latest git version? For git version, please refer to ticket #308 as well. https://sourceforge.net/p/openocd/tickets/308/
Based on my testing in the libusb issue #928, this seems to be an openocd issue and not libusb issue.
I can reproduce the issue under macOS. https://github.com/libusb/libusb/issues/928 -- Xiaofan
Add missing comma in string list (#277)
Typo fix: libusb1.py LIBUSB_SUCESS -> LIBUSB_SUCCESS (#223)
Fix example for when there's no active configuration (#275)
Fix #203: libusb sometimes cleaned up too early. (#227)
You can also submit tickets through github. https://github.com/mcuee/libusb-win32
You can also submit tickets through github. https://github.com/mcuee/libusb-win32
Please use mailing list to discuss further libusb-win32 issues. And the installer is no longer supported. You can use Zadig or the installer from libusbk.
Please use mailing list to discuss further libusb-win32 issues. And this libusb-win32-devel-filter-1.2.6.0.exe is no longer supported. You can use Zadig or the one from libusbk.
Help required on LibusbK throughput measurement
Clost this for now. Please use libusb-win32 mailing list for further discussions.
BTW, please do not use Sourcefore for futher support requests. Please subscribe to libusb-win32 mailing list for futher discussions. Thanks.
You do not install libusb as a full driver. You need to install the base package (libusb installer or libusbk installer) to install libusb0.sys into the system. You are not install libusb0.sys as any device's driver yet (device driver or filter driver) by doing that. It is the same for other filter driver like usbdk. By installing the filter driver, it is just modifying the registry to add to the driver stack.
BTW, Stmk_Write and Stmk_Read are just convinent functions to wrap around the overlapped I/O for libusbK. You may try the overlapped I/O (async API) to see if that helps. http://libusbk.sourceforge.net/UsbK3/group__ovlk.html On the other hand, I think you are not using the Stmk_Write and Stmk_Read efficiently. But I am not so familiar with libusbK API functions myself. That is why I think it is better to use libusb-win32 mailing list for support. In reality, libusbK is a seperate project from libusb-win32...
To Kris: I agree with Peter. You can try libusb-1.0 WinUSB with the async API to see if that helps.
To Kris: libusb-win32 mailing list is the right place to go for technical support since it goes to more people and more people will benefit from the discussion. You need to subscribe to the mailing list in order to post. https://sourceforge.net/projects/libusb-win32/lists/libusb-win32-devel
Is here a data size limitataion when reading data in bulk mode
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
Buld read operation failed on win7 OS
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
unable to compile libusb0_64.sys
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
You have to use WDK.
usb performance relation with system configuration
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
Data rate issues
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
How to change XferSize?
Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.
isochronous buffer packets offset/length
Closing old entry. Please use libusb-win32 mailing list for future discussions.
usb_get_configuration
Closing old entry. Please use libusb-win32 mailing list for future discussions.
root_dev in usb_bus has sometimes undefined pointer
Closing old entry. Please use libusb-win32 mailing list for future discussions.
Redefining uint32_t et al. clashes with <stdint.h>
Closing old entry. Please use libusb-win32 mailing list for future discussions.
Thanks for the info. libusb-win32 is in a bug-fix only mode and no API changes will be made unless absolutely necessary.
A Device Is not indicated
Closing old entry. Please use libusb-win32 mailing list for future discussions.
usb_interrupt_write occasionally sends the same data twice
Closing old entry. Please use libusb-win32 mailing list for future discussions.
LibUSB filter altering suspend on Z77 board with Win7 x64
Closing old entry. Please use libusb-win32 mailing list for future discussions.
usb_bulk_read() timeout to read integral multiple of 512 byte data --> 45556
Closing old entry. Please use libusb-win32 mailing list for future discussions.
Ambiguous install docs
Closing old entry. Please use libusb-win32 mailing list for future discussions.
install-filter does not install libusb0.dll or libusb0.sys to the Windows folders
To OP: please do not use this place for technical support in the future -- please use libusb-win32 mailing list. Thanks.
To OP: please do not use this place for technical support and please use libusb-win32 mailing list. Thanks.
Not a bug for install-filter and install-fiter-win -- you are supposed to have libusb-win32 device driver/dll installed first. Zadig is not part of libusb-win32 project but if you install just the filter, you need to have libusb-win32 device driver and dll installed first.
--- old +++ new @@ -0,0 +1,16 @@ +libusb_dyn.c is missing stubs for several of the libusb-win32 functions: + + - usb_touch_inf_file_np + - usb_install_needs_restart_np + - usb_install_npW + - usb_install_npA + - usb_reap_async_nocancel + - usb_cancel_async + +(It's also missing the various _rundll stubs, but I doubt there's any point in including those.) + +The first four are related to driver installation, and any program that uses those will probably want to link to libusb0.dll directly. But usb_reap_async_nocancel...
On Fri, Jun 6, 2014 at 2:01 PM, Paul Fertser dail@users.sf.net wrote: It looks like...