moeru-ai/airi · error · Error

The DualSense connection type is unknown.

Error message

The DualSense connection type is unknown.

What it means

buildDualSenseOutputReport must pick a report layout (reportId 0x02/47-byte USB vs 0x31/77-byte Bluetooth with checksum) from connectionType. The sentinel guard rejects 'unknown' — the value detectDualSenseConnectionType produces when the HID report descriptor matches neither known transport — because there is no correct byte layout to emit for an unrecognized transport.

Source

Thrown at packages/input-playstation-dualsense-5/src/output-report.ts:37

export function buildDualSenseOutputReport(
  connectionType: DualSenseConnectionType,
  output: DualSenseOutputState,
  sequenceNumber = 1,
): DualSenseOutputReport {
  if (connectionType === 'unknown')
    throw new Error('The DualSense connection type is unknown.')

  const reportId = connectionType === 'bluetooth' ? 0x31 : 0x02
  const data = new Uint8Array(connectionType === 'bluetooth' ? 77 : 47)
  const commonOffset = connectionType === 'bluetooth' ? 2 : 0
  const common = new DataView(data.buffer, commonOffset, 47)

View on GitHub (pinned to 9c213115f8)

Solutions

  1. Ensure the controller was constructed via DualSenseController so detectDualSenseConnectionType ran on a verified DualSense device; an 'unknown' type usually means the device passed manual construction without verification.
  2. Update the connection-type detection (vendor/product IDs, descriptor checks in web-hid.ts) if a new DualSense hardware revision reports an unexpected descriptor.
  3. In UI, hide or disable rumble/lightbar controls when `controller.connectionType === 'unknown'` instead of sending.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/input-playstation-dualsense-5/src/output-report.ts:37 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of moeru-ai/airi@9c213115f8 (2026-09-02). Data as JSON: /api/errors/b47666e1942aa95a. Report an issue: GitHub.