mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim-read.py: Enable reading of Home Network Domain Name from ISIM
As per TS1.103 version 14.2.0, this EF contains the home operator's network domain name. The Home Network Domain Name, i.e. FQDN shall be encoded to an octet string according to UTF-8 encoding rules as specified in IETF RFC 3629 Change-Id: Ia3c68c717d105e10d52a8e9d170480da2ad7d65a
This commit is contained in:
committed by
herlesupreeth
parent
cf727f2733
commit
05b2807168
@@ -304,6 +304,17 @@ if __name__ == '__main__':
|
||||
except Exception as e:
|
||||
print("P-CSCF: Can't read file -- " + str(e))
|
||||
|
||||
# EF.DOMAIN - Home Network Domain Name e.g. ims.mncXXX.mccXXX.3gppnetwork.org
|
||||
try:
|
||||
if card.file_exists(EF_ISIM_ADF_map['DOMAIN']):
|
||||
(res, sw) = card.read_domain()
|
||||
if sw == '9000':
|
||||
print("Home Network Domain Name: %s" % (len(res) and res or 'Not available',))
|
||||
else:
|
||||
print("Home Network Domain Name: Can't read, response code = %s" % (sw,))
|
||||
except Exception as e:
|
||||
print("Home Network Domain Name: 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"):
|
||||
|
||||
Reference in New Issue
Block a user