This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
herlesupreeth gerrit-no-reply at lists.osmocom.orgherlesupreeth has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17831 ) Change subject: Add ability to parse SIM Service Table (EF.SST) ...................................................................... Add ability to parse SIM Service Table (EF.SST) As per TS.51.011, This EF indicates which services in the SIM are allocated, and whether, if allocated, the service is activated .If a service is not indicated as available in the SIM, the ME shall not select this service. Change-Id: Id28a35727adbaaa9df19b1adc621a0c51ad0e51b --- M pySim-read.py M pySim/cards.py 2 files changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/17831/1 diff --git a/pySim-read.py b/pySim-read.py index 98a2e81..c04fa1b 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -28,7 +28,7 @@ import random import re import sys -from pySim.ts_51_011 import EF, DF +from pySim.ts_51_011 import EF, DF, EF_SST_map from pySim.commands import SimCardCommands from pySim.cards import card_detect, Card @@ -219,5 +219,19 @@ else: print("AD: Can't read, response code = %s" % (sw,)) + # EF.SST + (res, sw) = card.read_sst() + if sw == '9000': + # (st_hex, avail_src_list) = res + # st_hex - Service Table in hex format + # avail_src_list - List of services available + print("SIM Service Table: %s" % res[0]) + # Print those which are available + for s in res[1]: + if s in EF_SST_map: + print('Service %d - %s: %s' % (s, EF_SST_map[s], s in res[1])) + else: + print("SIM Service Table: Can't read, response code = %s" % (sw,)) + # Done for this card and maybe for everything ? print("Done !\n") diff --git a/pySim/cards.py b/pySim/cards.py index d27092d..a12b111 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -188,7 +188,15 @@ else: return (None, sw) - # Read the (full) AID for either ISIM or USIM application + # Read SIM Service table + def read_sst(self): + (res, sw) = self._scc.read_binary(EF['SST']) + if sw == '9000': + return ((res, parse_st(res)), sw) + else: + return (None, sw) + + # Read the (full) AID for either ISIM or USIM or ISIM application def read_aid(self, isim = False): # First (known) halves of the AID -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id28a35727adbaaa9df19b1adc621a0c51ad0e51b Gerrit-Change-Number: 17831 Gerrit-PatchSet: 1 Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200416/d7a85529/attachment.htm>