Windows下USB百科
+ -

USB状态错误码USBD_STATUS对照表

2021-10-27 6149 0

USBDI.H定义了一组USB_STATUS_XXX的值. 这些值是从URB的状态字段是对IRP_MJ_INTERNAL_DEVICE_CONTROL调用的USB传输状态返回标识。USBD将URB状态码映射到有效的NTSTATUS码中(但具体详情还得看USBD_STAUTS_XXX的值),在完成IRP时将IRP中的状态字段设置为NSTATUS的代码。

比如USB的同步传输时,有时由于USBD_STATUS_ISOCH_REQUEST_FAILED,但IRP的状态码仅返回为STATUS_SUCCESSFUL.

USBD_STATUS可以通地BUSHOUND抓包的USTS(USB STATUS)来抓包。
USTS

头文件:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\usb.h

USBD_STATUS定义了USB请求的状态值。

typedef LONG USBD_STATUS;
含义
00 (USBD_STATUS_SUCCESS) Request was completed with success.
01 (USBD_STATUS_PENDING) Request is pending.
10 or 11 (USBD_STATUS_ERROR) Request was completed with an error.

下表中定义了USB状态值的最低有效28位。

代码 含义
USBD_STATUS_CRC 0xC0000001 CRC error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_BTSTUFF 0xC0000002 BTS error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_DATA_TOGGLE_MISMATCH 0xC0000003 Data toggle mismatch.
USBD_STATUS_STALL_PID 0xC0000004 The device returned a stall packet identifier (defined for backward compatibility with the USB 1.0)
USBD_STATUS_DEV_NOT_RESPONDING 0xC0000005 The device is not responding (defined for backward compatibility with the USB 1.0).
USBD_STATUS_PID_CHECK_FAILURE 0xC0000006 The device returned a packet identifier check failure (defined for backward compatibility with the USB 1.0).
USBD_STATUS_UNEXPECTED_PID 0xC0000007 The device returned an unexpected packet identifier error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_DATA_OVERRUN 0xC0000008 The device returned a data overrun error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_DATA_UNDERRUN 0xC0000009 The device returned a data underrun error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_RESERVED1 0xC000000A Reserved.
USBD_STATUS_RESERVED2 0xC000000B Reserved.
USBD_STATUS_BUFFER_OVERRUN 0xC000000C The device returned a buffer overrun error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_BUFFER_UNDERRUN 0xC000000D The device returned a buffer underrun error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_NOT_ACCESSED 0xC000000F The USB stack could not access the device (defined for backward compatibility with the USB 1.0).
USBD_STATUS_FIFO 0xC0000010 The device returned a FIFO error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_XACT_ERROR 0xC0000011 The device returned a transaction error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_BABBLE_DETECTED 0xC0000012 The device returned a babble detected error (defined for backward compatibility with the USB 1.0).
USBD_STATUS_DATA_BUFFER_ERROR 0xC0000013 Hardware status codes that range from 0x00000001 to 0x000000FF (defined for backward compatibility with the USB 1.0 stack).
USBD_STATUS_NO_PING_RESPONSE 0xC0000014 No response was received from the device for a ping packet sent by the host.
USBD_STATUS_INVALID_STREAM_TYPE 0xC0000015 The stream type is invalid for the endpoint.
USBD_STATUS_INVALID_STREAM_ID 0xC0000016 The stream identifier is invalid.
USBD_STATUS_ENDPOINT_HALTED 0xC0000030 A transfer was submitted to an endpoint that is stalled.
USBD_STATUS_INVALID_URB_FUNCTION 0x80000200 Invalid URB function.
USBD_STATUS_INVALID_PARAMETER 0x80000300 Invalid parameter.
USBD_STATUS_ERROR_BUSY 0x80000400 The client driver caused an error by attempting to close an endpoint, interface, or configuration handle with outstanding transfers.
USBD_STATUS_REQUEST_FAILED 0x80000500 The hub driver cannot complete a URB request.
USBD_STATUS_INVALID_PIPE_HANDLE 0x80000600 Invalid pipe handle.
USBD_STATUS_NO_BANDWIDTH 0x80000700 There was not enough bandwidth to open a requested endpoint.
USBD_STATUS_INTERNAL_HC_ERROR 0x80000900 Unspecified host controller error.
USBD_STATUS_ERROR_SHORT_TRANSFER 0x80000900 The transfer ended with a short packet, but the USBD_SHORT_TRANSFER_OK bit is not set for the pipe.
USBD_STATUS_BAD_START_FRAME 0xC0000A00 The requested start frame is not within a range of USBD_ISO_START_FRAME_RANGE frames of the current USB frame. Whenever this error occurs, the system sets the stall bit on the pipe.
USBD_STATUS_ISOCH_REQUEST_FAILED 0xC0000B00 The host controller returns this error whenever all packets in an isochronous transfer complete with an error.
USBD_STATUS_FRAME_CONTROL_OWNED 0xC0000C00 The hub driver returns this error whenever the frame length control for the host controller is being used by a driver other than the host controller driver.
USBD_STATUS_FRAME_CONTROL_NOT_OWNED 0xC0000D00 The hub driver returns this error if the caller does not own frame length control and attempts to release or modify the host controller frame length.
USBD_STATUS_NOT_SUPPORTED 0xC0000E00 The request was not supported.
USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR 0xC0000F00 Invalid configuration descriptor.
USBD_STATUS_INSUFFICIENT_RESOURCES 0xC0001000 Insufficient resources.
USBD_STATUS_SET_CONFIG_FAILED 0xC0002000 An attempt to change the device configuration failed.
USBD_STATUS_BUFFER_TOO_SMALL 0xC0003000 The buffer is too small.
USBD_STATUS_INTERFACE_NOT_FOUND 0xC0004000 The interface was not found.
USBD_STATUS_INAVLID_PIPE_FLAGS 0xC0005000 Invalid pipe flags.
USBD_STATUS_TIMEOUT 0xC0006000 The request timed out.
USBD_STATUS_DEVICE_GONE 0xC0007000 The device is no longer present in the system.
USBD_STATUS_STATUS_NOT_MAPPED 0xC0008000 The device bus address is not mapped to system memory.
USBD_STATUS_HUB_INTERNAL_ERROR 0xC0009000 The hub driver returns this error whenever it intercepted a URB that was targeted at some other device.
USBD_STATUS_CANCELED 0xC0010000 The USB stack reports this error whenever it completed a transfer because of an AbortPipe request from the client driver.
USBD_STATUS_ISO_NOT_ACCESSED_BY_HW 0xC0020000 The host controller did not access the transfer descriptor (TD) that is associated with this packet. The USB stack reports this error in the packet status field of an isochronous transfer packet.
USBD_STATUS_ISO_TD_ERROR 0xC0030000 The host controller reported an error in the transfer descriptor (TD). The USB stack reports this error in the packet status field of an isochronous transfer packet.
USBD_STATUS_ISO_NA_LATE_USBPORT 0xC0040000 The client driver submitted the packet on time, but the packet failed to reach the miniport driver on time. The USB stack reports this error in the packet status field of an isochronous transfer packet.
USBD_STATUS_ISO_NOT_ACCESSED_LATE 0xC0050000 The client driver did not submit the packet on time. The USB stack reports this error in the packet status field of an isochronous transfer packet.
USBD_STATUS_BAD_DESCRIPTOR 0xC0100000 Invalid descriptor.
USBD_STATUS_BAD_DESCRIPTOR_BLEN 0xC0100001 Invalid descriptor length.
USBD_STATUS_BAD_DESCRIPTOR_TYPE 0xC0100002 Invalid descriptor type.
USBD_STATUS_BAD_INTERFACE_DESCRIPTOR 0xC0100003 Invalid interface descriptor.
USBD_STATUS_BAD_ENDPOINT_DESCRIPTOR 0xC0100004 Invalid endpoint descriptor.
USBD_STATUS_BAD_INTERFACE_ASSOC_DESCRIPTOR 0xC0100005 Invalid interface association descriptor.
USBD_STATUS_BAD_CONFIG_DESC_LENGTH 0xC0100006 Invalid configuration descriptor length.
USBD_STATUS_BAD_NUMBER_OF_INTERFACES 0xC0100007 Invalid number of interfaces.
USBD_STATUS_BAD_NUMBER_OF_ENDPOINTS 0xC0100008 Invalid number of endpoints.
USBD_STATUS_BAD_ENDPOINT_ADDRESS 0xC0100009 Invalid endpoint address.
HID人机交互QQ群:564808376    UAC音频QQ群:218581009    UVC相机QQ群:331552032    BOT&UASP大容量存储QQ群:258159197    STC-USB单片机QQ群:315457461    USB技术交流QQ群2:580684376    USB技术交流QQ群:952873936   

