<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1: Code-Review-1</p><p style="white-space: pre-wrap; word-wrap: break-word;">IMHO this should not be done here; instead the respective card profile should register code for status word interpretation that does the SW -> String conversion.  There should already be genric support for that in place.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">ok, the existing code only has wildcard matching mapping to statig strings.  I suggest to extend that with an option to register a function for decoding.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This could be done by using the existing status-word-dict  that contains "sw: string" mappings, and you could register a function instead.  The interpret_sw() could then check if the value in the dict is a str (behavior like now) or a function (call the function and use the return as string).</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I have now analyzed the problem a bit. What we could do is to use rs.interpret_sw() from do_verify_adm() to convert the SW, but then still the translation would be wrong. The reason for this is that the 63cx SW has a different meaning when it is used when the VERIFY PIN command is used. See ETSI TS 102 221, Table 10.9.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23423">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23423">change 23423</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/pysim/+/23423"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icf428831094f8c1045eefaa8cb2b92e6a36b0c13 </div>
<div style="display:none"> Gerrit-Change-Number: 23423 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 22 Mar 2021 21:27:49 +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>