Hi,

On 2020-06-26 09:37, Jan Behrens wrote:
1. Are there (intended or accidental/unwanted) API and/or behaviour
differences between Linux/macOS's libusb. Are there certain
considerations when building apps that use libusb? Is it wrong to call
libusb_reset_device() in a driver? If yes, why? If no, what is the
function used for?

Some devices are only tested using Windows, and I know that timing may affect how libusb_reset_device() works. My guess is that libusb_reset_device() should only be used in the case you've uploaded new firmware to the device, and that USB stack on the device has been rebooted. In FreeBSD there are a bunch of sysctl's which affect the libusb reset device behaviour:

hw.usb.timings.extra_power_up_time: 20
hw.usb.timings.resume_recovery: 50
hw.usb.timings.resume_wait: 50
hw.usb.timings.resume_delay: 250
hw.usb.timings.set_address_settle: 10
hw.usb.timings.port_resume_delay: 40
hw.usb.timings.port_powerup_delay: 300
hw.usb.timings.port_reset_recovery: 250
hw.usb.timings.port_root_reset_delay: 200
hw.usb.timings.port_reset_delay: 50

In order to figure out exactly what is wrong, you need to have a USB analyzer, capturing all USB communications on the USB cable.

--HPS
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"

Reply via email to