mirror of https://gerrit.osmocom.org/pysim
pySim-read.py: Enable parsing of Home ePDG Identifier in USIM
As per TS 31.102, version 13.4.0 Release 13, this EF can found under ADF.USIM at File Id 6ff3. Also, if service n°106 and service n°107 are available, this file shall be present. Change-Id: I68114d328d1af5682a5bc1fa7642882e80b5de4d
This commit is contained in:
parent
d6a5ec51a8
commit
b1634db0b3
|
@ -35,7 +35,7 @@ from pySim.ts_31_103 import EF_IST_map
|
||||||
from pySim.commands import SimCardCommands
|
from pySim.commands import SimCardCommands
|
||||||
from pySim.cards import card_detect, Card
|
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 h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn
|
||||||
from pySim.utils import format_xplmn_w_act, dec_spn, dec_st, init_reader
|
from pySim.utils import format_xplmn_w_act, dec_spn, dec_st, init_reader, dec_epdgid
|
||||||
|
|
||||||
def parse_options():
|
def parse_options():
|
||||||
|
|
||||||
|
@ -250,6 +250,17 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
print("USIM Service Table: Can't read, response code = %s" % (sw,))
|
print("USIM Service Table: Can't read, response code = %s" % (sw,))
|
||||||
|
|
||||||
|
#EF.ePDGId - Home ePDG Identifier
|
||||||
|
try:
|
||||||
|
(res, sw) = card.read_binary(EF_USIM_ADF_map['ePDGId'])
|
||||||
|
if sw == '9000':
|
||||||
|
content = dec_epdgid(res)
|
||||||
|
print("ePDGId:\n%s" % (len(content) and content or '\tNot available\n',))
|
||||||
|
else:
|
||||||
|
print("ePDGId: Can't read, response code = %s" % (sw,))
|
||||||
|
except Exception as e:
|
||||||
|
print("ePDGId: Can't read file -- " + str(e))
|
||||||
|
|
||||||
# Check whether we have th AID of ISIM, if so select it by its AID
|
# Check whether we have th AID of ISIM, if so select it by its AID
|
||||||
# EF.IST - File Id in ADF ISIM : 6f07
|
# EF.IST - File Id in ADF ISIM : 6f07
|
||||||
if '9000' == card.select_adf_by_aid(adf="isim"):
|
if '9000' == card.select_adf_by_aid(adf="isim"):
|
||||||
|
|
|
@ -114,5 +114,6 @@ USIM Service Table: 01ea1ffc21360480010000
|
||||||
Service 64 - VGCS security
|
Service 64 - VGCS security
|
||||||
Service 65 - VBS security
|
Service 65 - VBS security
|
||||||
|
|
||||||
|
ePDGId: Can't read file -- SW match failed! Expected 9000 and got 6a82.
|
||||||
Done !
|
Done !
|
||||||
|
|
||||||
|
|
|
@ -130,5 +130,6 @@ USIM Service Table: 9eff1b3c37fe5900000000
|
||||||
Service 53 - Extension 8
|
Service 53 - Extension 8
|
||||||
Service 55 - MMS User Connectivity Parameters
|
Service 55 - MMS User Connectivity Parameters
|
||||||
|
|
||||||
|
ePDGId: Can't read file -- SW match failed! Expected 9000 and got 6a82.
|
||||||
Done !
|
Done !
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,9 @@ USIM Service Table: beff9f9de73e0408400170730000002e00000000
|
||||||
Service 94 - Extended Terminal Applications
|
Service 94 - Extended Terminal Applications
|
||||||
Service 95 - Support of UICC access to IMS
|
Service 95 - Support of UICC access to IMS
|
||||||
|
|
||||||
|
ePDGId:
|
||||||
|
Not available
|
||||||
|
|
||||||
ISIM Service Table: 190200
|
ISIM Service Table: 190200
|
||||||
Service 1 - P-CSCF address
|
Service 1 - P-CSCF address
|
||||||
Service 4 - GBA-based Local Key Establishment Mechanism
|
Service 4 - GBA-based Local Key Establishment Mechanism
|
||||||
|
|
|
@ -138,5 +138,6 @@ USIM Service Table: 9e6b1dfc67f6580000
|
||||||
Service 53 - Extension 8
|
Service 53 - Extension 8
|
||||||
Service 55 - MMS User Connectivity Parameters
|
Service 55 - MMS User Connectivity Parameters
|
||||||
|
|
||||||
|
ePDGId: Can't read file -- SW match failed! Expected 9000 and got 6a82.
|
||||||
Done !
|
Done !
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue