GithubHelp home page GithubHelp logo

Partial data on timeouts about gousb HOT 7 CLOSED

kylelemons avatar kylelemons commented on September 28, 2024
Partial data on timeouts

from gousb.

Comments (7)

codido avatar codido commented on September 28, 2024

libusb_bulk_transfer & libusb_interrupt_transfer are no longer being used, so this seems to be resolved.

from gousb.

zagrodzki avatar zagrodzki commented on September 28, 2024

Actually not just yet - transfer() returns 0 on error

from gousb.

zagrodzki avatar zagrodzki commented on September 28, 2024

but I'm working on it :) I'll update this issue when I think all places are correct and covered by tests.

from gousb.

codido avatar codido commented on September 28, 2024

Sure thing, though looking at the documentation it seems like the status of partial asynchronous transfers will be set to LIBUSB_TRANSFER_COMPLETED:
http://libusb.sourceforge.net/api-1.0/group__asyncio.html#ga9fcb2aa23d342060ebda1d0cf7478856

Is this misleading and LIBUSB_TRANSFER_TIMED_OUT can still be returned with partial xfer data?

from gousb.

zagrodzki avatar zagrodzki commented on September 28, 2024

I think so. It's still the case that a single transfer might be split up by the host into multiple transactions, and some of them might succeed before the transfer completes. Same with isochronous transfers where some packets are transmitted before the transfer times out. But I'm not really sure and I haven't dig through libusb sources to check. If you want to look for confirmation one way or another in libusb sources, that'd be welcome :)

from gousb.

codido avatar codido commented on September 28, 2024

Skimming through the code, seems that you're right - libusb_bulk_transfer just uses the asynchronous functions, so the two seem to share the same behavior - LIBUSB_TRANSFER_TIMED_OUT may be returned with actual_length != 0.

from gousb.

zagrodzki avatar zagrodzki commented on September 28, 2024

I believe this is now addressed.

from gousb.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.