在windows 上 uvc设备枚举失败

Zeui 2023-02-14 21:31:20 编辑

问题: 在windows插上linux上实现的uvc设备枚举失败

麻烦看下这个枚举失败是为什么? usts c0004000这个错误是什么引起的

这是 usb hound 抓到数据
205803669529

这是设备描述符

    =========================== USB Port2 ===========================

Connection Status        : 0x01 (Device is connected)
Port Chain               : 1-2
Properties               : 0x01
 IsUserConnectable       : yes
 PortIsDebugCapable      : no
 PortHasMultiCompanions  : no
 PortConnectorIsTypeC    : no
ConnectionIndex          : 0x02 (Port 2)
CompanionIndex           : 0
 CompanionHubSymLnk      : USB#ROOT_HUB30#4&92b3c53&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
 CompanionPortNumber     : 0x12 (Port 18)
 -> CompanionPortChain   : 1-18

      ========================== Summary =========================
Vendor ID                : 0x8008 (Unknown Vendor)
Product ID               : 0x2D27
USB Version              : 2.00
Port maximum Speed       : High-Speed (Companion Port 1-18 supports SuperSpeed)
Device maximum Speed     : High-Speed
Device Connection Speed  : High-Speed
Self powered             : yes
Demanded Current         : 2 mA
Used Endpoints           : 3

      ======================== USB Device ========================

        +++++++++++++++++ Device Information ++++++++++++++++++
Device Description       : USB Composite Device
Device Path              : \\?\USB#VID_8008&PID_2D27#12345678#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Kernel Name              : \Device\USBPDO-4
Device ID                : USB\VID_8008&PID_2D27\12345678
Hardware IDs             : USB\VID_8008&PID_2D27&REV_0404 USB\VID_8008&PID_2D27
Driver KeyName           : {36fc9e60-c465-11cf-8056-444553540000}\0054 (GUID_DEVCLASS_USB)
Driver                   : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.488  Date: 2020-11-24)
Driver Inf               : C:\Windows\inf\usb.inf
Legacy BusType           : PNPBus
Class                    : USB
Class GUID               : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB)
Service                  : usbccgp
Enumerator               : USB
Location Info            : Port_#0002.Hub_#0001
Location IDs             : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(2), ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS02)
Container ID             : {c60b88f4-a0a9-579b-8ada-64a397ab1781}
Manufacturer Info        : (标准 USB 主控制器)
Capabilities             : 0x94 (Removable, UniqueID, SurpriseRemovalOK)
Status                   : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code             : 0
Address                  : 2
HcDisableSelectiveSuspend: 0
EnableSelectiveSuspend   : 0
SelectiveSuspendEnabled  : 0
EnhancedPowerMgmtEnabled : 0
IdleInWorkingState       : 0
WakeFromSleepState       : 0
Power State              : D2 (supported: D0, D3, wake from D0)
 Child Device 1          : UVC Camera (USB 视频设备)
  Device ID              : USB\VID_8008&PID_2D27&MI_00\6&71FAD17&0&0000
  Class                  : Camera
  Driver KeyName         : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0005 (GUID_DEVCLASS_CAMERA)
  Service                : usbvideo
  Location               : 0000.0014.0000.002.000.000.000.000.000
  LocationPaths          : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(2)#USBMI(0)  PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(2)#USB(2)  ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS02)#USBMI(0)  ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS02)#USB(2)
  Problem                : 10 (CM_PROB_FAILED_START)

        +++++++++++++++++ Registry USB Flags +++++++++++++++++
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\80082D270404
 osvc                    : REG_BINARY 00 00

        ---------------- Connection Information ---------------
Connection Index         : 0x02 (Port 2)
Connection Status        : 0x01 (DeviceConnected)
Current Config Value     : 0x01 (Configuration 1)
Device Address           : 0x0F (15)
Is Hub                   : 0x00 (no)
Device Bus Speed         : 0x02 (High-Speed)
Number Of Open Pipes     : 0x02 (2 pipes to data endpoints)
Pipe[0]                  : EndpointID=1  Direction=IN   ScheduleOffset=0  Type=Interrupt
Pipe[1]                  : EndpointID=2  Direction=IN   ScheduleOffset=0  Type=Bulk
Data (HexDump)           : 02 00 00 00 12 01 00 02 EF 02 01 40 08 80 27 2D   ...........@..'-
                           04 04 01 02 03 01 01 02 00 0F 00 02 00 00 00 01   ................
                           00 00 00 07 05 81 03 10 00 08 00 00 00 00 07 05   ................
                           82 02 00 02 00 00 00 00 00                        .........

        --------------- Connection Information V2 -------------
