<p>guilly@gmail.com has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17934">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">transport/__init.py__ add generic ATR hex read function<br><br>useful for debugging the ATR response in hex, similar<br>format to the oen used in most of the autodetect functions<br><br>Change-Id: Id0e53ef50e32a8c3d2190581540b011eb89f8cc0<br>---<br>M pySim/transport/__init__.py<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/34/17934/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py</span><br><span>index 69e2fe9..676167c 100644</span><br><span>--- a/pySim/transport/__init__.py</span><br><span>+++ b/pySim/transport/__init__.py</span><br><span>@@ -90,6 +90,7 @@</span><br><span>                             data : string (in hex) of returned data (ex. "074F4EFFFF")</span><br><span>                         sw   : string (in hex) of status word (ex. "9000")</span><br><span>             """</span><br><span style="color: hsl(120, 100%, 40%);">+            print(pdu)</span><br><span>           rv = self.send_apdu(pdu)</span><br><span> </span><br><span>                 # Create a masked version of the returned status word</span><br><span>@@ -103,3 +104,10 @@</span><br><span>                 if sw.lower() != sw_masked:</span><br><span>                  raise RuntimeError("SW match failed! Expected %s and got %s." % (sw.lower(), rv[1]))</span><br><span>               return rv</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   def get_atr_in_hex(self):</span><br><span style="color: hsl(120, 100%, 40%);">+             atr = ''</span><br><span style="color: hsl(120, 100%, 40%);">+              for byte in self.get_atr():</span><br><span style="color: hsl(120, 100%, 40%);">+                   atr += '%02x ' % byte</span><br><span style="color: hsl(120, 100%, 40%);">+         return atr</span><br><span style="color: hsl(120, 100%, 40%);">+            </span><br><span>\ No newline at end of file</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17934">change 17934</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/+/17934"/><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: Id0e53ef50e32a8c3d2190581540b011eb89f8cc0 </div>
<div style="display:none"> Gerrit-Change-Number: 17934 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: guilly@gmail.com <guilly@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>