Change in pysim[master]: pySim-read.py: Enable parsing of EF.ePDGSelection in USIM

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
Wed Oct 21 06:10:05 UTC 2020


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


Change subject: pySim-read.py: Enable parsing of EF.ePDGSelection in USIM
......................................................................

pySim-read.py: Enable parsing of EF.ePDGSelection in USIM

As per TS 31.102, this EF can found under ADF.USIM at File Id 6ff4.
Also, if service n°106 and service n°107 are available, this file shall be present.

Change-Id: I98916e6f5c9791aff63c18a3b16bdfb8ae9b2d36
---
M pySim-read.py
1 file changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/20817/1

diff --git a/pySim-read.py b/pySim-read.py
index 6608556..f70f1c8 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -36,6 +36,7 @@
 from pySim.cards import card_detect, Card
 from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn
 from pySim.utils import format_xplmn_w_act, dec_spn, dec_st, init_reader, dec_epdgid
+from pySim.utils import h2s, format_ePDGSelection
 
 def parse_options():
 
@@ -282,6 +283,18 @@
 		except Exception as e:
 			print("ePDGId: Can't read file -- " + str(e))
 
+	# Select USIM application by its AID
+	if '9000' == card.select_adf_by_aid():
+		#EF.ePDGSelection - ePDG Selection Information
+		try:
+			(res, sw) = card._scc.read_binary(['6ff4'])
+			if sw == '9000':
+				print("ePDGSelection: \n %s" % (format_ePDGSelection(res),))
+			else:
+				print("ePDGSelection: Can't read, response code = %s" % (sw,))
+		except Exception as e:
+			print("ePDGSelection: Can't read file -- " + str(e))
+
 	# Check whether we have th AID of ISIM, if so select it by its AID
 	# EF.IST - File Id in ADF ISIM : 6f07
 	if '9000' == card.select_adf_by_aid(adf="isim"):

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I98916e6f5c9791aff63c18a3b16bdfb8ae9b2d36
Gerrit-Change-Number: 20817
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/20201021/f81ea9f5/attachment.htm>


More information about the gerrit-log mailing list