Skip to content

Control transfers are incorrect when using LibUSB #240

Description

@sanjay900

Describe the issue
It appears that the LibUsb UsbInterface is using just the RequestType when creating control transfers, instead of the entire UsbDeviceRequestType
I found that this would stop me from sending control transfers, but I could fix this by using the ToByte() method of UsbDeviceRequestType.

I have made a PR for this here: #237

Your Code

publicuintWriteData(ushortid,byte[]buffer){SetupPacketpacket=newSetupPacket(newUsbDeviceRequestType(RequestDirection.Out,RequestType.Class,RequestRecipient.Interface),1,id,2,(ushort)buffer.Length);TransferResulttr=device.PerformControlTransferAsync(packet,buffer).Result;returntr.BytesTransferred;}

Info

  • Platform: Linux
  • Device Type: USB
  • Version: 4.3.0-beta

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions