<p style="white-space: pre-wrap; word-wrap: break-word;">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.<br>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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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...</p><p style="white-space: pre-wrap; word-wrap: break-word;">I suppose this fix here is the safest way to do it.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/25171">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/25171">change 25171</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/25171"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I15b0b83b7d93b8e5589f3640bd6eb2fc82f93394 </div>
<div style="display:none"> Gerrit-Change-Number: 25171 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 08 Aug 2021 14:54:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>