简体   繁体   English

USB设备枚举失败:“设备描述符读取/ 64,错误-32”

[英]USB device enumeration fails: “device descriptor read/64, error -32”

I'm developing a ttyACM device with ST microcontroller, and with the same code, my host could sometimes enumerate it successfully (below) but sometimes it just dump the below message. 我正在使用ST微控制器开发一个ttyACM设备,并且使用相同的代码,我的主机有时可以成功地枚举它(下面),但有时它只是转储下面的消息。 What does error -32 mean? 错误-32是什么意思?

[FAIL TO ENUMERATE] [未能注册]

usb 1-2.1: new full speed USB device number 62 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 63 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 64 using ehci_hcd
usb 1-2.1: device not accepting address 64, error -32
usb 1-2.1: new full speed USB device number 65 using ehci_hcd
usb 1-2.1: device not accepting address 65, error -32
hub 1-2:1.0: unable to enumerate USB device on port 1

[SUCCESSFUL RESULT] [成功结果]

usb 1-3.1: new full speed USB device number 45 using ehci_hcd
usb 1-3.1: New USB device found, idVendor=0483, idProduct=5740
usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3.1: Product: ChibiOS/RT Virtual COM Port
usb 1-3.1: Manufacturer: HelloWord
usb 1-3.1: SerialNumber: 262
usb 1-3.1: configuration #1 chosen from 1 choice
cdc_acm 1-3.1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-3.1:1.0: ttyACM0: USB ACM device

Thanks a lot. 非常感谢。

AFAIK status -32 means "Broken pipe" (EPIPE). AFAIK状态-32表示“断管”(EPIPE)。 It means that there are problems with usb communication (protocol). 这意味着usb通信(协议)存在问题。 For example usb-device doesn't answer correctly for usb-request, and sending some data that are not expected by host or sends not enough data. 例如,usb-device无法正确回答usb-request,并发送一些主机不期望的数据或发送的数据不足。 There may be also other reasons. 可能还有其他原因。

The first message tells that there are problems with "get device descriptor" and "set address" requests from host. 第一条消息告知来自主机的“获取设备描述符”和“设置地址”请求存在问题。 Those are basic requests sending by host at the very beginning of enumeration process. 这些是主机在枚举过程开始时发送的基本请求。 You can't go further if those requests cannot be succesfully serviced by usb-device. 如果这些请求无法通过usb-device成功提供服务,那么您无法继续前进。

This error can be caused by clocking the on-chip USB device at the wrong frequency. 通过以错误的频率为片上USB设备提供时钟可能会导致此错误。 Check your clock tree configuration. 检查时钟树配置。 The frequency should be 48MHz. 频率应为48MHz。 If it's slightly off, it's possible that enumeration would sometimes be successful and sometimes fail. 如果稍微偏离,枚举有时可能会成功,有时会失败。 If it's way off, enumeration will always fail. 如果它是关闭的,枚举将永远失败。 Various errors are possible including the ones you listed. 可能存在各种错误,包括您列出的错误。

I have installed the XCP-NG server in one laptop and my system was not booting either due to this error: USB 3-1 device descriptor read/64, error 32 我已将XCP-NG服务器安装在一台笔记本电脑中,由于此错误,我的系统无法启动:USB 3-1设备描述符读取/ 64,错误32

I tried a lot of things. 我尝试了很多东西。 Even disconnecting the USB ports. 甚至断开USB端口。

Until I recalled that I have removed the default SR repository for Xen. 直到我回忆起我已经删除了Xen的默认SR存储库。 So I went to check the /etc/fstab file 所以我去检查/ etc / fstab文件

[root@xcpserver2 ~]# cat /etc/fstab
LABEL=root-jvgtod    /         ext3     defaults,noatime   1  1
LABEL=swap-jvgtod          swap      swap   defaults   0  0
LABEL=logs-jvgtod    /var/log         ext3     defaults,noatime   0  2
/opt/xensource/packages/iso/XenCenter.iso   /var/xen/xc-install   iso9660   loop,ro   0  0

The default SR repository was trying to get the content of the last line. 默认的SR存储库试图获取最后一行的内容。 I tried to comment it and it worked!! 我试着评论它,它的确有效! :) I concluded that this error it also showing when there is a problem at the /etc/fstab file. :)我得出结论,这个错误它也显示在/ etc / fstab文件时出现问题。 I hope it helps! 我希望它有所帮助!

So, my /etc/fstab file looks like this now and it solved the issue: 所以,我的/ etc / fstab文件现在看起来像这样,它解决了这个问题:

[root@xcpserver2 ~]# cat /etc/fstab
LABEL=root-jvgtod    /         ext3     defaults,noatime   1  1
LABEL=swap-jvgtod          swap      swap   defaults   0  0
LABEL=logs-jvgtod    /var/log         ext3     defaults,noatime   0  2
#/opt/xensource/packages/iso/XenCenter.iso   /var/xen/xc-install   iso9660   loop,ro   0  0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM