Skip to content

Revise libusb-1.0 usage in Windows branch #1507

Open
@jimklimov

Description

@jimklimov

The NUT for Windows effort up to 2.6.5-7 branch abandoned several years ago did not consider the not-yet-existing libusb-1.0 codebase, but included some changes for the libusb-0.1 codebase.

While preparing the Windows-2.8.0-1 branch, I tried to apply changes that happened in libusb0.c to libusb1.c as well, but there may be things I've missed or misunderstood (APIs do differ).

It would be beneficial if someone better versed in libusb APIs went over those changes (comparing Windows branch to master), preferably both files for good measure, so we are more confident that it should actually work.

(Per small-scale testing at the time of this codebase update, linking with libusb-compat did function enough to discover the device and get initial data from the driver, although device-closing crashed when stopping it and I am not sure that run-time measurement/status updates did happen)

UPDATE: This situation also compromises use of libmodbus with RTU USB support, as it was not coded to accept libusb-0.1 API. PR #2778 should allow to explicitly prefer libusb-1.0 by using configure --with-modbus+usb (but the result may be flaky or not, per this issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    USBWindowsWindows-not-on-par-with-POSIXAspect of Windows builds known to be dysfunctional compared to POSIX builds; fix needed to be on parmodbus

    Type

    No type

    Projects

    • Status

      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions