Change in pysim[master]: pySim-read.py: Add support for reading USIM+ISIM data from third-part...

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
Thu Jan 21 04:58:34 UTC 2021


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


Change subject: pySim-read.py: Add support for reading USIM+ISIM data from third-party UICC
......................................................................

pySim-read.py: Add support for reading USIM+ISIM data from third-party UICC

Change-Id: Id8b95630e90cb5833482da2690e423e7adefb95b
---
M pySim-read.py
1 file changed, 7 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/22351/1

diff --git a/pySim-read.py b/pySim-read.py
index b94e709..2ec80c4 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -33,7 +33,7 @@
 from pySim.ts_31_103 import EF_IST_map, EF_ISIM_ADF_map
 
 from pySim.commands import SimCardCommands
-from pySim.cards import card_detect, Card
+from pySim.cards import card_detect, Card, UsimCard, IsimCard
 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_addr_tlv
 from pySim.utils import h2s, format_ePDGSelection
@@ -250,6 +250,9 @@
 	# Check whether we have th AID of USIM, if so select it by its AID
 	# EF.UST - File Id in ADF USIM : 6f38
 	if '9000' == card.select_adf_by_aid():
+		# Select USIM profile
+		card = UsimCard(scc)
+
 		# EF.EHPLMN
 		if card.file_exists(EF_USIM_ADF_map['EHPLMN']):
 			(res, sw) = card.read_ehplmn()
@@ -296,6 +299,9 @@
 
 	# Select ISIM application by its AID
 	if '9000' == card.select_adf_by_aid(adf="isim"):
+		# Select USIM profile
+		card = IsimCard(scc)
+
 		#EF.P-CSCF - P-CSCF Address
 		try:
 			if card.file_exists(EF_ISIM_ADF_map['PCSCF']):

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id8b95630e90cb5833482da2690e423e7adefb95b
Gerrit-Change-Number: 22351
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/20210121/5eb8235f/attachment.htm>


More information about the gerrit-log mailing list