[edk2-devel] `UsbSyncInterruptTransfer` Modifies the Endpoint Number
Ali Shirvani
aj.shirvani at gmail.com
Sun Jan 24 13:43:27 UTC 2021
Hi all,
I tried to send some data from the host to a HID USB device via interrupt
out endpoint. I used following snippet to send data synchronously:
UsbIo->UsbSyncInterruptTransfer(UsbIo, *0x01*, TestData, &DataLen, 1000,
&Result);
I captured the USB packets, but the endpoint number in the captured file
differs from the endpoint number, *0x01*, that I passed as an argument to
the `UsbSyncInterruptTransfer` function. The endpoint number in the capture
file is *0x81*.
Here is the capture file:
Frame 19: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
USB URB
[Source: host]
[Destination: 0.1.1]
URB id: 0x000000000720e0c0
URB type: URB_SUBMIT ('S')
URB transfer type: URB_INTERRUPT (0x01)
Endpoint: *0x81*, Direction: IN
1... .... = Direction: IN (1)
.... 0001 = Endpoint number: 1
Device: 1
URB bus id: 0
Device setup request: relevant (0)
Only control URBs may contain a setup packet
[Expert Info (Error/Malformed): Only control URBs may contain a
setup packet]
[Only control URBs may contain a setup packet]
[Severity level: Error]
[Group: Malformed]
Data: not present ('<')
URB sec: 1611495093
URB usec: 737320
URB status: Success (0)
URB length [bytes]: 0
Data length [bytes]: 64
[bInterfaceClass: HID (0x03)]
Unused Setup Header
Interval: 0
Start frame: 0
Copy of Transfer Flags: 0x00000000
.... .... .... .... .... .... .... ...0 = Short not OK: False
.... .... .... .... .... .... .... ..0. = ISO ASAP: False
.... .... .... .... .... .... .... .0.. = No transfer DMA map: False
.... .... .... .... .... .... ..0. .... = No FSBR: False
.... .... .... .... .... .... .0.. .... = Zero Packet: False
.... .... .... .... .... .... 0... .... = No Interrupt: False
.... .... .... .... .... ...0 .... .... = Free Buffer: False
.... .... .... .... .... ..0. .... .... = Dir IN: False
.... .... .... ...0 .... .... .... .... = DMA Map Single: False
.... .... .... ..0. .... .... .... .... = DMA Map Page: False
.... .... .... .0.. .... .... .... .... = DMA Map SG: False
.... .... .... 0... .... .... .... .... = Map Local: False
.... .... ...0 .... .... .... .... .... = Setup Map Single: False
.... .... ..0. .... .... .... .... .... = Setup Map Local: False
.... .... .0.. .... .... .... .... .... = DMA S-G Combined: False
.... .... 0... .... .... .... .... .... = Aligned Temp Buffer: False
Number of ISO descriptors: 0
Would you please guide me how I should solve this issue?
Regards,
Ali
PS: The attached is the complete pcap file.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70705): https://edk2.groups.io/g/devel/message/70705
Mute This Topic: https://groups.io/mt/80077676/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210124/b5a82023/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uefi.pcap
Type: application/vnd.tcpdump.pcap
Size: 222379 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210124/b5a82023/attachment.pcap>
More information about the edk2-devel-archive
mailing list