FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/com/src/driver/pcm.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS | |
4 | Modul : PCM | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This Modul defines the functions for the permanent | |
18 | memory configuration driver. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 /******************************************************************************** | |
22 $History: pcm.c | |
23 | |
24 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | |
25 Description: The homezone/cityzone tags were not being displayed properly. | |
26 Solution: Modified to save the tags properly in caches and also made the | |
27 appropriate modifications to update the same properly during mobility. | |
28 | |
29 ********************************************************************************/ | |
30 | |
31 #ifndef PCM_C | |
32 #define PCM_C | |
33 | |
34 #ifdef WIN32 | |
35 | |
36 /* | |
37 * SIMULATION VERSION (Windows) | |
38 */ | |
39 /*==== INCLUDES ===================================================*/ | |
40 #define ENTITY_CST | |
41 | |
42 #if defined (NEW_FRAME) | |
43 | |
44 #include <string.h> | |
45 #include "typedefs.h" | |
46 #include "vsi.h" | |
47 #include "custom.h" | |
48 #include "gdi.h" | |
49 #include "pcm.h" | |
50 #include "gsm.h" | |
51 | |
52 #else | |
53 | |
54 #include <string.h> | |
55 #include "stddefs.h" | |
56 #include "custom.h" | |
57 #include "gdi.h" | |
58 #include "pcm.h" | |
59 #include "gsm.h" | |
60 #include "vsi.h" | |
61 | |
62 #endif | |
63 /*==== EXPORT =====================================================*/ | |
64 #if defined (NEW_FRAME) | |
65 EXTERN USHORT cst_handle; | |
66 #endif | |
67 /*==== VARIABLES ==================================================*/ | |
68 | |
69 /* | |
70 * Flag whether the 'e2prom content' is read | |
71 */ | |
72 UBYTE pcm_read = FALSE; | |
73 | |
74 UBYTE std = 1; /* default is GSM 900 using windows */ | |
75 static UBYTE act_std = 0; /* to check for changes */ | |
76 // set treshold for initial power measurements (= -106 dBm) | |
77 USHORT min_rxlev = 20; | |
78 | |
79 /*==== FUNCTIONS ==================================================*/ | |
80 | |
81 /*==== CONSTANTS ==================================================*/ | |
82 | |
83 /* | |
84 * GSM 900 Variant | |
85 */ | |
86 static UBYTE pcm_content_gsm_900 [] = | |
87 { | |
88 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
89 /*actual values supported by the MS*/ | |
90 /*0xB7, 0xC7, 0x00,*/ | |
91 0x31, 0x00, 0x00, | |
92 0x00, 0x00, 0x00, | |
93 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
94 0x31, 0x75, 0x09, | |
95 0x42, 0x86, 0x11, | |
96 0x22, 0x87, | |
97 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
98 /* set frequency bands */ | |
99 0x01, /* 900 */ | |
100 /* supported frequency bands */ | |
101 0x1F, /*850/EGSM/PCS1900/DCS1800/GSM900*/ | |
102 /* power 1 900/1800 */ | |
103 0x41, /* 4 1 */ | |
104 /* power 2 1900/850 */ | |
105 0x14, /* 1 4 */ | |
106 /* power 3 400/Edge */ | |
107 0x00, /* 0 0*/ | |
108 /* Multislot cap and classes GSM */ | |
109 0x00, | |
110 /* Multislot cap and classes EDGE */ | |
111 0x00, | |
112 /* Multislot cap and classes HSCSD */ | |
113 0x00, | |
114 /* Multislot cap and classes GPRS */ | |
115 0x50, | |
116 /* Multislot cap and classes ECSD */ | |
117 0x00, | |
118 /* Multislot cap and classes EGPRS */ | |
119 0x00, | |
120 /*capablities 1*/ | |
121 0xa5, /* ES_IND | MT_PP_SMS | CMSP | MAC_SUPPORT*/ | |
122 /*capablities 1*/ | |
123 0x05, /* UCS2_TREAT | SS_SCREEN */ | |
124 /* switch measure value*/ | |
125 0x00, | |
126 /* A5/n */ | |
127 0x80, /*A5_1 | A5_2 (A5_1 only here) */ | |
128 /* positioning */ | |
129 0x00, | |
130 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
131 0xB7, 0x46, | |
132 0x47, 0x1E, 0x00, | |
133 | |
134 | |
135 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
136 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
137 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
138 0xff, 0xff, 0xff, 0xff, | |
139 | |
140 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
141 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
142 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
143 0xff, 0xff, 0xff, 0xff, | |
144 | |
145 /*Iden. Information 2 */ | |
146 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
147 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
148 0xff, 0xff, 0xff, 0xff, | |
149 | |
150 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
151 /* EFmbn (record 1) */ | |
152 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
153 0xff, 0xff, | |
154 0x03, 0xff, | |
155 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
156 0xff, 0xff, | |
157 /* EFmbn (record 2) */ | |
158 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
159 0xff, 0xff, | |
160 0x04, 0xff, | |
161 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
162 0xff, 0xff, | |
163 /* EFmbn (record 3) */ | |
164 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
165 0xff, 0xff, | |
166 0x00, 0xff, | |
167 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
168 0xff, 0xff, | |
169 /* EFmbn (record 4) */ | |
170 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
171 0xff, 0xff, | |
172 0x00, 0xff, | |
173 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
174 0xff, 0xff, | |
175 | |
176 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
177 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
178 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
179 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
180 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
181 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
182 0xff, 0x81, | |
183 | |
184 //EFclng | |
185 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
186 'a', 'u', | |
187 | |
188 | |
189 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
190 /* EFsmsprfl record 1 */ | |
191 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
192 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
193 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
194 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
195 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
196 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
197 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
198 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
199 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
200 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
201 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
202 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
203 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
204 | |
205 /* EFsmsprfl record 2 */ | |
206 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
207 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
208 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
209 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
210 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
211 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
212 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
213 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
214 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
215 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
216 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
217 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
218 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
219 | |
220 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
221 0x02, 0x2B, | |
222 0x00, 0x37, | |
223 0x5A, 0x57, | |
224 0x41, 0x4E, | |
225 0x5A, 0x49, | |
226 0x47, 0x20, | |
227 0x54, 0x45, | |
228 0x4C, 0x45, | |
229 0x4B, 0x4F, | |
230 0x4D, 0x20, | |
231 0x00, 0x43, | |
232 0x4F, 0x4D, | |
233 0x5A, 0x45, | |
234 0x48, 0x4E, | |
235 0x20, 0x20, | |
236 0x00, 0x43, | |
237 0x4F, 0x4D, | |
238 0x01, 0x06, | |
239 0x00, 0x02, | |
240 0x44, 0x2D, | |
241 0x5A, 0x57, | |
242 0x45, 0x49, | |
243 0x20, 0x50, | |
244 0x52, 0x49, | |
245 0x56, 0x41, | |
246 0x54, 0xff, | |
247 0xff, 0xff, | |
248 0xff, 0xff, | |
249 0xff, 0xff, | |
250 0x44, 0x2D, | |
251 0x5A, 0x57, | |
252 0x45, 0x49, | |
253 0xff, 0xff, | |
254 0xff, 0xff, | |
255 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
263 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
264 0x20, 0x20, 0x05, /* buzzer */ | |
265 0x24, /* audio */ | |
266 0x00, /* miscellaneous */ | |
267 0x89, /* display */ | |
268 0x00, /* language */ | |
269 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
270 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
271 0x00, 0x00, 0x00, 0x0f, | |
272 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
273 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
274 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
275 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
276 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
277 0x0f, | |
278 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
279 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
280 0x00, 0x00, | |
281 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
282 0x01, 0x00, | |
283 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
284 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
285 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
286 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
287 0xFF, /* Update Status */ | |
288 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
289 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
290 0x07, /* CKSN */ | |
291 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
292 0xFF, /* IMSI length */ | |
293 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
294 }; | |
295 | |
296 /* | |
297 * DCS 1800 Variant | |
298 */ | |
299 static UBYTE pcm_content_dcs_1800 [] = | |
300 { | |
301 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
302 /*actual values supported by the MS*/ | |
303 /*0xB7, 0xC7, 0x00,*/ | |
304 0x03, 0x03, 0x00, | |
305 0x00, 0x00, 0x00, | |
306 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
307 0x31, 0x75, 0x09, | |
308 0x42, 0x86, 0x11, | |
309 0x22, 0x87, | |
310 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
311 0x02, 0x1F, 0x41, 0x14, | |
312 0x00, 0x00, 0x00, 0x00, | |
313 0x50, 0x00, 0x00, 0xa5, | |
314 0x05, 0x00, 0x80, 0x00, | |
315 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
316 0xB7, 0x46, | |
317 0x47, 0x1E, 0x00, | |
318 | |
319 | |
320 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
321 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
322 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
323 0xff, 0xff, 0xff, 0xff, | |
324 | |
325 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
326 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
327 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
328 0xff, 0xff, 0xff, 0xff, | |
329 | |
330 /*Iden. Information 2 */ | |
331 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
332 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
333 0xff, 0xff, 0xff, 0xff, | |
334 | |
335 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
336 /* EFmbn (record 1) */ | |
337 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
338 0xff, 0xff, | |
339 0x03, 0xff, | |
340 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
341 0xff, 0xff, | |
342 /* EFmbn (record 2) */ | |
343 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
344 0xff, 0xff, | |
345 0x04, 0xff, | |
346 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
347 0xff, 0xff, | |
348 /* EFmbn (record 3) */ | |
349 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
350 0xff, 0xff, | |
351 0x00, 0xff, | |
352 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
353 0xff, 0xff, | |
354 /* EFmbn (record 4) */ | |
355 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
356 0xff, 0xff, | |
357 0x00, 0xff, | |
358 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
359 0xff, 0xff, | |
360 | |
361 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
362 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
363 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
364 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
365 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
366 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
367 0xff, 0x81, | |
368 | |
369 //EFclng | |
370 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
371 'a', 'u', | |
372 | |
373 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
374 /* EFsmsprfl record 1 */ | |
375 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
376 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
377 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
378 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
379 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
380 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
381 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
382 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
383 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
384 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
385 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
386 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
387 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
388 | |
389 /* EFsmsprfl record 2 */ | |
390 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
391 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
392 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
393 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
394 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
395 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
396 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
397 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
398 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
399 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
400 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
401 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
402 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
403 | |
404 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
405 0xff, 0xff, | |
406 0xff, 0xff, | |
407 0x00, 0x00, | |
408 0x00, 0x00, | |
409 0x00, 0x00, | |
410 0x00, 0x00, | |
411 0x00, 0x00, | |
412 0x00, 0x00, | |
413 0x00, 0x00, | |
414 0x00, 0x00, | |
415 0x00, 0x00, | |
416 0x00, 0x00, | |
417 0x00, 0x00, | |
418 0x00, 0x00, | |
419 0x00, 0x00, | |
420 0x00, 0x00, | |
421 0x00, 0x00, | |
422 0x01, 0x06, | |
423 0x00, 0x02, | |
424 0x44, 0x2D, | |
425 0x5A, 0x57, | |
426 0x45, 0x49, | |
427 0x20, 0x50, | |
428 0x52, 0x49, | |
429 0x56, 0x41, | |
430 0x54, 0x00, | |
431 0x00, 0x00, | |
432 0x00, 0x00, | |
433 0x00, 0x00, | |
434 0x44, 0x2D, | |
435 0x5A, 0x57, | |
436 0x45, 0x49, | |
437 0x00, 0x00, | |
438 0x00, 0x00, | |
439 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
441 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
442 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
445 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
447 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
448 0x20, 0x20, 0x05, /* buzzer */ | |
449 0x24, /* audio */ | |
450 0x00, /* miscellaneous */ | |
451 0x89, /* display */ | |
452 0x00, /* language */ | |
453 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
454 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
455 0x00, 0x00, 0x00, 0x0f, | |
456 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
457 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
458 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
459 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
460 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
461 0x0f, | |
462 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
463 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
464 0x00, 0x00, | |
465 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
466 0x00, 0x00, | |
467 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
468 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
469 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
470 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
471 0xFF, /* Update Status */ | |
472 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
473 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
474 0x07, /* CKSN */ | |
475 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
476 0xFF, /* IMSI length */ | |
477 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* IMSI */ | |
478 /* SMS */ 0xAA, 0x01, /* checksum & version */ | |
479 0x03, /* record 1: MT, unread */ | |
480 0x04, 0x91, 0x21, 0x43, 0xF5, 0x04, 0x06, /* DELIVER_7CL1 of SMS TCs */ | |
481 0x81, 0x89, 0x67, 0x45, 0x40, 0xF1, 0x89, 0x10, | |
482 0x70, 0x21, 0x43, 0x65, 0x40, 0x09, 0x41, 0xE1, | |
483 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, 0xFF, 0xFF, | |
484 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
485 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
486 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
487 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
488 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
489 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
490 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
491 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
492 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
493 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
494 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
495 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
496 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
497 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
498 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
499 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
500 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
501 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
502 0x05, /* record 2: MO, sent */ | |
503 0x04, 0x91, 0x21, 0x43, 0xF5, 0x01, 0xFF, /* MO_INIT of SMS TCs */ | |
504 0x06, 0x91, 0x56, 0x34, 0x12, 0x40, 0xF2, 0x09, | |
505 0x41, 0xE1, 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, | |
506 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
507 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
508 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
509 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
510 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
511 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
512 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
513 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
514 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
515 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
516 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
517 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
518 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
519 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
520 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
521 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
522 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
523 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
524 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
525 0x00, /* record 3: empty */ | |
526 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
527 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
528 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
529 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
530 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
531 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
532 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
533 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
534 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
535 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
536 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
537 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
538 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
539 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
540 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
541 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
542 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
543 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
544 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
545 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
546 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
547 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | |
548 }; | |
549 | |
550 /* | |
551 * PCS 1900 Variant | |
552 */ | |
553 static UBYTE pcm_content_pcs_1900 [] = | |
554 { | |
555 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
556 /*actual values supported by the MS*/ | |
557 /*0xB7, 0xC7, 0x00,*/ | |
558 0x07, 0x47, 0x00, | |
559 0x00, 0x00, 0x00, | |
560 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
561 0x31, 0x75, 0x09, | |
562 0x42, 0x86, 0x11, | |
563 0x22, 0x87, | |
564 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
565 0x04, 0x1F, 0x41, 0x14, | |
566 0x00, 0x00, 0x00, 0x00, | |
567 0x50, 0x00, 0x00, 0xa5, | |
568 0x05, 0x00, 0x80, 0x00, | |
569 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
570 0xB7, 0x46, | |
571 0x47, 0x1F, 0x00, | |
572 | |
573 | |
574 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
575 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
576 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
577 0xff, 0xff, 0xff, 0xff, | |
578 | |
579 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
580 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
581 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
582 0xff, 0xff, 0xff, 0xff, | |
583 | |
584 /*Iden. Information 2 */ | |
585 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
586 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
587 0xff, 0xff, 0xff, 0xff, | |
588 | |
589 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
590 /* EFmbn (record 1) */ | |
591 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
592 0xff, 0xff, | |
593 0x03, 0xff, | |
594 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
595 0xff, 0xff, | |
596 /* EFmbn (record 2) */ | |
597 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
598 0xff, 0xff, | |
599 0x04, 0xff, | |
600 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
601 0xff, 0xff, | |
602 /* EFmbn (record 3) */ | |
603 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
604 0xff, 0xff, | |
605 0x00, 0xff, | |
606 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
607 0xff, 0xff, | |
608 /* EFmbn (record 4) */ | |
609 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
610 0xff, 0xff, | |
611 0x00, 0xff, | |
612 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
613 0xff, 0xff, | |
614 | |
615 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
616 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
617 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
618 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
619 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
620 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
621 0xff, 0x81, | |
622 | |
623 //EFclng | |
624 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
625 'a', 'u', | |
626 | |
627 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
628 /* EFsmsprfl record 1 */ | |
629 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
630 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
631 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
632 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
633 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
634 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
635 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
636 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
637 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
638 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
639 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
640 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
641 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
642 | |
643 /* EFsmsprfl record 2 */ | |
644 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
645 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
646 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
647 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
648 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
649 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
650 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
651 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
652 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
653 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
654 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
655 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
656 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
657 | |
658 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
659 0xff, 0xff, | |
660 0xff, 0xff, | |
661 0x00, 0x00, | |
662 0x00, 0x00, | |
663 0x00, 0x00, | |
664 0x00, 0x00, | |
665 0x00, 0x00, | |
666 0x00, 0x00, | |
667 0x00, 0x00, | |
668 0x00, 0x00, | |
669 0x00, 0x00, | |
670 0x00, 0x00, | |
671 0x00, 0x00, | |
672 0x00, 0x00, | |
673 0x00, 0x00, | |
674 0x00, 0x00, | |
675 0x00, 0x00, | |
676 0x01, 0x06, | |
677 0x00, 0x02, | |
678 0x44, 0x2D, | |
679 0x5A, 0x57, | |
680 0x45, 0x49, | |
681 0x20, 0x50, | |
682 0x52, 0x49, | |
683 0x56, 0x41, | |
684 0x54, 0x00, | |
685 0x00, 0x00, | |
686 0x00, 0x00, | |
687 0x00, 0x00, | |
688 0x44, 0x2D, | |
689 0x5A, 0x57, | |
690 0x45, 0x49, | |
691 0x00, 0x00, | |
692 0x00, 0x00, | |
693 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
694 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
695 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
696 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
699 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
700 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
701 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
702 0x20, 0x20, 0x05, /* buzzer */ | |
703 0x24, /* audio */ | |
704 0x00, /* miscellaneous */ | |
705 0x89, /* display */ | |
706 0x00, /* language */ | |
707 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
708 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
709 0x00, 0x00, 0x00, 0x0f, | |
710 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
711 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
712 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
713 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
714 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
715 0x0f, | |
716 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
717 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
718 0x00, 0x00, | |
719 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
720 0x00, 0x00, | |
721 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
722 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
723 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
724 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
725 0xFF, /* Update Status */ | |
726 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
727 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
728 0x07, /* CKSN */ | |
729 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
730 0xFF, /* IMSI length */ | |
731 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* IMSI */ | |
732 /* SMS */ 0xAA, 0x01, /* checksum & version */ | |
733 0x00, /* record 1: empty */ | |
734 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
735 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
736 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
737 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
738 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
739 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
740 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
741 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
742 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
743 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
744 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
745 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
746 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
747 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
748 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
749 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
750 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
751 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
752 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
753 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
754 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
755 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
756 0x00, /* record 2: empty */ | |
757 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
758 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
759 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
760 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
761 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
762 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
763 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
764 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
765 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
766 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
767 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
768 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
769 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
770 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
771 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
772 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
773 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
774 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
775 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
776 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
777 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
778 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
779 0x00, /* record 3: empty */ | |
780 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
781 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
782 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
783 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
784 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
785 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
786 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
787 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
788 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
789 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
790 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
791 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
792 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
793 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
794 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
795 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
796 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
797 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
798 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
799 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
800 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
801 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | |
802 }; | |
803 | |
804 /* | |
805 * Dualband Version | |
806 */ | |
807 static UBYTE pcm_content_dualband [] = | |
808 { | |
809 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
810 /*actual values supported by the MS*/ | |
811 /*0xB7, 0xC7, 0x00,*/ | |
812 0x05, 0x45, 0x00, | |
813 0x00, 0x00, 0x00, | |
814 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
815 0x31, 0x75, 0x09, | |
816 0x42, 0x86, 0x11, | |
817 0x22, 0x87, | |
818 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
819 0x03, 0x1F, 0x41, 0x14, | |
820 0x00, 0x00, 0x00, 0x00, | |
821 0x50, 0x00, 0x00, 0xa5, | |
822 0x05, 0x00, 0x80, 0x00, | |
823 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
824 0xB7, 0x46, | |
825 0x47, 0x1F, 0x00, | |
826 | |
827 | |
828 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
829 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
830 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
831 0xff, 0xff, 0xff, 0xff, | |
832 | |
833 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
834 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
835 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
836 0xff, 0xff, 0xff, 0xff, | |
837 | |
838 /*Iden. Information 2 */ | |
839 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
840 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
841 0xff, 0xff, 0xff, 0xff, | |
842 | |
843 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
844 /* EFmbn (record 1) */ | |
845 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
846 0xff, 0xff, | |
847 0x03, 0xff, | |
848 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
849 0xff, 0xff, | |
850 /* EFmbn (record 2) */ | |
851 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
852 0xff, 0xff, | |
853 0x04, 0xff, | |
854 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
855 0xff, 0xff, | |
856 /* EFmbn (record 3) */ | |
857 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
858 0xff, 0xff, | |
859 0x00, 0xff, | |
860 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
861 0xff, 0xff, | |
862 /* EFmbn (record 4) */ | |
863 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
864 0xff, 0xff, | |
865 0x00, 0xff, | |
866 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
867 0xff, 0xff, | |
868 | |
869 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
870 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
871 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
872 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
873 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
874 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
875 0xff, 0x81, | |
876 | |
877 //EFclng | |
878 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
879 'a', 'u', | |
880 | |
881 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
882 /* EFsmsprfl record 1 */ | |
883 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
884 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
885 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
886 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
887 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
888 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
889 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
890 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
891 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
892 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
893 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
894 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
895 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
896 | |
897 /* EFsmsprfl record 2 */ | |
898 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
899 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
900 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
901 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
902 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
903 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
904 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
905 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
906 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
907 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
908 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
909 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
910 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
911 | |
912 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
913 0xff, 0xff, | |
914 0xff, 0xff, | |
915 0x00, 0x00, | |
916 0x00, 0x00, | |
917 0x00, 0x00, | |
918 0x00, 0x00, | |
919 0x00, 0x00, | |
920 0x00, 0x00, | |
921 0x00, 0x00, | |
922 0x00, 0x00, | |
923 0x00, 0x00, | |
924 0x00, 0x00, | |
925 0x00, 0x00, | |
926 0x00, 0x00, | |
927 0x00, 0x00, | |
928 0x00, 0x00, | |
929 0x00, 0x00, | |
930 0x01, 0x06, | |
931 0x00, 0x02, | |
932 0x44, 0x2D, | |
933 0x5A, 0x57, | |
934 0x45, 0x49, | |
935 0x20, 0x50, | |
936 0x52, 0x49, | |
937 0x56, 0x41, | |
938 0x54, 0x00, | |
939 0x00, 0x00, | |
940 0x00, 0x00, | |
941 0x00, 0x00, | |
942 0x44, 0x2D, | |
943 0x5A, 0x57, | |
944 0x45, 0x49, | |
945 0x00, 0x00, | |
946 0x00, 0x00, | |
947 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
948 /*EGSM*/ | |
949 0x00, 0x00, 0x00, 0x00, 0x00, | |
950 0x00, 0x00, 0x00, 0x00, 0x00, | |
951 0x00, 0x00, 0x00, 0x00, 0x00, | |
952 0x00, 0x00, 0x00, 0x00, 0x00, | |
953 0x00, 0x00, 0x00, 0x00, 0x00, | |
954 0x00, 0x00, 0x00, 0x00, 0x00, | |
955 0x00, 0x00, 0x00, 0x00, 0x00, | |
956 0x00, 0x00, 0x00, 0x00, 0x00, | |
957 0x00, 0x00, 0x00, 0x00, 0x00, | |
958 0x00, 0x00, 0x00, 0x00, 0x00, | |
959 0x00, 0x40, 0x00, 0x00, | |
960 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
961 0x20, 0x20, 0x05, /* buzzer */ | |
962 0x24, /* audio */ | |
963 0x00, /* miscellaneous */ | |
964 0x89, /* display */ | |
965 0x00, /* language */ | |
966 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
967 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
968 0x00, 0x00, 0x00, 0x0f, | |
969 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
970 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
971 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
972 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
973 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
974 0x0f, | |
975 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
976 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
977 0x00, 0x00, | |
978 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
979 0x00, 0x00, | |
980 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
981 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
982 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
983 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
984 0xFF, /* Update Status */ | |
985 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
986 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
987 0x07, /* CKSN */ | |
988 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
989 0xFF, /* IMSI length */ | |
990 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* IMSI */ | |
991 /* SMS */ 0xAA, 0x01, /* checksum & version */ | |
992 0x03, /* record 1: MT, unread */ | |
993 0x04, 0x91, 0x21, 0x43, 0xF5, 0x04, 0x06, /* DELIVER_7CL1 of SMS TCs */ | |
994 0x81, 0x89, 0x67, 0x45, 0x40, 0xF1, 0x89, 0x10, | |
995 0x70, 0x21, 0x43, 0x65, 0x40, 0x09, 0x41, 0xE1, | |
996 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, 0xFF, 0xFF, | |
997 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
998 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
999 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1000 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1001 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1002 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1003 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1004 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1005 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1006 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1007 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1008 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1009 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1010 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1011 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1012 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1013 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1014 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1015 0x05, /* record 2: MO, sent */ | |
1016 0x04, 0x91, 0x21, 0x43, 0xF5, 0x01, 0xFF, /* MO_INIT of SMS TCs */ | |
1017 0x06, 0x91, 0x56, 0x34, 0x12, 0x40, 0xF2, 0x09, | |
1018 0x41, 0xE1, 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, | |
1019 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1020 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1021 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1022 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1023 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1024 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1025 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1026 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1027 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1028 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1029 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1030 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1031 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1032 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1033 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1034 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1035 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1036 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1037 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1038 0x07, /* record 3: MO, unsent */ | |
1039 0x04, 0x91, 0x21, 0x43, 0xF5, 0x19, 0x08, /* MO_ABS of SMS TCs */ | |
1040 0x05, 0xA1, 0x89, 0x67, 0xF5, 0x40, 0xF0, 0x89, | |
1041 0x10, 0x70, 0x21, 0x43, 0x65, 0x40, 0x09, 0xD2, | |
1042 0x29, 0xB5, 0x6A, 0xBD, 0x62, 0xB3, 0x5A, 0xFF, | |
1043 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1044 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1045 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1046 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1047 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1048 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1049 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1050 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1051 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1052 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1053 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1054 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1055 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1056 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1057 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1058 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1059 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
1060 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | |
1061 }; | |
1062 | |
1063 /* | |
1064 * AMR Version | |
1065 */ | |
1066 static UBYTE pcm_content_amr [] = | |
1067 { | |
1068 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
1069 /*actual values supported by the MS*/ | |
1070 /*0xB7, 0xC7, 0x00,*/ | |
1071 0x37, 0x47, 0x00, | |
1072 0x00, 0x00, 0x00, | |
1073 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
1074 0x31, 0x75, 0x09, | |
1075 0x42, 0x86, 0x11, | |
1076 0x22, 0x87, | |
1077 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
1078 0x0B, 0x1F, 0x41, 0x14, | |
1079 0x00, 0x00, 0x00, 0x00, | |
1080 0x50, 0x00, 0x00, 0xa5, | |
1081 0x05, 0x00, 0x80, 0x00, | |
1082 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
1083 0xB7, 0x46, | |
1084 0x47, 0x1F, 0x00, | |
1085 | |
1086 | |
1087 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
1088 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1089 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
1090 0xff, 0xff, 0xff, 0xff, | |
1091 | |
1092 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
1093 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1094 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
1095 0xff, 0xff, 0xff, 0xff, | |
1096 | |
1097 /*Iden. Information 2 */ | |
1098 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1099 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
1100 0xff, 0xff, 0xff, 0xff, | |
1101 | |
1102 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
1103 /* EFmbn (record 1) */ | |
1104 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
1105 0xff, 0xff, | |
1106 0x03, 0xff, | |
1107 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1108 0xff, 0xff, | |
1109 /* EFmbn (record 2) */ | |
1110 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
1111 0xff, 0xff, | |
1112 0x04, 0xff, | |
1113 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1114 0xff, 0xff, | |
1115 /* EFmbn (record 3) */ | |
1116 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1117 0xff, 0xff, | |
1118 0x00, 0xff, | |
1119 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1120 0xff, 0xff, | |
1121 /* EFmbn (record 4) */ | |
1122 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1123 0xff, 0xff, | |
1124 0x00, 0xff, | |
1125 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1126 0xff, 0xff, | |
1127 | |
1128 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
1129 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
1130 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
1131 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1132 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1133 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1134 0xff, 0x81, | |
1135 | |
1136 //EFclng | |
1137 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
1138 'a', 'u', | |
1139 | |
1140 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
1141 /* EFsmsprfl record 1 */ | |
1142 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1143 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1144 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1145 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1146 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1147 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1148 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1149 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1150 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1151 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1152 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1153 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1154 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1155 | |
1156 /* EFsmsprfl record 2 */ | |
1157 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1158 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1159 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1160 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1161 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1162 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1163 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1164 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1165 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1166 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1167 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1168 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1169 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1170 | |
1171 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
1172 0xff, 0xff, | |
1173 0xff, 0xff, | |
1174 0x00, 0x00, | |
1175 0x00, 0x00, | |
1176 0x00, 0x00, | |
1177 0x00, 0x00, | |
1178 0x00, 0x00, | |
1179 0x00, 0x00, | |
1180 0x00, 0x00, | |
1181 0x00, 0x00, | |
1182 0x00, 0x00, | |
1183 0x00, 0x00, | |
1184 0x00, 0x00, | |
1185 0x00, 0x00, | |
1186 0x00, 0x00, | |
1187 0x00, 0x00, | |
1188 0x00, 0x00, | |
1189 0x01, 0x06, | |
1190 0x00, 0x02, | |
1191 0x44, 0x2D, | |
1192 0x5A, 0x57, | |
1193 0x45, 0x49, | |
1194 0x20, 0x50, | |
1195 0x52, 0x49, | |
1196 0x56, 0x41, | |
1197 0x54, 0x00, | |
1198 0x00, 0x00, | |
1199 0x00, 0x00, | |
1200 0x00, 0x00, | |
1201 0x44, 0x2D, | |
1202 0x5A, 0x57, | |
1203 0x45, 0x49, | |
1204 0x00, 0x00, | |
1205 0x00, 0x00, | |
1206 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1214 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
1215 0x20, 0x20, 0x05, /* buzzer */ | |
1216 0x24, /* audio */ | |
1217 0x00, /* miscellaneous */ | |
1218 0x89, /* display */ | |
1219 0x00, /* language */ | |
1220 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
1221 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
1222 0x00, 0x00, 0x00, 0x0f, | |
1223 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
1224 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1225 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1226 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1227 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1228 0x0f, | |
1229 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
1230 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
1231 0x00, 0x00, | |
1232 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
1233 0x00, 0x00, | |
1234 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1235 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
1236 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
1237 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
1238 0xFF, /* Update Status */ | |
1239 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1240 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
1241 0x07, /* CKSN */ | |
1242 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
1243 0xFF, /* IMSI length */ | |
1244 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
1245 }; | |
1246 | |
1247 /* | |
1248 * Dualband Extended Version (GSM 900 + E-GSM + DCS 1800) | |
1249 */ | |
1250 static UBYTE pcm_content_dualband_ext [] = | |
1251 { | |
1252 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
1253 /*actual values supported by the MS*/ | |
1254 /*0xB7, 0xC7, 0x00,*/ | |
1255 0x05, 0xC7, 0x80, | |
1256 0x00, 0x00, 0x00, | |
1257 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
1258 0x31, 0x75, 0x09, | |
1259 0x42, 0x86, 0x11, | |
1260 0x22, 0x87, | |
1261 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
1262 0x0B, 0x1F, 0x41, 0x14, | |
1263 0x00, 0x00, 0x00, 0x00, | |
1264 0x50, 0x00, 0x00, 0xa5, | |
1265 0x05, 0x00, 0x80, 0x00, | |
1266 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
1267 0xB7, 0x46, | |
1268 0x47, 0x1E, 0x00, | |
1269 | |
1270 | |
1271 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
1272 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1273 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
1274 0xff, 0xff, 0xff, 0xff, | |
1275 | |
1276 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
1277 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1278 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
1279 0xff, 0xff, 0xff, 0xff, | |
1280 | |
1281 /*Iden. Information 2 */ | |
1282 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1283 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
1284 0xff, 0xff, 0xff, 0xff, | |
1285 | |
1286 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
1287 /* EFmbn (record 1) */ | |
1288 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
1289 0xff, 0xff, | |
1290 0x03, 0xff, | |
1291 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1292 0xff, 0xff, | |
1293 /* EFmbn (record 2) */ | |
1294 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
1295 0xff, 0xff, | |
1296 0x04, 0xff, | |
1297 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1298 0xff, 0xff, | |
1299 /* EFmbn (record 3) */ | |
1300 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1301 0xff, 0xff, | |
1302 0x00, 0xff, | |
1303 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1304 0xff, 0xff, | |
1305 /* EFmbn (record 4) */ | |
1306 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1307 0xff, 0xff, | |
1308 0x00, 0xff, | |
1309 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1310 0xff, 0xff, | |
1311 | |
1312 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
1313 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
1314 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
1315 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1316 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1317 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1318 0xff, 0x81, | |
1319 | |
1320 //EFclng | |
1321 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
1322 'a', 'u', | |
1323 | |
1324 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
1325 /* EFsmsprfl record 1 */ | |
1326 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1327 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1328 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1329 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1330 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1331 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1332 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1333 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1334 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1335 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1336 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1337 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1338 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1339 | |
1340 /* EFsmsprfl record 2 */ | |
1341 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1342 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1343 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1344 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1345 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1346 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1347 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1348 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1349 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1350 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1351 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1352 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1353 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1354 | |
1355 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
1356 0xff, 0xff, | |
1357 0xff, 0xff, | |
1358 0x00, 0x00, | |
1359 0x00, 0x00, | |
1360 0x00, 0x00, | |
1361 0x00, 0x00, | |
1362 0x00, 0x00, | |
1363 0x00, 0x00, | |
1364 0x00, 0x00, | |
1365 0x00, 0x00, | |
1366 0x00, 0x00, | |
1367 0x00, 0x00, | |
1368 0x00, 0x00, | |
1369 0x00, 0x00, | |
1370 0x00, 0x00, | |
1371 0x00, 0x00, | |
1372 0x00, 0x00, | |
1373 0x01, 0x06, | |
1374 0x00, 0x02, | |
1375 0x44, 0x2D, | |
1376 0x5A, 0x57, | |
1377 0x45, 0x49, | |
1378 0x20, 0x50, | |
1379 0x52, 0x49, | |
1380 0x56, 0x41, | |
1381 0x54, 0x00, | |
1382 0x00, 0x00, | |
1383 0x00, 0x00, | |
1384 0x00, 0x00, | |
1385 0x44, 0x2D, | |
1386 0x5A, 0x57, | |
1387 0x45, 0x49, | |
1388 0x00, 0x00, | |
1389 0x00, 0x00, | |
1390 #define NEW_STORED_BCCHINFO | |
1391 #if defined(NEW_STORED_BCCHINFO) | |
1392 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1393 /*EGSM*/ | |
1394 0x8f, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, /* 527 */ | |
1395 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1398 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1400 0x42, 0x43, 0x43, 0x48, /* MAGIC_WORD_BCCHINFO (new format) */ | |
1401 0x00, 0x00, /* superfluous */ | |
1402 #else /* NEW_STORED_BCCHINFO */ | |
1403 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1404 /*EGSM*/ | |
1405 0x00, 0x00, 0x00, 0x00, 0x00, | |
1406 0x00, 0x00, 0x00, 0x00, 0x00, | |
1407 0x00, 0x00, 0x00, 0x00, 0x00, | |
1408 0x00, 0x00, 0x00, 0x00, 0x00, | |
1409 0x00, 0x00, 0x00, 0x00, 0x00, | |
1410 0x00, 0x00, 0x00, 0x00, 0x00, | |
1411 0x00, 0x00, 0x00, 0x00, 0x00, | |
1412 0x00, 0x00, 0x00, 0x00, 0x00, | |
1413 0x00, 0x00, 0x00, 0x00, 0x00, | |
1414 0x00, 0x00, 0x00, 0x00, 0x00, | |
1415 0x00, 0x40, 0x00, 0x00, | |
1416 #endif /* NEW_STORED_BCCHINFO */ | |
1417 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
1418 0x20, 0x20, 0x05, /* buzzer */ | |
1419 0x24, /* audio */ | |
1420 0x00, /* miscellaneous */ | |
1421 0x89, /* display */ | |
1422 0x00, /* language */ | |
1423 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
1424 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
1425 0x00, 0x00, 0x00, 0x0f, | |
1426 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
1427 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1428 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1429 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1430 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1431 0x0f, | |
1432 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
1433 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
1434 0x00, 0x00, | |
1435 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
1436 0x00, 0x00, | |
1437 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1438 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
1439 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
1440 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
1441 0xFF, /* Update Status */ | |
1442 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1443 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
1444 0x07, /* CKSN */ | |
1445 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
1446 0xFF, /* IMSI length */ | |
1447 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
1448 }; | |
1449 | |
1450 /* | |
1451 * Single band GSm 850 US Version | |
1452 */ | |
1453 static UBYTE pcm_content_gsm_850 [] = | |
1454 { | |
1455 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
1456 /*actual values supported by the MS*/ | |
1457 /*0xB7, 0xC7, 0x00,*/ | |
1458 0x07, 0x45, 0x00, | |
1459 0x00, 0x00, 0x00, | |
1460 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
1461 0x31, 0x75, 0x09, | |
1462 0x42, 0x86, 0x11, | |
1463 0x22, 0x87, | |
1464 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
1465 0x10, 0x1F, 0x41, 0x14, | |
1466 0x00, 0x00, 0x00, 0x00, | |
1467 0x50, 0x00, 0x00, 0xa5, | |
1468 0x05, 0x00, 0x80, 0x00, | |
1469 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
1470 0xB7, 0x46, | |
1471 0x47, 0x1F, 0x00, | |
1472 | |
1473 | |
1474 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
1475 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1476 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
1477 0xff, 0xff, 0xff, 0xff, | |
1478 | |
1479 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
1480 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1481 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
1482 0xff, 0xff, 0xff, 0xff, | |
1483 | |
1484 /*Iden. Information 2 */ | |
1485 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1486 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
1487 0xff, 0xff, 0xff, 0xff, | |
1488 | |
1489 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
1490 /* EFmbn (record 1) */ | |
1491 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
1492 0xff, 0xff, | |
1493 0x03, 0xff, | |
1494 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1495 0xff, 0xff, | |
1496 /* EFmbn (record 2) */ | |
1497 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
1498 0xff, 0xff, | |
1499 0x04, 0xff, | |
1500 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1501 0xff, 0xff, | |
1502 /* EFmbn (record 3) */ | |
1503 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1504 0xff, 0xff, | |
1505 0x00, 0xff, | |
1506 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1507 0xff, 0xff, | |
1508 /* EFmbn (record 4) */ | |
1509 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1510 0xff, 0xff, | |
1511 0x00, 0xff, | |
1512 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1513 0xff, 0xff, | |
1514 | |
1515 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
1516 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
1517 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
1518 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1519 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1520 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1521 0xff, 0x81, | |
1522 | |
1523 /* EFclng */ | |
1524 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
1525 'a', 'u', | |
1526 | |
1527 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
1528 /* EFsmsprfl record 1 */ | |
1529 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1530 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1531 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1532 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1533 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1534 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1535 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1536 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1537 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1538 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1539 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1540 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1541 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1542 | |
1543 /* EFsmsprfl record 2 */ | |
1544 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1545 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1546 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1547 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1548 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1549 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1550 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1551 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1552 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1553 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1554 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1555 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1556 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1557 | |
1558 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
1559 0x02, 0x2B, | |
1560 0x00, 0x37, | |
1561 0x54, 0x52, | |
1562 0x49, 0x50, | |
1563 0x4c, 0x45, | |
1564 0x2d, 0x20, | |
1565 0x54, 0x45, | |
1566 0x4C, 0x45, | |
1567 0x4B, 0x4F, | |
1568 0x4D, 0x20, | |
1569 0x00, 0x00, | |
1570 0x00, 0x00, | |
1571 0x54, 0x52, | |
1572 0x49, 0x50, | |
1573 0x4c, 0x45, | |
1574 0x00, 0x00, | |
1575 0x00, 0x00, | |
1576 0x01, 0x06, | |
1577 0x00, 0x02, | |
1578 0x44, 0x2D, | |
1579 0x5A, 0x57, | |
1580 0x45, 0x49, | |
1581 0x20, 0x50, | |
1582 0x52, 0x49, | |
1583 0x56, 0x41, | |
1584 0x54, 0x00, | |
1585 0x00, 0x00, | |
1586 0x00, 0x00, | |
1587 0x00, 0x00, | |
1588 0x44, 0x2D, | |
1589 0x5A, 0x57, | |
1590 0x45, 0x49, | |
1591 0x00, 0x00, | |
1592 0x00, 0x00, | |
1593 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1596 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1600 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , | |
1601 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
1602 0x20, 0x20, 0x05, /* buzzer */ | |
1603 0x24, /* audio */ | |
1604 0x00, /* miscellaneous */ | |
1605 0x89, /* display */ | |
1606 0x00, /* language */ | |
1607 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
1608 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
1609 0x00, 0x00, 0x00, 0x0f, | |
1610 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
1611 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1612 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1613 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1614 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1615 0x0f, | |
1616 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
1617 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
1618 0x00, 0x00, | |
1619 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
1620 0x00, 0x00, | |
1621 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1622 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
1623 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
1624 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
1625 0xFF, /* Update Status */ | |
1626 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1627 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
1628 0x07, /* CKSN */ | |
1629 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
1630 0xFF, /* IMSI length */ | |
1631 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
1632 }; | |
1633 /* | |
1634 * Dualband US Version | |
1635 */ | |
1636 static UBYTE pcm_content_dual_us [] = | |
1637 { | |
1638 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
1639 /*actual values supported by the MS*/ | |
1640 /*0xB7, 0xC7, 0x00,*/ | |
1641 0x07, 0x45, 0x00, | |
1642 0x00, 0x00, 0x00, | |
1643 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
1644 0x31, 0x75, 0x09, | |
1645 0x42, 0x86, 0x11, | |
1646 0x22, 0x87, | |
1647 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
1648 0x14, 0x1F, 0x41, 0x14, | |
1649 0x00, 0x00, 0x00, 0x00, | |
1650 0x50, 0x00, 0x00, 0xa5, | |
1651 0x05, 0x00, 0x80, 0x00, | |
1652 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
1653 0xB7, 0x46, | |
1654 0x47, 0x1F, 0x00, | |
1655 | |
1656 | |
1657 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
1658 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1659 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
1660 0xff, 0xff, 0xff, 0xff, | |
1661 | |
1662 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
1663 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1664 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
1665 0xff, 0xff, 0xff, 0xff, | |
1666 | |
1667 /*Iden. Information 2 */ | |
1668 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1669 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
1670 0xff, 0xff, 0xff, 0xff, | |
1671 | |
1672 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
1673 /* EFmbn (record 1) */ | |
1674 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
1675 0xff, 0xff, | |
1676 0x03, 0xff, | |
1677 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1678 0xff, 0xff, | |
1679 /* EFmbn (record 2) */ | |
1680 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
1681 0xff, 0xff, | |
1682 0x04, 0xff, | |
1683 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1684 0xff, 0xff, | |
1685 /* EFmbn (record 3) */ | |
1686 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1687 0xff, 0xff, | |
1688 0x00, 0xff, | |
1689 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1690 0xff, 0xff, | |
1691 /* EFmbn (record 4) */ | |
1692 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1693 0xff, 0xff, | |
1694 0x00, 0xff, | |
1695 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1696 0xff, 0xff, | |
1697 | |
1698 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
1699 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
1700 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
1701 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1702 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1703 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1704 0xff, 0x81, | |
1705 | |
1706 /* EFclng */ | |
1707 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
1708 'a', 'u', | |
1709 | |
1710 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
1711 /* EFsmsprfl record 1 */ | |
1712 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1713 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1714 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1715 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1716 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1717 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1718 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1719 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1720 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1721 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1722 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1723 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1724 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1725 | |
1726 /* EFsmsprfl record 2 */ | |
1727 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1728 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1729 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1730 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1731 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1732 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1733 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1734 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1735 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1736 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1737 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1738 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1739 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1740 | |
1741 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
1742 0x02, 0x2B, | |
1743 0x00, 0x37, | |
1744 0x54, 0x52, | |
1745 0x49, 0x50, | |
1746 0x4c, 0x45, | |
1747 0x2d, 0x20, | |
1748 0x54, 0x45, | |
1749 0x4C, 0x45, | |
1750 0x4B, 0x4F, | |
1751 0x4D, 0x20, | |
1752 0x00, 0x00, | |
1753 0x00, 0x00, | |
1754 0x54, 0x52, | |
1755 0x49, 0x50, | |
1756 0x4c, 0x45, | |
1757 0x00, 0x00, | |
1758 0x00, 0x00, | |
1759 0x01, 0x06, | |
1760 0x00, 0x02, | |
1761 0x44, 0x2D, | |
1762 0x5A, 0x57, | |
1763 0x45, 0x49, | |
1764 0x20, 0x50, | |
1765 0x52, 0x49, | |
1766 0x56, 0x41, | |
1767 0x54, 0x00, | |
1768 0x00, 0x00, | |
1769 0x00, 0x00, | |
1770 0x00, 0x00, | |
1771 0x44, 0x2D, | |
1772 0x5A, 0x57, | |
1773 0x45, 0x49, | |
1774 0x00, 0x00, | |
1775 0x00, 0x00, | |
1776 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1778 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1780 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , | |
1784 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
1785 0x20, 0x20, 0x05, /* buzzer */ | |
1786 0x24, /* audio */ | |
1787 0x00, /* miscellaneous */ | |
1788 0x89, /* display */ | |
1789 0x00, /* language */ | |
1790 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
1791 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
1792 0x00, 0x00, 0x00, 0x0f, | |
1793 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
1794 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1795 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1796 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1797 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1798 0x0f, | |
1799 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
1800 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
1801 0x00, 0x00, | |
1802 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
1803 0x00, 0x00, | |
1804 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1805 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
1806 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
1807 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
1808 0xFF, /* Update Status */ | |
1809 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1810 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
1811 0x07, /* CKSN */ | |
1812 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
1813 0xFF, /* IMSI length */ | |
1814 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
1815 }; | |
1816 /* | |
1817 * Quadband Version | |
1818 */ | |
1819 static UBYTE pcm_content_quadband [] = | |
1820 { | |
1821 /* MSCAP */ 0xAA, 0x01, /* checksum & version */ | |
1822 /*actual values supported by the MS*/ | |
1823 /*0xB7, 0xC7, 0x00,*/ | |
1824 0x07, 0x45, 0x00, | |
1825 0x00, 0x00, 0x00, | |
1826 /* IMEI */ 0xAA, 0x01, /* checksum & version */ | |
1827 0x31, 0x75, 0x09, | |
1828 0x42, 0x86, 0x11, | |
1829 0x22, 0x87, | |
1830 /* RFCAP */ 0xAA, 0x01, /* checksum & version */ | |
1831 0x00, 0x1F, 0x41, 0x14, | |
1832 0x00, 0x00, 0x00, 0x00, | |
1833 0x50, 0x00, 0x00, 0xa5, | |
1834 0x05, 0x00, 0x80, 0x00, | |
1835 /* MSSUP */ 0xAA, 0x01, /* checksum & version */ | |
1836 0xB7, 0x46, | |
1837 0x47, 0x1F, 0x00, | |
1838 | |
1839 | |
1840 /* EFcgmi */ 0xAA, 0x01, /* checksum & version */ | |
1841 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1842 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
1843 0xff, 0xff, 0xff, 0xff, | |
1844 | |
1845 /*Iden. Information 1 */ 0xAA, 0x01, /* checksum & version */ | |
1846 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1847 't', 'u', 'r', 'e', 'r', '1', '>', 0xff, | |
1848 0xff, 0xff, 0xff, 0xff, | |
1849 | |
1850 /*Iden. Information 2 */ | |
1851 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | |
1852 't', 'u', 'r', 'e', 'r', '2', '>', 0xff, | |
1853 0xff, 0xff, 0xff, 0xff, | |
1854 | |
1855 /* MBN */ 0xAA, 0x01, /* checksum & version */ | |
1856 /* EFmbn (record 1) */ | |
1857 0x4c, 0x49, 0x4e, 0x31, 0xff, 0xff, 0xff, 0xff, | |
1858 0xff, 0xff, | |
1859 0x03, 0xff, | |
1860 0x12, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1861 0xff, 0xff, | |
1862 /* EFmbn (record 2) */ | |
1863 0x4c, 0x49, 0x4e, 0x32, 0xff, 0xff, 0xff, 0xff, | |
1864 0xff, 0xff, | |
1865 0x04, 0xff, | |
1866 0x11, 0x11, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1867 0xff, 0xff, | |
1868 /* EFmbn (record 3) */ | |
1869 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1870 0xff, 0xff, | |
1871 0x00, 0xff, | |
1872 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1873 0xff, 0xff, | |
1874 /* EFmbn (record 4) */ | |
1875 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1876 0xff, 0xff, | |
1877 0x00, 0xff, | |
1878 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1879 0xff, 0xff, | |
1880 | |
1881 /* VMN */ 0xAA, 0x01, /* checksum & version */ | |
1882 0x30, 0x33, 0x30, 0x33, 0x39, 0x30, 0x39, 0x34, //EFvmn | |
1883 0x33, 0x33, 0x36, 0x37, 0xff, 0xff, 0xff, 0xff, | |
1884 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1885 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1886 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1887 0xff, 0x81, | |
1888 | |
1889 /* EFclng */ | |
1890 /* CLNG */ 0xAA, 0x01, /* checksum & version */ | |
1891 'a', 'u', | |
1892 | |
1893 /* SMSPRFL */ 0xAA, 0x01, /* checksum & version */ | |
1894 /* EFsmsprfl record 1 */ | |
1895 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1896 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1897 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1898 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1899 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1900 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1901 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1902 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1903 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1904 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1905 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1906 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1907 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1908 | |
1909 /* EFsmsprfl record 2 */ | |
1910 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1911 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1912 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1913 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1914 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1915 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1916 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1917 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1918 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1919 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1920 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1921 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1922 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1923 | |
1924 /* PLMN */ 0xAA, 0x01, /* checksum & version */ | |
1925 0x02, 0x2B, | |
1926 0x00, 0x37, | |
1927 0x54, 0x52, | |
1928 0x49, 0x50, | |
1929 0x4c, 0x45, | |
1930 0x2d, 0x20, | |
1931 0x54, 0x45, | |
1932 0x4C, 0x45, | |
1933 0x4B, 0x4F, | |
1934 0x4D, 0x20, | |
1935 0x00, 0x00, | |
1936 0x00, 0x00, | |
1937 0x54, 0x52, | |
1938 0x49, 0x50, | |
1939 0x4c, 0x45, | |
1940 0x00, 0x00, | |
1941 0x00, 0x00, | |
1942 0x01, 0x06, | |
1943 0x00, 0x02, | |
1944 0x44, 0x2D, | |
1945 0x5A, 0x57, | |
1946 0x45, 0x49, | |
1947 0x20, 0x50, | |
1948 0x52, 0x49, | |
1949 0x56, 0x41, | |
1950 0x54, 0x00, | |
1951 0x00, 0x00, | |
1952 0x00, 0x00, | |
1953 0x00, 0x00, | |
1954 0x44, 0x2D, | |
1955 0x5A, 0x57, | |
1956 0x45, 0x49, | |
1957 0x00, 0x00, | |
1958 0x00, 0x00, | |
1959 /* BCCHINFO */ 0xAA, 0x01, /* checksum & version */ | |
1960 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1962 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1963 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1964 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , | |
1967 /* MSSET */ 0xAA, 0x01, /* checksum & version */ | |
1968 0x20, 0x20, 0x05, /* buzzer */ | |
1969 0x24, /* audio */ | |
1970 0x00, /* miscellaneous */ | |
1971 0x89, /* display */ | |
1972 0x00, /* language */ | |
1973 0xFF, 0xFF, 0xFF, /* recentLdxRef */ | |
1974 /* simlck */ 0xAA, 0x01, /* checksum & version */ | |
1975 0x00, 0x00, 0x00, 0x0f, | |
1976 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, | |
1977 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
1978 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1979 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1980 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, | |
1981 0x0f, | |
1982 0x22, 0x00, 0x22, 0x01, 0x23, 0x15, 0x22, 0x35, | |
1983 0x24, 0x25, 0x11, 0x22, 0x46, 0x55, 0x66, | |
1984 0x00, 0x00, | |
1985 /* ALS */ 0xAA, 0x01, /* checksum & version */ | |
1986 0x00, 0x00, | |
1987 /* locGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1988 0xFF, 0xFF, 0xFF, 0xFF, /* P-TMSI */ | |
1989 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
1990 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
1991 0xFF, /* Update Status */ | |
1992 /* KcGPRS */ 0xAA, 0x01, /* checksum & version */ | |
1993 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Kc */ | |
1994 0x07, /* CKSN */ | |
1995 /* IMSI-GPRS */ 0xAA, 0x01, /* checksum & version */ | |
1996 0xFF, /* IMSI length */ | |
1997 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
1998 }; | |
1999 | |
2000 | |
2001 typedef struct | |
2002 { | |
2003 char * identifier; | |
2004 USHORT start; | |
2005 USHORT length; | |
2006 USHORT records; | |
2007 } T_PCM_DESCRIPTION; | |
2008 | |
2009 #define LEN_MSCAP (SIZE_EF_MSCAP * NR_EF_MSCAP + 2) | |
2010 #define LEN_IMEI (SIZE_EF_IMEI * NR_EF_IMEI + 2) | |
2011 #define LEN_RFCAP (SIZE_EF_RFCAP * NR_EF_RFCAP + 2) | |
2012 #define LEN_MSSUP (SIZE_EF_MSSUP * NR_EF_MSSUP + 2) | |
2013 #define LEN_CGMI (SIZE_EF_CGMI * NR_EF_CGMI + 2) | |
2014 #define LEN_INF0 (SIZE_EF_INF0 * NR_EF_INF0 + 2) | |
2015 #define LEN_MBN (SIZE_EF_MBN * NR_EF_MBN + 2) | |
2016 #define LEN_VMN (SIZE_EF_VMN * NR_EF_VMN + 2) | |
2017 #define LEN_CLNG (SIZE_EF_CLNG * NR_EF_CLNG + 2) | |
2018 | |
2019 #define LEN_SMSPRFL (SIZE_EF_SMSPRFL * NR_EF_SMSPRFL+ 2) | |
2020 #define LEN_PLMN (SIZE_EF_PLMN * NR_EF_PLMN + 2) | |
2021 #define LEN_BCCHINFO (SIZE_EF_BCCHINFO * NR_EF_BCCHINFO+ 2) | |
2022 #define LEN_MSSET (SIZE_EF_MSSET * NR_EF_MSSET + 2) | |
2023 #define LEN_SIMLCK (SIZE_EF_SIMLCK * NR_EF_SIMLCK + 2) // VO | |
2024 #define LEN_ALS (SIZE_EF_ALS * NR_EF_ALS + 2) | |
2025 #define LEN_LOCGPRS (SIZE_EF_LOCGPRS * NR_EF_LOCGPRS + 2) | |
2026 #define LEN_KCGPRS (SIZE_EF_KCGPRS * NR_EF_KCGPRS + 2) | |
2027 #define LEN_IMSIGPRS (SIZE_EF_IMSIGPRS * NR_EF_IMSIGPRS + 2) | |
2028 /* only present for STD = 3 and 4 */ | |
2029 #define LEN_EF_SMS (SIZE_EF_SMS * NR_EF_SMS + 2) | |
2030 | |
2031 #define START_MSCAP 0 | |
2032 #define START_IMEI (START_MSCAP + LEN_MSCAP) | |
2033 #define START_RFCAP (START_IMEI + LEN_IMEI) | |
2034 #define START_MSSUP (START_RFCAP + LEN_RFCAP) | |
2035 #define START_CGMI (START_MSSUP + LEN_MSSUP) | |
2036 #define START_INF0 (START_CGMI + LEN_CGMI) | |
2037 #define START_MBN (START_INF0 + LEN_INF0) | |
2038 #define START_VMN (START_MBN + LEN_MBN) | |
2039 #define START_CLNG (START_VMN + LEN_VMN) | |
2040 #define START_SMSPRFL (START_CLNG + LEN_CLNG) | |
2041 #define START_PLMN (START_SMSPRFL + LEN_SMSPRFL) | |
2042 #define START_BCCHINFO (START_PLMN + LEN_PLMN) | |
2043 #define START_MSSET (START_BCCHINFO + LEN_BCCHINFO) | |
2044 #define START_SIMLCK (START_MSSET + LEN_MSSET) // VO | |
2045 #define START_ALS (START_SIMLCK + LEN_SIMLCK) | |
2046 #define START_LOCGPRS (START_ALS + LEN_ALS) | |
2047 #define START_KCGPRS (START_LOCGPRS + LEN_LOCGPRS) | |
2048 #define START_IMSIGPRS (START_KCGPRS + LEN_KCGPRS) | |
2049 | |
2050 #define PCM_SIZE (START_IMSIGPRS + LEN_IMSIGPRS) | |
2051 /* only present for STD = 3 and 4 */ | |
2052 #define START_SMS (START_IMSIGPRS + LEN_IMSIGPRS) | |
2053 #define PCM_SIZE_SMS (START_SMS + LEN_EF_SMS) | |
2054 | |
2055 #define PCM_SIZE_MAX (PCM_SIZE_SMS) | |
2056 | |
2057 /* | |
2058 * RAM for the copy of PCM data | |
2059 */ | |
2060 static UBYTE pcm_mem [PCM_SIZE_MAX]; | |
2061 | |
2062 /* | |
2063 * Default description table | |
2064 */ | |
2065 static const T_PCM_DESCRIPTION pcm_table_def[] = | |
2066 { | |
2067 { "MSCAP" , START_MSCAP, SIZE_EF_MSCAP +2, NR_EF_MSCAP }, | |
2068 { "IMEI" , START_IMEI, SIZE_EF_IMEI +2, NR_EF_IMEI }, | |
2069 { "RFCAP" , START_RFCAP, SIZE_EF_RFCAP +2, NR_EF_RFCAP }, | |
2070 { "MSSUP" , START_MSSUP, SIZE_EF_MSSUP +2, NR_EF_MSSUP }, | |
2071 { "CGMI" , START_CGMI, SIZE_EF_CGMI +2, NR_EF_CGMI }, | |
2072 { "INF0" , START_INF0, SIZE_EF_INF0 +2, NR_EF_INF0 }, | |
2073 { "MBN" , START_MBN, SIZE_EF_MBN +2, NR_EF_MBN }, | |
2074 { "VMN" , START_VMN, SIZE_EF_VMN +2, NR_EF_VMN }, | |
2075 { "CLNG" , START_CLNG, SIZE_EF_CLNG +2, NR_EF_CLNG }, | |
2076 | |
2077 { "SMSPRFL" , START_SMSPRFL, SIZE_EF_SMSPRFL +2, NR_EF_SMSPRFL }, | |
2078 { "PLMN" , START_PLMN, SIZE_EF_PLMN +2, NR_EF_PLMN }, | |
2079 { "BCCHINF" , START_BCCHINFO, SIZE_EF_BCCHINFO+2, NR_EF_BCCHINFO }, | |
2080 { "MSSET" , START_MSSET, SIZE_EF_MSSET +2, NR_EF_MSSET }, | |
2081 { "SIMLCK" , START_SIMLCK, SIZE_EF_SIMLCK +2, NR_EF_SIMLCK }, // VO | |
2082 { "ALS" , START_ALS, SIZE_EF_ALS +2, NR_EF_ALS }, | |
2083 { "LOCGPRS" , START_LOCGPRS, SIZE_EF_LOCGPRS +2, NR_EF_LOCGPRS }, | |
2084 { "KCGPRS" , START_KCGPRS, SIZE_EF_KCGPRS +2, NR_EF_KCGPRS }, | |
2085 { "IMSIGPRS", START_IMSIGPRS, SIZE_EF_IMSIGPRS+2, NR_EF_IMSIGPRS }, | |
2086 { NULL , 0, 0, 0 } | |
2087 }; | |
2088 | |
2089 /* | |
2090 * Description table with SMS memory | |
2091 */ | |
2092 static const T_PCM_DESCRIPTION pcm_table_sms[] = | |
2093 { | |
2094 { "MSCAP" , START_MSCAP, SIZE_EF_MSCAP +2, NR_EF_MSCAP }, | |
2095 { "IMEI" , START_IMEI, SIZE_EF_IMEI +2, NR_EF_IMEI }, | |
2096 { "RFCAP" , START_RFCAP, SIZE_EF_RFCAP +2, NR_EF_RFCAP }, | |
2097 { "MSSUP" , START_MSSUP, SIZE_EF_MSSUP +2, NR_EF_MSSUP }, | |
2098 { "CGMI" , START_CGMI, SIZE_EF_CGMI +2, NR_EF_CGMI }, | |
2099 { "INF0" , START_INF0, SIZE_EF_INF0 +2, NR_EF_INF0 }, | |
2100 { "MBN" , START_MBN, SIZE_EF_MBN +2, NR_EF_MBN }, | |
2101 { "VMN" , START_VMN, SIZE_EF_VMN +2, NR_EF_VMN }, | |
2102 { "CLNG" , START_CLNG, SIZE_EF_CLNG +2, NR_EF_CLNG }, | |
2103 | |
2104 { "SMSPRFL" , START_SMSPRFL, SIZE_EF_SMSPRFL +2, NR_EF_SMSPRFL }, | |
2105 { "PLMN" , START_PLMN, SIZE_EF_PLMN +2, NR_EF_PLMN }, | |
2106 { "BCCHINF" , START_BCCHINFO, SIZE_EF_BCCHINFO+2, NR_EF_BCCHINFO }, | |
2107 { "MSSET" , START_MSSET, SIZE_EF_MSSET +2, NR_EF_MSSET }, | |
2108 { "SIMLCK" , START_SIMLCK, SIZE_EF_SIMLCK +2, NR_EF_SIMLCK }, // VO | |
2109 { "ALS" , START_ALS, SIZE_EF_ALS +2, NR_EF_ALS }, | |
2110 { "LOCGPRS" , START_LOCGPRS, SIZE_EF_LOCGPRS +2, NR_EF_LOCGPRS }, | |
2111 { "KCGPRS" , START_KCGPRS, SIZE_EF_KCGPRS +2, NR_EF_KCGPRS }, | |
2112 { "IMSIGPRS", START_IMSIGPRS, SIZE_EF_IMSIGPRS+2, NR_EF_IMSIGPRS }, | |
2113 { EF_SMS_ID , START_SMS, SIZE_EF_SMS +2, NR_EF_SMS }, | |
2114 { NULL , 0, 0, 0 } | |
2115 }; | |
2116 | |
2117 static const T_PCM_DESCRIPTION *pcm_table; | |
2118 | |
2119 /* | |
2120 +--------------------------------------------------------------------+ | |
2121 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2122 | STATE : code ROUTINE : pcm_Init | | |
2123 +--------------------------------------------------------------------+ | |
2124 | |
2125 PURPOSE : Open the permanent configuration memory | |
2126 | |
2127 */ | |
2128 | |
2129 GLOBAL UBYTE pcm_Init (void) | |
2130 { | |
2131 if (!pcm_read OR std NEQ act_std) | |
2132 { | |
2133 switch (std) | |
2134 { | |
2135 case 1: /* GSM 900 */ | |
2136 TRACE_EVENT ("std=1: GSM 900"); | |
2137 memcpy (pcm_mem, pcm_content_gsm_900, sizeof (pcm_content_gsm_900)); | |
2138 pcm_table = pcm_table_def; | |
2139 break; | |
2140 case 3: /* PCS 1900 */ | |
2141 TRACE_EVENT ("std=3: PCS 1900"); | |
2142 memcpy (pcm_mem, pcm_content_pcs_1900, sizeof (pcm_content_pcs_1900)); | |
2143 pcm_table = pcm_table_sms; | |
2144 break; | |
2145 case 4: /* DCS 1800 */ | |
2146 TRACE_EVENT ("std=4: DCS 1800"); | |
2147 memcpy (pcm_mem, pcm_content_dcs_1800, sizeof (pcm_content_dcs_1800)); | |
2148 pcm_table = pcm_table_sms; | |
2149 break; | |
2150 case 5: /* Dualband */ | |
2151 TRACE_EVENT ("std=5: DUALBAND"); | |
2152 memcpy (pcm_mem, pcm_content_dualband, sizeof (pcm_content_dualband)); | |
2153 pcm_table = pcm_table_sms; | |
2154 break; | |
2155 case 6: /* Dualband Extended*/ | |
2156 TRACE_EVENT ("std=6: DUALBAND EXTENDED"); | |
2157 memcpy (pcm_mem, pcm_content_dualband_ext, sizeof (pcm_content_dualband_ext)); | |
2158 pcm_table = pcm_table_def; | |
2159 break; | |
2160 case 7: /* GSM 850 */ | |
2161 TRACE_EVENT ("std=7: GSM 850 (same as GSM 900)"); | |
2162 memcpy (pcm_mem, pcm_content_gsm_850, sizeof (pcm_content_gsm_850)); | |
2163 pcm_table = pcm_table_def; | |
2164 break; | |
2165 case 8: /* DUALBAND US (GSM 850 + PCS 1900) */ | |
2166 TRACE_EVENT ("std=8: DUALBAND US (GSM 850 + PCS 1900)"); | |
2167 memcpy (pcm_mem, pcm_content_dual_us, sizeof (pcm_content_dual_us)); | |
2168 pcm_table = pcm_table_def; | |
2169 break; | |
2170 case 30: /* AMR*/ | |
2171 TRACE_EVENT ("std=30: AMR"); | |
2172 memcpy (pcm_mem, pcm_content_amr, sizeof (pcm_content_amr)); | |
2173 pcm_table = pcm_table_def; | |
2174 break; | |
2175 case 33: /* QUADBAND (GSM 850, GSM 900, E-GSM, DCS 1800, PCS 1900) */ | |
2176 TRACE_EVENT ("std=33: QUADBAND"); | |
2177 memcpy (pcm_mem, pcm_content_quadband, sizeof (pcm_content_quadband)); | |
2178 pcm_table = pcm_table_def; | |
2179 break; | |
2180 default: | |
2181 TRACE_EVENT_P1 ("std=%d: unknown configuration", std); | |
2182 TRACE_ERROR ("NO valid PCM configuration!"); | |
2183 break; | |
2184 } | |
2185 pcm_read = TRUE; | |
2186 act_std = std; | |
2187 return DRV_OK; | |
2188 } | |
2189 return DRV_INITIALIZED; | |
2190 } | |
2191 | |
2192 /* | |
2193 +--------------------------------------------------------------------+ | |
2194 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2195 | STATE : code ROUTINE : pcm_Exit | | |
2196 +--------------------------------------------------------------------+ | |
2197 | |
2198 PURPOSE : Closes the permanent configuration memory | |
2199 | |
2200 */ | |
2201 | |
2202 GLOBAL void pcm_Exit (void) | |
2203 { | |
2204 pcm_Flush (); | |
2205 pcm_read = FALSE; | |
2206 } | |
2207 | |
2208 /* | |
2209 +--------------------------------------------------------------------+ | |
2210 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2211 | STATE : code ROUTINE : pcm_ReadFile | | |
2212 +--------------------------------------------------------------------+ | |
2213 | |
2214 PURPOSE : Read a transparent elementary field | |
2215 | |
2216 */ | |
2217 | |
2218 GLOBAL UBYTE pcm_ReadFile (UBYTE * in_FileName, | |
2219 USHORT in_BufferSize, | |
2220 UBYTE * out_BufferPtr, | |
2221 UBYTE * out_VersionPtr) | |
2222 { | |
2223 UBYTE i; | |
2224 | |
2225 pcm_Init (); | |
2226 | |
2227 i = 0; | |
2228 while (pcm_table[i].identifier NEQ NULL) | |
2229 { | |
2230 /* | |
2231 * Check all available entries | |
2232 */ | |
2233 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
2234 { | |
2235 /* | |
2236 * entry is available, check size | |
2237 * buffer size + version + checksum must be equal entry length | |
2238 */ | |
2239 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
2240 return PCM_INVALID_SIZE; | |
2241 /* | |
2242 * Checksum is not checked | |
2243 * copy buffer and version | |
2244 */ | |
2245 memcpy (out_BufferPtr, &pcm_mem [pcm_table[i].start+2], | |
2246 in_BufferSize); | |
2247 *out_VersionPtr = pcm_mem[pcm_table[i].start+1]; | |
2248 return DRV_OK; | |
2249 } | |
2250 i++; | |
2251 } | |
2252 return PCM_INVALID_FILE; | |
2253 } | |
2254 | |
2255 /* | |
2256 +--------------------------------------------------------------------+ | |
2257 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2258 | STATE : code ROUTINE : pcm_GetFileInfo | | |
2259 +--------------------------------------------------------------------+ | |
2260 | |
2261 PURPOSE : Get information about a dedicated file. | |
2262 | |
2263 */ | |
2264 | |
2265 GLOBAL UBYTE pcm_GetFileInfo (UBYTE * in_FileName, | |
2266 pcm_FileInfo_Type * out_FileInfoPtr) | |
2267 { | |
2268 UBYTE i; | |
2269 | |
2270 pcm_Init (); | |
2271 | |
2272 i = 0; | |
2273 while (pcm_table[i].identifier NEQ NULL) | |
2274 { | |
2275 /* | |
2276 * Check all available entries | |
2277 */ | |
2278 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
2279 { | |
2280 /* | |
2281 * entry is available, | |
2282 * fill file info | |
2283 */ | |
2284 out_FileInfoPtr->FileLocation = &pcm_mem [pcm_table[i].start+2]; | |
2285 out_FileInfoPtr->FileSize = pcm_table[i].length-2; | |
2286 out_FileInfoPtr->Version = pcm_mem [pcm_table[i].start+1]; | |
2287 return DRV_OK; | |
2288 } | |
2289 i++; | |
2290 } | |
2291 return PCM_INVALID_FILE; | |
2292 } | |
2293 | |
2294 /* | |
2295 +--------------------------------------------------------------------+ | |
2296 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2297 | STATE : code ROUTINE : pcm_ReadRecord | | |
2298 +--------------------------------------------------------------------+ | |
2299 | |
2300 PURPOSE : Read a linear fixed elementary field | |
2301 | |
2302 */ | |
2303 | |
2304 GLOBAL UBYTE pcm_ReadRecord (UBYTE * in_FileName, | |
2305 USHORT in_Record, | |
2306 USHORT in_BufferSize, | |
2307 UBYTE * out_BufferPtr, | |
2308 UBYTE * out_VersionPtr, | |
2309 USHORT * out_MaxRecordsPtr) | |
2310 { | |
2311 UBYTE i; | |
2312 | |
2313 pcm_Init (); | |
2314 | |
2315 i = 0; | |
2316 while (pcm_table[i].identifier NEQ NULL) | |
2317 { | |
2318 /* | |
2319 * check whether entry is available | |
2320 */ | |
2321 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
2322 { | |
2323 /* | |
2324 * entry is available, check size | |
2325 */ | |
2326 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
2327 return PCM_INVALID_SIZE; | |
2328 /* | |
2329 * check record number | |
2330 */ | |
2331 if (in_Record EQ 0 OR | |
2332 in_Record > pcm_table[i].records) | |
2333 return PCM_INVALID_RECORD; | |
2334 | |
2335 /* | |
2336 * copy record content | |
2337 * read version number and max records | |
2338 */ | |
2339 memcpy (out_BufferPtr, &pcm_mem [pcm_table[i].start+2+(in_Record-1) * in_BufferSize], | |
2340 in_BufferSize); | |
2341 * out_MaxRecordsPtr = pcm_table[i].records; | |
2342 * out_VersionPtr = pcm_mem [pcm_table[i].start+1]; | |
2343 return DRV_OK; | |
2344 } | |
2345 i++; | |
2346 } | |
2347 return PCM_INVALID_FILE; | |
2348 } | |
2349 | |
2350 /* | |
2351 +--------------------------------------------------------------------+ | |
2352 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2353 | STATE : code ROUTINE : pcm_WriteFile | | |
2354 +--------------------------------------------------------------------+ | |
2355 | |
2356 PURPOSE : Write a transparent elementary field | |
2357 | |
2358 */ | |
2359 | |
2360 GLOBAL UBYTE pcm_WriteFile (UBYTE * in_FileName, | |
2361 USHORT in_FileSize, | |
2362 UBYTE * in_BufferPtr) | |
2363 { | |
2364 UBYTE i; | |
2365 | |
2366 pcm_Init (); | |
2367 | |
2368 i = 0; | |
2369 while (pcm_table[i].identifier NEQ NULL) | |
2370 { | |
2371 /* | |
2372 * check whether entry is available | |
2373 */ | |
2374 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
2375 { | |
2376 /* | |
2377 * check file size | |
2378 */ | |
2379 if (in_FileSize+2 NEQ pcm_table[i].length) | |
2380 return PCM_INVALID_SIZE; | |
2381 /* | |
2382 * store new buffer content | |
2383 */ | |
2384 memcpy (&pcm_mem [pcm_table[i].start+2], in_BufferPtr, | |
2385 in_FileSize); | |
2386 return DRV_OK; | |
2387 } | |
2388 i++; | |
2389 } | |
2390 return PCM_INVALID_FILE; | |
2391 } | |
2392 | |
2393 /* | |
2394 +--------------------------------------------------------------------+ | |
2395 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2396 | STATE : code ROUTINE : pcm_WriteRecord | | |
2397 +--------------------------------------------------------------------+ | |
2398 | |
2399 PURPOSE : Write a linear fixed elementary field | |
2400 | |
2401 */ | |
2402 | |
2403 GLOBAL UBYTE pcm_WriteRecord (UBYTE * in_FileName, | |
2404 USHORT in_Record, | |
2405 USHORT in_BufferSize, | |
2406 UBYTE * in_BufferPtr) | |
2407 { | |
2408 UBYTE i; | |
2409 | |
2410 pcm_Init (); | |
2411 | |
2412 i = 0; | |
2413 while (pcm_table[i].identifier NEQ NULL) | |
2414 { | |
2415 /* | |
2416 * check all available entries | |
2417 */ | |
2418 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
2419 { | |
2420 /* | |
2421 * entry is available, | |
2422 * check entry size | |
2423 */ | |
2424 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
2425 return PCM_INVALID_SIZE; | |
2426 /* | |
2427 * check record number | |
2428 */ | |
2429 if (in_Record EQ 0 OR | |
2430 in_Record > pcm_table[i].records) | |
2431 return PCM_INVALID_RECORD; | |
2432 | |
2433 /* | |
2434 * store data in record | |
2435 */ | |
2436 memcpy (&pcm_mem [pcm_table[i].start+2+ | |
2437 (in_Record-1) * in_BufferSize], | |
2438 in_BufferPtr, | |
2439 in_BufferSize); | |
2440 return DRV_OK; | |
2441 } | |
2442 i++; | |
2443 } | |
2444 return PCM_INVALID_FILE; | |
2445 } | |
2446 | |
2447 /* | |
2448 +--------------------------------------------------------------------+ | |
2449 | PROJECT : GSM-PS (6103) MODULE : DRV_PCM | | |
2450 | STATE : code ROUTINE : pcm_Flush | | |
2451 +--------------------------------------------------------------------+ | |
2452 | |
2453 PURPOSE : Transfer changes to the PCM of the non volatile RAM. | |
2454 | |
2455 */ | |
2456 | |
2457 GLOBAL UBYTE pcm_Flush (void) | |
2458 { | |
2459 if (pcm_read) | |
2460 { | |
2461 TRACE_EVENT_P1 ("pcm_flush: std=%d", std); | |
2462 switch (std) | |
2463 { | |
2464 case 1: /* GSM 900 */ | |
2465 memcpy (pcm_content_gsm_900, pcm_mem, sizeof (pcm_content_gsm_900)); | |
2466 break; | |
2467 case 3: /* PCS 1900 */ | |
2468 memcpy (pcm_content_pcs_1900, pcm_mem, sizeof (pcm_content_pcs_1900)); | |
2469 break; | |
2470 case 4: /* DCS 1800 */ | |
2471 memcpy (pcm_content_dcs_1800, pcm_mem, sizeof (pcm_content_dcs_1800)); | |
2472 break; | |
2473 case 5: /* Dualband */ | |
2474 memcpy (pcm_content_dualband, pcm_mem, sizeof (pcm_content_dualband)); | |
2475 break; | |
2476 case 6: /* Dualband Extended */ | |
2477 memcpy (pcm_content_dualband_ext, pcm_mem, sizeof (pcm_content_dualband_ext)); | |
2478 break; | |
2479 case 7: /* GSM 850 */ | |
2480 memcpy (pcm_content_gsm_900, pcm_mem, sizeof (pcm_content_gsm_900)); | |
2481 break; | |
2482 case 8: /* DUALBAND US (GSM 850 + PCS 1900) */ | |
2483 memcpy (pcm_content_dual_us, pcm_mem, sizeof (pcm_content_dual_us)); | |
2484 break; | |
2485 case 30: /* AMR*/ | |
2486 memcpy (pcm_content_amr, pcm_mem, sizeof (pcm_content_amr)); | |
2487 break; | |
2488 case 33: /* QUADBAND (GSM 850, GSM 900, E-GSM, DCS 1800, PCS 1900) */ | |
2489 memcpy (pcm_content_quadband, pcm_mem, sizeof (pcm_content_quadband)); | |
2490 break; | |
2491 default: | |
2492 TRACE_EVENT_P1 ("std=%d: unknown configuration", std); | |
2493 TRACE_ERROR ("NO valid PCM configuration!"); | |
2494 break; | |
2495 } | |
2496 } | |
2497 return DRV_OK; | |
2498 } | |
2499 | |
2500 #else /* ifdef win32*/ | |
2501 | |
2502 | |
2503 /*==== INCLUDES ===================================================*/ | |
2504 | |
2505 #include <string.h> | |
2506 #include "stddefs.h" | |
2507 #include "gdi.h" | |
2508 #include "pcm.h" | |
2509 #include "pcm_amd.h" | |
2510 | |
2511 | |
2512 | |
2513 /*==== VARIABLES ==================================================*/ | |
2514 | |
2515 /* | |
2516 * Flag whether the 'flash content' is read | |
2517 */ | |
2518 static UBYTE pcm_read; | |
2519 | |
2520 UBYTE std; | |
2521 // set treshold for initial power measurements (= -106 dBm) | |
2522 USHORT min_rxlev = 20; | |
2523 | |
2524 typedef struct | |
2525 { | |
2526 char * identifier; | |
2527 USHORT start; | |
2528 USHORT length; | |
2529 USHORT records; | |
2530 } T_PCM_DESCRIPTION; | |
2531 | |
2532 #define LEN_MSCAP (NR_EF_MSCAP * SIZE_EF_MSCAP) + 2 | |
2533 #define LEN_IMEI (NR_EF_IMEI * SIZE_EF_IMEI) + 2 | |
2534 #define LEN_IMSI (NR_EF_IMSI * SIZE_EF_IMSI) + 2 | |
2535 #define LEN_SMS (NR_EF_SMS * SIZE_EF_SMS) + 2 | |
2536 #define LEN_CLASS2 (NR_EF_CLASS2 * SIZE_EF_CLASS2) + 2 | |
2537 #define LEN_CLASS3 (NR_EF_CLASS3 * SIZE_EF_CLASS3) + 2 | |
2538 #define LEN_MSSUP (NR_EF_MSSUP * SIZE_EF_MSSUP) + 2 | |
2539 #define LEN_MSSET (NR_EF_MSSET * SIZE_EF_MSSET) + 2 | |
2540 // Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | |
2541 #define LEN_HZCACHE (NR_EF_HZCACHE * SIZE_EF_HZCACHE) + 2 | |
2542 #define LEN_LDN (NR_EF_LDN * SIZE_EF_LDN) + 2 | |
2543 #define LEN_LRN (NR_EF_LRN * SIZE_EF_LRN) + 2 | |
2544 #define LEN_LMN (NR_EF_LMN * SIZE_EF_LMN) + 2 | |
2545 #define LEN_UPN (NR_EF_UPN * SIZE_EF_UPN) + 2 | |
2546 #define LEN_MBN (NR_EF_MBN * SIZE_EF_MBN) + 2 | |
2547 #define LEN_VMN (NR_EF_VMN * SIZE_EF_VMN) + 2 | |
2548 #define LEN_CLNG (NR_EF_CLNG * SIZE_EF_CLNG) + 2 | |
2549 #define LEN_CTIM (NR_EF_CTIM * SIZE_EF_CTIM) + 2 | |
2550 #define LEN_CCNT (NR_EF_CCNT * SIZE_EF_CCNT) + 2 | |
2551 #define LEN_ECC (NR_EF_ECC * SIZE_EF_ECC) + 2 | |
2552 #define LEN_ORG (NR_EF_ORG * SIZE_EF_ORG) + 2 | |
2553 #define LEN_CCP (NR_EF_CCP * SIZE_EF_CCP) + 2 | |
2554 #define LEN_EXT1 (NR_EF_EXT1 * SIZE_EF_EXT1) + 2 | |
2555 #define LEN_SIMLCK (NR_EF_SIMLCK * SIZE_EF_SIMLCK) + 2 | |
2556 #define LEN_MAIN (NR_EF_MAIN * SIZE_EF_MAIN) + 2 | |
2557 #define LEN_SFK (NR_EF_SFK * SIZE_EF_SFK) + 2 | |
2558 #define LEN_FAULT (NR_EF_FAULT * SIZE_EF_FAULT) + 2 | |
2559 #define LEN_DEBUG (NR_EF_DEBUG * SIZE_EF_DEBUG) + 2 | |
2560 #define LEN_POWER (NR_EF_POWER * SIZE_EF_POWER) + 2 | |
2561 #define LEN_KEYB (NR_EF_KEYB * SIZE_EF_KEYB) + 2 | |
2562 #define LEN_RADIO (NR_EF_RADIO * SIZE_EF_RADIO) + 2 | |
2563 #define LEN_CGMI (NR_EF_CGMI * SIZE_EF_CGMI) + 2 | |
2564 #define LEN_CGMM (NR_EF_CGMM * SIZE_EF_CGMM) + 2 | |
2565 #define LEN_CGMR (NR_EF_CGMR * SIZE_EF_CGMR) + 2 | |
2566 #define LEN_CGSN (NR_EF_CGSN * SIZE_EF_CGSN) + 2 | |
2567 #define LEN_SMSPRFL (NR_EF_SMSPRFL * SIZE_EF_SMSPRFL) + 2 | |
2568 #define LEN_PLMN (NR_EF_PLMN * SIZE_EF_PLMN) + 2 | |
2569 #define LEN_ALS (NR_EF_ALS * SIZE_EF_ALS) + 2 | |
2570 #define LEN_BCCHINFO (NR_EF_BCCHINFO * SIZE_EF_BCCHINFO) + 2 | |
2571 #define LEN_LOCGPRS (NR_EF_LOCGPRS * SIZE_EF_LOCGPRS) + 2 | |
2572 #define LEN_KCGPRS (NR_EF_KCGPRS * SIZE_EF_KCGPRS) + 2 | |
2573 #define LEN_IMSIGPRS (NR_EF_IMSIGPRS * SIZE_EF_IMSIGPRS) + 2 | |
2574 | |
2575 #define START_MSCAP 0 | |
2576 #define START_IMEI START_MSCAP + LEN_MSCAP | |
2577 #define START_IMSI START_IMEI + LEN_IMEI | |
2578 #define START_SMS START_IMSI + LEN_IMSI | |
2579 #define START_CLASS2 START_SMS + LEN_SMS | |
2580 #define START_CLASS3 START_CLASS2 + LEN_CLASS2 | |
2581 #define START_MSSUP START_CLASS3 + LEN_CLASS3 | |
2582 #define START_MSSET START_MSSUP + LEN_MSSUP | |
2583 // Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | |
2584 #define START_HZCACHE START_MSSET + LEN_MSSET | |
2585 #define START_LDN START_HZCACHE + LEN_HZCACHE | |
2586 #define START_LRN START_LDN + LEN_LDN | |
2587 #define START_LMN START_LRN + LEN_LRN | |
2588 #define START_UPN START_LMN + LEN_LMN | |
2589 #define START_MBN START_UPN + LEN_UPN | |
2590 #define START_VMN START_MBN + LEN_MBN | |
2591 #define START_CLNG START_VMN + LEN_VMN | |
2592 #define START_CTIM START_CLNG + LEN_CLNG | |
2593 #define START_CCNT START_CTIM + LEN_CTIM | |
2594 #define START_ECC START_CCNT + LEN_CCNT | |
2595 #define START_ORG START_ECC + LEN_ECC | |
2596 #define START_CCP START_ORG + LEN_ORG | |
2597 #define START_EXT1 START_CCP + LEN_CCP | |
2598 #define START_SIMLCK START_EXT1 + LEN_EXT1 | |
2599 #define START_MAIN START_SIMLCK + LEN_SIMLCK | |
2600 #define START_SFK START_MAIN + LEN_MAIN | |
2601 #define START_FAULT START_SFK + LEN_SFK | |
2602 #define START_DEBUG START_FAULT + LEN_FAULT | |
2603 #define START_POWER START_DEBUG + LEN_DEBUG | |
2604 #define START_KEYB START_POWER + LEN_POWER | |
2605 #define START_RADIO START_KEYB + LEN_KEYB | |
2606 #define START_CGMI START_RADIO + LEN_RADIO | |
2607 #define START_CGMM START_CGMI + LEN_CGMI | |
2608 #define START_CGMR START_CGMM + LEN_CGMM | |
2609 #define START_CGSN START_CGMR + LEN_CGMR | |
2610 #define START_SMSPRFL START_CGSN + LEN_CGSN | |
2611 #define START_PLMN START_SMSPRFL + LEN_SMSPRFL | |
2612 #define START_ALS START_PLMN + LEN_PLMN | |
2613 #define START_BCCHINFO START_ALS + LEN_ALS | |
2614 #define START_LOCGPRS START_BCCHINFO + LEN_BCCHINFO | |
2615 #define START_KCGPRS START_LOCGPRS + LEN_LOCGPRS | |
2616 #define START_IMSIGPRS START_KCGPRS + LEN_KCGPRS | |
2617 | |
2618 | |
2619 #define PCM_SIZE (START_IMSIGPRS + LEN_IMSIGPRS) | |
2620 | |
2621 /* | |
2622 * RAM for the copy of PCM data | |
2623 */ | |
2624 UBYTE pcm_mem [PCM_SIZE]; | |
2625 | |
2626 static const T_PCM_DESCRIPTION pcm_table[] = | |
2627 { | |
2628 { "MSCAP" , START_MSCAP, SIZE_EF_MSCAP +2, NR_EF_MSCAP }, | |
2629 { "IMEI" , START_IMEI, SIZE_EF_IMEI +2, NR_EF_IMEI }, | |
2630 { "IMSI" , START_IMSI, SIZE_EF_IMSI +2, NR_EF_IMSI }, | |
2631 { "SMS " , START_SMS, SIZE_EF_SMS +2, NR_EF_SMS }, | |
2632 { "CLASS2" , START_CLASS2, SIZE_EF_CLASS2 +2, NR_EF_CLASS2 }, | |
2633 { "CLASS3" , START_CLASS3, SIZE_EF_CLASS3 +2, NR_EF_CLASS3 }, | |
2634 { "MSSUP" , START_MSSUP, SIZE_EF_MSSUP +2, NR_EF_MSSUP }, | |
2635 { "MSSET" , START_MSSET, SIZE_EF_MSSET +2, NR_EF_MSSET }, | |
2636 { "HZCACHE" , START_HZCACHE, SIZE_EF_HZCACHE +2, NR_EF_HZCACHE }, //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | |
2637 { "LDN" , START_LDN, SIZE_EF_LDN +2, NR_EF_LDN }, | |
2638 { "LRN" , START_LRN, SIZE_EF_LRN +2, NR_EF_LRN }, | |
2639 { "LMN" , START_LMN, SIZE_EF_LMN +2, NR_EF_LMN }, | |
2640 { "UPN" , START_UPN, SIZE_EF_UPN +2, NR_EF_UPN }, | |
2641 { "MBN" , START_MBN, SIZE_EF_MBN +2, NR_EF_MBN }, | |
2642 { "VMN" , START_VMN, SIZE_EF_VMN +2, NR_EF_VMN }, | |
2643 { "CLNG" , START_CLNG, SIZE_EF_CLNG +2, NR_EF_CLNG }, | |
2644 { "CTIM" , START_CTIM, SIZE_EF_CTIM +2, NR_EF_CTIM }, | |
2645 { "CCNT" , START_CCNT, SIZE_EF_CCNT +2, NR_EF_CCNT }, | |
2646 { "ECC" , START_ECC, SIZE_EF_ECC +2, NR_EF_ECC }, | |
2647 { "ORG" , START_ORG, SIZE_EF_ORG +2, NR_EF_ORG }, | |
2648 { "CCP" , START_CCP, SIZE_EF_CCP +2, NR_EF_CCP }, | |
2649 { "EXT1" , START_EXT1, SIZE_EF_EXT1 +2, NR_EF_EXT1 }, | |
2650 { "SIMLCK" , START_SIMLCK, SIZE_EF_SIMLCK +2, NR_EF_SIMLCK }, | |
2651 { "MAIN" , START_MAIN, SIZE_EF_MAIN +2, NR_EF_MAIN }, | |
2652 { "SFK" , START_SFK, SIZE_EF_SFK +2, NR_EF_SFK }, | |
2653 { "FAULT" , START_FAULT, SIZE_EF_FAULT +2, NR_EF_FAULT }, | |
2654 { "DEBUG" , START_DEBUG, SIZE_EF_DEBUG +2, NR_EF_DEBUG }, | |
2655 { "POWER" , START_POWER, SIZE_EF_POWER +2, NR_EF_POWER }, | |
2656 { "KEYB" , START_KEYB, SIZE_EF_KEYB +2, NR_EF_KEYB }, | |
2657 { "RADIO" , START_RADIO, SIZE_EF_RADIO +2, NR_EF_RADIO }, | |
2658 { "CGMI" , START_CGMI, SIZE_EF_CGMI +2, NR_EF_CGMI }, | |
2659 { "CGMM" , START_CGMM, SIZE_EF_CGMM +2, NR_EF_CGMM }, | |
2660 { "CGMR" , START_CGMR, SIZE_EF_CGMR +2, NR_EF_CGMR }, | |
2661 { "CGSN" , START_CGSN, SIZE_EF_CGSN +2, NR_EF_CGSN }, | |
2662 { "SMSPRFL" , START_SMSPRFL, SIZE_EF_SMSPRFL +2, NR_EF_SMSPRFL }, | |
2663 { "PLMN" , START_PLMN, SIZE_EF_PLMN +2, NR_EF_PLMN }, | |
2664 { "ALS" , START_ALS, SIZE_EF_ALS +2, NR_EF_ALS }, | |
2665 { "BCCHINF" , START_BCCHINFO, SIZE_EF_BCCHINFO +2, NR_EF_BCCHINFO }, | |
2666 { "LOCGPRS" , START_LOCGPRS, SIZE_EF_LOCGPRS +2, NR_EF_LOCGPRS }, | |
2667 { "KCGPRS" , START_KCGPRS, SIZE_EF_KCGPRS +2, NR_EF_KCGPRS }, | |
2668 { "IMSIGPRS" , START_IMSIGPRS, SIZE_EF_IMSIGPRS +2, NR_EF_IMSIGPRS }, | |
2669 { NULL , 0, 0 , 0 } | |
2670 }; | |
2671 | |
2672 static const UBYTE pcm_default_values[] = | |
2673 { | |
2674 #if STD==1 // GSM 900 variant | |
2675 #if defined (FAX_AND_DATA) | |
2676 0x81, 0xC7, 0x00, | |
2677 #else | |
2678 0x01, 0x00, 0x00, | |
2679 #endif | |
2680 #endif | |
2681 | |
2682 #if STD==3 || STD==4 // DCS 1800, PCS 1900 | |
2683 #if defined (FAX_AND_DATA) | |
2684 0x81, 0xC7, 0x00, | |
2685 #else | |
2686 #if defined (TM_SPECIAL) | |
2687 0x01, 0x00, 0x00, | |
2688 #else | |
2689 0x07, 0x00, 0x00, | |
2690 #endif | |
2691 #endif | |
2692 #endif | |
2693 | |
2694 #if STD==5 // Dualband GSM 900 / DCS 1800 | |
2695 #if defined (FAX_AND_DATA) | |
2696 0x81, 0xC7, 0x00, | |
2697 #else | |
2698 0x07, 0x00, 0x00, | |
2699 #endif | |
2700 #endif | |
2701 | |
2702 #if STD==6 // Dualband GSM 900 / E-GSM / DCS 1800 | |
2703 #if defined (FAX_AND_DATA) | |
2704 0x81, 0xC7, 0x00, | |
2705 #else | |
2706 0x07, 0x00, 0x00, | |
2707 #endif | |
2708 #endif | |
2709 | |
2710 0x00, 0x00, 0x00, | |
2711 | |
2712 0x44, 0x06, 0x91, 0x91, 0x57, 0x70, 0x95, 0x00, // EFimei | |
2713 | |
2714 0x0f, // EFimsi | |
2715 0x44, 0x06, 0x91, 0x91, 0x57, 0x70, 0x95, 0xf0, | |
2716 | |
2717 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // EFsms | |
2718 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, | |
2719 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2720 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2721 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2722 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2723 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2724 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2725 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2726 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2727 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2728 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2729 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2730 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2731 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2732 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2733 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2734 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2735 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2736 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2737 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2738 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, | |
2739 | |
2740 | |
2741 #if STD==1 | |
2742 0x33, 0x18, 0x04, // EFclass2 | |
2743 0x00, 0x00, 0x10, // EFclass3 | |
2744 #endif | |
2745 #if STD==3 || STD==4 | |
2746 0x30, 0x18, 0x04, // EFclass2 | |
2747 0x00, 0x00, 0x10, // EFclass3 | |
2748 #endif | |
2749 #if STD==5 | |
2750 0x30, 0x18, 0x84, // EFclass2 | |
2751 0x50, 0x14, 0x10, // EFclass3 | |
2752 #endif | |
2753 #if STD==6 | |
2754 0x30, 0x19, 0x84, // EFclass2 | |
2755 0x60, 0x14, 0x10, // EFclass3 | |
2756 #endif | |
2757 | |
2758 0xB7, 0x46, 0x47, 0x1F, 0x00, // EFmssup | |
2759 | |
2760 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, // MSSET | |
2761 0x38, 0x39, | |
2762 // Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | |
2763 | |
2764 0xFF, 0xFF, 0xFF, // homezone record 1 | |
2765 0xFF, 0xFF, 0xFF, // homezone record 2 | |
2766 0xFF, 0xFF, 0xFF, // homezone record 3 | |
2767 0xFF, 0xFF, 0xFF, // homezone record 4 | |
2768 0xFF, 0xFF, 0xFF, // homezone record 5 | |
2769 | |
2770 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, //EFldn | |
2771 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, | |
2772 0x4f, 0x4f, 0x4f, 0x4f, 0x00, 0x00, | |
2773 | |
2774 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, //EFlrn | |
2775 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, | |
2776 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x00, 0x00, | |
2777 | |
2778 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, //EFlmn | |
2779 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, | |
2780 0x4f, 0x4f, 0x4f, 0x4f, 0x00, | |
2781 | |
2782 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, //EFupn | |
2783 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, | |
2784 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, | |
2785 | |
2786 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFmbn (record 1) | |
2787 0xff, 0xff, | |
2788 0x00, 0xff, | |
2789 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2790 0xff, 0xff, | |
2791 | |
2792 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFmbn (record 2) | |
2793 0xff, 0xff, | |
2794 0x00, 0xff, | |
2795 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2796 0xff, 0xff, | |
2797 | |
2798 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFmbn (record 3) | |
2799 0xff, 0xff, | |
2800 0x00, 0xff, | |
2801 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2802 0xff, 0xff, | |
2803 | |
2804 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFmbn (record 4) | |
2805 0xff, 0xff, | |
2806 0x00, 0xff, | |
2807 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2808 0xff, 0xff, | |
2809 | |
2810 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFvmn (default is no number) | |
2811 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2812 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2813 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2814 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2815 0xff, 0x91, /* default is international: 145: 0x91 */ | |
2816 | |
2817 //EFclng | |
2818 /* CLNG */ 'a', 'u', /* checksum & version */ | |
2819 | |
2820 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, //EFctim | |
2821 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, | |
2822 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, | |
2823 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, | |
2824 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, | |
2825 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, | |
2826 | |
2827 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, //EFccnt | |
2828 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, | |
2829 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, | |
2830 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, | |
2831 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, | |
2832 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, | |
2833 0x8f, 0x8f, 0x8f, 0x8f, | |
2834 | |
2835 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, //EFecc | |
2836 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, | |
2837 | |
2838 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //EForg | |
2839 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, | |
2840 0xaf, 0xaf, 0xaf, 0xaf, 0xaf, 0x00, 0x00, | |
2841 | |
2842 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, //EFccp | |
2843 | |
2844 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, //EFext1 | |
2845 0xc8, 0xc9, 0xca, 0xcb, 0xcc, | |
2846 | |
2847 0x00, 0x00, 0xd2, 0xd3, //EFsimlck | |
2848 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, | |
2849 0x21, 0x43, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2850 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2851 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2852 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2853 0x0f, | |
2854 0x22, 0x24, 0x24, 0x24, 0x44, 0x15, 0x12, 0x45, | |
2855 0x22, 0x22, 0x22, 0x22, 0x44, 0x15, 0x66, | |
2856 0xff, 0xff, | |
2857 | |
2858 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, //EFmnt | |
2859 | |
2860 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, //EFsfk | |
2861 | |
2862 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, //EFflt | |
2863 | |
2864 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, //EFdbg | |
2865 | |
2866 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFbat | |
2867 | |
2868 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFkbd | |
2869 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2870 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2871 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2872 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2873 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2874 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2875 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2876 | |
2877 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //EFrdio | |
2878 | |
2879 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', /* EFcgmi */ | |
2880 't', 'u', 'r', 'e', 'r', '>', 0xff, 0xff, | |
2881 0xff, 0xff, 0xff, 0xff, | |
2882 | |
2883 '<', 'm', 'o', 'd', 'e', 'l', '>', 0xff, /* EFcgmm */ | |
2884 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2885 0xff, 0xff, 0xff, 0xff, | |
2886 | |
2887 '<', 'r', 'e', 'v', 'i', 's', 'i', 'o', /* EFcgmr */ | |
2888 'n', '>', 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2889 0xff, 0xff, 0xff, 0xff, | |
2890 | |
2891 '<', 's', 'e', 'r', 'i', 'a', 'l', ' ', /* EFcgsn */ | |
2892 'n', 'u', 'm', 'b', 'e', 'r', '>', 0xff, | |
2893 0xff, 0xff, 0xff, 0xff, | |
2894 | |
2895 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* EFsmsprfl record 1 */ | |
2896 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2897 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2898 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2899 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2900 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2901 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2902 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2903 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2904 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2905 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2906 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2907 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2908 | |
2909 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* EFsmsprfl record 2 */ | |
2910 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2911 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2912 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2913 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2914 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2915 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2916 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2917 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2918 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2919 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2920 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2921 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
2922 | |
2923 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* EFplmn record 1 */ | |
2924 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2925 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2926 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2927 0x00, 0x00, | |
2928 | |
2929 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* EFplmn record 2 */ | |
2930 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2931 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2933 0x00, 0x00, | |
2934 | |
2935 0x00, 0x00, /* alternate line service */ | |
2936 | |
2937 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* EFbcch */ | |
2938 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2939 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2940 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2941 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2942 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2943 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
2944 | |
2945 0xFF, 0xFF, 0xFF, 0xFF, /* locGPRS: P-TMSI */ | |
2946 0xFF, 0xFF, 0xFF, /* P-TMSI Signature */ | |
2947 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, /* RAI */ | |
2948 0xFF, /* Update Status */ | |
2949 | |
2950 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* KcGPRS: Kc */ | |
2951 0x07, /* CKSN */ | |
2952 | |
2953 0xFF, /* IMSI-GPRS:IMSI length */ | |
2954 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF /* IMSI */ | |
2955 }; | |
2956 | |
2957 /******************************************************************************* | |
2958 * | |
2959 * compute_checksum | |
2960 * Purpose : Calculate the checksum | |
2961 * | |
2962 * Arguments: In : Start adresse of the record (checksum is the first | |
2963 * byte of the record) | |
2964 * Length of the record (bytes) | |
2965 * Out: none | |
2966 * | |
2967 * Returns : Checksum | |
2968 * | |
2969 * | |
2970 ******************************************************************************/ | |
2971 | |
2972 UBYTE compute_checksum (UBYTE *record_start, USHORT length) | |
2973 { | |
2974 UBYTE Sum; | |
2975 int i=1; /* exclude checksum */ | |
2976 | |
2977 Sum=0; | |
2978 if (length > 0) | |
2979 { | |
2980 while (i < length) | |
2981 { | |
2982 Sum += (UBYTE)*(record_start+i); | |
2983 i ++; | |
2984 } | |
2985 Sum = (UBYTE)(0xFF - Sum); | |
2986 return (Sum); | |
2987 } | |
2988 else | |
2989 return 0xFF; | |
2990 } | |
2991 | |
2992 | |
2993 | |
2994 /******************************************************************************* | |
2995 * | |
2996 * pcm_Init | |
2997 * Purpose : Open the permanent configuration memory | |
2998 * | |
2999 * Arguments: In : none | |
3000 * Out: none | |
3001 * | |
3002 * Returns : DRV_OK | |
3003 * DRV_INITIALIZED | |
3004 * | |
3005 ******************************************************************************/ | |
3006 | |
3007 UBYTE pcm_Init (void) | |
3008 { | |
3009 int i; | |
3010 | |
3011 if (pcm_read == FALSE) | |
3012 { | |
3013 pcm_read = TRUE; | |
3014 | |
3015 std = STD; /* target standard is defined by constant STD */ | |
3016 #if defined(_TARGET_) | |
3017 TRACE_EVENT_P1 ("pcm_init() std%d", std); | |
3018 #endif /* _TARGET_ */ | |
3019 | |
3020 /* | |
3021 * A-Sample: The flash memory may be at address 0 or at address 0x100000. | |
3022 */ | |
3023 | |
3024 /* unprotect flash */ | |
3025 pcm_unprotect_flash (); | |
3026 | |
3027 pcm_init_flash_device (); | |
3028 | |
3029 /* | |
3030 * read flash memory and transfert data to RAM | |
3031 */ | |
3032 pcm_read_flash(pcm_mem, PCM_SIZE); | |
3033 | |
3034 /* | |
3035 * verify checksums, if one is wrong write default values in RAM and | |
3036 * compute checksums again | |
3037 */ | |
3038 i=0; | |
3039 while ((pcm_table[i].identifier NEQ NULL) | |
3040 && (pcm_mem[pcm_table[i].start] EQ compute_checksum (&pcm_mem[pcm_table[i].start], | |
3041 (pcm_table[i].length - 2)*pcm_table[i].records + 2) )) | |
3042 { | |
3043 i++; | |
3044 } | |
3045 if (pcm_table[i].identifier NEQ NULL) /* at least one checksum is wrong */ | |
3046 { | |
3047 i = 0; | |
3048 while (pcm_table[i].identifier NEQ NULL) | |
3049 { | |
3050 memcpy ((&pcm_mem[pcm_table[i].start]+2), | |
3051 &pcm_default_values[pcm_table[i].start - 2*i], | |
3052 (pcm_table[i].length - 2)*pcm_table[i].records); | |
3053 | |
3054 pcm_mem[pcm_table[i].start + 1] = 1; /* version */ | |
3055 | |
3056 pcm_mem[pcm_table[i].start] = | |
3057 compute_checksum (&pcm_mem[pcm_table[i].start], | |
3058 ((pcm_table[i].length - 2)*pcm_table[i].records + 2)); | |
3059 | |
3060 i++; | |
3061 } | |
3062 } | |
3063 | |
3064 return (DRV_OK); | |
3065 } | |
3066 else | |
3067 return (DRV_INITIALIZED); | |
3068 | |
3069 } | |
3070 | |
3071 /******************************************************************************* | |
3072 * | |
3073 * pcm_Exit | |
3074 * Purpose : Closes the permanent configuration memory | |
3075 * | |
3076 * Arguments: In : none | |
3077 * Out: none | |
3078 * | |
3079 * Returns : none | |
3080 * | |
3081 ******************************************************************************/ | |
3082 void pcm_Exit (void) | |
3083 { | |
3084 pcm_read = FALSE; | |
3085 } | |
3086 | |
3087 | |
3088 | |
3089 /******************************************************************************* | |
3090 * | |
3091 * pcm_ReadFile | |
3092 * Purpose : Read a transparent elementary field | |
3093 * | |
3094 * Arguments: In : Filename (string) | |
3095 * Size of the file | |
3096 * | |
3097 * Out: Buffer for file content | |
3098 * Pointer to File version | |
3099 * | |
3100 * Returns : DRV_OK read ok | |
3101 * PCM_INVALID_SIZE invalid size of file | |
3102 * PCM_INVALID_CKSM invalid checksum | |
3103 * PCM_INVALID_FILE invalid name of file | |
3104 * PCM_SUCCESS read OK | |
3105 * | |
3106 ******************************************************************************/ | |
3107 | |
3108 UBYTE pcm_ReadFile (UBYTE * in_FileName, | |
3109 USHORT in_BufferSize, | |
3110 UBYTE * out_BufferPtr, | |
3111 UBYTE * out_VersionPtr) | |
3112 { | |
3113 UBYTE i; | |
3114 int return_value; | |
3115 | |
3116 i=0; | |
3117 while (pcm_table[i].identifier NEQ NULL) | |
3118 { | |
3119 /* | |
3120 * Check all available entries | |
3121 */ | |
3122 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
3123 { | |
3124 /* | |
3125 * entry is available, check size | |
3126 * buffer size + version + checksum must be equal entry length | |
3127 */ | |
3128 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
3129 return PCM_INVALID_SIZE; | |
3130 | |
3131 return_value = DRV_OK; | |
3132 if (compute_checksum(&pcm_mem[pcm_table[i].start],pcm_table[i].length) | |
3133 != pcm_mem[pcm_table[i].start]) | |
3134 { | |
3135 memcpy ((&pcm_mem[pcm_table[i].start]+2), | |
3136 &pcm_default_values[pcm_table[i].start - 2*i], | |
3137 (pcm_table[i].length -2)); | |
3138 pcm_mem[pcm_table[i].start + 1] = 1; //version | |
3139 pcm_mem[pcm_table[i].start] = | |
3140 compute_checksum(&pcm_mem[pcm_table[i].start] , | |
3141 pcm_table[i].length); | |
3142 return_value = PCM_INVALID_CKSM; | |
3143 } | |
3144 | |
3145 memcpy (out_BufferPtr, &pcm_mem [pcm_table[i].start+2],in_BufferSize); | |
3146 *out_VersionPtr = pcm_mem[pcm_table[i].start+1]; | |
3147 return return_value; | |
3148 } | |
3149 i++; | |
3150 } | |
3151 return PCM_INVALID_FILE; | |
3152 } | |
3153 | |
3154 /******************************************************************************* | |
3155 * | |
3156 * pcm_GetFileInfo | |
3157 * Purpose : Get information about a dedicated file. | |
3158 * | |
3159 * Arguments: In : Name of the file | |
3160 * Out: Structure of informations about the file | |
3161 * | |
3162 * Returns : PCM_INVALID_FILE invalid name of file | |
3163 * DRV_OK read OK | |
3164 * | |
3165 ******************************************************************************/ | |
3166 | |
3167 UBYTE pcm_GetFileInfo (UBYTE * in_FileName, | |
3168 pcm_FileInfo_Type * out_FileInfoPtr) | |
3169 { | |
3170 UBYTE i; | |
3171 | |
3172 i=0; | |
3173 while (pcm_table[i].identifier NEQ NULL) | |
3174 { | |
3175 /* | |
3176 * Check all available entries | |
3177 */ | |
3178 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
3179 { | |
3180 /* | |
3181 * entry is available, | |
3182 * fill file info | |
3183 */ | |
3184 out_FileInfoPtr->FileLocation = &pcm_mem [pcm_table[i].start+2]; | |
3185 out_FileInfoPtr->FileSize = pcm_table[i].length-2; | |
3186 out_FileInfoPtr->Version = pcm_mem [pcm_table[i].start+1]; | |
3187 return DRV_OK; | |
3188 } | |
3189 i++; | |
3190 } | |
3191 return PCM_INVALID_FILE; | |
3192 } | |
3193 | |
3194 /******************************************************************************* | |
3195 * | |
3196 * pcm_ReadRecord | |
3197 * Purpose : Read a linear fixed elementary field. | |
3198 * | |
3199 * Arguments: In : Name of the file | |
3200 * Record number | |
3201 * Size of the record | |
3202 * Out: Buffer for the record | |
3203 * Buffer for the file version | |
3204 * Number of records in the file | |
3205 * | |
3206 * Returns : PCM_INVALID_SIZE invalid size of file | |
3207 * PCM_INVALID_RECORD invalid record number | |
3208 * PCM_INVALID_CKSM invalid checksum | |
3209 * DRV_OK read OK | |
3210 * | |
3211 ******************************************************************************/ | |
3212 | |
3213 UBYTE pcm_ReadRecord (UBYTE * in_FileName, | |
3214 USHORT in_Record, | |
3215 USHORT in_BufferSize, | |
3216 UBYTE * out_BufferPtr, | |
3217 UBYTE * out_VersionPtr, | |
3218 USHORT * out_MaxRecordsPtr) | |
3219 { | |
3220 UBYTE i; | |
3221 int return_value; | |
3222 | |
3223 i=0; | |
3224 while (pcm_table[i].identifier NEQ NULL) | |
3225 { | |
3226 /* | |
3227 * check whether entry is available | |
3228 */ | |
3229 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
3230 { | |
3231 /* | |
3232 * entry is available, check size | |
3233 */ | |
3234 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
3235 return PCM_INVALID_SIZE; | |
3236 /* | |
3237 * check record number | |
3238 */ | |
3239 if (in_Record EQ 0 OR in_Record > pcm_table[i].records) | |
3240 return PCM_INVALID_RECORD; | |
3241 | |
3242 return_value = DRV_OK; | |
3243 if (compute_checksum(&pcm_mem[pcm_table[i].start] , | |
3244 in_BufferSize*pcm_table[i].records + 2) | |
3245 != pcm_mem[pcm_table[i].start]) | |
3246 { | |
3247 memcpy ((&pcm_mem[pcm_table[i].start]+2), | |
3248 &pcm_default_values[pcm_table[i].start - 2*i], | |
3249 (in_BufferSize*pcm_table[i].records)); | |
3250 | |
3251 pcm_mem[pcm_table[i].start + 1] = 1; //version | |
3252 pcm_mem[pcm_table[i].start] = | |
3253 compute_checksum(&pcm_mem[pcm_table[i].start] , | |
3254 in_BufferSize*pcm_table[i].records+2); | |
3255 | |
3256 return_value = PCM_INVALID_CKSM; | |
3257 } | |
3258 | |
3259 /* | |
3260 * copy record content | |
3261 * read version number and max records | |
3262 */ | |
3263 memcpy (out_BufferPtr, | |
3264 &pcm_mem [pcm_table[i].start+2+(in_Record-1) * in_BufferSize], | |
3265 in_BufferSize); | |
3266 * out_MaxRecordsPtr = pcm_table[i].records; | |
3267 * out_VersionPtr = pcm_mem [pcm_table[i].start+1]; | |
3268 return return_value; | |
3269 } | |
3270 i++; | |
3271 } | |
3272 return PCM_INVALID_FILE; | |
3273 | |
3274 } | |
3275 | |
3276 /******************************************************************************* | |
3277 * | |
3278 * pcm_WriteFile | |
3279 * Purpose : Write a transparent elementary field in RAM | |
3280 * | |
3281 * Arguments: In : Name of the file to write | |
3282 * Size of the file | |
3283 * Pointer to the file content | |
3284 * Out: none | |
3285 * | |
3286 * Returns : PCM_INVALID_SIZE invalid size of file | |
3287 * DRV_OK write ok | |
3288 * PCM_INVALID_FILE invalid name of file | |
3289 * | |
3290 ******************************************************************************/ | |
3291 | |
3292 UBYTE pcm_WriteFile (UBYTE * in_FileName, | |
3293 USHORT in_FileSize, | |
3294 UBYTE * in_BufferPtr) | |
3295 { | |
3296 UBYTE i; | |
3297 i=0; | |
3298 while (pcm_table[i].identifier NEQ NULL) | |
3299 { | |
3300 /* | |
3301 * check whether entry is available | |
3302 */ | |
3303 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
3304 { | |
3305 /* | |
3306 * check file size | |
3307 */ | |
3308 if (in_FileSize+2 NEQ pcm_table[i].length) | |
3309 return PCM_INVALID_SIZE; | |
3310 /* | |
3311 * store new buffer content | |
3312 * checksum calc | |
3313 */ | |
3314 memcpy (&pcm_mem [pcm_table[i].start+2], in_BufferPtr,in_FileSize); | |
3315 pcm_mem [pcm_table[i].start] = | |
3316 compute_checksum(&pcm_mem [pcm_table[i].start], | |
3317 pcm_table[i].length); | |
3318 | |
3319 return DRV_OK; | |
3320 } | |
3321 i++; | |
3322 } | |
3323 return PCM_INVALID_FILE; | |
3324 } | |
3325 | |
3326 /******************************************************************************* | |
3327 * | |
3328 * pcm_WriteRecord | |
3329 * Purpose : Write a linear fixed elementary field in RAM | |
3330 * | |
3331 * Arguments: In : Name of the file to write | |
3332 * Record number | |
3333 * Size of the record | |
3334 * Pointer to the record content | |
3335 * Out: none | |
3336 * | |
3337 * Returns : PCM_INVALID_SIZE invalid size of record | |
3338 * PCM_INVALID_RECORD invalid record number | |
3339 * PCM_INVALID_FILE invalid name of file | |
3340 * DRV_OK write OK | |
3341 * | |
3342 ******************************************************************************/ | |
3343 | |
3344 UBYTE pcm_WriteRecord (UBYTE * in_FileName, | |
3345 USHORT in_Record, | |
3346 USHORT in_BufferSize, | |
3347 UBYTE * in_BufferPtr) | |
3348 { | |
3349 UBYTE i; | |
3350 i=0; | |
3351 while (pcm_table[i].identifier NEQ NULL) | |
3352 { | |
3353 /* | |
3354 * check all available entries | |
3355 */ | |
3356 if (!strcmp ((char *)in_FileName, pcm_table[i].identifier)) | |
3357 { | |
3358 /* | |
3359 * entry is available, | |
3360 * check entry size | |
3361 */ | |
3362 if (in_BufferSize+2 NEQ pcm_table[i].length) | |
3363 return PCM_INVALID_SIZE; | |
3364 /* | |
3365 * check record number | |
3366 */ | |
3367 if (in_Record EQ 0 OR in_Record > pcm_table[i].records) | |
3368 return PCM_INVALID_RECORD; | |
3369 | |
3370 /* | |
3371 * store data in record | |
3372 */ | |
3373 memcpy (&pcm_mem [pcm_table[i].start+2+(in_Record-1) * in_BufferSize], | |
3374 in_BufferPtr, | |
3375 in_BufferSize); | |
3376 | |
3377 /* | |
3378 * calculate checksum | |
3379 */ | |
3380 pcm_mem [pcm_table[i].start] = | |
3381 compute_checksum(&pcm_mem [pcm_table[i].start], | |
3382 in_BufferSize*pcm_table[i].records+2); | |
3383 | |
3384 return DRV_OK; | |
3385 } | |
3386 i++; | |
3387 } | |
3388 return PCM_INVALID_FILE; | |
3389 } | |
3390 | |
3391 /******************************************************************************* | |
3392 * | |
3393 * pcm_Flush | |
3394 * Purpose : Transfer changes to the PCM of the non volatile RAM. | |
3395 * This fonction can only be called while interrupts | |
3396 * are disabled | |
3397 * | |
3398 * Arguments: In : none | |
3399 * Out: none | |
3400 * | |
3401 * Returns : PCM_ERASE_ERROR erase failed | |
3402 * DRV_OK erase and write read OK | |
3403 * PCM_WRITE_ERROR write failed | |
3404 * | |
3405 ******************************************************************************/ | |
3406 | |
3407 UBYTE pcm_Flush (void) | |
3408 { | |
3409 long write_result,erase_result; | |
3410 | |
3411 UBYTE status; | |
3412 | |
3413 erase_result = pcm_erase_flash_sector(); | |
3414 if (erase_result != PCM_ERASE_ERROR) | |
3415 { | |
3416 write_result = pcm_write_flash (pcm_mem, PCM_SIZE); | |
3417 return (write_result); | |
3418 } | |
3419 else | |
3420 return (erase_result); | |
3421 } | |
3422 /******************************************************************************* | |
3423 * | |
3424 * pcm_ReadParameter | |
3425 * | |
3426 * Purpose : Reads a parameter specified by an index. | |
3427 * | |
3428 * Arguments: In : parameter: parameter index | |
3429 * Out: none | |
3430 * | |
3431 * Returns : The parameter | |
3432 * | |
3433 * Warning! If the parameter is wrong 0 is returned. | |
3434 * | |
3435 ******************************************************************************/ | |
3436 | |
3437 UINT16 pcm_ReadParameter (UBYTE parameter) | |
3438 { | |
3439 UINT16 parameter_value; | |
3440 | |
3441 switch (parameter) { | |
3442 | |
3443 case PCM_SERIAL_CONFIG: | |
3444 | |
3445 parameter_value = pcm_read_parameter (PCM_FLASH_SERIAL_CONFIG); | |
3446 break; | |
3447 | |
3448 default: | |
3449 | |
3450 parameter_value = 0; | |
3451 break; | |
3452 } | |
3453 | |
3454 return (parameter_value); | |
3455 } | |
3456 | |
3457 #endif /* else, #ifdef WIN32 */ | |
3458 #endif /* #ifndef PCM_C */ | |
3459 |