Change in pysim[master]: pySim-read.py: Use the method declared in cards.py to read SPN

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.org
Mon Mar 30 08:52:43 UTC 2020


herlesupreeth has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17659 )


Change subject: pySim-read.py: Use the method declared in cards.py to read SPN
......................................................................

pySim-read.py: Use the method declared in cards.py to read SPN

Change-Id: I71c29e2d9d62c50d352556710e63ba398269a5c7
---
M pySim-read.py
1 file changed, 4 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/59/17659/1

diff --git a/pySim-read.py b/pySim-read.py
index a7e5d4c..cd566e0 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -141,12 +141,11 @@
 
 	# EF.SPN
 	try:
-		(res, sw) = scc.read_binary(EF['SPN'])
+		(res, sw) = card.read_spn()
 		if sw == '9000':
-			spn_res = dec_spn(res)
-			print("SPN: %s" % (spn_res[0] or "Not available"))
-			print("Display HPLMN: %s" % (spn_res[1],))
-			print("Display OPLMN: %s" % (spn_res[2],))
+			print("SPN: %s" % (res[0] or "Not available"))
+			print("Display HPLMN: %s" % (res[1],))
+			print("Display OPLMN: %s" % (res[2],))
 		else:
 			print("SPN: Can't read, response code = %s" % (sw,))
 	except Exception as e:

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/17659
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I71c29e2d9d62c50d352556710e63ba398269a5c7
Gerrit-Change-Number: 17659
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/2e757bb5/attachment.htm>


More information about the gerrit-log mailing list