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.orgherlesupreeth has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/18564 ) Change subject: ts_31_102.py: add EF_ADF_map ...................................................................... ts_31_102.py: add EF_ADF_map the EF files in the USIM ADF are different to the ones int the GSM dir so added the dictionary to avoid conflicts and hardcoded values the 'DIR' one was added in ts_51_011.py, not sure if it should be there as it's not in that standard, but did it for simplicity Change-Id: I458380bf46b2986662ecdede2551c22cd9be92ba --- M pySim-read.py M pySim/cards.py M pySim/ts_31_102.py M pySim/ts_51_011.py 4 files changed, 111 insertions(+), 5 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim-read.py b/pySim-read.py index e49a907..b23e6ee 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -29,7 +29,7 @@ import re import sys from pySim.ts_51_011 import EF, DF, EF_SST_map -from pySim.ts_31_102 import EF_UST_map +from pySim.ts_31_102 import EF_UST_map, EF_USIM_ADF_map from pySim.ts_31_103 import EF_IST_map from pySim.commands import SimCardCommands @@ -242,7 +242,7 @@ # EF.UST - File Id in ADF USIM : 6f38 if '9000' == card.select_adf_by_aid(): # EF.UST - (res, sw) = card.read_binary('6f38') + (res, sw) = card.read_binary(EF_USIM_ADF_map['UST']) if sw == '9000': print("USIM Service Table: %s" % res) # Print those which are available diff --git a/pySim/cards.py b/pySim/cards.py index c7b34eb..808fde1 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -225,9 +225,9 @@ try: # Find out how many records the EF.DIR has # and store all the AIDs in the UICC - rec_cnt = self._scc.record_count(['3f00', '2f00']) + rec_cnt = self._scc.record_count(EF['DIR']) for i in range(0, rec_cnt): - rec = self._scc.read_record(['3f00', '2f00'], i + 1) + rec = self._scc.read_record(EF['DIR'], i + 1) if (rec[0][0:2], rec[0][4:6]) == ('61', '4f') and len(rec[0]) > 12 \ and rec[0][8:8 + int(rec[0][6:8], 16) * 2] not in self._aids: self._aids.append(rec[0][8:8 + int(rec[0][6:8], 16) * 2]) diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 9f5abe9..473e595 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -135,4 +135,108 @@ 109: 'MCPTT', 110: 'ePDG configuration Information for Emergency Service support', 111: 'ePDG configuration Information for Emergency Service configured', -} \ No newline at end of file +} + +EF_USIM_ADF_map = { + 'LI': '6F05', + 'ARR': '6F06', + 'IMSI': '6F07', + 'Keys': '6F08', + 'KeysPS': '6F09', + 'DCK': '6F2C', + 'HPPLMN': '6F31', + 'CNL': '6F32', + 'ACMmax': '6F37', + 'UST': '6F38', + 'ACM': '6F39', + 'FDN': '6F3B', + 'SMS': '6F3C', + 'GID1': '6F3E', + 'GID2': '6F3F', + 'MSISDN': '6F40', + 'PUCT': '6F41', + 'SMSP': '6F42', + 'SMSS': '6F42', + 'CBMI': '6F45', + 'SPN': '6F46', + 'SMSR': '6F47', + 'CBMID': '6F48', + 'SDN': '6F49', + 'EXT2': '6F4B', + 'EXT3': '6F4C', + 'BDN': '6F4D', + 'EXT5': '6F4E', + 'CCP2': '6F4F', + 'CBMIR': '6F50', + 'EXT4': '6F55', + 'EST': '6F56', + 'ACL': '6F57', + 'CMI': '6F58', + 'START-HFN': '6F5B', + 'THRESHOLD': '6F5C', + 'PLMNwAcT': '6F60', + 'OPLMNwAcT': '6F61', + 'HPLMNwAcT': '6F62', + 'PSLOCI': '6F73', + 'ACC': '6F78', + 'FPLMN': '6F7B', + 'LOCI': '6F7E', + 'ICI': '6F80', + 'OCI': '6F81', + 'ICT': '6F82', + 'OCT': '6F83', + 'AD': '6FAD', + 'VGCS': '6FB1', + 'VGCSS': '6FB2', + 'VBS': '6FB3', + 'VBSS': '6FB4', + 'eMLPP': '6FB5', + 'AAeM': '6FB6', + 'ECC': '6FB7', + 'Hiddenkey': '6FC3', + 'NETPAR': '6FC4', + 'PNN': '6FC5', + 'OPL': '6FC6', + 'MBDN': '6FC7', + 'EXT6': '6FC8', + 'MBI': '6FC9', + 'MWIS': '6FCA', + 'CFIS': '6FCB', + 'EXT7': '6FCC', + 'SPDI': '6FCD', + 'MMSN': '6FCE', + 'EXT8': '6FCF', + 'MMSICP': '6FD0', + 'MMSUP': '6FD1', + 'MMSUCP': '6FD2', + 'NIA': '6FD3', + 'VGCSCA': '6FD4', + 'VBSCA': '6FD5', + 'GBAP': '6FD6', + 'MSK': '6FD7', + 'MUK': '6FD8', + 'EHPLMN': '6FD9', + 'GBANL': '6FDA', + 'EHPLMNPI': '6FDB', + 'LRPLMNSI': '6FDC', + 'NAFKCA': '6FDD', + 'SPNI': '6FDE', + 'PNNI': '6FDF', + 'NCP-IP': '6FE2', + 'EPSLOCI': '6FE3', + 'EPSNSC': '6FE4', + 'UFC': '6FE6', + 'UICCIARI': '6FE7', + 'NASCONFIG': '6FE8', + 'PWC': '6FEC', + 'FDNURI': '6FED', + 'BDNURI': '6FEE', + 'SDNURI': '6FEF', + 'IWL': '6FF0', + 'IPS': '6FF1', + 'IPD': '6FF2', + 'ePDGId': '6FF3', + 'ePDGSelection': '6FF4', + 'ePDGIdEm': '6FF5', + 'ePDGSelectionEm': '6FF6', +} diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 1cec91f..37d2bc8 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -48,6 +48,7 @@ # MF 'ICCID': '2FE2', 'ELP': '2F05', +'DIR': '2F00', # DF_TELECOM 'ADN': '6F3A', @@ -164,6 +165,7 @@ EF = { 'ICCID': [MF_num, EF_num['ICCID']], 'ELP': [MF_num, EF_num['ELP']], +'DIR': [MF_num, EF_num['DIR']], 'ADN': DF['TELECOM']+[EF_num['ADN']], 'FDN': DF['TELECOM']+[EF_num['FDN']], -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18564 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I458380bf46b2986662ecdede2551c22cd9be92ba Gerrit-Change-Number: 18564 Gerrit-PatchSet: 4 Gerrit-Owner: guilly at gmail.com <guilly at gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy <vyanitskiy at sysmocom.de> Gerrit-Reviewer: guilly at gmail.com <guilly at gmail.com> Gerrit-Reviewer: herlesupreeth <herlesupreeth at gmail.com> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200603/6a1a0759/attachment.htm>