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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17898 )
Change subject: Remove redundant functions
......................................................................
Remove redundant functions
Change-Id: I2dfb5b662b8a4f351e4a629040b405c182e58e8d
---
M pySim/cards.py
M pySim/utils.py
2 files changed, 0 insertions(+), 30 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/cards.py b/pySim/cards.py
index c0462fb..d2f1057 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -188,14 +188,6 @@
else:
return (None, sw)
- # 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):
diff --git a/pySim/utils.py b/pySim/utils.py
index be670e9..56f9706 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -326,28 +326,6 @@
return ('%02x' % bcd_len) + ('%02x' % npi_ton) + bcd
-def parse_st(st):
- """
- Parses the EF S/U/IST and returns available/supported services
- """
- st_bytes = [st[i:i+2] for i in range(0, len(st), 2) ]
- avail_srvc = []
- # Get each byte and check for available services
- for i in range(0, len(st_bytes)):
- # Byte i contains info about Services num (8i+1) to num (8i+8)
- byte = int(st_bytes[i], 16)
- # Services in each byte are in order MSB to LSB
- # MSB - Service (8i+8)
- # LSB - Service (8i+1)
- for j in range(1, 9):
- if byte&0x01 == 0x01:
- # Byte X contains info about Services num (8X-7) to num (8X)
- # bit = 1: service available
- # bit = 0: service not available
- avail_srvc.append((8*i) + j)
- byte = byte >> 1
- return avail_srvc
-
def dec_st(st, table="sim"):
"""
Parses the EF S/U/IST and prints the list of available services in EF S/U/IST
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/17898
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2dfb5b662b8a4f351e4a629040b405c182e58e8d
Gerrit-Change-Number: 17898
Gerrit-PatchSet: 2
Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200429/85ee897e/attachment.htm>