Connection Index         : 0x02 (2)
Length                   : 0x10 (16 bytes)
SupportedUsbProtocols    : 0x03
 Usb110                  : 1 (yes, port supports USB 1.1)
 Usb200                  : 1 (yes, port supports USB 2.0)
 Usb300                  : 0 (no, port not supports USB 3.0) -> but Companion Port 1-18 does
 ReservedMBZ             : 0x00
Flags                    : 0x00
 DevIsOpAtSsOrHigher     : 0 (Device is not operating at SuperSpeed or higher)
 DevIsSsCapOrHigher      : 0 (Device is not SuperSpeed capable or higher)
 DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher)
 DevIsSsPlusCapOrHigher  : 0 (Device is not SuperSpeedPlus capable or higher)
 ReservedMBZ             : 0x00
Data (HexDump)           : 02 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00   ................

    ---------------------- Device Descriptor ----------------------
bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x01 (Device Descriptor)
bcdUSB                   : 0x200 (USB Version 2.00)
bDeviceClass             : 0xEF (Miscellaneous)
bDeviceSubClass          : 0x02
bDeviceProtocol          : 0x01 (IAD - Interface Association Descriptor)
bMaxPacketSize0          : 0x40 (64 bytes)
idVendor                 : 0x8008 (Unknown Vendor)
idProduct                : 0x2D27
bcdDevice                : 0x0404
iManufacturer            : 0x01 (String Descriptor 1)
iProduct                 : 0x02 (String Descriptor 2)
iSerialNumber            : 0x03 (String Descriptor 3)
bNumConfigurations       : 0x01 (1 Configuration)
Data (HexDump)           : 12 01 00 02 EF 02 01 40 08 80 27 2D 04 04 01 02   .......@..'-....
                           03 01                                             ..

    ------------------ Configuration Descriptor -------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x00FA (250 bytes)
bNumInterfaces           : 0x02 (2 Interfaces)
bConfigurationValue      : 0x01 (Configuration 1)
iConfiguration           : 0x04 (String Descriptor 4)
bmAttributes             : 0xC0
 D7: Reserved, set 1     : 0x01
 D6: Self Powered        : 0x01 (yes)
 D5: Remote Wakeup       : 0x00 (no)
 D4..0: Reserved, set 0  : 0x00
MaxPower                 : 0x01 (2 mA)
Data (HexDump)           : 09 02 FA 00 02 01 04 C0 01 08 0B 00 02 0E 03 00   ................
                           05 09 04 00 00 01 0E 01 00 05 0D 24 01 10 01 6E   ...........$...n
                           00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00   ..l.....$.......
                           00 00 00 00 00 03 00 00 00 0C 24 05 02 01 00 40   ..........$....@
                           02 01 00 00 09 1D 24 06 0A 41 76 9E A2 04 DE E3   ......$..Av.....
                           47 8B 2B F4 34 1A FF 00 3B 20 01 02 04 01 00 00   G.+.4...; ......
                           00 00 1D 24 06 11 91 72 1E 9A 43 68 83 46 6D 92   ...$...r..Ch.Fm.
                           39 BC 79 06 EE 49 20 01 02 04 FF FF FF FF 00 09   9.y..I .........
                           24 03 03 01 01 00 02 00 07 05 81 03 10 00 08 05   $...............
                           25 03 10 00 09 04 01 00 01 0E 02 00 06 0E 24 01   %.............$.
                           01 4D 00 82 00 03 00 00 00 01 00 1B 24 04 01 01   .M..........$...
                           49 34 32 30 00 00 10 00 80 00 00 AA 00 38 9B 71   I420.........8.q
                           0C 01 00 00 00 00 1E 24 05 01 00 80 02 E0 01 00   .......$........
                           00 C2 01 00 00 C2 01 00 20 1C 00 CE BC 0B 00 01   ........ .......
                           CE BC 0B 00 06 24 0D 01 01 04 09 04 01 01 01 0E   .....$..........
                           02 00 06 07 05 82 02 00 02 00                     ..........

        ------------------- IAD Descriptor --------------------
