{
  "id": "embedded/usb-hid-endpoint-stall",
  "signature": "USB HID: endpoint 0x81 stalled, host reset required",
  "signature_zh": "USB HID：端点0x81停滞，需要主机复位",
  "regex": "USB HID.*endpoint 0x[0-9A-Fa-f]+ stalled.*host reset required",
  "domain": "embedded",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "USB HID endpoint stalled due to protocol violation (e.g., report size mismatch, invalid report ID, or host sending unsupported request).",
  "root_cause_type": "generic",
  "root_cause_zh": "USB HID端点因协议违规而停滞（例如，报告大小不匹配、无效的报告ID或主机发送不支持请求）。",
  "versions": [
    {
      "version": "USB HID v1.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "STM32 USB Device Library v2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "TinyUSB v0.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Re-enumerate the device by power-cycling the USB cable",
      "why_fails": "The stall condition persists because the firmware does not clear the endpoint halt condition; enumeration alone does not fix the logic error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase USB buffer size to accommodate larger reports",
      "why_fails": "Stall is caused by protocol mismatch, not buffer overflow; larger buffers do not resolve incorrect report descriptors.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable endpoint halt in firmware unconditionally",
      "why_fails": "Forces data transfer but may cause host-side timeout or data corruption if the report format is still invalid.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify HID report descriptor matches the actual report size sent. Use a USB analyzer (e.g., Wireshark with usbmon) to capture host requests and ensure firmware responds correctly.",
      "success_rate": 0.85,
      "how": "Verify HID report descriptor matches the actual report size sent. Use a USB analyzer (e.g., Wireshark with usbmon) to capture host requests and ensure firmware responds correctly.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement a callback to clear endpoint stall on host request (e.g., ClearFeature(ENDPOINT_HALT)). In STM32 USB stack, override USBD_HID_SetupStage.",
      "success_rate": 0.8,
      "how": "Implement a callback to clear endpoint stall on host request (e.g., ClearFeature(ENDPOINT_HALT)). In STM32 USB stack, override USBD_HID_SetupStage.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify HID report descriptor matches the actual report size sent. Use a USB analyzer (e.g., Wireshark with usbmon) to capture host requests and ensure firmware responds correctly.",
    "Implement a callback to clear endpoint stall on host request (e.g., ClearFeature(ENDPOINT_HALT)). In STM32 USB stack, override USBD_HID_SetupStage."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.usb.org/document-library/device-class-definition-hid-111",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-08",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}