blob: a384b1d557151dd0ec989d79481293401a6e324d [file] [log] [blame]
Harald Welte57ad38e2023-07-09 22:14:09 +02001# -*- coding: utf-8 -*-
2
3""" Various constants from 3GPP TS 51.011 used by *legacy* code only.
4
5This will likely be removed in future versions of pySim. Please instead
6use the pySim.filesystem class model with the various profile/application
7specific extension modules.
8"""
9
10# Copyright (C) 2017 Alexander.Chemeris <Alexander.Chemeris@gmail.com>
11# Copyright (C) 2021 Harald Welte <laforge@osmocom.org>
12#
13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation, either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25
26
27MF_num = '3F00'
28
29DF_num = {
30 'TELECOM': '7F10',
31
32 'GSM': '7F20',
33 'IS-41': '7F22',
34 'FP-CTS': '7F23',
35
36 'GRAPHICS': '5F50',
37
38 'IRIDIUM': '5F30',
39 'GLOBST': '5F31',
40 'ICO': '5F32',
41 'ACeS': '5F33',
42
43 'EIA/TIA-553': '5F40',
44 'CTS': '5F60',
45 'SOLSA': '5F70',
46
47 'MExE': '5F3C',
48}
49
50EF_num = {
51 # MF
52 'ICCID': '2FE2',
53 'ELP': '2F05',
54 'DIR': '2F00',
55
56 # DF_TELECOM
57 'ADN': '6F3A',
58 'FDN': '6F3B',
59 'SMS': '6F3C',
60 'CCP': '6F3D',
61 'MSISDN': '6F40',
62 'SMSP': '6F42',
63 'SMSS': '6F43',
64 'LND': '6F44',
65 'SMSR': '6F47',
66 'SDN': '6F49',
67 'EXT1': '6F4A',
68 'EXT2': '6F4B',
69 'EXT3': '6F4C',
70 'BDN': '6F4D',
71 'EXT4': '6F4E',
72 'CMI': '6F58',
73 'ECCP': '6F4F',
74
75 # DF_GRAPHICS
76 'IMG': '4F20',
77
78 # DF_SoLSA
79 'SAI': '4F30',
80 'SLL': '4F31',
81
82 # DF_MExE
83 'MExE-ST': '4F40',
84 'ORPK': '4F41',
85 'ARPK': '4F42',
86 'TPRPK': '4F43',
87
88 # DF_GSM
89 'LP': '6F05',
90 'IMSI': '6F07',
91 'Kc': '6F20',
92 'DCK': '6F2C',
93 'PLMNsel': '6F30',
94 'HPPLMN': '6F31',
95 'CNL': '6F32',
96 'ACMmax': '6F37',
97 'SST': '6F38',
98 'ACM': '6F39',
99 'GID1': '6F3E',
100 'GID2': '6F3F',
101 'PUCT': '6F41',
102 'CBMI': '6F45',
103 'SPN': '6F46',
104 'CBMID': '6F48',
105 'BCCH': '6F74',
106 'ACC': '6F78',
107 'FPLMN': '6F7B',
108 'LOCI': '6F7E',
109 'AD': '6FAD',
110 'PHASE': '6FAE',
111 'VGCS': '6FB1',
112 'VGCSS': '6FB2',
113 'VBS': '6FB3',
114 'VBSS': '6FB4',
115 'eMLPP': '6FB5',
116 'AAeM': '6FB6',
117 'ECC': '6FB7',
118 'CBMIR': '6F50',
119 'NIA': '6F51',
120 'KcGPRS': '6F52',
121 'LOCIGPRS': '6F53',
122 'SUME': '6F54',
123 'PLMNwAcT': '6F60',
124 'OPLMNwAcT': '6F61',
125 # Figure 8 names it HPLMNAcT, but in the text it's names it HPLMNwAcT
126 'HPLMNAcT': '6F62',
127 'HPLMNwAcT': '6F62',
128 'CPBCCH': '6F63',
129 'INVSCAN': '6F64',
130 'PNN': '6FC5',
131 'OPL': '6FC6',
132 'MBDN': '6FC7',
133 'EXT6': '6FC8',
134 'MBI': '6FC9',
135 'MWIS': '6FCA',
136 'CFIS': '6FCB',
137 'EXT7': '6FCC',
138 'SPDI': '6FCD',
139 'MMSN': '6FCE',
140 'EXT8': '6FCF',
141 'MMSICP': '6FD0',
142 'MMSUP': '6FD1',
143 'MMSUCP': '6FD2',
144}
145
146DF = {
147 'TELECOM': [MF_num, DF_num['TELECOM']],
148
149 'GSM': [MF_num, DF_num['GSM']],
150 'IS-41': [MF_num, DF_num['IS-41']],
151 'FP-CTS': [MF_num, DF_num['FP-CTS']],
152
153 'GRAPHICS': [MF_num, DF_num['GRAPHICS']],
154
155 'IRIDIUM': [MF_num, DF_num['IRIDIUM']],
156 'GLOBST': [MF_num, DF_num['GLOBST']],
157 'ICO': [MF_num, DF_num['ICO']],
158 'ACeS': [MF_num, DF_num['ACeS']],
159
160 'EIA/TIA-553': [MF_num, DF_num['EIA/TIA-553']],
161 'CTS': [MF_num, DF_num['CTS']],
162 'SoLSA': [MF_num, DF_num['SOLSA']],
163
164 'MExE': [MF_num, DF_num['MExE']],
165}
166
167
168EF = {
169 'ICCID': [MF_num, EF_num['ICCID']],
170 'ELP': [MF_num, EF_num['ELP']],
171 'DIR': [MF_num, EF_num['DIR']],
172
173 'ADN': DF['TELECOM']+[EF_num['ADN']],
174 'FDN': DF['TELECOM']+[EF_num['FDN']],
175 'SMS': DF['TELECOM']+[EF_num['SMS']],
176 'CCP': DF['TELECOM']+[EF_num['CCP']],
177 'MSISDN': DF['TELECOM']+[EF_num['MSISDN']],
178 'SMSP': DF['TELECOM']+[EF_num['SMSP']],
179 'SMSS': DF['TELECOM']+[EF_num['SMSS']],
180 'LND': DF['TELECOM']+[EF_num['LND']],
181 'SMSR': DF['TELECOM']+[EF_num['SMSR']],
182 'SDN': DF['TELECOM']+[EF_num['SDN']],
183 'EXT1': DF['TELECOM']+[EF_num['EXT1']],
184 'EXT2': DF['TELECOM']+[EF_num['EXT2']],
185 'EXT3': DF['TELECOM']+[EF_num['EXT3']],
186 'BDN': DF['TELECOM']+[EF_num['BDN']],
187 'EXT4': DF['TELECOM']+[EF_num['EXT4']],
188 'CMI': DF['TELECOM']+[EF_num['CMI']],
189 'ECCP': DF['TELECOM']+[EF_num['ECCP']],
190
191 'IMG': DF['GRAPHICS']+[EF_num['IMG']],
192
193 'SAI': DF['SoLSA']+[EF_num['SAI']],
194 'SLL': DF['SoLSA']+[EF_num['SLL']],
195
196 'MExE-ST': DF['MExE']+[EF_num['MExE-ST']],
197 'ORPK': DF['MExE']+[EF_num['ORPK']],
198 'ARPK': DF['MExE']+[EF_num['ARPK']],
199 'TPRPK': DF['MExE']+[EF_num['TPRPK']],
200
201 'LP': DF['GSM']+[EF_num['LP']],
202 'IMSI': DF['GSM']+[EF_num['IMSI']],
203 'Kc': DF['GSM']+[EF_num['Kc']],
204 'DCK': DF['GSM']+[EF_num['DCK']],
205 'PLMNsel': DF['GSM']+[EF_num['PLMNsel']],
206 'HPPLMN': DF['GSM']+[EF_num['HPPLMN']],
207 'CNL': DF['GSM']+[EF_num['CNL']],
208 'ACMmax': DF['GSM']+[EF_num['ACMmax']],
209 'SST': DF['GSM']+[EF_num['SST']],
210 'ACM': DF['GSM']+[EF_num['ACM']],
211 'GID1': DF['GSM']+[EF_num['GID1']],
212 'GID2': DF['GSM']+[EF_num['GID2']],
213 'PUCT': DF['GSM']+[EF_num['PUCT']],
214 'CBMI': DF['GSM']+[EF_num['CBMI']],
215 'SPN': DF['GSM']+[EF_num['SPN']],
216 'CBMID': DF['GSM']+[EF_num['CBMID']],
217 'BCCH': DF['GSM']+[EF_num['BCCH']],
218 'ACC': DF['GSM']+[EF_num['ACC']],
219 'FPLMN': DF['GSM']+[EF_num['FPLMN']],
220 'LOCI': DF['GSM']+[EF_num['LOCI']],
221 'AD': DF['GSM']+[EF_num['AD']],
222 'PHASE': DF['GSM']+[EF_num['PHASE']],
223 'VGCS': DF['GSM']+[EF_num['VGCS']],
224 'VGCSS': DF['GSM']+[EF_num['VGCSS']],
225 'VBS': DF['GSM']+[EF_num['VBS']],
226 'VBSS': DF['GSM']+[EF_num['VBSS']],
227 'eMLPP': DF['GSM']+[EF_num['eMLPP']],
228 'AAeM': DF['GSM']+[EF_num['AAeM']],
229 'ECC': DF['GSM']+[EF_num['ECC']],
230 'CBMIR': DF['GSM']+[EF_num['CBMIR']],
231 'NIA': DF['GSM']+[EF_num['NIA']],
232 'KcGPRS': DF['GSM']+[EF_num['KcGPRS']],
233 'LOCIGPRS': DF['GSM']+[EF_num['LOCIGPRS']],
234 'SUME': DF['GSM']+[EF_num['SUME']],
235 'PLMNwAcT': DF['GSM']+[EF_num['PLMNwAcT']],
236 'OPLMNwAcT': DF['GSM']+[EF_num['OPLMNwAcT']],
237 # Figure 8 names it HPLMNAcT, but in the text it's names it HPLMNwAcT
238 'HPLMNAcT': DF['GSM']+[EF_num['HPLMNAcT']],
239 'HPLMNwAcT': DF['GSM']+[EF_num['HPLMNAcT']],
240 'CPBCCH': DF['GSM']+[EF_num['CPBCCH']],
241 'INVSCAN': DF['GSM']+[EF_num['INVSCAN']],
242 'PNN': DF['GSM']+[EF_num['PNN']],
243 'OPL': DF['GSM']+[EF_num['OPL']],
244 'MBDN': DF['GSM']+[EF_num['MBDN']],
245 'EXT6': DF['GSM']+[EF_num['EXT6']],
246 'MBI': DF['GSM']+[EF_num['MBI']],
247 'MWIS': DF['GSM']+[EF_num['MWIS']],
248 'CFIS': DF['GSM']+[EF_num['CFIS']],
249 'EXT7': DF['GSM']+[EF_num['EXT7']],
250 'SPDI': DF['GSM']+[EF_num['SPDI']],
251 'MMSN': DF['GSM']+[EF_num['MMSN']],
252 'EXT8': DF['GSM']+[EF_num['EXT8']],
253 'MMSICP': DF['GSM']+[EF_num['MMSICP']],
254 'MMSUP': DF['GSM']+[EF_num['MMSUP']],
255 'MMSUCP': DF['GSM']+[EF_num['MMSUCP']],
256}
257