Change in simtrace2[master]: cardem: fix spurious NULL bytes during transfers

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at

Hoernchen gerrit-no-reply at
Sun Aug 8 14:54:34 UTC 2021

Hoernchen has posted comments on this change. ( )

Change subject: cardem: fix spurious NULL bytes during transfers

Patch Set 1:

This patch fixes the problem for me, but it pretty much just resets the timer after txing a byte by assuming that it actually was sent, which is a reasonable assumption.
There is however still the problem that this might still cause 0x60 bytes if we run out of data, even though the 0x60 byte is only acceptable as PB. If we run out of data afterwards during the tx phase a NULL byte is not gonna help us, the transfer is broken anyway.

A proper(er) fix might be to disable the timeout in set_tpdu_state in case of TPDU_S_WAIT_TX and/or to disable the null byte sending in case of TPDU_S_WAIT_TX in card_emu_wtime_half_expired since I can't imagine a situation where a NULL byte helps after ending up in the post-PB TX phase.. except for the single byte INS ^ FF case that then continues with another PB...

I suppose this fix here is the safest way to do it.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I15b0b83b7d93b8e5589f3640bd6eb2fc82f93394
Gerrit-Change-Number: 25171
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Comment-Date: Sun, 08 Aug 2021 14:54:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list