Activity for Xiaofan Chen

  • Xiaofan Chen Xiaofan Chen posted a comment on a wiki page

    Please go to pyusb discussion and not to discuss issues here. Thanks. https://github.com/pyusb/pyusb/discussions

  • Xiaofan Chen Xiaofan Chen modified a wiki page

    Home

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #351

    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 ...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #351

    The other possibility is to upgrade to libusb 1.0.26 to see if that helps.

  • Xiaofan Chen Xiaofan Chen modified ticket #16

    allow zero length control transfer (without buffer)

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #16

    Thanks. We no longer use Sourceforge for development. Please use github instead. Thanks. Ref: https://github.com/mcuee/libusb-win32/issues/21

  • Xiaofan Chen Xiaofan Chen modified ticket #12

    Exposing usb overlapped event

  • Xiaofan Chen Xiaofan Chen modified ticket #13

    Distinguishing between SEM_TIMEOUT and OPERATION_ABORTED

  • Xiaofan Chen Xiaofan Chen modified ticket #14

    usb_free_async should check CloseHandle return value

  • Xiaofan Chen Xiaofan Chen modified ticket #15

    libusb_dyn.c is missing stubs for several of the libusb-win32 functions

  • Xiaofan Chen Xiaofan Chen modified ticket #86

    Uninstall doesn't remove filter driver

  • Xiaofan Chen Xiaofan Chen modified ticket #87

    Installer exit status

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #308

    Reviewed in gerrit and the fix is good. Thanks. http://openocd.zylin.com/#/c/6331/1

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    Reviewed in gerrit and the fix is good. Thanks.

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #308

    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...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    You can see ftdi mpsse backend has no such issue. https://github.com/ntfreak/openocd/blob/master/src/jtag/drivers/mpsse.c

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #308

    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;

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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;

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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...

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #308

    @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

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    @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

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    No, it is not that due to that commit. I revert that commit and the issue is still there under my Mac Mini M1.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    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.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #305

    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/

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    Based on my testing in the libusb issue #928, this seems to be an openocd issue and not libusb issue.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #308

    I can reproduce the issue under macOS. https://github.com/libusb/libusb/issues/928 -- Xiaofan

  • Xiaofan Chen Xiaofan Chen committed [680e8d]

    Add missing comma in string list (#277)

  • Xiaofan Chen Xiaofan Chen committed [53f2f2]

    Typo fix: libusb1.py LIBUSB_SUCESS -> LIBUSB_SUCCESS (#223)

  • Xiaofan Chen Xiaofan Chen committed [be439b]

    Fix example for when there's no active configuration (#275)

  • Xiaofan Chen Xiaofan Chen committed [f644ea]

    Fix #203: libusb sometimes cleaned up too early. (#227)

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #86

    You can also submit tickets through github. https://github.com/mcuee/libusb-win32

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #87

    You can also submit tickets through github. https://github.com/mcuee/libusb-win32

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #87

    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.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #86

    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.

  • Xiaofan Chen Xiaofan Chen modified ticket #14

    Help required on LibusbK throughput measurement

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #14

    Clost this for now. Please use libusb-win32 mailing list for further discussions.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #84

    BTW, please do not use Sourcefore for futher support requests. Please subscribe to libusb-win32 mailing list for futher discussions. Thanks.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #84

    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.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #14

    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...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #14

    To Kris: I agree with Peter. You can try libusb-1.0 WinUSB with the async API to see if that helps.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #14

    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

  • Xiaofan Chen Xiaofan Chen modified ticket #69

    Is here a data size limitataion when reading data in bulk mode

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #69

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #68

    Buld read operation failed on win7 OS

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #68

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #67

    unable to compile libusb0_64.sys

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #67

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #67

    You have to use WDK.

  • Xiaofan Chen Xiaofan Chen modified ticket #66

    usb performance relation with system configuration

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #66

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #64

    Data rate issues

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #64

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #49

    How to change XferSize?

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #49

    Closing old entry. No more using this place for technical support. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #12

    isochronous buffer packets offset/length

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #12

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #13

    usb_get_configuration

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #13

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #78

    root_dev in usb_bus has sometimes undefined pointer

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #78

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #77

    Redefining uint32_t et al. clashes with <stdint.h>

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #77

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #77

    Thanks for the info. libusb-win32 is in a bug-fix only mode and no API changes will be made unless absolutely necessary.

  • Xiaofan Chen Xiaofan Chen modified ticket #74

    A Device Is not indicated

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #74

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #79

    usb_interrupt_write occasionally sends the same data twice

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #79

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #80

    LibUSB filter altering suspend on Z77 board with Win7 x64

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #80

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #82

    usb_bulk_read() timeout to read integral multiple of 512 byte data --> 45556

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #82

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #83

    Ambiguous install docs

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #83

    Closing old entry. Please use libusb-win32 mailing list for future discussions.

  • Xiaofan Chen Xiaofan Chen modified ticket #84

    install-filter does not install libusb0.dll or libusb0.sys to the Windows folders

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #14

    To OP: please do not use this place for technical support in the future -- please use libusb-win32 mailing list. Thanks.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #14

    To OP: please do not use this place for technical support and please use libusb-win32 mailing list. Thanks.

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #84

    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.

  • Xiaofan Chen Xiaofan Chen modified a comment on ticket #15

    --- 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...

  • Xiaofan Chen Xiaofan Chen posted a comment on ticket #74

    On Fri, Jun 6, 2014 at 2:01 PM, Paul Fertser dail@users.sf.net wrote: It looks like...

  • Xiaofan Chen Xiaofan Chen imported Files

  • Xiaofan Chen Xiaofan Chen imported Code

1