aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-03-26 09:00:06 +0100
committerherlesupreeth <herlesupreeth@gmail.com>2021-01-05 11:46:41 +0100
commit0c02d8a57b849b5c14991fdac1dd7232720f32ef (patch)
tree8af6761da1e38f1e29289ff29e1c30c03ae547e3 /pySim-read.py
parent3f67f9c1d310363678a484918f0e9c93814d202e (diff)
pySim-read.py: Enable reading of EF.IMPU from ISIM
IMS public user identity (IMPU) As per TS1.103, this EF contains one or more records, with each record able to hold a public SIP Identity (SIP URI) of the user. EF.IMPI consist of URI TLV data object values see IETF RFC 3261. The URI shall be encoded to an octet string according to UTF-8 encoding rules as specified in IETF RFC 3629 Reading of EF.IMPU is achieved by first selecting the ISIM application using its AID. This is followed by selecting EF.IMPU with File ID - 6f04 in ADF.ISIM Change-Id: Icf78a564aeaf4254658d3b018ff57dfc4b987e6f
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pySim-read.py b/pySim-read.py
index a7d9063..4047598 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -326,6 +326,14 @@ if __name__ == '__main__':
except Exception as e:
print("IMS private user identity: Can't read file -- " + str(e))
+ # EF.IMPU - IMS public user identity
+ try:
+ if card.file_exists(EF_ISIM_ADF_map['IMPU']):
+ res = card.read_impu()
+ print("IMS public user identity:\n%s" % (len(res) and res or '\tNot available\n',))
+ except Exception as e:
+ print("IMS public user identity: 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"):