aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-03-22 08:58:33 +0100
committerSupreeth Herle <herlesupreeth@gmail.com>2020-04-27 12:29:00 +0200
commitee15c77185615af669f0efe1e19a9fa748e224aa (patch)
tree4c13ef6c260bba83008a152fc9ea6e2c735179bf /pySim-read.py
parentdf33037e4212bcc6449bde12ae4b96058406fdae (diff)
Enable parsing of ISIM Service table (IST)
As per TS 31.103, This EF indicates which ISIM services are available. If a service is not indicated as available in the ISIM, the ME shall not select this service. Parsing of IST is achieved by first selecting the ISIM application using its AID. This is followed by selecting EF.IST with File ID - 6f07 in ADF.ISIM Change-Id: I3f0a7227360b72a707dc1bcc4cc9c8a4ec7ad2b2
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pySim-read.py b/pySim-read.py
index 4551e82..33e93a7 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -30,6 +30,7 @@ import re
import sys
from pySim.ts_51_011 import EF, DF, EF_SST_map
from pySim.ts_31_102 import EF_UST_map
+from pySim.ts_31_103 import EF_IST_map
from pySim.commands import SimCardCommands
from pySim.cards import card_detect, Card
@@ -255,5 +256,17 @@ if __name__ == '__main__':
else:
print("USIM Service Table: Can't read, response code = %s" % (sw,))
+ # Check whether we have th AID of ISIM, if so select it by its AID
+ # EF.IST - File Id in ADF ISIM : 6f07
+ if '9000' == card.select_adf_by_aid(adf="isim"):
+ # EF.IST
+ (res, sw) = card.read_binary('6f07')
+ if sw == '9000':
+ print("ISIM Service Table: %s" % res)
+ # Print those which are available
+ print("%s" % dec_st(res, table="isim"))
+ else:
+ print("ISIM Service Table: Can't read, response code = %s" % (sw,))
+
# Done for this card and maybe for everything ?
print("Done !\n")