em4x50: reply deadline for read / info retries

The retry check estimated the next attempt from the longest one so far.
That does not bound it:
- get_pulse_length() waits up to 4 bit periods
- one find_double_listen_window() can take about 3.2 s with no signal
- a login + read attempt can take over 6 s
- setup before tstart was not counted

A slow attempt after fast failures could end after the client gave up,
leaving the late reply queued for the next command.

read and info now set a deadline after setup, 1 s before the client
timeout. The listen window, ACK and word decode loops stop at the
deadline, as do the retries. With no deadline set (write, brute, sim,
...) they behave as before. The client waits 5 s for read, as it
already did for info / dump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-09 14:19:44 +07:00
1 parent 6cdccfb2df
commit 1f543f3ced
4 files changed
+29 -21

No files matched your search

+1
View File
@@ -56,6 +56,7 @@
// misc
#define EM4X50_TIMEOUT_CMD 3000
#define EM4X50_TIMEOUT_INFO 5000 // 34 words, with read retries
#define EM4X50_TIMEOUT_READ 5000 // read / info, device replies 1 s earlier
#define EM4X50_DUMP_FILESIZE 136
typedef struct {