PORTS Forum
Ports and Interfaces => USB => Topic started by: ulao on May 06, 2021, 07:33:47 pm
-
I have an application that sends out this to my device.
URB Control Transfer succeeded
Device Object 0000007c
Driver Object iusb3xhc
URB Function URB_FUNCTION_CONTROL_TRANSFER
URB Status USBD_STATUS_SUCCESS
Endpoint 0 Default Control
Request Get Descriptor from Device
Descriptor String 2
String "USB Receiver"
raw
00000000 1A 03 55 00 53 00 42 00 20 00 52 00 65 00 63 00 65 00 69 00 76 00 65 . . U . S . B . . R . e . c . e . i . v . e
00000017 00 72 00 . r .
I'm wondering how to catch this in my USB code.
Would it be in usbFunctionDescriptor or usbFunctionSetup ?
-
If you are asking how to detect and respond to this request in your device firmware, it should be similar to how the firmware handles other control requests.
-
This does not look like request at all. It rather looks like string descriptor data returned (by your device ?).
The first byte is the overall length (0x1A = 26 bytes which is exactly the length of the whole data block), the second byte is the descriptor type (0x3 = string descriptor), followed by the string in Unicode (2 bytes per character where the upper byte is zero for any
character of the ASCII character set).