fix(hal): open the FIDO HID non-exclusively on macOS

macOS holds FIDO-usage-page (0xF1D0) HID devices exclusively, so hidapi's
default open fails with 0xE00002C5 ("exclusive access and device already
open") and the entire FIDO transport is unreachable. GetInfo, the VID/PID
seed and hardware-config-over-FIDO then silently fall back to rescue-only,
leaving the Configuration screen blank on an otherwise healthy key.

Enable hidapi's `macos-shared-device` feature so opens go through
hid_darwin_set_open_exclusive(0). No-op on Linux/Windows; hidapi 2.6
explicitly allows several concurrent HidApi contexts.
This commit is contained in:
Maxim Muravev
2026-07-19 18:33:39 +03:00
parent fd0752b152
commit e5b2219679
+4 -1
View File
@@ -20,7 +20,10 @@ hex = "0.4" # For parsing VID/PID strings
byteorder = "1.5" # Required for writing Big-Endian numbers (firmware requirement)
thiserror = "2" # Makes custom error handling much easier
anyhow = "1" # For easy error propagation
hidapi = "2.6" # For fido2 interface operations but non-standard commands
# macos-shared-device opens the FIDO HID non-exclusively; without it macOS holds
# FIDO devices exclusively and hidapi's open fails (0xE00002C5), stranding the
# whole FIDO transport. No-op on Linux/Windows. See hid_darwin_set_open_exclusive.
hidapi = { version = "2.6", features = ["macos-shared-device"] } # fido2 + non-standard cmds
serde_cbor_2 = "0.13"
rand = "0.10"
bitflags = "2.13.0"