bLength                  : 0x08 (8 bytes)
bDescriptorType          : 0x0B
bFirstInterface          : 0x00
bInterfaceCount          : 0x02
bFunctionClass           : 0x0E (Video)
bFunctionSubClass        : 0x03 (Video Interface Collection)
bFunctionProtocol        : 0x00 (PC_PROTOCOL_UNDEFINED protocol)
iFunction                : 0x05 (String Descriptor 5)
Data (HexDump)           : 08 0B 00 02 0E 03 00 05                           ........

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x00
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x01 (Video Control)
bInterfaceProtocol       : 0x00
iInterface               : 0x05 (String Descriptor 5)
Data (HexDump)           : 09 04 00 00 01 0E 01 00 05                        .........

        ------- Video Control Interface Header Descriptor -----
bLength                  : 0x0D (13 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x01 (Video Control Header)
bcdUVC                   : 0x0110 (UVC Version 1.10)
wTotalLength             : 0x006E (110 bytes)
dwClockFreq              : 0x02DC6C00 (48 MHz)
bInCollection            : 0x01 (1 VideoStreaming interface)
baInterfaceNr[1]         : 0x01
Data (HexDump)           : 0D 24 01 10 01 6E 00 00 6C DC 02 01 01            .$...n..l....

        -------- Video Control Input Terminal Descriptor ------
bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x02 (Input Terminal)
bTerminalID              : 0x01
wTerminalType            : 0x0201 (ITT_CAMERA)
bAssocTerminal           : 0x00 (Not associated with an Output Terminal)
iTerminal                : 0x00
Camera Input Terminal Data:
wObjectiveFocalLengthMin : 0x0000
wObjectiveFocalLengthMax : 0x0000
wOcularFocalLength       : 0x0000
bControlSize             : 0x03
bmControls               : 0x00, 0x00, 0x00
 D0                      : 0   no -  Scanning Mode
 D1                      : 0   no -  Auto-Exposure Mode
 D2                      : 0   no -  Auto-Exposure Priority
 D3                      : 0   no -  Exposure Time (Absolute)
 D4                      : 0   no -  Exposure Time (Relative)
 D5                      : 0   no -  Focus (Absolute)
 D6                      : 0   no -  Focus (Relative)
 D7                      : 0   no -  Iris (Absolute)
 D8                      : 0   no -  Iris (Relative)
 D9                      : 0   no -  Zoom (Absolute)
 D10                     : 0   no -  Zoom (Relative)
 D11                     : 0   no -  Pan (Absolute)
 D12                     : 0   no -  Pan (Relative)
 D13                     : 0   no -  Roll (Absolute)
 D14                     : 0   no -  Roll (Relative)
 D15                     : 0   no -  Tilt (Absolute)
 D16                     : 0   no -  Tilt (Relative)
 D17                     : 0   no -  Focus Auto
 D18                     : 0   no -  Reserved
 D19                     : 0   no -  Reserved
 D20                     : 0   no -  Reserved
 D21                     : 0   no -  Reserved
 D22                     : 0   no -  Reserved
 D23                     : 0   no -  Reserved
Data (HexDump)           : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00   .$..............
                           00 00                                             ..

        -------- Video Control Processing Unit Descriptor -----
bLength                  : 0x0C (12 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x05 (Processing Unit)
bUnitID                  : 0x02
bSourceID                : 0x01
wMaxMultiplier           : 0x4000 (163.84x Zoom)
bControlSize             : 0x02
bmControls               : 0x01, 0x00
 D0                      : 1  yes -  Brightness
 D1                      : 0   no -  Contrast
 D2                      : 0   no -  Hue
 D3                      : 0   no -  Saturation
 D4                      : 0   no -  Sharpness
 D5                      : 0   no -  Gamma
 D6                      : 0   no -  White Balance Temperature
 D7                      : 0   no -  White Balance Component
 D8                      : 0   no -  Backlight Compensation
 D9                      : 0   no -  Gain
 D10                     : 0   no -  Power Line Frequency
 D11                     : 0   no -  Hue, Auto
 D12                     : 0   no -  White Balance Temperature, Auto
 D13                     : 0   no -  White Balance Component, Auto
 D14                     : 0   no -  Digital Multiplier
 D15                     : 0   no -  Digital Multiplier Limit
iProcessing              : 0x00
bmVideoStandards         : 0x09
 D0                      : 1  yes -  None
 D1                      : 0   no -  NTSC  - 525/60
 D2                      : 0   no -  PAL   - 625/50
 D3                      : 1  yes -  SECAM - 625/50
 D4                      : 0   no -  NTSC  - 625/50
 D5                      : 0   no -  PAL   - 525/60
 D6                      : 0   no -  Reserved
 D7                      : 0   no -  Reserved
Data (HexDump)           : 0C 24 05 02 01 00 40 02 01 00 00 09               .$....@.....

        --------- Video Control Extension Unit Descriptor -----
bLength                  : 0x1D (29 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x06 (Extension Unit)
bUnitID                  : 0x0A
guidExtensionCode        : {A29E7641-DE04-47E3-hXhX-hXhXhXhXhXhX}
bNumControls             : 0x20
bNrInPins                : 0x01 (1 pins)
baSourceID[1]            : 0x02
bControlSize             : 0x04
bmControls               : 0x01, 0x00, 0x00, 0x00
 D0                      : 1  yes -  Vendor-Specific (Optional)
 D1                      : 0   no -  Vendor-Specific (Optional)
 D2                      : 0   no -  Vendor-Specific (Optional)
 D3                      : 0   no -  Vendor-Specific (Optional)
 D4                      : 0   no -  Vendor-Specific (Optional)
 D5                      : 0   no -  Vendor-Specific (Optional)
 D6                      : 0   no -  Vendor-Specific (Optional)
 D7                      : 0   no -  Vendor-Specific (Optional)
 D8                      : 0   no -  Vendor-Specific (Optional)
 D9                      : 0   no -  Vendor-Specific (Optional)
 D10                     : 0   no -  Vendor-Specific (Optional)
 D11                     : 0   no -  Vendor-Specific (Optional)
 D12                     : 0   no -  Vendor-Specific (Optional)
 D13                     : 0   no -  Vendor-Specific (Optional)
 D14                     : 0   no -  Vendor-Specific (Optional)
 D15                     : 0   no -  Vendor-Specific (Optional)
 D16                     : 0   no -  Vendor-Specific (Optional)
 D17                     : 0   no -  Vendor-Specific (Optional)
 D18                     : 0   no -  Vendor-Specific (Optional)
 D19                     : 0   no -  Vendor-Specific (Optional)
 D20                     : 0   no -  Vendor-Specific (Optional)
 D21                     : 0   no -  Vendor-Specific (Optional)
 D22                     : 0   no -  Vendor-Specific (Optional)
 D23                     : 0   no -  Vendor-Specific (Optional)
 D24                     : 0   no -  Vendor-Specific (Optional)
 D25                     : 0   no -  Vendor-Specific (Optional)
 D26                     : 0   no -  Vendor-Specific (Optional)
 D27                     : 0   no -  Vendor-Specific (Optional)
 D28                     : 0   no -  Vendor-Specific (Optional)
 D29                     : 0   no -  Vendor-Specific (Optional)
 D30                     : 0   no -  Vendor-Specific (Optional)
 D31                     : 0   no -  Vendor-Specific (Optional)
iExtension               : 0x00
Data (HexDump)           : 1D 24 06 0A 41 76 9E A2 04 DE E3 47 8B 2B F4 34   .$..Av.....G.+.4
                           1A FF 00 3B 20 01 02 04 01 00 00 00 00            ...; ........

        --------- Video Control Extension Unit Descriptor -----
bLength                  : 0x1D (29 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x06 (Extension Unit)
bUnitID                  : 0x11
guidExtensionCode        : {9A1E7291-6843-4683-hXhX-hXhXhXhXhXhX}
bNumControls             : 0x20
bNrInPins                : 0x01 (1 pins)
baSourceID[1]            : 0x02
bControlSize             : 0x04
bmControls               : 0xFF, 0xFF, 0xFF, 0xFF
 D0                      : 1  yes -  Vendor-Specific (Optional)
 D1                      : 1  yes -  Vendor-Specific (Optional)
 D2                      : 1  yes -  Vendor-Specific (Optional)
 D3                      : 1  yes -  Vendor-Specific (Optional)
 D4                      : 1  yes -  Vendor-Specific (Optional)
 D5                      : 1  yes -  Vendor-Specific (Optional)
 D6                      : 1  yes -  Vendor-Specific (Optional)
 D7                      : 1  yes -  Vendor-Specific (Optional)
 D8                      : 1  yes -  Vendor-Specific (Optional)
 D9                      : 1  yes -  Vendor-Specific (Optional)
 D10                     : 1  yes -  Vendor-Specific (Optional)
 D11                     : 1  yes -  Vendor-Specific (Optional)
 D12                     : 1  yes -  Vendor-Specific (Optional)
 D13                     : 1  yes -  Vendor-Specific (Optional)
 D14                     : 1  yes -  Vendor-Specific (Optional)
 D15                     : 1  yes -  Vendor-Specific (Optional)
 D16                     : 1  yes -  Vendor-Specific (Optional)
 D17                     : 1  yes -  Vendor-Specific (Optional)
 D18                     : 1  yes -  Vendor-Specific (Optional)
 D19                     : 1  yes -  Vendor-Specific (Optional)
 D20                     : 1  yes -  Vendor-Specific (Optional)
 D21                     : 1  yes -  Vendor-Specific (Optional)
 D22                     : 1  yes -  Vendor-Specific (Optional)
 D23                     : 1  yes -  Vendor-Specific (Optional)
 D24                     : 1  yes -  Vendor-Specific (Optional)
 D25                     : 1  yes -  Vendor-Specific (Optional)
 D26                     : 1  yes -  Vendor-Specific (Optional)
 D27                     : 1  yes -  Vendor-Specific (Optional)
 D28                     : 1  yes -  Vendor-Specific (Optional)
 D29                     : 1  yes -  Vendor-Specific (Optional)
 D30                     : 1  yes -  Vendor-Specific (Optional)
 D31                     : 1  yes -  Vendor-Specific (Optional)
iExtension               : 0x00
Data (HexDump)           : 1D 24 06 11 91 72 1E 9A 43 68 83 46 6D 92 39 BC   .$...r..Ch.Fm.9.
                           79 06 EE 49 20 01 02 04 FF FF FF FF 00            y..I ........

        ------- Video Control Output Terminal Descriptor ------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x03 (Output Terminal)
bTerminalID              : 0x03
wTerminalType            : 0x0101 (TT_STREAMING)
bAssocTerminal           : 0x00 (Not associated with an Input Terminal)
bSourceID                : 0x02
iTerminal                : 0x00
Data (HexDump)           : 09 24 03 03 01 01 00 02 00                        .$.......

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x81 (Direction=IN EndpointID=1)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0010
 Bits 15..13             : 0x00 (reserved, must be zero)
 Bits 12..11             : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet)
 Bits 10..0              : 0x10 (16 bytes per packet)
bInterval                : 0x08 (128 microframes -> 16 ms)
Data (HexDump)           : 07 05 81 03 10 00 08                              .......

        --- Class-specific VC Interrupt Endpoint Descriptor ---
bLength                  : 0x05 (5 bytes)
bDescriptorType          : 0x25 (Video Control Endpoint)
bDescriptorSubtype       : 0x03 (Interrupt)
wMaxTransferSize         : 0x0010 (16 bytes)
Data (HexDump)           : 05 25 03 10 00                                    .%...

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x02 (Video Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x06 (String Descriptor 6)
Data (HexDump)           : 09 04 01 00 01 0E 02 00 06                        .........

        ---- VC-Specific VS Video Input Header Descriptor -----
bLength                  : 0x0E (14 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x01 (Input Header)
bNumFormats              : 0x01
wTotalLength             : 0x004D (77 bytes)
bEndpointAddress         : 0x82 (Direction=IN  EndpointID=2)
bmInfo                   : 0x00 (Dynamic Format Change not supported)
bTerminalLink            : 0x03
bStillCaptureMethod      : 0x00 (No Still Capture)
nbTriggerSupport         : 0x00 (Hardware Triggering not supported)
bTriggerUsage            : 0x00 (Host will initiate still image capture)
nbControlSize            : 0x01
Video Payload Format 1   : 0x00
 D0                      : 0   no -  Key Frame Rate
 D1                      : 0   no -  P Frame Rate
 D2                      : 0   no -  Compression Quality
 D3                      : 0   no -  Compression Window Size
 D4                      : 0   no -  Generate Key Frame
 D5                      : 0   no -  Update Frame Segment
 D6                      : 0   no -  Reserved
 D7                      : 0   no -  Reserved
Data (HexDump)           : 0E 24 01 01 4D 00 82 00 03 00 00 00 01 00         .$..M.........

        ------- VS Uncompressed Format Type Descriptor --------
bLength                  : 0x1B (27 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x04 (Uncompressed Format Type)
bFormatIndex             : 0x01 (1)
bNumFrameDescriptors     : 0x01 (1)
guidFormat               : {30323449-0000-0010-hXhX-hXhXhXhXhXhX} (I420)
bBitsPerPixel            : 0x0C (12 bits)
bDefaultFrameIndex       : 0x01 (1)
bAspectRatioX            : 0x00
bAspectRatioY            : 0x00
bmInterlaceFlags         : 0x00
 D0 IL stream or variable: 0 (no)
 D1 Fields per frame     : 0 (2 fields)
 D2 Field 1 first        : 0 (no)
 D3 Reserved             : 0
 D4..5 Field pattern     : 0 (Field 1 only)
 D6..7 Display Mode      : 0 (Bob only)
bCopyProtect             : 0x00 (No restrictions)
Data (HexDump)           : 1B 24 04 01 01 49 34 32 30 00 00 10 00 80 00 00   .$...I420.......
                           AA 00 38 9B 71 0C 01 00 00 00 00                  ..8.q......

        -------- VS Uncompressed Frame Type Descriptor --------
---> This is the Default (optimum) Frame index
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x01
bmCapabilities           : 0x00
wWidth                   : 0x0280 (640)
wHeight                  : 0x01E0 (480)
dwMinBitRate             : 0x01C20000 (29491200 bps -> 3.686 MB/s)
dwMaxBitRate             : 0x01C20000 (29491200 bps -> 3.686 MB/s)
dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes)
dwDefaultFrameInterval   : 0x000BBCCE (76.9230 ms -> 13.000 fps)
bFrameIntervalType       : 0x01 (1 discrete frame interval supported)
adwFrameInterval[1]      : 0x000BBCCE (76.9230 ms -> 13.000 fps)
Data (HexDump)           : 1E 24 05 01 00 80 02 E0 01 00 00 C2 01 00 00 C2   .$..............
                           01 00 20 1C 00 CE BC 0B 00 01 CE BC 0B 00         .. ...........

        ------- VS Color Matching Descriptor Descriptor -------
bLength                  : 0x06 (6 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x0D (Color Matching)
bColorPrimaries          : 0x01 (BT.709, sRGB)
bTransferCharacteristics : 0x01 (BT.709)
bMatrixCoefficients      : 0x04 (SMPTE 170M)
Data (HexDump)           : 06 24 0D 01 01 04                                 .$....

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x01
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x02 (Video Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x06 (String Descriptor 6)
Data (HexDump)           : 09 04 01 01 01 0E 02 00 06                        .........

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x82 (Direction=IN EndpointID=2)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0200 (max 512 bytes)
bInterval                : 0x00 (never NAKs)
Data (HexDump)           : 07 05 82 02 00 02 00                              .......

    ----------------- Device Qualifier Descriptor -----------------
Error                    : ERROR_GEN_FAILURE  (because the device is in low power state)

      -------------------- String Descriptors -------------------
String descriptors are not available  (because the device is in low power state)
USB中文网 2023-02-14 21:45:03 编辑

0xC0004000表示的是The interface was not found.,通你的选择接口失败。
其USB标准请求为:

01 0b 00 00 01 00 00 00

其解释为:

0x01,        // bmRequestType: Dir: H2D, Type: Standard, Recipient: Interface
0x0B,        // bRequest (Set Interface)
0x00, 0x00,  // wValue Alt Setting: 0
0x01, 0x00,  // wIndex Interface: 1
0x00, 0x00,  // wLength = 0

// 8 bytes

说明在选择接口ID=1时出现在的问题。需这里的接口1是你的VS。故通过醒询其配置描述符如下:

386行

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x02 (Video Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x06 (String Descriptor 6)
Data (HexDump)           : 09 04 01 00 01 0E 02 00 06                        .........

471行

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x01
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x02 (Video Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x06 (String Descriptor 6)
Data (HexDump)           : 09 04 01 01 01 0E 02 00 06

可以看到,你使用了同步的方式来设置,故应该386行的接口下应无端点,但你的有1个。
而471行之后的应用一个同步传输的端点。但你的是BULK传输的。

所以,修改方式有人种:
第一种是直接删除471行之后的所有代码,保留386行中的bulk端点。
第二种是删除386中的端点,把471行中的端点改为同步方式。
以上修改同时得将固件中对应的端点初始化也应修改。

如对以上的不懂,请认真学习同步方式和批量传输方式的实现原理。