* Correct method to send data to the USB device
@ 2021-01-04 15:46 Ali Shirvani
0 siblings, 0 replies; only message in thread
From: Ali Shirvani @ 2021-01-04 15:46 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 3855 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-04 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-04 15:46 Correct method to send data to the USB device Ali Shirvani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox