Files
unleashed-firmware/lib/lfrfid
b8c5858f40 [RFID]: Fix reading T5577 tags that hold multiple EM4100 IDs (#1025)
* [LFRFID]: Fix reading T5577 tags that hold multiple EM4100 IDs

A T5577 configured to emit more than one EM4100 frame per cycle (e.g. two IDs
written by the T5577 Multi Writer app) hung on Read.

The Electra protocol (2024) gave the EM4100 decoder a 64-bit "the frame must be
followed by a header" lookahead to tell EM4100 and Electra apart. That pushed
each decode ~128 bits past the read worker's per-decode reset, so a two-frame
tag locked into rigid A/B alternation and never produced the 3 identical decodes
in a row that Read requires.

Only a 9-bit lookahead is actually needed (Electra's epilogue never begins with
9 ones), so shrink the epilogue register to 9 bits. This restores the
pre-Electra decode timing while keeping EM4100/Electra disambiguation. Also reset
encoded_epilogue in decoder_start, which the original change omitted.

Fixes #1024

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

* [LFRFID]: Reset encoded_data in PAC/Stanley decoder_start

protocol_pac_stanley_decoder_start reset data/inverted/got_preamble but never
the encoded_data shift buffer - missing since the protocol was added, and unlike
every sibling decoder. Latent in practice (the buffer self-refreshes and
decoding is preamble/parity/checksum-gated), fixed for consistency.

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

* [LFRFID]: Changelog for multi-EM4100 T5577 read fix (#1025)

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 18:28:11 +03:00
..
2026-06-09 06:14:32 +03:00
2024-07-15 20:02:45 +03:00
2024-07-15 20:02:45 +03:00
2024-07-15 20:02:45 +03:00
2024-07-15 20:02:45 +03:00