{
  "id": "embedded/usb-hid-report-descriptor-too-large",
  "signature": "USB HID: Report descriptor too large, max allowed 64 bytes but descriptor size is 128 bytes",
  "signature_zh": "USB HID：报告描述符过大，最大允许 64 字节但描述符大小为 128 字节",
  "regex": "USB HID: Report descriptor too large, max allowed \\d+ bytes but descriptor size is \\d+ bytes",
  "domain": "embedded",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "USB HID report descriptor exceeds the maximum size defined in device configuration descriptor (bMaxPacketSize0), typically 64 bytes for full-speed devices.",
  "root_cause_type": "generic",
  "root_cause_zh": "USB HID 报告描述符超过设备配置描述符中定义的最大大小（bMaxPacketSize0），对于全速设备通常为 64 字节。",
  "versions": [
    {
      "version": "STM32 USB Device Library 2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "TinyUSB 0.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ARM GCC 12.2.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase bMaxPacketSize0 in USB descriptor to 128 bytes",
      "why_fails": "bMaxPacketSize0 is limited by USB specification (64 bytes for full-speed, 512 for high-speed); increasing beyond spec causes host rejection.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Split report descriptor across multiple endpoints",
      "why_fails": "HID class does not support multi-packet report descriptors; descriptor must fit in one control transfer.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Compress report descriptor by using short items (e.g., replace INPUT(Data,Var,Abs) with INPUT(Const) for unused fields) and remove redundant usage pages. Example: replace multiple 4-byte items with 2-byte short forms.",
      "success_rate": 0.85,
      "how": "Compress report descriptor by using short items (e.g., replace INPUT(Data,Var,Abs) with INPUT(Const) for unused fields) and remove redundant usage pages. Example: replace multiple 4-byte items with 2-byte short forms.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Switch to high-speed USB mode if hardware supports it (bMaxPacketSize0 = 512 bytes). Update device descriptor: bcdUSB = 0x0200 and configure PHY for HS. This allows larger report descriptors up to 512 bytes.",
      "success_rate": 0.75,
      "how": "Switch to high-speed USB mode if hardware supports it (bMaxPacketSize0 = 512 bytes). Update device descriptor: bcdUSB = 0x0200 and configure PHY for HS. This allows larger report descriptors up to 512 bytes.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Compress report descriptor by using short items (e.g., replace INPUT(Data,Var,Abs) with INPUT(Const) for unused fields) and remove redundant usage pages. Example: replace multiple 4-byte items with 2-byte short forms.",
    "Switch to high-speed USB mode if hardware supports it (bMaxPacketSize0 = 512 bytes). Update device descriptor: bcdUSB = 0x0200 and configure PHY for HS. This allows larger report descriptors up to 512 bytes."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.usb.org/document-library/hid-usage-tables-112",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-06-19",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}