USB device enumeration fails: "device descriptor read/64, error -32"

Shan picture Shan · Mar 12, 2014 · Viewed 29k times · Source

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. What does error -32 mean?

[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.

Answer

user2699113 picture user2699113 · Mar 12, 2014

AFAIK status -32 means "Broken pipe" (EPIPE). It means that there are problems with usb communication (protocol). 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. 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.