<p>herlesupreeth has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17882">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Enable parsing of ISIM Service table (IST)<br><br>As per TS 31.103, This EF indicates which ISIM services are available.<br>If a service is not indicated as available in the ISIM, the ME shall not select this service.<br><br>Parsing of IST is achieved by first selecting the ISIM application using its AID.<br>This is followed by selecting EF.IST with File ID - 6f07 in ADF.ISIM<br><br>Change-Id: I3f0a7227360b72a707dc1bcc4cc9c8a4ec7ad2b2<br>---<br>M pySim-read.py<br>1 file changed, 16 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/82/17882/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim-read.py b/pySim-read.py</span><br><span>index 8f2b675..fdfc1dc 100755</span><br><span>--- a/pySim-read.py</span><br><span>+++ b/pySim-read.py</span><br><span>@@ -30,6 +30,7 @@</span><br><span> import sys</span><br><span> from pySim.ts_51_011 import EF, DF, EF_SST_map</span><br><span> from pySim.ts_31_102 import EF_UST_map</span><br><span style="color: hsl(120, 100%, 40%);">+from pySim.ts_31_103 import EF_IST_map</span><br><span> </span><br><span> from pySim.commands import SimCardCommands</span><br><span> from pySim.cards import card_detect, Card</span><br><span>@@ -266,5 +267,20 @@</span><br><span>               else:</span><br><span>                        print("USIM Service Table: Can't read, response code = %s" % (sw,))</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ # Check whether we have th AID of ISIM, if so select it by its AID</span><br><span style="color: hsl(120, 100%, 40%);">+    # EF.IST - File Id in ADF ISIM : 6f07</span><br><span style="color: hsl(120, 100%, 40%);">+ if '9000' == card.select_adf_by_aid(adf="isim"):</span><br><span style="color: hsl(120, 100%, 40%);">+            # EF.IST</span><br><span style="color: hsl(120, 100%, 40%);">+              (res, sw) = card.read_binary('6f07')</span><br><span style="color: hsl(120, 100%, 40%);">+          if sw == '9000':</span><br><span style="color: hsl(120, 100%, 40%);">+                      avail_srvs = parse_st(res)</span><br><span style="color: hsl(120, 100%, 40%);">+                    print("ISIM Service Table: %s" % res)</span><br><span style="color: hsl(120, 100%, 40%);">+                       # Print those which are available</span><br><span style="color: hsl(120, 100%, 40%);">+                     for s in avail_srvs:</span><br><span style="color: hsl(120, 100%, 40%);">+                          if s in EF_IST_map:</span><br><span style="color: hsl(120, 100%, 40%);">+                                   print('\tService %d - %s: %s' % (s, EF_IST_map[s], s in avail_srvs))</span><br><span style="color: hsl(120, 100%, 40%);">+          else:</span><br><span style="color: hsl(120, 100%, 40%);">+                 print("ISIM Service Table: Can't read, response code = %s" % (sw,))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  # Done for this card and maybe for everything ?</span><br><span>      print("Done !\n")</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17882">change 17882</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/+/17882"/><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: I3f0a7227360b72a707dc1bcc4cc9c8a4ec7ad2b2 </div>
<div style="display:none"> Gerrit-Change-Number: 17882 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>