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/+/17664 ) Change subject: Move parsing of ACC to generic Card class ...................................................................... Move parsing of ACC to generic Card class Change-Id: I92a02c74d64b3120055163548fc128ed6e0650a4 --- M pySim-read.py M pySim/cards.py 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/64/17664/1 diff --git a/pySim-read.py b/pySim-read.py index 5bd20ef..a18cc77 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -192,7 +192,7 @@ print("HPLMNAcT: Can't read file -- " + str(e)) # EF.ACC - (res, sw) = scc.read_binary(['3f00', '7f20', '6f78']) + (res, sw) = card.read_acc() if sw == '9000': print("ACC: %s" % (res,)) else: diff --git a/pySim/cards.py b/pySim/cards.py index b8af407..fe4ecb8 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -62,6 +62,13 @@ data, sw = self._scc.update_binary(EF['IMSI'], enc_imsi(imsi)) return sw + def read_acc(self): + (res, sw) = self._scc.read_binary(EF['ACC']) + if sw == '9000': + return (res, sw) + else: + return (None, sw) + def update_acc(self, acc): data, sw = self._scc.update_binary(EF['ACC'], lpad(acc, 4)) return sw -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17664 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I92a02c74d64b3120055163548fc128ed6e0650a4 Gerrit-Change-Number: 17664 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/20200330/b26db810/attachment.htm>