Hi all,
I want to send data to an USB device, I tried the following method, but I always got the TIME_OUT error message.
Status = UsbIo->UsbSyncInterruptTransfer (UsbIo, 0x01, (VOID *)DataBuffer,
&DataLength, 100, &TransferStatus);
I've read the source code for mouse and keyboard drivers, but both of them receive data from the device and I want to send data to the device.
Would you please guide me how I can send/ data from a USB device?
Following is the output of `lsusb` related to the qemu virtual U2F device that I want to communicate with.
Bus 002 Device 002: ID 46f4:0005
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x46f4
idProduct 0x0005
bcdDevice 0.00
iManufacturer 1 QEMU
iProduct 2 U2F USB key
iSerial 3 0-0000:00:1d.7-1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 U2F key config
bmAttributes 0x80
(Bus Powered)
MaxPower 30mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 34
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Device Status: 0x0000
(Bus Powered)
Regards,
Ali