0 篇笔记 写笔记

关于UVC摄像头指示灯的调试过程总结
最近遇到了一个很是奇怪的UVC摄像头指示灯问题,现象如下:上层应用是一个会议系统软件,当需要进行会议时,点击会议按钮添加会议。这时应用软件打开摄像头,并开始与服务器进行网络连接。当然由于摄像头的打开,摄像头指示灯点亮。上层应用软件与服务器连接后,进行会议界面。这时突然摄像头指示灯熄灭,但会议正常,摄......
UVC PTZ和扩展单元XU的过滤与分发调试笔记
在写这篇文章之前,我得首先感谢微软,感谢你的不严格,让我可以有空子可钻,不至于太过狼狈…记得看过一句话,开局一张图,内容全告编。我多么希望自己在UVC摄像头的调试过程中也可以瞎编乱造,这样不至于身心疲惫。至少保持着愉快的心情,吹吹牛,也是一件很开心的事。今日有一个需求,对UVC摄像头的请求进行......
U盘枚举失败-该设备无法启动(GET_MAX_LUN请求)
群里有人用STM32搞了一个U盘,但是U盘在插入电脑后在设备管理器是枚举失败。我让他看一下设备状态:又是熟悉的错误码10,表示设备启动失败。设备的启动失败,一般在设备获取描述符获取之后,初始会失败,我之前在弄USB虚拟鼠标的时候也遇到此类情况。不过由于这个设备是U盘,本人还没有研究USB存储协议,只......
BUSHOUND抓包stall pid的USTS c0000004错误
对USB设备进行数据分析,使用最多的也就是BUSHOUND了,不过经常遇到一个问题就是 USTS c0000004 stall pid 错误。USTS c0000004 stall pid在本站中搜......
HID设备SET_IDLE时遇到c0000004
下午,USB中文网技术交流群里的一个同学,说他的HID设备时好时不好的,有时会花很长的时间才能枚举成功。没有抓包,没的截图…我是一顿乱扯,从硬件电路到各种抓包方法….晚上11点,这位同学发来了BUSHOUND抓的包,打开一看:Device Length Phase Data ......
USB状态错误码USBD_STATUS对照表
USBDI.H定义了一组USB_STATUS_XXX的值. 这些值是从URB的状态字段是对IRP_MJ_INTERNAL_DEVICE_CONTROL调用的USB传输状态返回标识。USBD将URB状态码映射到有效的NTSTATUS码中(但具体详情还得看USBD_STAUTS_XXX的值),在完成IR......
BusHound抓包的USTS数据内容来源介绍
在Windows操作系统下开发USB设备驱动程序,或者分析USB设备固件通讯的时候,难免遇到一个错误信息,其中一项重要的数据条目就是USTS的显示。如:Device Phase Data Description Cmd.Phase.......
USB设备通过BUSHOUND抓包IRP被取消USTS状态为0xC0010000
通过BUSHOUND抓包内容为: 16.0 CTL 80 06 00 02 00 00 20 00 GET DESCRIPTOR 336us 16.0 32 IN 09 02 20 00 ......
驱动级细述USB状态码USBD_STATUS_STALL_PID
USBD_STATUS_STALL_PID错误经常出现在USB抓包过程中。特别是以BUSHOUND为代表的Windows抓包工具。如: 31.1 RESET 31.1 ......
USB-UAC麦克风音频数据传输USBD_STATUS_ISOCH_REQUEST_FAILED/USTSU状态C0000B00分析
今天,同事突然说麦克风出声问题了,插拔硬件可以恢复。让协助定位分析一下问题。首先本人通过音频控制面板看到,当麦克风打开时,使用麦克风采集有声音的环境的声音,指定设备的音频控制面板的能量条无任何的波动。本图似为效果演示,实际并非本设备所以本人初步定位,音频设备无法读取到数据引起的。无能量条......
关注公众号
  • HID人机交互
  • Linux&USB
  • UAC音频
  • TYPE-C
  • USB规范
  • USB大容量存储
  • USB百科
  • USB周边
  • UVC摄像头
  • Windows系统USB
  • 音视频博客
  • 取消
    感谢您的支持,我会继续努力的!
    扫码支持
    扫码打赏,你说多少就多少

    打开支付宝扫一扫,即可进行扫码打赏哦

    您的支持,是我们前进的动力!