Skip to content

fix(nodewebusb): drop legacy PID 0x0001 from WebUSB getDevice filter#49

Draft
BitHighlander wants to merge 1 commit into
developfrom
fix/webusb-skip-legacy-pid-develop
Draft

fix(nodewebusb): drop legacy PID 0x0001 from WebUSB getDevice filter#49
BitHighlander wants to merge 1 commit into
developfrom
fix/webusb-skip-legacy-pid-develop

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Problem

Users with old (2019-era, PID 0x0001) KeepKeys report failures connecting to update — including a misleading "Firmware 6.1.0 or later is required" path, and confusion around "device connected to another device."

Root cause

The WebUSB adapter's getDevice() filter matched both WEBUSB_PRODUCT_ID (0x0002) and the legacy HID_PRODUCT_ID (0x0001). But the TransportDelegate constructor rejects any non-0x0002 PID with FirmwareUpdateRequired("KeepKey", "6.1.0"). So WebUSB can never serve a 0x0001 device — matching it in the active pair filter only produced a doomed WebUSB attempt and a misleading firmware-update error before the caller's HID fallback ran.

Fix

Remove 0x0001 from the getDevice request filter. Old devices now skip WebUSB cleanly and pair over HID (the transport they actually need). getDevices() (passive enumeration) still lists 0x0001 for detection, so device-present signaling is unaffected.

Notes

  • No behavior change for modern 0x0002 devices.
  • The genuine "connected to another device" case is claimInterface code-19 → ConflictingApp (real contention), unchanged by this PR.

Test plan

  • Old PID 0x0001 device: connect → pairs via HID without the "Firmware 6.1.0 required" error; firmware update flow proceeds.
  • Modern PID 0x0002 device: connect/update unchanged.
  • Device-detected (on-bus) signaling still works for an old device.

⚠️ Needs verification on real 0x0001 hardware before merge. Consumer (keepkey-vault) requires a submodule-pointer bump after this merges.

WebUSB can never serve a 0x0001 device — the TransportDelegate ctor
rejects any non-0x0002 PID with FirmwareUpdateRequired. Matching 0x0001
in the active pair filter only produced a doomed WebUSB attempt and a
misleading 'Firmware 6.1.0 required' error before the caller's HID
fallback. Old devices now skip WebUSB cleanly and pair over HID.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hdwallet-sandbox Ready Ready Preview, Comment Jun 27, 2026 9:40pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant