Skip to content

[Feature request] Expose device speed #240

Open
@RReverser

Description

@RReverser

For some applications (particularly, radio) it's important to know the device speed to choose the best packet size for communication.

They normally use libusb_get_device_speed, which, in turn, consults implementation backend to get device speed reported the OS. I implemented most functions in the WebUSB backend of libusb, but currently reporting device speed as "unknown" as it's not possible to determine it from the WebUSB API, and some apps fail on this as they expect speed to be well-defined.

I think (although not sure) it would be possible to infer speed from bMaxPacketSize and wMaxPacketSize if they were available, but right now only the latter is exposed (as USBEndpoint::packetSize) while the former is not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions