Commit Graph

3 Commits

Author SHA1 Message Date
lronetto
22fca0246c Add auto-reconnect and diagnostic hints for serial Access Denied errors
The previous fix (port access lock) only addressed contention between
our own read/write threads. A recurring "ClearCommError failed -
Acesso negado" after the lock fix indicates the OS is invalidating the
port handle itself (USB power management suspending the port, the
RFID module browning out under high RF output power, or another app
holding the port) rather than an internal race.

Add:
- A "Reconectar automaticamente" checkbox (on by default) that retries
  opening the port with backoff (up to 5 attempts) after any fatal
  serial error, resuming the scan automatically if one was active.
- A generation counter so stale scheduled reconnects are discarded if
  the user manually connects/disconnects in the meantime.
- An actionable hint logged on fatal errors explaining the likely
  causes and how to fix each one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 15:38:29 +00:00
lronetto
d93be84bda Fix Windows PermissionError (WinError 5) during continuous scan
Reading and writing the serial port from different threads without
synchronization can trigger "GetOverlappedResult failed / WriteFile
failed - Acesso negado" on Windows with some USB-serial drivers. Add a
lock guarding all access to the Serial object, make the reader loop
non-blocking (in_waiting + short sleep instead of blocking read), and
recover cleanly to a reconnectable UI state on any fatal serial error
instead of leaving the app stuck in a broken "connected" state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 15:25:36 +00:00
lronetto
7b41ac054b Add UHF RFID reader GUI app for Fonkan/JRD-100/M100 modules
Tkinter desktop app to connect over serial, configure baudrate/output
power, start/stop tag inventory, and display detected EPC tags in a
table with RSSI and read count.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 15:04:56 +00:00