Skip to content

fix: use correct ISO-DEP block number after response chaining#3

Open
Sped0n wants to merge 2 commits into
m5stack:mainfrom
Sped0n:fix-isodep-chaining
Open

fix: use correct ISO-DEP block number after response chaining#3
Sped0n wants to merge 2 commits into
m5stack:mainfrom
Sped0n:fix-isodep-chaining

Conversation

@Sped0n
Copy link
Copy Markdown

@Sped0n Sped0n commented May 20, 2026

Problem

ISO-DEP response chaining did not keep the PCD block number synchronized with the final PICC I-block. After receiving a chained response, the next command could be sent with the wrong I-block BN, causing protocol desync with cards that return multi-frame responses.

Change Overview

  • Track the last received PICC I-block BN during transceiveINF().
  • Set the next PCD block number from the final PICC response block.
  • Add a regression test covering chained response ACK BN and next-command BN sync.

Testing

Tested on M5NanoC6 with Unit NFC: platformio test -e test_UnitNFC_NanoC6 --upload-port /dev/ttyACM0 --test-port /dev/ttyACM0, 146/146 test cases passed.

@Sped0n Sped0n changed the title fix: use correct isoDEP block number after response chaining fix: use correct ISO-DEP block number after response chaining May 20, 2026
Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
@Sped0n Sped0n force-pushed the fix-isodep-chaining branch from bebe446 to 855dfdc Compare May 20, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant