bitspire/apps/machine/electron
Patrick Mulligan ffbacafe39 fix(nfc): auto-recover a wedged CCID reader via USB power-cycle
The Feitian R502-CL (and cheap CCID readers generally) can wedge: it keeps
detecting a card but every APDU returns "card absent or mute", and ONLY a
USB power-cycle clears it — restarting pcscd or the app does not (confirmed
on-device). Until now that left cash-out/cash-in taps dead until a manual
replug.

- nfc-service.ts: count consecutive read failures; after 3 (gated by a 30s
  cooldown so a still-wedged reader can't reset-loop) trigger
  nfc-reader-reset.service. nfc-pcsc then re-detects the reader on USB
  hotplug with no app restart (verified live).
- batm3.nix: nfc-reader-reset.service (oneshot, root) re-binds the reader's
  USB device (a software replug); reader-agnostic via the CCID interface
  class (0x0B) so it also covers a future ACR1252U. A polkit rule lets the
  unprivileged `bitspire` app start just that one unit.

Hardware track (separate): the durable fix is a better reader (ACR1252U —
large antenna for behind-panel, firmware-upgradable). This change makes any
reader's wedge a ~2s self-heal in the meantime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-06 19:51:39 +02:00
..
__tests__ fix(machine): decrement cassettes by position, not denomination, on cash-out 2026-07-04 00:28:24 +02:00
fund-atm.ts chore(machine): fund-atm resumes from binding; VITE_SPIRE_SEED docs/env 2026-06-19 00:15:59 +02:00
hal-service.ts fix(hal): EBDS escrow stack/return latch + return-on-disable 2026-07-30 00:40:06 +02:00
lnurl-pay.test.ts feat(machine): Bolt Card (NFC) tap-to-receive on cash-in 2026-08-06 00:30:13 +02:00
lnurl-pay.ts feat(machine): Bolt Card (NFC) tap-to-receive on cash-in 2026-08-06 00:30:13 +02:00
lnurl-withdraw.test.ts feat(machine): LNURL-withdraw executor for Bolt Card cash-out (LUD-03) 2026-08-05 04:34:38 +02:00
lnurl-withdraw.ts feat(machine): LNURL-withdraw executor for Bolt Card cash-out (LUD-03) 2026-08-05 04:34:38 +02:00
main.ts feat(machine): Bolt Card (NFC) tap-to-receive on cash-in 2026-08-06 00:30:13 +02:00
nfc-service.test.ts fix(machine): read NTAG424 NDEF via Capability Container (Bolt Card FileID) 2026-08-05 20:02:26 +02:00
nfc-service.ts fix(nfc): auto-recover a wedged CCID reader via USB power-cycle 2026-08-06 19:51:39 +02:00
preload.ts feat(machine): Bolt Card (NFC) tap-to-receive on cash-in 2026-08-06 00:30:13 +02:00
state-store.ts fix(machine): decrement cassettes by position, not denomination, on cash-out 2026-07-04 00:28:24 +02:00
tsconfig.json feat(machine): add HAL IPC bridge for real hardware in Electron 2026-02-25 17:02:13 -05:00
tsconfig.preload.json feat(docker): add dev.sh with auto-funding and ATM app setup 2026-02-15 14:19:16 -05:00