Change in pysim[master]: pySim-read: read contents of PLMN related files.

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/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Jul 11 21:08:49 UTC 2018


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/9969


Change subject: pySim-read: read contents of PLMN related files.
......................................................................

pySim-read: read contents of PLMN related files.

The files EF.PLMNsel, EF.PLMNwAcT, EF.OPLMNwAcT, EF.HPLMNAcT are not
yet printed by pysim-read. Lets add support for those files.

Change-Id: Ice802033adfa6fc1bccc76da47495eb29c3aef6c
Related: SYS#4245
---
M pySim-read.py
1 file changed, 39 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/69/9969/1

diff --git a/pySim-read.py b/pySim-read.py
index 561a498..247a4b4 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -107,14 +107,45 @@
 	else:
 		print("SMSP: Can't read, response code = %s" % (sw,))
 
-	# EF.HPLMN
-#	(res, sw) = scc.read_binary(['3f00', '7f20', '6f30'])
-#	if sw == '9000':
-#		print("HPLMN: %s" % (res))
-#		print("HPLMN: %s" % (dec_hplmn(res),))
-#	else:
-#		print("HPLMN: Can't read, response code = %s" % (sw,))
-	# FIXME
+	# EF.PLMNsel
+	try:
+	        (res, sw) = scc.read_binary(EF['PLMNsel'])
+	        if sw == '9000':
+		        print("PLMNsel: %s" % (res))
+	        else:
+		        print("PLMNsel: Can't read, response code = %s" % (sw,))
+	except Exception as e:
+		print "HPLMNAcT: Can't read file -- " + str(e)
+
+	# EF.PLMNwAcT
+        try:
+	        (res, sw) = scc.read_binary(EF['PLMNwAcT'])
+	        if sw == '9000':
+		        print("PLMNwAcT: %s" % (res))
+	        else:
+		        print("PLMNwAcT: Can't read, response code = %s" % (sw,))
+	except Exception as e:
+		print "HPLMNAcT: Can't read file -- " + str(e)
+
+	# EF.OPLMNwAcT
+        try:
+	        (res, sw) = scc.read_binary(EF['OPLMNwAcT'])
+	        if sw == '9000':
+		        print("OPLMNwAcT: %s" % (res))
+	        else:
+		        print("OPLMNwAcT: Can't read, response code = %s" % (sw,))
+	except Exception as e:
+		print "HPLMNAcT: Can't read file -- " + str(e)
+
+	# EF.HPLMNAcT
+        try:
+	        (res, sw) = scc.read_binary(EF['HPLMNAcT'])
+	        if sw == '9000':
+		        print("HPLMNAcT: %s" % (res))
+	        else:
+		        print("HPLMNAcT: Can't read, response code = %s" % (sw,))
+	except Exception as e:
+		print "HPLMNAcT: Can't read file -- " + str(e)
 
 	# EF.ACC
 	(res, sw) = scc.read_binary(['3f00', '7f20', '6f78'])

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice802033adfa6fc1bccc76da47495eb29c3aef6c
Gerrit-Change-Number: 9969
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180711/5f6c4757/attachment.htm>


More information about the gerrit-log mailing list