| Previous | Next |
| kIOUSBPIDCheckErr | kIOUSBReserved1Err |
kIOUSBWrongPIDErr
A valid-looking packet arrived at the wrong point in the transaction
kIOUSBWrongPIDErr is different from a failed PID check. Here the packet identifier can be recognized, but it is bad or unexpected for the transaction state the controller was processing. The failure is therefore about transaction sequencing or what the receiver observed on the bus, not simply an invalid application command buffer.
Do not merge this result with kIOUSBPIDCheckErr. A PID-check failure means the identifier's own check bits did not validate. A wrong PID means that a recognizable identifier did not fit the expected token, data, or handshake phase. Both can lead to endpoint recovery, but they guide different questions when reviewing a trace.
What to inspect before retrying
- Capture the complete transaction around the failure: endpoint address, direction, transfer type, setup or class request when applicable, and the last successful packet sequence.
- Verify that the endpoint type and direction selected by the application match the active configuration and alternate setting. A device can expose several interfaces with similar endpoint numbers but different roles.
- Correlate the code with resets, resume events, cable or hub changes, and any concurrent access to the same endpoint. A sequencing symptom can follow a lifecycle transition even when the application-level request did not change.
- Choose recovery from the device class protocol. Clearing an endpoint or re-enumerating can restore transport state, but it does not make a partially executed non-idempotent operation safe to replay automatically.
Do not use the code as a complete packet trace
Apple documents that some controller paths report coarser errors than the underlying event. The return code is valuable for identifying the failing layer, but it should be combined with controller diagnostics and endpoint-level context before blaming the device firmware or host application.
References
- Apple: kIOUSBWrongPIDErr
- Apple: USB pipes, transfer types, and controller error reporting
- USB-IF: packet recognition, PID handling, and USB serial-interface engines
Looking for a different code? Search another status or error code.